uuagc-bootstrap 0.9.39.3.0 → 0.9.40.1
raw patch · 41 files changed
+57016/−56793 lines, 41 filesdep +uuagc-bootstrapPVP ok
version bump matches the API change (PVP)
Dependencies added: uuagc-bootstrap
API changes (from Hackage documentation)
+ UU.UUAGC.Bootstrap: uuagcBootstrap :: [String] -> FilePath -> IO (ExitCode, [FilePath])
+ UU.UUAGC.Bootstrap: uuagcBootstrapMain :: IO ()
Files
- src-derived/AG2AspectAG.hs +3611/−3557
- src-derived/AbstractSyntax.hs +13/−13
- src-derived/AbstractSyntaxDump.hs +379/−379
- src-derived/Code.hs +64/−64
- src-derived/CodeSyntax.hs +15/−15
- src-derived/CodeSyntaxDump.hs +385/−385
- src-derived/ConcreteSyntax.hs +42/−42
- src-derived/DeclBlocks.hs +5/−5
- src-derived/DefaultRules.hs +3187/−3189
- src-derived/Desugar.hs +3102/−3102
- src-derived/ErrorMessages.hs +38/−38
- src-derived/ExecutionPlan.hs +20/−20
- src-derived/ExecutionPlan2Hs.hs +9592/−9294
- src-derived/Expression.hs +3/−3
- src-derived/GenerateCode.hs +8042/−8122
- src-derived/HsToken.hs +11/−11
- src-derived/Interfaces.hs +7/−7
- src-derived/InterfacesRules.hs +365/−365
- src-derived/KWOrder.hs +2810/−2836
- src-derived/Macro.hs +11/−11
- src-derived/Order.hs +5682/−5726
- src-derived/Patterns.hs +11/−11
- src-derived/PrintCode.hs +4117/−4116
- src-derived/PrintErrorMessages.hs +371/−371
- src-derived/PrintOcamlCode.hs +2221/−2221
- src-derived/PrintVisitCode.hs +360/−360
- src-derived/ResolveLocals.hs +2910/−2923
- src-derived/SemHsTokens.hs +301/−330
- src-derived/TfmToVisage.hs +454/−454
- src-derived/Transform.hs +8001/−8059
- src-derived/Visage.hs +303/−303
- src-derived/VisagePatterns.hs +8/−8
- src-derived/VisageSyntax.hs +11/−11
- src-main/Main.hs +6/−0
- src-options/Options.hs +494/−0
- src/Ag.hs +33/−9
- src/CommonTypes.hs +2/−14
- src/Options.hs +0/−402
- src/Scanner.hs +1/−1
- src/UU/UUAGC/Bootstrap.hs +11/−0
- uuagc-bootstrap.cabal +17/−16
src-derived/AG2AspectAG.hs view
@@ -1,3559 +1,3613 @@ --- UUAGC 0.9.39.1.0 (src-ag/AG2AspectAG.ag)-module AG2AspectAG where-{-# LINE 8 "src-ag/AG2AspectAG.ag" #-}--import Options--import Data.Char-import Data.List-import qualified Data.Map as Map-import qualified Data.Set as Set-import Data.Maybe--import Pretty-import PPUtil-import UU.Scanner.Position--import AbstractSyntax-import TokenDef-import CommonTypes--{-# LINE 24 "dist/build/uuagc/uuagc-tmp/AG2AspectAG.hs" #-}--{-# LINE 2 "src-ag/AbstractSyntax.ag" #-}---- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import Macro --marcos-import CommonTypes-import ErrorMessages-{-# LINE 36 "dist/build/uuagc/uuagc-tmp/AG2AspectAG.hs" #-}--{-# LINE 2 "src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 43 "dist/build/uuagc/uuagc-tmp/AG2AspectAG.hs" #-}--{-# LINE 2 "src-ag/Expression.ag" #-}--import UU.Scanner.Position(Pos)-import HsToken-{-# LINE 49 "dist/build/uuagc/uuagc-tmp/AG2AspectAG.hs" #-}--{-# LINE 2 "src-ag/HsToken.ag" #-}--import CommonTypes-import UU.Scanner.Position(Pos)-{-# LINE 55 "dist/build/uuagc/uuagc-tmp/AG2AspectAG.hs" #-}-{-# LINE 27 "src-ag/AG2AspectAG.ag" #-}--pragmaAspectAG = pp "{-# LANGUAGE EmptyDataDecls, NoMonomorphismRestriction , TypeSynonymInstances, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances #-}"--{-# LINE 60 "dist/build/uuagc/uuagc-tmp/AG2AspectAG.hs" #-}--{-# LINE 32 "src-ag/AG2AspectAG.ag" #-}--ppName l = ppListSep "" "" "_" l-{-# LINE 65 "dist/build/uuagc/uuagc-tmp/AG2AspectAG.hs" #-}--{-# LINE 69 "src-ag/AG2AspectAG.ag" #-}--type FieldMap = [(Identifier, Type)]-type DataTypes = Map.Map NontermIdent (Map.Map ConstructorIdent FieldMap)-{-# LINE 71 "dist/build/uuagc/uuagc-tmp/AG2AspectAG.hs" #-}--{-# LINE 335 "src-ag/AG2AspectAG.ag" #-}--filterAtts newAtts = filter (\att -> Map.member (identifier att) newAtts)-filterNotAtts newAtts = filter (\att -> not (Map.member (identifier att) newAtts))--defAtt att = "data " >|< attTName att >|< "; " >|< attName att >|< " = proxy :: Proxy " >|< attTName att-attName att = pp $ "att_" ++ att-attTName att = pp $ "Att_" ++ att---defAttRec recPref ppNt atts noGroup =- let recName = ppName [recPref, ppNt]- fields = ppCommas (map (\(a,t) -> ppName [pp a, recName ] >|< " ::" >|< ppShow t) (groupAtts atts noGroup))- in- "data " >|< recName >|< " = " >|< recName >|< " { " >|< fields >|< " }"--groupAtts atts noGroup = (Map.toAscList . Map.difference atts) noGroup---- it defines selectors with the form:--- l1_nt_prod(x, _, .., _) = x--- ln_nt_prod(_, .., _, x) = x-defLocalAtts prodName total actual (l:ls) = ppName [pp l, prodName] >|<- ppListSep "(" ")" "," (replicate (actual-1) "_" ++ "x" : replicate (total-actual) "_") >|<- pp " = x" >-<- defLocalAtts prodName total (actual+1) ls-defLocalAtts _ _ _ [] = empty--{-# LINE 100 "dist/build/uuagc/uuagc-tmp/AG2AspectAG.hs" #-}--{-# LINE 390 "src-ag/AG2AspectAG.ag" #-}--ntsList att ppNtL = "nts_" ++ att ++ " = " >|< ppListSep "" "" " .*. " ((map fst ppNtL) ++ [pp "hNil"])--filterNts att = filter ( Map.member (identifier att) . snd )-{-# LINE 107 "dist/build/uuagc/uuagc-tmp/AG2AspectAG.hs" #-}--{-# LINE 448 "src-ag/AG2AspectAG.ag" #-}--data PPRule = PPRule Identifier Identifier Bool ([(Identifier,Type)] -> [Identifier] -> PP_Doc)--ppRule (field,attr) owrt def = PPRule field attr owrt def-ruleField (PPRule field _ _ _ ) = field-ruleAttr (PPRule _ attr _ _ ) = attr-ruleOwrt (PPRule _ _ owrt _ ) = owrt-ruleDef (PPRule _ _ _ def) = def--{-# LINE 119 "dist/build/uuagc/uuagc-tmp/AG2AspectAG.hs" #-}--{-# LINE 487 "src-ag/AG2AspectAG.ag" #-}---defInhGRule ppNt prodName newNT newProd ch rules inhNoGroup synNoGroup chids locals =- let ppAtt = ppName [pp "inh", prodName]- ppR = ppAtt >|< pp " = inhdefM att_inh nts_group $" >-<- indent 4 "do " >-<- indent 5 "loc <- at loc" >-<- indent 5 "lhs <- at lhs" >-<- indent 5 ch >-<- indent 5 "return $" >-<- indent 6 (foldr (>-<) (pp "emptyRecord") (map (chGRule ppNt prodName rules inhNoGroup synNoGroup chids locals) chids))- in if (newNT || (not newNT && newProd))- then (ppR, [ ppAtt ])- else (empty, [])--chGRule ppNt prodName rules inhNoGroup synNoGroup chids locals (idCh,tp) =- let chName = ppName [pp "ch", pp idCh, prodName]- ppTp = ppShow tp- chRules = ppCommas $ mapGRuleDefs (== idCh) rules inhNoGroup synNoGroup chids locals- in if (isNonterminal tp)- then chName >|< ".=." >-<- indent 1 "InhG_" >|< ppShow tp >|< pp " {" >-<- indent 2 chRules >-<- indent 1 "} .*. "- else empty---defSynGRule ppNt prod newNT newProd ch rules inhNoGroup synNoGroup chids locals =- let ppAtt = ppName [pp "syn", ppNt, pp prod]- ppTAtt = "SynG_" >|< ppNt- ppR = ppAtt >|< pp " = syndefM att_syn $" >-<- indent 4 "do " >-<- indent 5 "loc <- at loc" >-<- indent 5 "lhs <- at lhs" >-<- indent 5 ch >-<- indent 5 "return $" >-<- indent 6 ppTAtt >|< pp " {" >-<- indent 7 (ppCommas $ mapGRuleDefs ((== "lhs") . show) rules inhNoGroup synNoGroup chids locals) >-<- indent 6 "}"- in if (newNT || (not newNT && newProd))- then (ppR, [ ppAtt ])- else (empty, [])--defLocRule ppNt prod newNT newProd ch rules inhNoGroup synNoGroup chids locals =- let ppAtt = ppName [pp "loc", ppNt, pp prod]- ppTAtt = ppName [pp "Loc", ppNt, pp prod]- ppR = ppAtt >|< pp " = locdefM att_loc $" >-<- indent 4 "do " >-<- indent 5 "loc <- at loc" >-<- indent 5 "lhs <- at lhs" >-<- indent 5 ch >-<- indent 5 "return $" >-<- indent 6 (ppListSep "(" ")" "," $ mapLRuleDefs rules inhNoGroup synNoGroup chids locals)- in (ppR, [ ppAtt ])--defInstRules ppNt prod newNT newProd ch rules chids locals- = let ppAsp = ppName [pp "inst", ppNt, pp prod]- instRules = filter ((=="inst") . show . ruleField) rules- ppAtt att = ppListSep "`ext` " "" "_" [pp "inst_ch", pp att, ppNt, pp prod]- in ( ppAsp >|< pp " = emptyRule " >|< (map (ppAtt . ruleAttr) instRules) >-<- (vlist $ map (defInstRule ppNt prod ch chids locals) instRules)- , [ ppAsp ])---defInstRule ppNt prod ch chids locals rule =- let ppAtt = ppName [pp "ch", pp (ruleAttr rule), ppNt, pp prod]- in pp "inst_" >|< ppAtt >|< pp " = instdefM " >|< ppAtt >|< pp " $" >-<- indent 4 "do " >-<- indent 5 "loc <- at loc" >-<- indent 5 "lhs <- at lhs" >-<- indent 5 ch >-<- indent 5 "return $" >-<- indent 6 ((ruleDef rule) chids locals)---defSynRules ppNt prod newNT newProd newAtts ch rules inhNoGroup synNoGroup chids locals- = let synRules = filter ( (=="lhs") . show . ruleField) rules- ngRules = filter ((flip elem synNoGroup) . getName . ruleAttr) synRules- (ppR, ppRA) = unzip $ map (defSynRule True ppNt prod newNT newProd newAtts ch chids locals) ngRules- in (vlist ppR, concat ppRA )--modSynRules ppNt prod newNT newProd newAtts ch rules inhNoGroup synNoGroup chids locals- = let synRules = filter ( (=="lhs") . show . ruleField) rules- ngRules = filter ((flip elem synNoGroup) . getName . ruleAttr) synRules- (ppR, ppRA) = unzip $ map (defSynRule False ppNt prod newNT newProd newAtts ch chids locals) ngRules- in (vlist ppR, concat ppRA )--defSynRule new ppNt prod newNT newProd newAtts ch chids locals rule =- let att = ruleAttr rule- newAtt = Map.member att newAtts- owrt = ruleOwrt rule- ppAtt = ppName [pp att, pp (if new then "syn" else "synM"), ppNt, pp prod]- ppR def = ppAtt >|< pp (" = " ++ def ++ " ") >|< attName (show att) >|< pp " $" >-<- indent 4 "do " >-<- indent 5 "loc <- at loc" >-<- indent 5 "lhs <- at lhs" >-<- indent 5 ch >-<- indent 5 "return $" >-<- indent 6 ((ruleDef rule) chids locals)- in- if new- then if (not owrt && (newNT || (not newNT && newProd) || newAtt))- then (ppR "syndefM", [ ppAtt ])- else (empty, [])- else if owrt- then (ppR "synmodM", [ ppAtt ])- else (empty, [])----defInhRules ppNt prodName newNT newProd newAtts ch rules inhNoGroup synNoGroup chids locals- = let ngRules = filter ((flip elem inhNoGroup) . getName . ruleAttr) rules- (ppR, ppRA) = unzip $ map (defInhRule True ppNt prodName newNT newProd newAtts ch ngRules inhNoGroup synNoGroup chids locals) inhNoGroup- in (vlist ppR, concat ppRA)--modInhRules ppNt prodName newNT newProd newAtts ch rules inhNoGroup synNoGroup chids locals- = let ngRules = filter ((flip elem inhNoGroup) . getName . ruleAttr) rules- (ppR, ppRA) = unzip $ map (defInhRule False ppNt prodName newNT newProd newAtts ch ngRules inhNoGroup synNoGroup chids locals) inhNoGroup- in (vlist ppR, concat ppRA)---defInhRule new ppNt prodName newNT newProd newAtts ch rules inhNoGroup synNoGroup chids locals att =- let ppAtt = ppName [pp att, pp (if new then "inh" else "inhM"),prodName]- newAtt = Map.member (identifier att) newAtts- chRMaybe = map (chRule new ppNt prodName att rules inhNoGroup synNoGroup chids locals) chids- chR = [ x | (Just x) <- chRMaybe ]- ppR def = ppAtt >|< pp (" = " ++ def ++ " ") >|< attName att >|< " nts_" >|< att >|< " $" >-<- indent 4 "do " >-<- indent 5 "loc <- at loc" >-<- indent 5 "lhs <- at lhs" >-<- indent 5 ch >-<- indent 5 "return $" >-<- indent 6 (foldr (>-<) (pp "emptyRecord") chR)- in- if new- then if (newNT || (not newNT && newProd) || newAtt)- then (ppR "inhdefM", [ ppAtt ])- else (empty, [])- else if (not . null) chR- then (ppR "inhmodM", [ ppAtt ])- else (empty, [])---chRule new ppNt prodName att rules inhNoGroup synNoGroup chids locals (idCh,tp) =- let chName = ppName [pp "ch", pp idCh, prodName]- ppTp = ppShow tp- chRule = inhRuleDef new (== idCh) (== att) rules inhNoGroup synNoGroup chids locals -- it's supposed to be only one- in if (isNonterminal tp && (not . null) chRule)- then Just $ chName >|< ".=. (" >|< chRule >|< ") .*. "- else Nothing---mapLRuleDefs rules inhNoGroup synNoGroup chids locals- = map appSnd $ sortBy cmpField $ filter ((== "loc") . show . ruleField) rules- where cmpField r1 r2 = compare (ruleField r1) (ruleField r2)- appSnd rule = (ruleDef rule) chids locals---mapGRuleDefs filt rules inhNoGroup synNoGroup chids locals- = map appSnd $ sortBy cmpField $ filter (not . (flip elem inhNoGroup) . getName . ruleAttr)- $ filter (not . (flip elem synNoGroup) . getName . ruleAttr)- $ filter ( filt . ruleField) rules- where cmpField r1 r2 = compare (ruleField r1) (ruleField r2)- appSnd rule = (ruleDef rule) chids locals--inhRuleDef new filt1 filt2 rules inhNoGroup synNoGroup chids locals- = map appSnd $ sortBy cmpField $ filter ( (== not new) . ruleOwrt)- $ filter ((flip elem inhNoGroup) . getName . ruleAttr)- $ filter ( filt2 . getName . ruleAttr)- $ filter ( filt1 . ruleField) rules- where cmpField r1 r2 = compare (ruleField r1) (ruleField r2)- appSnd rule = (ruleDef rule) chids locals--defRule ppNt (field,att) noGroup rhs = \chids locals ->- let ppAtt = if (elem (getName att) noGroup)- then empty- else case (show field) of- "lhs" -> att >|< "_" >|< pp "SynG" >|< pp "_" >|< ppNt >|< " = "- "loc" -> empty- "inst" -> empty- otherwise -> att >|< "_" >|< pp "InhG" >|< pp "_" >|<- (maybe (error $ "lhs field " ++ show field ++" is not a child")- ppShow (lookup field chids))- >|< " = "- in ppAtt >|< (rhs noGroup field chids locals)---rhsRule ppNt ppProd tks noGroup field chids locals = vlist . lines2PP . (map (token2PP ppNt ppProd field chids locals noGroup )) $ tks---lines2PP [] = []-lines2PP xs = map line2PP . shiftLeft . getLines $ xs---token2PP ppNt ppProd field chids locals noGroup tk- = case tk of- AGLocal var pos _ -> (pos, if (elem var locals)- then (ppListSep "(" "" "_" [pp var, ppNt, ppProd]) >|< pp " (loc # att_loc)) "- else pp var)- AGField field attr pos _ -> let ppChT = maybe (error $ "rhs field " ++ show field ++ " is not a child") ppShow (lookup field chids)- ppAtt = case (show field) of- "lhs" -> attName "inh"- "loc" -> attName "loc"- otherwise -> attName "syn"- ppSubAtt = case (show field) of- "lhs" -> ppName [pp (getName attr), pp "InhG", ppNt]- "loc" -> ppName [pp (getName attr), ppNt, ppProd]- otherwise -> ppName [pp (getName attr), pp "SynG", ppChT]- in (pos, if (elem (getName attr) noGroup )- then pp "(" >|< pp (getName field) >|< " # " >|< attName (getName attr) >|< pp ")"- else pp "(" >|< ppSubAtt >|< " (" >|< pp (getName field) >|< " # " >|< ppAtt >|< ")) ")- HsToken value pos -> (pos, pp value)- CharToken value pos -> (pos, pp (show value))- StrToken value pos -> (pos, pp (show value))- Err mesg pos -> (pos, pp $ " ***" ++ mesg ++ "*** ")--line2PP ts = let f (p,t) r = let ct = column p- in \c -> pp (spaces (ct-c)) >|< t >|< r (length (show t) +ct)- spaces x | x < 0 = ""- | otherwise = replicate x ' '- in foldr f (pp . const "") ts 1--{-# LINE 344 "dist/build/uuagc/uuagc-tmp/AG2AspectAG.hs" #-}--{-# LINE 714 "src-ag/AG2AspectAG.ag" #-}--ppMacro (Macro con children) = "( atts_" >|< show con >|< ", " >|< ppListSep "" "" " <.> " ppChildren >|<")"- where ppChildren = map ppChild children- ppChild (RuleChild ch n) = chName ch >|< " ==> " >|< ppMacro n- ppChild (ChildChild ch n) = chName ch >|< " --> " >|< n- ppChild (ValueChild ch n) = chName ch >|< " ~~> " >|< n- chName ch = ppName [pp "ch", pp ch, pp con]-{-# LINE 354 "dist/build/uuagc/uuagc-tmp/AG2AspectAG.hs" #-}--{-# LINE 747 "src-ag/AG2AspectAG.ag" #-}--ppNoGroupAtts syn noGroup = let synatts = Map.keys $ Map.filterWithKey (\att _ -> elem (getName att) noGroup) syn- in map (flip (>|<) "_inh") noGroup ++ map (flip (>|<) "_syn") synatts--ruleName att prodName = ppName [att,prodName]--elemNT a b = False-{-# LINE 364 "dist/build/uuagc/uuagc-tmp/AG2AspectAG.hs" #-}--{-# LINE 790 "src-ag/AG2AspectAG.ag" #-}--attTypes atts = map (\(a,t) -> "(HCons (LVPair (Proxy Att_" >|< a >|< ") " >|< ppShow t >|< ") ") $ Map.toAscList atts-{-# LINE 369 "dist/build/uuagc/uuagc-tmp/AG2AspectAG.hs" #-}--{-# LINE 844 "src-ag/AG2AspectAG.ag" #-}--attVars atts = map (\(a,_) -> "_" >|< a >|< " ") $ Map.toAscList atts-attFields atts noGroup ppNt =- let ng = map (\(a,_) -> attName (getName a) >|< " .=. _" >|< a >|< " .*. ") $ Map.toAscList noGroup- g = ppCommas $ map (\(a,_) -> ppName [pp a, pp "InhG",ppNt] >|< "= _" >|< a) $ Map.toAscList $ Map.difference atts noGroup- in "(" >|< ng >|< "att_inh .=. " >|< ppName [pp "InhG", ppNt] >|< " { " >|< g >|< " } .*. emptyRecord)"-{-# LINE 378 "dist/build/uuagc/uuagc-tmp/AG2AspectAG.hs" #-}--- Child --------------------------------------------------------{-- visit 0:- inherited attributes:- ext : Maybe String- inhMap : Map Identifier Attributes- inhNoGroup : [String]- o_noGroup : [String]- o_rename : Bool- ppNt : PP_Doc- ppProd : PP_Doc- synMap : Map Identifier Attributes- synNoGroup : [String]- synthesized attributes:- idCL : [(Identifier,Type)]- ppCSF : [(Identifier,(PP_Doc,PP_Doc))]- ppL : PP_Doc- ppLI : [PP_Doc]- ppR : PP_Doc- prdInh : Attributes- alternatives:- alternative Child:- child name : {Identifier}- child tp : {Type}- child kind : {ChildKind}- visit 0:- local ppCh : _- local ppTCh : _- local chName : _- local chLabel : _- local chTLabel : _- local chnt : _- local inh : _- local syn : _--}--- cata-sem_Child :: Child ->- T_Child -sem_Child (Child _name _tp _kind ) =- (sem_Child_Child _name _tp _kind )--- semantic domain-newtype T_Child = T_Child ((Maybe String) ->- (Map Identifier Attributes) ->- ([String]) ->- ([String]) ->- Bool ->- PP_Doc ->- PP_Doc ->- (Map Identifier Attributes) ->- ([String]) ->- ( ([(Identifier,Type)]),([(Identifier,(PP_Doc,PP_Doc))]),PP_Doc,([PP_Doc]),PP_Doc,Attributes))-data Inh_Child = Inh_Child {ext_Inh_Child :: (Maybe String),inhMap_Inh_Child :: (Map Identifier Attributes),inhNoGroup_Inh_Child :: ([String]),o_noGroup_Inh_Child :: ([String]),o_rename_Inh_Child :: Bool,ppNt_Inh_Child :: PP_Doc,ppProd_Inh_Child :: PP_Doc,synMap_Inh_Child :: (Map Identifier Attributes),synNoGroup_Inh_Child :: ([String])}-data Syn_Child = Syn_Child {idCL_Syn_Child :: ([(Identifier,Type)]),ppCSF_Syn_Child :: ([(Identifier,(PP_Doc,PP_Doc))]),ppL_Syn_Child :: PP_Doc,ppLI_Syn_Child :: ([PP_Doc]),ppR_Syn_Child :: PP_Doc,prdInh_Syn_Child :: Attributes}-wrap_Child :: T_Child ->- Inh_Child ->- Syn_Child -wrap_Child (T_Child sem ) (Inh_Child _lhsIext _lhsIinhMap _lhsIinhNoGroup _lhsIo_noGroup _lhsIo_rename _lhsIppNt _lhsIppProd _lhsIsynMap _lhsIsynNoGroup ) =- (let ( _lhsOidCL,_lhsOppCSF,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOprdInh) = sem _lhsIext _lhsIinhMap _lhsIinhNoGroup _lhsIo_noGroup _lhsIo_rename _lhsIppNt _lhsIppProd _lhsIsynMap _lhsIsynNoGroup - in (Syn_Child _lhsOidCL _lhsOppCSF _lhsOppL _lhsOppLI _lhsOppR _lhsOprdInh ))-sem_Child_Child :: Identifier ->- Type ->- ChildKind ->- T_Child -sem_Child_Child name_ tp_ kind_ =- (T_Child (\ _lhsIext- _lhsIinhMap- _lhsIinhNoGroup- _lhsIo_noGroup- _lhsIo_rename- _lhsIppNt- _lhsIppProd- _lhsIsynMap- _lhsIsynNoGroup ->- (let _lhsOprdInh :: Attributes- _lhsOppL :: PP_Doc- _lhsOppLI :: ([PP_Doc])- _lhsOppR :: PP_Doc- _lhsOidCL :: ([(Identifier,Type)])- _lhsOppCSF :: ([(Identifier,(PP_Doc,PP_Doc))])- -- "src-ag/AG2AspectAG.ag"(line 66, column 12)- _lhsOprdInh =- ({-# LINE 66 "src-ag/AG2AspectAG.ag" #-}- _inh- {-# LINE 462 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 181, column 25)- _ppCh =- ({-# LINE 181 "src-ag/AG2AspectAG.ag" #-}- pp name_- {-# LINE 468 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 182, column 25)- _ppTCh =- ({-# LINE 182 "src-ag/AG2AspectAG.ag" #-}- ppShow tp_- {-# LINE 474 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 183, column 25)- _chName =- ({-# LINE 183 "src-ag/AG2AspectAG.ag" #-}- ppName [_ppCh , _lhsIppNt, _lhsIppProd]- {-# LINE 480 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 283, column 25)- _chLabel =- ({-# LINE 283 "src-ag/AG2AspectAG.ag" #-}- "ch_" >|< _chName- {-# LINE 486 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 284, column 25)- _chTLabel =- ({-# LINE 284 "src-ag/AG2AspectAG.ag" #-}- "Ch_" >|< _chName- {-# LINE 492 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 285, column 25)- _lhsOppL =- ({-# LINE 285 "src-ag/AG2AspectAG.ag" #-}- "data " >|< _chTLabel >|< "; " >|< _chLabel >|< pp " = proxy :: " >|<- case kind_ of- ChildSyntax -> "Proxy " >|< "(" >|< _chTLabel >|< ", " >|< _ppTCh >|< ")"- _ -> "SemType " >|< _ppTCh >|< pp " nt => Proxy " >|<- "(" >|< _chTLabel >|< ", nt)"- {-# LINE 502 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 291, column 25)- _lhsOppLI =- ({-# LINE 291 "src-ag/AG2AspectAG.ag" #-}- [ _chLabel , _chTLabel ]- {-# LINE 508 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 444, column 25)- _lhsOppR =- ({-# LINE 444 "src-ag/AG2AspectAG.ag" #-}- let chName = ppListSep "" "" "_" [pp name_, _lhsIppNt, _lhsIppProd]- in pp name_ >|< " <- at ch_" >|< chName- {-# LINE 515 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 482, column 25)- _lhsOidCL =- ({-# LINE 482 "src-ag/AG2AspectAG.ag" #-}- [ (name_, removeDeforested tp_ ) ]- {-# LINE 521 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 819, column 25)- _lhsOppCSF =- ({-# LINE 819 "src-ag/AG2AspectAG.ag" #-}- let- semC = if (isNonterminal tp_)- then "sem_" >|< ppShow tp_ >|< " _" >|< name_- else "sem_Lit _" >|< name_- in case kind_ of- ChildSyntax -> [(name_, ( _chLabel >|< " .=. (" >|< semC >|< ") .*. "- , _chLabel >|< " .=. _" >|< name_ >|< " .*. "))]- _ -> []- {-# LINE 534 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 19, column 11)- _chnt =- ({-# LINE 19 "src-ag/DistChildAttr.ag" #-}- case tp_ of- NT nt _ _ -> nt- Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")- Haskell t -> identifier t- {-# LINE 543 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 23, column 11)- _inh =- ({-# LINE 23 "src-ag/DistChildAttr.ag" #-}- Map.findWithDefault Map.empty _chnt _lhsIinhMap- {-# LINE 549 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 24, column 11)- _syn =- ({-# LINE 24 "src-ag/DistChildAttr.ag" #-}- Map.findWithDefault Map.empty _chnt _lhsIsynMap- {-# LINE 555 "src-ag/AG2AspectAG.hs" #-}- )- in ( _lhsOidCL,_lhsOppCSF,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOprdInh))) )--- Children -----------------------------------------------------{-- visit 0:- inherited attributes:- ext : Maybe String- inhMap : Map Identifier Attributes- inhNoGroup : [String]- o_noGroup : [String]- o_rename : Bool- ppNt : PP_Doc- ppProd : PP_Doc- synMap : Map Identifier Attributes- synNoGroup : [String]- synthesized attributes:- idCL : [(Identifier,Type)]- ppCSF : [(Identifier,(PP_Doc,PP_Doc))]- ppL : PP_Doc- ppLI : [PP_Doc]- ppR : PP_Doc- prdInh : Attributes- alternatives:- alternative Cons:- child hd : Child - child tl : Children - alternative Nil:--}--- cata-sem_Children :: Children ->- T_Children -sem_Children list =- (Prelude.foldr sem_Children_Cons sem_Children_Nil (Prelude.map sem_Child list) )--- semantic domain-newtype T_Children = T_Children ((Maybe String) ->- (Map Identifier Attributes) ->- ([String]) ->- ([String]) ->- Bool ->- PP_Doc ->- PP_Doc ->- (Map Identifier Attributes) ->- ([String]) ->- ( ([(Identifier,Type)]),([(Identifier,(PP_Doc,PP_Doc))]),PP_Doc,([PP_Doc]),PP_Doc,Attributes))-data Inh_Children = Inh_Children {ext_Inh_Children :: (Maybe String),inhMap_Inh_Children :: (Map Identifier Attributes),inhNoGroup_Inh_Children :: ([String]),o_noGroup_Inh_Children :: ([String]),o_rename_Inh_Children :: Bool,ppNt_Inh_Children :: PP_Doc,ppProd_Inh_Children :: PP_Doc,synMap_Inh_Children :: (Map Identifier Attributes),synNoGroup_Inh_Children :: ([String])}-data Syn_Children = Syn_Children {idCL_Syn_Children :: ([(Identifier,Type)]),ppCSF_Syn_Children :: ([(Identifier,(PP_Doc,PP_Doc))]),ppL_Syn_Children :: PP_Doc,ppLI_Syn_Children :: ([PP_Doc]),ppR_Syn_Children :: PP_Doc,prdInh_Syn_Children :: Attributes}-wrap_Children :: T_Children ->- Inh_Children ->- Syn_Children -wrap_Children (T_Children sem ) (Inh_Children _lhsIext _lhsIinhMap _lhsIinhNoGroup _lhsIo_noGroup _lhsIo_rename _lhsIppNt _lhsIppProd _lhsIsynMap _lhsIsynNoGroup ) =- (let ( _lhsOidCL,_lhsOppCSF,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOprdInh) = sem _lhsIext _lhsIinhMap _lhsIinhNoGroup _lhsIo_noGroup _lhsIo_rename _lhsIppNt _lhsIppProd _lhsIsynMap _lhsIsynNoGroup - in (Syn_Children _lhsOidCL _lhsOppCSF _lhsOppL _lhsOppLI _lhsOppR _lhsOprdInh ))-sem_Children_Cons :: T_Child ->- T_Children ->- T_Children -sem_Children_Cons (T_Child hd_ ) (T_Children tl_ ) =- (T_Children (\ _lhsIext- _lhsIinhMap- _lhsIinhNoGroup- _lhsIo_noGroup- _lhsIo_rename- _lhsIppNt- _lhsIppProd- _lhsIsynMap- _lhsIsynNoGroup ->- (let _lhsOidCL :: ([(Identifier,Type)])- _lhsOppCSF :: ([(Identifier,(PP_Doc,PP_Doc))])- _lhsOppL :: PP_Doc- _lhsOppLI :: ([PP_Doc])- _lhsOppR :: PP_Doc- _lhsOprdInh :: Attributes- _hdOext :: (Maybe String)- _hdOinhMap :: (Map Identifier Attributes)- _hdOinhNoGroup :: ([String])- _hdOo_noGroup :: ([String])- _hdOo_rename :: Bool- _hdOppNt :: PP_Doc- _hdOppProd :: PP_Doc- _hdOsynMap :: (Map Identifier Attributes)- _hdOsynNoGroup :: ([String])- _tlOext :: (Maybe String)- _tlOinhMap :: (Map Identifier Attributes)- _tlOinhNoGroup :: ([String])- _tlOo_noGroup :: ([String])- _tlOo_rename :: Bool- _tlOppNt :: PP_Doc- _tlOppProd :: PP_Doc- _tlOsynMap :: (Map Identifier Attributes)- _tlOsynNoGroup :: ([String])- _hdIidCL :: ([(Identifier,Type)])- _hdIppCSF :: ([(Identifier,(PP_Doc,PP_Doc))])- _hdIppL :: PP_Doc- _hdIppLI :: ([PP_Doc])- _hdIppR :: PP_Doc- _hdIprdInh :: Attributes- _tlIidCL :: ([(Identifier,Type)])- _tlIppCSF :: ([(Identifier,(PP_Doc,PP_Doc))])- _tlIppL :: PP_Doc- _tlIppLI :: ([PP_Doc])- _tlIppR :: PP_Doc- _tlIprdInh :: Attributes- -- use rule "src-ag/AG2AspectAG.ag"(line 480, column 31)- _lhsOidCL =- ({-# LINE 480 "src-ag/AG2AspectAG.ag" #-}- _hdIidCL ++ _tlIidCL- {-# LINE 661 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 815, column 34)- _lhsOppCSF =- ({-# LINE 815 "src-ag/AG2AspectAG.ag" #-}- _hdIppCSF ++ _tlIppCSF- {-# LINE 667 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 257, column 79)- _lhsOppL =- ({-# LINE 257 "src-ag/AG2AspectAG.ag" #-}- _hdIppL >-< _tlIppL- {-# LINE 673 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 257, column 112)- _lhsOppLI =- ({-# LINE 257 "src-ag/AG2AspectAG.ag" #-}- _hdIppLI ++ _tlIppLI- {-# LINE 679 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 411, column 79)- _lhsOppR =- ({-# LINE 411 "src-ag/AG2AspectAG.ag" #-}- _hdIppR >-< _tlIppR- {-# LINE 685 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 64, column 57)- _lhsOprdInh =- ({-# LINE 64 "src-ag/AG2AspectAG.ag" #-}- _hdIprdInh `Map.union` _tlIprdInh- {-# LINE 691 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOext =- ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}- _lhsIext- {-# LINE 697 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 703 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOinhNoGroup =- ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}- _lhsIinhNoGroup- {-# LINE 709 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOo_noGroup =- ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_noGroup- {-# LINE 715 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOo_rename =- ({-# LINE 40 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_rename- {-# LINE 721 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOppNt =- ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}- _lhsIppNt- {-# LINE 727 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOppProd =- ({-# LINE 191 "src-ag/AG2AspectAG.ag" #-}- _lhsIppProd- {-# LINE 733 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 739 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOsynNoGroup =- ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}- _lhsIsynNoGroup- {-# LINE 745 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOext =- ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}- _lhsIext- {-# LINE 751 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 757 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOinhNoGroup =- ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}- _lhsIinhNoGroup- {-# LINE 763 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOo_noGroup =- ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_noGroup- {-# LINE 769 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOo_rename =- ({-# LINE 40 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_rename- {-# LINE 775 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOppNt =- ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}- _lhsIppNt- {-# LINE 781 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOppProd =- ({-# LINE 191 "src-ag/AG2AspectAG.ag" #-}- _lhsIppProd- {-# LINE 787 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 793 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOsynNoGroup =- ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}- _lhsIsynNoGroup- {-# LINE 799 "src-ag/AG2AspectAG.hs" #-}- )- ( _hdIidCL,_hdIppCSF,_hdIppL,_hdIppLI,_hdIppR,_hdIprdInh) =- hd_ _hdOext _hdOinhMap _hdOinhNoGroup _hdOo_noGroup _hdOo_rename _hdOppNt _hdOppProd _hdOsynMap _hdOsynNoGroup - ( _tlIidCL,_tlIppCSF,_tlIppL,_tlIppLI,_tlIppR,_tlIprdInh) =- tl_ _tlOext _tlOinhMap _tlOinhNoGroup _tlOo_noGroup _tlOo_rename _tlOppNt _tlOppProd _tlOsynMap _tlOsynNoGroup - in ( _lhsOidCL,_lhsOppCSF,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOprdInh))) )-sem_Children_Nil :: T_Children -sem_Children_Nil =- (T_Children (\ _lhsIext- _lhsIinhMap- _lhsIinhNoGroup- _lhsIo_noGroup- _lhsIo_rename- _lhsIppNt- _lhsIppProd- _lhsIsynMap- _lhsIsynNoGroup ->- (let _lhsOidCL :: ([(Identifier,Type)])- _lhsOppCSF :: ([(Identifier,(PP_Doc,PP_Doc))])- _lhsOppL :: PP_Doc- _lhsOppLI :: ([PP_Doc])- _lhsOppR :: PP_Doc- _lhsOprdInh :: Attributes- -- use rule "src-ag/AG2AspectAG.ag"(line 480, column 31)- _lhsOidCL =- ({-# LINE 480 "src-ag/AG2AspectAG.ag" #-}- []- {-# LINE 827 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 815, column 34)- _lhsOppCSF =- ({-# LINE 815 "src-ag/AG2AspectAG.ag" #-}- []- {-# LINE 833 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 257, column 79)- _lhsOppL =- ({-# LINE 257 "src-ag/AG2AspectAG.ag" #-}- empty- {-# LINE 839 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 257, column 112)- _lhsOppLI =- ({-# LINE 257 "src-ag/AG2AspectAG.ag" #-}- []- {-# LINE 845 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 411, column 79)- _lhsOppR =- ({-# LINE 411 "src-ag/AG2AspectAG.ag" #-}- empty- {-# LINE 851 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 64, column 57)- _lhsOprdInh =- ({-# LINE 64 "src-ag/AG2AspectAG.ag" #-}- Map.empty- {-# LINE 857 "src-ag/AG2AspectAG.hs" #-}- )- in ( _lhsOidCL,_lhsOppCSF,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOprdInh))) )--- Expression ---------------------------------------------------{-- visit 0:- inherited attributes:- ppNt : PP_Doc- ppProd : PP_Doc- synthesized attribute:- ppRE : [String] -> Identifier -> [(Identifier,Type)] -> [Identifier] -> PP_Doc- alternatives:- alternative Expression:- child pos : {Pos}- child tks : {[HsToken]}--}--- cata-sem_Expression :: Expression ->- T_Expression -sem_Expression (Expression _pos _tks ) =- (sem_Expression_Expression _pos _tks )--- semantic domain-newtype T_Expression = T_Expression (PP_Doc ->- PP_Doc ->- ( ([String] -> Identifier -> [(Identifier,Type)] -> [Identifier] -> PP_Doc)))-data Inh_Expression = Inh_Expression {ppNt_Inh_Expression :: PP_Doc,ppProd_Inh_Expression :: PP_Doc}-data Syn_Expression = Syn_Expression {ppRE_Syn_Expression :: ([String] -> Identifier -> [(Identifier,Type)] -> [Identifier] -> PP_Doc)}-wrap_Expression :: T_Expression ->- Inh_Expression ->- Syn_Expression -wrap_Expression (T_Expression sem ) (Inh_Expression _lhsIppNt _lhsIppProd ) =- (let ( _lhsOppRE) = sem _lhsIppNt _lhsIppProd - in (Syn_Expression _lhsOppRE ))-sem_Expression_Expression :: Pos ->- ([HsToken]) ->- T_Expression -sem_Expression_Expression pos_ tks_ =- (T_Expression (\ _lhsIppNt- _lhsIppProd ->- (let _lhsOppRE :: ([String] -> Identifier -> [(Identifier,Type)] -> [Identifier] -> PP_Doc)- -- "src-ag/AG2AspectAG.ag"(line 477, column 25)- _lhsOppRE =- ({-# LINE 477 "src-ag/AG2AspectAG.ag" #-}- rhsRule _lhsIppNt _lhsIppProd tks_- {-# LINE 901 "src-ag/AG2AspectAG.hs" #-}- )- in ( _lhsOppRE))) )--- Grammar ------------------------------------------------------{-- visit 0:- inherited attributes:- agi : (Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes))- ext : Maybe String- options : Options- synthesized attributes:- imp : PP_Doc- pp : PP_Doc- 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 quantMap : {QuantMap}- child uniqueMap : {UniqueMap}- child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}- visit 0:- local o_noGroup : _- local newAtts : _- local newProds : _- local ppA : _- local ppAI : _- local ppNtL : _- local ppR : _--}--- cata-sem_Grammar :: Grammar ->- T_Grammar -sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap ) =- (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap )--- semantic domain-newtype T_Grammar = T_Grammar (((Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes))) ->- (Maybe String) ->- Options ->- ( PP_Doc,PP_Doc))-data Inh_Grammar = Inh_Grammar {agi_Inh_Grammar :: ((Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes))),ext_Inh_Grammar :: (Maybe String),options_Inh_Grammar :: Options}-data Syn_Grammar = Syn_Grammar {imp_Syn_Grammar :: PP_Doc,pp_Syn_Grammar :: PP_Doc}-wrap_Grammar :: T_Grammar ->- Inh_Grammar ->- Syn_Grammar -wrap_Grammar (T_Grammar sem ) (Inh_Grammar _lhsIagi _lhsIext _lhsIoptions ) =- (let ( _lhsOimp,_lhsOpp) = sem _lhsIagi _lhsIext _lhsIoptions - in (Syn_Grammar _lhsOimp _lhsOpp ))-sem_Grammar_Grammar :: TypeSyns ->- UseMap ->- Derivings ->- (Set NontermIdent) ->- T_Nonterminals ->- PragmaMap ->- AttrOrderMap ->- ParamMap ->- ContextMap ->- QuantMap ->- UniqueMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->- T_Grammar -sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_ =- (T_Grammar (\ _lhsIagi- _lhsIext- _lhsIoptions ->- (let _nontsOo_rename :: Bool- _nontsOo_noGroup :: ([String])- _nontsOnewAtts :: ( Attributes )- _nontsOnewProds :: ( DataTypes )- _nontsOnewNTs :: (Set NontermIdent)- _lhsOimp :: PP_Doc- _lhsOpp :: PP_Doc- _nontsOderivs :: Derivings- _nontsOtSyns :: TypeSyns- _nontsOinhMap :: (Map Identifier Attributes)- _nontsOsynMap :: (Map Identifier Attributes)- _nontsOext :: (Maybe String)- _nontsIextendedNTs :: (Set NontermIdent)- _nontsIinhMap' :: (Map Identifier Attributes)- _nontsIppA :: PP_Doc- _nontsIppAI :: ([PP_Doc])- _nontsIppCata :: PP_Doc- _nontsIppD :: PP_Doc- _nontsIppDI :: ([PP_Doc])- _nontsIppL :: PP_Doc- _nontsIppLI :: ([PP_Doc])- _nontsIppNtL :: ([(PP_Doc, Attributes)])- _nontsIppR :: PP_Doc- _nontsIppSF :: PP_Doc- _nontsIppW :: PP_Doc- _nontsIsynMap' :: (Map Identifier Attributes)- -- "src-ag/AG2AspectAG.ag"(line 42, column 14)- _nontsOo_rename =- ({-# LINE 42 "src-ag/AG2AspectAG.ag" #-}- rename _lhsIoptions- {-# LINE 1006 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 46, column 14)- _o_noGroup =- ({-# LINE 46 "src-ag/AG2AspectAG.ag" #-}- sort $ noGroup _lhsIoptions- {-# LINE 1012 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 47, column 14)- _nontsOo_noGroup =- ({-# LINE 47 "src-ag/AG2AspectAG.ag" #-}- _o_noGroup- {-# LINE 1018 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 79, column 23)- _newAtts =- ({-# LINE 79 "src-ag/AG2AspectAG.ag" #-}- case _lhsIagi of- (_,_,atts) -> ( Map.unions . (\(a,b) -> a++b) . unzip . Map.elems) atts- {-# LINE 1025 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 81, column 23)- _nontsOnewAtts =- ({-# LINE 81 "src-ag/AG2AspectAG.ag" #-}- _newAtts- {-# LINE 1031 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 87, column 23)- _newProds =- ({-# LINE 87 "src-ag/AG2AspectAG.ag" #-}- case _lhsIagi of- (_,prods,_) -> prods- {-# LINE 1038 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 89, column 23)- _nontsOnewProds =- ({-# LINE 89 "src-ag/AG2AspectAG.ag" #-}- _newProds- {-# LINE 1044 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 111, column 23)- _nontsOnewNTs =- ({-# LINE 111 "src-ag/AG2AspectAG.ag" #-}- case _lhsIagi of- (newNTs,_,_) -> Set.difference newNTs _nontsIextendedNTs- {-# LINE 1051 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 126, column 25)- _lhsOimp =- ({-# LINE 126 "src-ag/AG2AspectAG.ag" #-}- "import Language.Grammars.AspectAG" >-<- "import Language.Grammars.AspectAG.Derive" >-<- "import Data.HList.Label4" >-<- "import Data.HList.TypeEqGeneric1" >-<- "import Data.HList.TypeCastGeneric1" >-<- maybe empty ("import qualified" >#<) _lhsIext >-<- maybe empty (\ext -> "import" >#< ext >#< ppListSep "(" ")" "," (_nontsIppDI ++ _nontsIppLI ++ _ppAI )) _lhsIext- {-# LINE 1063 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 139, column 25)- _lhsOpp =- ({-# LINE 139 "src-ag/AG2AspectAG.ag" #-}- (if dataTypes _lhsIoptions- then "-- datatypes" >-< _nontsIppD >-<- "-- labels" >-< _nontsIppL- else empty)- >-<- (if folds _lhsIoptions- then "-- attributes" >-< _ppA >-<- "-- rules" >-< _ppR >-<- "-- catas" >-< _nontsIppCata- else empty)- >-<- (if semfuns _lhsIoptions- then "-- semantic functions" >-< _nontsIppSF- else empty)- >-<- (if wrappers _lhsIoptions- then "-- wrappers" >-< _nontsIppW- else empty)- {-# LINE 1086 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 201, column 25)- _nontsOderivs =- ({-# LINE 201 "src-ag/AG2AspectAG.ag" #-}- derivings_- {-# LINE 1092 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 249, column 34)- _nontsOtSyns =- ({-# LINE 249 "src-ag/AG2AspectAG.ag" #-}- typeSyns_- {-# LINE 1098 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 298, column 25)- _ppA =- ({-# LINE 298 "src-ag/AG2AspectAG.ag" #-}- vlist (map defAtt (filterAtts _newAtts _o_noGroup )) >-<- defAtt "loc" >-<- (case _lhsIext of- Nothing -> defAtt "inh" >-< defAtt "syn"- otherwise -> empty) >-<- _nontsIppA- {-# LINE 1109 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 305, column 25)- _ppAI =- ({-# LINE 305 "src-ag/AG2AspectAG.ag" #-}- let atts = filterNotAtts _newAtts _o_noGroup- in (foldr (\a as -> attName a : as) [] atts) ++- (foldr (\a as -> attTName a : as) [] atts) ++- (case _lhsIext of- Nothing -> []- otherwise -> [ attName "inh", attName "syn", attTName "inh", attTName "syn" ]) ++- _nontsIppAI- {-# LINE 1121 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 385, column 25)- _ppNtL =- ({-# LINE 385 "src-ag/AG2AspectAG.ag" #-}- _nontsIppNtL- {-# LINE 1127 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 386, column 25)- _ppR =- ({-# LINE 386 "src-ag/AG2AspectAG.ag" #-}- ntsList "group" _ppNtL >-<- vlist (map (\att -> ntsList att (filterNts att _ppNtL )) (filterAtts _newAtts _o_noGroup )) >-<- _nontsIppR- {-# LINE 1135 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 15, column 13)- _nontsOinhMap =- ({-# LINE 15 "src-ag/DistChildAttr.ag" #-}- _nontsIinhMap'- {-# LINE 1141 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 16, column 13)- _nontsOsynMap =- ({-# LINE 16 "src-ag/DistChildAttr.ag" #-}- _nontsIsynMap'- {-# LINE 1147 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _nontsOext =- ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}- _lhsIext- {-# LINE 1153 "src-ag/AG2AspectAG.hs" #-}- )- ( _nontsIextendedNTs,_nontsIinhMap',_nontsIppA,_nontsIppAI,_nontsIppCata,_nontsIppD,_nontsIppDI,_nontsIppL,_nontsIppLI,_nontsIppNtL,_nontsIppR,_nontsIppSF,_nontsIppW,_nontsIsynMap') =- nonts_ _nontsOderivs _nontsOext _nontsOinhMap _nontsOnewAtts _nontsOnewNTs _nontsOnewProds _nontsOo_noGroup _nontsOo_rename _nontsOsynMap _nontsOtSyns - in ( _lhsOimp,_lhsOpp))) )--- HsToken ------------------------------------------------------{-- alternatives:- alternative AGField:- child field : {Identifier}- child attr : {Identifier}- child pos : {Pos}- child rdesc : {Maybe String}- alternative AGLocal:- child var : {Identifier}- child pos : {Pos}- child rdesc : {Maybe String}- alternative CharToken:- child value : {String}- child pos : {Pos}- alternative Err:- child mesg : {String}- child pos : {Pos}- alternative HsToken:- child value : {String}- child pos : {Pos}- alternative StrToken:- child value : {String}- child pos : {Pos}--}--- 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 (( ))-data Inh_HsToken = Inh_HsToken {}-data Syn_HsToken = Syn_HsToken {}-wrap_HsToken :: T_HsToken ->- Inh_HsToken ->- Syn_HsToken -wrap_HsToken (T_HsToken sem ) (Inh_HsToken ) =- (let ( ) = sem - in (Syn_HsToken ))-sem_HsToken_AGField :: Identifier ->- Identifier ->- Pos ->- (Maybe String) ->- T_HsToken -sem_HsToken_AGField field_ attr_ pos_ rdesc_ =- (T_HsToken (let - in ( )) )-sem_HsToken_AGLocal :: Identifier ->- Pos ->- (Maybe String) ->- T_HsToken -sem_HsToken_AGLocal var_ pos_ rdesc_ =- (T_HsToken (let - in ( )) )-sem_HsToken_CharToken :: String ->- Pos ->- T_HsToken -sem_HsToken_CharToken value_ pos_ =- (T_HsToken (let - in ( )) )-sem_HsToken_Err :: String ->- Pos ->- T_HsToken -sem_HsToken_Err mesg_ pos_ =- (T_HsToken (let - in ( )) )-sem_HsToken_HsToken :: String ->- Pos ->- T_HsToken -sem_HsToken_HsToken value_ pos_ =- (T_HsToken (let - in ( )) )-sem_HsToken_StrToken :: String ->- Pos ->- T_HsToken -sem_HsToken_StrToken value_ pos_ =- (T_HsToken (let - in ( )) )--- HsTokens -----------------------------------------------------{-- alternatives:- alternative Cons:- child hd : HsToken - child tl : HsTokens - alternative Nil:--}--- 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 (( ))-data Inh_HsTokens = Inh_HsTokens {}-data Syn_HsTokens = Syn_HsTokens {}-wrap_HsTokens :: T_HsTokens ->- Inh_HsTokens ->- Syn_HsTokens -wrap_HsTokens (T_HsTokens sem ) (Inh_HsTokens ) =- (let ( ) = sem - in (Syn_HsTokens ))-sem_HsTokens_Cons :: T_HsToken ->- T_HsTokens ->- T_HsTokens -sem_HsTokens_Cons (T_HsToken hd_ ) (T_HsTokens tl_ ) =- (T_HsTokens (let - in ( )) )-sem_HsTokens_Nil :: T_HsTokens -sem_HsTokens_Nil =- (T_HsTokens (let - in ( )) )--- HsTokensRoot -------------------------------------------------{-- 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 (( ))-data Inh_HsTokensRoot = Inh_HsTokensRoot {}-data Syn_HsTokensRoot = Syn_HsTokensRoot {}-wrap_HsTokensRoot :: T_HsTokensRoot ->- Inh_HsTokensRoot ->- Syn_HsTokensRoot -wrap_HsTokensRoot (T_HsTokensRoot sem ) (Inh_HsTokensRoot ) =- (let ( ) = sem - in (Syn_HsTokensRoot ))-sem_HsTokensRoot_HsTokensRoot :: T_HsTokens ->- T_HsTokensRoot -sem_HsTokensRoot_HsTokensRoot (T_HsTokens tokens_ ) =- (T_HsTokensRoot (let - in ( )) )--- Nonterminal --------------------------------------------------{-- visit 0:- inherited attributes:- derivs : Derivings- ext : Maybe String- inhMap : Map Identifier Attributes- newAtts : Attributes - newNTs : Set NontermIdent- newProds : DataTypes - o_noGroup : [String]- o_rename : Bool- synMap : Map Identifier Attributes- tSyns : TypeSyns- synthesized attributes:- extendedNTs : Set NontermIdent- inhMap' : Map Identifier Attributes- ppA : PP_Doc- ppAI : [PP_Doc]- ppCata : PP_Doc- ppD : PP_Doc- ppDI : [PP_Doc]- ppL : PP_Doc- ppLI : [PP_Doc]- ppNtL : [(PP_Doc, Attributes)]- ppR : PP_Doc- ppSF : PP_Doc- ppW : PP_Doc- synMap' : Map Identifier Attributes- alternatives:- alternative Nonterminal:- child nt : {NontermIdent}- child params : {[Identifier]}- child inh : {Attributes}- child syn : {Attributes}- child prods : Productions - visit 0:- local inhNoGroup : _- local synNoGroup : _- local ppNt : _- local ntLabel : _--}--- 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 (Derivings ->- (Maybe String) ->- (Map Identifier Attributes) ->- ( Attributes ) ->- (Set NontermIdent) ->- ( DataTypes ) ->- ([String]) ->- Bool ->- (Map Identifier Attributes) ->- TypeSyns ->- ( (Set NontermIdent),(Map Identifier Attributes),PP_Doc,([PP_Doc]),PP_Doc,PP_Doc,([PP_Doc]),PP_Doc,([PP_Doc]),([(PP_Doc, Attributes)]),PP_Doc,PP_Doc,PP_Doc,(Map Identifier Attributes)))-data Inh_Nonterminal = Inh_Nonterminal {derivs_Inh_Nonterminal :: Derivings,ext_Inh_Nonterminal :: (Maybe String),inhMap_Inh_Nonterminal :: (Map Identifier Attributes),newAtts_Inh_Nonterminal :: ( Attributes ),newNTs_Inh_Nonterminal :: (Set NontermIdent),newProds_Inh_Nonterminal :: ( DataTypes ),o_noGroup_Inh_Nonterminal :: ([String]),o_rename_Inh_Nonterminal :: Bool,synMap_Inh_Nonterminal :: (Map Identifier Attributes),tSyns_Inh_Nonterminal :: TypeSyns}-data Syn_Nonterminal = Syn_Nonterminal {extendedNTs_Syn_Nonterminal :: (Set NontermIdent),inhMap'_Syn_Nonterminal :: (Map Identifier Attributes),ppA_Syn_Nonterminal :: PP_Doc,ppAI_Syn_Nonterminal :: ([PP_Doc]),ppCata_Syn_Nonterminal :: PP_Doc,ppD_Syn_Nonterminal :: PP_Doc,ppDI_Syn_Nonterminal :: ([PP_Doc]),ppL_Syn_Nonterminal :: PP_Doc,ppLI_Syn_Nonterminal :: ([PP_Doc]),ppNtL_Syn_Nonterminal :: ([(PP_Doc, Attributes)]),ppR_Syn_Nonterminal :: PP_Doc,ppSF_Syn_Nonterminal :: PP_Doc,ppW_Syn_Nonterminal :: PP_Doc,synMap'_Syn_Nonterminal :: (Map Identifier Attributes)}-wrap_Nonterminal :: T_Nonterminal ->- Inh_Nonterminal ->- Syn_Nonterminal -wrap_Nonterminal (T_Nonterminal sem ) (Inh_Nonterminal _lhsIderivs _lhsIext _lhsIinhMap _lhsInewAtts _lhsInewNTs _lhsInewProds _lhsIo_noGroup _lhsIo_rename _lhsIsynMap _lhsItSyns ) =- (let ( _lhsOextendedNTs,_lhsOinhMap',_lhsOppA,_lhsOppAI,_lhsOppCata,_lhsOppD,_lhsOppDI,_lhsOppL,_lhsOppLI,_lhsOppNtL,_lhsOppR,_lhsOppSF,_lhsOppW,_lhsOsynMap') = sem _lhsIderivs _lhsIext _lhsIinhMap _lhsInewAtts _lhsInewNTs _lhsInewProds _lhsIo_noGroup _lhsIo_rename _lhsIsynMap _lhsItSyns - in (Syn_Nonterminal _lhsOextendedNTs _lhsOinhMap' _lhsOppA _lhsOppAI _lhsOppCata _lhsOppD _lhsOppDI _lhsOppL _lhsOppLI _lhsOppNtL _lhsOppR _lhsOppSF _lhsOppW _lhsOsynMap' ))-sem_Nonterminal_Nonterminal :: NontermIdent ->- ([Identifier]) ->- Attributes ->- Attributes ->- T_Productions ->- T_Nonterminal -sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ (T_Productions prods_ ) =- (T_Nonterminal (\ _lhsIderivs- _lhsIext- _lhsIinhMap- _lhsInewAtts- _lhsInewNTs- _lhsInewProds- _lhsIo_noGroup- _lhsIo_rename- _lhsIsynMap- _lhsItSyns ->- (let _prodsOinhNoGroup :: ([String])- _prodsOsynNoGroup :: ([String])- _prodsOnewProds :: ( Map.Map ConstructorIdent FieldMap )- _lhsOextendedNTs :: (Set NontermIdent)- _prodsOppNt :: PP_Doc- _lhsOppD :: PP_Doc- _lhsOppDI :: ([PP_Doc])- _lhsOppL :: PP_Doc- _lhsOppLI :: ([PP_Doc])- _lhsOppA :: PP_Doc- _lhsOppAI :: ([PP_Doc])- _lhsOppNtL :: ([(PP_Doc, Attributes)])- _prodsOnewNT :: Bool- _lhsOppR :: PP_Doc- _lhsOppCata :: PP_Doc- _prodsOsyn :: ( Attributes )- _prodsOinh :: ( Attributes )- _lhsOppSF :: PP_Doc- _lhsOppW :: PP_Doc- _lhsOinhMap' :: (Map Identifier Attributes)- _lhsOsynMap' :: (Map Identifier Attributes)- _prodsOext :: (Maybe String)- _prodsOinhMap :: (Map Identifier Attributes)- _prodsOnewAtts :: ( Attributes )- _prodsOo_noGroup :: ([String])- _prodsOo_rename :: Bool- _prodsOsynMap :: (Map Identifier Attributes)- _prodsIhasMoreProds :: ( Bool )- _prodsIppA :: PP_Doc- _prodsIppCata :: PP_Doc- _prodsIppL :: PP_Doc- _prodsIppLI :: ([PP_Doc])- _prodsIppR :: PP_Doc- _prodsIppRA :: ([PP_Doc])- _prodsIppSF :: PP_Doc- _prodsIppSPF :: PP_Doc- _prodsIprdInh :: Attributes- -- "src-ag/AG2AspectAG.ag"(line 50, column 18)- _inhNoGroup =- ({-# LINE 50 "src-ag/AG2AspectAG.ag" #-}- Map.filterWithKey (\att _ -> elem (getName att) _lhsIo_noGroup) _prodsIprdInh- {-# LINE 1431 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 51, column 18)- _synNoGroup =- ({-# LINE 51 "src-ag/AG2AspectAG.ag" #-}- Map.filterWithKey (\att _ -> elem (getName att) _lhsIo_noGroup) syn_- {-# LINE 1437 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 56, column 18)- _prodsOinhNoGroup =- ({-# LINE 56 "src-ag/AG2AspectAG.ag" #-}- map show $ Map.keys _inhNoGroup- {-# LINE 1443 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 57, column 18)- _prodsOsynNoGroup =- ({-# LINE 57 "src-ag/AG2AspectAG.ag" #-}- map show $ Map.keys _synNoGroup- {-# LINE 1449 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 93, column 17)- _prodsOnewProds =- ({-# LINE 93 "src-ag/AG2AspectAG.ag" #-}- case Map.lookup nt_ _lhsInewProds of- Just prds -> prds- Nothing -> Map.empty- {-# LINE 1457 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 106, column 31)- _lhsOextendedNTs =- ({-# LINE 106 "src-ag/AG2AspectAG.ag" #-}- if _prodsIhasMoreProds- then Set.singleton nt_- else Set.empty- {-# LINE 1465 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 172, column 25)- _ppNt =- ({-# LINE 172 "src-ag/AG2AspectAG.ag" #-}- pp nt_- {-# LINE 1471 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 189, column 25)- _prodsOppNt =- ({-# LINE 189 "src-ag/AG2AspectAG.ag" #-}- _ppNt- {-# LINE 1477 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 207, column 25)- _lhsOppD =- ({-# LINE 207 "src-ag/AG2AspectAG.ag" #-}- if (Set.member nt_ _lhsInewNTs)- then case (lookup nt_ _lhsItSyns) of- Nothing -> "data " >|< _ppNt- Just tp -> "type " >|< _ppNt >|< " = " >|< ppShow tp- else empty- {-# LINE 1487 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 220, column 25)- _lhsOppDI =- ({-# LINE 220 "src-ag/AG2AspectAG.ag" #-}- if (not $ Set.member nt_ _lhsInewNTs)- then [ _ppNt ]- else [ ]- {-# LINE 1495 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 260, column 25)- _ntLabel =- ({-# LINE 260 "src-ag/AG2AspectAG.ag" #-}- "nt_" >|< _ppNt- {-# LINE 1501 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 262, column 25)- _lhsOppL =- ({-# LINE 262 "src-ag/AG2AspectAG.ag" #-}- ( if (Set.member nt_ _lhsInewNTs)- then _ntLabel >|< " = proxy :: Proxy " >|< _ppNt- else empty) >-<- _prodsIppL- {-# LINE 1510 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 267, column 25)- _lhsOppLI =- ({-# LINE 267 "src-ag/AG2AspectAG.ag" #-}- ( if (not $ Set.member nt_ _lhsInewNTs)- then [ _ntLabel ]- else [ ]) ++- _prodsIppLI- {-# LINE 1519 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 318, column 25)- _lhsOppA =- ({-# LINE 318 "src-ag/AG2AspectAG.ag" #-}- ( if (Set.member nt_ _lhsInewNTs)- then defAttRec (pp "InhG") _ppNt inh_ _inhNoGroup >-<- defAttRec (pp "SynG") _ppNt syn_ _synNoGroup- else empty) >-<- _prodsIppA- {-# LINE 1529 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 331, column 25)- _lhsOppAI =- ({-# LINE 331 "src-ag/AG2AspectAG.ag" #-}- if (not $ Set.member nt_ _lhsInewNTs)- then [ ppName [(pp "InhG"), _ppNt ] >#< pp "(..)", ppName [(pp "SynG"), _ppNt ] >#< pp "(..)" ]- else [ ]- {-# LINE 1537 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 399, column 25)- _lhsOppNtL =- ({-# LINE 399 "src-ag/AG2AspectAG.ag" #-}- [ ("nt_" >|< nt_, Map.union inh_ syn_) ]- {-# LINE 1543 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 408, column 25)- _prodsOnewNT =- ({-# LINE 408 "src-ag/AG2AspectAG.ag" #-}- Set.member nt_ _lhsInewNTs- {-# LINE 1549 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 418, column 25)- _lhsOppR =- ({-# LINE 418 "src-ag/AG2AspectAG.ag" #-}- pp "----" >|< pp nt_ >-< _prodsIppR- {-# LINE 1555 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 728, column 25)- _lhsOppCata =- ({-# LINE 728 "src-ag/AG2AspectAG.ag" #-}- "----" >|< _ppNt >-< _prodsIppCata- {-# LINE 1561 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 759, column 25)- _prodsOsyn =- ({-# LINE 759 "src-ag/AG2AspectAG.ag" #-}- syn_- {-# LINE 1567 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 760, column 25)- _prodsOinh =- ({-# LINE 760 "src-ag/AG2AspectAG.ag" #-}- inh_- {-# LINE 1573 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 771, column 25)- _lhsOppSF =- ({-# LINE 771 "src-ag/AG2AspectAG.ag" #-}- let inhAtts = attTypes _inhNoGroup- synAtts = attTypes _synNoGroup- in- "----" >|< _ppNt >-<- "type T_" >|< _ppNt >|< " = " >|<- "(Record " >|<- inhAtts >|<- "(HCons (LVPair (Proxy Att_inh) InhG_" >|< _ppNt >|< ") HNil))" >|<- replicate (length inhAtts) ")" >|< " -> " >|<- "(Record " >|<- synAtts >|<- "(HCons (LVPair (Proxy Att_syn) SynG_" >|< _ppNt >|< ") HNil))" >|<- replicate (length synAtts) ")" >-<- "instance SemType T_" >|< _ppNt >|< " " >|< _ppNt >-<- "-- sem_" >|< _ppNt >|< " :: " >|< _ppNt >|< " -> T_" >|< _ppNt >-<- _prodsIppSPF- {-# LINE 1594 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 839, column 25)- _lhsOppW =- ({-# LINE 839 "src-ag/AG2AspectAG.ag" #-}- ppName [pp "wrap", _ppNt ] >|< " sem " >|< attVars inh_ >|< " = " >-<- " sem " >|< attFields inh_ _inhNoGroup _ppNt- {-# LINE 1601 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 7, column 18)- _lhsOinhMap' =- ({-# LINE 7 "src-ag/DistChildAttr.ag" #-}- Map.singleton nt_ inh_- {-# LINE 1607 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 8, column 18)- _lhsOsynMap' =- ({-# LINE 8 "src-ag/DistChildAttr.ag" #-}- Map.singleton nt_ syn_- {-# LINE 1613 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _prodsOext =- ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}- _lhsIext- {-# LINE 1619 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _prodsOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 1625 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _prodsOnewAtts =- ({-# LINE 77 "src-ag/AG2AspectAG.ag" #-}- _lhsInewAtts- {-# LINE 1631 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _prodsOo_noGroup =- ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_noGroup- {-# LINE 1637 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _prodsOo_rename =- ({-# LINE 40 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_rename- {-# LINE 1643 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _prodsOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 1649 "src-ag/AG2AspectAG.hs" #-}- )- ( _prodsIhasMoreProds,_prodsIppA,_prodsIppCata,_prodsIppL,_prodsIppLI,_prodsIppR,_prodsIppRA,_prodsIppSF,_prodsIppSPF,_prodsIprdInh) =- prods_ _prodsOext _prodsOinh _prodsOinhMap _prodsOinhNoGroup _prodsOnewAtts _prodsOnewNT _prodsOnewProds _prodsOo_noGroup _prodsOo_rename _prodsOppNt _prodsOsyn _prodsOsynMap _prodsOsynNoGroup - in ( _lhsOextendedNTs,_lhsOinhMap',_lhsOppA,_lhsOppAI,_lhsOppCata,_lhsOppD,_lhsOppDI,_lhsOppL,_lhsOppLI,_lhsOppNtL,_lhsOppR,_lhsOppSF,_lhsOppW,_lhsOsynMap'))) )--- Nonterminals -------------------------------------------------{-- visit 0:- inherited attributes:- derivs : Derivings- ext : Maybe String- inhMap : Map Identifier Attributes- newAtts : Attributes - newNTs : Set NontermIdent- newProds : DataTypes - o_noGroup : [String]- o_rename : Bool- synMap : Map Identifier Attributes- tSyns : TypeSyns- synthesized attributes:- extendedNTs : Set NontermIdent- inhMap' : Map Identifier Attributes- ppA : PP_Doc- ppAI : [PP_Doc]- ppCata : PP_Doc- ppD : PP_Doc- ppDI : [PP_Doc]- ppL : PP_Doc- ppLI : [PP_Doc]- ppNtL : [(PP_Doc, Attributes)]- ppR : PP_Doc- ppSF : PP_Doc- ppW : PP_Doc- synMap' : Map Identifier Attributes- alternatives:- alternative Cons:- child hd : Nonterminal - child tl : Nonterminals - alternative Nil:--}--- cata-sem_Nonterminals :: Nonterminals ->- T_Nonterminals -sem_Nonterminals list =- (Prelude.foldr sem_Nonterminals_Cons sem_Nonterminals_Nil (Prelude.map sem_Nonterminal list) )--- semantic domain-newtype T_Nonterminals = T_Nonterminals (Derivings ->- (Maybe String) ->- (Map Identifier Attributes) ->- ( Attributes ) ->- (Set NontermIdent) ->- ( DataTypes ) ->- ([String]) ->- Bool ->- (Map Identifier Attributes) ->- TypeSyns ->- ( (Set NontermIdent),(Map Identifier Attributes),PP_Doc,([PP_Doc]),PP_Doc,PP_Doc,([PP_Doc]),PP_Doc,([PP_Doc]),([(PP_Doc, Attributes)]),PP_Doc,PP_Doc,PP_Doc,(Map Identifier Attributes)))-data Inh_Nonterminals = Inh_Nonterminals {derivs_Inh_Nonterminals :: Derivings,ext_Inh_Nonterminals :: (Maybe String),inhMap_Inh_Nonterminals :: (Map Identifier Attributes),newAtts_Inh_Nonterminals :: ( Attributes ),newNTs_Inh_Nonterminals :: (Set NontermIdent),newProds_Inh_Nonterminals :: ( DataTypes ),o_noGroup_Inh_Nonterminals :: ([String]),o_rename_Inh_Nonterminals :: Bool,synMap_Inh_Nonterminals :: (Map Identifier Attributes),tSyns_Inh_Nonterminals :: TypeSyns}-data Syn_Nonterminals = Syn_Nonterminals {extendedNTs_Syn_Nonterminals :: (Set NontermIdent),inhMap'_Syn_Nonterminals :: (Map Identifier Attributes),ppA_Syn_Nonterminals :: PP_Doc,ppAI_Syn_Nonterminals :: ([PP_Doc]),ppCata_Syn_Nonterminals :: PP_Doc,ppD_Syn_Nonterminals :: PP_Doc,ppDI_Syn_Nonterminals :: ([PP_Doc]),ppL_Syn_Nonterminals :: PP_Doc,ppLI_Syn_Nonterminals :: ([PP_Doc]),ppNtL_Syn_Nonterminals :: ([(PP_Doc, Attributes)]),ppR_Syn_Nonterminals :: PP_Doc,ppSF_Syn_Nonterminals :: PP_Doc,ppW_Syn_Nonterminals :: PP_Doc,synMap'_Syn_Nonterminals :: (Map Identifier Attributes)}-wrap_Nonterminals :: T_Nonterminals ->- Inh_Nonterminals ->- Syn_Nonterminals -wrap_Nonterminals (T_Nonterminals sem ) (Inh_Nonterminals _lhsIderivs _lhsIext _lhsIinhMap _lhsInewAtts _lhsInewNTs _lhsInewProds _lhsIo_noGroup _lhsIo_rename _lhsIsynMap _lhsItSyns ) =- (let ( _lhsOextendedNTs,_lhsOinhMap',_lhsOppA,_lhsOppAI,_lhsOppCata,_lhsOppD,_lhsOppDI,_lhsOppL,_lhsOppLI,_lhsOppNtL,_lhsOppR,_lhsOppSF,_lhsOppW,_lhsOsynMap') = sem _lhsIderivs _lhsIext _lhsIinhMap _lhsInewAtts _lhsInewNTs _lhsInewProds _lhsIo_noGroup _lhsIo_rename _lhsIsynMap _lhsItSyns - in (Syn_Nonterminals _lhsOextendedNTs _lhsOinhMap' _lhsOppA _lhsOppAI _lhsOppCata _lhsOppD _lhsOppDI _lhsOppL _lhsOppLI _lhsOppNtL _lhsOppR _lhsOppSF _lhsOppW _lhsOsynMap' ))-sem_Nonterminals_Cons :: T_Nonterminal ->- T_Nonterminals ->- T_Nonterminals -sem_Nonterminals_Cons (T_Nonterminal hd_ ) (T_Nonterminals tl_ ) =- (T_Nonterminals (\ _lhsIderivs- _lhsIext- _lhsIinhMap- _lhsInewAtts- _lhsInewNTs- _lhsInewProds- _lhsIo_noGroup- _lhsIo_rename- _lhsIsynMap- _lhsItSyns ->- (let _lhsOextendedNTs :: (Set NontermIdent)- _lhsOinhMap' :: (Map Identifier Attributes)- _lhsOppA :: PP_Doc- _lhsOppAI :: ([PP_Doc])- _lhsOppCata :: PP_Doc- _lhsOppD :: PP_Doc- _lhsOppDI :: ([PP_Doc])- _lhsOppL :: PP_Doc- _lhsOppLI :: ([PP_Doc])- _lhsOppNtL :: ([(PP_Doc, Attributes)])- _lhsOppR :: PP_Doc- _lhsOppSF :: PP_Doc- _lhsOppW :: PP_Doc- _lhsOsynMap' :: (Map Identifier Attributes)- _hdOderivs :: Derivings- _hdOext :: (Maybe String)- _hdOinhMap :: (Map Identifier Attributes)- _hdOnewAtts :: ( Attributes )- _hdOnewNTs :: (Set NontermIdent)- _hdOnewProds :: ( DataTypes )- _hdOo_noGroup :: ([String])- _hdOo_rename :: Bool- _hdOsynMap :: (Map Identifier Attributes)- _hdOtSyns :: TypeSyns- _tlOderivs :: Derivings- _tlOext :: (Maybe String)- _tlOinhMap :: (Map Identifier Attributes)- _tlOnewAtts :: ( Attributes )- _tlOnewNTs :: (Set NontermIdent)- _tlOnewProds :: ( DataTypes )- _tlOo_noGroup :: ([String])- _tlOo_rename :: Bool- _tlOsynMap :: (Map Identifier Attributes)- _tlOtSyns :: TypeSyns- _hdIextendedNTs :: (Set NontermIdent)- _hdIinhMap' :: (Map Identifier Attributes)- _hdIppA :: PP_Doc- _hdIppAI :: ([PP_Doc])- _hdIppCata :: PP_Doc- _hdIppD :: PP_Doc- _hdIppDI :: ([PP_Doc])- _hdIppL :: PP_Doc- _hdIppLI :: ([PP_Doc])- _hdIppNtL :: ([(PP_Doc, Attributes)])- _hdIppR :: PP_Doc- _hdIppSF :: PP_Doc- _hdIppW :: PP_Doc- _hdIsynMap' :: (Map Identifier Attributes)- _tlIextendedNTs :: (Set NontermIdent)- _tlIinhMap' :: (Map Identifier Attributes)- _tlIppA :: PP_Doc- _tlIppAI :: ([PP_Doc])- _tlIppCata :: PP_Doc- _tlIppD :: PP_Doc- _tlIppDI :: ([PP_Doc])- _tlIppL :: PP_Doc- _tlIppLI :: ([PP_Doc])- _tlIppNtL :: ([(PP_Doc, Attributes)])- _tlIppR :: PP_Doc- _tlIppSF :: PP_Doc- _tlIppW :: PP_Doc- _tlIsynMap' :: (Map Identifier Attributes)- -- use rule "src-ag/AG2AspectAG.ag"(line 104, column 52)- _lhsOextendedNTs =- ({-# LINE 104 "src-ag/AG2AspectAG.ag" #-}- _hdIextendedNTs `Set.union` _tlIextendedNTs- {-# LINE 1794 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)- _lhsOinhMap' =- ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- _hdIinhMap' `Map.union` _tlIinhMap'- {-# LINE 1800 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 315, column 64)- _lhsOppA =- ({-# LINE 315 "src-ag/AG2AspectAG.ag" #-}- _hdIppA >-< _tlIppA- {-# LINE 1806 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 328, column 42)- _lhsOppAI =- ({-# LINE 328 "src-ag/AG2AspectAG.ag" #-}- _hdIppAI ++ _tlIppAI- {-# LINE 1812 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 725, column 67)- _lhsOppCata =- ({-# LINE 725 "src-ag/AG2AspectAG.ag" #-}- _hdIppCata >-< _tlIppCata- {-# LINE 1818 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 204, column 41)- _lhsOppD =- ({-# LINE 204 "src-ag/AG2AspectAG.ag" #-}- _hdIppD >-< _tlIppD- {-# LINE 1824 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 204, column 75)- _lhsOppDI =- ({-# LINE 204 "src-ag/AG2AspectAG.ag" #-}- _hdIppDI ++ _tlIppDI- {-# LINE 1830 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 257, column 79)- _lhsOppL =- ({-# LINE 257 "src-ag/AG2AspectAG.ag" #-}- _hdIppL >-< _tlIppL- {-# LINE 1836 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 257, column 112)- _lhsOppLI =- ({-# LINE 257 "src-ag/AG2AspectAG.ag" #-}- _hdIppLI ++ _tlIppLI- {-# LINE 1842 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 396, column 44)- _lhsOppNtL =- ({-# LINE 396 "src-ag/AG2AspectAG.ag" #-}- _hdIppNtL ++ _tlIppNtL- {-# LINE 1848 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 411, column 79)- _lhsOppR =- ({-# LINE 411 "src-ag/AG2AspectAG.ag" #-}- _hdIppR >-< _tlIppR- {-# LINE 1854 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 766, column 66)- _lhsOppSF =- ({-# LINE 766 "src-ag/AG2AspectAG.ag" #-}- _hdIppSF >-< _tlIppSF- {-# LINE 1860 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 836, column 42)- _lhsOppW =- ({-# LINE 836 "src-ag/AG2AspectAG.ag" #-}- _hdIppW >-< _tlIppW- {-# LINE 1866 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)- _lhsOsynMap' =- ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- _hdIsynMap' `Map.union` _tlIsynMap'- {-# LINE 1872 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOderivs =- ({-# LINE 198 "src-ag/AG2AspectAG.ag" #-}- _lhsIderivs- {-# LINE 1878 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOext =- ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}- _lhsIext- {-# LINE 1884 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 1890 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOnewAtts =- ({-# LINE 77 "src-ag/AG2AspectAG.ag" #-}- _lhsInewAtts- {-# LINE 1896 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOnewNTs =- ({-# LINE 98 "src-ag/AG2AspectAG.ag" #-}- _lhsInewNTs- {-# LINE 1902 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOnewProds =- ({-# LINE 84 "src-ag/AG2AspectAG.ag" #-}- _lhsInewProds- {-# LINE 1908 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOo_noGroup =- ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_noGroup- {-# LINE 1914 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOo_rename =- ({-# LINE 40 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_rename- {-# LINE 1920 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 1926 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOtSyns =- ({-# LINE 246 "src-ag/AG2AspectAG.ag" #-}- _lhsItSyns- {-# LINE 1932 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOderivs =- ({-# LINE 198 "src-ag/AG2AspectAG.ag" #-}- _lhsIderivs- {-# LINE 1938 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOext =- ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}- _lhsIext- {-# LINE 1944 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 1950 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOnewAtts =- ({-# LINE 77 "src-ag/AG2AspectAG.ag" #-}- _lhsInewAtts- {-# LINE 1956 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOnewNTs =- ({-# LINE 98 "src-ag/AG2AspectAG.ag" #-}- _lhsInewNTs- {-# LINE 1962 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOnewProds =- ({-# LINE 84 "src-ag/AG2AspectAG.ag" #-}- _lhsInewProds- {-# LINE 1968 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOo_noGroup =- ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_noGroup- {-# LINE 1974 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOo_rename =- ({-# LINE 40 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_rename- {-# LINE 1980 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 1986 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOtSyns =- ({-# LINE 246 "src-ag/AG2AspectAG.ag" #-}- _lhsItSyns- {-# LINE 1992 "src-ag/AG2AspectAG.hs" #-}- )- ( _hdIextendedNTs,_hdIinhMap',_hdIppA,_hdIppAI,_hdIppCata,_hdIppD,_hdIppDI,_hdIppL,_hdIppLI,_hdIppNtL,_hdIppR,_hdIppSF,_hdIppW,_hdIsynMap') =- hd_ _hdOderivs _hdOext _hdOinhMap _hdOnewAtts _hdOnewNTs _hdOnewProds _hdOo_noGroup _hdOo_rename _hdOsynMap _hdOtSyns - ( _tlIextendedNTs,_tlIinhMap',_tlIppA,_tlIppAI,_tlIppCata,_tlIppD,_tlIppDI,_tlIppL,_tlIppLI,_tlIppNtL,_tlIppR,_tlIppSF,_tlIppW,_tlIsynMap') =- tl_ _tlOderivs _tlOext _tlOinhMap _tlOnewAtts _tlOnewNTs _tlOnewProds _tlOo_noGroup _tlOo_rename _tlOsynMap _tlOtSyns - in ( _lhsOextendedNTs,_lhsOinhMap',_lhsOppA,_lhsOppAI,_lhsOppCata,_lhsOppD,_lhsOppDI,_lhsOppL,_lhsOppLI,_lhsOppNtL,_lhsOppR,_lhsOppSF,_lhsOppW,_lhsOsynMap'))) )-sem_Nonterminals_Nil :: T_Nonterminals -sem_Nonterminals_Nil =- (T_Nonterminals (\ _lhsIderivs- _lhsIext- _lhsIinhMap- _lhsInewAtts- _lhsInewNTs- _lhsInewProds- _lhsIo_noGroup- _lhsIo_rename- _lhsIsynMap- _lhsItSyns ->- (let _lhsOextendedNTs :: (Set NontermIdent)- _lhsOinhMap' :: (Map Identifier Attributes)- _lhsOppA :: PP_Doc- _lhsOppAI :: ([PP_Doc])- _lhsOppCata :: PP_Doc- _lhsOppD :: PP_Doc- _lhsOppDI :: ([PP_Doc])- _lhsOppL :: PP_Doc- _lhsOppLI :: ([PP_Doc])- _lhsOppNtL :: ([(PP_Doc, Attributes)])- _lhsOppR :: PP_Doc- _lhsOppSF :: PP_Doc- _lhsOppW :: PP_Doc- _lhsOsynMap' :: (Map Identifier Attributes)- -- use rule "src-ag/AG2AspectAG.ag"(line 104, column 52)- _lhsOextendedNTs =- ({-# LINE 104 "src-ag/AG2AspectAG.ag" #-}- Set.empty- {-# LINE 2029 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)- _lhsOinhMap' =- ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- Map.empty- {-# LINE 2035 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 315, column 64)- _lhsOppA =- ({-# LINE 315 "src-ag/AG2AspectAG.ag" #-}- empty- {-# LINE 2041 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 328, column 42)- _lhsOppAI =- ({-# LINE 328 "src-ag/AG2AspectAG.ag" #-}- []- {-# LINE 2047 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 725, column 67)- _lhsOppCata =- ({-# LINE 725 "src-ag/AG2AspectAG.ag" #-}- empty- {-# LINE 2053 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 204, column 41)- _lhsOppD =- ({-# LINE 204 "src-ag/AG2AspectAG.ag" #-}- empty- {-# LINE 2059 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 204, column 75)- _lhsOppDI =- ({-# LINE 204 "src-ag/AG2AspectAG.ag" #-}- []- {-# LINE 2065 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 257, column 79)- _lhsOppL =- ({-# LINE 257 "src-ag/AG2AspectAG.ag" #-}- empty- {-# LINE 2071 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 257, column 112)- _lhsOppLI =- ({-# LINE 257 "src-ag/AG2AspectAG.ag" #-}- []- {-# LINE 2077 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 396, column 44)- _lhsOppNtL =- ({-# LINE 396 "src-ag/AG2AspectAG.ag" #-}- []- {-# LINE 2083 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 411, column 79)- _lhsOppR =- ({-# LINE 411 "src-ag/AG2AspectAG.ag" #-}- empty- {-# LINE 2089 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 766, column 66)- _lhsOppSF =- ({-# LINE 766 "src-ag/AG2AspectAG.ag" #-}- empty- {-# LINE 2095 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 836, column 42)- _lhsOppW =- ({-# LINE 836 "src-ag/AG2AspectAG.ag" #-}- empty- {-# LINE 2101 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)- _lhsOsynMap' =- ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- Map.empty- {-# LINE 2107 "src-ag/AG2AspectAG.hs" #-}- )- in ( _lhsOextendedNTs,_lhsOinhMap',_lhsOppA,_lhsOppAI,_lhsOppCata,_lhsOppD,_lhsOppDI,_lhsOppL,_lhsOppLI,_lhsOppNtL,_lhsOppR,_lhsOppSF,_lhsOppW,_lhsOsynMap'))) )--- Pattern ------------------------------------------------------{-- visit 0:- synthesized attributes:- copy : SELF - info : (Identifier, Identifier)- alternatives:- alternative Alias:- child field : {Identifier}- child attr : {Identifier}- child pat : Pattern - 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 ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) )-sem_Pattern (Constr _name _pats ) =- (sem_Pattern_Constr _name (sem_Patterns _pats ) )-sem_Pattern (Irrefutable _pat ) =- (sem_Pattern_Irrefutable (sem_Pattern _pat ) )-sem_Pattern (Product _pos _pats ) =- (sem_Pattern_Product _pos (sem_Patterns _pats ) )-sem_Pattern (Underscore _pos ) =- (sem_Pattern_Underscore _pos )--- semantic domain-newtype T_Pattern = T_Pattern (( Pattern ,((Identifier, Identifier))))-data Inh_Pattern = Inh_Pattern {}-data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: Pattern ,info_Syn_Pattern :: ((Identifier, Identifier))}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern (T_Pattern sem ) (Inh_Pattern ) =- (let ( _lhsOcopy,_lhsOinfo) = sem - in (Syn_Pattern _lhsOcopy _lhsOinfo ))-sem_Pattern_Alias :: Identifier ->- Identifier ->- T_Pattern ->- T_Pattern -sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) =- (T_Pattern (let _lhsOinfo :: ((Identifier, Identifier))- _lhsOcopy :: Pattern - _patIcopy :: Pattern - _patIinfo :: ((Identifier, Identifier))- -- "src-ag/AG2AspectAG.ag"(line 375, column 25)- _lhsOinfo =- ({-# LINE 375 "src-ag/AG2AspectAG.ag" #-}- (field_, attr_)- {-# LINE 2178 "src-ag/AG2AspectAG.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Alias field_ attr_ _patIcopy- {-# LINE 2184 "src-ag/AG2AspectAG.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 2190 "src-ag/AG2AspectAG.hs" #-}- )- ( _patIcopy,_patIinfo) =- pat_ - in ( _lhsOcopy,_lhsOinfo)) )-sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr name_ (T_Patterns pats_ ) =- (T_Pattern (let _lhsOinfo :: ((Identifier, Identifier))- _lhsOcopy :: Pattern - _patsIcopy :: Patterns - -- "src-ag/AG2AspectAG.ag"(line 376, column 25)- _lhsOinfo =- ({-# LINE 376 "src-ag/AG2AspectAG.ag" #-}- error "Pattern Constr undefined!!"- {-# LINE 2206 "src-ag/AG2AspectAG.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 2212 "src-ag/AG2AspectAG.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 2218 "src-ag/AG2AspectAG.hs" #-}- )- ( _patsIcopy) =- pats_ - in ( _lhsOcopy,_lhsOinfo)) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable (T_Pattern pat_ ) =- (T_Pattern (let _lhsOcopy :: Pattern - _lhsOinfo :: ((Identifier, Identifier))- _patIcopy :: Pattern - _patIinfo :: ((Identifier, Identifier))- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 2234 "src-ag/AG2AspectAG.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 2240 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (up)- _lhsOinfo =- ({-# LINE 373 "src-ag/AG2AspectAG.ag" #-}- _patIinfo- {-# LINE 2246 "src-ag/AG2AspectAG.hs" #-}- )- ( _patIcopy,_patIinfo) =- pat_ - in ( _lhsOcopy,_lhsOinfo)) )-sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product pos_ (T_Patterns pats_ ) =- (T_Pattern (let _lhsOinfo :: ((Identifier, Identifier))- _lhsOcopy :: Pattern - _patsIcopy :: Patterns - -- "src-ag/AG2AspectAG.ag"(line 377, column 25)- _lhsOinfo =- ({-# LINE 377 "src-ag/AG2AspectAG.ag" #-}- error "Pattern Product undefined!!"- {-# LINE 2262 "src-ag/AG2AspectAG.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 2268 "src-ag/AG2AspectAG.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 2274 "src-ag/AG2AspectAG.hs" #-}- )- ( _patsIcopy) =- pats_ - in ( _lhsOcopy,_lhsOinfo)) )-sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore pos_ =- (T_Pattern (let _lhsOinfo :: ((Identifier, Identifier))- _lhsOcopy :: Pattern - -- "src-ag/AG2AspectAG.ag"(line 378, column 25)- _lhsOinfo =- ({-# LINE 378 "src-ag/AG2AspectAG.ag" #-}- error "Pattern Underscore undefined!!"- {-# LINE 2288 "src-ag/AG2AspectAG.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Underscore pos_- {-# LINE 2294 "src-ag/AG2AspectAG.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 2300 "src-ag/AG2AspectAG.hs" #-}- )- in ( _lhsOcopy,_lhsOinfo)) )--- Patterns -----------------------------------------------------{-- visit 0:- synthesized attribute:- copy : SELF - 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 ))-data Inh_Patterns = Inh_Patterns {}-data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: Patterns }-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns (T_Patterns sem ) (Inh_Patterns ) =- (let ( _lhsOcopy) = sem - in (Syn_Patterns _lhsOcopy ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) =- (T_Patterns (let _lhsOcopy :: Patterns - _hdIcopy :: Pattern - _hdIinfo :: ((Identifier, Identifier))- _tlIcopy :: Patterns - -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 2345 "src-ag/AG2AspectAG.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 2351 "src-ag/AG2AspectAG.hs" #-}- )- ( _hdIcopy,_hdIinfo) =- hd_ - ( _tlIcopy) =- tl_ - in ( _lhsOcopy)) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =- (T_Patterns (let _lhsOcopy :: Patterns - -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- []- {-# LINE 2365 "src-ag/AG2AspectAG.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 2371 "src-ag/AG2AspectAG.hs" #-}- )- in ( _lhsOcopy)) )--- Production ---------------------------------------------------{-- visit 0:- inherited attributes:- ext : Maybe String- inh : Attributes - inhMap : Map Identifier Attributes- inhNoGroup : [String]- newAtts : Attributes - newNT : Bool- newProds : Map.Map ConstructorIdent FieldMap - o_noGroup : [String]- o_rename : Bool- ppNt : PP_Doc- syn : Attributes - synMap : Map Identifier Attributes- synNoGroup : [String]- synthesized attributes:- hasMoreProds : Bool - ppA : PP_Doc- ppCata : PP_Doc- ppL : PP_Doc- ppLI : [PP_Doc]- ppR : PP_Doc- ppRA : [PP_Doc]- ppSF : PP_Doc- ppSPF : PP_Doc- prdInh : Attributes- alternatives:- alternative Production:- child con : {ConstructorIdent}- child params : {[Identifier]}- child constraints : {[Type]}- child children : Children - child rules : Rules - child typeSigs : TypeSigs - child macro : {MaybeMacro}- visit 0:- local ppProd : _- local prodName : _- local conName : _- local newProd : _- local _tup1 : _- local ppR : _- local ppRA : _--}--- cata-sem_Production :: Production ->- T_Production -sem_Production (Production _con _params _constraints _children _rules _typeSigs _macro ) =- (sem_Production_Production _con _params _constraints (sem_Children _children ) (sem_Rules _rules ) (sem_TypeSigs _typeSigs ) _macro )--- semantic domain-newtype T_Production = T_Production ((Maybe String) ->- ( Attributes ) ->- (Map Identifier Attributes) ->- ([String]) ->- ( Attributes ) ->- Bool ->- ( Map.Map ConstructorIdent FieldMap ) ->- ([String]) ->- Bool ->- PP_Doc ->- ( Attributes ) ->- (Map Identifier Attributes) ->- ([String]) ->- ( ( Bool ),PP_Doc,PP_Doc,PP_Doc,([PP_Doc]),PP_Doc,([PP_Doc]),PP_Doc,PP_Doc,Attributes))-data Inh_Production = Inh_Production {ext_Inh_Production :: (Maybe String),inh_Inh_Production :: ( Attributes ),inhMap_Inh_Production :: (Map Identifier Attributes),inhNoGroup_Inh_Production :: ([String]),newAtts_Inh_Production :: ( Attributes ),newNT_Inh_Production :: Bool,newProds_Inh_Production :: ( Map.Map ConstructorIdent FieldMap ),o_noGroup_Inh_Production :: ([String]),o_rename_Inh_Production :: Bool,ppNt_Inh_Production :: PP_Doc,syn_Inh_Production :: ( Attributes ),synMap_Inh_Production :: (Map Identifier Attributes),synNoGroup_Inh_Production :: ([String])}-data Syn_Production = Syn_Production {hasMoreProds_Syn_Production :: ( Bool ),ppA_Syn_Production :: PP_Doc,ppCata_Syn_Production :: PP_Doc,ppL_Syn_Production :: PP_Doc,ppLI_Syn_Production :: ([PP_Doc]),ppR_Syn_Production :: PP_Doc,ppRA_Syn_Production :: ([PP_Doc]),ppSF_Syn_Production :: PP_Doc,ppSPF_Syn_Production :: PP_Doc,prdInh_Syn_Production :: Attributes}-wrap_Production :: T_Production ->- Inh_Production ->- Syn_Production -wrap_Production (T_Production sem ) (Inh_Production _lhsIext _lhsIinh _lhsIinhMap _lhsIinhNoGroup _lhsInewAtts _lhsInewNT _lhsInewProds _lhsIo_noGroup _lhsIo_rename _lhsIppNt _lhsIsyn _lhsIsynMap _lhsIsynNoGroup ) =- (let ( _lhsOhasMoreProds,_lhsOppA,_lhsOppCata,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOppRA,_lhsOppSF,_lhsOppSPF,_lhsOprdInh) = sem _lhsIext _lhsIinh _lhsIinhMap _lhsIinhNoGroup _lhsInewAtts _lhsInewNT _lhsInewProds _lhsIo_noGroup _lhsIo_rename _lhsIppNt _lhsIsyn _lhsIsynMap _lhsIsynNoGroup - in (Syn_Production _lhsOhasMoreProds _lhsOppA _lhsOppCata _lhsOppL _lhsOppLI _lhsOppR _lhsOppRA _lhsOppSF _lhsOppSPF _lhsOprdInh ))-sem_Production_Production :: ConstructorIdent ->- ([Identifier]) ->- ([Type]) ->- T_Children ->- T_Rules ->- T_TypeSigs ->- MaybeMacro ->- T_Production -sem_Production_Production con_ params_ constraints_ (T_Children children_ ) (T_Rules rules_ ) (T_TypeSigs typeSigs_ ) macro_ =- (T_Production (\ _lhsIext- _lhsIinh- _lhsIinhMap- _lhsIinhNoGroup- _lhsInewAtts- _lhsInewNT- _lhsInewProds- _lhsIo_noGroup- _lhsIo_rename- _lhsIppNt- _lhsIsyn- _lhsIsynMap- _lhsIsynNoGroup ->- (let _lhsOhasMoreProds :: ( Bool )- _childrenOppProd :: PP_Doc- _rulesOppProd :: PP_Doc- _lhsOppL :: PP_Doc- _lhsOppLI :: ([PP_Doc])- _lhsOppA :: PP_Doc- _lhsOppCata :: PP_Doc- _lhsOppSF :: PP_Doc- _lhsOppSPF :: PP_Doc- _lhsOppR :: PP_Doc- _lhsOppRA :: ([PP_Doc])- _lhsOprdInh :: Attributes- _childrenOext :: (Maybe String)- _childrenOinhMap :: (Map Identifier Attributes)- _childrenOinhNoGroup :: ([String])- _childrenOo_noGroup :: ([String])- _childrenOo_rename :: Bool- _childrenOppNt :: PP_Doc- _childrenOsynMap :: (Map Identifier Attributes)- _childrenOsynNoGroup :: ([String])- _rulesOext :: (Maybe String)- _rulesOinhNoGroup :: ([String])- _rulesOnewProd :: Bool- _rulesOo_noGroup :: ([String])- _rulesOppNt :: PP_Doc- _rulesOsynNoGroup :: ([String])- _childrenIidCL :: ([(Identifier,Type)])- _childrenIppCSF :: ([(Identifier,(PP_Doc,PP_Doc))])- _childrenIppL :: PP_Doc- _childrenIppLI :: ([PP_Doc])- _childrenIppR :: PP_Doc- _childrenIprdInh :: Attributes- _rulesIlocals :: ([Identifier])- _rulesIppRL :: ([ PPRule ])- -- "src-ag/AG2AspectAG.ag"(line 102, column 29)- _lhsOhasMoreProds =- ({-# LINE 102 "src-ag/AG2AspectAG.ag" #-}- not $ Map.member con_ _lhsInewProds- {-# LINE 2508 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 175, column 25)- _ppProd =- ({-# LINE 175 "src-ag/AG2AspectAG.ag" #-}- pp con_- {-# LINE 2514 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 176, column 25)- _prodName =- ({-# LINE 176 "src-ag/AG2AspectAG.ag" #-}- ppName [_lhsIppNt, _ppProd ]- {-# LINE 2520 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 177, column 25)- _conName =- ({-# LINE 177 "src-ag/AG2AspectAG.ag" #-}- if _lhsIo_rename- then _prodName- else _ppProd- {-# LINE 2528 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 194, column 25)- _childrenOppProd =- ({-# LINE 194 "src-ag/AG2AspectAG.ag" #-}- _ppProd- {-# LINE 2534 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 195, column 25)- _rulesOppProd =- ({-# LINE 195 "src-ag/AG2AspectAG.ag" #-}- _ppProd- {-# LINE 2540 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 273, column 25)- _lhsOppL =- ({-# LINE 273 "src-ag/AG2AspectAG.ag" #-}- if (Map.member con_ _lhsInewProds)- then _childrenIppL- else empty- {-# LINE 2548 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 277, column 25)- _lhsOppLI =- ({-# LINE 277 "src-ag/AG2AspectAG.ag" #-}- if (not $ Map.member con_ _lhsInewProds)- then _childrenIppLI- else []- {-# LINE 2556 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 325, column 25)- _lhsOppA =- ({-# LINE 325 "src-ag/AG2AspectAG.ag" #-}- defLocalAtts _prodName (length _rulesIlocals) 1 $ sort _rulesIlocals- {-# LINE 2562 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 421, column 25)- _newProd =- ({-# LINE 421 "src-ag/AG2AspectAG.ag" #-}- Map.member con_ _lhsInewProds- {-# LINE 2568 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 422, column 41)- __tup1 =- ({-# LINE 422 "src-ag/AG2AspectAG.ag" #-}- let (instR, instRA) = defInstRules _lhsIppNt con_ _lhsInewNT _newProd- _childrenIppR _rulesIppRL _childrenIidCL _rulesIlocals- (locR, locRA) = defLocRule _lhsIppNt con_ _lhsInewNT _newProd- _childrenIppR _rulesIppRL _lhsIinhNoGroup _lhsIsynNoGroup _childrenIidCL _rulesIlocals- (inhGR, inhGRA) = defInhGRule _lhsIppNt _prodName _lhsInewNT _newProd- _childrenIppR _rulesIppRL _lhsIinhNoGroup _lhsIsynNoGroup _childrenIidCL _rulesIlocals- (synGR, synGRA) = defSynGRule _lhsIppNt con_ _lhsInewNT _newProd- _childrenIppR _rulesIppRL _lhsIinhNoGroup _lhsIsynNoGroup _childrenIidCL _rulesIlocals- (inhR, inhRA) = defInhRules _lhsIppNt _prodName _lhsInewNT _newProd _lhsInewAtts- _childrenIppR _rulesIppRL _lhsIinhNoGroup _lhsIsynNoGroup _childrenIidCL _rulesIlocals- (synR, synRA) = defSynRules _lhsIppNt con_ _lhsInewNT _newProd _lhsInewAtts- _childrenIppR _rulesIppRL _lhsIinhNoGroup _lhsIsynNoGroup _childrenIidCL _rulesIlocals- (inhMR, inhMRA) = modInhRules _lhsIppNt _prodName _lhsInewNT _newProd _lhsInewAtts- _childrenIppR _rulesIppRL _lhsIinhNoGroup _lhsIsynNoGroup _childrenIidCL _rulesIlocals- (synMR, synMRA) = modSynRules _lhsIppNt con_ _lhsInewNT _newProd _lhsInewAtts- _childrenIppR _rulesIppRL _lhsIinhNoGroup _lhsIsynNoGroup _childrenIidCL _rulesIlocals- in ( vlist [instR,locR,inhGR,synGR,inhR,synR,inhMR,synMR]- , instRA ++ locRA ++ inhGRA ++ synGRA ++ inhMRA ++ synMRA ++ inhRA ++ synRA)- {-# LINE 2591 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 422, column 41)- (_ppR,_) =- ({-# LINE 422 "src-ag/AG2AspectAG.ag" #-}- __tup1- {-# LINE 2597 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 422, column 41)- (_,_ppRA) =- ({-# LINE 422 "src-ag/AG2AspectAG.ag" #-}- __tup1- {-# LINE 2603 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 732, column 25)- _lhsOppCata =- ({-# LINE 732 "src-ag/AG2AspectAG.ag" #-}- let extend = maybe []- ( \ext -> if (_lhsInewNT || (not _lhsInewNT && _newProd ))- then []- else [ ext >|< ".atts_" >|< _prodName ])- _lhsIext- macro = case macro_ of- Nothing -> []- Just macro -> [ "agMacro " >|< ppMacro macro ]- atts = sortBy (\a b -> compare (show a) (show b)) _ppRA- in "atts_" >|< _prodName >|< " = " >|<- ppListSep "" "" " `ext` "- (atts ++ macro ++ extend ) >-<- "semP_" >|< _prodName >|< pp " = knit atts_" >|< _prodName- {-# LINE 2621 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 796, column 25)- _lhsOppSF =- ({-# LINE 796 "src-ag/AG2AspectAG.ag" #-}- let chi = _childrenIppCSF- ppPattern = case (show con_) of- "Cons" -> ppParams (ppListSep "" "" " : ")- "Nil" -> pp "[]"- otherwise -> _conName >|< " " >|< (ppParams ppSpaced)- ppParams f = f $ map (((>|<) (pp "_")) . fst) chi- in "sem_" >|< _lhsIppNt >|< " (" >|< ppPattern >|< ") = sem_" >|< _prodName >|<- " (" >|< map (fst . snd) chi >|< "emptyRecord)"- {-# LINE 2634 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 808, column 25)- _lhsOppSPF =- ({-# LINE 808 "src-ag/AG2AspectAG.ag" #-}- let chi = _childrenIppCSF- ppParams f = f $ map (((>|<) (pp "_")) . fst) chi- in "sem_" >|< _lhsIppNt >|< "_" >|< con_ >#< ppParams ppSpaced >|< " = semP_" >|< _prodName >|<- " (" >|< map (snd . snd) chi >|< "emptyRecord)"- {-# LINE 2643 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 411, column 79)- _lhsOppR =- ({-# LINE 411 "src-ag/AG2AspectAG.ag" #-}- _ppR- {-# LINE 2649 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 412, column 43)- _lhsOppRA =- ({-# LINE 412 "src-ag/AG2AspectAG.ag" #-}- _ppRA- {-# LINE 2655 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 64, column 57)- _lhsOprdInh =- ({-# LINE 64 "src-ag/AG2AspectAG.ag" #-}- _childrenIprdInh- {-# LINE 2661 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _childrenOext =- ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}- _lhsIext- {-# LINE 2667 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _childrenOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 2673 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _childrenOinhNoGroup =- ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}- _lhsIinhNoGroup- {-# LINE 2679 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _childrenOo_noGroup =- ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_noGroup- {-# LINE 2685 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _childrenOo_rename =- ({-# LINE 40 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_rename- {-# LINE 2691 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _childrenOppNt =- ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}- _lhsIppNt- {-# LINE 2697 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _childrenOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 2703 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _childrenOsynNoGroup =- ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}- _lhsIsynNoGroup- {-# LINE 2709 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _rulesOext =- ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}- _lhsIext- {-# LINE 2715 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _rulesOinhNoGroup =- ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}- _lhsIinhNoGroup- {-# LINE 2721 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (from local)- _rulesOnewProd =- ({-# LINE 405 "src-ag/AG2AspectAG.ag" #-}- _newProd- {-# LINE 2727 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _rulesOo_noGroup =- ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_noGroup- {-# LINE 2733 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _rulesOppNt =- ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}- _lhsIppNt- {-# LINE 2739 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _rulesOsynNoGroup =- ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}- _lhsIsynNoGroup- {-# LINE 2745 "src-ag/AG2AspectAG.hs" #-}- )- ( _childrenIidCL,_childrenIppCSF,_childrenIppL,_childrenIppLI,_childrenIppR,_childrenIprdInh) =- children_ _childrenOext _childrenOinhMap _childrenOinhNoGroup _childrenOo_noGroup _childrenOo_rename _childrenOppNt _childrenOppProd _childrenOsynMap _childrenOsynNoGroup - ( _rulesIlocals,_rulesIppRL) =- rules_ _rulesOext _rulesOinhNoGroup _rulesOnewProd _rulesOo_noGroup _rulesOppNt _rulesOppProd _rulesOsynNoGroup - in ( _lhsOhasMoreProds,_lhsOppA,_lhsOppCata,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOppRA,_lhsOppSF,_lhsOppSPF,_lhsOprdInh))) )--- Productions --------------------------------------------------{-- visit 0:- inherited attributes:- ext : Maybe String- inh : Attributes - inhMap : Map Identifier Attributes- inhNoGroup : [String]- newAtts : Attributes - newNT : Bool- newProds : Map.Map ConstructorIdent FieldMap - o_noGroup : [String]- o_rename : Bool- ppNt : PP_Doc- syn : Attributes - synMap : Map Identifier Attributes- synNoGroup : [String]- synthesized attributes:- hasMoreProds : Bool - ppA : PP_Doc- ppCata : PP_Doc- ppL : PP_Doc- ppLI : [PP_Doc]- ppR : PP_Doc- ppRA : [PP_Doc]- ppSF : PP_Doc- ppSPF : PP_Doc- prdInh : Attributes- alternatives:- alternative Cons:- child hd : Production - child tl : Productions - alternative Nil:--}--- cata-sem_Productions :: Productions ->- T_Productions -sem_Productions list =- (Prelude.foldr sem_Productions_Cons sem_Productions_Nil (Prelude.map sem_Production list) )--- semantic domain-newtype T_Productions = T_Productions ((Maybe String) ->- ( Attributes ) ->- (Map Identifier Attributes) ->- ([String]) ->- ( Attributes ) ->- Bool ->- ( Map.Map ConstructorIdent FieldMap ) ->- ([String]) ->- Bool ->- PP_Doc ->- ( Attributes ) ->- (Map Identifier Attributes) ->- ([String]) ->- ( ( Bool ),PP_Doc,PP_Doc,PP_Doc,([PP_Doc]),PP_Doc,([PP_Doc]),PP_Doc,PP_Doc,Attributes))-data Inh_Productions = Inh_Productions {ext_Inh_Productions :: (Maybe String),inh_Inh_Productions :: ( Attributes ),inhMap_Inh_Productions :: (Map Identifier Attributes),inhNoGroup_Inh_Productions :: ([String]),newAtts_Inh_Productions :: ( Attributes ),newNT_Inh_Productions :: Bool,newProds_Inh_Productions :: ( Map.Map ConstructorIdent FieldMap ),o_noGroup_Inh_Productions :: ([String]),o_rename_Inh_Productions :: Bool,ppNt_Inh_Productions :: PP_Doc,syn_Inh_Productions :: ( Attributes ),synMap_Inh_Productions :: (Map Identifier Attributes),synNoGroup_Inh_Productions :: ([String])}-data Syn_Productions = Syn_Productions {hasMoreProds_Syn_Productions :: ( Bool ),ppA_Syn_Productions :: PP_Doc,ppCata_Syn_Productions :: PP_Doc,ppL_Syn_Productions :: PP_Doc,ppLI_Syn_Productions :: ([PP_Doc]),ppR_Syn_Productions :: PP_Doc,ppRA_Syn_Productions :: ([PP_Doc]),ppSF_Syn_Productions :: PP_Doc,ppSPF_Syn_Productions :: PP_Doc,prdInh_Syn_Productions :: Attributes}-wrap_Productions :: T_Productions ->- Inh_Productions ->- Syn_Productions -wrap_Productions (T_Productions sem ) (Inh_Productions _lhsIext _lhsIinh _lhsIinhMap _lhsIinhNoGroup _lhsInewAtts _lhsInewNT _lhsInewProds _lhsIo_noGroup _lhsIo_rename _lhsIppNt _lhsIsyn _lhsIsynMap _lhsIsynNoGroup ) =- (let ( _lhsOhasMoreProds,_lhsOppA,_lhsOppCata,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOppRA,_lhsOppSF,_lhsOppSPF,_lhsOprdInh) = sem _lhsIext _lhsIinh _lhsIinhMap _lhsIinhNoGroup _lhsInewAtts _lhsInewNT _lhsInewProds _lhsIo_noGroup _lhsIo_rename _lhsIppNt _lhsIsyn _lhsIsynMap _lhsIsynNoGroup - in (Syn_Productions _lhsOhasMoreProds _lhsOppA _lhsOppCata _lhsOppL _lhsOppLI _lhsOppR _lhsOppRA _lhsOppSF _lhsOppSPF _lhsOprdInh ))-sem_Productions_Cons :: T_Production ->- T_Productions ->- T_Productions -sem_Productions_Cons (T_Production hd_ ) (T_Productions tl_ ) =- (T_Productions (\ _lhsIext- _lhsIinh- _lhsIinhMap- _lhsIinhNoGroup- _lhsInewAtts- _lhsInewNT- _lhsInewProds- _lhsIo_noGroup- _lhsIo_rename- _lhsIppNt- _lhsIsyn- _lhsIsynMap- _lhsIsynNoGroup ->- (let _hdOinhNoGroup :: ([String])- _lhsOhasMoreProds :: ( Bool )- _lhsOppA :: PP_Doc- _lhsOppCata :: PP_Doc- _lhsOppL :: PP_Doc- _lhsOppLI :: ([PP_Doc])- _lhsOppR :: PP_Doc- _lhsOppRA :: ([PP_Doc])- _lhsOppSF :: PP_Doc- _lhsOppSPF :: PP_Doc- _lhsOprdInh :: Attributes- _hdOext :: (Maybe String)- _hdOinh :: ( Attributes )- _hdOinhMap :: (Map Identifier Attributes)- _hdOnewAtts :: ( Attributes )- _hdOnewNT :: Bool- _hdOnewProds :: ( Map.Map ConstructorIdent FieldMap )- _hdOo_noGroup :: ([String])- _hdOo_rename :: Bool- _hdOppNt :: PP_Doc- _hdOsyn :: ( Attributes )- _hdOsynMap :: (Map Identifier Attributes)- _hdOsynNoGroup :: ([String])- _tlOext :: (Maybe String)- _tlOinh :: ( Attributes )- _tlOinhMap :: (Map Identifier Attributes)- _tlOinhNoGroup :: ([String])- _tlOnewAtts :: ( Attributes )- _tlOnewNT :: Bool- _tlOnewProds :: ( Map.Map ConstructorIdent FieldMap )- _tlOo_noGroup :: ([String])- _tlOo_rename :: Bool- _tlOppNt :: PP_Doc- _tlOsyn :: ( Attributes )- _tlOsynMap :: (Map Identifier Attributes)- _tlOsynNoGroup :: ([String])- _hdIhasMoreProds :: ( Bool )- _hdIppA :: PP_Doc- _hdIppCata :: PP_Doc- _hdIppL :: PP_Doc- _hdIppLI :: ([PP_Doc])- _hdIppR :: PP_Doc- _hdIppRA :: ([PP_Doc])- _hdIppSF :: PP_Doc- _hdIppSPF :: PP_Doc- _hdIprdInh :: Attributes- _tlIhasMoreProds :: ( Bool )- _tlIppA :: PP_Doc- _tlIppCata :: PP_Doc- _tlIppL :: PP_Doc- _tlIppLI :: ([PP_Doc])- _tlIppR :: PP_Doc- _tlIppRA :: ([PP_Doc])- _tlIppSF :: PP_Doc- _tlIppSPF :: PP_Doc- _tlIprdInh :: Attributes- -- "src-ag/AG2AspectAG.ag"(line 61, column 11)- _hdOinhNoGroup =- ({-# LINE 61 "src-ag/AG2AspectAG.ag" #-}- filter (flip Map.member _hdIprdInh . identifier) _lhsIinhNoGroup- {-# LINE 2891 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 100, column 51)- _lhsOhasMoreProds =- ({-# LINE 100 "src-ag/AG2AspectAG.ag" #-}- _hdIhasMoreProds || _tlIhasMoreProds- {-# LINE 2897 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 315, column 64)- _lhsOppA =- ({-# LINE 315 "src-ag/AG2AspectAG.ag" #-}- _hdIppA >-< _tlIppA- {-# LINE 2903 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 725, column 67)- _lhsOppCata =- ({-# LINE 725 "src-ag/AG2AspectAG.ag" #-}- _hdIppCata >-< _tlIppCata- {-# LINE 2909 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 257, column 79)- _lhsOppL =- ({-# LINE 257 "src-ag/AG2AspectAG.ag" #-}- _hdIppL >-< _tlIppL- {-# LINE 2915 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 257, column 112)- _lhsOppLI =- ({-# LINE 257 "src-ag/AG2AspectAG.ag" #-}- _hdIppLI ++ _tlIppLI- {-# LINE 2921 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 411, column 79)- _lhsOppR =- ({-# LINE 411 "src-ag/AG2AspectAG.ag" #-}- _hdIppR >-< _tlIppR- {-# LINE 2927 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 412, column 43)- _lhsOppRA =- ({-# LINE 412 "src-ag/AG2AspectAG.ag" #-}- _hdIppRA ++ _tlIppRA- {-# LINE 2933 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 766, column 66)- _lhsOppSF =- ({-# LINE 766 "src-ag/AG2AspectAG.ag" #-}- _hdIppSF >-< _tlIppSF- {-# LINE 2939 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 767, column 42)- _lhsOppSPF =- ({-# LINE 767 "src-ag/AG2AspectAG.ag" #-}- _hdIppSPF >-< _tlIppSPF- {-# LINE 2945 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 64, column 57)- _lhsOprdInh =- ({-# LINE 64 "src-ag/AG2AspectAG.ag" #-}- _hdIprdInh `Map.union` _tlIprdInh- {-# LINE 2951 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOext =- ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}- _lhsIext- {-# LINE 2957 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOinh =- ({-# LINE 756 "src-ag/AG2AspectAG.ag" #-}- _lhsIinh- {-# LINE 2963 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 2969 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOnewAtts =- ({-# LINE 77 "src-ag/AG2AspectAG.ag" #-}- _lhsInewAtts- {-# LINE 2975 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOnewNT =- ({-# LINE 404 "src-ag/AG2AspectAG.ag" #-}- _lhsInewNT- {-# LINE 2981 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOnewProds =- ({-# LINE 85 "src-ag/AG2AspectAG.ag" #-}- _lhsInewProds- {-# LINE 2987 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOo_noGroup =- ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_noGroup- {-# LINE 2993 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOo_rename =- ({-# LINE 40 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_rename- {-# LINE 2999 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOppNt =- ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}- _lhsIppNt- {-# LINE 3005 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOsyn =- ({-# LINE 756 "src-ag/AG2AspectAG.ag" #-}- _lhsIsyn- {-# LINE 3011 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 3017 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOsynNoGroup =- ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}- _lhsIsynNoGroup- {-# LINE 3023 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOext =- ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}- _lhsIext- {-# LINE 3029 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOinh =- ({-# LINE 756 "src-ag/AG2AspectAG.ag" #-}- _lhsIinh- {-# LINE 3035 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 3041 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOinhNoGroup =- ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}- _lhsIinhNoGroup- {-# LINE 3047 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOnewAtts =- ({-# LINE 77 "src-ag/AG2AspectAG.ag" #-}- _lhsInewAtts- {-# LINE 3053 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOnewNT =- ({-# LINE 404 "src-ag/AG2AspectAG.ag" #-}- _lhsInewNT- {-# LINE 3059 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOnewProds =- ({-# LINE 85 "src-ag/AG2AspectAG.ag" #-}- _lhsInewProds- {-# LINE 3065 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOo_noGroup =- ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_noGroup- {-# LINE 3071 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOo_rename =- ({-# LINE 40 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_rename- {-# LINE 3077 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOppNt =- ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}- _lhsIppNt- {-# LINE 3083 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOsyn =- ({-# LINE 756 "src-ag/AG2AspectAG.ag" #-}- _lhsIsyn- {-# LINE 3089 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 3095 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOsynNoGroup =- ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}- _lhsIsynNoGroup- {-# LINE 3101 "src-ag/AG2AspectAG.hs" #-}- )- ( _hdIhasMoreProds,_hdIppA,_hdIppCata,_hdIppL,_hdIppLI,_hdIppR,_hdIppRA,_hdIppSF,_hdIppSPF,_hdIprdInh) =- hd_ _hdOext _hdOinh _hdOinhMap _hdOinhNoGroup _hdOnewAtts _hdOnewNT _hdOnewProds _hdOo_noGroup _hdOo_rename _hdOppNt _hdOsyn _hdOsynMap _hdOsynNoGroup - ( _tlIhasMoreProds,_tlIppA,_tlIppCata,_tlIppL,_tlIppLI,_tlIppR,_tlIppRA,_tlIppSF,_tlIppSPF,_tlIprdInh) =- tl_ _tlOext _tlOinh _tlOinhMap _tlOinhNoGroup _tlOnewAtts _tlOnewNT _tlOnewProds _tlOo_noGroup _tlOo_rename _tlOppNt _tlOsyn _tlOsynMap _tlOsynNoGroup - in ( _lhsOhasMoreProds,_lhsOppA,_lhsOppCata,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOppRA,_lhsOppSF,_lhsOppSPF,_lhsOprdInh))) )-sem_Productions_Nil :: T_Productions -sem_Productions_Nil =- (T_Productions (\ _lhsIext- _lhsIinh- _lhsIinhMap- _lhsIinhNoGroup- _lhsInewAtts- _lhsInewNT- _lhsInewProds- _lhsIo_noGroup- _lhsIo_rename- _lhsIppNt- _lhsIsyn- _lhsIsynMap- _lhsIsynNoGroup ->- (let _lhsOhasMoreProds :: ( Bool )- _lhsOppA :: PP_Doc- _lhsOppCata :: PP_Doc- _lhsOppL :: PP_Doc- _lhsOppLI :: ([PP_Doc])- _lhsOppR :: PP_Doc- _lhsOppRA :: ([PP_Doc])- _lhsOppSF :: PP_Doc- _lhsOppSPF :: PP_Doc- _lhsOprdInh :: Attributes- -- use rule "src-ag/AG2AspectAG.ag"(line 100, column 51)- _lhsOhasMoreProds =- ({-# LINE 100 "src-ag/AG2AspectAG.ag" #-}- False- {-# LINE 3137 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 315, column 64)- _lhsOppA =- ({-# LINE 315 "src-ag/AG2AspectAG.ag" #-}- empty- {-# LINE 3143 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 725, column 67)- _lhsOppCata =- ({-# LINE 725 "src-ag/AG2AspectAG.ag" #-}- empty- {-# LINE 3149 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 257, column 79)- _lhsOppL =- ({-# LINE 257 "src-ag/AG2AspectAG.ag" #-}- empty- {-# LINE 3155 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 257, column 112)- _lhsOppLI =- ({-# LINE 257 "src-ag/AG2AspectAG.ag" #-}- []- {-# LINE 3161 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 411, column 79)- _lhsOppR =- ({-# LINE 411 "src-ag/AG2AspectAG.ag" #-}- empty- {-# LINE 3167 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 412, column 43)- _lhsOppRA =- ({-# LINE 412 "src-ag/AG2AspectAG.ag" #-}- []- {-# LINE 3173 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 766, column 66)- _lhsOppSF =- ({-# LINE 766 "src-ag/AG2AspectAG.ag" #-}- empty- {-# LINE 3179 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 767, column 42)- _lhsOppSPF =- ({-# LINE 767 "src-ag/AG2AspectAG.ag" #-}- empty- {-# LINE 3185 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 64, column 57)- _lhsOprdInh =- ({-# LINE 64 "src-ag/AG2AspectAG.ag" #-}- Map.empty- {-# LINE 3191 "src-ag/AG2AspectAG.hs" #-}- )- in ( _lhsOhasMoreProds,_lhsOppA,_lhsOppCata,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOppRA,_lhsOppSF,_lhsOppSPF,_lhsOprdInh))) )--- Rule ---------------------------------------------------------{-- visit 0:- inherited attributes:- ext : Maybe String- inhNoGroup : [String]- newProd : Bool- o_noGroup : [String]- ppNt : PP_Doc- ppProd : PP_Doc- synNoGroup : [String]- synthesized attributes:- locals : [Identifier]- ppRL : [ PPRule ]- alternatives:- alternative Rule:- child mbName : {Maybe Identifier}- child pattern : Pattern - child rhs : Expression - child owrt : {Bool}- child origin : {String}- child explicit : {Bool}- child pure : {Bool}- child identity : {Bool}- child mbError : {Maybe Error}- child eager : {Bool}--}--- cata-sem_Rule :: Rule ->- T_Rule -sem_Rule (Rule _mbName _pattern _rhs _owrt _origin _explicit _pure _identity _mbError _eager ) =- (sem_Rule_Rule _mbName (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin _explicit _pure _identity _mbError _eager )--- semantic domain-newtype T_Rule = T_Rule ((Maybe String) ->- ([String]) ->- Bool ->- ([String]) ->- PP_Doc ->- PP_Doc ->- ([String]) ->- ( ([Identifier]),([ PPRule ])))-data Inh_Rule = Inh_Rule {ext_Inh_Rule :: (Maybe String),inhNoGroup_Inh_Rule :: ([String]),newProd_Inh_Rule :: Bool,o_noGroup_Inh_Rule :: ([String]),ppNt_Inh_Rule :: PP_Doc,ppProd_Inh_Rule :: PP_Doc,synNoGroup_Inh_Rule :: ([String])}-data Syn_Rule = Syn_Rule {locals_Syn_Rule :: ([Identifier]),ppRL_Syn_Rule :: ([ PPRule ])}-wrap_Rule :: T_Rule ->- Inh_Rule ->- Syn_Rule -wrap_Rule (T_Rule sem ) (Inh_Rule _lhsIext _lhsIinhNoGroup _lhsInewProd _lhsIo_noGroup _lhsIppNt _lhsIppProd _lhsIsynNoGroup ) =- (let ( _lhsOlocals,_lhsOppRL) = sem _lhsIext _lhsIinhNoGroup _lhsInewProd _lhsIo_noGroup _lhsIppNt _lhsIppProd _lhsIsynNoGroup - in (Syn_Rule _lhsOlocals _lhsOppRL ))-sem_Rule_Rule :: (Maybe Identifier) ->- T_Pattern ->- T_Expression ->- Bool ->- String ->- Bool ->- Bool ->- Bool ->- (Maybe Error) ->- Bool ->- T_Rule -sem_Rule_Rule mbName_ (T_Pattern pattern_ ) (T_Expression rhs_ ) owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_ =- (T_Rule (\ _lhsIext- _lhsIinhNoGroup- _lhsInewProd- _lhsIo_noGroup- _lhsIppNt- _lhsIppProd- _lhsIsynNoGroup ->- (let _lhsOlocals :: ([Identifier])- _lhsOppRL :: ([ PPRule ])- _rhsOppNt :: PP_Doc- _rhsOppProd :: PP_Doc- _patternIcopy :: Pattern - _patternIinfo :: ((Identifier, Identifier))- _rhsIppRE :: ([String] -> Identifier -> [(Identifier,Type)] -> [Identifier] -> PP_Doc)- -- "src-ag/AG2AspectAG.ag"(line 368, column 25)- _lhsOlocals =- ({-# LINE 368 "src-ag/AG2AspectAG.ag" #-}- if (show (fst _patternIinfo) == "loc")- then [ snd _patternIinfo ]- else [ ]- {-# LINE 3275 "src-ag/AG2AspectAG.hs" #-}- )- -- "src-ag/AG2AspectAG.ag"(line 465, column 33)- _lhsOppRL =- ({-# LINE 465 "src-ag/AG2AspectAG.ag" #-}- if (not explicit_ && not _lhsInewProd)- then []- else [ ppRule _patternIinfo owrt_ (defRule _lhsIppNt _patternIinfo _lhsIo_noGroup _rhsIppRE) ]- {-# LINE 3283 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _rhsOppNt =- ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}- _lhsIppNt- {-# LINE 3289 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _rhsOppProd =- ({-# LINE 191 "src-ag/AG2AspectAG.ag" #-}- _lhsIppProd- {-# LINE 3295 "src-ag/AG2AspectAG.hs" #-}- )- ( _patternIcopy,_patternIinfo) =- pattern_ - ( _rhsIppRE) =- rhs_ _rhsOppNt _rhsOppProd - in ( _lhsOlocals,_lhsOppRL))) )--- Rules --------------------------------------------------------{-- visit 0:- inherited attributes:- ext : Maybe String- inhNoGroup : [String]- newProd : Bool- o_noGroup : [String]- ppNt : PP_Doc- ppProd : PP_Doc- synNoGroup : [String]- synthesized attributes:- locals : [Identifier]- ppRL : [ PPRule ]- alternatives:- alternative Cons:- child hd : Rule - child tl : Rules - alternative Nil:--}--- cata-sem_Rules :: Rules ->- T_Rules -sem_Rules list =- (Prelude.foldr sem_Rules_Cons sem_Rules_Nil (Prelude.map sem_Rule list) )--- semantic domain-newtype T_Rules = T_Rules ((Maybe String) ->- ([String]) ->- Bool ->- ([String]) ->- PP_Doc ->- PP_Doc ->- ([String]) ->- ( ([Identifier]),([ PPRule ])))-data Inh_Rules = Inh_Rules {ext_Inh_Rules :: (Maybe String),inhNoGroup_Inh_Rules :: ([String]),newProd_Inh_Rules :: Bool,o_noGroup_Inh_Rules :: ([String]),ppNt_Inh_Rules :: PP_Doc,ppProd_Inh_Rules :: PP_Doc,synNoGroup_Inh_Rules :: ([String])}-data Syn_Rules = Syn_Rules {locals_Syn_Rules :: ([Identifier]),ppRL_Syn_Rules :: ([ PPRule ])}-wrap_Rules :: T_Rules ->- Inh_Rules ->- Syn_Rules -wrap_Rules (T_Rules sem ) (Inh_Rules _lhsIext _lhsIinhNoGroup _lhsInewProd _lhsIo_noGroup _lhsIppNt _lhsIppProd _lhsIsynNoGroup ) =- (let ( _lhsOlocals,_lhsOppRL) = sem _lhsIext _lhsIinhNoGroup _lhsInewProd _lhsIo_noGroup _lhsIppNt _lhsIppProd _lhsIsynNoGroup - in (Syn_Rules _lhsOlocals _lhsOppRL ))-sem_Rules_Cons :: T_Rule ->- T_Rules ->- T_Rules -sem_Rules_Cons (T_Rule hd_ ) (T_Rules tl_ ) =- (T_Rules (\ _lhsIext- _lhsIinhNoGroup- _lhsInewProd- _lhsIo_noGroup- _lhsIppNt- _lhsIppProd- _lhsIsynNoGroup ->- (let _lhsOppRL :: ([ PPRule ])- _lhsOlocals :: ([Identifier])- _hdOext :: (Maybe String)- _hdOinhNoGroup :: ([String])- _hdOnewProd :: Bool- _hdOo_noGroup :: ([String])- _hdOppNt :: PP_Doc- _hdOppProd :: PP_Doc- _hdOsynNoGroup :: ([String])- _tlOext :: (Maybe String)- _tlOinhNoGroup :: ([String])- _tlOnewProd :: Bool- _tlOo_noGroup :: ([String])- _tlOppNt :: PP_Doc- _tlOppProd :: PP_Doc- _tlOsynNoGroup :: ([String])- _hdIlocals :: ([Identifier])- _hdIppRL :: ([ PPRule ])- _tlIlocals :: ([Identifier])- _tlIppRL :: ([ PPRule ])- -- "src-ag/AG2AspectAG.ag"(line 461, column 33)- _lhsOppRL =- ({-# LINE 461 "src-ag/AG2AspectAG.ag" #-}- _hdIppRL ++ _tlIppRL- {-# LINE 3379 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 364, column 30)- _lhsOlocals =- ({-# LINE 364 "src-ag/AG2AspectAG.ag" #-}- _hdIlocals ++ _tlIlocals- {-# LINE 3385 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOext =- ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}- _lhsIext- {-# LINE 3391 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOinhNoGroup =- ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}- _lhsIinhNoGroup- {-# LINE 3397 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOnewProd =- ({-# LINE 405 "src-ag/AG2AspectAG.ag" #-}- _lhsInewProd- {-# LINE 3403 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOo_noGroup =- ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_noGroup- {-# LINE 3409 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOppNt =- ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}- _lhsIppNt- {-# LINE 3415 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOppProd =- ({-# LINE 191 "src-ag/AG2AspectAG.ag" #-}- _lhsIppProd- {-# LINE 3421 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _hdOsynNoGroup =- ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}- _lhsIsynNoGroup- {-# LINE 3427 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOext =- ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}- _lhsIext- {-# LINE 3433 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOinhNoGroup =- ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}- _lhsIinhNoGroup- {-# LINE 3439 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOnewProd =- ({-# LINE 405 "src-ag/AG2AspectAG.ag" #-}- _lhsInewProd- {-# LINE 3445 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOo_noGroup =- ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}- _lhsIo_noGroup- {-# LINE 3451 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOppNt =- ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}- _lhsIppNt- {-# LINE 3457 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOppProd =- ({-# LINE 191 "src-ag/AG2AspectAG.ag" #-}- _lhsIppProd- {-# LINE 3463 "src-ag/AG2AspectAG.hs" #-}- )- -- copy rule (down)- _tlOsynNoGroup =- ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}- _lhsIsynNoGroup- {-# LINE 3469 "src-ag/AG2AspectAG.hs" #-}- )- ( _hdIlocals,_hdIppRL) =- hd_ _hdOext _hdOinhNoGroup _hdOnewProd _hdOo_noGroup _hdOppNt _hdOppProd _hdOsynNoGroup - ( _tlIlocals,_tlIppRL) =- tl_ _tlOext _tlOinhNoGroup _tlOnewProd _tlOo_noGroup _tlOppNt _tlOppProd _tlOsynNoGroup - in ( _lhsOlocals,_lhsOppRL))) )-sem_Rules_Nil :: T_Rules -sem_Rules_Nil =- (T_Rules (\ _lhsIext- _lhsIinhNoGroup- _lhsInewProd- _lhsIo_noGroup- _lhsIppNt- _lhsIppProd- _lhsIsynNoGroup ->- (let _lhsOppRL :: ([ PPRule ])- _lhsOlocals :: ([Identifier])- -- "src-ag/AG2AspectAG.ag"(line 462, column 33)- _lhsOppRL =- ({-# LINE 462 "src-ag/AG2AspectAG.ag" #-}- []- {-# LINE 3491 "src-ag/AG2AspectAG.hs" #-}- )- -- use rule "src-ag/AG2AspectAG.ag"(line 364, column 30)- _lhsOlocals =- ({-# LINE 364 "src-ag/AG2AspectAG.ag" #-}- []- {-# LINE 3497 "src-ag/AG2AspectAG.hs" #-}- )- in ( _lhsOlocals,_lhsOppRL))) )--- TypeSig ------------------------------------------------------{-- alternatives:- alternative TypeSig:- child name : {Identifier}- child tp : {Type}--}--- cata-sem_TypeSig :: TypeSig ->- T_TypeSig -sem_TypeSig (TypeSig _name _tp ) =- (sem_TypeSig_TypeSig _name _tp )--- semantic domain-newtype T_TypeSig = T_TypeSig (( ))-data Inh_TypeSig = Inh_TypeSig {}-data Syn_TypeSig = Syn_TypeSig {}-wrap_TypeSig :: T_TypeSig ->- Inh_TypeSig ->- Syn_TypeSig -wrap_TypeSig (T_TypeSig sem ) (Inh_TypeSig ) =- (let ( ) = sem - in (Syn_TypeSig ))-sem_TypeSig_TypeSig :: Identifier ->- Type ->- T_TypeSig -sem_TypeSig_TypeSig name_ tp_ =- (T_TypeSig (let - in ( )) )--- TypeSigs -----------------------------------------------------{-- alternatives:- alternative Cons:- child hd : TypeSig - child tl : TypeSigs - alternative Nil:--}--- cata-sem_TypeSigs :: TypeSigs ->- T_TypeSigs -sem_TypeSigs list =- (Prelude.foldr sem_TypeSigs_Cons sem_TypeSigs_Nil (Prelude.map sem_TypeSig list) )--- semantic domain-newtype T_TypeSigs = T_TypeSigs (( ))-data Inh_TypeSigs = Inh_TypeSigs {}-data Syn_TypeSigs = Syn_TypeSigs {}-wrap_TypeSigs :: T_TypeSigs ->- Inh_TypeSigs ->- Syn_TypeSigs -wrap_TypeSigs (T_TypeSigs sem ) (Inh_TypeSigs ) =- (let ( ) = sem - in (Syn_TypeSigs ))-sem_TypeSigs_Cons :: T_TypeSig ->- T_TypeSigs ->- T_TypeSigs -sem_TypeSigs_Cons (T_TypeSig hd_ ) (T_TypeSigs tl_ ) =- (T_TypeSigs (let - in ( )) )-sem_TypeSigs_Nil :: T_TypeSigs -sem_TypeSigs_Nil =- (T_TypeSigs (let - in ( )) )+-- UUAGC 0.9.40.1 (src-ag/AG2AspectAG.ag)+module AG2AspectAG where+{-# LINE 8 "src-ag/AG2AspectAG.ag" #-}++import Options++import Data.Char+import Data.List+import qualified Data.Map as Map+import qualified Data.Set as Set+import Data.Maybe++import Pretty+import PPUtil+import UU.Scanner.Position++import AbstractSyntax+import TokenDef+import CommonTypes++{-# LINE 24 "dist/build/AG2AspectAG.hs" #-}++{-# LINE 2 "src-ag/AbstractSyntax.ag" #-}++-- AbstractSyntax.ag imports+import Data.Set(Set)+import Data.Map(Map)+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import Macro --marcos+import CommonTypes+import ErrorMessages+{-# LINE 36 "dist/build/AG2AspectAG.hs" #-}++{-# LINE 2 "src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 43 "dist/build/AG2AspectAG.hs" #-}++{-# LINE 2 "src-ag/Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken+{-# LINE 49 "dist/build/AG2AspectAG.hs" #-}++{-# LINE 2 "src-ag/HsToken.ag" #-}++import CommonTypes+import UU.Scanner.Position(Pos)+{-# LINE 55 "dist/build/AG2AspectAG.hs" #-}+{-# LINE 27 "src-ag/AG2AspectAG.ag" #-}++pragmaAspectAG = pp "{-# LANGUAGE EmptyDataDecls, NoMonomorphismRestriction , TypeSynonymInstances, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances #-}"++{-# LINE 60 "dist/build/AG2AspectAG.hs" #-}++{-# LINE 32 "src-ag/AG2AspectAG.ag" #-}++ppName l = ppListSep "" "" "_" l+{-# LINE 65 "dist/build/AG2AspectAG.hs" #-}++{-# LINE 69 "src-ag/AG2AspectAG.ag" #-}++type FieldMap = [(Identifier, Type)]+type DataTypes = Map.Map NontermIdent (Map.Map ConstructorIdent FieldMap)+{-# LINE 71 "dist/build/AG2AspectAG.hs" #-}++{-# LINE 336 "src-ag/AG2AspectAG.ag" #-}++filterAtts newAtts = filter (\att -> Map.member (identifier att) newAtts)+filterNotAtts newAtts = filter (\att -> not (Map.member (identifier att) newAtts))++defAtt att = "data " >|< attTName att >|< "; " >|< attName att >|< " = proxy :: Proxy " >|< attTName att+attName att = pp $ "att_" ++ att+attTName att = pp $ "Att_" ++ att+++defAttRec recPref ppNt atts noGroup =+ let recName = ppName [recPref, ppNt]+ fields = ppCommas (map (\(a,t) -> ppName [pp a, recName ] >|< " ::" >|< ppShow t) (groupAtts atts noGroup))+ in+ "data " >|< recName >|< " = " >|< recName >|< " { " >|< fields >|< " }"++groupAtts atts noGroup = (Map.toAscList . Map.difference atts) noGroup++-- it defines selectors with the form:+-- l1_nt_prod(x, _, .., _) = x+-- ln_nt_prod(_, .., _, x) = x+defLocalAtts prodName total actual (l:ls) = ppName [pp l, prodName] >|<+ ppListSep "(" ")" "," (replicate (actual-1) "_" ++ "x" : replicate (total-actual) "_") >|<+ pp " = x" >-<+ defLocalAtts prodName total (actual+1) ls+defLocalAtts _ _ _ [] = empty++{-# LINE 100 "dist/build/AG2AspectAG.hs" #-}++{-# LINE 391 "src-ag/AG2AspectAG.ag" #-}++ntsList att ppNtL = "nts_" ++ att ++ " = " >|< ppListSep "" "" " .*. " ((map fst ppNtL) ++ [pp "hNil"])++filterNts att = filter ( Map.member (identifier att) . snd )+{-# LINE 107 "dist/build/AG2AspectAG.hs" #-}++{-# LINE 449 "src-ag/AG2AspectAG.ag" #-}++data PPRule = PPRule Identifier Identifier Bool ([(Identifier,Type)] -> [Identifier] -> PP_Doc)++ppRule (field,attr) owrt def = PPRule field attr owrt def+ruleField (PPRule field _ _ _ ) = field+ruleAttr (PPRule _ attr _ _ ) = attr+ruleOwrt (PPRule _ _ owrt _ ) = owrt+ruleDef (PPRule _ _ _ def) = def++{-# LINE 119 "dist/build/AG2AspectAG.hs" #-}++{-# LINE 488 "src-ag/AG2AspectAG.ag" #-}+++defInhGRule ppNt prodName newNT newProd ch rules inhNoGroup synNoGroup chids locals =+ let ppAtt = ppName [pp "inh", prodName]+ ppR = ppAtt >|< pp " = inhdefM att_inh nts_group $" >-<+ indent 4 "do " >-<+ indent 5 "loc <- at loc" >-<+ indent 5 "lhs <- at lhs" >-<+ indent 5 ch >-<+ indent 5 "return $" >-<+ indent 6 (foldr (>-<) (pp "emptyRecord") (map (chGRule ppNt prodName rules inhNoGroup synNoGroup chids locals) chids))+ in if (newNT || (not newNT && newProd))+ then (ppR, [ ppAtt ])+ else (empty, [])++chGRule ppNt prodName rules inhNoGroup synNoGroup chids locals (idCh,tp) =+ let chName = ppName [pp "ch", pp idCh, prodName]+ ppTp = ppShow tp+ chRules = ppCommas $ mapGRuleDefs (== idCh) rules inhNoGroup synNoGroup chids locals+ in if (isNonterminal tp)+ then chName >|< ".=." >-<+ indent 1 "InhG_" >|< ppShow tp >|< pp " {" >-<+ indent 2 chRules >-<+ indent 1 "} .*. "+ else empty+++defSynGRule ppNt prod newNT newProd ch rules inhNoGroup synNoGroup chids locals =+ let ppAtt = ppName [pp "syn", ppNt, pp prod]+ ppTAtt = "SynG_" >|< ppNt+ ppR = ppAtt >|< pp " = syndefM att_syn $" >-<+ indent 4 "do " >-<+ indent 5 "loc <- at loc" >-<+ indent 5 "lhs <- at lhs" >-<+ indent 5 ch >-<+ indent 5 "return $" >-<+ indent 6 ppTAtt >|< pp " {" >-<+ indent 7 (ppCommas $ mapGRuleDefs ((== "lhs") . show) rules inhNoGroup synNoGroup chids locals) >-<+ indent 6 "}"+ in if (newNT || (not newNT && newProd))+ then (ppR, [ ppAtt ])+ else (empty, [])++defLocRule ppNt prod newNT newProd ch rules inhNoGroup synNoGroup chids locals =+ let ppAtt = ppName [pp "loc", ppNt, pp prod]+ ppTAtt = ppName [pp "Loc", ppNt, pp prod]+ ppR = ppAtt >|< pp " = locdefM att_loc $" >-<+ indent 4 "do " >-<+ indent 5 "loc <- at loc" >-<+ indent 5 "lhs <- at lhs" >-<+ indent 5 ch >-<+ indent 5 "return $" >-<+ indent 6 (ppListSep "(" ")" "," $ mapLRuleDefs rules inhNoGroup synNoGroup chids locals)+ in (ppR, [ ppAtt ])++defInstRules ppNt prod newNT newProd ch rules chids locals+ = let ppAsp = ppName [pp "inst", ppNt, pp prod]+ instRules = filter ((=="inst") . show . ruleField) rules+ ppAtt att = ppListSep "`ext` " "" "_" [pp "inst_ch", pp att, ppNt, pp prod]+ in ( ppAsp >|< pp " = emptyRule " >|< (map (ppAtt . ruleAttr) instRules) >-<+ (vlist $ map (defInstRule ppNt prod ch chids locals) instRules)+ , [ ppAsp ])+++defInstRule ppNt prod ch chids locals rule =+ let ppAtt = ppName [pp "ch", pp (ruleAttr rule), ppNt, pp prod]+ in pp "inst_" >|< ppAtt >|< pp " = instdefM " >|< ppAtt >|< pp " $" >-<+ indent 4 "do " >-<+ indent 5 "loc <- at loc" >-<+ indent 5 "lhs <- at lhs" >-<+ indent 5 ch >-<+ indent 5 "return $" >-<+ indent 6 ((ruleDef rule) chids locals)+++defSynRules ppNt prod newNT newProd newAtts ch rules inhNoGroup synNoGroup chids locals+ = let synRules = filter ( (=="lhs") . show . ruleField) rules+ ngRules = filter ((flip elem synNoGroup) . getName . ruleAttr) synRules+ (ppR, ppRA) = unzip $ map (defSynRule True ppNt prod newNT newProd newAtts ch chids locals) ngRules+ in (vlist ppR, concat ppRA )++modSynRules ppNt prod newNT newProd newAtts ch rules inhNoGroup synNoGroup chids locals+ = let synRules = filter ( (=="lhs") . show . ruleField) rules+ ngRules = filter ((flip elem synNoGroup) . getName . ruleAttr) synRules+ (ppR, ppRA) = unzip $ map (defSynRule False ppNt prod newNT newProd newAtts ch chids locals) ngRules+ in (vlist ppR, concat ppRA )++defSynRule new ppNt prod newNT newProd newAtts ch chids locals rule =+ let att = ruleAttr rule+ newAtt = Map.member att newAtts+ owrt = ruleOwrt rule+ ppAtt = ppName [pp att, pp (if new then "syn" else "synM"), ppNt, pp prod]+ ppR def = ppAtt >|< pp (" = " ++ def ++ " ") >|< attName (show att) >|< pp " $" >-<+ indent 4 "do " >-<+ indent 5 "loc <- at loc" >-<+ indent 5 "lhs <- at lhs" >-<+ indent 5 ch >-<+ indent 5 "return $" >-<+ indent 6 ((ruleDef rule) chids locals)+ in+ if new+ then if (not owrt && (newNT || (not newNT && newProd) || newAtt))+ then (ppR "syndefM", [ ppAtt ])+ else (empty, [])+ else if owrt+ then (ppR "synmodM", [ ppAtt ])+ else (empty, [])++++defInhRules ppNt prodName newNT newProd newAtts ch rules inhNoGroup synNoGroup chids locals+ = let ngRules = filter ((flip elem inhNoGroup) . getName . ruleAttr) rules+ (ppR, ppRA) = unzip $ map (defInhRule True ppNt prodName newNT newProd newAtts ch ngRules inhNoGroup synNoGroup chids locals) inhNoGroup+ in (vlist ppR, concat ppRA)++modInhRules ppNt prodName newNT newProd newAtts ch rules inhNoGroup synNoGroup chids locals+ = let ngRules = filter ((flip elem inhNoGroup) . getName . ruleAttr) rules+ (ppR, ppRA) = unzip $ map (defInhRule False ppNt prodName newNT newProd newAtts ch ngRules inhNoGroup synNoGroup chids locals) inhNoGroup+ in (vlist ppR, concat ppRA)+++defInhRule new ppNt prodName newNT newProd newAtts ch rules inhNoGroup synNoGroup chids locals att =+ let ppAtt = ppName [pp att, pp (if new then "inh" else "inhM"),prodName]+ newAtt = Map.member (identifier att) newAtts+ chRMaybe = map (chRule new ppNt prodName att rules inhNoGroup synNoGroup chids locals) chids+ chR = [ x | (Just x) <- chRMaybe ]+ ppR def = ppAtt >|< pp (" = " ++ def ++ " ") >|< attName att >|< " nts_" >|< att >|< " $" >-<+ indent 4 "do " >-<+ indent 5 "loc <- at loc" >-<+ indent 5 "lhs <- at lhs" >-<+ indent 5 ch >-<+ indent 5 "return $" >-<+ indent 6 (foldr (>-<) (pp "emptyRecord") chR)+ in+ if new+ then if (newNT || (not newNT && newProd) || newAtt)+ then (ppR "inhdefM", [ ppAtt ])+ else (empty, [])+ else if (not . null) chR+ then (ppR "inhmodM", [ ppAtt ])+ else (empty, [])+++chRule new ppNt prodName att rules inhNoGroup synNoGroup chids locals (idCh,tp) =+ let chName = ppName [pp "ch", pp idCh, prodName]+ ppTp = ppShow tp+ chRule = inhRuleDef new (== idCh) (== att) rules inhNoGroup synNoGroup chids locals -- it's supposed to be only one+ in if (isNonterminal tp && (not . null) chRule)+ then Just $ chName >|< ".=. (" >|< chRule >|< ") .*. "+ else Nothing+++mapLRuleDefs rules inhNoGroup synNoGroup chids locals+ = map appSnd $ sortBy cmpField $ filter ((== "loc") . show . ruleField) rules+ where cmpField r1 r2 = compare (ruleField r1) (ruleField r2)+ appSnd rule = (ruleDef rule) chids locals+++mapGRuleDefs filt rules inhNoGroup synNoGroup chids locals+ = map appSnd $ sortBy cmpField $ filter (not . (flip elem inhNoGroup) . getName . ruleAttr)+ $ filter (not . (flip elem synNoGroup) . getName . ruleAttr)+ $ filter ( filt . ruleField) rules+ where cmpField r1 r2 = compare (ruleField r1) (ruleField r2)+ appSnd rule = (ruleDef rule) chids locals++inhRuleDef new filt1 filt2 rules inhNoGroup synNoGroup chids locals+ = map appSnd $ sortBy cmpField $ filter ( (== not new) . ruleOwrt)+ $ filter ((flip elem inhNoGroup) . getName . ruleAttr)+ $ filter ( filt2 . getName . ruleAttr)+ $ filter ( filt1 . ruleField) rules+ where cmpField r1 r2 = compare (ruleField r1) (ruleField r2)+ appSnd rule = (ruleDef rule) chids locals++defRule ppNt (field,att) noGroup rhs = \chids locals ->+ let ppAtt = if (elem (getName att) noGroup)+ then empty+ else case (show field) of+ "lhs" -> att >|< "_" >|< pp "SynG" >|< pp "_" >|< ppNt >|< " = "+ "loc" -> empty+ "inst" -> empty+ otherwise -> att >|< "_" >|< pp "InhG" >|< pp "_" >|<+ (maybe (error $ "lhs field " ++ show field ++" is not a child")+ ppShow (lookup field chids))+ >|< " = "+ in ppAtt >|< (rhs noGroup field chids locals)+++rhsRule ppNt ppProd tks noGroup field chids locals = vlist . lines2PP . (map (token2PP ppNt ppProd field chids locals noGroup )) $ tks+++lines2PP [] = []+lines2PP xs = map line2PP . shiftLeft . getLines $ xs+++token2PP ppNt ppProd field chids locals noGroup tk+ = case tk of+ AGLocal var pos _ -> (pos, if (elem var locals)+ then (ppListSep "(" "" "_" [pp var, ppNt, ppProd]) >|< pp " (loc # att_loc)) "+ else pp var)+ AGField field attr pos _ -> let ppChT = maybe (error $ "rhs field " ++ show field ++ " is not a child") ppShow (lookup field chids)+ ppAtt = case (show field) of+ "lhs" -> attName "inh"+ "loc" -> attName "loc"+ otherwise -> attName "syn"+ ppSubAtt = case (show field) of+ "lhs" -> ppName [pp (getName attr), pp "InhG", ppNt]+ "loc" -> ppName [pp (getName attr), ppNt, ppProd]+ otherwise -> ppName [pp (getName attr), pp "SynG", ppChT]+ in (pos, if (elem (getName attr) noGroup )+ then pp "(" >|< pp (getName field) >|< " # " >|< attName (getName attr) >|< pp ")"+ else pp "(" >|< ppSubAtt >|< " (" >|< pp (getName field) >|< " # " >|< ppAtt >|< ")) ")+ HsToken value pos -> (pos, pp value)+ CharToken value pos -> (pos, pp (show value))+ StrToken value pos -> (pos, pp (show value))+ Err mesg pos -> (pos, pp $ " ***" ++ mesg ++ "*** ")++line2PP ts = let f (p,t) r = let ct = column p+ in \c -> pp (spaces (ct-c)) >|< t >|< r (length (show t) +ct)+ spaces x | x < 0 = ""+ | otherwise = replicate x ' '+ in foldr f (pp . const "") ts 1++{-# LINE 344 "dist/build/AG2AspectAG.hs" #-}++{-# LINE 715 "src-ag/AG2AspectAG.ag" #-}++ppMacro (Macro con children) = "( atts_" >|< show con >|< ", " >|< ppListSep "" "" " <.> " ppChildren >|<")"+ where ppChildren = map ppChild children+ ppChild (RuleChild ch n) = chName ch >|< " ==> " >|< ppMacro n+ ppChild (ChildChild ch n) = chName ch >|< " --> " >|< n+ ppChild (ValueChild ch n) = chName ch >|< " ~~> " >|< n+ chName ch = ppName [pp "ch", pp ch, pp con]+{-# LINE 354 "dist/build/AG2AspectAG.hs" #-}++{-# LINE 748 "src-ag/AG2AspectAG.ag" #-}++ppNoGroupAtts syn noGroup = let synatts = Map.keys $ Map.filterWithKey (\att _ -> elem (getName att) noGroup) syn+ in map (flip (>|<) "_inh") noGroup ++ map (flip (>|<) "_syn") synatts++ruleName att prodName = ppName [att,prodName]++elemNT a b = False+{-# LINE 364 "dist/build/AG2AspectAG.hs" #-}++{-# LINE 791 "src-ag/AG2AspectAG.ag" #-}++attTypes atts = map (\(a,t) -> "(HCons (LVPair (Proxy Att_" >|< a >|< ") " >|< ppShow t >|< ") ") $ Map.toAscList atts+{-# LINE 369 "dist/build/AG2AspectAG.hs" #-}++{-# LINE 845 "src-ag/AG2AspectAG.ag" #-}++attVars atts = map (\(a,_) -> "_" >|< a >|< " ") $ Map.toAscList atts+attFields atts noGroup ppNt =+ let ng = map (\(a,_) -> attName (getName a) >|< " .=. _" >|< a >|< " .*. ") $ Map.toAscList noGroup+ g = ppCommas $ map (\(a,_) -> ppName [pp a, pp "InhG",ppNt] >|< "= _" >|< a) $ Map.toAscList $ Map.difference atts noGroup+ in "(" >|< ng >|< "att_inh .=. " >|< ppName [pp "InhG", ppNt] >|< " { " >|< g >|< " } .*. emptyRecord)"+{-# LINE 378 "dist/build/AG2AspectAG.hs" #-}+-- Child -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ ext : Maybe String+ inhMap : Map Identifier Attributes+ inhNoGroup : [String]+ o_noGroup : [String]+ o_rename : Bool+ ppNt : PP_Doc+ ppProd : PP_Doc+ synMap : Map Identifier Attributes+ synNoGroup : [String]+ synthesized attributes:+ idCL : [(Identifier,Type)]+ ppCSF : [(Identifier,(PP_Doc,PP_Doc))]+ ppDL : [PP_Doc]+ ppL : PP_Doc+ ppLI : [PP_Doc]+ ppR : PP_Doc+ prdInh : Attributes+ alternatives:+ alternative Child:+ child name : {Identifier}+ child tp : {Type}+ child kind : {ChildKind}+ visit 0:+ local ppCh : _+ local ppTCh : _+ local chName : _+ local chLabel : _+ local chTLabel : _+ local chnt : _+ local inh : _+ local syn : _+-}+-- cata+sem_Child :: Child ->+ T_Child+sem_Child (Child _name _tp _kind) =+ (sem_Child_Child _name _tp _kind)+-- semantic domain+newtype T_Child = T_Child ((Maybe String) ->+ (Map Identifier Attributes) ->+ ([String]) ->+ ([String]) ->+ Bool ->+ PP_Doc ->+ PP_Doc ->+ (Map Identifier Attributes) ->+ ([String]) ->+ ( ([(Identifier,Type)]),([(Identifier,(PP_Doc,PP_Doc))]),([PP_Doc]),PP_Doc,([PP_Doc]),PP_Doc,Attributes))+data Inh_Child = Inh_Child {ext_Inh_Child :: (Maybe String),inhMap_Inh_Child :: (Map Identifier Attributes),inhNoGroup_Inh_Child :: ([String]),o_noGroup_Inh_Child :: ([String]),o_rename_Inh_Child :: Bool,ppNt_Inh_Child :: PP_Doc,ppProd_Inh_Child :: PP_Doc,synMap_Inh_Child :: (Map Identifier Attributes),synNoGroup_Inh_Child :: ([String])}+data Syn_Child = Syn_Child {idCL_Syn_Child :: ([(Identifier,Type)]),ppCSF_Syn_Child :: ([(Identifier,(PP_Doc,PP_Doc))]),ppDL_Syn_Child :: ([PP_Doc]),ppL_Syn_Child :: PP_Doc,ppLI_Syn_Child :: ([PP_Doc]),ppR_Syn_Child :: PP_Doc,prdInh_Syn_Child :: Attributes}+wrap_Child :: T_Child ->+ Inh_Child ->+ Syn_Child+wrap_Child (T_Child sem) (Inh_Child _lhsIext _lhsIinhMap _lhsIinhNoGroup _lhsIo_noGroup _lhsIo_rename _lhsIppNt _lhsIppProd _lhsIsynMap _lhsIsynNoGroup) =+ (let ( _lhsOidCL,_lhsOppCSF,_lhsOppDL,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOprdInh) = sem _lhsIext _lhsIinhMap _lhsIinhNoGroup _lhsIo_noGroup _lhsIo_rename _lhsIppNt _lhsIppProd _lhsIsynMap _lhsIsynNoGroup+ in (Syn_Child _lhsOidCL _lhsOppCSF _lhsOppDL _lhsOppL _lhsOppLI _lhsOppR _lhsOprdInh))+sem_Child_Child :: Identifier ->+ Type ->+ ChildKind ->+ T_Child+sem_Child_Child name_ tp_ kind_ =+ (T_Child (\ _lhsIext+ _lhsIinhMap+ _lhsIinhNoGroup+ _lhsIo_noGroup+ _lhsIo_rename+ _lhsIppNt+ _lhsIppProd+ _lhsIsynMap+ _lhsIsynNoGroup ->+ (let _lhsOprdInh :: Attributes+ _lhsOppDL :: ([PP_Doc])+ _lhsOppL :: PP_Doc+ _lhsOppLI :: ([PP_Doc])+ _lhsOppR :: PP_Doc+ _lhsOidCL :: ([(Identifier,Type)])+ _lhsOppCSF :: ([(Identifier,(PP_Doc,PP_Doc))])+ -- "src-ag/AG2AspectAG.ag"(line 66, column 12)+ _lhsOprdInh =+ ({-# LINE 66 "src-ag/AG2AspectAG.ag" #-}+ _inh+ {-# LINE 464 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 181, column 25)+ _ppCh =+ ({-# LINE 181 "src-ag/AG2AspectAG.ag" #-}+ pp name_+ {-# LINE 470 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 182, column 25)+ _ppTCh =+ ({-# LINE 182 "src-ag/AG2AspectAG.ag" #-}+ ppShow tp_+ {-# LINE 476 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 183, column 25)+ _chName =+ ({-# LINE 183 "src-ag/AG2AspectAG.ag" #-}+ ppName [_ppCh , _lhsIppNt, _lhsIppProd]+ {-# LINE 482 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 241, column 25)+ _lhsOppDL =+ ({-# LINE 241 "src-ag/AG2AspectAG.ag" #-}+ case kind_ of+ ChildSyntax -> [ _chName >|< pp " :: " >|< _ppTCh ]+ _ -> []+ {-# LINE 490 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 284, column 25)+ _chLabel =+ ({-# LINE 284 "src-ag/AG2AspectAG.ag" #-}+ "ch_" >|< _chName+ {-# LINE 496 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 285, column 25)+ _chTLabel =+ ({-# LINE 285 "src-ag/AG2AspectAG.ag" #-}+ "Ch_" >|< _chName+ {-# LINE 502 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 286, column 25)+ _lhsOppL =+ ({-# LINE 286 "src-ag/AG2AspectAG.ag" #-}+ "data " >|< _chTLabel >|< "; " >|< _chLabel >|< pp " = proxy :: " >|<+ case kind_ of+ ChildSyntax -> "Proxy " >|< "(" >|< _chTLabel >|< ", " >|< _ppTCh >|< ")"+ _ -> "SemType " >|< _ppTCh >|< pp " nt => Proxy " >|<+ "(" >|< _chTLabel >|< ", nt)"+ {-# LINE 512 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 292, column 25)+ _lhsOppLI =+ ({-# LINE 292 "src-ag/AG2AspectAG.ag" #-}+ [ _chLabel , _chTLabel ]+ {-# LINE 518 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 445, column 25)+ _lhsOppR =+ ({-# LINE 445 "src-ag/AG2AspectAG.ag" #-}+ let chName = ppListSep "" "" "_" [pp name_, _lhsIppNt, _lhsIppProd]+ in pp name_ >|< " <- at ch_" >|< chName+ {-# LINE 525 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 483, column 25)+ _lhsOidCL =+ ({-# LINE 483 "src-ag/AG2AspectAG.ag" #-}+ [ (name_, removeDeforested tp_ ) ]+ {-# LINE 531 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 820, column 25)+ _lhsOppCSF =+ ({-# LINE 820 "src-ag/AG2AspectAG.ag" #-}+ let+ semC = if (isNonterminal tp_)+ then "sem_" >|< ppShow tp_ >|< " _" >|< name_+ else "sem_Lit _" >|< name_+ in case kind_ of+ ChildSyntax -> [(name_, ( _chLabel >|< " .=. (" >|< semC >|< ") .*. "+ , _chLabel >|< " .=. _" >|< name_ >|< " .*. "))]+ _ -> []+ {-# LINE 544 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 19, column 11)+ _chnt =+ ({-# LINE 19 "src-ag/DistChildAttr.ag" #-}+ case tp_ of+ NT nt _ _ -> nt+ Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")+ Haskell t -> identifier ""+ {-# LINE 553 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 23, column 11)+ _inh =+ ({-# LINE 23 "src-ag/DistChildAttr.ag" #-}+ Map.findWithDefault Map.empty _chnt _lhsIinhMap+ {-# LINE 559 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 24, column 11)+ _syn =+ ({-# LINE 24 "src-ag/DistChildAttr.ag" #-}+ Map.findWithDefault Map.empty _chnt _lhsIsynMap+ {-# LINE 565 "dist/build/AG2AspectAG" #-}+ )+ in ( _lhsOidCL,_lhsOppCSF,_lhsOppDL,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOprdInh))))+-- Children ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ ext : Maybe String+ inhMap : Map Identifier Attributes+ inhNoGroup : [String]+ o_noGroup : [String]+ o_rename : Bool+ ppNt : PP_Doc+ ppProd : PP_Doc+ synMap : Map Identifier Attributes+ synNoGroup : [String]+ synthesized attributes:+ idCL : [(Identifier,Type)]+ ppCSF : [(Identifier,(PP_Doc,PP_Doc))]+ ppDL : [PP_Doc]+ ppL : PP_Doc+ ppLI : [PP_Doc]+ ppR : PP_Doc+ prdInh : Attributes+ alternatives:+ alternative Cons:+ child hd : Child + child tl : Children + alternative Nil:+-}+-- cata+sem_Children :: Children ->+ T_Children+sem_Children list =+ (Prelude.foldr sem_Children_Cons sem_Children_Nil (Prelude.map sem_Child list))+-- semantic domain+newtype T_Children = T_Children ((Maybe String) ->+ (Map Identifier Attributes) ->+ ([String]) ->+ ([String]) ->+ Bool ->+ PP_Doc ->+ PP_Doc ->+ (Map Identifier Attributes) ->+ ([String]) ->+ ( ([(Identifier,Type)]),([(Identifier,(PP_Doc,PP_Doc))]),([PP_Doc]),PP_Doc,([PP_Doc]),PP_Doc,Attributes))+data Inh_Children = Inh_Children {ext_Inh_Children :: (Maybe String),inhMap_Inh_Children :: (Map Identifier Attributes),inhNoGroup_Inh_Children :: ([String]),o_noGroup_Inh_Children :: ([String]),o_rename_Inh_Children :: Bool,ppNt_Inh_Children :: PP_Doc,ppProd_Inh_Children :: PP_Doc,synMap_Inh_Children :: (Map Identifier Attributes),synNoGroup_Inh_Children :: ([String])}+data Syn_Children = Syn_Children {idCL_Syn_Children :: ([(Identifier,Type)]),ppCSF_Syn_Children :: ([(Identifier,(PP_Doc,PP_Doc))]),ppDL_Syn_Children :: ([PP_Doc]),ppL_Syn_Children :: PP_Doc,ppLI_Syn_Children :: ([PP_Doc]),ppR_Syn_Children :: PP_Doc,prdInh_Syn_Children :: Attributes}+wrap_Children :: T_Children ->+ Inh_Children ->+ Syn_Children+wrap_Children (T_Children sem) (Inh_Children _lhsIext _lhsIinhMap _lhsIinhNoGroup _lhsIo_noGroup _lhsIo_rename _lhsIppNt _lhsIppProd _lhsIsynMap _lhsIsynNoGroup) =+ (let ( _lhsOidCL,_lhsOppCSF,_lhsOppDL,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOprdInh) = sem _lhsIext _lhsIinhMap _lhsIinhNoGroup _lhsIo_noGroup _lhsIo_rename _lhsIppNt _lhsIppProd _lhsIsynMap _lhsIsynNoGroup+ in (Syn_Children _lhsOidCL _lhsOppCSF _lhsOppDL _lhsOppL _lhsOppLI _lhsOppR _lhsOprdInh))+sem_Children_Cons :: T_Child ->+ T_Children ->+ T_Children+sem_Children_Cons (T_Child hd_) (T_Children tl_) =+ (T_Children (\ _lhsIext+ _lhsIinhMap+ _lhsIinhNoGroup+ _lhsIo_noGroup+ _lhsIo_rename+ _lhsIppNt+ _lhsIppProd+ _lhsIsynMap+ _lhsIsynNoGroup ->+ (let _lhsOppDL :: ([PP_Doc])+ _lhsOidCL :: ([(Identifier,Type)])+ _lhsOppCSF :: ([(Identifier,(PP_Doc,PP_Doc))])+ _lhsOppL :: PP_Doc+ _lhsOppLI :: ([PP_Doc])+ _lhsOppR :: PP_Doc+ _lhsOprdInh :: Attributes+ _hdOext :: (Maybe String)+ _hdOinhMap :: (Map Identifier Attributes)+ _hdOinhNoGroup :: ([String])+ _hdOo_noGroup :: ([String])+ _hdOo_rename :: Bool+ _hdOppNt :: PP_Doc+ _hdOppProd :: PP_Doc+ _hdOsynMap :: (Map Identifier Attributes)+ _hdOsynNoGroup :: ([String])+ _tlOext :: (Maybe String)+ _tlOinhMap :: (Map Identifier Attributes)+ _tlOinhNoGroup :: ([String])+ _tlOo_noGroup :: ([String])+ _tlOo_rename :: Bool+ _tlOppNt :: PP_Doc+ _tlOppProd :: PP_Doc+ _tlOsynMap :: (Map Identifier Attributes)+ _tlOsynNoGroup :: ([String])+ _hdIidCL :: ([(Identifier,Type)])+ _hdIppCSF :: ([(Identifier,(PP_Doc,PP_Doc))])+ _hdIppDL :: ([PP_Doc])+ _hdIppL :: PP_Doc+ _hdIppLI :: ([PP_Doc])+ _hdIppR :: PP_Doc+ _hdIprdInh :: Attributes+ _tlIidCL :: ([(Identifier,Type)])+ _tlIppCSF :: ([(Identifier,(PP_Doc,PP_Doc))])+ _tlIppDL :: ([PP_Doc])+ _tlIppL :: PP_Doc+ _tlIppLI :: ([PP_Doc])+ _tlIppR :: PP_Doc+ _tlIprdInh :: Attributes+ -- "src-ag/AG2AspectAG.ag"(line 237, column 33)+ _lhsOppDL =+ ({-# LINE 237 "src-ag/AG2AspectAG.ag" #-}+ _hdIppDL ++ _tlIppDL+ {-# LINE 675 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 481, column 31)+ _lhsOidCL =+ ({-# LINE 481 "src-ag/AG2AspectAG.ag" #-}+ _hdIidCL ++ _tlIidCL+ {-# LINE 681 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 816, column 34)+ _lhsOppCSF =+ ({-# LINE 816 "src-ag/AG2AspectAG.ag" #-}+ _hdIppCSF ++ _tlIppCSF+ {-# LINE 687 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 258, column 79)+ _lhsOppL =+ ({-# LINE 258 "src-ag/AG2AspectAG.ag" #-}+ _hdIppL >-< _tlIppL+ {-# LINE 693 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 258, column 112)+ _lhsOppLI =+ ({-# LINE 258 "src-ag/AG2AspectAG.ag" #-}+ _hdIppLI ++ _tlIppLI+ {-# LINE 699 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 412, column 79)+ _lhsOppR =+ ({-# LINE 412 "src-ag/AG2AspectAG.ag" #-}+ _hdIppR >-< _tlIppR+ {-# LINE 705 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 64, column 57)+ _lhsOprdInh =+ ({-# LINE 64 "src-ag/AG2AspectAG.ag" #-}+ _hdIprdInh `Map.union` _tlIprdInh+ {-# LINE 711 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOext =+ ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}+ _lhsIext+ {-# LINE 717 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 723 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOinhNoGroup =+ ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}+ _lhsIinhNoGroup+ {-# LINE 729 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOo_noGroup =+ ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_noGroup+ {-# LINE 735 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 40 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_rename+ {-# LINE 741 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOppNt =+ ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}+ _lhsIppNt+ {-# LINE 747 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOppProd =+ ({-# LINE 191 "src-ag/AG2AspectAG.ag" #-}+ _lhsIppProd+ {-# LINE 753 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 759 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOsynNoGroup =+ ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}+ _lhsIsynNoGroup+ {-# LINE 765 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOext =+ ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}+ _lhsIext+ {-# LINE 771 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 777 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOinhNoGroup =+ ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}+ _lhsIinhNoGroup+ {-# LINE 783 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOo_noGroup =+ ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_noGroup+ {-# LINE 789 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 40 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_rename+ {-# LINE 795 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOppNt =+ ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}+ _lhsIppNt+ {-# LINE 801 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOppProd =+ ({-# LINE 191 "src-ag/AG2AspectAG.ag" #-}+ _lhsIppProd+ {-# LINE 807 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 813 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOsynNoGroup =+ ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}+ _lhsIsynNoGroup+ {-# LINE 819 "dist/build/AG2AspectAG" #-}+ )+ ( _hdIidCL,_hdIppCSF,_hdIppDL,_hdIppL,_hdIppLI,_hdIppR,_hdIprdInh) =+ hd_ _hdOext _hdOinhMap _hdOinhNoGroup _hdOo_noGroup _hdOo_rename _hdOppNt _hdOppProd _hdOsynMap _hdOsynNoGroup+ ( _tlIidCL,_tlIppCSF,_tlIppDL,_tlIppL,_tlIppLI,_tlIppR,_tlIprdInh) =+ tl_ _tlOext _tlOinhMap _tlOinhNoGroup _tlOo_noGroup _tlOo_rename _tlOppNt _tlOppProd _tlOsynMap _tlOsynNoGroup+ in ( _lhsOidCL,_lhsOppCSF,_lhsOppDL,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOprdInh))))+sem_Children_Nil :: T_Children+sem_Children_Nil =+ (T_Children (\ _lhsIext+ _lhsIinhMap+ _lhsIinhNoGroup+ _lhsIo_noGroup+ _lhsIo_rename+ _lhsIppNt+ _lhsIppProd+ _lhsIsynMap+ _lhsIsynNoGroup ->+ (let _lhsOppDL :: ([PP_Doc])+ _lhsOidCL :: ([(Identifier,Type)])+ _lhsOppCSF :: ([(Identifier,(PP_Doc,PP_Doc))])+ _lhsOppL :: PP_Doc+ _lhsOppLI :: ([PP_Doc])+ _lhsOppR :: PP_Doc+ _lhsOprdInh :: Attributes+ -- "src-ag/AG2AspectAG.ag"(line 238, column 33)+ _lhsOppDL =+ ({-# LINE 238 "src-ag/AG2AspectAG.ag" #-}+ []+ {-# LINE 848 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 481, column 31)+ _lhsOidCL =+ ({-# LINE 481 "src-ag/AG2AspectAG.ag" #-}+ []+ {-# LINE 854 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 816, column 34)+ _lhsOppCSF =+ ({-# LINE 816 "src-ag/AG2AspectAG.ag" #-}+ []+ {-# LINE 860 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 258, column 79)+ _lhsOppL =+ ({-# LINE 258 "src-ag/AG2AspectAG.ag" #-}+ empty+ {-# LINE 866 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 258, column 112)+ _lhsOppLI =+ ({-# LINE 258 "src-ag/AG2AspectAG.ag" #-}+ []+ {-# LINE 872 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 412, column 79)+ _lhsOppR =+ ({-# LINE 412 "src-ag/AG2AspectAG.ag" #-}+ empty+ {-# LINE 878 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 64, column 57)+ _lhsOprdInh =+ ({-# LINE 64 "src-ag/AG2AspectAG.ag" #-}+ Map.empty+ {-# LINE 884 "dist/build/AG2AspectAG" #-}+ )+ in ( _lhsOidCL,_lhsOppCSF,_lhsOppDL,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOprdInh))))+-- Expression --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ ppNt : PP_Doc+ ppProd : PP_Doc+ synthesized attribute:+ ppRE : [String] -> Identifier -> [(Identifier,Type)] -> [Identifier] -> PP_Doc+ alternatives:+ alternative Expression:+ child pos : {Pos}+ child tks : {[HsToken]}+-}+-- cata+sem_Expression :: Expression ->+ T_Expression+sem_Expression (Expression _pos _tks) =+ (sem_Expression_Expression _pos _tks)+-- semantic domain+newtype T_Expression = T_Expression (PP_Doc ->+ PP_Doc ->+ ( ([String] -> Identifier -> [(Identifier,Type)] -> [Identifier] -> PP_Doc)))+data Inh_Expression = Inh_Expression {ppNt_Inh_Expression :: PP_Doc,ppProd_Inh_Expression :: PP_Doc}+data Syn_Expression = Syn_Expression {ppRE_Syn_Expression :: ([String] -> Identifier -> [(Identifier,Type)] -> [Identifier] -> PP_Doc)}+wrap_Expression :: T_Expression ->+ Inh_Expression ->+ Syn_Expression+wrap_Expression (T_Expression sem) (Inh_Expression _lhsIppNt _lhsIppProd) =+ (let ( _lhsOppRE) = sem _lhsIppNt _lhsIppProd+ in (Syn_Expression _lhsOppRE))+sem_Expression_Expression :: Pos ->+ ([HsToken]) ->+ T_Expression+sem_Expression_Expression pos_ tks_ =+ (T_Expression (\ _lhsIppNt+ _lhsIppProd ->+ (let _lhsOppRE :: ([String] -> Identifier -> [(Identifier,Type)] -> [Identifier] -> PP_Doc)+ -- "src-ag/AG2AspectAG.ag"(line 478, column 25)+ _lhsOppRE =+ ({-# LINE 478 "src-ag/AG2AspectAG.ag" #-}+ rhsRule _lhsIppNt _lhsIppProd tks_+ {-# LINE 928 "dist/build/AG2AspectAG" #-}+ )+ in ( _lhsOppRE))))+-- Grammar -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ agi : (Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes))+ ext : Maybe String+ options : Options+ synthesized attributes:+ imp : PP_Doc+ pp : PP_Doc+ 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 quantMap : {QuantMap}+ child uniqueMap : {UniqueMap}+ child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}+ visit 0:+ local o_noGroup : _+ local newAtts : _+ local newProds : _+ local ppA : _+ local ppAI : _+ local ppNtL : _+ local ppR : _+-}+-- cata+sem_Grammar :: Grammar ->+ T_Grammar+sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap) =+ (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts) _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap)+-- semantic domain+newtype T_Grammar = T_Grammar (((Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes))) ->+ (Maybe String) ->+ Options ->+ ( PP_Doc,PP_Doc))+data Inh_Grammar = Inh_Grammar {agi_Inh_Grammar :: ((Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes))),ext_Inh_Grammar :: (Maybe String),options_Inh_Grammar :: Options}+data Syn_Grammar = Syn_Grammar {imp_Syn_Grammar :: PP_Doc,pp_Syn_Grammar :: PP_Doc}+wrap_Grammar :: T_Grammar ->+ Inh_Grammar ->+ Syn_Grammar+wrap_Grammar (T_Grammar sem) (Inh_Grammar _lhsIagi _lhsIext _lhsIoptions) =+ (let ( _lhsOimp,_lhsOpp) = sem _lhsIagi _lhsIext _lhsIoptions+ in (Syn_Grammar _lhsOimp _lhsOpp))+sem_Grammar_Grammar :: TypeSyns ->+ UseMap ->+ Derivings ->+ (Set NontermIdent) ->+ T_Nonterminals ->+ PragmaMap ->+ AttrOrderMap ->+ ParamMap ->+ ContextMap ->+ QuantMap ->+ UniqueMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->+ T_Grammar+sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_ =+ (T_Grammar (\ _lhsIagi+ _lhsIext+ _lhsIoptions ->+ (let _nontsOo_rename :: Bool+ _nontsOo_noGroup :: ([String])+ _nontsOnewAtts :: ( Attributes )+ _nontsOnewProds :: ( DataTypes )+ _nontsOnewNTs :: (Set NontermIdent)+ _lhsOimp :: PP_Doc+ _lhsOpp :: PP_Doc+ _nontsOderivs :: Derivings+ _nontsOtSyns :: TypeSyns+ _nontsOinhMap :: (Map Identifier Attributes)+ _nontsOsynMap :: (Map Identifier Attributes)+ _nontsOext :: (Maybe String)+ _nontsIextendedNTs :: (Set NontermIdent)+ _nontsIinhMap' :: (Map Identifier Attributes)+ _nontsIppA :: PP_Doc+ _nontsIppAI :: ([PP_Doc])+ _nontsIppCata :: PP_Doc+ _nontsIppD :: PP_Doc+ _nontsIppDI :: ([PP_Doc])+ _nontsIppL :: PP_Doc+ _nontsIppLI :: ([PP_Doc])+ _nontsIppNtL :: ([(PP_Doc, Attributes)])+ _nontsIppR :: PP_Doc+ _nontsIppSF :: PP_Doc+ _nontsIppW :: PP_Doc+ _nontsIsynMap' :: (Map Identifier Attributes)+ -- "src-ag/AG2AspectAG.ag"(line 42, column 14)+ _nontsOo_rename =+ ({-# LINE 42 "src-ag/AG2AspectAG.ag" #-}+ rename _lhsIoptions+ {-# LINE 1033 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 46, column 14)+ _o_noGroup =+ ({-# LINE 46 "src-ag/AG2AspectAG.ag" #-}+ sort $ noGroup _lhsIoptions+ {-# LINE 1039 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 47, column 14)+ _nontsOo_noGroup =+ ({-# LINE 47 "src-ag/AG2AspectAG.ag" #-}+ _o_noGroup+ {-# LINE 1045 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 79, column 23)+ _newAtts =+ ({-# LINE 79 "src-ag/AG2AspectAG.ag" #-}+ case _lhsIagi of+ (_,_,atts) -> ( Map.unions . (\(a,b) -> a++b) . unzip . Map.elems) atts+ {-# LINE 1052 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 81, column 23)+ _nontsOnewAtts =+ ({-# LINE 81 "src-ag/AG2AspectAG.ag" #-}+ _newAtts+ {-# LINE 1058 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 87, column 23)+ _newProds =+ ({-# LINE 87 "src-ag/AG2AspectAG.ag" #-}+ case _lhsIagi of+ (_,prods,_) -> prods+ {-# LINE 1065 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 89, column 23)+ _nontsOnewProds =+ ({-# LINE 89 "src-ag/AG2AspectAG.ag" #-}+ _newProds+ {-# LINE 1071 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 111, column 23)+ _nontsOnewNTs =+ ({-# LINE 111 "src-ag/AG2AspectAG.ag" #-}+ case _lhsIagi of+ (newNTs,_,_) -> Set.difference newNTs _nontsIextendedNTs+ {-# LINE 1078 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 126, column 25)+ _lhsOimp =+ ({-# LINE 126 "src-ag/AG2AspectAG.ag" #-}+ "import Language.Grammars.AspectAG" >-<+ "import Language.Grammars.AspectAG.Derive" >-<+ "import Data.HList.Label4" >-<+ "import Data.HList.TypeEqGeneric1" >-<+ "import Data.HList.TypeCastGeneric1" >-<+ maybe empty ("import qualified" >#<) _lhsIext >-<+ maybe empty (\ext -> "import" >#< ext >#< ppListSep "(" ")" "," (_nontsIppDI ++ _nontsIppLI ++ _ppAI )) _lhsIext+ {-# LINE 1090 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 139, column 25)+ _lhsOpp =+ ({-# LINE 139 "src-ag/AG2AspectAG.ag" #-}+ (if dataTypes _lhsIoptions+ then "-- datatypes" >-< _nontsIppD >-<+ "-- labels" >-< _nontsIppL+ else empty)+ >-<+ (if folds _lhsIoptions+ then "-- attributes" >-< _ppA >-<+ "-- rules" >-< _ppR >-<+ "-- catas" >-< _nontsIppCata+ else empty)+ >-<+ (if semfuns _lhsIoptions+ then "-- semantic functions" >-< _nontsIppSF+ else empty)+ >-<+ (if wrappers _lhsIoptions+ then "-- wrappers" >-< _nontsIppW+ else empty)+ {-# LINE 1113 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 201, column 25)+ _nontsOderivs =+ ({-# LINE 201 "src-ag/AG2AspectAG.ag" #-}+ derivings_+ {-# LINE 1119 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 250, column 34)+ _nontsOtSyns =+ ({-# LINE 250 "src-ag/AG2AspectAG.ag" #-}+ typeSyns_+ {-# LINE 1125 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 299, column 25)+ _ppA =+ ({-# LINE 299 "src-ag/AG2AspectAG.ag" #-}+ vlist (map defAtt (filterAtts _newAtts _o_noGroup )) >-<+ defAtt "loc" >-<+ (case _lhsIext of+ Nothing -> defAtt "inh" >-< defAtt "syn"+ otherwise -> empty) >-<+ _nontsIppA+ {-# LINE 1136 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 306, column 25)+ _ppAI =+ ({-# LINE 306 "src-ag/AG2AspectAG.ag" #-}+ let atts = filterNotAtts _newAtts _o_noGroup+ in (foldr (\a as -> attName a : as) [] atts) +++ (foldr (\a as -> attTName a : as) [] atts) +++ (case _lhsIext of+ Nothing -> []+ otherwise -> [ attName "inh", attName "syn", attTName "inh", attTName "syn" ]) +++ _nontsIppAI+ {-# LINE 1148 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 386, column 25)+ _ppNtL =+ ({-# LINE 386 "src-ag/AG2AspectAG.ag" #-}+ _nontsIppNtL+ {-# LINE 1154 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 387, column 25)+ _ppR =+ ({-# LINE 387 "src-ag/AG2AspectAG.ag" #-}+ ntsList "group" _ppNtL >-<+ vlist (map (\att -> ntsList att (filterNts att _ppNtL )) (filterAtts _newAtts _o_noGroup )) >-<+ _nontsIppR+ {-# LINE 1162 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 15, column 13)+ _nontsOinhMap =+ ({-# LINE 15 "src-ag/DistChildAttr.ag" #-}+ _nontsIinhMap'+ {-# LINE 1168 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 16, column 13)+ _nontsOsynMap =+ ({-# LINE 16 "src-ag/DistChildAttr.ag" #-}+ _nontsIsynMap'+ {-# LINE 1174 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _nontsOext =+ ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}+ _lhsIext+ {-# LINE 1180 "dist/build/AG2AspectAG" #-}+ )+ ( _nontsIextendedNTs,_nontsIinhMap',_nontsIppA,_nontsIppAI,_nontsIppCata,_nontsIppD,_nontsIppDI,_nontsIppL,_nontsIppLI,_nontsIppNtL,_nontsIppR,_nontsIppSF,_nontsIppW,_nontsIsynMap') =+ nonts_ _nontsOderivs _nontsOext _nontsOinhMap _nontsOnewAtts _nontsOnewNTs _nontsOnewProds _nontsOo_noGroup _nontsOo_rename _nontsOsynMap _nontsOtSyns+ in ( _lhsOimp,_lhsOpp))))+-- HsToken -----------------------------------------------------+{-+ alternatives:+ alternative AGField:+ child field : {Identifier}+ child attr : {Identifier}+ child pos : {Pos}+ child rdesc : {Maybe String}+ alternative AGLocal:+ child var : {Identifier}+ child pos : {Pos}+ child rdesc : {Maybe String}+ alternative CharToken:+ child value : {String}+ child pos : {Pos}+ alternative Err:+ child mesg : {String}+ child pos : {Pos}+ alternative HsToken:+ child value : {String}+ child pos : {Pos}+ alternative StrToken:+ child value : {String}+ child pos : {Pos}+-}+-- 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 (( ))+data Inh_HsToken = Inh_HsToken {}+data Syn_HsToken = Syn_HsToken {}+wrap_HsToken :: T_HsToken ->+ Inh_HsToken ->+ Syn_HsToken+wrap_HsToken (T_HsToken sem) (Inh_HsToken) =+ (let ( ) = sem+ in (Syn_HsToken))+sem_HsToken_AGField :: Identifier ->+ Identifier ->+ Pos ->+ (Maybe String) ->+ T_HsToken+sem_HsToken_AGField field_ attr_ pos_ rdesc_ =+ (T_HsToken (let+ in ( )))+sem_HsToken_AGLocal :: Identifier ->+ Pos ->+ (Maybe String) ->+ T_HsToken+sem_HsToken_AGLocal var_ pos_ rdesc_ =+ (T_HsToken (let+ in ( )))+sem_HsToken_CharToken :: String ->+ Pos ->+ T_HsToken+sem_HsToken_CharToken value_ pos_ =+ (T_HsToken (let+ in ( )))+sem_HsToken_Err :: String ->+ Pos ->+ T_HsToken+sem_HsToken_Err mesg_ pos_ =+ (T_HsToken (let+ in ( )))+sem_HsToken_HsToken :: String ->+ Pos ->+ T_HsToken+sem_HsToken_HsToken value_ pos_ =+ (T_HsToken (let+ in ( )))+sem_HsToken_StrToken :: String ->+ Pos ->+ T_HsToken+sem_HsToken_StrToken value_ pos_ =+ (T_HsToken (let+ in ( )))+-- HsTokens ----------------------------------------------------+{-+ alternatives:+ alternative Cons:+ child hd : HsToken + child tl : HsTokens + alternative Nil:+-}+-- 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 (( ))+data Inh_HsTokens = Inh_HsTokens {}+data Syn_HsTokens = Syn_HsTokens {}+wrap_HsTokens :: T_HsTokens ->+ Inh_HsTokens ->+ Syn_HsTokens+wrap_HsTokens (T_HsTokens sem) (Inh_HsTokens) =+ (let ( ) = sem+ in (Syn_HsTokens))+sem_HsTokens_Cons :: T_HsToken ->+ T_HsTokens ->+ T_HsTokens+sem_HsTokens_Cons (T_HsToken hd_) (T_HsTokens tl_) =+ (T_HsTokens (let+ in ( )))+sem_HsTokens_Nil :: T_HsTokens+sem_HsTokens_Nil =+ (T_HsTokens (let+ in ( )))+-- HsTokensRoot ------------------------------------------------+{-+ 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 (( ))+data Inh_HsTokensRoot = Inh_HsTokensRoot {}+data Syn_HsTokensRoot = Syn_HsTokensRoot {}+wrap_HsTokensRoot :: T_HsTokensRoot ->+ Inh_HsTokensRoot ->+ Syn_HsTokensRoot+wrap_HsTokensRoot (T_HsTokensRoot sem) (Inh_HsTokensRoot) =+ (let ( ) = sem+ in (Syn_HsTokensRoot))+sem_HsTokensRoot_HsTokensRoot :: T_HsTokens ->+ T_HsTokensRoot+sem_HsTokensRoot_HsTokensRoot (T_HsTokens tokens_) =+ (T_HsTokensRoot (let+ in ( )))+-- Nonterminal -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ derivs : Derivings+ ext : Maybe String+ inhMap : Map Identifier Attributes+ newAtts : Attributes + newNTs : Set NontermIdent+ newProds : DataTypes + o_noGroup : [String]+ o_rename : Bool+ synMap : Map Identifier Attributes+ tSyns : TypeSyns+ synthesized attributes:+ extendedNTs : Set NontermIdent+ inhMap' : Map Identifier Attributes+ ppA : PP_Doc+ ppAI : [PP_Doc]+ ppCata : PP_Doc+ ppD : PP_Doc+ ppDI : [PP_Doc]+ ppL : PP_Doc+ ppLI : [PP_Doc]+ ppNtL : [(PP_Doc, Attributes)]+ ppR : PP_Doc+ ppSF : PP_Doc+ ppW : PP_Doc+ synMap' : Map Identifier Attributes+ alternatives:+ alternative Nonterminal:+ child nt : {NontermIdent}+ child params : {[Identifier]}+ child inh : {Attributes}+ child syn : {Attributes}+ child prods : Productions + visit 0:+ local inhNoGroup : _+ local synNoGroup : _+ local ppNt : _+ local ntLabel : _+-}+-- 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 (Derivings ->+ (Maybe String) ->+ (Map Identifier Attributes) ->+ ( Attributes ) ->+ (Set NontermIdent) ->+ ( DataTypes ) ->+ ([String]) ->+ Bool ->+ (Map Identifier Attributes) ->+ TypeSyns ->+ ( (Set NontermIdent),(Map Identifier Attributes),PP_Doc,([PP_Doc]),PP_Doc,PP_Doc,([PP_Doc]),PP_Doc,([PP_Doc]),([(PP_Doc, Attributes)]),PP_Doc,PP_Doc,PP_Doc,(Map Identifier Attributes)))+data Inh_Nonterminal = Inh_Nonterminal {derivs_Inh_Nonterminal :: Derivings,ext_Inh_Nonterminal :: (Maybe String),inhMap_Inh_Nonterminal :: (Map Identifier Attributes),newAtts_Inh_Nonterminal :: ( Attributes ),newNTs_Inh_Nonterminal :: (Set NontermIdent),newProds_Inh_Nonterminal :: ( DataTypes ),o_noGroup_Inh_Nonterminal :: ([String]),o_rename_Inh_Nonterminal :: Bool,synMap_Inh_Nonterminal :: (Map Identifier Attributes),tSyns_Inh_Nonterminal :: TypeSyns}+data Syn_Nonterminal = Syn_Nonterminal {extendedNTs_Syn_Nonterminal :: (Set NontermIdent),inhMap'_Syn_Nonterminal :: (Map Identifier Attributes),ppA_Syn_Nonterminal :: PP_Doc,ppAI_Syn_Nonterminal :: ([PP_Doc]),ppCata_Syn_Nonterminal :: PP_Doc,ppD_Syn_Nonterminal :: PP_Doc,ppDI_Syn_Nonterminal :: ([PP_Doc]),ppL_Syn_Nonterminal :: PP_Doc,ppLI_Syn_Nonterminal :: ([PP_Doc]),ppNtL_Syn_Nonterminal :: ([(PP_Doc, Attributes)]),ppR_Syn_Nonterminal :: PP_Doc,ppSF_Syn_Nonterminal :: PP_Doc,ppW_Syn_Nonterminal :: PP_Doc,synMap'_Syn_Nonterminal :: (Map Identifier Attributes)}+wrap_Nonterminal :: T_Nonterminal ->+ Inh_Nonterminal ->+ Syn_Nonterminal+wrap_Nonterminal (T_Nonterminal sem) (Inh_Nonterminal _lhsIderivs _lhsIext _lhsIinhMap _lhsInewAtts _lhsInewNTs _lhsInewProds _lhsIo_noGroup _lhsIo_rename _lhsIsynMap _lhsItSyns) =+ (let ( _lhsOextendedNTs,_lhsOinhMap',_lhsOppA,_lhsOppAI,_lhsOppCata,_lhsOppD,_lhsOppDI,_lhsOppL,_lhsOppLI,_lhsOppNtL,_lhsOppR,_lhsOppSF,_lhsOppW,_lhsOsynMap') = sem _lhsIderivs _lhsIext _lhsIinhMap _lhsInewAtts _lhsInewNTs _lhsInewProds _lhsIo_noGroup _lhsIo_rename _lhsIsynMap _lhsItSyns+ in (Syn_Nonterminal _lhsOextendedNTs _lhsOinhMap' _lhsOppA _lhsOppAI _lhsOppCata _lhsOppD _lhsOppDI _lhsOppL _lhsOppLI _lhsOppNtL _lhsOppR _lhsOppSF _lhsOppW _lhsOsynMap'))+sem_Nonterminal_Nonterminal :: NontermIdent ->+ ([Identifier]) ->+ Attributes ->+ Attributes ->+ T_Productions ->+ T_Nonterminal+sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ (T_Productions prods_) =+ (T_Nonterminal (\ _lhsIderivs+ _lhsIext+ _lhsIinhMap+ _lhsInewAtts+ _lhsInewNTs+ _lhsInewProds+ _lhsIo_noGroup+ _lhsIo_rename+ _lhsIsynMap+ _lhsItSyns ->+ (let _prodsOinhNoGroup :: ([String])+ _prodsOsynNoGroup :: ([String])+ _prodsOnewProds :: ( Map.Map ConstructorIdent FieldMap )+ _lhsOextendedNTs :: (Set NontermIdent)+ _prodsOppNt :: PP_Doc+ _lhsOppD :: PP_Doc+ _lhsOppDI :: ([PP_Doc])+ _lhsOppL :: PP_Doc+ _lhsOppLI :: ([PP_Doc])+ _lhsOppA :: PP_Doc+ _lhsOppAI :: ([PP_Doc])+ _lhsOppNtL :: ([(PP_Doc, Attributes)])+ _prodsOnewNT :: Bool+ _lhsOppR :: PP_Doc+ _lhsOppCata :: PP_Doc+ _prodsOsyn :: ( Attributes )+ _prodsOinh :: ( Attributes )+ _lhsOppSF :: PP_Doc+ _lhsOppW :: PP_Doc+ _lhsOinhMap' :: (Map Identifier Attributes)+ _lhsOsynMap' :: (Map Identifier Attributes)+ _prodsOext :: (Maybe String)+ _prodsOinhMap :: (Map Identifier Attributes)+ _prodsOnewAtts :: ( Attributes )+ _prodsOo_noGroup :: ([String])+ _prodsOo_rename :: Bool+ _prodsOsynMap :: (Map Identifier Attributes)+ _prodsIhasMoreProds :: ( Bool )+ _prodsIppA :: PP_Doc+ _prodsIppCata :: PP_Doc+ _prodsIppDL :: ([PP_Doc])+ _prodsIppL :: PP_Doc+ _prodsIppLI :: ([PP_Doc])+ _prodsIppR :: PP_Doc+ _prodsIppRA :: ([PP_Doc])+ _prodsIppSF :: PP_Doc+ _prodsIppSPF :: PP_Doc+ _prodsIprdInh :: Attributes+ -- "src-ag/AG2AspectAG.ag"(line 50, column 18)+ _inhNoGroup =+ ({-# LINE 50 "src-ag/AG2AspectAG.ag" #-}+ Map.filterWithKey (\att _ -> elem (getName att) _lhsIo_noGroup) _prodsIprdInh+ {-# LINE 1459 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 51, column 18)+ _synNoGroup =+ ({-# LINE 51 "src-ag/AG2AspectAG.ag" #-}+ Map.filterWithKey (\att _ -> elem (getName att) _lhsIo_noGroup) syn_+ {-# LINE 1465 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 56, column 18)+ _prodsOinhNoGroup =+ ({-# LINE 56 "src-ag/AG2AspectAG.ag" #-}+ map show $ Map.keys _inhNoGroup+ {-# LINE 1471 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 57, column 18)+ _prodsOsynNoGroup =+ ({-# LINE 57 "src-ag/AG2AspectAG.ag" #-}+ map show $ Map.keys _synNoGroup+ {-# LINE 1477 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 93, column 17)+ _prodsOnewProds =+ ({-# LINE 93 "src-ag/AG2AspectAG.ag" #-}+ case Map.lookup nt_ _lhsInewProds of+ Just prds -> prds+ Nothing -> Map.empty+ {-# LINE 1485 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 106, column 31)+ _lhsOextendedNTs =+ ({-# LINE 106 "src-ag/AG2AspectAG.ag" #-}+ if _prodsIhasMoreProds+ then Set.singleton nt_+ else Set.empty+ {-# LINE 1493 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 172, column 25)+ _ppNt =+ ({-# LINE 172 "src-ag/AG2AspectAG.ag" #-}+ pp nt_+ {-# LINE 1499 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 189, column 25)+ _prodsOppNt =+ ({-# LINE 189 "src-ag/AG2AspectAG.ag" #-}+ _ppNt+ {-# LINE 1505 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 207, column 25)+ _lhsOppD =+ ({-# LINE 207 "src-ag/AG2AspectAG.ag" #-}+ if (Set.member nt_ _lhsInewNTs)+ then case (lookup nt_ _lhsItSyns) of+ Nothing -> "data " >|< _ppNt+ >|< " = " >|< vlist_sep " | " _prodsIppDL >-<+ case (Map.lookup nt_ _lhsIderivs) of+ Just ntds -> pp " deriving " >|< (ppListSep "(" ")" ", " $ Set.elems ntds)+ Nothing -> empty+ Just tp -> "type " >|< _ppNt >|< " = " >|< ppShow tp+ else empty+ {-# LINE 1519 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 220, column 25)+ _lhsOppDI =+ ({-# LINE 220 "src-ag/AG2AspectAG.ag" #-}+ if (not $ Set.member nt_ _lhsInewNTs)+ then [ _ppNt ]+ else [ ]+ {-# LINE 1527 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 261, column 25)+ _ntLabel =+ ({-# LINE 261 "src-ag/AG2AspectAG.ag" #-}+ "nt_" >|< _ppNt+ {-# LINE 1533 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 263, column 25)+ _lhsOppL =+ ({-# LINE 263 "src-ag/AG2AspectAG.ag" #-}+ ( if (Set.member nt_ _lhsInewNTs)+ then _ntLabel >|< " = proxy :: Proxy " >|< _ppNt+ else empty) >-<+ _prodsIppL+ {-# LINE 1542 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 268, column 25)+ _lhsOppLI =+ ({-# LINE 268 "src-ag/AG2AspectAG.ag" #-}+ ( if (not $ Set.member nt_ _lhsInewNTs)+ then [ _ntLabel ]+ else [ ]) +++ _prodsIppLI+ {-# LINE 1551 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 319, column 25)+ _lhsOppA =+ ({-# LINE 319 "src-ag/AG2AspectAG.ag" #-}+ ( if (Set.member nt_ _lhsInewNTs)+ then defAttRec (pp "InhG") _ppNt inh_ _inhNoGroup >-<+ defAttRec (pp "SynG") _ppNt syn_ _synNoGroup+ else empty) >-<+ _prodsIppA+ {-# LINE 1561 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 332, column 25)+ _lhsOppAI =+ ({-# LINE 332 "src-ag/AG2AspectAG.ag" #-}+ if (not $ Set.member nt_ _lhsInewNTs)+ then [ ppName [(pp "InhG"), _ppNt ] >#< pp "(..)", ppName [(pp "SynG"), _ppNt ] >#< pp "(..)" ]+ else [ ]+ {-# LINE 1569 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 400, column 25)+ _lhsOppNtL =+ ({-# LINE 400 "src-ag/AG2AspectAG.ag" #-}+ [ ("nt_" >|< nt_, Map.union inh_ syn_) ]+ {-# LINE 1575 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 409, column 25)+ _prodsOnewNT =+ ({-# LINE 409 "src-ag/AG2AspectAG.ag" #-}+ Set.member nt_ _lhsInewNTs+ {-# LINE 1581 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 419, column 25)+ _lhsOppR =+ ({-# LINE 419 "src-ag/AG2AspectAG.ag" #-}+ pp "----" >|< pp nt_ >-< _prodsIppR+ {-# LINE 1587 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 729, column 25)+ _lhsOppCata =+ ({-# LINE 729 "src-ag/AG2AspectAG.ag" #-}+ "----" >|< _ppNt >-< _prodsIppCata+ {-# LINE 1593 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 760, column 25)+ _prodsOsyn =+ ({-# LINE 760 "src-ag/AG2AspectAG.ag" #-}+ syn_+ {-# LINE 1599 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 761, column 25)+ _prodsOinh =+ ({-# LINE 761 "src-ag/AG2AspectAG.ag" #-}+ inh_+ {-# LINE 1605 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 772, column 25)+ _lhsOppSF =+ ({-# LINE 772 "src-ag/AG2AspectAG.ag" #-}+ let inhAtts = attTypes _inhNoGroup+ synAtts = attTypes _synNoGroup+ in+ "----" >|< _ppNt >-<+ "type T_" >|< _ppNt >|< " = " >|<+ "(Record " >|<+ inhAtts >|<+ "(HCons (LVPair (Proxy Att_inh) InhG_" >|< _ppNt >|< ") HNil))" >|<+ replicate (length inhAtts) ")" >|< " -> " >|<+ "(Record " >|<+ synAtts >|<+ "(HCons (LVPair (Proxy Att_syn) SynG_" >|< _ppNt >|< ") HNil))" >|<+ replicate (length synAtts) ")" >-<+ "instance SemType T_" >|< _ppNt >|< " " >|< _ppNt >-<+ "-- sem_" >|< _ppNt >|< " :: " >|< _ppNt >|< " -> T_" >|< _ppNt >-<+ _prodsIppSPF+ {-# LINE 1626 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 840, column 25)+ _lhsOppW =+ ({-# LINE 840 "src-ag/AG2AspectAG.ag" #-}+ ppName [pp "wrap", _ppNt ] >|< " sem " >|< attVars inh_ >|< " = " >-<+ " sem " >|< attFields inh_ _inhNoGroup _ppNt+ {-# LINE 1633 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 7, column 18)+ _lhsOinhMap' =+ ({-# LINE 7 "src-ag/DistChildAttr.ag" #-}+ Map.singleton nt_ inh_+ {-# LINE 1639 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 8, column 18)+ _lhsOsynMap' =+ ({-# LINE 8 "src-ag/DistChildAttr.ag" #-}+ Map.singleton nt_ syn_+ {-# LINE 1645 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _prodsOext =+ ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}+ _lhsIext+ {-# LINE 1651 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _prodsOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 1657 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _prodsOnewAtts =+ ({-# LINE 77 "src-ag/AG2AspectAG.ag" #-}+ _lhsInewAtts+ {-# LINE 1663 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _prodsOo_noGroup =+ ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_noGroup+ {-# LINE 1669 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _prodsOo_rename =+ ({-# LINE 40 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_rename+ {-# LINE 1675 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _prodsOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 1681 "dist/build/AG2AspectAG" #-}+ )+ ( _prodsIhasMoreProds,_prodsIppA,_prodsIppCata,_prodsIppDL,_prodsIppL,_prodsIppLI,_prodsIppR,_prodsIppRA,_prodsIppSF,_prodsIppSPF,_prodsIprdInh) =+ prods_ _prodsOext _prodsOinh _prodsOinhMap _prodsOinhNoGroup _prodsOnewAtts _prodsOnewNT _prodsOnewProds _prodsOo_noGroup _prodsOo_rename _prodsOppNt _prodsOsyn _prodsOsynMap _prodsOsynNoGroup+ in ( _lhsOextendedNTs,_lhsOinhMap',_lhsOppA,_lhsOppAI,_lhsOppCata,_lhsOppD,_lhsOppDI,_lhsOppL,_lhsOppLI,_lhsOppNtL,_lhsOppR,_lhsOppSF,_lhsOppW,_lhsOsynMap'))))+-- Nonterminals ------------------------------------------------+{-+ visit 0:+ inherited attributes:+ derivs : Derivings+ ext : Maybe String+ inhMap : Map Identifier Attributes+ newAtts : Attributes + newNTs : Set NontermIdent+ newProds : DataTypes + o_noGroup : [String]+ o_rename : Bool+ synMap : Map Identifier Attributes+ tSyns : TypeSyns+ synthesized attributes:+ extendedNTs : Set NontermIdent+ inhMap' : Map Identifier Attributes+ ppA : PP_Doc+ ppAI : [PP_Doc]+ ppCata : PP_Doc+ ppD : PP_Doc+ ppDI : [PP_Doc]+ ppL : PP_Doc+ ppLI : [PP_Doc]+ ppNtL : [(PP_Doc, Attributes)]+ ppR : PP_Doc+ ppSF : PP_Doc+ ppW : PP_Doc+ synMap' : Map Identifier Attributes+ alternatives:+ alternative Cons:+ child hd : Nonterminal + child tl : Nonterminals + alternative Nil:+-}+-- cata+sem_Nonterminals :: Nonterminals ->+ T_Nonterminals+sem_Nonterminals list =+ (Prelude.foldr sem_Nonterminals_Cons sem_Nonterminals_Nil (Prelude.map sem_Nonterminal list))+-- semantic domain+newtype T_Nonterminals = T_Nonterminals (Derivings ->+ (Maybe String) ->+ (Map Identifier Attributes) ->+ ( Attributes ) ->+ (Set NontermIdent) ->+ ( DataTypes ) ->+ ([String]) ->+ Bool ->+ (Map Identifier Attributes) ->+ TypeSyns ->+ ( (Set NontermIdent),(Map Identifier Attributes),PP_Doc,([PP_Doc]),PP_Doc,PP_Doc,([PP_Doc]),PP_Doc,([PP_Doc]),([(PP_Doc, Attributes)]),PP_Doc,PP_Doc,PP_Doc,(Map Identifier Attributes)))+data Inh_Nonterminals = Inh_Nonterminals {derivs_Inh_Nonterminals :: Derivings,ext_Inh_Nonterminals :: (Maybe String),inhMap_Inh_Nonterminals :: (Map Identifier Attributes),newAtts_Inh_Nonterminals :: ( Attributes ),newNTs_Inh_Nonterminals :: (Set NontermIdent),newProds_Inh_Nonterminals :: ( DataTypes ),o_noGroup_Inh_Nonterminals :: ([String]),o_rename_Inh_Nonterminals :: Bool,synMap_Inh_Nonterminals :: (Map Identifier Attributes),tSyns_Inh_Nonterminals :: TypeSyns}+data Syn_Nonterminals = Syn_Nonterminals {extendedNTs_Syn_Nonterminals :: (Set NontermIdent),inhMap'_Syn_Nonterminals :: (Map Identifier Attributes),ppA_Syn_Nonterminals :: PP_Doc,ppAI_Syn_Nonterminals :: ([PP_Doc]),ppCata_Syn_Nonterminals :: PP_Doc,ppD_Syn_Nonterminals :: PP_Doc,ppDI_Syn_Nonterminals :: ([PP_Doc]),ppL_Syn_Nonterminals :: PP_Doc,ppLI_Syn_Nonterminals :: ([PP_Doc]),ppNtL_Syn_Nonterminals :: ([(PP_Doc, Attributes)]),ppR_Syn_Nonterminals :: PP_Doc,ppSF_Syn_Nonterminals :: PP_Doc,ppW_Syn_Nonterminals :: PP_Doc,synMap'_Syn_Nonterminals :: (Map Identifier Attributes)}+wrap_Nonterminals :: T_Nonterminals ->+ Inh_Nonterminals ->+ Syn_Nonterminals+wrap_Nonterminals (T_Nonterminals sem) (Inh_Nonterminals _lhsIderivs _lhsIext _lhsIinhMap _lhsInewAtts _lhsInewNTs _lhsInewProds _lhsIo_noGroup _lhsIo_rename _lhsIsynMap _lhsItSyns) =+ (let ( _lhsOextendedNTs,_lhsOinhMap',_lhsOppA,_lhsOppAI,_lhsOppCata,_lhsOppD,_lhsOppDI,_lhsOppL,_lhsOppLI,_lhsOppNtL,_lhsOppR,_lhsOppSF,_lhsOppW,_lhsOsynMap') = sem _lhsIderivs _lhsIext _lhsIinhMap _lhsInewAtts _lhsInewNTs _lhsInewProds _lhsIo_noGroup _lhsIo_rename _lhsIsynMap _lhsItSyns+ in (Syn_Nonterminals _lhsOextendedNTs _lhsOinhMap' _lhsOppA _lhsOppAI _lhsOppCata _lhsOppD _lhsOppDI _lhsOppL _lhsOppLI _lhsOppNtL _lhsOppR _lhsOppSF _lhsOppW _lhsOsynMap'))+sem_Nonterminals_Cons :: T_Nonterminal ->+ T_Nonterminals ->+ T_Nonterminals+sem_Nonterminals_Cons (T_Nonterminal hd_) (T_Nonterminals tl_) =+ (T_Nonterminals (\ _lhsIderivs+ _lhsIext+ _lhsIinhMap+ _lhsInewAtts+ _lhsInewNTs+ _lhsInewProds+ _lhsIo_noGroup+ _lhsIo_rename+ _lhsIsynMap+ _lhsItSyns ->+ (let _lhsOextendedNTs :: (Set NontermIdent)+ _lhsOinhMap' :: (Map Identifier Attributes)+ _lhsOppA :: PP_Doc+ _lhsOppAI :: ([PP_Doc])+ _lhsOppCata :: PP_Doc+ _lhsOppD :: PP_Doc+ _lhsOppDI :: ([PP_Doc])+ _lhsOppL :: PP_Doc+ _lhsOppLI :: ([PP_Doc])+ _lhsOppNtL :: ([(PP_Doc, Attributes)])+ _lhsOppR :: PP_Doc+ _lhsOppSF :: PP_Doc+ _lhsOppW :: PP_Doc+ _lhsOsynMap' :: (Map Identifier Attributes)+ _hdOderivs :: Derivings+ _hdOext :: (Maybe String)+ _hdOinhMap :: (Map Identifier Attributes)+ _hdOnewAtts :: ( Attributes )+ _hdOnewNTs :: (Set NontermIdent)+ _hdOnewProds :: ( DataTypes )+ _hdOo_noGroup :: ([String])+ _hdOo_rename :: Bool+ _hdOsynMap :: (Map Identifier Attributes)+ _hdOtSyns :: TypeSyns+ _tlOderivs :: Derivings+ _tlOext :: (Maybe String)+ _tlOinhMap :: (Map Identifier Attributes)+ _tlOnewAtts :: ( Attributes )+ _tlOnewNTs :: (Set NontermIdent)+ _tlOnewProds :: ( DataTypes )+ _tlOo_noGroup :: ([String])+ _tlOo_rename :: Bool+ _tlOsynMap :: (Map Identifier Attributes)+ _tlOtSyns :: TypeSyns+ _hdIextendedNTs :: (Set NontermIdent)+ _hdIinhMap' :: (Map Identifier Attributes)+ _hdIppA :: PP_Doc+ _hdIppAI :: ([PP_Doc])+ _hdIppCata :: PP_Doc+ _hdIppD :: PP_Doc+ _hdIppDI :: ([PP_Doc])+ _hdIppL :: PP_Doc+ _hdIppLI :: ([PP_Doc])+ _hdIppNtL :: ([(PP_Doc, Attributes)])+ _hdIppR :: PP_Doc+ _hdIppSF :: PP_Doc+ _hdIppW :: PP_Doc+ _hdIsynMap' :: (Map Identifier Attributes)+ _tlIextendedNTs :: (Set NontermIdent)+ _tlIinhMap' :: (Map Identifier Attributes)+ _tlIppA :: PP_Doc+ _tlIppAI :: ([PP_Doc])+ _tlIppCata :: PP_Doc+ _tlIppD :: PP_Doc+ _tlIppDI :: ([PP_Doc])+ _tlIppL :: PP_Doc+ _tlIppLI :: ([PP_Doc])+ _tlIppNtL :: ([(PP_Doc, Attributes)])+ _tlIppR :: PP_Doc+ _tlIppSF :: PP_Doc+ _tlIppW :: PP_Doc+ _tlIsynMap' :: (Map Identifier Attributes)+ -- use rule "src-ag/AG2AspectAG.ag"(line 104, column 52)+ _lhsOextendedNTs =+ ({-# LINE 104 "src-ag/AG2AspectAG.ag" #-}+ _hdIextendedNTs `Set.union` _tlIextendedNTs+ {-# LINE 1826 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)+ _lhsOinhMap' =+ ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ _hdIinhMap' `Map.union` _tlIinhMap'+ {-# LINE 1832 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 316, column 64)+ _lhsOppA =+ ({-# LINE 316 "src-ag/AG2AspectAG.ag" #-}+ _hdIppA >-< _tlIppA+ {-# LINE 1838 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 329, column 42)+ _lhsOppAI =+ ({-# LINE 329 "src-ag/AG2AspectAG.ag" #-}+ _hdIppAI ++ _tlIppAI+ {-# LINE 1844 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 726, column 67)+ _lhsOppCata =+ ({-# LINE 726 "src-ag/AG2AspectAG.ag" #-}+ _hdIppCata >-< _tlIppCata+ {-# LINE 1850 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 204, column 52)+ _lhsOppD =+ ({-# LINE 204 "src-ag/AG2AspectAG.ag" #-}+ _hdIppD >-< _tlIppD+ {-# LINE 1856 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 204, column 86)+ _lhsOppDI =+ ({-# LINE 204 "src-ag/AG2AspectAG.ag" #-}+ _hdIppDI ++ _tlIppDI+ {-# LINE 1862 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 258, column 79)+ _lhsOppL =+ ({-# LINE 258 "src-ag/AG2AspectAG.ag" #-}+ _hdIppL >-< _tlIppL+ {-# LINE 1868 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 258, column 112)+ _lhsOppLI =+ ({-# LINE 258 "src-ag/AG2AspectAG.ag" #-}+ _hdIppLI ++ _tlIppLI+ {-# LINE 1874 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 397, column 44)+ _lhsOppNtL =+ ({-# LINE 397 "src-ag/AG2AspectAG.ag" #-}+ _hdIppNtL ++ _tlIppNtL+ {-# LINE 1880 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 412, column 79)+ _lhsOppR =+ ({-# LINE 412 "src-ag/AG2AspectAG.ag" #-}+ _hdIppR >-< _tlIppR+ {-# LINE 1886 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 767, column 66)+ _lhsOppSF =+ ({-# LINE 767 "src-ag/AG2AspectAG.ag" #-}+ _hdIppSF >-< _tlIppSF+ {-# LINE 1892 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 837, column 42)+ _lhsOppW =+ ({-# LINE 837 "src-ag/AG2AspectAG.ag" #-}+ _hdIppW >-< _tlIppW+ {-# LINE 1898 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)+ _lhsOsynMap' =+ ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ _hdIsynMap' `Map.union` _tlIsynMap'+ {-# LINE 1904 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOderivs =+ ({-# LINE 198 "src-ag/AG2AspectAG.ag" #-}+ _lhsIderivs+ {-# LINE 1910 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOext =+ ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}+ _lhsIext+ {-# LINE 1916 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 1922 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOnewAtts =+ ({-# LINE 77 "src-ag/AG2AspectAG.ag" #-}+ _lhsInewAtts+ {-# LINE 1928 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOnewNTs =+ ({-# LINE 98 "src-ag/AG2AspectAG.ag" #-}+ _lhsInewNTs+ {-# LINE 1934 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOnewProds =+ ({-# LINE 84 "src-ag/AG2AspectAG.ag" #-}+ _lhsInewProds+ {-# LINE 1940 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOo_noGroup =+ ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_noGroup+ {-# LINE 1946 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 40 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_rename+ {-# LINE 1952 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 1958 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOtSyns =+ ({-# LINE 247 "src-ag/AG2AspectAG.ag" #-}+ _lhsItSyns+ {-# LINE 1964 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOderivs =+ ({-# LINE 198 "src-ag/AG2AspectAG.ag" #-}+ _lhsIderivs+ {-# LINE 1970 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOext =+ ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}+ _lhsIext+ {-# LINE 1976 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 1982 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOnewAtts =+ ({-# LINE 77 "src-ag/AG2AspectAG.ag" #-}+ _lhsInewAtts+ {-# LINE 1988 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOnewNTs =+ ({-# LINE 98 "src-ag/AG2AspectAG.ag" #-}+ _lhsInewNTs+ {-# LINE 1994 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOnewProds =+ ({-# LINE 84 "src-ag/AG2AspectAG.ag" #-}+ _lhsInewProds+ {-# LINE 2000 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOo_noGroup =+ ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_noGroup+ {-# LINE 2006 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 40 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_rename+ {-# LINE 2012 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 2018 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOtSyns =+ ({-# LINE 247 "src-ag/AG2AspectAG.ag" #-}+ _lhsItSyns+ {-# LINE 2024 "dist/build/AG2AspectAG" #-}+ )+ ( _hdIextendedNTs,_hdIinhMap',_hdIppA,_hdIppAI,_hdIppCata,_hdIppD,_hdIppDI,_hdIppL,_hdIppLI,_hdIppNtL,_hdIppR,_hdIppSF,_hdIppW,_hdIsynMap') =+ hd_ _hdOderivs _hdOext _hdOinhMap _hdOnewAtts _hdOnewNTs _hdOnewProds _hdOo_noGroup _hdOo_rename _hdOsynMap _hdOtSyns+ ( _tlIextendedNTs,_tlIinhMap',_tlIppA,_tlIppAI,_tlIppCata,_tlIppD,_tlIppDI,_tlIppL,_tlIppLI,_tlIppNtL,_tlIppR,_tlIppSF,_tlIppW,_tlIsynMap') =+ tl_ _tlOderivs _tlOext _tlOinhMap _tlOnewAtts _tlOnewNTs _tlOnewProds _tlOo_noGroup _tlOo_rename _tlOsynMap _tlOtSyns+ in ( _lhsOextendedNTs,_lhsOinhMap',_lhsOppA,_lhsOppAI,_lhsOppCata,_lhsOppD,_lhsOppDI,_lhsOppL,_lhsOppLI,_lhsOppNtL,_lhsOppR,_lhsOppSF,_lhsOppW,_lhsOsynMap'))))+sem_Nonterminals_Nil :: T_Nonterminals+sem_Nonterminals_Nil =+ (T_Nonterminals (\ _lhsIderivs+ _lhsIext+ _lhsIinhMap+ _lhsInewAtts+ _lhsInewNTs+ _lhsInewProds+ _lhsIo_noGroup+ _lhsIo_rename+ _lhsIsynMap+ _lhsItSyns ->+ (let _lhsOextendedNTs :: (Set NontermIdent)+ _lhsOinhMap' :: (Map Identifier Attributes)+ _lhsOppA :: PP_Doc+ _lhsOppAI :: ([PP_Doc])+ _lhsOppCata :: PP_Doc+ _lhsOppD :: PP_Doc+ _lhsOppDI :: ([PP_Doc])+ _lhsOppL :: PP_Doc+ _lhsOppLI :: ([PP_Doc])+ _lhsOppNtL :: ([(PP_Doc, Attributes)])+ _lhsOppR :: PP_Doc+ _lhsOppSF :: PP_Doc+ _lhsOppW :: PP_Doc+ _lhsOsynMap' :: (Map Identifier Attributes)+ -- use rule "src-ag/AG2AspectAG.ag"(line 104, column 52)+ _lhsOextendedNTs =+ ({-# LINE 104 "src-ag/AG2AspectAG.ag" #-}+ Set.empty+ {-# LINE 2061 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)+ _lhsOinhMap' =+ ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ Map.empty+ {-# LINE 2067 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 316, column 64)+ _lhsOppA =+ ({-# LINE 316 "src-ag/AG2AspectAG.ag" #-}+ empty+ {-# LINE 2073 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 329, column 42)+ _lhsOppAI =+ ({-# LINE 329 "src-ag/AG2AspectAG.ag" #-}+ []+ {-# LINE 2079 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 726, column 67)+ _lhsOppCata =+ ({-# LINE 726 "src-ag/AG2AspectAG.ag" #-}+ empty+ {-# LINE 2085 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 204, column 52)+ _lhsOppD =+ ({-# LINE 204 "src-ag/AG2AspectAG.ag" #-}+ empty+ {-# LINE 2091 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 204, column 86)+ _lhsOppDI =+ ({-# LINE 204 "src-ag/AG2AspectAG.ag" #-}+ []+ {-# LINE 2097 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 258, column 79)+ _lhsOppL =+ ({-# LINE 258 "src-ag/AG2AspectAG.ag" #-}+ empty+ {-# LINE 2103 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 258, column 112)+ _lhsOppLI =+ ({-# LINE 258 "src-ag/AG2AspectAG.ag" #-}+ []+ {-# LINE 2109 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 397, column 44)+ _lhsOppNtL =+ ({-# LINE 397 "src-ag/AG2AspectAG.ag" #-}+ []+ {-# LINE 2115 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 412, column 79)+ _lhsOppR =+ ({-# LINE 412 "src-ag/AG2AspectAG.ag" #-}+ empty+ {-# LINE 2121 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 767, column 66)+ _lhsOppSF =+ ({-# LINE 767 "src-ag/AG2AspectAG.ag" #-}+ empty+ {-# LINE 2127 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 837, column 42)+ _lhsOppW =+ ({-# LINE 837 "src-ag/AG2AspectAG.ag" #-}+ empty+ {-# LINE 2133 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)+ _lhsOsynMap' =+ ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ Map.empty+ {-# LINE 2139 "dist/build/AG2AspectAG" #-}+ )+ in ( _lhsOextendedNTs,_lhsOinhMap',_lhsOppA,_lhsOppAI,_lhsOppCata,_lhsOppD,_lhsOppDI,_lhsOppL,_lhsOppLI,_lhsOppNtL,_lhsOppR,_lhsOppSF,_lhsOppW,_lhsOsynMap'))))+-- Pattern -----------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ copy : Pattern + info : (Identifier, Identifier)+ alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + 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) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat))+sem_Pattern (Constr _name _pats) =+ (sem_Pattern_Constr _name (sem_Patterns _pats))+sem_Pattern (Irrefutable _pat) =+ (sem_Pattern_Irrefutable (sem_Pattern _pat))+sem_Pattern (Product _pos _pats) =+ (sem_Pattern_Product _pos (sem_Patterns _pats))+sem_Pattern (Underscore _pos) =+ (sem_Pattern_Underscore _pos)+-- semantic domain+newtype T_Pattern = T_Pattern (( Pattern,((Identifier, Identifier))))+data Inh_Pattern = Inh_Pattern {}+data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: Pattern,info_Syn_Pattern :: ((Identifier, Identifier))}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern+wrap_Pattern (T_Pattern sem) (Inh_Pattern) =+ (let ( _lhsOcopy,_lhsOinfo) = sem+ in (Syn_Pattern _lhsOcopy _lhsOinfo))+sem_Pattern_Alias :: Identifier ->+ Identifier ->+ T_Pattern ->+ T_Pattern+sem_Pattern_Alias field_ attr_ (T_Pattern pat_) =+ (T_Pattern (let _lhsOinfo :: ((Identifier, Identifier))+ _lhsOcopy :: Pattern+ _patIcopy :: Pattern+ _patIinfo :: ((Identifier, Identifier))+ -- "src-ag/AG2AspectAG.ag"(line 376, column 25)+ _lhsOinfo =+ ({-# LINE 376 "src-ag/AG2AspectAG.ag" #-}+ (field_, attr_)+ {-# LINE 2210 "dist/build/AG2AspectAG" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Alias field_ attr_ _patIcopy+ {-# LINE 2216 "dist/build/AG2AspectAG" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 2222 "dist/build/AG2AspectAG" #-}+ )+ ( _patIcopy,_patIinfo) =+ pat_+ in ( _lhsOcopy,_lhsOinfo)))+sem_Pattern_Constr :: ConstructorIdent ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Constr name_ (T_Patterns pats_) =+ (T_Pattern (let _lhsOinfo :: ((Identifier, Identifier))+ _lhsOcopy :: Pattern+ _patsIcopy :: Patterns+ -- "src-ag/AG2AspectAG.ag"(line 377, column 25)+ _lhsOinfo =+ ({-# LINE 377 "src-ag/AG2AspectAG.ag" #-}+ error "Pattern Constr undefined!!"+ {-# LINE 2238 "dist/build/AG2AspectAG" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 2244 "dist/build/AG2AspectAG" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 2250 "dist/build/AG2AspectAG" #-}+ )+ ( _patsIcopy) =+ pats_+ in ( _lhsOcopy,_lhsOinfo)))+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern+sem_Pattern_Irrefutable (T_Pattern pat_) =+ (T_Pattern (let _lhsOcopy :: Pattern+ _lhsOinfo :: ((Identifier, Identifier))+ _patIcopy :: Pattern+ _patIinfo :: ((Identifier, Identifier))+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 2266 "dist/build/AG2AspectAG" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 2272 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (up)+ _lhsOinfo =+ ({-# LINE 374 "src-ag/AG2AspectAG.ag" #-}+ _patIinfo+ {-# LINE 2278 "dist/build/AG2AspectAG" #-}+ )+ ( _patIcopy,_patIinfo) =+ pat_+ in ( _lhsOcopy,_lhsOinfo)))+sem_Pattern_Product :: Pos ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Product pos_ (T_Patterns pats_) =+ (T_Pattern (let _lhsOinfo :: ((Identifier, Identifier))+ _lhsOcopy :: Pattern+ _patsIcopy :: Patterns+ -- "src-ag/AG2AspectAG.ag"(line 378, column 25)+ _lhsOinfo =+ ({-# LINE 378 "src-ag/AG2AspectAG.ag" #-}+ error "Pattern Product undefined!!"+ {-# LINE 2294 "dist/build/AG2AspectAG" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 2300 "dist/build/AG2AspectAG" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 2306 "dist/build/AG2AspectAG" #-}+ )+ ( _patsIcopy) =+ pats_+ in ( _lhsOcopy,_lhsOinfo)))+sem_Pattern_Underscore :: Pos ->+ T_Pattern+sem_Pattern_Underscore pos_ =+ (T_Pattern (let _lhsOinfo :: ((Identifier, Identifier))+ _lhsOcopy :: Pattern+ -- "src-ag/AG2AspectAG.ag"(line 379, column 25)+ _lhsOinfo =+ ({-# LINE 379 "src-ag/AG2AspectAG.ag" #-}+ error "Pattern Underscore undefined!!"+ {-# LINE 2320 "dist/build/AG2AspectAG" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Underscore pos_+ {-# LINE 2326 "dist/build/AG2AspectAG" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 2332 "dist/build/AG2AspectAG" #-}+ )+ in ( _lhsOcopy,_lhsOinfo)))+-- Patterns ----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ copy : 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))+data Inh_Patterns = Inh_Patterns {}+data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: Patterns}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns+wrap_Patterns (T_Patterns sem) (Inh_Patterns) =+ (let ( _lhsOcopy) = sem+ in (Syn_Patterns _lhsOcopy))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns+sem_Patterns_Cons (T_Pattern hd_) (T_Patterns tl_) =+ (T_Patterns (let _lhsOcopy :: Patterns+ _hdIcopy :: Pattern+ _hdIinfo :: ((Identifier, Identifier))+ _tlIcopy :: Patterns+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 2377 "dist/build/AG2AspectAG" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 2383 "dist/build/AG2AspectAG" #-}+ )+ ( _hdIcopy,_hdIinfo) =+ hd_+ ( _tlIcopy) =+ tl_+ in ( _lhsOcopy)))+sem_Patterns_Nil :: T_Patterns+sem_Patterns_Nil =+ (T_Patterns (let _lhsOcopy :: Patterns+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ []+ {-# LINE 2397 "dist/build/AG2AspectAG" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 2403 "dist/build/AG2AspectAG" #-}+ )+ in ( _lhsOcopy)))+-- Production --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ ext : Maybe String+ inh : Attributes + inhMap : Map Identifier Attributes+ inhNoGroup : [String]+ newAtts : Attributes + newNT : Bool+ newProds : Map.Map ConstructorIdent FieldMap + o_noGroup : [String]+ o_rename : Bool+ ppNt : PP_Doc+ syn : Attributes + synMap : Map Identifier Attributes+ synNoGroup : [String]+ synthesized attributes:+ hasMoreProds : Bool + ppA : PP_Doc+ ppCata : PP_Doc+ ppD : PP_Doc+ ppDI : [PP_Doc]+ ppL : PP_Doc+ ppLI : [PP_Doc]+ ppR : PP_Doc+ ppRA : [PP_Doc]+ ppSF : PP_Doc+ ppSPF : PP_Doc+ prdInh : Attributes+ alternatives:+ alternative Production:+ child con : {ConstructorIdent}+ child params : {[Identifier]}+ child constraints : {[Type]}+ child children : Children + child rules : Rules + child typeSigs : TypeSigs + child macro : {MaybeMacro}+ visit 0:+ local ppProd : _+ local prodName : _+ local conName : _+ local newProd : _+ local ppR : _+ local ppRA : _+-}+-- cata+sem_Production :: Production ->+ T_Production+sem_Production (Production _con _params _constraints _children _rules _typeSigs _macro) =+ (sem_Production_Production _con _params _constraints (sem_Children _children) (sem_Rules _rules) (sem_TypeSigs _typeSigs) _macro)+-- semantic domain+newtype T_Production = T_Production ((Maybe String) ->+ ( Attributes ) ->+ (Map Identifier Attributes) ->+ ([String]) ->+ ( Attributes ) ->+ Bool ->+ ( Map.Map ConstructorIdent FieldMap ) ->+ ([String]) ->+ Bool ->+ PP_Doc ->+ ( Attributes ) ->+ (Map Identifier Attributes) ->+ ([String]) ->+ ( ( Bool ),PP_Doc,PP_Doc,PP_Doc,([PP_Doc]),PP_Doc,([PP_Doc]),PP_Doc,([PP_Doc]),PP_Doc,PP_Doc,Attributes))+data Inh_Production = Inh_Production {ext_Inh_Production :: (Maybe String),inh_Inh_Production :: ( Attributes ),inhMap_Inh_Production :: (Map Identifier Attributes),inhNoGroup_Inh_Production :: ([String]),newAtts_Inh_Production :: ( Attributes ),newNT_Inh_Production :: Bool,newProds_Inh_Production :: ( Map.Map ConstructorIdent FieldMap ),o_noGroup_Inh_Production :: ([String]),o_rename_Inh_Production :: Bool,ppNt_Inh_Production :: PP_Doc,syn_Inh_Production :: ( Attributes ),synMap_Inh_Production :: (Map Identifier Attributes),synNoGroup_Inh_Production :: ([String])}+data Syn_Production = Syn_Production {hasMoreProds_Syn_Production :: ( Bool ),ppA_Syn_Production :: PP_Doc,ppCata_Syn_Production :: PP_Doc,ppD_Syn_Production :: PP_Doc,ppDI_Syn_Production :: ([PP_Doc]),ppL_Syn_Production :: PP_Doc,ppLI_Syn_Production :: ([PP_Doc]),ppR_Syn_Production :: PP_Doc,ppRA_Syn_Production :: ([PP_Doc]),ppSF_Syn_Production :: PP_Doc,ppSPF_Syn_Production :: PP_Doc,prdInh_Syn_Production :: Attributes}+wrap_Production :: T_Production ->+ Inh_Production ->+ Syn_Production+wrap_Production (T_Production sem) (Inh_Production _lhsIext _lhsIinh _lhsIinhMap _lhsIinhNoGroup _lhsInewAtts _lhsInewNT _lhsInewProds _lhsIo_noGroup _lhsIo_rename _lhsIppNt _lhsIsyn _lhsIsynMap _lhsIsynNoGroup) =+ (let ( _lhsOhasMoreProds,_lhsOppA,_lhsOppCata,_lhsOppD,_lhsOppDI,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOppRA,_lhsOppSF,_lhsOppSPF,_lhsOprdInh) = sem _lhsIext _lhsIinh _lhsIinhMap _lhsIinhNoGroup _lhsInewAtts _lhsInewNT _lhsInewProds _lhsIo_noGroup _lhsIo_rename _lhsIppNt _lhsIsyn _lhsIsynMap _lhsIsynNoGroup+ in (Syn_Production _lhsOhasMoreProds _lhsOppA _lhsOppCata _lhsOppD _lhsOppDI _lhsOppL _lhsOppLI _lhsOppR _lhsOppRA _lhsOppSF _lhsOppSPF _lhsOprdInh))+sem_Production_Production :: ConstructorIdent ->+ ([Identifier]) ->+ ([Type]) ->+ T_Children ->+ T_Rules ->+ T_TypeSigs ->+ MaybeMacro ->+ T_Production+sem_Production_Production con_ params_ constraints_ (T_Children children_) (T_Rules rules_) (T_TypeSigs typeSigs_) macro_ =+ (T_Production (\ _lhsIext+ _lhsIinh+ _lhsIinhMap+ _lhsIinhNoGroup+ _lhsInewAtts+ _lhsInewNT+ _lhsInewProds+ _lhsIo_noGroup+ _lhsIo_rename+ _lhsIppNt+ _lhsIsyn+ _lhsIsynMap+ _lhsIsynNoGroup ->+ (let _lhsOhasMoreProds :: ( Bool )+ _childrenOppProd :: PP_Doc+ _rulesOppProd :: PP_Doc+ _lhsOppD :: PP_Doc+ _lhsOppL :: PP_Doc+ _lhsOppLI :: ([PP_Doc])+ _lhsOppA :: PP_Doc+ _lhsOppCata :: PP_Doc+ _lhsOppSF :: PP_Doc+ _lhsOppSPF :: PP_Doc+ _lhsOppDI :: ([PP_Doc])+ _lhsOppR :: PP_Doc+ _lhsOppRA :: ([PP_Doc])+ _lhsOprdInh :: Attributes+ _childrenOext :: (Maybe String)+ _childrenOinhMap :: (Map Identifier Attributes)+ _childrenOinhNoGroup :: ([String])+ _childrenOo_noGroup :: ([String])+ _childrenOo_rename :: Bool+ _childrenOppNt :: PP_Doc+ _childrenOsynMap :: (Map Identifier Attributes)+ _childrenOsynNoGroup :: ([String])+ _rulesOext :: (Maybe String)+ _rulesOinhNoGroup :: ([String])+ _rulesOnewProd :: Bool+ _rulesOo_noGroup :: ([String])+ _rulesOppNt :: PP_Doc+ _rulesOsynNoGroup :: ([String])+ _childrenIidCL :: ([(Identifier,Type)])+ _childrenIppCSF :: ([(Identifier,(PP_Doc,PP_Doc))])+ _childrenIppDL :: ([PP_Doc])+ _childrenIppL :: PP_Doc+ _childrenIppLI :: ([PP_Doc])+ _childrenIppR :: PP_Doc+ _childrenIprdInh :: Attributes+ _rulesIlocals :: ([Identifier])+ _rulesIppRL :: ([ PPRule ])+ -- "src-ag/AG2AspectAG.ag"(line 102, column 29)+ _lhsOhasMoreProds =+ ({-# LINE 102 "src-ag/AG2AspectAG.ag" #-}+ not $ Map.member con_ _lhsInewProds+ {-# LINE 2544 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 175, column 25)+ _ppProd =+ ({-# LINE 175 "src-ag/AG2AspectAG.ag" #-}+ pp con_+ {-# LINE 2550 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 176, column 25)+ _prodName =+ ({-# LINE 176 "src-ag/AG2AspectAG.ag" #-}+ ppName [_lhsIppNt, _ppProd ]+ {-# LINE 2556 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 177, column 25)+ _conName =+ ({-# LINE 177 "src-ag/AG2AspectAG.ag" #-}+ if _lhsIo_rename+ then _prodName+ else _ppProd+ {-# LINE 2564 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 194, column 25)+ _childrenOppProd =+ ({-# LINE 194 "src-ag/AG2AspectAG.ag" #-}+ _ppProd+ {-# LINE 2570 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 195, column 25)+ _rulesOppProd =+ ({-# LINE 195 "src-ag/AG2AspectAG.ag" #-}+ _ppProd+ {-# LINE 2576 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 227, column 25)+ _lhsOppD =+ ({-# LINE 227 "src-ag/AG2AspectAG.ag" #-}+ _conName >|< ppListSep " {" "}" ", " _childrenIppDL+ {-# LINE 2582 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 274, column 25)+ _lhsOppL =+ ({-# LINE 274 "src-ag/AG2AspectAG.ag" #-}+ if (Map.member con_ _lhsInewProds)+ then _childrenIppL+ else empty+ {-# LINE 2590 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 278, column 25)+ _lhsOppLI =+ ({-# LINE 278 "src-ag/AG2AspectAG.ag" #-}+ if (not $ Map.member con_ _lhsInewProds)+ then _childrenIppLI+ else []+ {-# LINE 2598 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 326, column 25)+ _lhsOppA =+ ({-# LINE 326 "src-ag/AG2AspectAG.ag" #-}+ defLocalAtts _prodName (length _rulesIlocals) 1 $ sort _rulesIlocals+ {-# LINE 2604 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 422, column 25)+ _newProd =+ ({-# LINE 422 "src-ag/AG2AspectAG.ag" #-}+ Map.member con_ _lhsInewProds+ {-# LINE 2610 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 423, column 41)+ (_ppR,_ppRA) =+ ({-# LINE 423 "src-ag/AG2AspectAG.ag" #-}+ let (instR, instRA) = defInstRules _lhsIppNt con_ _lhsInewNT _newProd+ _childrenIppR _rulesIppRL _childrenIidCL _rulesIlocals+ (locR, locRA) = defLocRule _lhsIppNt con_ _lhsInewNT _newProd+ _childrenIppR _rulesIppRL _lhsIinhNoGroup _lhsIsynNoGroup _childrenIidCL _rulesIlocals+ (inhGR, inhGRA) = defInhGRule _lhsIppNt _prodName _lhsInewNT _newProd+ _childrenIppR _rulesIppRL _lhsIinhNoGroup _lhsIsynNoGroup _childrenIidCL _rulesIlocals+ (synGR, synGRA) = defSynGRule _lhsIppNt con_ _lhsInewNT _newProd+ _childrenIppR _rulesIppRL _lhsIinhNoGroup _lhsIsynNoGroup _childrenIidCL _rulesIlocals+ (inhR, inhRA) = defInhRules _lhsIppNt _prodName _lhsInewNT _newProd _lhsInewAtts+ _childrenIppR _rulesIppRL _lhsIinhNoGroup _lhsIsynNoGroup _childrenIidCL _rulesIlocals+ (synR, synRA) = defSynRules _lhsIppNt con_ _lhsInewNT _newProd _lhsInewAtts+ _childrenIppR _rulesIppRL _lhsIinhNoGroup _lhsIsynNoGroup _childrenIidCL _rulesIlocals+ (inhMR, inhMRA) = modInhRules _lhsIppNt _prodName _lhsInewNT _newProd _lhsInewAtts+ _childrenIppR _rulesIppRL _lhsIinhNoGroup _lhsIsynNoGroup _childrenIidCL _rulesIlocals+ (synMR, synMRA) = modSynRules _lhsIppNt con_ _lhsInewNT _newProd _lhsInewAtts+ _childrenIppR _rulesIppRL _lhsIinhNoGroup _lhsIsynNoGroup _childrenIidCL _rulesIlocals+ in ( vlist [instR,locR,inhGR,synGR,inhR,synR,inhMR,synMR]+ , instRA ++ locRA ++ inhGRA ++ synGRA ++ inhMRA ++ synMRA ++ inhRA ++ synRA)+ {-# LINE 2633 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 733, column 25)+ _lhsOppCata =+ ({-# LINE 733 "src-ag/AG2AspectAG.ag" #-}+ let extend = maybe []+ ( \ext -> if (_lhsInewNT || (not _lhsInewNT && _newProd ))+ then []+ else [ ext >|< ".atts_" >|< _prodName ])+ _lhsIext+ macro = case macro_ of+ Nothing -> []+ Just macro -> [ "agMacro " >|< ppMacro macro ]+ atts = sortBy (\a b -> compare (show a) (show b)) _ppRA+ in "atts_" >|< _prodName >|< " = " >|<+ ppListSep "" "" " `ext` "+ (atts ++ macro ++ extend ) >-<+ "semP_" >|< _prodName >|< pp " = knit atts_" >|< _prodName+ {-# LINE 2651 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 797, column 25)+ _lhsOppSF =+ ({-# LINE 797 "src-ag/AG2AspectAG.ag" #-}+ let chi = _childrenIppCSF+ ppPattern = case (show con_) of+ "Cons" -> ppParams (ppListSep "" "" " : ")+ "Nil" -> pp "[]"+ otherwise -> _conName >|< " " >|< (ppParams ppSpaced)+ ppParams f = f $ map (((>|<) (pp "_")) . fst) chi+ in "sem_" >|< _lhsIppNt >|< " (" >|< ppPattern >|< ") = sem_" >|< _prodName >|<+ " (" >|< map (fst . snd) chi >|< "emptyRecord)"+ {-# LINE 2664 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 809, column 25)+ _lhsOppSPF =+ ({-# LINE 809 "src-ag/AG2AspectAG.ag" #-}+ let chi = _childrenIppCSF+ ppParams f = f $ map (((>|<) (pp "_")) . fst) chi+ in "sem_" >|< _lhsIppNt >|< "_" >|< con_ >#< ppParams ppSpaced >|< " = semP_" >|< _prodName >|<+ " (" >|< map (snd . snd) chi >|< "emptyRecord)"+ {-# LINE 2673 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 204, column 86)+ _lhsOppDI =+ ({-# LINE 204 "src-ag/AG2AspectAG.ag" #-}+ []+ {-# LINE 2679 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 412, column 79)+ _lhsOppR =+ ({-# LINE 412 "src-ag/AG2AspectAG.ag" #-}+ _ppR+ {-# LINE 2685 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 413, column 43)+ _lhsOppRA =+ ({-# LINE 413 "src-ag/AG2AspectAG.ag" #-}+ _ppRA+ {-# LINE 2691 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 64, column 57)+ _lhsOprdInh =+ ({-# LINE 64 "src-ag/AG2AspectAG.ag" #-}+ _childrenIprdInh+ {-# LINE 2697 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _childrenOext =+ ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}+ _lhsIext+ {-# LINE 2703 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _childrenOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 2709 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _childrenOinhNoGroup =+ ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}+ _lhsIinhNoGroup+ {-# LINE 2715 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _childrenOo_noGroup =+ ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_noGroup+ {-# LINE 2721 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _childrenOo_rename =+ ({-# LINE 40 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_rename+ {-# LINE 2727 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _childrenOppNt =+ ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}+ _lhsIppNt+ {-# LINE 2733 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _childrenOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 2739 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _childrenOsynNoGroup =+ ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}+ _lhsIsynNoGroup+ {-# LINE 2745 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _rulesOext =+ ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}+ _lhsIext+ {-# LINE 2751 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _rulesOinhNoGroup =+ ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}+ _lhsIinhNoGroup+ {-# LINE 2757 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (from local)+ _rulesOnewProd =+ ({-# LINE 406 "src-ag/AG2AspectAG.ag" #-}+ _newProd+ {-# LINE 2763 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _rulesOo_noGroup =+ ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_noGroup+ {-# LINE 2769 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _rulesOppNt =+ ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}+ _lhsIppNt+ {-# LINE 2775 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _rulesOsynNoGroup =+ ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}+ _lhsIsynNoGroup+ {-# LINE 2781 "dist/build/AG2AspectAG" #-}+ )+ ( _childrenIidCL,_childrenIppCSF,_childrenIppDL,_childrenIppL,_childrenIppLI,_childrenIppR,_childrenIprdInh) =+ children_ _childrenOext _childrenOinhMap _childrenOinhNoGroup _childrenOo_noGroup _childrenOo_rename _childrenOppNt _childrenOppProd _childrenOsynMap _childrenOsynNoGroup+ ( _rulesIlocals,_rulesIppRL) =+ rules_ _rulesOext _rulesOinhNoGroup _rulesOnewProd _rulesOo_noGroup _rulesOppNt _rulesOppProd _rulesOsynNoGroup+ in ( _lhsOhasMoreProds,_lhsOppA,_lhsOppCata,_lhsOppD,_lhsOppDI,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOppRA,_lhsOppSF,_lhsOppSPF,_lhsOprdInh))))+-- Productions -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ ext : Maybe String+ inh : Attributes + inhMap : Map Identifier Attributes+ inhNoGroup : [String]+ newAtts : Attributes + newNT : Bool+ newProds : Map.Map ConstructorIdent FieldMap + o_noGroup : [String]+ o_rename : Bool+ ppNt : PP_Doc+ syn : Attributes + synMap : Map Identifier Attributes+ synNoGroup : [String]+ synthesized attributes:+ hasMoreProds : Bool + ppA : PP_Doc+ ppCata : PP_Doc+ ppDL : [PP_Doc]+ ppL : PP_Doc+ ppLI : [PP_Doc]+ ppR : PP_Doc+ ppRA : [PP_Doc]+ ppSF : PP_Doc+ ppSPF : PP_Doc+ prdInh : Attributes+ alternatives:+ alternative Cons:+ child hd : Production + child tl : Productions + alternative Nil:+-}+-- cata+sem_Productions :: Productions ->+ T_Productions+sem_Productions list =+ (Prelude.foldr sem_Productions_Cons sem_Productions_Nil (Prelude.map sem_Production list))+-- semantic domain+newtype T_Productions = T_Productions ((Maybe String) ->+ ( Attributes ) ->+ (Map Identifier Attributes) ->+ ([String]) ->+ ( Attributes ) ->+ Bool ->+ ( Map.Map ConstructorIdent FieldMap ) ->+ ([String]) ->+ Bool ->+ PP_Doc ->+ ( Attributes ) ->+ (Map Identifier Attributes) ->+ ([String]) ->+ ( ( Bool ),PP_Doc,PP_Doc,([PP_Doc]),PP_Doc,([PP_Doc]),PP_Doc,([PP_Doc]),PP_Doc,PP_Doc,Attributes))+data Inh_Productions = Inh_Productions {ext_Inh_Productions :: (Maybe String),inh_Inh_Productions :: ( Attributes ),inhMap_Inh_Productions :: (Map Identifier Attributes),inhNoGroup_Inh_Productions :: ([String]),newAtts_Inh_Productions :: ( Attributes ),newNT_Inh_Productions :: Bool,newProds_Inh_Productions :: ( Map.Map ConstructorIdent FieldMap ),o_noGroup_Inh_Productions :: ([String]),o_rename_Inh_Productions :: Bool,ppNt_Inh_Productions :: PP_Doc,syn_Inh_Productions :: ( Attributes ),synMap_Inh_Productions :: (Map Identifier Attributes),synNoGroup_Inh_Productions :: ([String])}+data Syn_Productions = Syn_Productions {hasMoreProds_Syn_Productions :: ( Bool ),ppA_Syn_Productions :: PP_Doc,ppCata_Syn_Productions :: PP_Doc,ppDL_Syn_Productions :: ([PP_Doc]),ppL_Syn_Productions :: PP_Doc,ppLI_Syn_Productions :: ([PP_Doc]),ppR_Syn_Productions :: PP_Doc,ppRA_Syn_Productions :: ([PP_Doc]),ppSF_Syn_Productions :: PP_Doc,ppSPF_Syn_Productions :: PP_Doc,prdInh_Syn_Productions :: Attributes}+wrap_Productions :: T_Productions ->+ Inh_Productions ->+ Syn_Productions+wrap_Productions (T_Productions sem) (Inh_Productions _lhsIext _lhsIinh _lhsIinhMap _lhsIinhNoGroup _lhsInewAtts _lhsInewNT _lhsInewProds _lhsIo_noGroup _lhsIo_rename _lhsIppNt _lhsIsyn _lhsIsynMap _lhsIsynNoGroup) =+ (let ( _lhsOhasMoreProds,_lhsOppA,_lhsOppCata,_lhsOppDL,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOppRA,_lhsOppSF,_lhsOppSPF,_lhsOprdInh) = sem _lhsIext _lhsIinh _lhsIinhMap _lhsIinhNoGroup _lhsInewAtts _lhsInewNT _lhsInewProds _lhsIo_noGroup _lhsIo_rename _lhsIppNt _lhsIsyn _lhsIsynMap _lhsIsynNoGroup+ in (Syn_Productions _lhsOhasMoreProds _lhsOppA _lhsOppCata _lhsOppDL _lhsOppL _lhsOppLI _lhsOppR _lhsOppRA _lhsOppSF _lhsOppSPF _lhsOprdInh))+sem_Productions_Cons :: T_Production ->+ T_Productions ->+ T_Productions+sem_Productions_Cons (T_Production hd_) (T_Productions tl_) =+ (T_Productions (\ _lhsIext+ _lhsIinh+ _lhsIinhMap+ _lhsIinhNoGroup+ _lhsInewAtts+ _lhsInewNT+ _lhsInewProds+ _lhsIo_noGroup+ _lhsIo_rename+ _lhsIppNt+ _lhsIsyn+ _lhsIsynMap+ _lhsIsynNoGroup ->+ (let _hdOinhNoGroup :: ([String])+ _lhsOppDL :: ([PP_Doc])+ _lhsOhasMoreProds :: ( Bool )+ _lhsOppA :: PP_Doc+ _lhsOppCata :: PP_Doc+ _lhsOppL :: PP_Doc+ _lhsOppLI :: ([PP_Doc])+ _lhsOppR :: PP_Doc+ _lhsOppRA :: ([PP_Doc])+ _lhsOppSF :: PP_Doc+ _lhsOppSPF :: PP_Doc+ _lhsOprdInh :: Attributes+ _hdOext :: (Maybe String)+ _hdOinh :: ( Attributes )+ _hdOinhMap :: (Map Identifier Attributes)+ _hdOnewAtts :: ( Attributes )+ _hdOnewNT :: Bool+ _hdOnewProds :: ( Map.Map ConstructorIdent FieldMap )+ _hdOo_noGroup :: ([String])+ _hdOo_rename :: Bool+ _hdOppNt :: PP_Doc+ _hdOsyn :: ( Attributes )+ _hdOsynMap :: (Map Identifier Attributes)+ _hdOsynNoGroup :: ([String])+ _tlOext :: (Maybe String)+ _tlOinh :: ( Attributes )+ _tlOinhMap :: (Map Identifier Attributes)+ _tlOinhNoGroup :: ([String])+ _tlOnewAtts :: ( Attributes )+ _tlOnewNT :: Bool+ _tlOnewProds :: ( Map.Map ConstructorIdent FieldMap )+ _tlOo_noGroup :: ([String])+ _tlOo_rename :: Bool+ _tlOppNt :: PP_Doc+ _tlOsyn :: ( Attributes )+ _tlOsynMap :: (Map Identifier Attributes)+ _tlOsynNoGroup :: ([String])+ _hdIhasMoreProds :: ( Bool )+ _hdIppA :: PP_Doc+ _hdIppCata :: PP_Doc+ _hdIppD :: PP_Doc+ _hdIppDI :: ([PP_Doc])+ _hdIppL :: PP_Doc+ _hdIppLI :: ([PP_Doc])+ _hdIppR :: PP_Doc+ _hdIppRA :: ([PP_Doc])+ _hdIppSF :: PP_Doc+ _hdIppSPF :: PP_Doc+ _hdIprdInh :: Attributes+ _tlIhasMoreProds :: ( Bool )+ _tlIppA :: PP_Doc+ _tlIppCata :: PP_Doc+ _tlIppDL :: ([PP_Doc])+ _tlIppL :: PP_Doc+ _tlIppLI :: ([PP_Doc])+ _tlIppR :: PP_Doc+ _tlIppRA :: ([PP_Doc])+ _tlIppSF :: PP_Doc+ _tlIppSPF :: PP_Doc+ _tlIprdInh :: Attributes+ -- "src-ag/AG2AspectAG.ag"(line 61, column 11)+ _hdOinhNoGroup =+ ({-# LINE 61 "src-ag/AG2AspectAG.ag" #-}+ filter (flip Map.member _hdIprdInh . identifier) _lhsIinhNoGroup+ {-# LINE 2932 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 233, column 33)+ _lhsOppDL =+ ({-# LINE 233 "src-ag/AG2AspectAG.ag" #-}+ _hdIppD : _tlIppDL+ {-# LINE 2938 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 100, column 51)+ _lhsOhasMoreProds =+ ({-# LINE 100 "src-ag/AG2AspectAG.ag" #-}+ _hdIhasMoreProds || _tlIhasMoreProds+ {-# LINE 2944 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 316, column 64)+ _lhsOppA =+ ({-# LINE 316 "src-ag/AG2AspectAG.ag" #-}+ _hdIppA >-< _tlIppA+ {-# LINE 2950 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 726, column 67)+ _lhsOppCata =+ ({-# LINE 726 "src-ag/AG2AspectAG.ag" #-}+ _hdIppCata >-< _tlIppCata+ {-# LINE 2956 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 258, column 79)+ _lhsOppL =+ ({-# LINE 258 "src-ag/AG2AspectAG.ag" #-}+ _hdIppL >-< _tlIppL+ {-# LINE 2962 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 258, column 112)+ _lhsOppLI =+ ({-# LINE 258 "src-ag/AG2AspectAG.ag" #-}+ _hdIppLI ++ _tlIppLI+ {-# LINE 2968 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 412, column 79)+ _lhsOppR =+ ({-# LINE 412 "src-ag/AG2AspectAG.ag" #-}+ _hdIppR >-< _tlIppR+ {-# LINE 2974 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 413, column 43)+ _lhsOppRA =+ ({-# LINE 413 "src-ag/AG2AspectAG.ag" #-}+ _hdIppRA ++ _tlIppRA+ {-# LINE 2980 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 767, column 66)+ _lhsOppSF =+ ({-# LINE 767 "src-ag/AG2AspectAG.ag" #-}+ _hdIppSF >-< _tlIppSF+ {-# LINE 2986 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 768, column 42)+ _lhsOppSPF =+ ({-# LINE 768 "src-ag/AG2AspectAG.ag" #-}+ _hdIppSPF >-< _tlIppSPF+ {-# LINE 2992 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 64, column 57)+ _lhsOprdInh =+ ({-# LINE 64 "src-ag/AG2AspectAG.ag" #-}+ _hdIprdInh `Map.union` _tlIprdInh+ {-# LINE 2998 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOext =+ ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}+ _lhsIext+ {-# LINE 3004 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 757 "src-ag/AG2AspectAG.ag" #-}+ _lhsIinh+ {-# LINE 3010 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 3016 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOnewAtts =+ ({-# LINE 77 "src-ag/AG2AspectAG.ag" #-}+ _lhsInewAtts+ {-# LINE 3022 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOnewNT =+ ({-# LINE 405 "src-ag/AG2AspectAG.ag" #-}+ _lhsInewNT+ {-# LINE 3028 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOnewProds =+ ({-# LINE 85 "src-ag/AG2AspectAG.ag" #-}+ _lhsInewProds+ {-# LINE 3034 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOo_noGroup =+ ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_noGroup+ {-# LINE 3040 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 40 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_rename+ {-# LINE 3046 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOppNt =+ ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}+ _lhsIppNt+ {-# LINE 3052 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 757 "src-ag/AG2AspectAG.ag" #-}+ _lhsIsyn+ {-# LINE 3058 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 3064 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOsynNoGroup =+ ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}+ _lhsIsynNoGroup+ {-# LINE 3070 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOext =+ ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}+ _lhsIext+ {-# LINE 3076 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 757 "src-ag/AG2AspectAG.ag" #-}+ _lhsIinh+ {-# LINE 3082 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 3088 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOinhNoGroup =+ ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}+ _lhsIinhNoGroup+ {-# LINE 3094 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOnewAtts =+ ({-# LINE 77 "src-ag/AG2AspectAG.ag" #-}+ _lhsInewAtts+ {-# LINE 3100 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOnewNT =+ ({-# LINE 405 "src-ag/AG2AspectAG.ag" #-}+ _lhsInewNT+ {-# LINE 3106 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOnewProds =+ ({-# LINE 85 "src-ag/AG2AspectAG.ag" #-}+ _lhsInewProds+ {-# LINE 3112 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOo_noGroup =+ ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_noGroup+ {-# LINE 3118 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 40 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_rename+ {-# LINE 3124 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOppNt =+ ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}+ _lhsIppNt+ {-# LINE 3130 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 757 "src-ag/AG2AspectAG.ag" #-}+ _lhsIsyn+ {-# LINE 3136 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 3142 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOsynNoGroup =+ ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}+ _lhsIsynNoGroup+ {-# LINE 3148 "dist/build/AG2AspectAG" #-}+ )+ ( _hdIhasMoreProds,_hdIppA,_hdIppCata,_hdIppD,_hdIppDI,_hdIppL,_hdIppLI,_hdIppR,_hdIppRA,_hdIppSF,_hdIppSPF,_hdIprdInh) =+ hd_ _hdOext _hdOinh _hdOinhMap _hdOinhNoGroup _hdOnewAtts _hdOnewNT _hdOnewProds _hdOo_noGroup _hdOo_rename _hdOppNt _hdOsyn _hdOsynMap _hdOsynNoGroup+ ( _tlIhasMoreProds,_tlIppA,_tlIppCata,_tlIppDL,_tlIppL,_tlIppLI,_tlIppR,_tlIppRA,_tlIppSF,_tlIppSPF,_tlIprdInh) =+ tl_ _tlOext _tlOinh _tlOinhMap _tlOinhNoGroup _tlOnewAtts _tlOnewNT _tlOnewProds _tlOo_noGroup _tlOo_rename _tlOppNt _tlOsyn _tlOsynMap _tlOsynNoGroup+ in ( _lhsOhasMoreProds,_lhsOppA,_lhsOppCata,_lhsOppDL,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOppRA,_lhsOppSF,_lhsOppSPF,_lhsOprdInh))))+sem_Productions_Nil :: T_Productions+sem_Productions_Nil =+ (T_Productions (\ _lhsIext+ _lhsIinh+ _lhsIinhMap+ _lhsIinhNoGroup+ _lhsInewAtts+ _lhsInewNT+ _lhsInewProds+ _lhsIo_noGroup+ _lhsIo_rename+ _lhsIppNt+ _lhsIsyn+ _lhsIsynMap+ _lhsIsynNoGroup ->+ (let _lhsOppDL :: ([PP_Doc])+ _lhsOhasMoreProds :: ( Bool )+ _lhsOppA :: PP_Doc+ _lhsOppCata :: PP_Doc+ _lhsOppL :: PP_Doc+ _lhsOppLI :: ([PP_Doc])+ _lhsOppR :: PP_Doc+ _lhsOppRA :: ([PP_Doc])+ _lhsOppSF :: PP_Doc+ _lhsOppSPF :: PP_Doc+ _lhsOprdInh :: Attributes+ -- "src-ag/AG2AspectAG.ag"(line 234, column 33)+ _lhsOppDL =+ ({-# LINE 234 "src-ag/AG2AspectAG.ag" #-}+ []+ {-# LINE 3185 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 100, column 51)+ _lhsOhasMoreProds =+ ({-# LINE 100 "src-ag/AG2AspectAG.ag" #-}+ False+ {-# LINE 3191 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 316, column 64)+ _lhsOppA =+ ({-# LINE 316 "src-ag/AG2AspectAG.ag" #-}+ empty+ {-# LINE 3197 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 726, column 67)+ _lhsOppCata =+ ({-# LINE 726 "src-ag/AG2AspectAG.ag" #-}+ empty+ {-# LINE 3203 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 258, column 79)+ _lhsOppL =+ ({-# LINE 258 "src-ag/AG2AspectAG.ag" #-}+ empty+ {-# LINE 3209 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 258, column 112)+ _lhsOppLI =+ ({-# LINE 258 "src-ag/AG2AspectAG.ag" #-}+ []+ {-# LINE 3215 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 412, column 79)+ _lhsOppR =+ ({-# LINE 412 "src-ag/AG2AspectAG.ag" #-}+ empty+ {-# LINE 3221 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 413, column 43)+ _lhsOppRA =+ ({-# LINE 413 "src-ag/AG2AspectAG.ag" #-}+ []+ {-# LINE 3227 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 767, column 66)+ _lhsOppSF =+ ({-# LINE 767 "src-ag/AG2AspectAG.ag" #-}+ empty+ {-# LINE 3233 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 768, column 42)+ _lhsOppSPF =+ ({-# LINE 768 "src-ag/AG2AspectAG.ag" #-}+ empty+ {-# LINE 3239 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 64, column 57)+ _lhsOprdInh =+ ({-# LINE 64 "src-ag/AG2AspectAG.ag" #-}+ Map.empty+ {-# LINE 3245 "dist/build/AG2AspectAG" #-}+ )+ in ( _lhsOhasMoreProds,_lhsOppA,_lhsOppCata,_lhsOppDL,_lhsOppL,_lhsOppLI,_lhsOppR,_lhsOppRA,_lhsOppSF,_lhsOppSPF,_lhsOprdInh))))+-- Rule --------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ ext : Maybe String+ inhNoGroup : [String]+ newProd : Bool+ o_noGroup : [String]+ ppNt : PP_Doc+ ppProd : PP_Doc+ synNoGroup : [String]+ synthesized attributes:+ locals : [Identifier]+ ppRL : [ PPRule ]+ alternatives:+ alternative Rule:+ child mbName : {Maybe Identifier}+ child pattern : Pattern + child rhs : Expression + child owrt : {Bool}+ child origin : {String}+ child explicit : {Bool}+ child pure : {Bool}+ child identity : {Bool}+ child mbError : {Maybe Error}+ child eager : {Bool}+-}+-- cata+sem_Rule :: Rule ->+ T_Rule+sem_Rule (Rule _mbName _pattern _rhs _owrt _origin _explicit _pure _identity _mbError _eager) =+ (sem_Rule_Rule _mbName (sem_Pattern _pattern) (sem_Expression _rhs) _owrt _origin _explicit _pure _identity _mbError _eager)+-- semantic domain+newtype T_Rule = T_Rule ((Maybe String) ->+ ([String]) ->+ Bool ->+ ([String]) ->+ PP_Doc ->+ PP_Doc ->+ ([String]) ->+ ( ([Identifier]),([ PPRule ])))+data Inh_Rule = Inh_Rule {ext_Inh_Rule :: (Maybe String),inhNoGroup_Inh_Rule :: ([String]),newProd_Inh_Rule :: Bool,o_noGroup_Inh_Rule :: ([String]),ppNt_Inh_Rule :: PP_Doc,ppProd_Inh_Rule :: PP_Doc,synNoGroup_Inh_Rule :: ([String])}+data Syn_Rule = Syn_Rule {locals_Syn_Rule :: ([Identifier]),ppRL_Syn_Rule :: ([ PPRule ])}+wrap_Rule :: T_Rule ->+ Inh_Rule ->+ Syn_Rule+wrap_Rule (T_Rule sem) (Inh_Rule _lhsIext _lhsIinhNoGroup _lhsInewProd _lhsIo_noGroup _lhsIppNt _lhsIppProd _lhsIsynNoGroup) =+ (let ( _lhsOlocals,_lhsOppRL) = sem _lhsIext _lhsIinhNoGroup _lhsInewProd _lhsIo_noGroup _lhsIppNt _lhsIppProd _lhsIsynNoGroup+ in (Syn_Rule _lhsOlocals _lhsOppRL))+sem_Rule_Rule :: (Maybe Identifier) ->+ T_Pattern ->+ T_Expression ->+ Bool ->+ String ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Error) ->+ Bool ->+ T_Rule+sem_Rule_Rule mbName_ (T_Pattern pattern_) (T_Expression rhs_) owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_ =+ (T_Rule (\ _lhsIext+ _lhsIinhNoGroup+ _lhsInewProd+ _lhsIo_noGroup+ _lhsIppNt+ _lhsIppProd+ _lhsIsynNoGroup ->+ (let _lhsOlocals :: ([Identifier])+ _lhsOppRL :: ([ PPRule ])+ _rhsOppNt :: PP_Doc+ _rhsOppProd :: PP_Doc+ _patternIcopy :: Pattern+ _patternIinfo :: ((Identifier, Identifier))+ _rhsIppRE :: ([String] -> Identifier -> [(Identifier,Type)] -> [Identifier] -> PP_Doc)+ -- "src-ag/AG2AspectAG.ag"(line 369, column 25)+ _lhsOlocals =+ ({-# LINE 369 "src-ag/AG2AspectAG.ag" #-}+ if (show (fst _patternIinfo) == "loc")+ then [ snd _patternIinfo ]+ else [ ]+ {-# LINE 3329 "dist/build/AG2AspectAG" #-}+ )+ -- "src-ag/AG2AspectAG.ag"(line 466, column 33)+ _lhsOppRL =+ ({-# LINE 466 "src-ag/AG2AspectAG.ag" #-}+ if (not explicit_ && not _lhsInewProd)+ then []+ else [ ppRule _patternIinfo owrt_ (defRule _lhsIppNt _patternIinfo _lhsIo_noGroup _rhsIppRE) ]+ {-# LINE 3337 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _rhsOppNt =+ ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}+ _lhsIppNt+ {-# LINE 3343 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _rhsOppProd =+ ({-# LINE 191 "src-ag/AG2AspectAG.ag" #-}+ _lhsIppProd+ {-# LINE 3349 "dist/build/AG2AspectAG" #-}+ )+ ( _patternIcopy,_patternIinfo) =+ pattern_+ ( _rhsIppRE) =+ rhs_ _rhsOppNt _rhsOppProd+ in ( _lhsOlocals,_lhsOppRL))))+-- Rules -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ ext : Maybe String+ inhNoGroup : [String]+ newProd : Bool+ o_noGroup : [String]+ ppNt : PP_Doc+ ppProd : PP_Doc+ synNoGroup : [String]+ synthesized attributes:+ locals : [Identifier]+ ppRL : [ PPRule ]+ alternatives:+ alternative Cons:+ child hd : Rule + child tl : Rules + alternative Nil:+-}+-- cata+sem_Rules :: Rules ->+ T_Rules+sem_Rules list =+ (Prelude.foldr sem_Rules_Cons sem_Rules_Nil (Prelude.map sem_Rule list))+-- semantic domain+newtype T_Rules = T_Rules ((Maybe String) ->+ ([String]) ->+ Bool ->+ ([String]) ->+ PP_Doc ->+ PP_Doc ->+ ([String]) ->+ ( ([Identifier]),([ PPRule ])))+data Inh_Rules = Inh_Rules {ext_Inh_Rules :: (Maybe String),inhNoGroup_Inh_Rules :: ([String]),newProd_Inh_Rules :: Bool,o_noGroup_Inh_Rules :: ([String]),ppNt_Inh_Rules :: PP_Doc,ppProd_Inh_Rules :: PP_Doc,synNoGroup_Inh_Rules :: ([String])}+data Syn_Rules = Syn_Rules {locals_Syn_Rules :: ([Identifier]),ppRL_Syn_Rules :: ([ PPRule ])}+wrap_Rules :: T_Rules ->+ Inh_Rules ->+ Syn_Rules+wrap_Rules (T_Rules sem) (Inh_Rules _lhsIext _lhsIinhNoGroup _lhsInewProd _lhsIo_noGroup _lhsIppNt _lhsIppProd _lhsIsynNoGroup) =+ (let ( _lhsOlocals,_lhsOppRL) = sem _lhsIext _lhsIinhNoGroup _lhsInewProd _lhsIo_noGroup _lhsIppNt _lhsIppProd _lhsIsynNoGroup+ in (Syn_Rules _lhsOlocals _lhsOppRL))+sem_Rules_Cons :: T_Rule ->+ T_Rules ->+ T_Rules+sem_Rules_Cons (T_Rule hd_) (T_Rules tl_) =+ (T_Rules (\ _lhsIext+ _lhsIinhNoGroup+ _lhsInewProd+ _lhsIo_noGroup+ _lhsIppNt+ _lhsIppProd+ _lhsIsynNoGroup ->+ (let _lhsOppRL :: ([ PPRule ])+ _lhsOlocals :: ([Identifier])+ _hdOext :: (Maybe String)+ _hdOinhNoGroup :: ([String])+ _hdOnewProd :: Bool+ _hdOo_noGroup :: ([String])+ _hdOppNt :: PP_Doc+ _hdOppProd :: PP_Doc+ _hdOsynNoGroup :: ([String])+ _tlOext :: (Maybe String)+ _tlOinhNoGroup :: ([String])+ _tlOnewProd :: Bool+ _tlOo_noGroup :: ([String])+ _tlOppNt :: PP_Doc+ _tlOppProd :: PP_Doc+ _tlOsynNoGroup :: ([String])+ _hdIlocals :: ([Identifier])+ _hdIppRL :: ([ PPRule ])+ _tlIlocals :: ([Identifier])+ _tlIppRL :: ([ PPRule ])+ -- "src-ag/AG2AspectAG.ag"(line 462, column 33)+ _lhsOppRL =+ ({-# LINE 462 "src-ag/AG2AspectAG.ag" #-}+ _hdIppRL ++ _tlIppRL+ {-# LINE 3433 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 365, column 30)+ _lhsOlocals =+ ({-# LINE 365 "src-ag/AG2AspectAG.ag" #-}+ _hdIlocals ++ _tlIlocals+ {-# LINE 3439 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOext =+ ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}+ _lhsIext+ {-# LINE 3445 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOinhNoGroup =+ ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}+ _lhsIinhNoGroup+ {-# LINE 3451 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOnewProd =+ ({-# LINE 406 "src-ag/AG2AspectAG.ag" #-}+ _lhsInewProd+ {-# LINE 3457 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOo_noGroup =+ ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_noGroup+ {-# LINE 3463 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOppNt =+ ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}+ _lhsIppNt+ {-# LINE 3469 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOppProd =+ ({-# LINE 191 "src-ag/AG2AspectAG.ag" #-}+ _lhsIppProd+ {-# LINE 3475 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _hdOsynNoGroup =+ ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}+ _lhsIsynNoGroup+ {-# LINE 3481 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOext =+ ({-# LINE 118 "src-ag/AG2AspectAG.ag" #-}+ _lhsIext+ {-# LINE 3487 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOinhNoGroup =+ ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}+ _lhsIinhNoGroup+ {-# LINE 3493 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOnewProd =+ ({-# LINE 406 "src-ag/AG2AspectAG.ag" #-}+ _lhsInewProd+ {-# LINE 3499 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOo_noGroup =+ ({-# LINE 44 "src-ag/AG2AspectAG.ag" #-}+ _lhsIo_noGroup+ {-# LINE 3505 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOppNt =+ ({-# LINE 186 "src-ag/AG2AspectAG.ag" #-}+ _lhsIppNt+ {-# LINE 3511 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOppProd =+ ({-# LINE 191 "src-ag/AG2AspectAG.ag" #-}+ _lhsIppProd+ {-# LINE 3517 "dist/build/AG2AspectAG" #-}+ )+ -- copy rule (down)+ _tlOsynNoGroup =+ ({-# LINE 54 "src-ag/AG2AspectAG.ag" #-}+ _lhsIsynNoGroup+ {-# LINE 3523 "dist/build/AG2AspectAG" #-}+ )+ ( _hdIlocals,_hdIppRL) =+ hd_ _hdOext _hdOinhNoGroup _hdOnewProd _hdOo_noGroup _hdOppNt _hdOppProd _hdOsynNoGroup+ ( _tlIlocals,_tlIppRL) =+ tl_ _tlOext _tlOinhNoGroup _tlOnewProd _tlOo_noGroup _tlOppNt _tlOppProd _tlOsynNoGroup+ in ( _lhsOlocals,_lhsOppRL))))+sem_Rules_Nil :: T_Rules+sem_Rules_Nil =+ (T_Rules (\ _lhsIext+ _lhsIinhNoGroup+ _lhsInewProd+ _lhsIo_noGroup+ _lhsIppNt+ _lhsIppProd+ _lhsIsynNoGroup ->+ (let _lhsOppRL :: ([ PPRule ])+ _lhsOlocals :: ([Identifier])+ -- "src-ag/AG2AspectAG.ag"(line 463, column 33)+ _lhsOppRL =+ ({-# LINE 463 "src-ag/AG2AspectAG.ag" #-}+ []+ {-# LINE 3545 "dist/build/AG2AspectAG" #-}+ )+ -- use rule "src-ag/AG2AspectAG.ag"(line 365, column 30)+ _lhsOlocals =+ ({-# LINE 365 "src-ag/AG2AspectAG.ag" #-}+ []+ {-# LINE 3551 "dist/build/AG2AspectAG" #-}+ )+ in ( _lhsOlocals,_lhsOppRL))))+-- TypeSig -----------------------------------------------------+{-+ alternatives:+ alternative TypeSig:+ child name : {Identifier}+ child tp : {Type}+-}+-- cata+sem_TypeSig :: TypeSig ->+ T_TypeSig+sem_TypeSig (TypeSig _name _tp) =+ (sem_TypeSig_TypeSig _name _tp)+-- semantic domain+newtype T_TypeSig = T_TypeSig (( ))+data Inh_TypeSig = Inh_TypeSig {}+data Syn_TypeSig = Syn_TypeSig {}+wrap_TypeSig :: T_TypeSig ->+ Inh_TypeSig ->+ Syn_TypeSig+wrap_TypeSig (T_TypeSig sem) (Inh_TypeSig) =+ (let ( ) = sem+ in (Syn_TypeSig))+sem_TypeSig_TypeSig :: Identifier ->+ Type ->+ T_TypeSig+sem_TypeSig_TypeSig name_ tp_ =+ (T_TypeSig (let+ in ( )))+-- TypeSigs ----------------------------------------------------+{-+ alternatives:+ alternative Cons:+ child hd : TypeSig + child tl : TypeSigs + alternative Nil:+-}+-- cata+sem_TypeSigs :: TypeSigs ->+ T_TypeSigs+sem_TypeSigs list =+ (Prelude.foldr sem_TypeSigs_Cons sem_TypeSigs_Nil (Prelude.map sem_TypeSig list))+-- semantic domain+newtype T_TypeSigs = T_TypeSigs (( ))+data Inh_TypeSigs = Inh_TypeSigs {}+data Syn_TypeSigs = Syn_TypeSigs {}+wrap_TypeSigs :: T_TypeSigs ->+ Inh_TypeSigs ->+ Syn_TypeSigs+wrap_TypeSigs (T_TypeSigs sem) (Inh_TypeSigs) =+ (let ( ) = sem+ in (Syn_TypeSigs))+sem_TypeSigs_Cons :: T_TypeSig ->+ T_TypeSigs ->+ T_TypeSigs+sem_TypeSigs_Cons (T_TypeSig hd_) (T_TypeSigs tl_) =+ (T_TypeSigs (let+ in ( )))+sem_TypeSigs_Nil :: T_TypeSigs+sem_TypeSigs_Nil =+ (T_TypeSigs (let+ in ( )))
src-derived/AbstractSyntax.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.39.1.0 (src-ag/AbstractSyntax.ag)+-- UUAGC 0.9.40.1 (src-ag/AbstractSyntax.ag) module AbstractSyntax where {-# LINE 2 "src-ag/AbstractSyntax.ag" #-} @@ -12,7 +12,7 @@ import Macro --marcos import CommonTypes import ErrorMessages-{-# LINE 16 "dist/build/uuagc/uuagc-tmp/AbstractSyntax.hs" #-}+{-# LINE 16 "dist/build/AbstractSyntax.hs" #-} -- Child ------------------------------------------------------- {- alternatives:@@ -21,7 +21,7 @@ child tp : {Type} child kind : {ChildKind} -}-data Child = Child (Identifier) (Type) (ChildKind) +data Child = Child (Identifier) (Type) (ChildKind) -- Children ---------------------------------------------------- {- alternatives:@@ -30,7 +30,7 @@ child tl : Children alternative Nil: -}-type Children = [Child ]+type Children = [Child] -- Grammar ----------------------------------------------------- {- alternatives:@@ -50,7 +50,7 @@ child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))} child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))} -}-data Grammar = Grammar (TypeSyns) (UseMap) (Derivings) ((Set NontermIdent)) (Nonterminals ) (PragmaMap) (AttrOrderMap) (ParamMap) (ContextMap) (QuantMap) (UniqueMap) ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))) ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))) ((Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))))) +data Grammar = Grammar (TypeSyns) (UseMap) (Derivings) ((Set NontermIdent)) (Nonterminals) (PragmaMap) (AttrOrderMap) (ParamMap) (ContextMap) (QuantMap) (UniqueMap) ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))) ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))) ((Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))))) -- Nonterminal ------------------------------------------------- {- alternatives:@@ -61,7 +61,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:@@ -70,7 +70,7 @@ child tl : Nonterminals alternative Nil: -}-type Nonterminals = [Nonterminal ]+type Nonterminals = [Nonterminal] -- Production -------------------------------------------------- {- alternatives:@@ -83,7 +83,7 @@ child typeSigs : TypeSigs child macro : {MaybeMacro} -}-data Production = Production (ConstructorIdent) (([Identifier])) (([Type])) (Children ) (Rules ) (TypeSigs ) (MaybeMacro) +data Production = Production (ConstructorIdent) (([Identifier])) (([Type])) (Children) (Rules) (TypeSigs) (MaybeMacro) -- Productions ------------------------------------------------- {- alternatives:@@ -92,7 +92,7 @@ child tl : Productions alternative Nil: -}-type Productions = [Production ]+type Productions = [Production] -- Rule -------------------------------------------------------- {- alternatives:@@ -108,7 +108,7 @@ child mbError : {Maybe Error} child eager : {Bool} -}-data Rule = Rule ((Maybe Identifier)) (Pattern) (Expression) (Bool) (String) (Bool) (Bool) (Bool) ((Maybe Error)) (Bool) +data Rule = Rule ((Maybe Identifier)) (Pattern) (Expression) (Bool) (String) (Bool) (Bool) (Bool) ((Maybe Error)) (Bool) -- Rules ------------------------------------------------------- {- alternatives:@@ -117,7 +117,7 @@ child tl : Rules alternative Nil: -}-type Rules = [Rule ]+type Rules = [Rule] -- TypeSig ----------------------------------------------------- {- alternatives:@@ -125,7 +125,7 @@ child name : {Identifier} child tp : {Type} -}-data TypeSig = TypeSig (Identifier) (Type) +data TypeSig = TypeSig (Identifier) (Type) -- TypeSigs ---------------------------------------------------- {- alternatives:@@ -134,4 +134,4 @@ child tl : TypeSigs alternative Nil: -}-type TypeSigs = [TypeSig ]+type TypeSigs = [TypeSig]
src-derived/AbstractSyntaxDump.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.39.1.0 (src-ag/AbstractSyntaxDump.ag)+-- UUAGC 0.9.40.1 (src-ag/AbstractSyntaxDump.ag) module AbstractSyntaxDump where {-# LINE 6 "src-ag/AbstractSyntaxDump.ag" #-} @@ -12,7 +12,7 @@ import AbstractSyntax import TokenDef-{-# LINE 16 "dist/build/uuagc/uuagc-tmp/AbstractSyntaxDump.hs" #-}+{-# LINE 16 "dist/build/AbstractSyntaxDump.hs" #-} {-# LINE 2 "src-ag/AbstractSyntax.ag" #-} @@ -24,20 +24,20 @@ import Macro --marcos import CommonTypes import ErrorMessages-{-# LINE 28 "dist/build/uuagc/uuagc-tmp/AbstractSyntaxDump.hs" #-}+{-# LINE 28 "dist/build/AbstractSyntaxDump.hs" #-} {-# LINE 2 "src-ag/Patterns.ag" #-} -- Patterns.ag imports import UU.Scanner.Position(Pos) import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 35 "dist/build/uuagc/uuagc-tmp/AbstractSyntaxDump.hs" #-}+{-# LINE 35 "dist/build/AbstractSyntaxDump.hs" #-} {-# LINE 2 "src-ag/Expression.ag" #-} import UU.Scanner.Position(Pos) import HsToken-{-# LINE 41 "dist/build/uuagc/uuagc-tmp/AbstractSyntaxDump.hs" #-}+{-# LINE 41 "dist/build/AbstractSyntaxDump.hs" #-} -- Child ------------------------------------------------------- {- visit 0:@@ -50,33 +50,33 @@ child kind : {ChildKind} -} -- cata-sem_Child :: Child ->- T_Child -sem_Child (Child _name _tp _kind ) =- (sem_Child_Child _name _tp _kind )+sem_Child :: Child ->+ T_Child+sem_Child (Child _name _tp _kind) =+ (sem_Child_Child _name _tp _kind) -- semantic domain-newtype T_Child = T_Child (( PP_Doc))-data Inh_Child = Inh_Child {}-data Syn_Child = Syn_Child {pp_Syn_Child :: PP_Doc}-wrap_Child :: T_Child ->- Inh_Child ->- Syn_Child -wrap_Child (T_Child sem ) (Inh_Child ) =- (let ( _lhsOpp) = sem - in (Syn_Child _lhsOpp ))+newtype T_Child = T_Child (( PP_Doc))+data Inh_Child = Inh_Child {}+data Syn_Child = Syn_Child {pp_Syn_Child :: PP_Doc}+wrap_Child :: T_Child ->+ Inh_Child ->+ Syn_Child+wrap_Child (T_Child sem) (Inh_Child) =+ (let ( _lhsOpp) = sem+ in (Syn_Child _lhsOpp)) sem_Child_Child :: Identifier -> Type -> ChildKind ->- T_Child -sem_Child_Child name_ tp_ kind_ =+ T_Child+sem_Child_Child name_ tp_ kind_ = (T_Child (let _lhsOpp :: PP_Doc -- "src-ag/AbstractSyntaxDump.ag"(line 35, column 33) _lhsOpp = ({-# LINE 35 "src-ag/AbstractSyntaxDump.ag" #-} ppNestInfo ["Child","Child"] [pp name_, ppShow tp_] [ppF "kind" $ ppShow kind_] []- {-# LINE 78 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 78 "dist/build/AbstractSyntaxDump" #-} )- in ( _lhsOpp)) )+ in ( _lhsOpp))) -- Children ---------------------------------------------------- {- visit 0:@@ -90,24 +90,24 @@ alternative Nil: -} -- cata-sem_Children :: Children ->- T_Children -sem_Children list =- (Prelude.foldr sem_Children_Cons sem_Children_Nil (Prelude.map sem_Child list) )+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 (( PP_Doc,([PP_Doc])))-data Inh_Children = Inh_Children {}-data Syn_Children = Syn_Children {pp_Syn_Children :: PP_Doc,ppL_Syn_Children :: ([PP_Doc])}-wrap_Children :: T_Children ->- Inh_Children ->- Syn_Children -wrap_Children (T_Children sem ) (Inh_Children ) =- (let ( _lhsOpp,_lhsOppL) = sem - in (Syn_Children _lhsOpp _lhsOppL ))-sem_Children_Cons :: T_Child ->- T_Children ->- T_Children -sem_Children_Cons (T_Child hd_ ) (T_Children tl_ ) =+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])}+wrap_Children :: T_Children ->+ Inh_Children ->+ Syn_Children+wrap_Children (T_Children sem) (Inh_Children) =+ (let ( _lhsOpp,_lhsOppL) = sem+ in (Syn_Children _lhsOpp _lhsOppL))+sem_Children_Cons :: T_Child ->+ T_Children ->+ T_Children+sem_Children_Cons (T_Child hd_) (T_Children tl_) = (T_Children (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc _hdIpp :: PP_Doc@@ -117,36 +117,36 @@ _lhsOppL = ({-# LINE 67 "src-ag/AbstractSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 121 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 121 "dist/build/AbstractSyntaxDump" #-} ) -- use rule "src-ag/AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "src-ag/AbstractSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 127 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 127 "dist/build/AbstractSyntaxDump" #-} ) ( _hdIpp) =- hd_ + hd_ ( _tlIpp,_tlIppL) =- tl_ - in ( _lhsOpp,_lhsOppL)) )-sem_Children_Nil :: T_Children -sem_Children_Nil =+ tl_+ in ( _lhsOpp,_lhsOppL)))+sem_Children_Nil :: T_Children+sem_Children_Nil = (T_Children (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc -- "src-ag/AbstractSyntaxDump.ag"(line 68, column 33) _lhsOppL = ({-# LINE 68 "src-ag/AbstractSyntaxDump.ag" #-} []- {-# LINE 142 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 142 "dist/build/AbstractSyntaxDump" #-} ) -- use rule "src-ag/AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "src-ag/AbstractSyntaxDump.ag" #-} empty- {-# LINE 148 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 148 "dist/build/AbstractSyntaxDump" #-} )- in ( _lhsOpp,_lhsOppL)) )+ in ( _lhsOpp,_lhsOppL))) -- Expression -------------------------------------------------- {- visit 0:@@ -158,32 +158,32 @@ child tks : {[HsToken]} -} -- cata-sem_Expression :: Expression ->- T_Expression -sem_Expression (Expression _pos _tks ) =- (sem_Expression_Expression _pos _tks )+sem_Expression :: Expression ->+ T_Expression+sem_Expression (Expression _pos _tks) =+ (sem_Expression_Expression _pos _tks) -- semantic domain-newtype T_Expression = T_Expression (( PP_Doc))-data Inh_Expression = Inh_Expression {}-data Syn_Expression = Syn_Expression {pp_Syn_Expression :: PP_Doc}-wrap_Expression :: T_Expression ->- Inh_Expression ->- Syn_Expression -wrap_Expression (T_Expression sem ) (Inh_Expression ) =- (let ( _lhsOpp) = sem - in (Syn_Expression _lhsOpp ))+newtype T_Expression = T_Expression (( PP_Doc))+data Inh_Expression = Inh_Expression {}+data Syn_Expression = Syn_Expression {pp_Syn_Expression :: PP_Doc}+wrap_Expression :: T_Expression ->+ Inh_Expression ->+ Syn_Expression+wrap_Expression (T_Expression sem) (Inh_Expression) =+ (let ( _lhsOpp) = sem+ in (Syn_Expression _lhsOpp)) sem_Expression_Expression :: Pos -> ([HsToken]) ->- T_Expression -sem_Expression_Expression pos_ tks_ =+ T_Expression+sem_Expression_Expression pos_ tks_ = (T_Expression (let _lhsOpp :: PP_Doc -- "src-ag/AbstractSyntaxDump.ag"(line 50, column 25) _lhsOpp = ({-# LINE 50 "src-ag/AbstractSyntaxDump.ag" #-} ppNestInfo ["Expression","Expression"] [ppShow pos_] [ppF "txt" $ vlist . showTokens . tokensToStrings $ tks_] []- {-# LINE 185 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 185 "dist/build/AbstractSyntaxDump" #-} )- in ( _lhsOpp)) )+ in ( _lhsOpp))) -- Grammar ----------------------------------------------------- {- visit 0:@@ -207,25 +207,25 @@ child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))} -} -- cata-sem_Grammar :: Grammar ->- T_Grammar -sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap ) =- (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap )+sem_Grammar :: Grammar ->+ T_Grammar+sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap) =+ (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts) _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap) -- semantic domain-newtype T_Grammar = T_Grammar (( PP_Doc))-data Inh_Grammar = Inh_Grammar {}-data Syn_Grammar = Syn_Grammar {pp_Syn_Grammar :: PP_Doc}-wrap_Grammar :: T_Grammar ->- Inh_Grammar ->- Syn_Grammar -wrap_Grammar (T_Grammar sem ) (Inh_Grammar ) =- (let ( _lhsOpp) = sem - in (Syn_Grammar _lhsOpp ))+newtype T_Grammar = T_Grammar (( PP_Doc))+data Inh_Grammar = Inh_Grammar {}+data Syn_Grammar = Syn_Grammar {pp_Syn_Grammar :: PP_Doc}+wrap_Grammar :: T_Grammar ->+ Inh_Grammar ->+ Syn_Grammar+wrap_Grammar (T_Grammar sem) (Inh_Grammar) =+ (let ( _lhsOpp) = sem+ in (Syn_Grammar _lhsOpp)) sem_Grammar_Grammar :: TypeSyns -> UseMap -> Derivings -> (Set NontermIdent) ->- T_Nonterminals ->+ T_Nonterminals -> PragmaMap -> AttrOrderMap -> ParamMap ->@@ -235,8 +235,8 @@ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->- T_Grammar -sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_ =+ T_Grammar+sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_ = (T_Grammar (let _lhsOpp :: PP_Doc _nontsIpp :: PP_Doc _nontsIppL :: ([PP_Doc])@@ -250,11 +250,11 @@ , ppF "wrappers" $ ppShow $ wrappers_ , ppF "nonts" $ ppVList _nontsIppL ] []- {-# LINE 254 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 254 "dist/build/AbstractSyntaxDump" #-} ) ( _nontsIpp,_nontsIppL) =- nonts_ - in ( _lhsOpp)) )+ nonts_+ in ( _lhsOpp))) -- Nonterminal ------------------------------------------------- {- visit 0:@@ -269,27 +269,27 @@ child prods : Productions -} -- cata-sem_Nonterminal :: Nonterminal ->- T_Nonterminal -sem_Nonterminal (Nonterminal _nt _params _inh _syn _prods ) =- (sem_Nonterminal_Nonterminal _nt _params _inh _syn (sem_Productions _prods ) )+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 (( PP_Doc))-data Inh_Nonterminal = Inh_Nonterminal {}-data Syn_Nonterminal = Syn_Nonterminal {pp_Syn_Nonterminal :: PP_Doc}-wrap_Nonterminal :: T_Nonterminal ->- Inh_Nonterminal ->- Syn_Nonterminal -wrap_Nonterminal (T_Nonterminal sem ) (Inh_Nonterminal ) =- (let ( _lhsOpp) = sem - in (Syn_Nonterminal _lhsOpp ))+newtype T_Nonterminal = T_Nonterminal (( PP_Doc))+data Inh_Nonterminal = Inh_Nonterminal {}+data Syn_Nonterminal = Syn_Nonterminal {pp_Syn_Nonterminal :: PP_Doc}+wrap_Nonterminal :: T_Nonterminal ->+ Inh_Nonterminal ->+ Syn_Nonterminal+wrap_Nonterminal (T_Nonterminal sem) (Inh_Nonterminal) =+ (let ( _lhsOpp) = sem+ in (Syn_Nonterminal _lhsOpp)) sem_Nonterminal_Nonterminal :: NontermIdent -> ([Identifier]) -> Attributes -> Attributes ->- T_Productions ->- T_Nonterminal -sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ (T_Productions prods_ ) =+ T_Productions ->+ T_Nonterminal+sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ (T_Productions prods_) = (T_Nonterminal (let _lhsOpp :: PP_Doc _prodsIpp :: PP_Doc _prodsIppL :: ([PP_Doc])@@ -297,11 +297,11 @@ _lhsOpp = ({-# LINE 29 "src-ag/AbstractSyntaxDump.ag" #-} ppNestInfo ["Nonterminal","Nonterminal"] (pp nt_ : map pp params_) [ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_, ppF "prods" $ ppVList _prodsIppL] []- {-# LINE 301 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 301 "dist/build/AbstractSyntaxDump" #-} ) ( _prodsIpp,_prodsIppL) =- prods_ - in ( _lhsOpp)) )+ prods_+ in ( _lhsOpp))) -- Nonterminals ------------------------------------------------ {- visit 0:@@ -315,24 +315,24 @@ alternative Nil: -} -- cata-sem_Nonterminals :: Nonterminals ->- T_Nonterminals -sem_Nonterminals list =- (Prelude.foldr sem_Nonterminals_Cons sem_Nonterminals_Nil (Prelude.map sem_Nonterminal list) )+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 (( PP_Doc,([PP_Doc])))-data Inh_Nonterminals = Inh_Nonterminals {}-data Syn_Nonterminals = Syn_Nonterminals {pp_Syn_Nonterminals :: PP_Doc,ppL_Syn_Nonterminals :: ([PP_Doc])}-wrap_Nonterminals :: T_Nonterminals ->- Inh_Nonterminals ->- Syn_Nonterminals -wrap_Nonterminals (T_Nonterminals sem ) (Inh_Nonterminals ) =- (let ( _lhsOpp,_lhsOppL) = sem - in (Syn_Nonterminals _lhsOpp _lhsOppL ))-sem_Nonterminals_Cons :: T_Nonterminal ->- T_Nonterminals ->- T_Nonterminals -sem_Nonterminals_Cons (T_Nonterminal hd_ ) (T_Nonterminals tl_ ) =+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])}+wrap_Nonterminals :: T_Nonterminals ->+ Inh_Nonterminals ->+ Syn_Nonterminals+wrap_Nonterminals (T_Nonterminals sem) (Inh_Nonterminals) =+ (let ( _lhsOpp,_lhsOppL) = sem+ in (Syn_Nonterminals _lhsOpp _lhsOppL))+sem_Nonterminals_Cons :: T_Nonterminal ->+ T_Nonterminals ->+ T_Nonterminals+sem_Nonterminals_Cons (T_Nonterminal hd_) (T_Nonterminals tl_) = (T_Nonterminals (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc _hdIpp :: PP_Doc@@ -342,41 +342,41 @@ _lhsOppL = ({-# LINE 75 "src-ag/AbstractSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 346 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 346 "dist/build/AbstractSyntaxDump" #-} ) -- use rule "src-ag/AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "src-ag/AbstractSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 352 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 352 "dist/build/AbstractSyntaxDump" #-} ) ( _hdIpp) =- hd_ + hd_ ( _tlIpp,_tlIppL) =- tl_ - in ( _lhsOpp,_lhsOppL)) )-sem_Nonterminals_Nil :: T_Nonterminals -sem_Nonterminals_Nil =+ tl_+ in ( _lhsOpp,_lhsOppL)))+sem_Nonterminals_Nil :: T_Nonterminals+sem_Nonterminals_Nil = (T_Nonterminals (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc -- "src-ag/AbstractSyntaxDump.ag"(line 76, column 33) _lhsOppL = ({-# LINE 76 "src-ag/AbstractSyntaxDump.ag" #-} []- {-# LINE 367 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 367 "dist/build/AbstractSyntaxDump" #-} ) -- use rule "src-ag/AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "src-ag/AbstractSyntaxDump.ag" #-} empty- {-# LINE 373 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 373 "dist/build/AbstractSyntaxDump" #-} )- in ( _lhsOpp,_lhsOppL)) )+ in ( _lhsOpp,_lhsOppL))) -- Pattern ----------------------------------------------------- {- visit 0: synthesized attributes:- copy : SELF + copy : Pattern pp : PP_Doc alternatives: alternative Alias:@@ -405,175 +405,175 @@ local copy : _ -} -- cata-sem_Pattern :: Pattern ->- T_Pattern -sem_Pattern (Alias _field _attr _pat ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) )-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 )+sem_Pattern :: Pattern ->+ T_Pattern+sem_Pattern (Alias _field _attr _pat) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat))+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 ,PP_Doc))-data Inh_Pattern = Inh_Pattern {}-data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: Pattern ,pp_Syn_Pattern :: PP_Doc}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern (T_Pattern sem ) (Inh_Pattern ) =- (let ( _lhsOcopy,_lhsOpp) = sem - in (Syn_Pattern _lhsOcopy _lhsOpp ))+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}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern+wrap_Pattern (T_Pattern sem) (Inh_Pattern) =+ (let ( _lhsOcopy,_lhsOpp) = sem+ in (Syn_Pattern _lhsOcopy _lhsOpp)) sem_Pattern_Alias :: Identifier -> Identifier ->- T_Pattern ->- T_Pattern -sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) =+ T_Pattern ->+ T_Pattern+sem_Pattern_Alias field_ attr_ (T_Pattern pat_) = (T_Pattern (let _lhsOpp :: PP_Doc- _lhsOcopy :: Pattern - _patIcopy :: Pattern + _lhsOcopy :: Pattern+ _patIcopy :: Pattern _patIpp :: PP_Doc -- "src-ag/AbstractSyntaxDump.ag"(line 46, column 33) _lhsOpp = ({-# LINE 46 "src-ag/AbstractSyntaxDump.ag" #-} ppNestInfo ["Pattern","Alias"] [pp field_, pp attr_] [ppF "pat" $ _patIpp] []- {-# LINE 444 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 444 "dist/build/AbstractSyntaxDump" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} Alias field_ attr_ _patIcopy- {-# LINE 450 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 450 "dist/build/AbstractSyntaxDump" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 456 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 456 "dist/build/AbstractSyntaxDump" #-} ) ( _patIcopy,_patIpp) =- pat_ - in ( _lhsOcopy,_lhsOpp)) )+ pat_+ in ( _lhsOcopy,_lhsOpp))) sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr name_ (T_Patterns pats_ ) =+ T_Patterns ->+ 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]) -- "src-ag/AbstractSyntaxDump.ag"(line 44, column 33) _lhsOpp = ({-# LINE 44 "src-ag/AbstractSyntaxDump.ag" #-} ppNestInfo ["Pattern","Constr"] [pp name_] [ppF "pats" $ ppVList _patsIppL] []- {-# LINE 474 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 474 "dist/build/AbstractSyntaxDump" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} Constr name_ _patsIcopy- {-# LINE 480 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 480 "dist/build/AbstractSyntaxDump" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 486 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 486 "dist/build/AbstractSyntaxDump" #-} ) ( _patsIcopy,_patsIpp,_patsIppL) =- pats_ - in ( _lhsOcopy,_lhsOpp)) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable (T_Pattern pat_ ) =+ pats_+ in ( _lhsOcopy,_lhsOpp)))+sem_Pattern_Irrefutable :: T_Pattern ->+ 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 "src-ag/AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "src-ag/AbstractSyntaxDump.ag" #-} _patIpp- {-# LINE 502 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 502 "dist/build/AbstractSyntaxDump" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} Irrefutable _patIcopy- {-# LINE 508 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 508 "dist/build/AbstractSyntaxDump" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 514 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 514 "dist/build/AbstractSyntaxDump" #-} ) ( _patIcopy,_patIpp) =- pat_ - in ( _lhsOcopy,_lhsOpp)) )+ pat_+ in ( _lhsOcopy,_lhsOpp))) sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product pos_ (T_Patterns pats_ ) =+ T_Patterns ->+ 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]) -- "src-ag/AbstractSyntaxDump.ag"(line 45, column 33) _lhsOpp = ({-# LINE 45 "src-ag/AbstractSyntaxDump.ag" #-} ppNestInfo ["Pattern","Product"] [ppShow pos_] [ppF "pats" $ ppVList _patsIppL] []- {-# LINE 532 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 532 "dist/build/AbstractSyntaxDump" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} Product pos_ _patsIcopy- {-# LINE 538 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 538 "dist/build/AbstractSyntaxDump" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 544 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 544 "dist/build/AbstractSyntaxDump" #-} ) ( _patsIcopy,_patsIpp,_patsIppL) =- pats_ - in ( _lhsOcopy,_lhsOpp)) )+ pats_+ in ( _lhsOcopy,_lhsOpp))) sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore pos_ =+ T_Pattern+sem_Pattern_Underscore pos_ = (T_Pattern (let _lhsOpp :: PP_Doc- _lhsOcopy :: Pattern + _lhsOcopy :: Pattern -- "src-ag/AbstractSyntaxDump.ag"(line 47, column 25) _lhsOpp = ({-# LINE 47 "src-ag/AbstractSyntaxDump.ag" #-} ppNestInfo ["Pattern","Underscore"] [ppShow pos_] [] []- {-# LINE 558 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 558 "dist/build/AbstractSyntaxDump" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} Underscore pos_- {-# LINE 564 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 564 "dist/build/AbstractSyntaxDump" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 570 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 570 "dist/build/AbstractSyntaxDump" #-} )- in ( _lhsOcopy,_lhsOpp)) )+ in ( _lhsOcopy,_lhsOpp))) -- Patterns ---------------------------------------------------- {- visit 0: synthesized attributes:- copy : SELF + copy : Patterns pp : PP_Doc ppL : [PP_Doc] alternatives:@@ -587,91 +587,91 @@ local copy : _ -} -- cata-sem_Patterns :: Patterns ->- T_Patterns -sem_Patterns list =- (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list) )+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 ,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])}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns (T_Patterns sem ) (Inh_Patterns ) =- (let ( _lhsOcopy,_lhsOpp,_lhsOppL) = sem - in (Syn_Patterns _lhsOcopy _lhsOpp _lhsOppL ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) =+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])}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns+wrap_Patterns (T_Patterns sem) (Inh_Patterns) =+ (let ( _lhsOcopy,_lhsOpp,_lhsOppL) = sem+ in (Syn_Patterns _lhsOcopy _lhsOpp _lhsOppL))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns+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]) -- "src-ag/AbstractSyntaxDump.ag"(line 55, column 33) _lhsOppL = ({-# LINE 55 "src-ag/AbstractSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 621 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 621 "dist/build/AbstractSyntaxDump" #-} ) -- use rule "src-ag/AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "src-ag/AbstractSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 627 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 627 "dist/build/AbstractSyntaxDump" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} (:) _hdIcopy _tlIcopy- {-# LINE 633 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 633 "dist/build/AbstractSyntaxDump" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 639 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 639 "dist/build/AbstractSyntaxDump" #-} ) ( _hdIcopy,_hdIpp) =- hd_ + hd_ ( _tlIcopy,_tlIpp,_tlIppL) =- tl_ - in ( _lhsOcopy,_lhsOpp,_lhsOppL)) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =+ tl_+ in ( _lhsOcopy,_lhsOpp,_lhsOppL)))+sem_Patterns_Nil :: T_Patterns+sem_Patterns_Nil = (T_Patterns (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc- _lhsOcopy :: Patterns + _lhsOcopy :: Patterns -- "src-ag/AbstractSyntaxDump.ag"(line 56, column 33) _lhsOppL = ({-# LINE 56 "src-ag/AbstractSyntaxDump.ag" #-} []- {-# LINE 655 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 655 "dist/build/AbstractSyntaxDump" #-} ) -- use rule "src-ag/AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "src-ag/AbstractSyntaxDump.ag" #-} empty- {-# LINE 661 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 661 "dist/build/AbstractSyntaxDump" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} []- {-# LINE 667 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 667 "dist/build/AbstractSyntaxDump" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 673 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 673 "dist/build/AbstractSyntaxDump" #-} )- in ( _lhsOcopy,_lhsOpp,_lhsOppL)) )+ in ( _lhsOcopy,_lhsOpp,_lhsOppL))) -- Production -------------------------------------------------- {- visit 0:@@ -688,29 +688,29 @@ child macro : {MaybeMacro} -} -- cata-sem_Production :: Production ->- T_Production -sem_Production (Production _con _params _constraints _children _rules _typeSigs _macro ) =- (sem_Production_Production _con _params _constraints (sem_Children _children ) (sem_Rules _rules ) (sem_TypeSigs _typeSigs ) _macro )+sem_Production :: Production ->+ T_Production+sem_Production (Production _con _params _constraints _children _rules _typeSigs _macro) =+ (sem_Production_Production _con _params _constraints (sem_Children _children) (sem_Rules _rules) (sem_TypeSigs _typeSigs) _macro) -- semantic domain-newtype T_Production = T_Production (( PP_Doc))-data Inh_Production = Inh_Production {}-data Syn_Production = Syn_Production {pp_Syn_Production :: PP_Doc}-wrap_Production :: T_Production ->- Inh_Production ->- Syn_Production -wrap_Production (T_Production sem ) (Inh_Production ) =- (let ( _lhsOpp) = sem - in (Syn_Production _lhsOpp ))+newtype T_Production = T_Production (( PP_Doc))+data Inh_Production = Inh_Production {}+data Syn_Production = Syn_Production {pp_Syn_Production :: PP_Doc}+wrap_Production :: T_Production ->+ Inh_Production ->+ Syn_Production+wrap_Production (T_Production sem) (Inh_Production) =+ (let ( _lhsOpp) = sem+ in (Syn_Production _lhsOpp)) sem_Production_Production :: ConstructorIdent -> ([Identifier]) -> ([Type]) ->- T_Children ->- T_Rules ->- T_TypeSigs ->+ T_Children ->+ T_Rules ->+ T_TypeSigs -> MaybeMacro ->- T_Production -sem_Production_Production con_ params_ constraints_ (T_Children children_ ) (T_Rules rules_ ) (T_TypeSigs typeSigs_ ) macro_ =+ T_Production+sem_Production_Production con_ params_ constraints_ (T_Children children_) (T_Rules rules_) (T_TypeSigs typeSigs_) macro_ = (T_Production (let _lhsOpp :: PP_Doc _childrenIpp :: PP_Doc _childrenIppL :: ([PP_Doc])@@ -722,15 +722,15 @@ _lhsOpp = ({-# LINE 32 "src-ag/AbstractSyntaxDump.ag" #-} ppNestInfo ["Production","Production"] [pp con_] [ppF "children" $ ppVList _childrenIppL,ppF "rules" $ ppVList _rulesIppL,ppF "typeSigs" $ ppVList _typeSigsIppL] []- {-# LINE 726 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 726 "dist/build/AbstractSyntaxDump" #-} ) ( _childrenIpp,_childrenIppL) =- children_ + children_ ( _rulesIpp,_rulesIppL) =- rules_ + rules_ ( _typeSigsIpp,_typeSigsIppL) =- typeSigs_ - in ( _lhsOpp)) )+ typeSigs_+ in ( _lhsOpp))) -- Productions ------------------------------------------------- {- visit 0:@@ -744,24 +744,24 @@ alternative Nil: -} -- cata-sem_Productions :: Productions ->- T_Productions -sem_Productions list =- (Prelude.foldr sem_Productions_Cons sem_Productions_Nil (Prelude.map sem_Production list) )+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 (( PP_Doc,([PP_Doc])))-data Inh_Productions = Inh_Productions {}-data Syn_Productions = Syn_Productions {pp_Syn_Productions :: PP_Doc,ppL_Syn_Productions :: ([PP_Doc])}-wrap_Productions :: T_Productions ->- Inh_Productions ->- Syn_Productions -wrap_Productions (T_Productions sem ) (Inh_Productions ) =- (let ( _lhsOpp,_lhsOppL) = sem - in (Syn_Productions _lhsOpp _lhsOppL ))-sem_Productions_Cons :: T_Production ->- T_Productions ->- T_Productions -sem_Productions_Cons (T_Production hd_ ) (T_Productions tl_ ) =+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])}+wrap_Productions :: T_Productions ->+ Inh_Productions ->+ Syn_Productions+wrap_Productions (T_Productions sem) (Inh_Productions) =+ (let ( _lhsOpp,_lhsOppL) = sem+ in (Syn_Productions _lhsOpp _lhsOppL))+sem_Productions_Cons :: T_Production ->+ T_Productions ->+ T_Productions+sem_Productions_Cons (T_Production hd_) (T_Productions tl_) = (T_Productions (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc _hdIpp :: PP_Doc@@ -771,36 +771,36 @@ _lhsOppL = ({-# LINE 71 "src-ag/AbstractSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 775 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 775 "dist/build/AbstractSyntaxDump" #-} ) -- use rule "src-ag/AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "src-ag/AbstractSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 781 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 781 "dist/build/AbstractSyntaxDump" #-} ) ( _hdIpp) =- hd_ + hd_ ( _tlIpp,_tlIppL) =- tl_ - in ( _lhsOpp,_lhsOppL)) )-sem_Productions_Nil :: T_Productions -sem_Productions_Nil =+ tl_+ in ( _lhsOpp,_lhsOppL)))+sem_Productions_Nil :: T_Productions+sem_Productions_Nil = (T_Productions (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc -- "src-ag/AbstractSyntaxDump.ag"(line 72, column 33) _lhsOppL = ({-# LINE 72 "src-ag/AbstractSyntaxDump.ag" #-} []- {-# LINE 796 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 796 "dist/build/AbstractSyntaxDump" #-} ) -- use rule "src-ag/AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "src-ag/AbstractSyntaxDump.ag" #-} empty- {-# LINE 802 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 802 "dist/build/AbstractSyntaxDump" #-} )- in ( _lhsOpp,_lhsOppL)) )+ in ( _lhsOpp,_lhsOppL))) -- Rule -------------------------------------------------------- {- visit 0:@@ -820,23 +820,23 @@ child eager : {Bool} -} -- cata-sem_Rule :: Rule ->- T_Rule -sem_Rule (Rule _mbName _pattern _rhs _owrt _origin _explicit _pure _identity _mbError _eager ) =- (sem_Rule_Rule _mbName (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin _explicit _pure _identity _mbError _eager )+sem_Rule :: Rule ->+ T_Rule+sem_Rule (Rule _mbName _pattern _rhs _owrt _origin _explicit _pure _identity _mbError _eager) =+ (sem_Rule_Rule _mbName (sem_Pattern _pattern) (sem_Expression _rhs) _owrt _origin _explicit _pure _identity _mbError _eager) -- semantic domain-newtype T_Rule = T_Rule (( PP_Doc))-data Inh_Rule = Inh_Rule {}-data Syn_Rule = Syn_Rule {pp_Syn_Rule :: PP_Doc}-wrap_Rule :: T_Rule ->- Inh_Rule ->- Syn_Rule -wrap_Rule (T_Rule sem ) (Inh_Rule ) =- (let ( _lhsOpp) = sem - in (Syn_Rule _lhsOpp ))+newtype T_Rule = T_Rule (( PP_Doc))+data Inh_Rule = Inh_Rule {}+data Syn_Rule = Syn_Rule {pp_Syn_Rule :: PP_Doc}+wrap_Rule :: T_Rule ->+ Inh_Rule ->+ Syn_Rule+wrap_Rule (T_Rule sem) (Inh_Rule) =+ (let ( _lhsOpp) = sem+ in (Syn_Rule _lhsOpp)) sem_Rule_Rule :: (Maybe Identifier) ->- T_Pattern ->- T_Expression ->+ T_Pattern ->+ T_Expression -> Bool -> String -> Bool ->@@ -844,23 +844,23 @@ Bool -> (Maybe Error) -> Bool ->- T_Rule -sem_Rule_Rule mbName_ (T_Pattern pattern_ ) (T_Expression rhs_ ) owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_ =+ T_Rule+sem_Rule_Rule mbName_ (T_Pattern pattern_) (T_Expression rhs_) owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_ = (T_Rule (let _lhsOpp :: PP_Doc- _patternIcopy :: Pattern + _patternIcopy :: Pattern _patternIpp :: PP_Doc _rhsIpp :: PP_Doc -- "src-ag/AbstractSyntaxDump.ag"(line 38, column 33) _lhsOpp = ({-# LINE 38 "src-ag/AbstractSyntaxDump.ag" #-} ppNestInfo ["Rule","Rule"] [ppShow owrt_, pp origin_] [ppF "pattern" $ _patternIpp, ppF "rhs" $ _rhsIpp] []- {-# LINE 858 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 858 "dist/build/AbstractSyntaxDump" #-} ) ( _patternIcopy,_patternIpp) =- pattern_ + pattern_ ( _rhsIpp) =- rhs_ - in ( _lhsOpp)) )+ rhs_+ in ( _lhsOpp))) -- Rules ------------------------------------------------------- {- visit 0:@@ -874,24 +874,24 @@ alternative Nil: -} -- cata-sem_Rules :: Rules ->- T_Rules -sem_Rules list =- (Prelude.foldr sem_Rules_Cons sem_Rules_Nil (Prelude.map sem_Rule list) )+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 (( PP_Doc,([PP_Doc])))-data Inh_Rules = Inh_Rules {}-data Syn_Rules = Syn_Rules {pp_Syn_Rules :: PP_Doc,ppL_Syn_Rules :: ([PP_Doc])}-wrap_Rules :: T_Rules ->- Inh_Rules ->- Syn_Rules -wrap_Rules (T_Rules sem ) (Inh_Rules ) =- (let ( _lhsOpp,_lhsOppL) = sem - in (Syn_Rules _lhsOpp _lhsOppL ))-sem_Rules_Cons :: T_Rule ->- T_Rules ->- T_Rules -sem_Rules_Cons (T_Rule hd_ ) (T_Rules tl_ ) =+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])}+wrap_Rules :: T_Rules ->+ Inh_Rules ->+ Syn_Rules+wrap_Rules (T_Rules sem) (Inh_Rules) =+ (let ( _lhsOpp,_lhsOppL) = sem+ in (Syn_Rules _lhsOpp _lhsOppL))+sem_Rules_Cons :: T_Rule ->+ T_Rules ->+ T_Rules+sem_Rules_Cons (T_Rule hd_) (T_Rules tl_) = (T_Rules (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc _hdIpp :: PP_Doc@@ -901,36 +901,36 @@ _lhsOppL = ({-# LINE 63 "src-ag/AbstractSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 905 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 905 "dist/build/AbstractSyntaxDump" #-} ) -- use rule "src-ag/AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "src-ag/AbstractSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 911 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 911 "dist/build/AbstractSyntaxDump" #-} ) ( _hdIpp) =- hd_ + hd_ ( _tlIpp,_tlIppL) =- tl_ - in ( _lhsOpp,_lhsOppL)) )-sem_Rules_Nil :: T_Rules -sem_Rules_Nil =+ tl_+ in ( _lhsOpp,_lhsOppL)))+sem_Rules_Nil :: T_Rules+sem_Rules_Nil = (T_Rules (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc -- "src-ag/AbstractSyntaxDump.ag"(line 64, column 33) _lhsOppL = ({-# LINE 64 "src-ag/AbstractSyntaxDump.ag" #-} []- {-# LINE 926 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 926 "dist/build/AbstractSyntaxDump" #-} ) -- use rule "src-ag/AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "src-ag/AbstractSyntaxDump.ag" #-} empty- {-# LINE 932 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 932 "dist/build/AbstractSyntaxDump" #-} )- in ( _lhsOpp,_lhsOppL)) )+ in ( _lhsOpp,_lhsOppL))) -- TypeSig ----------------------------------------------------- {- visit 0:@@ -942,32 +942,32 @@ child tp : {Type} -} -- cata-sem_TypeSig :: TypeSig ->- T_TypeSig -sem_TypeSig (TypeSig _name _tp ) =- (sem_TypeSig_TypeSig _name _tp )+sem_TypeSig :: TypeSig ->+ T_TypeSig+sem_TypeSig (TypeSig _name _tp) =+ (sem_TypeSig_TypeSig _name _tp) -- semantic domain-newtype T_TypeSig = T_TypeSig (( PP_Doc))-data Inh_TypeSig = Inh_TypeSig {}-data Syn_TypeSig = Syn_TypeSig {pp_Syn_TypeSig :: PP_Doc}-wrap_TypeSig :: T_TypeSig ->- Inh_TypeSig ->- Syn_TypeSig -wrap_TypeSig (T_TypeSig sem ) (Inh_TypeSig ) =- (let ( _lhsOpp) = sem - in (Syn_TypeSig _lhsOpp ))+newtype T_TypeSig = T_TypeSig (( PP_Doc))+data Inh_TypeSig = Inh_TypeSig {}+data Syn_TypeSig = Syn_TypeSig {pp_Syn_TypeSig :: PP_Doc}+wrap_TypeSig :: T_TypeSig ->+ Inh_TypeSig ->+ Syn_TypeSig+wrap_TypeSig (T_TypeSig sem) (Inh_TypeSig) =+ (let ( _lhsOpp) = sem+ in (Syn_TypeSig _lhsOpp)) sem_TypeSig_TypeSig :: Identifier -> Type ->- T_TypeSig -sem_TypeSig_TypeSig name_ tp_ =+ T_TypeSig+sem_TypeSig_TypeSig name_ tp_ = (T_TypeSig (let _lhsOpp :: PP_Doc -- "src-ag/AbstractSyntaxDump.ag"(line 41, column 33) _lhsOpp = ({-# LINE 41 "src-ag/AbstractSyntaxDump.ag" #-} ppNestInfo ["TypeSig","TypeSig"] [pp name_, ppShow tp_] [] []- {-# LINE 969 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 969 "dist/build/AbstractSyntaxDump" #-} )- in ( _lhsOpp)) )+ in ( _lhsOpp))) -- TypeSigs ---------------------------------------------------- {- visit 0:@@ -981,24 +981,24 @@ alternative Nil: -} -- cata-sem_TypeSigs :: TypeSigs ->- T_TypeSigs -sem_TypeSigs list =- (Prelude.foldr sem_TypeSigs_Cons sem_TypeSigs_Nil (Prelude.map sem_TypeSig list) )+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 (( PP_Doc,([PP_Doc])))-data Inh_TypeSigs = Inh_TypeSigs {}-data Syn_TypeSigs = Syn_TypeSigs {pp_Syn_TypeSigs :: PP_Doc,ppL_Syn_TypeSigs :: ([PP_Doc])}-wrap_TypeSigs :: T_TypeSigs ->- Inh_TypeSigs ->- Syn_TypeSigs -wrap_TypeSigs (T_TypeSigs sem ) (Inh_TypeSigs ) =- (let ( _lhsOpp,_lhsOppL) = sem - in (Syn_TypeSigs _lhsOpp _lhsOppL ))-sem_TypeSigs_Cons :: T_TypeSig ->- T_TypeSigs ->- T_TypeSigs -sem_TypeSigs_Cons (T_TypeSig hd_ ) (T_TypeSigs tl_ ) =+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])}+wrap_TypeSigs :: T_TypeSigs ->+ Inh_TypeSigs ->+ Syn_TypeSigs+wrap_TypeSigs (T_TypeSigs sem) (Inh_TypeSigs) =+ (let ( _lhsOpp,_lhsOppL) = sem+ in (Syn_TypeSigs _lhsOpp _lhsOppL))+sem_TypeSigs_Cons :: T_TypeSig ->+ T_TypeSigs ->+ T_TypeSigs+sem_TypeSigs_Cons (T_TypeSig hd_) (T_TypeSigs tl_) = (T_TypeSigs (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc _hdIpp :: PP_Doc@@ -1008,33 +1008,33 @@ _lhsOppL = ({-# LINE 59 "src-ag/AbstractSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 1012 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 1012 "dist/build/AbstractSyntaxDump" #-} ) -- use rule "src-ag/AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "src-ag/AbstractSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 1018 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 1018 "dist/build/AbstractSyntaxDump" #-} ) ( _hdIpp) =- hd_ + hd_ ( _tlIpp,_tlIppL) =- tl_ - in ( _lhsOpp,_lhsOppL)) )-sem_TypeSigs_Nil :: T_TypeSigs -sem_TypeSigs_Nil =+ tl_+ in ( _lhsOpp,_lhsOppL)))+sem_TypeSigs_Nil :: T_TypeSigs+sem_TypeSigs_Nil = (T_TypeSigs (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc -- "src-ag/AbstractSyntaxDump.ag"(line 60, column 33) _lhsOppL = ({-# LINE 60 "src-ag/AbstractSyntaxDump.ag" #-} []- {-# LINE 1033 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 1033 "dist/build/AbstractSyntaxDump" #-} ) -- use rule "src-ag/AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "src-ag/AbstractSyntaxDump.ag" #-} empty- {-# LINE 1039 "src-ag/AbstractSyntaxDump.hs" #-}+ {-# LINE 1039 "dist/build/AbstractSyntaxDump" #-} )- in ( _lhsOpp,_lhsOppL)) )+ in ( _lhsOpp,_lhsOppL)))
src-derived/Code.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.39.1.0 (src-ag/Code.ag)+-- UUAGC 0.9.40.1 (src-ag/Code.ag) module Code where {-# LINE 2 "src-ag/Code.ag" #-} @@ -11,7 +11,7 @@ import qualified Data.Set as Set import Data.Map(Map) import qualified Data.Map as Map-{-# LINE 15 "dist/build/uuagc/uuagc-tmp/Code.hs" #-}+{-# LINE 15 "dist/build/Code.hs" #-} {-# LINE 146 "src-ag/Code.ag" #-} -- Unboxed tuples@@ -29,7 +29,7 @@ mkTupleLhs :: Bool -> Bool -> [String] -> Lhs mkTupleLhs unbox noInh comps | not unbox || noInh || length comps == 1 = TupleLhs comps | otherwise = UnboxedTupleLhs comps-{-# LINE 33 "dist/build/uuagc/uuagc-tmp/Code.hs" #-}+{-# LINE 33 "dist/build/Code.hs" #-} -- CaseAlt ----------------------------------------------------- {- alternatives:@@ -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:@@ -138,17 +138,17 @@ child params : {[String]} child tp : Type -}-data Decl = Bind (Lhs ) (Expr ) - | BindLet (Lhs ) (Expr ) - | Comment (String) - | Data (String) (([String])) (DataAlts ) (Bool) (([String])) - | Decl (Lhs ) (Expr ) ((Set String)) ((Set String)) - | EvalDecl (String) (Lhs ) (Expr ) - | NewType (String) (([String])) (String) (Type ) - | PragmaDecl (String) - | Resume (Bool) (String) (Lhs ) (Expr ) - | TSig (String) (Type ) - | Type (String) (([String])) (Type ) +data Decl = Bind (Lhs) (Expr)+ | BindLet (Lhs) (Expr)+ | Comment (String)+ | Data (String) (([String])) (DataAlts) (Bool) (([String]))+ | Decl (Lhs) (Expr) ((Set String)) ((Set String))+ | EvalDecl (String) (Lhs) (Expr)+ | NewType (String) (([String])) (String) (Type)+ | PragmaDecl (String)+ | Resume (Bool) (String) (Lhs) (Expr)+ | TSig (String) (Type)+ | Type (String) (([String])) (Type) -- Decls ------------------------------------------------------- {- alternatives:@@ -157,7 +157,7 @@ child tl : Decls alternative Nil: -}-type Decls = [Decl ]+type Decls = [Decl] -- Expr -------------------------------------------------------- {- alternatives:@@ -214,23 +214,23 @@ alternative UnboxedTupleExpr: child exprs : Exprs -}-data Expr = App (String) (Exprs ) - | Case (Expr ) (CaseAlts ) - | Do (Decls ) (Expr ) - | InvokeExpr (String) (Expr ) (Exprs ) - | Lambda (Exprs ) (Expr ) - | Let (Decls ) (Expr ) - | LineExpr (Expr ) - | PragmaExpr (Bool) (Bool) (String) (Expr ) - | ResultExpr (String) (Expr ) - | ResumeExpr (String) (Expr ) (Lhs ) (Expr ) - | SemFun (String) (Exprs ) (Expr ) - | SimpleExpr (String) - | TextExpr (([String])) - | Trace (String) (Expr ) - | TupleExpr (Exprs ) - | TypedExpr (Expr ) (Type ) - | UnboxedTupleExpr (Exprs ) +data Expr = App (String) (Exprs)+ | Case (Expr) (CaseAlts)+ | Do (Decls) (Expr)+ | InvokeExpr (String) (Expr) (Exprs)+ | Lambda (Exprs) (Expr)+ | Let (Decls) (Expr)+ | LineExpr (Expr)+ | PragmaExpr (Bool) (Bool) (String) (Expr)+ | ResultExpr (String) (Expr)+ | ResumeExpr (String) (Expr) (Lhs) (Expr)+ | SemFun (String) (Exprs) (Expr)+ | SimpleExpr (String)+ | TextExpr (([String]))+ | Trace (String) (Expr)+ | TupleExpr (Exprs)+ | TypedExpr (Expr) (Type)+ | UnboxedTupleExpr (Exprs) -- Exprs ------------------------------------------------------- {- alternatives:@@ -239,7 +239,7 @@ child tl : Exprs alternative Nil: -}-type Exprs = [Expr ]+type Exprs = [Expr] -- Lhs --------------------------------------------------------- {- alternatives:@@ -258,12 +258,12 @@ child name : {String} child sub : Lhs -}-data Lhs = Fun (String) (Exprs ) - | Pattern3 (Pattern) - | Pattern3SM (Pattern) - | TupleLhs (([String])) - | UnboxedTupleLhs (([String])) - | Unwrap (String) (Lhs ) +data Lhs = Fun (String) (Exprs)+ | Pattern3 (Pattern)+ | Pattern3SM (Pattern)+ | TupleLhs (([String]))+ | UnboxedTupleLhs (([String]))+ | Unwrap (String) (Lhs) -- NamedType --------------------------------------------------- {- alternatives:@@ -272,7 +272,7 @@ child name : {String} child tp : Type -}-data NamedType = Named (Bool) (String) (Type ) +data NamedType = Named (Bool) (String) (Type) -- NamedTypes -------------------------------------------------- {- alternatives:@@ -281,7 +281,7 @@ child tl : NamedTypes alternative Nil: -}-type NamedTypes = [NamedType ]+type NamedTypes = [NamedType] -- Program ----------------------------------------------------- {- alternatives:@@ -289,7 +289,7 @@ child chunks : Chunks child ordered : {Bool} -}-data Program = Program (Chunks ) (Bool) +data Program = Program (Chunks) (Bool) -- Type -------------------------------------------------------- {- alternatives:@@ -328,20 +328,20 @@ alternative UnboxedTupleType: child tps : Types -}-data Type = Arr (Type ) (Type ) - | CtxApp (([(String, [String])])) (Type ) - | List (Type ) - | NontermType (String) (([String])) (Bool) - | QuantApp (String) (Type ) - | SimpleType (String) - | TEither (Type ) (Type ) - | TIntMap (Type ) - | TMap (Type ) (Type ) - | TMaybe (Type ) - | TupleType (Types ) - | TypeApp (Type ) (Types ) - | UnboxedTupleType (Types ) - deriving ( Show)+data Type = Arr (Type) (Type)+ | CtxApp (([(String, [String])])) (Type)+ | List (Type)+ | NontermType (String) (([String])) (Bool)+ | QuantApp (String) (Type)+ | SimpleType (String)+ | TEither (Type) (Type)+ | TIntMap (Type)+ | TMap (Type) (Type)+ | TMaybe (Type)+ | TupleType (Types)+ | TypeApp (Type) (Types)+ | UnboxedTupleType (Types)+ deriving ( Show) -- Types ------------------------------------------------------- {- alternatives:@@ -350,4 +350,4 @@ child tl : Types alternative Nil: -}-type Types = [Type ]+type Types = [Type]
src-derived/CodeSyntax.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.39.1.0 (src-ag/CodeSyntax.ag)+-- UUAGC 0.9.40.1 (src-ag/CodeSyntax.ag) module CodeSyntax where {-# LINE 2 "src-ag/CodeSyntax.ag" #-} @@ -8,7 +8,7 @@ import CommonTypes import Data.Map(Map) import Data.Set(Set)-{-# LINE 12 "dist/build/uuagc/uuagc-tmp/CodeSyntax.hs" #-}+{-# LINE 12 "dist/build/CodeSyntax.hs" #-} -- CGrammar ---------------------------------------------------- {- alternatives:@@ -25,14 +25,14 @@ child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))} child multivisit : {Bool} -}-data CGrammar = CGrammar (TypeSyns) (Derivings) ((Set NontermIdent)) (CNonterminals ) (PragmaMap) (ParamMap) (ContextMap) (QuantMap) ((Map NontermIdent (Map ConstructorIdent (Set Identifier)))) ((Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))) (Bool) +data CGrammar = CGrammar (TypeSyns) (Derivings) ((Set NontermIdent)) (CNonterminals) (PragmaMap) (ParamMap) (ContextMap) (QuantMap) ((Map NontermIdent (Map ConstructorIdent (Set Identifier)))) ((Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))) (Bool) -- CInterface -------------------------------------------------- {- alternatives: alternative CInterface: child seg : CSegments -}-data CInterface = CInterface (CSegments ) +data CInterface = CInterface (CSegments) -- CNonterminal ------------------------------------------------ {- alternatives:@@ -44,7 +44,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:@@ -53,7 +53,7 @@ child tl : CNonterminals alternative Nil: -}-type CNonterminals = [CNonterminal ]+type CNonterminals = [CNonterminal] -- CProduction ------------------------------------------------- {- alternatives:@@ -63,7 +63,7 @@ child children : {[(Identifier,Type,ChildKind)]} child terminals : {[Identifier]} -}-data CProduction = CProduction (ConstructorIdent) (CVisits ) (([(Identifier,Type,ChildKind)])) (([Identifier])) +data CProduction = CProduction (ConstructorIdent) (CVisits) (([(Identifier,Type,ChildKind)])) (([Identifier])) -- CProductions ------------------------------------------------ {- alternatives:@@ -72,7 +72,7 @@ child tl : CProductions alternative Nil: -}-type CProductions = [CProduction ]+type CProductions = [CProduction] -- CRule ------------------------------------------------------- {- alternatives:@@ -101,8 +101,8 @@ child explicit : {Bool} 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)) +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)) -- CSegment ---------------------------------------------------- {- alternatives:@@ -110,7 +110,7 @@ child inh : {Attributes} child syn : {Attributes} -}-data CSegment = CSegment (Attributes) (Attributes) +data CSegment = CSegment (Attributes) (Attributes) -- CSegments --------------------------------------------------- {- alternatives:@@ -119,7 +119,7 @@ child tl : CSegments alternative Nil: -}-type CSegments = [CSegment ]+type CSegments = [CSegment] -- CVisit ------------------------------------------------------ {- alternatives:@@ -130,7 +130,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:@@ -139,7 +139,7 @@ child tl : CVisits alternative Nil: -}-type CVisits = [CVisit ]+type CVisits = [CVisit] -- Sequence ---------------------------------------------------- {- alternatives:@@ -148,4 +148,4 @@ child tl : Sequence alternative Nil: -}-type Sequence = [CRule ]+type Sequence = [CRule]
src-derived/CodeSyntaxDump.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.39.1.0 (src-ag/CodeSyntaxDump.ag)+-- UUAGC 0.9.40.1 (src-ag/CodeSyntaxDump.ag) module CodeSyntaxDump where {-# LINE 5 "src-ag/CodeSyntaxDump.ag" #-} @@ -11,7 +11,7 @@ import PPUtil import CodeSyntax-{-# LINE 15 "dist/build/uuagc/uuagc-tmp/CodeSyntaxDump.hs" #-}+{-# LINE 15 "dist/build/CodeSyntaxDump.hs" #-} {-# LINE 2 "src-ag/CodeSyntax.ag" #-} @@ -19,14 +19,14 @@ import CommonTypes import Data.Map(Map) import Data.Set(Set)-{-# LINE 23 "dist/build/uuagc/uuagc-tmp/CodeSyntaxDump.hs" #-}+{-# LINE 23 "dist/build/CodeSyntaxDump.hs" #-} {-# LINE 2 "src-ag/Patterns.ag" #-} -- Patterns.ag imports import UU.Scanner.Position(Pos) import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 30 "dist/build/uuagc/uuagc-tmp/CodeSyntaxDump.hs" #-}+{-# LINE 30 "dist/build/CodeSyntaxDump.hs" #-} {-# LINE 15 "src-ag/CodeSyntaxDump.ag" #-} ppChild :: (Identifier,Type,ChildKind) -> PP_Doc@@ -54,7 +54,7 @@ ppStrings :: [String] -> PP_Doc ppStrings = vlist-{-# LINE 58 "dist/build/uuagc/uuagc-tmp/CodeSyntaxDump.hs" #-}+{-# LINE 58 "dist/build/CodeSyntaxDump.hs" #-} -- CGrammar ---------------------------------------------------- {- visit 0:@@ -75,24 +75,24 @@ child multivisit : {Bool} -} -- cata-sem_CGrammar :: CGrammar ->- T_CGrammar -sem_CGrammar (CGrammar _typeSyns _derivings _wrappers _nonts _pragmas _paramMap _contextMap _quantMap _aroundsMap _mergeMap _multivisit ) =- (sem_CGrammar_CGrammar _typeSyns _derivings _wrappers (sem_CNonterminals _nonts ) _pragmas _paramMap _contextMap _quantMap _aroundsMap _mergeMap _multivisit )+sem_CGrammar :: CGrammar ->+ T_CGrammar+sem_CGrammar (CGrammar _typeSyns _derivings _wrappers _nonts _pragmas _paramMap _contextMap _quantMap _aroundsMap _mergeMap _multivisit) =+ (sem_CGrammar_CGrammar _typeSyns _derivings _wrappers (sem_CNonterminals _nonts) _pragmas _paramMap _contextMap _quantMap _aroundsMap _mergeMap _multivisit) -- semantic domain-newtype T_CGrammar = T_CGrammar (( PP_Doc))-data Inh_CGrammar = Inh_CGrammar {}-data Syn_CGrammar = Syn_CGrammar {pp_Syn_CGrammar :: PP_Doc}-wrap_CGrammar :: T_CGrammar ->- Inh_CGrammar ->- Syn_CGrammar -wrap_CGrammar (T_CGrammar sem ) (Inh_CGrammar ) =- (let ( _lhsOpp) = sem - in (Syn_CGrammar _lhsOpp ))+newtype T_CGrammar = T_CGrammar (( PP_Doc))+data Inh_CGrammar = Inh_CGrammar {}+data Syn_CGrammar = Syn_CGrammar {pp_Syn_CGrammar :: PP_Doc}+wrap_CGrammar :: T_CGrammar ->+ Inh_CGrammar ->+ Syn_CGrammar+wrap_CGrammar (T_CGrammar sem) (Inh_CGrammar) =+ (let ( _lhsOpp) = sem+ in (Syn_CGrammar _lhsOpp)) sem_CGrammar_CGrammar :: TypeSyns -> Derivings -> (Set NontermIdent) ->- T_CNonterminals ->+ T_CNonterminals -> PragmaMap -> ParamMap -> ContextMap ->@@ -100,8 +100,8 @@ (Map NontermIdent (Map ConstructorIdent (Set Identifier))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) -> Bool ->- T_CGrammar -sem_CGrammar_CGrammar typeSyns_ derivings_ wrappers_ (T_CNonterminals nonts_ ) pragmas_ paramMap_ contextMap_ quantMap_ aroundsMap_ mergeMap_ multivisit_ =+ T_CGrammar+sem_CGrammar_CGrammar typeSyns_ derivings_ wrappers_ (T_CNonterminals nonts_) pragmas_ paramMap_ contextMap_ quantMap_ aroundsMap_ mergeMap_ multivisit_ = (T_CGrammar (let _lhsOpp :: PP_Doc _nontsIpp :: PP_Doc _nontsIppL :: ([PP_Doc])@@ -113,11 +113,11 @@ , ppF "derivings" $ ppMap $ derivings_ , ppF "nonts" $ ppVList _nontsIppL ] []- {-# LINE 117 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 117 "dist/build/CodeSyntaxDump" #-} ) ( _nontsIpp,_nontsIppL) =- nonts_ - in ( _lhsOpp)) )+ nonts_+ in ( _lhsOpp))) -- CInterface -------------------------------------------------- {- visit 0:@@ -128,23 +128,23 @@ child seg : CSegments -} -- cata-sem_CInterface :: CInterface ->- T_CInterface -sem_CInterface (CInterface _seg ) =- (sem_CInterface_CInterface (sem_CSegments _seg ) )+sem_CInterface :: CInterface ->+ T_CInterface+sem_CInterface (CInterface _seg) =+ (sem_CInterface_CInterface (sem_CSegments _seg)) -- semantic domain-newtype T_CInterface = T_CInterface (( PP_Doc))-data Inh_CInterface = Inh_CInterface {}-data Syn_CInterface = Syn_CInterface {pp_Syn_CInterface :: PP_Doc}-wrap_CInterface :: T_CInterface ->- Inh_CInterface ->- Syn_CInterface -wrap_CInterface (T_CInterface sem ) (Inh_CInterface ) =- (let ( _lhsOpp) = sem - in (Syn_CInterface _lhsOpp ))-sem_CInterface_CInterface :: T_CSegments ->- T_CInterface -sem_CInterface_CInterface (T_CSegments seg_ ) =+newtype T_CInterface = T_CInterface (( PP_Doc))+data Inh_CInterface = Inh_CInterface {}+data Syn_CInterface = Syn_CInterface {pp_Syn_CInterface :: PP_Doc}+wrap_CInterface :: T_CInterface ->+ Inh_CInterface ->+ Syn_CInterface+wrap_CInterface (T_CInterface sem) (Inh_CInterface) =+ (let ( _lhsOpp) = sem+ in (Syn_CInterface _lhsOpp))+sem_CInterface_CInterface :: T_CSegments ->+ T_CInterface+sem_CInterface_CInterface (T_CSegments seg_) = (T_CInterface (let _lhsOpp :: PP_Doc _segIpp :: PP_Doc _segIppL :: ([PP_Doc])@@ -152,11 +152,11 @@ _lhsOpp = ({-# LINE 57 "src-ag/CodeSyntaxDump.ag" #-} ppNestInfo ["CInterface","CInterface"] [] [ppF "seg" $ ppVList _segIppL] []- {-# LINE 156 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 156 "dist/build/CodeSyntaxDump" #-} ) ( _segIpp,_segIppL) =- seg_ - in ( _lhsOpp)) )+ seg_+ in ( _lhsOpp))) -- CNonterminal ------------------------------------------------ {- visit 0:@@ -172,28 +172,28 @@ child inter : CInterface -} -- cata-sem_CNonterminal :: CNonterminal ->- T_CNonterminal -sem_CNonterminal (CNonterminal _nt _params _inh _syn _prods _inter ) =- (sem_CNonterminal_CNonterminal _nt _params _inh _syn (sem_CProductions _prods ) (sem_CInterface _inter ) )+sem_CNonterminal :: CNonterminal ->+ T_CNonterminal+sem_CNonterminal (CNonterminal _nt _params _inh _syn _prods _inter) =+ (sem_CNonterminal_CNonterminal _nt _params _inh _syn (sem_CProductions _prods) (sem_CInterface _inter)) -- semantic domain-newtype T_CNonterminal = T_CNonterminal (( PP_Doc))-data Inh_CNonterminal = Inh_CNonterminal {}-data Syn_CNonterminal = Syn_CNonterminal {pp_Syn_CNonterminal :: PP_Doc}-wrap_CNonterminal :: T_CNonterminal ->- Inh_CNonterminal ->- Syn_CNonterminal -wrap_CNonterminal (T_CNonterminal sem ) (Inh_CNonterminal ) =- (let ( _lhsOpp) = sem - in (Syn_CNonterminal _lhsOpp ))+newtype T_CNonterminal = T_CNonterminal (( PP_Doc))+data Inh_CNonterminal = Inh_CNonterminal {}+data Syn_CNonterminal = Syn_CNonterminal {pp_Syn_CNonterminal :: PP_Doc}+wrap_CNonterminal :: T_CNonterminal ->+ Inh_CNonterminal ->+ Syn_CNonterminal+wrap_CNonterminal (T_CNonterminal sem) (Inh_CNonterminal) =+ (let ( _lhsOpp) = sem+ in (Syn_CNonterminal _lhsOpp)) sem_CNonterminal_CNonterminal :: NontermIdent -> ([Identifier]) -> Attributes -> Attributes ->- T_CProductions ->- T_CInterface ->- T_CNonterminal -sem_CNonterminal_CNonterminal nt_ params_ inh_ syn_ (T_CProductions prods_ ) (T_CInterface inter_ ) =+ T_CProductions ->+ T_CInterface ->+ T_CNonterminal+sem_CNonterminal_CNonterminal nt_ params_ inh_ syn_ (T_CProductions prods_) (T_CInterface inter_) = (T_CNonterminal (let _lhsOpp :: PP_Doc _prodsIpp :: PP_Doc _prodsIppL :: ([PP_Doc])@@ -202,13 +202,13 @@ _lhsOpp = ({-# LINE 54 "src-ag/CodeSyntaxDump.ag" #-} ppNestInfo ["CNonterminal","CNonterminal"] (pp nt_ : map pp params_) [ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_, ppF "prods" $ ppVList _prodsIppL, ppF "inter" _interIpp] []- {-# LINE 206 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 206 "dist/build/CodeSyntaxDump" #-} ) ( _prodsIpp,_prodsIppL) =- prods_ + prods_ ( _interIpp) =- inter_ - in ( _lhsOpp)) )+ inter_+ in ( _lhsOpp))) -- CNonterminals ----------------------------------------------- {- visit 0:@@ -222,24 +222,24 @@ alternative Nil: -} -- cata-sem_CNonterminals :: CNonterminals ->- T_CNonterminals -sem_CNonterminals list =- (Prelude.foldr sem_CNonterminals_Cons sem_CNonterminals_Nil (Prelude.map sem_CNonterminal list) )+sem_CNonterminals :: CNonterminals ->+ T_CNonterminals+sem_CNonterminals list =+ (Prelude.foldr sem_CNonterminals_Cons sem_CNonterminals_Nil (Prelude.map sem_CNonterminal list)) -- semantic domain-newtype T_CNonterminals = T_CNonterminals (( PP_Doc,([PP_Doc])))-data Inh_CNonterminals = Inh_CNonterminals {}-data Syn_CNonterminals = Syn_CNonterminals {pp_Syn_CNonterminals :: PP_Doc,ppL_Syn_CNonterminals :: ([PP_Doc])}-wrap_CNonterminals :: T_CNonterminals ->- Inh_CNonterminals ->- Syn_CNonterminals -wrap_CNonterminals (T_CNonterminals sem ) (Inh_CNonterminals ) =- (let ( _lhsOpp,_lhsOppL) = sem - in (Syn_CNonterminals _lhsOpp _lhsOppL ))-sem_CNonterminals_Cons :: T_CNonterminal ->- T_CNonterminals ->- T_CNonterminals -sem_CNonterminals_Cons (T_CNonterminal hd_ ) (T_CNonterminals tl_ ) =+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])}+wrap_CNonterminals :: T_CNonterminals ->+ Inh_CNonterminals ->+ Syn_CNonterminals+wrap_CNonterminals (T_CNonterminals sem) (Inh_CNonterminals) =+ (let ( _lhsOpp,_lhsOppL) = sem+ in (Syn_CNonterminals _lhsOpp _lhsOppL))+sem_CNonterminals_Cons :: T_CNonterminal ->+ T_CNonterminals ->+ T_CNonterminals+sem_CNonterminals_Cons (T_CNonterminal hd_) (T_CNonterminals tl_) = (T_CNonterminals (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc _hdIpp :: PP_Doc@@ -249,36 +249,36 @@ _lhsOppL = ({-# LINE 102 "src-ag/CodeSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 253 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 253 "dist/build/CodeSyntaxDump" #-} ) -- use rule "src-ag/CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "src-ag/CodeSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 259 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 259 "dist/build/CodeSyntaxDump" #-} ) ( _hdIpp) =- hd_ + hd_ ( _tlIpp,_tlIppL) =- tl_ - in ( _lhsOpp,_lhsOppL)) )-sem_CNonterminals_Nil :: T_CNonterminals -sem_CNonterminals_Nil =+ tl_+ in ( _lhsOpp,_lhsOppL)))+sem_CNonterminals_Nil :: T_CNonterminals+sem_CNonterminals_Nil = (T_CNonterminals (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc -- "src-ag/CodeSyntaxDump.ag"(line 103, column 33) _lhsOppL = ({-# LINE 103 "src-ag/CodeSyntaxDump.ag" #-} []- {-# LINE 274 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 274 "dist/build/CodeSyntaxDump" #-} ) -- use rule "src-ag/CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "src-ag/CodeSyntaxDump.ag" #-} empty- {-# LINE 280 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 280 "dist/build/CodeSyntaxDump" #-} )- in ( _lhsOpp,_lhsOppL)) )+ in ( _lhsOpp,_lhsOppL))) -- CProduction ------------------------------------------------- {- visit 0:@@ -292,26 +292,26 @@ child terminals : {[Identifier]} -} -- cata-sem_CProduction :: CProduction ->- T_CProduction -sem_CProduction (CProduction _con _visits _children _terminals ) =- (sem_CProduction_CProduction _con (sem_CVisits _visits ) _children _terminals )+sem_CProduction :: CProduction ->+ T_CProduction+sem_CProduction (CProduction _con _visits _children _terminals) =+ (sem_CProduction_CProduction _con (sem_CVisits _visits) _children _terminals) -- semantic domain-newtype T_CProduction = T_CProduction (( PP_Doc))-data Inh_CProduction = Inh_CProduction {}-data Syn_CProduction = Syn_CProduction {pp_Syn_CProduction :: PP_Doc}-wrap_CProduction :: T_CProduction ->- Inh_CProduction ->- Syn_CProduction -wrap_CProduction (T_CProduction sem ) (Inh_CProduction ) =- (let ( _lhsOpp) = sem - in (Syn_CProduction _lhsOpp ))+newtype T_CProduction = T_CProduction (( PP_Doc))+data Inh_CProduction = Inh_CProduction {}+data Syn_CProduction = Syn_CProduction {pp_Syn_CProduction :: PP_Doc}+wrap_CProduction :: T_CProduction ->+ Inh_CProduction ->+ Syn_CProduction+wrap_CProduction (T_CProduction sem) (Inh_CProduction) =+ (let ( _lhsOpp) = sem+ in (Syn_CProduction _lhsOpp)) sem_CProduction_CProduction :: ConstructorIdent ->- T_CVisits ->+ T_CVisits -> ([(Identifier,Type,ChildKind)]) -> ([Identifier]) ->- T_CProduction -sem_CProduction_CProduction con_ (T_CVisits visits_ ) children_ terminals_ =+ T_CProduction+sem_CProduction_CProduction con_ (T_CVisits visits_) children_ terminals_ = (T_CProduction (let _lhsOpp :: PP_Doc _visitsIpp :: PP_Doc _visitsIppL :: ([PP_Doc])@@ -319,11 +319,11 @@ _lhsOpp = ({-# LINE 63 "src-ag/CodeSyntaxDump.ag" #-} ppNestInfo ["CProduction","CProduction"] [pp con_] [ppF "visits" $ ppVList _visitsIppL, ppF "children" $ ppVList (map ppChild children_),ppF "terminals" $ ppVList (map ppShow terminals_)] []- {-# LINE 323 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 323 "dist/build/CodeSyntaxDump" #-} ) ( _visitsIpp,_visitsIppL) =- visits_ - in ( _lhsOpp)) )+ visits_+ in ( _lhsOpp))) -- CProductions ------------------------------------------------ {- visit 0:@@ -337,24 +337,24 @@ alternative Nil: -} -- cata-sem_CProductions :: CProductions ->- T_CProductions -sem_CProductions list =- (Prelude.foldr sem_CProductions_Cons sem_CProductions_Nil (Prelude.map sem_CProduction list) )+sem_CProductions :: CProductions ->+ T_CProductions+sem_CProductions list =+ (Prelude.foldr sem_CProductions_Cons sem_CProductions_Nil (Prelude.map sem_CProduction list)) -- semantic domain-newtype T_CProductions = T_CProductions (( PP_Doc,([PP_Doc])))-data Inh_CProductions = Inh_CProductions {}-data Syn_CProductions = Syn_CProductions {pp_Syn_CProductions :: PP_Doc,ppL_Syn_CProductions :: ([PP_Doc])}-wrap_CProductions :: T_CProductions ->- Inh_CProductions ->- Syn_CProductions -wrap_CProductions (T_CProductions sem ) (Inh_CProductions ) =- (let ( _lhsOpp,_lhsOppL) = sem - in (Syn_CProductions _lhsOpp _lhsOppL ))-sem_CProductions_Cons :: T_CProduction ->- T_CProductions ->- T_CProductions -sem_CProductions_Cons (T_CProduction hd_ ) (T_CProductions tl_ ) =+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])}+wrap_CProductions :: T_CProductions ->+ Inh_CProductions ->+ Syn_CProductions+wrap_CProductions (T_CProductions sem) (Inh_CProductions) =+ (let ( _lhsOpp,_lhsOppL) = sem+ in (Syn_CProductions _lhsOpp _lhsOppL))+sem_CProductions_Cons :: T_CProduction ->+ T_CProductions ->+ T_CProductions+sem_CProductions_Cons (T_CProduction hd_) (T_CProductions tl_) = (T_CProductions (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc _hdIpp :: PP_Doc@@ -364,36 +364,36 @@ _lhsOppL = ({-# LINE 94 "src-ag/CodeSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 368 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 368 "dist/build/CodeSyntaxDump" #-} ) -- use rule "src-ag/CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "src-ag/CodeSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 374 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 374 "dist/build/CodeSyntaxDump" #-} ) ( _hdIpp) =- hd_ + hd_ ( _tlIpp,_tlIppL) =- tl_ - in ( _lhsOpp,_lhsOppL)) )-sem_CProductions_Nil :: T_CProductions -sem_CProductions_Nil =+ tl_+ in ( _lhsOpp,_lhsOppL)))+sem_CProductions_Nil :: T_CProductions+sem_CProductions_Nil = (T_CProductions (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc -- "src-ag/CodeSyntaxDump.ag"(line 95, column 33) _lhsOppL = ({-# LINE 95 "src-ag/CodeSyntaxDump.ag" #-} []- {-# LINE 389 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 389 "dist/build/CodeSyntaxDump" #-} ) -- use rule "src-ag/CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "src-ag/CodeSyntaxDump.ag" #-} empty- {-# LINE 395 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 395 "dist/build/CodeSyntaxDump" #-} )- in ( _lhsOpp,_lhsOppL)) )+ in ( _lhsOpp,_lhsOppL))) -- CRule ------------------------------------------------------- {- visit 0:@@ -426,38 +426,38 @@ child mbNamed : {Maybe Identifier} -} -- cata-sem_CRule :: CRule ->- T_CRule -sem_CRule (CChildVisit _name _nt _nr _inh _syn _isLast ) =- (sem_CRule_CChildVisit _name _nt _nr _inh _syn _isLast )-sem_CRule (CRule _name _isIn _hasCode _nt _con _field _childnt _tp _pattern _rhs _defines _owrt _origin _uses _explicit _mbNamed ) =- (sem_CRule_CRule _name _isIn _hasCode _nt _con _field _childnt _tp (sem_Pattern _pattern ) _rhs _defines _owrt _origin _uses _explicit _mbNamed )+sem_CRule :: CRule ->+ T_CRule+sem_CRule (CChildVisit _name _nt _nr _inh _syn _isLast) =+ (sem_CRule_CChildVisit _name _nt _nr _inh _syn _isLast)+sem_CRule (CRule _name _isIn _hasCode _nt _con _field _childnt _tp _pattern _rhs _defines _owrt _origin _uses _explicit _mbNamed) =+ (sem_CRule_CRule _name _isIn _hasCode _nt _con _field _childnt _tp (sem_Pattern _pattern) _rhs _defines _owrt _origin _uses _explicit _mbNamed) -- semantic domain-newtype T_CRule = T_CRule (( PP_Doc))-data Inh_CRule = Inh_CRule {}-data Syn_CRule = Syn_CRule {pp_Syn_CRule :: PP_Doc}-wrap_CRule :: T_CRule ->- Inh_CRule ->- Syn_CRule -wrap_CRule (T_CRule sem ) (Inh_CRule ) =- (let ( _lhsOpp) = sem - in (Syn_CRule _lhsOpp ))+newtype T_CRule = T_CRule (( PP_Doc))+data Inh_CRule = Inh_CRule {}+data Syn_CRule = Syn_CRule {pp_Syn_CRule :: PP_Doc}+wrap_CRule :: T_CRule ->+ Inh_CRule ->+ Syn_CRule+wrap_CRule (T_CRule sem) (Inh_CRule) =+ (let ( _lhsOpp) = sem+ in (Syn_CRule _lhsOpp)) sem_CRule_CChildVisit :: Identifier -> NontermIdent -> Int -> Attributes -> Attributes -> Bool ->- T_CRule -sem_CRule_CChildVisit name_ nt_ nr_ inh_ syn_ isLast_ =+ T_CRule+sem_CRule_CChildVisit name_ nt_ nr_ inh_ syn_ isLast_ = (T_CRule (let _lhsOpp :: PP_Doc -- "src-ag/CodeSyntaxDump.ag"(line 70, column 21) _lhsOpp = ({-# LINE 70 "src-ag/CodeSyntaxDump.ag" #-} ppNestInfo ["CRule","CChildVisit"] [pp name_] [ppF "nt" $ pp nt_, ppF "nr" $ ppShow nr_, ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_, ppF "last" $ ppBool isLast_] []- {-# LINE 459 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 459 "dist/build/CodeSyntaxDump" #-} )- in ( _lhsOpp)) )+ in ( _lhsOpp))) sem_CRule_CRule :: Identifier -> Bool -> Bool ->@@ -466,7 +466,7 @@ Identifier -> (Maybe NontermIdent) -> (Maybe Type) ->- T_Pattern ->+ T_Pattern -> ([String]) -> (Map Int (Identifier,Identifier,Maybe Type)) -> Bool ->@@ -474,20 +474,20 @@ (Set (Identifier, Identifier)) -> Bool -> (Maybe Identifier) ->- T_CRule -sem_CRule_CRule name_ isIn_ hasCode_ nt_ con_ field_ childnt_ tp_ (T_Pattern pattern_ ) rhs_ defines_ owrt_ origin_ uses_ explicit_ mbNamed_ =+ T_CRule+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 -- "src-ag/CodeSyntaxDump.ag"(line 69, column 33) _lhsOpp = ({-# LINE 69 "src-ag/CodeSyntaxDump.ag" #-} ppNestInfo ["CRule","CRule"] [pp name_] [ppF "isIn" $ ppBool isIn_, ppF "hasCode" $ ppBool hasCode_, ppF "nt" $ pp nt_, ppF "con" $ pp con_, ppF "field" $ pp field_, ppF "childnt" $ ppMaybeShow childnt_, ppF "tp" $ ppMaybeShow tp_, ppF "pattern" $ if isIn_ then pp "<no pat because In>" else _patternIpp, ppF "rhs" $ ppStrings rhs_, ppF "defines" $ ppVertexMap defines_, ppF "owrt" $ ppBool owrt_, ppF "origin" $ pp origin_] []- {-# LINE 487 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 487 "dist/build/CodeSyntaxDump" #-} ) ( _patternIcopy,_patternIpp) =- pattern_ - in ( _lhsOpp)) )+ pattern_+ in ( _lhsOpp))) -- CSegment ---------------------------------------------------- {- visit 0:@@ -499,32 +499,32 @@ child syn : {Attributes} -} -- cata-sem_CSegment :: CSegment ->- T_CSegment -sem_CSegment (CSegment _inh _syn ) =- (sem_CSegment_CSegment _inh _syn )+sem_CSegment :: CSegment ->+ T_CSegment+sem_CSegment (CSegment _inh _syn) =+ (sem_CSegment_CSegment _inh _syn) -- semantic domain-newtype T_CSegment = T_CSegment (( PP_Doc))-data Inh_CSegment = Inh_CSegment {}-data Syn_CSegment = Syn_CSegment {pp_Syn_CSegment :: PP_Doc}-wrap_CSegment :: T_CSegment ->- Inh_CSegment ->- Syn_CSegment -wrap_CSegment (T_CSegment sem ) (Inh_CSegment ) =- (let ( _lhsOpp) = sem - in (Syn_CSegment _lhsOpp ))+newtype T_CSegment = T_CSegment (( PP_Doc))+data Inh_CSegment = Inh_CSegment {}+data Syn_CSegment = Syn_CSegment {pp_Syn_CSegment :: PP_Doc}+wrap_CSegment :: T_CSegment ->+ Inh_CSegment ->+ Syn_CSegment+wrap_CSegment (T_CSegment sem) (Inh_CSegment) =+ (let ( _lhsOpp) = sem+ in (Syn_CSegment _lhsOpp)) sem_CSegment_CSegment :: Attributes -> Attributes ->- T_CSegment -sem_CSegment_CSegment inh_ syn_ =+ T_CSegment+sem_CSegment_CSegment inh_ syn_ = (T_CSegment (let _lhsOpp :: PP_Doc -- "src-ag/CodeSyntaxDump.ag"(line 60, column 21) _lhsOpp = ({-# LINE 60 "src-ag/CodeSyntaxDump.ag" #-} ppNestInfo ["CSegment","CSegment"] [] [ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_] []- {-# LINE 526 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 526 "dist/build/CodeSyntaxDump" #-} )- in ( _lhsOpp)) )+ in ( _lhsOpp))) -- CSegments --------------------------------------------------- {- visit 0:@@ -538,24 +538,24 @@ alternative Nil: -} -- cata-sem_CSegments :: CSegments ->- T_CSegments -sem_CSegments list =- (Prelude.foldr sem_CSegments_Cons sem_CSegments_Nil (Prelude.map sem_CSegment list) )+sem_CSegments :: CSegments ->+ T_CSegments+sem_CSegments list =+ (Prelude.foldr sem_CSegments_Cons sem_CSegments_Nil (Prelude.map sem_CSegment list)) -- semantic domain-newtype T_CSegments = T_CSegments (( PP_Doc,([PP_Doc])))-data Inh_CSegments = Inh_CSegments {}-data Syn_CSegments = Syn_CSegments {pp_Syn_CSegments :: PP_Doc,ppL_Syn_CSegments :: ([PP_Doc])}-wrap_CSegments :: T_CSegments ->- Inh_CSegments ->- Syn_CSegments -wrap_CSegments (T_CSegments sem ) (Inh_CSegments ) =- (let ( _lhsOpp,_lhsOppL) = sem - in (Syn_CSegments _lhsOpp _lhsOppL ))-sem_CSegments_Cons :: T_CSegment ->- T_CSegments ->- T_CSegments -sem_CSegments_Cons (T_CSegment hd_ ) (T_CSegments tl_ ) =+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])}+wrap_CSegments :: T_CSegments ->+ Inh_CSegments ->+ Syn_CSegments+wrap_CSegments (T_CSegments sem) (Inh_CSegments) =+ (let ( _lhsOpp,_lhsOppL) = sem+ in (Syn_CSegments _lhsOpp _lhsOppL))+sem_CSegments_Cons :: T_CSegment ->+ T_CSegments ->+ T_CSegments+sem_CSegments_Cons (T_CSegment hd_) (T_CSegments tl_) = (T_CSegments (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc _hdIpp :: PP_Doc@@ -565,36 +565,36 @@ _lhsOppL = ({-# LINE 98 "src-ag/CodeSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 569 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 569 "dist/build/CodeSyntaxDump" #-} ) -- use rule "src-ag/CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "src-ag/CodeSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 575 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 575 "dist/build/CodeSyntaxDump" #-} ) ( _hdIpp) =- hd_ + hd_ ( _tlIpp,_tlIppL) =- tl_ - in ( _lhsOpp,_lhsOppL)) )-sem_CSegments_Nil :: T_CSegments -sem_CSegments_Nil =+ tl_+ in ( _lhsOpp,_lhsOppL)))+sem_CSegments_Nil :: T_CSegments+sem_CSegments_Nil = (T_CSegments (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc -- "src-ag/CodeSyntaxDump.ag"(line 99, column 33) _lhsOppL = ({-# LINE 99 "src-ag/CodeSyntaxDump.ag" #-} []- {-# LINE 590 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 590 "dist/build/CodeSyntaxDump" #-} ) -- use rule "src-ag/CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "src-ag/CodeSyntaxDump.ag" #-} empty- {-# LINE 596 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 596 "dist/build/CodeSyntaxDump" #-} )- in ( _lhsOpp,_lhsOppL)) )+ in ( _lhsOpp,_lhsOppL))) -- CVisit ------------------------------------------------------ {- visit 0:@@ -609,27 +609,27 @@ child ordered : {Bool} -} -- cata-sem_CVisit :: CVisit ->- T_CVisit -sem_CVisit (CVisit _inh _syn _vss _intra _ordered ) =- (sem_CVisit_CVisit _inh _syn (sem_Sequence _vss ) (sem_Sequence _intra ) _ordered )+sem_CVisit :: CVisit ->+ T_CVisit+sem_CVisit (CVisit _inh _syn _vss _intra _ordered) =+ (sem_CVisit_CVisit _inh _syn (sem_Sequence _vss) (sem_Sequence _intra) _ordered) -- semantic domain-newtype T_CVisit = T_CVisit (( PP_Doc))-data Inh_CVisit = Inh_CVisit {}-data Syn_CVisit = Syn_CVisit {pp_Syn_CVisit :: PP_Doc}-wrap_CVisit :: T_CVisit ->- Inh_CVisit ->- Syn_CVisit -wrap_CVisit (T_CVisit sem ) (Inh_CVisit ) =- (let ( _lhsOpp) = sem - in (Syn_CVisit _lhsOpp ))+newtype T_CVisit = T_CVisit (( PP_Doc))+data Inh_CVisit = Inh_CVisit {}+data Syn_CVisit = Syn_CVisit {pp_Syn_CVisit :: PP_Doc}+wrap_CVisit :: T_CVisit ->+ Inh_CVisit ->+ Syn_CVisit+wrap_CVisit (T_CVisit sem) (Inh_CVisit) =+ (let ( _lhsOpp) = sem+ in (Syn_CVisit _lhsOpp)) sem_CVisit_CVisit :: Attributes -> Attributes ->- T_Sequence ->- T_Sequence ->+ T_Sequence ->+ T_Sequence -> Bool ->- T_CVisit -sem_CVisit_CVisit inh_ syn_ (T_Sequence vss_ ) (T_Sequence intra_ ) ordered_ =+ T_CVisit+sem_CVisit_CVisit inh_ syn_ (T_Sequence vss_) (T_Sequence intra_) ordered_ = (T_CVisit (let _lhsOpp :: PP_Doc _vssIppL :: ([PP_Doc]) _intraIppL :: ([PP_Doc])@@ -637,13 +637,13 @@ _lhsOpp = ({-# LINE 66 "src-ag/CodeSyntaxDump.ag" #-} ppNestInfo ["CVisit","CVisit"] [] [ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_, ppF "sequence" $ ppVList _vssIppL, ppF "intra" $ ppVList _intraIppL, ppF "ordered" $ ppBool ordered_] []- {-# LINE 641 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 641 "dist/build/CodeSyntaxDump" #-} ) ( _vssIppL) =- vss_ + vss_ ( _intraIppL) =- intra_ - in ( _lhsOpp)) )+ intra_+ in ( _lhsOpp))) -- CVisits ----------------------------------------------------- {- visit 0:@@ -657,24 +657,24 @@ alternative Nil: -} -- cata-sem_CVisits :: CVisits ->- T_CVisits -sem_CVisits list =- (Prelude.foldr sem_CVisits_Cons sem_CVisits_Nil (Prelude.map sem_CVisit list) )+sem_CVisits :: CVisits ->+ T_CVisits+sem_CVisits list =+ (Prelude.foldr sem_CVisits_Cons sem_CVisits_Nil (Prelude.map sem_CVisit list)) -- semantic domain-newtype T_CVisits = T_CVisits (( PP_Doc,([PP_Doc])))-data Inh_CVisits = Inh_CVisits {}-data Syn_CVisits = Syn_CVisits {pp_Syn_CVisits :: PP_Doc,ppL_Syn_CVisits :: ([PP_Doc])}-wrap_CVisits :: T_CVisits ->- Inh_CVisits ->- Syn_CVisits -wrap_CVisits (T_CVisits sem ) (Inh_CVisits ) =- (let ( _lhsOpp,_lhsOppL) = sem - in (Syn_CVisits _lhsOpp _lhsOppL ))-sem_CVisits_Cons :: T_CVisit ->- T_CVisits ->- T_CVisits -sem_CVisits_Cons (T_CVisit hd_ ) (T_CVisits tl_ ) =+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])}+wrap_CVisits :: T_CVisits ->+ Inh_CVisits ->+ Syn_CVisits+wrap_CVisits (T_CVisits sem) (Inh_CVisits) =+ (let ( _lhsOpp,_lhsOppL) = sem+ in (Syn_CVisits _lhsOpp _lhsOppL))+sem_CVisits_Cons :: T_CVisit ->+ T_CVisits ->+ T_CVisits+sem_CVisits_Cons (T_CVisit hd_) (T_CVisits tl_) = (T_CVisits (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc _hdIpp :: PP_Doc@@ -684,41 +684,41 @@ _lhsOppL = ({-# LINE 90 "src-ag/CodeSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 688 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 688 "dist/build/CodeSyntaxDump" #-} ) -- use rule "src-ag/CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "src-ag/CodeSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 694 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 694 "dist/build/CodeSyntaxDump" #-} ) ( _hdIpp) =- hd_ + hd_ ( _tlIpp,_tlIppL) =- tl_ - in ( _lhsOpp,_lhsOppL)) )-sem_CVisits_Nil :: T_CVisits -sem_CVisits_Nil =+ tl_+ in ( _lhsOpp,_lhsOppL)))+sem_CVisits_Nil :: T_CVisits+sem_CVisits_Nil = (T_CVisits (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc -- "src-ag/CodeSyntaxDump.ag"(line 91, column 33) _lhsOppL = ({-# LINE 91 "src-ag/CodeSyntaxDump.ag" #-} []- {-# LINE 709 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 709 "dist/build/CodeSyntaxDump" #-} ) -- use rule "src-ag/CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "src-ag/CodeSyntaxDump.ag" #-} empty- {-# LINE 715 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 715 "dist/build/CodeSyntaxDump" #-} )- in ( _lhsOpp,_lhsOppL)) )+ in ( _lhsOpp,_lhsOppL))) -- Pattern ----------------------------------------------------- {- visit 0: synthesized attributes:- copy : SELF + copy : Pattern pp : PP_Doc alternatives: alternative Alias:@@ -747,175 +747,175 @@ local copy : _ -} -- cata-sem_Pattern :: Pattern ->- T_Pattern -sem_Pattern (Alias _field _attr _pat ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) )-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 )+sem_Pattern :: Pattern ->+ T_Pattern+sem_Pattern (Alias _field _attr _pat) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat))+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 ,PP_Doc))-data Inh_Pattern = Inh_Pattern {}-data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: Pattern ,pp_Syn_Pattern :: PP_Doc}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern (T_Pattern sem ) (Inh_Pattern ) =- (let ( _lhsOcopy,_lhsOpp) = sem - in (Syn_Pattern _lhsOcopy _lhsOpp ))+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}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern+wrap_Pattern (T_Pattern sem) (Inh_Pattern) =+ (let ( _lhsOcopy,_lhsOpp) = sem+ in (Syn_Pattern _lhsOcopy _lhsOpp)) sem_Pattern_Alias :: Identifier -> Identifier ->- T_Pattern ->- T_Pattern -sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) =+ T_Pattern ->+ T_Pattern+sem_Pattern_Alias field_ attr_ (T_Pattern pat_) = (T_Pattern (let _lhsOpp :: PP_Doc- _lhsOcopy :: Pattern - _patIcopy :: Pattern + _lhsOcopy :: Pattern+ _patIcopy :: Pattern _patIpp :: PP_Doc -- "src-ag/CodeSyntaxDump.ag"(line 75, column 33) _lhsOpp = ({-# LINE 75 "src-ag/CodeSyntaxDump.ag" #-} ppNestInfo ["Pattern","Alias"] [pp field_, pp attr_] [ppF "pat" $ _patIpp] []- {-# LINE 786 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 786 "dist/build/CodeSyntaxDump" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} Alias field_ attr_ _patIcopy- {-# LINE 792 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 792 "dist/build/CodeSyntaxDump" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 798 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 798 "dist/build/CodeSyntaxDump" #-} ) ( _patIcopy,_patIpp) =- pat_ - in ( _lhsOcopy,_lhsOpp)) )+ pat_+ in ( _lhsOcopy,_lhsOpp))) sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr name_ (T_Patterns pats_ ) =+ T_Patterns ->+ 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]) -- "src-ag/CodeSyntaxDump.ag"(line 73, column 33) _lhsOpp = ({-# LINE 73 "src-ag/CodeSyntaxDump.ag" #-} ppNestInfo ["Pattern","Constr"] [pp name_] [ppF "pats" $ ppVList _patsIppL] []- {-# LINE 816 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 816 "dist/build/CodeSyntaxDump" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} Constr name_ _patsIcopy- {-# LINE 822 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 822 "dist/build/CodeSyntaxDump" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 828 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 828 "dist/build/CodeSyntaxDump" #-} ) ( _patsIcopy,_patsIpp,_patsIppL) =- pats_ - in ( _lhsOcopy,_lhsOpp)) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable (T_Pattern pat_ ) =+ pats_+ in ( _lhsOcopy,_lhsOpp)))+sem_Pattern_Irrefutable :: T_Pattern ->+ 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 "src-ag/CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "src-ag/CodeSyntaxDump.ag" #-} _patIpp- {-# LINE 844 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 844 "dist/build/CodeSyntaxDump" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} Irrefutable _patIcopy- {-# LINE 850 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 850 "dist/build/CodeSyntaxDump" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 856 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 856 "dist/build/CodeSyntaxDump" #-} ) ( _patIcopy,_patIpp) =- pat_ - in ( _lhsOcopy,_lhsOpp)) )+ pat_+ in ( _lhsOcopy,_lhsOpp))) sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product pos_ (T_Patterns pats_ ) =+ T_Patterns ->+ 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]) -- "src-ag/CodeSyntaxDump.ag"(line 74, column 33) _lhsOpp = ({-# LINE 74 "src-ag/CodeSyntaxDump.ag" #-} ppNestInfo ["Pattern","Product"] [ppShow pos_] [ppF "pats" $ ppVList _patsIppL] []- {-# LINE 874 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 874 "dist/build/CodeSyntaxDump" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} Product pos_ _patsIcopy- {-# LINE 880 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 880 "dist/build/CodeSyntaxDump" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 886 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 886 "dist/build/CodeSyntaxDump" #-} ) ( _patsIcopy,_patsIpp,_patsIppL) =- pats_ - in ( _lhsOcopy,_lhsOpp)) )+ pats_+ in ( _lhsOcopy,_lhsOpp))) sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore pos_ =+ T_Pattern+sem_Pattern_Underscore pos_ = (T_Pattern (let _lhsOpp :: PP_Doc- _lhsOcopy :: Pattern + _lhsOcopy :: Pattern -- "src-ag/CodeSyntaxDump.ag"(line 76, column 25) _lhsOpp = ({-# LINE 76 "src-ag/CodeSyntaxDump.ag" #-} ppNestInfo ["Pattern","Underscore"] [ppShow pos_] [] []- {-# LINE 900 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 900 "dist/build/CodeSyntaxDump" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} Underscore pos_- {-# LINE 906 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 906 "dist/build/CodeSyntaxDump" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 912 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 912 "dist/build/CodeSyntaxDump" #-} )- in ( _lhsOcopy,_lhsOpp)) )+ in ( _lhsOcopy,_lhsOpp))) -- Patterns ---------------------------------------------------- {- visit 0: synthesized attributes:- copy : SELF + copy : Patterns pp : PP_Doc ppL : [PP_Doc] alternatives:@@ -929,91 +929,91 @@ local copy : _ -} -- cata-sem_Patterns :: Patterns ->- T_Patterns -sem_Patterns list =- (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list) )+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 ,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])}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns (T_Patterns sem ) (Inh_Patterns ) =- (let ( _lhsOcopy,_lhsOpp,_lhsOppL) = sem - in (Syn_Patterns _lhsOcopy _lhsOpp _lhsOppL ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) =+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])}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns+wrap_Patterns (T_Patterns sem) (Inh_Patterns) =+ (let ( _lhsOcopy,_lhsOpp,_lhsOppL) = sem+ in (Syn_Patterns _lhsOcopy _lhsOpp _lhsOppL))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns+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]) -- "src-ag/CodeSyntaxDump.ag"(line 82, column 33) _lhsOppL = ({-# LINE 82 "src-ag/CodeSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 963 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 963 "dist/build/CodeSyntaxDump" #-} ) -- use rule "src-ag/CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "src-ag/CodeSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 969 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 969 "dist/build/CodeSyntaxDump" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} (:) _hdIcopy _tlIcopy- {-# LINE 975 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 975 "dist/build/CodeSyntaxDump" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 981 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 981 "dist/build/CodeSyntaxDump" #-} ) ( _hdIcopy,_hdIpp) =- hd_ + hd_ ( _tlIcopy,_tlIpp,_tlIppL) =- tl_ - in ( _lhsOcopy,_lhsOpp,_lhsOppL)) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =+ tl_+ in ( _lhsOcopy,_lhsOpp,_lhsOppL)))+sem_Patterns_Nil :: T_Patterns+sem_Patterns_Nil = (T_Patterns (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc- _lhsOcopy :: Patterns + _lhsOcopy :: Patterns -- "src-ag/CodeSyntaxDump.ag"(line 83, column 33) _lhsOppL = ({-# LINE 83 "src-ag/CodeSyntaxDump.ag" #-} []- {-# LINE 997 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 997 "dist/build/CodeSyntaxDump" #-} ) -- use rule "src-ag/CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "src-ag/CodeSyntaxDump.ag" #-} empty- {-# LINE 1003 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 1003 "dist/build/CodeSyntaxDump" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} []- {-# LINE 1009 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 1009 "dist/build/CodeSyntaxDump" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 1015 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 1015 "dist/build/CodeSyntaxDump" #-} )- in ( _lhsOcopy,_lhsOpp,_lhsOppL)) )+ in ( _lhsOcopy,_lhsOpp,_lhsOppL))) -- Sequence ---------------------------------------------------- {- visit 0:@@ -1026,24 +1026,24 @@ alternative Nil: -} -- cata-sem_Sequence :: Sequence ->- T_Sequence -sem_Sequence list =- (Prelude.foldr sem_Sequence_Cons sem_Sequence_Nil (Prelude.map sem_CRule list) )+sem_Sequence :: Sequence ->+ T_Sequence+sem_Sequence list =+ (Prelude.foldr sem_Sequence_Cons sem_Sequence_Nil (Prelude.map sem_CRule list)) -- semantic domain-newtype T_Sequence = T_Sequence (( ([PP_Doc])))-data Inh_Sequence = Inh_Sequence {}-data Syn_Sequence = Syn_Sequence {ppL_Syn_Sequence :: ([PP_Doc])}-wrap_Sequence :: T_Sequence ->- Inh_Sequence ->- Syn_Sequence -wrap_Sequence (T_Sequence sem ) (Inh_Sequence ) =- (let ( _lhsOppL) = sem - in (Syn_Sequence _lhsOppL ))-sem_Sequence_Cons :: T_CRule ->- T_Sequence ->- T_Sequence -sem_Sequence_Cons (T_CRule hd_ ) (T_Sequence tl_ ) =+newtype T_Sequence = T_Sequence (( ([PP_Doc])))+data Inh_Sequence = Inh_Sequence {}+data Syn_Sequence = Syn_Sequence {ppL_Syn_Sequence :: ([PP_Doc])}+wrap_Sequence :: T_Sequence ->+ Inh_Sequence ->+ Syn_Sequence+wrap_Sequence (T_Sequence sem) (Inh_Sequence) =+ (let ( _lhsOppL) = sem+ in (Syn_Sequence _lhsOppL))+sem_Sequence_Cons :: T_CRule ->+ T_Sequence ->+ T_Sequence+sem_Sequence_Cons (T_CRule hd_) (T_Sequence tl_) = (T_Sequence (let _lhsOppL :: ([PP_Doc]) _hdIpp :: PP_Doc _tlIppL :: ([PP_Doc])@@ -1051,20 +1051,20 @@ _lhsOppL = ({-# LINE 86 "src-ag/CodeSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 1055 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 1055 "dist/build/CodeSyntaxDump" #-} ) ( _hdIpp) =- hd_ + hd_ ( _tlIppL) =- tl_ - in ( _lhsOppL)) )-sem_Sequence_Nil :: T_Sequence -sem_Sequence_Nil =+ tl_+ in ( _lhsOppL)))+sem_Sequence_Nil :: T_Sequence+sem_Sequence_Nil = (T_Sequence (let _lhsOppL :: ([PP_Doc]) -- "src-ag/CodeSyntaxDump.ag"(line 87, column 33) _lhsOppL = ({-# LINE 87 "src-ag/CodeSyntaxDump.ag" #-} []- {-# LINE 1069 "src-ag/CodeSyntaxDump.hs" #-}+ {-# LINE 1069 "dist/build/CodeSyntaxDump" #-} )- in ( _lhsOppL)) )+ in ( _lhsOppL)))
src-derived/ConcreteSyntax.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.39.1.0 (src-ag/ConcreteSyntax.ag)+-- UUAGC 0.9.40.1 (src-ag/ConcreteSyntax.ag) module ConcreteSyntax where {-# LINE 2 "src-ag/ConcreteSyntax.ag" #-} @@ -9,14 +9,14 @@ import Expression (Expression) import CommonTypes import Macro --marcos-{-# LINE 13 "dist/build/uuagc/uuagc-tmp/ConcreteSyntax.hs" #-}+{-# LINE 13 "dist/build/ConcreteSyntax.hs" #-} -- AG ---------------------------------------------------------- {- alternatives: alternative AG: child elems : Elems -}-data AG = AG (Elems ) +data AG = AG (Elems) -- Alt --------------------------------------------------------- {- alternatives:@@ -27,7 +27,7 @@ child fields : Fields child macro : {MaybeMacro} -}-data Alt = Alt (Pos) (ConstructorSet ) (([Identifier])) (Fields ) (MaybeMacro) +data Alt = Alt (Pos) (ConstructorSet) (([Identifier])) (Fields) (MaybeMacro) -- Alts -------------------------------------------------------- {- alternatives:@@ -36,7 +36,7 @@ child tl : Alts alternative Nil: -}-type Alts = [Alt ]+type Alts = [Alt] -- Attrs ------------------------------------------------------- {- alternatives:@@ -46,7 +46,7 @@ child chn : {AttrNames} child syn : {AttrNames} -}-data Attrs = Attrs (Pos) (AttrNames) (AttrNames) (AttrNames) +data Attrs = Attrs (Pos) (AttrNames) (AttrNames) (AttrNames) -- ConstructorSet ---------------------------------------------- {- alternatives:@@ -60,10 +60,10 @@ child set1 : ConstructorSet child set2 : ConstructorSet -}-data ConstructorSet = CAll - | CDifference (ConstructorSet ) (ConstructorSet ) - | CName (ConstructorIdent) - | CUnion (ConstructorSet ) (ConstructorSet ) +data ConstructorSet = CAll+ | CDifference (ConstructorSet) (ConstructorSet)+ | CName (ConstructorIdent)+ | CUnion (ConstructorSet) (ConstructorSet) -- Elem -------------------------------------------------------- {- alternatives:@@ -123,17 +123,17 @@ child pos : {Pos} child set : NontSet -}-data Elem = Attr (Pos) (ClassContext) (NontSet ) (([String])) (Attrs ) - | Data (Pos) (ClassContext) (NontSet ) (([Identifier])) (Attrs ) (Alts ) (Bool) - | Deriving (Pos) (NontSet ) (([NontermIdent])) - | Module (Pos) (String) (String) (String) - | Nocatas (Pos) (NontSet ) - | Pragma (Pos) (([NontermIdent])) - | Sem (Pos) (ClassContext) (NontSet ) (Attrs ) (([String])) (SemAlts ) - | Set (Pos) (NontermIdent) (Bool) (NontSet ) - | Txt (Pos) (BlockKind) ((Maybe NontermIdent)) (([String])) - | Type (Pos) (ClassContext) (NontermIdent) (([Identifier])) (ComplexType) - | Wrapper (Pos) (NontSet ) +data Elem = Attr (Pos) (ClassContext) (NontSet) (([String])) (Attrs)+ | Data (Pos) (ClassContext) (NontSet) (([Identifier])) (Attrs) (Alts) (Bool)+ | Deriving (Pos) (NontSet) (([NontermIdent]))+ | Module (Pos) (String) (String) (String)+ | Nocatas (Pos) (NontSet)+ | Pragma (Pos) (([NontermIdent]))+ | Sem (Pos) (ClassContext) (NontSet) (Attrs) (([String])) (SemAlts)+ | Set (Pos) (NontermIdent) (Bool) (NontSet)+ | Txt (Pos) (BlockKind) ((Maybe NontermIdent)) (([String]))+ | Type (Pos) (ClassContext) (NontermIdent) (([Identifier])) (ComplexType)+ | Wrapper (Pos) (NontSet) -- Elems ------------------------------------------------------- {- alternatives:@@ -142,7 +142,7 @@ child tl : Elems alternative Nil: -}-type Elems = [Elem ]+type Elems = [Elem] -- Field ------------------------------------------------------- {- alternatives:@@ -152,8 +152,8 @@ alternative FCtx: child tps : {[Type]} -}-data Field = FChild (Identifier) (Type) - | FCtx (([Type])) +data Field = FChild (Identifier) (Type)+ | FCtx (([Type])) -- Fields ------------------------------------------------------ {- alternatives:@@ -162,7 +162,7 @@ child tl : Fields alternative Nil: -}-type Fields = [Field ]+type Fields = [Field] -- NontSet ----------------------------------------------------- {- alternatives:@@ -182,12 +182,12 @@ child set1 : NontSet child set2 : NontSet -}-data NontSet = All - | Difference (NontSet ) (NontSet ) - | Intersect (NontSet ) (NontSet ) - | NamedSet (NontermIdent) - | Path (NontermIdent) (NontermIdent) - | Union (NontSet ) (NontSet ) +data NontSet = All+ | Difference (NontSet) (NontSet)+ | Intersect (NontSet) (NontSet)+ | NamedSet (NontermIdent)+ | Path (NontermIdent) (NontermIdent)+ | Union (NontSet) (NontSet) -- SemAlt ------------------------------------------------------ {- alternatives:@@ -196,7 +196,7 @@ child constructorSet : ConstructorSet child rules : SemDefs -}-data SemAlt = SemAlt (Pos) (ConstructorSet ) (SemDefs ) +data SemAlt = SemAlt (Pos) (ConstructorSet) (SemDefs) -- SemAlts ----------------------------------------------------- {- alternatives:@@ -205,7 +205,7 @@ child tl : SemAlts alternative Nil: -}-type SemAlts = [SemAlt ]+type SemAlts = [SemAlt] -- SemDef ------------------------------------------------------ {- alternatives:@@ -241,14 +241,14 @@ child ident : {Identifier} child ref : {Identifier} -}-data SemDef = AroundDef (Identifier) (Expression) - | AttrOrderBefore (([Occurrence])) (([Occurrence])) - | AugmentDef (Identifier) (Expression) - | Def (Pos) ((Maybe Identifier)) (Pattern) (Expression) (Bool) (Bool) (Bool) - | MergeDef (Identifier) (Identifier) (([Identifier])) (Expression) - | SemPragma (([NontermIdent])) - | TypeDef (Pos) (Identifier) (Type) - | UniqueDef (Identifier) (Identifier) +data SemDef = AroundDef (Identifier) (Expression)+ | AttrOrderBefore (([Occurrence])) (([Occurrence]))+ | AugmentDef (Identifier) (Expression)+ | Def (Pos) ((Maybe Identifier)) (Pattern) (Expression) (Bool) (Bool) (Bool)+ | MergeDef (Identifier) (Identifier) (([Identifier])) (Expression)+ | SemPragma (([NontermIdent]))+ | TypeDef (Pos) (Identifier) (Type)+ | UniqueDef (Identifier) (Identifier) -- SemDefs ----------------------------------------------------- {- alternatives:@@ -257,4 +257,4 @@ child tl : SemDefs alternative Nil: -}-type SemDefs = [SemDef ]+type SemDefs = [SemDef]
src-derived/DeclBlocks.hs view
@@ -1,11 +1,11 @@ --- UUAGC 0.9.39.1.0 (src-ag/DeclBlocks.ag)+-- UUAGC 0.9.40.1 (src-ag/DeclBlocks.ag) module DeclBlocks where {-# LINE 2 "src-ag/DeclBlocks.ag" #-} import Code (Decl,Expr)-{-# LINE 9 "dist/build/uuagc/uuagc-tmp/DeclBlocks.hs" #-}+{-# LINE 9 "dist/build/DeclBlocks.hs" #-} -- DeclBlocks -------------------------------------------------- {- alternatives:@@ -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,3191 +1,3189 @@ {-# OPTIONS_GHC -XBangPatterns #-} --- UUAGC 0.9.39.1.0 (src-ag/DefaultRules.ag)-module DefaultRules where-{-# LINE 15 "src-ag/DefaultRules.ag" #-}--import qualified Data.List-import qualified Data.Set as Set-import qualified Data.Map as Map-import Data.Map(Map)-import qualified Data.Sequence as Seq-import Data.Sequence(Seq,(><))-import UU.Scanner.Position(noPos)-import Pretty-import Data.Maybe-import HsToken-import HsTokenScanner-import Data.List(intersperse)--import AbstractSyntax-import ErrorMessages--import Options-{-# LINE 25 "dist/build/uuagc/uuagc-tmp/DefaultRules.hs" #-}--{-# LINE 2 "src-ag/AbstractSyntax.ag" #-}---- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import Macro --marcos-import CommonTypes-import ErrorMessages-{-# LINE 37 "dist/build/uuagc/uuagc-tmp/DefaultRules.hs" #-}--{-# LINE 2 "src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 44 "dist/build/uuagc/uuagc-tmp/DefaultRules.hs" #-}-{-# LINE 77 "src-ag/DefaultRules.ag" #-}--fieldName n = '@' : getName n--locName n = '@' : getName n--attrName fld attr- | fld == _LOC = '@' : getName attr- | otherwise = '@' : getName fld ++ "." ++ getName attr--_ACHILD = Ident "(" noPos -- hack---getConName typeSyns rename nt con1- | nt `elem` map fst typeSyns = synonym- | otherwise = normalName- where con = getName con1- normalName | rename = getName nt++"_"++ con- | otherwise = con- synonym | con == "Cons" = "(:)"- | con == "Nil" = case lookup nt typeSyns of- Just (Map _ _) -> "Data.Map.empty"- Just (IntMap _) -> "Data.IntMap.empty"- Just (OrdSet _) -> "Data.Set.empty"- Just IntSet -> "Data.IntSet.empty"- _ -> "[]"- | con == "Just" = "Just"- | con == "Nothing" = "Nothing"- | con == "Entry" = case lookup nt typeSyns of- Just (Map _ _) -> "Data.Map.insert"- Just (IntMap _) -> "Data.IntMap.insert"- Just (OrdSet _) -> "Data.Set.insert"- Just IntSet -> "Data.IntSet.insert"- | otherwise = normalName--concatSeq = foldr (Seq.><) Seq.empty--splitAttrs :: Map Identifier a -> [Identifier] -> ([(Identifier,a)],[Identifier]) -- a used as (String,String)-splitAttrs _ []- = ([],[])-splitAttrs useMap (n:rest)- = let (uses,normals) = splitAttrs useMap rest- in case Map.lookup n useMap of- Just x -> ((n,x):uses , normals )- Nothing -> ( uses , n:normals )--removeDefined :: Set (Identifier,Identifier) -> (Identifier,Attributes) -> (Identifier,[Identifier])-removeDefined defined (fld,as)- = ( fld- , [ a- | a <- Map.keys as- , not (Set.member (fld,a) defined)- ]- )--{-# LINE 100 "dist/build/uuagc/uuagc-tmp/DefaultRules.hs" #-}--{-# LINE 197 "src-ag/DefaultRules.ag" #-}-----deprecatedCopyRuleError nt con fld a- = let mesg =- "In the definitions for alternative"- >#< getName con- >#< "of nonterminal"- >#< getName nt- >|< ","- >-< "the value of field"- >#< getName a- >#< "is copied by a copy-rule."- >-< "Copying the value of a field using a copy-rule is deprecated"- >-< "Please add the following lines to your code:"- >-< ( "SEM"- >#< getName nt- >-< indent 2 ( "|"- >#< getName con- >#< getName fld- >#< "."- >#< a- >#< "="- >#< "@"- >|< a- )- )- in CustomError True (getPos a) mesg---missingRuleErrorExpr nt con fld a- = "error \"missing rule: "- ++ show nt ++ "." ++ show con ++ "."- ++ show fld ++ "." ++ show a ++ "\""----makeRule :: (Identifier,Identifier) -> Expression -> String -> Bool -> Maybe Error -> Rule-makeRule (f1,a1) expr origin identity mbDelayedError- = Rule Nothing- (Alias f1 a1 (Underscore noPos))- expr- False- origin- False- True- identity- mbDelayedError- False---useRule :: Set Identifier -> [(Identifier,Attributes)] -> (Identifier,(String,String,String)) -> Rule-useRule locals ch_outs (n,(op,e,pos))- = let elems = [ fld- | (fld,as) <- ch_outs- , Map.member n as- ]-- expr | Set.member n locals = attrName _LOC n- | null elems = e- | otherwise = foldr1 (\x y -> x ++ " " ++ op ++ " " ++ y)- (map (flip attrName n) elems)-- tks | Set.member n locals = [AGLocal n noPos Nothing]- | null elems = lexTokens noPos e- | otherwise = lexTokens noPos str- where- str = foldr1 (\x y -> x ++ " " ++ op ++ " " ++ y)- (map (flip attrName n) elems)-- in makeRule (_LHS,n)- (Expression noPos tks)- ("use rule " ++ pos)- False- Nothing-----selfRule lhsNecLoc attr x- = let expr | lhsNecLoc = locName attr- | otherwise = x-- tks | lhsNecLoc = [AGLocal attr noPos Nothing]- | otherwise = lexTokens noPos x-- in makeRule (if lhsNecLoc then _LHS else _LOC,attr)- (Expression noPos tks)- "self rule"- False- Nothing-----concatRE rsess = let (rss,ess) = unzip rsess- in (concat rss, concatSeq ess)---copyRule :: Options -> Set NontermIdent -> Identifier -> Identifier -> Bool -> Set Identifier -> (Map Identifier Identifier, (Identifier,[Identifier])) -> ([Rule], Seq Error)-copyRule options wrappers nt con modcopy locals (env,(fld,as))- = concatRE (map copyRu as)-- where- copyRu a- = ( [ makeRule (fld,a)- (Expression noPos tks)- (cruletxt sel)- True- mbDelayedErr- ]- , err- )-- where- sel- | not modcopy- && Set.member a locals = Just _LOC- | otherwise = Map.lookup a env-- (tks,err,mbDelayedErr)- = case sel of- Nothing -> let tks = [HsToken (missingRuleErrorExpr nt con fld a) noPos]- err = MissingRule nt con fld a- in if nt `Set.member` wrappers && kennedyWarren options- then (tks, Seq.empty, Just err) -- yield error only if the rule is actually scheduled; for kennedyWarren code gen only- else (tks, Seq.singleton err, Nothing)- Just f- | f == _ACHILD -> ( [AGLocal a noPos Nothing]- , Seq.singleton (deprecatedCopyRuleError nt con fld a)- , Nothing- )- | otherwise -> ( [AGField f a noPos Nothing]- , Seq.empty- , Nothing- )-- cruletxt sel- | local = "copy rule (from local)"- | deprChild = "deprecated child copy"- | Set.member a locals && nonlocal = "modified copy rule"- | incoming && outgoing = "copy rule (chain)"- | incoming = "copy rule (down)"- | outgoing = "copy rule (up)"- | otherwise = "copy rule (chain)"- where outgoing = fld == _LHS- incoming = maybe False (== _LHS) sel- nonlocal = maybe False (/= _LOC) sel- local = maybe False (== _LOC) sel- deprChild = maybe False (== _ACHILD) sel-{-# LINE 254 "dist/build/uuagc/uuagc-tmp/DefaultRules.hs" #-}--{-# LINE 430 "src-ag/DefaultRules.ag" #-}--addAugments :: (Identifier, [Expression]) -> [Rule] -> [Rule]-addAugments (_, exprs) rules- | null exprs = rules-addAugments (syn, exprs) rules- = [rule] ++ funRules ++ map modify rules- where- rule = Rule Nothing (Alias _LHS syn (Underscore noPos)) rhs False "augmented rule" False True False Nothing False- rhs = Expression noPos tks- tks = [ HsToken "foldr ($) " noPos, AGLocal substSyn noPos Nothing, HsToken " [" noPos] ++ funs ++ [HsToken "]" noPos]- funs = intersperse (HsToken ", " noPos) (map (\n -> AGLocal n noPos Nothing) funNames)-- substSyn = Ident (show syn ++ "_augmented_syn") (getPos syn)- funNames = zipWith (\i _ -> Ident (show syn ++ "_augmented_f" ++ show i) (getPos syn)) [1..] exprs- funRules = zipWith (\name expr -> Rule Nothing (Alias _LOC name (Underscore noPos)) expr False "augment function" False True False Nothing False) funNames exprs-- modify (Rule mbNm pat rhs owrt origin expl pure identity mbErr eager)- | containsSyn pat = Rule mbNm (modifyPat pat) rhs owrt origin expl pure identity mbErr eager- modify r = r-- containsSyn (Constr _ pats) = any containsSyn pats- containsSyn (Product _ pats) = any containsSyn pats- containsSyn (Irrefutable pat) = containsSyn pat- containsSyn (Alias field attr pat) = (field == _LHS && attr == syn) || containsSyn pat- containsSyn _ = False-- modifyPat (Constr name pats) = Constr name (map modifyPat pats)- modifyPat (Product pos pats) = Product pos (map modifyPat pats)- modifyPat (Irrefutable pat) = Irrefutable (modifyPat pat)- modifyPat (Alias field attr pat)- | field == _LHS && attr == syn = Alias _LOC substSyn (modifyPat pat)- | otherwise = Alias field attr (modifyPat pat)- modifyPat p = p---- adds the additional rules needed for around, which creates a sequence of--- rules that form a function that each transforms the semantics of a child--- before attaching the child.--- The rule defines a local attribute "<child>_around" and <child> is dependent--- on this attribute.-addArounds :: (Identifier, [Expression]) -> [Rule] -> [Rule]-addArounds (_, exprs) rules | null exprs = rules-addArounds (child, exprs) rules- = [rule] ++ funRules ++ rules- where- rule = Rule Nothing (Alias _LOC childLoc (Underscore noPos)) rhs False "around rule" False True False Nothing False- rhs = Expression noPos tks- tks = [ HsToken "\\s -> foldr ($) s " noPos, HsToken " [" noPos] ++ funs ++ [HsToken "]" noPos]- funs = intersperse (HsToken ", " noPos) (map (\n -> AGLocal n noPos Nothing) funNames)-- childLoc = Ident (show child ++ "_around") (getPos child)- funNames = zipWith (\i _ -> Ident (show child ++ "_around_f" ++ show i) (getPos child)) [1..] exprs- funRules = zipWith (\name expr -> Rule Nothing (Alias _LOC name (Underscore noPos)) expr False "around function" False True False Nothing False) funNames exprs---- adds the additional rules needed for merging.--- It produces for each merging child a rule with local attribute: "<child>_merged".--- this rules takes the semantics of the first children and feeds it to the function--- represented by this attribute. This attribute then defines the semantics for--- the merging child.-addMerges :: (Identifier, (Identifier,[Identifier],Expression)) -> [Rule] -> [Rule]-addMerges (target,(_,_,expr)) rules- = rule : rules- where- rule = Rule Nothing (Alias _LOC childLoc (Underscore noPos)) expr False "merge rule" False True False Nothing False- childLoc = Ident (show target ++ "_merge") (getPos target)-{-# LINE 321 "dist/build/uuagc/uuagc-tmp/DefaultRules.hs" #-}--{-# LINE 546 "src-ag/DefaultRules.ag" #-}--elimSelfId :: NontermIdent -> [Identifier] -> Type -> Type-elimSelfId nt args Self = NT nt (map locname args) False-elimSelfId _ _ tp = tp--elimSelfStr :: NontermIdent -> [String] -> Type -> Type-elimSelfStr nt args Self = NT nt args False-elimSelfStr _ _ tp = tp-{-# LINE 332 "dist/build/uuagc/uuagc-tmp/DefaultRules.hs" #-}--{-# LINE 598 "src-ag/DefaultRules.ag" #-}---- When a rule has a name, create an alias for a rule--- and a modified rule that refers to the alias--- Thus it removes rule names from rules-mkRuleAlias :: Rule -> (Rule, Maybe Rule)-mkRuleAlias r@(Rule Nothing _ _ _ _ _ _ _ _ _) = (r, Nothing)-mkRuleAlias (Rule (Just nm) pat expr owrt origin expl pure identity mbErr eager) = (r', Just alias) where- alias = Rule Nothing (Alias _LOC (Ident ("_rule_" ++ show nm) pos) (Underscore pos)) expr owrt origin expl pure identity mbErr eager- pos = getPos nm- expr' = Expression pos tks- tks = [AGLocal (Ident ("_rule_" ++ show nm) pos) pos (Just ("Indirection to rule " ++ show nm))]- r' = Rule Nothing pat expr' owrt origin False True identity Nothing False-{-# LINE 347 "dist/build/uuagc/uuagc-tmp/DefaultRules.hs" #-}--{-# LINE 615 "src-ag/DefaultRules.ag" #-}--needsMultiRules :: Options -> Bool-needsMultiRules opts = (visit opts || withCycle opts) && not (kennedyWarren opts)-{-# LINE 353 "dist/build/uuagc/uuagc-tmp/DefaultRules.hs" #-}--{-# LINE 620 "src-ag/DefaultRules.ag" #-}--{--multiRule replaces- loc.(a,b) = e-by- loc.tup1 = e- loc.(a,_) = @loc.tup1- loc.(_,b) = @loc.tup1-It needs to thread a unique number for inventing names for the tuples.--It also works for nested tuples:- loc.(a,(b,c)) = e-becomes- loc.tup1 = e- loc.(a,_) = @loc.tup1- loc.(_,tup2) = @loc.tup1- loc.(b,_) = @loc.tup2- loc.(_,c) = @loc.tup2--}--multiRule :: Rule -> Int -> ([Rule], Int)-multiRule (Rule _ pat expr owrt origin expl pure identity mbErr eager) uniq- = let f :: Bool -> (Pattern->Pattern) -> Expression -> Pattern -> Int -> (Pattern, ([Rule], Int))- f expl' w e (Product pos pats) n- = let freshName = Ident ("_tup" ++ show n) pos- freshExpr = Expression pos freshTks- freshTks = [AGField _LOC freshName pos Nothing]- freshPat = Alias _LOC freshName (Underscore pos)- a = length pats - 1- us b p = Product pos (replicate (a-b) (Underscore pos) ++ [p] ++ replicate b (Underscore pos))- g :: Pattern -> ([Pattern],[Rule],Int) -> ([Pattern],[Rule],Int)- g p (xs1,rs1,n1) = let (x2,(rs2,n2)) = f False (us (length xs1)) freshExpr p n1- in (x2:xs1, rs2++rs1, n2)- (xs9,rs9,n9) = foldr g ([], [], n+1) pats- in ( freshPat- , ( Rule Nothing (w freshPat) e owrt origin expl' True False mbErr eager : rs9- , n9- )- )- f expl' w e p n- = ( p- , ( [Rule Nothing (w p) e owrt origin expl' True False mbErr eager]- , n- )- )- in snd (f expl id expr pat uniq)--{-# LINE 403 "dist/build/uuagc/uuagc-tmp/DefaultRules.hs" #-}--- Child --------------------------------------------------------{-- visit 0:- inherited attributes:- con : ConstructorIdent- cr : Bool- inhMap : Map Identifier Attributes- merged : Set Identifier- nt : NontermIdent- params : [Identifier]- synMap : Map Identifier Attributes- synthesized attributes:- errors : Seq Error- field : (Identifier,Type,ChildKind) - inherited : Attributes- name : Identifier- output : SELF - synthesized : Attributes- alternatives:- alternative Child:- child name : {Identifier}- child tp : {Type}- child kind : {ChildKind}- visit 0:- local chnt : _- local inh : _- local _tup1 : _- local params : _- local nt : _- local inh1 : _- local syn : _- local syn1 : _--}--- cata-sem_Child :: Child ->- T_Child -sem_Child !(Child _name _tp _kind ) =- (sem_Child_Child _name _tp _kind )--- semantic domain-newtype T_Child = T_Child (ConstructorIdent ->- Bool ->- (Map Identifier Attributes) ->- (Set Identifier) ->- NontermIdent ->- ([Identifier]) ->- (Map Identifier Attributes) ->- ( (Seq Error),( (Identifier,Type,ChildKind) ),Attributes,Identifier,Child ,Attributes))-data Inh_Child = Inh_Child {con_Inh_Child :: !(ConstructorIdent),cr_Inh_Child :: !(Bool),inhMap_Inh_Child :: !((Map Identifier Attributes)),merged_Inh_Child :: !((Set Identifier)),nt_Inh_Child :: !(NontermIdent),params_Inh_Child :: !(([Identifier])),synMap_Inh_Child :: !((Map Identifier Attributes))}-data Syn_Child = Syn_Child {errors_Syn_Child :: !((Seq Error)),field_Syn_Child :: !(( (Identifier,Type,ChildKind) )),inherited_Syn_Child :: !(Attributes),name_Syn_Child :: !(Identifier),output_Syn_Child :: !(Child ),synthesized_Syn_Child :: !(Attributes)}-wrap_Child :: T_Child ->- Inh_Child ->- Syn_Child -wrap_Child !(T_Child sem ) !(Inh_Child _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap ) =- (let ( !_lhsOerrors,!_lhsOfield,!_lhsOinherited,!_lhsOname,!_lhsOoutput,!_lhsOsynthesized) = sem _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap - in (Syn_Child _lhsOerrors _lhsOfield _lhsOinherited _lhsOname _lhsOoutput _lhsOsynthesized ))-sem_Child_Child :: Identifier ->- Type ->- ChildKind ->- T_Child -sem_Child_Child !name_ !tp_ !kind_ =- (T_Child (\ (!_lhsIcon)- (!_lhsIcr)- (!_lhsIinhMap)- (!_lhsImerged)- (!_lhsInt)- (!_lhsIparams)- (!_lhsIsynMap) ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- Seq.empty- {-# LINE 473 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 514 "src-ag/DefaultRules.ag" #-}- (name_,tp_,kind_)- {-# LINE 478 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOfield ->- (case (({-# LINE 19 "src-ag/DistChildAttr.ag" #-}- case tp_ of- NT nt _ _ -> nt- Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")- Haskell t -> identifier t- {-# LINE 486 "src-ag/DefaultRules.hs" #-}- )) of- { !_chnt ->- (case (({-# LINE 23 "src-ag/DistChildAttr.ag" #-}- Map.findWithDefault Map.empty _chnt _lhsIinhMap- {-# LINE 491 "src-ag/DefaultRules.hs" #-}- )) of- { !_inh ->- (case (({-# LINE 536 "src-ag/DefaultRules.ag" #-}- case tp_ of- NT nt params _ -> (nt, params)- Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")- Haskell t -> (identifier t, [])- {-# LINE 499 "src-ag/DefaultRules.hs" #-}- )) of- { !__tup1 ->- (case (({-# LINE 536 "src-ag/DefaultRules.ag" #-}- __tup1- {-# LINE 504 "src-ag/DefaultRules.hs" #-}- )) of- { !(_,!_params) ->- (case (({-# LINE 536 "src-ag/DefaultRules.ag" #-}- __tup1- {-# LINE 509 "src-ag/DefaultRules.hs" #-}- )) of- { !(!_nt,_) ->- (case (({-# LINE 540 "src-ag/DefaultRules.ag" #-}- Map.map (elimSelfStr _nt _params ) _inh- {-# LINE 514 "src-ag/DefaultRules.hs" #-}- )) of- { !_inh1 ->- (case (({-# LINE 180 "src-ag/DefaultRules.ag" #-}- _inh1- {-# LINE 519 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOinherited ->- (case (({-# LINE 171 "src-ag/DefaultRules.ag" #-}- name_- {-# LINE 524 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOname ->- (case (({-# LINE 582 "src-ag/DefaultRules.ag" #-}- Child name_ tp_ kind_- {-# LINE 529 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- (case (({-# LINE 24 "src-ag/DistChildAttr.ag" #-}- Map.findWithDefault Map.empty _chnt _lhsIsynMap- {-# LINE 534 "src-ag/DefaultRules.hs" #-}- )) of- { !_syn ->- (case (({-# LINE 541 "src-ag/DefaultRules.ag" #-}- Map.map (elimSelfStr _nt _params ) _syn- {-# LINE 539 "src-ag/DefaultRules.hs" #-}- )) of- { !_syn1 ->- (case (({-# LINE 181 "src-ag/DefaultRules.ag" #-}- if name_ `Set.member` _lhsImerged- then Map.empty- else _syn1- {-# LINE 546 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOsynthesized ->- ( _lhsOerrors,_lhsOfield,_lhsOinherited,_lhsOname,_lhsOoutput,_lhsOsynthesized) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Children -----------------------------------------------------{-- visit 0:- inherited attributes:- con : ConstructorIdent- cr : Bool- inhMap : Map Identifier Attributes- merged : Set Identifier- nt : NontermIdent- params : [Identifier]- synMap : Map Identifier Attributes- synthesized attributes:- errors : Seq Error- fields : [(Identifier,Type,ChildKind)]- inputs : [(Identifier, Attributes)]- output : SELF - outputs : [(Identifier, Attributes)]- alternatives:- alternative Cons:- child hd : Child - child tl : Children - visit 0:- local output : _- alternative Nil:- visit 0:- local output : _--}--- cata-sem_Children :: Children ->- T_Children -sem_Children !list =- (Prelude.foldr sem_Children_Cons sem_Children_Nil (Prelude.map sem_Child list) )--- semantic domain-newtype T_Children = T_Children (ConstructorIdent ->- Bool ->- (Map Identifier Attributes) ->- (Set Identifier) ->- NontermIdent ->- ([Identifier]) ->- (Map Identifier Attributes) ->- ( (Seq Error),([(Identifier,Type,ChildKind)]),([(Identifier, Attributes)]),Children ,([(Identifier, Attributes)])))-data Inh_Children = Inh_Children {con_Inh_Children :: !(ConstructorIdent),cr_Inh_Children :: !(Bool),inhMap_Inh_Children :: !((Map Identifier Attributes)),merged_Inh_Children :: !((Set Identifier)),nt_Inh_Children :: !(NontermIdent),params_Inh_Children :: !(([Identifier])),synMap_Inh_Children :: !((Map Identifier Attributes))}-data Syn_Children = Syn_Children {errors_Syn_Children :: !((Seq Error)),fields_Syn_Children :: !(([(Identifier,Type,ChildKind)])),inputs_Syn_Children :: !(([(Identifier, Attributes)])),output_Syn_Children :: !(Children ),outputs_Syn_Children :: !(([(Identifier, Attributes)]))}-wrap_Children :: T_Children ->- Inh_Children ->- Syn_Children -wrap_Children !(T_Children sem ) !(Inh_Children _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap ) =- (let ( !_lhsOerrors,!_lhsOfields,!_lhsOinputs,!_lhsOoutput,!_lhsOoutputs) = sem _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap - in (Syn_Children _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutput _lhsOoutputs ))-sem_Children_Cons :: T_Child ->- T_Children ->- T_Children -sem_Children_Cons !(T_Child hd_ ) !(T_Children tl_ ) =- (T_Children (\ (!_lhsIcon)- (!_lhsIcr)- (!_lhsIinhMap)- (!_lhsImerged)- (!_lhsInt)- (!_lhsIparams)- (!_lhsIsynMap) ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 612 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOsynMap ->- (case (({-# LINE 41 "src-ag/DefaultRules.ag" #-}- _lhsIparams- {-# LINE 617 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOparams ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 622 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOnt ->- (case (({-# LINE 756 "src-ag/DefaultRules.ag" #-}- _lhsImerged- {-# LINE 627 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOmerged ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 632 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOinhMap ->- (case (({-# LINE 55 "src-ag/DefaultRules.ag" #-}- _lhsIcr- {-# LINE 637 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOcr ->- (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}- _lhsIcon- {-# LINE 642 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOcon ->- (case (tl_ _tlOcon _tlOcr _tlOinhMap _tlOmerged _tlOnt _tlOparams _tlOsynMap ) of- { ( !_tlIerrors,!_tlIfields,!_tlIinputs,!_tlIoutput,!_tlIoutputs) ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 649 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOsynMap ->- (case (({-# LINE 41 "src-ag/DefaultRules.ag" #-}- _lhsIparams- {-# LINE 654 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOparams ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 659 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOnt ->- (case (({-# LINE 756 "src-ag/DefaultRules.ag" #-}- _lhsImerged- {-# LINE 664 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOmerged ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 669 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOinhMap ->- (case (({-# LINE 55 "src-ag/DefaultRules.ag" #-}- _lhsIcr- {-# LINE 674 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOcr ->- (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}- _lhsIcon- {-# LINE 679 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOcon ->- (case (hd_ _hdOcon _hdOcr _hdOinhMap _hdOmerged _hdOnt _hdOparams _hdOsynMap ) of- { ( !_hdIerrors,!_hdIfield,!_hdIinherited,!_hdIname,!_hdIoutput,!_hdIsynthesized) ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 686 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 510 "src-ag/DefaultRules.ag" #-}- _hdIfield : _tlIfields- {-# LINE 691 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOfields ->- (case (({-# LINE 186 "src-ag/DefaultRules.ag" #-}- (_hdIname, _hdIinherited) : _tlIinputs- {-# LINE 696 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOinputs ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 701 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 706 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- (case (({-# LINE 187 "src-ag/DefaultRules.ag" #-}- (_hdIname, _hdIsynthesized) : _tlIoutputs- {-# LINE 711 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutputs ->- ( _lhsOerrors,_lhsOfields,_lhsOinputs,_lhsOoutput,_lhsOoutputs) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Children_Nil :: T_Children -sem_Children_Nil =- (T_Children (\ (!_lhsIcon)- (!_lhsIcr)- (!_lhsIinhMap)- (!_lhsImerged)- (!_lhsInt)- (!_lhsIparams)- (!_lhsIsynMap) ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- Seq.empty- {-# LINE 726 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 511 "src-ag/DefaultRules.ag" #-}- []- {-# LINE 731 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOfields ->- (case (({-# LINE 188 "src-ag/DefaultRules.ag" #-}- []- {-# LINE 736 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOinputs ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- []- {-# LINE 741 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 746 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- (case (({-# LINE 189 "src-ag/DefaultRules.ag" #-}- []- {-# LINE 751 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutputs ->- ( _lhsOerrors,_lhsOfields,_lhsOinputs,_lhsOoutput,_lhsOoutputs) }) }) }) }) }) })) )--- Grammar ------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attributes:- errors : Seq Error- output : SELF - alternatives:- alternative Grammar:- child typeSyns : {TypeSyns}- child useMap : {UseMap}- child derivings : {Derivings}- child wrappers : {Set NontermIdent}- child nonts : Nonterminals - child pragmas : {PragmaMap}- child manualAttrOrderMap : {AttrOrderMap}- child paramMap : {ParamMap}- child contextMap : {ContextMap}- child quantMap : {QuantMap}- child uniqueMap : {UniqueMap}- child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}- visit 0:- local output : _--}--- cata-sem_Grammar :: Grammar ->- T_Grammar -sem_Grammar !(Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap ) =- (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap )--- semantic domain-newtype T_Grammar = T_Grammar (Options ->- ( (Seq Error),Grammar ))-data Inh_Grammar = Inh_Grammar {options_Inh_Grammar :: !(Options)}-data Syn_Grammar = Syn_Grammar {errors_Syn_Grammar :: !((Seq Error)),output_Syn_Grammar :: !(Grammar )}-wrap_Grammar :: T_Grammar ->- Inh_Grammar ->- Syn_Grammar -wrap_Grammar !(T_Grammar sem ) !(Inh_Grammar _lhsIoptions ) =- (let ( !_lhsOerrors,!_lhsOoutput) = sem _lhsIoptions - in (Syn_Grammar _lhsOerrors _lhsOoutput ))-sem_Grammar_Grammar :: TypeSyns ->- UseMap ->- Derivings ->- (Set NontermIdent) ->- T_Nonterminals ->- PragmaMap ->- AttrOrderMap ->- ParamMap ->- ContextMap ->- QuantMap ->- UniqueMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->- T_Grammar -sem_Grammar_Grammar !typeSyns_ !useMap_ !derivings_ !wrappers_ !(T_Nonterminals nonts_ ) !pragmas_ !manualAttrOrderMap_ !paramMap_ !contextMap_ !quantMap_ !uniqueMap_ !augmentsMap_ !aroundsMap_ !mergeMap_ =- (T_Grammar (\ (!_lhsIoptions) ->- (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}- _lhsIoptions- {-# LINE 817 "src-ag/DefaultRules.hs" #-}- )) of- { !_nontsOoptions ->- (case (nonts_ ) of- { ( !_nontsIcollect_nts,!_nontsIinhMap',!_nontsIsynMap',!T_Nonterminals_1 nonts_1) ->- (case (({-# LINE 16 "src-ag/DistChildAttr.ag" #-}- _nontsIsynMap'- {-# LINE 824 "src-ag/DefaultRules.hs" #-}- )) of- { !_nontsOsynMap ->- (case (({-# LINE 15 "src-ag/DistChildAttr.ag" #-}- _nontsIinhMap'- {-# LINE 829 "src-ag/DefaultRules.hs" #-}- )) of- { !_nontsOinhMap ->- (case (({-# LINE 758 "src-ag/DefaultRules.ag" #-}- mergeMap_- {-# LINE 834 "src-ag/DefaultRules.hs" #-}- )) of- { !_nontsOmergesIn ->- (case (({-# LINE 677 "src-ag/DefaultRules.ag" #-}- manualAttrOrderMap_- {-# LINE 839 "src-ag/DefaultRules.hs" #-}- )) of- { !_nontsOmanualAttrOrderMap ->- (case (({-# LINE 175 "src-ag/DefaultRules.ag" #-}- typeSyns_- {-# LINE 844 "src-ag/DefaultRules.hs" #-}- )) of- { !_nontsOtypeSyns ->- (case (({-# LINE 173 "src-ag/DefaultRules.ag" #-}- useMap_- {-# LINE 849 "src-ag/DefaultRules.hs" #-}- )) of- { !_nontsOuseMap ->- (case (({-# LINE 66 "src-ag/DefaultRules.ag" #-}- wrappers_- {-# LINE 854 "src-ag/DefaultRules.hs" #-}- )) of- { !_nontsOwrappers ->- (case (({-# LINE 58 "src-ag/DefaultRules.ag" #-}- modcopy _lhsIoptions- {-# LINE 859 "src-ag/DefaultRules.hs" #-}- )) of- { !_nontsOcr ->- (case (({-# LINE 57 "src-ag/DefaultRules.ag" #-}- rename _lhsIoptions- {-# LINE 864 "src-ag/DefaultRules.hs" #-}- )) of- { !_nontsOo_rename ->- (case (({-# LINE 750 "src-ag/DefaultRules.ag" #-}- aroundsMap_- {-# LINE 869 "src-ag/DefaultRules.hs" #-}- )) of- { !_nontsOaroundsIn ->- (case (({-# LINE 743 "src-ag/DefaultRules.ag" #-}- augmentsMap_- {-# LINE 874 "src-ag/DefaultRules.hs" #-}- )) of- { !_nontsOaugmentsIn ->- (case (({-# LINE 563 "src-ag/DefaultRules.ag" #-}- 1- {-# LINE 879 "src-ag/DefaultRules.hs" #-}- )) of- { !_nontsOuniq ->- (case (({-# LINE 151 "src-ag/DefaultRules.ag" #-}- _nontsIcollect_nts- {-# LINE 884 "src-ag/DefaultRules.hs" #-}- )) of- { !_nontsOnonterminals ->- (case (nonts_1 _nontsOaroundsIn _nontsOaugmentsIn _nontsOcr _nontsOinhMap _nontsOmanualAttrOrderMap _nontsOmergesIn _nontsOnonterminals _nontsOo_rename _nontsOoptions _nontsOsynMap _nontsOtypeSyns _nontsOuniq _nontsOuseMap _nontsOwrappers ) of- { ( !_nontsIerrors,!_nontsIoutput,!_nontsIuniq) ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- _nontsIerrors- {-# LINE 891 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- Grammar typeSyns_ useMap_ derivings_ wrappers_ _nontsIoutput pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_- {-# LINE 896 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 901 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Nonterminal --------------------------------------------------{-- visit 0:- synthesized attributes:- collect_nts : Set NontermIdent- inhMap' : Map Identifier Attributes- synMap' : Map Identifier Attributes- visit 1:- inherited attributes:- aroundsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- augmentsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- cr : Bool- inhMap : Map Identifier Attributes- manualAttrOrderMap : AttrOrderMap- mergesIn : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))- nonterminals : Set NontermIdent- o_rename : Bool- options : Options- synMap : Map Identifier Attributes- typeSyns : TypeSyns- useMap : UseMap- wrappers : Set NontermIdent- chained attribute:- uniq : Int- synthesized attributes:- errors : Seq Error- output : SELF - alternatives:- alternative Nonterminal:- child nt : {NontermIdent}- child params : {[Identifier]}- child inh : {Attributes}- child syn : {Attributes}- child prods : Productions - visit 1:- local mergesIn : _- local syn1 : _- local inh1 : _- local augmentsIn : _- local aroundsIn : _--}--- cata-sem_Nonterminal :: Nonterminal ->- T_Nonterminal -sem_Nonterminal !(Nonterminal _nt _params _inh _syn _prods ) =- (sem_Nonterminal_Nonterminal _nt _params _inh _syn (sem_Productions _prods ) )--- semantic domain-newtype T_Nonterminal = T_Nonterminal (( (Set NontermIdent),(Map Identifier Attributes),(Map Identifier Attributes),T_Nonterminal_1 ))-newtype T_Nonterminal_1 = T_Nonterminal_1 ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- Bool ->- (Map Identifier Attributes) ->- AttrOrderMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) ->- (Set NontermIdent) ->- Bool ->- Options ->- (Map Identifier Attributes) ->- TypeSyns ->- Int ->- UseMap ->- (Set NontermIdent) ->- ( (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),inhMap_Inh_Nonterminal :: !((Map Identifier Attributes)),manualAttrOrderMap_Inh_Nonterminal :: !(AttrOrderMap),mergesIn_Inh_Nonterminal :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))))),nonterminals_Inh_Nonterminal :: !((Set NontermIdent)),o_rename_Inh_Nonterminal :: !(Bool),options_Inh_Nonterminal :: !(Options),synMap_Inh_Nonterminal :: !((Map Identifier Attributes)),typeSyns_Inh_Nonterminal :: !(TypeSyns),uniq_Inh_Nonterminal :: !(Int),useMap_Inh_Nonterminal :: !(UseMap),wrappers_Inh_Nonterminal :: !((Set NontermIdent))}-data Syn_Nonterminal = Syn_Nonterminal {collect_nts_Syn_Nonterminal :: !((Set NontermIdent)),errors_Syn_Nonterminal :: !((Seq Error)),inhMap'_Syn_Nonterminal :: !((Map Identifier Attributes)),output_Syn_Nonterminal :: !(Nonterminal ),synMap'_Syn_Nonterminal :: !((Map Identifier Attributes)),uniq_Syn_Nonterminal :: !(Int)}-wrap_Nonterminal :: T_Nonterminal ->- Inh_Nonterminal ->- Syn_Nonterminal -wrap_Nonterminal !(T_Nonterminal sem ) !(Inh_Nonterminal _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers ) =- (let ( !_lhsOcollect_nts,!_lhsOinhMap',!_lhsOsynMap',!T_Nonterminal_1 sem_1) = sem - ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) = sem_1 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers - in (Syn_Nonterminal _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq ))-sem_Nonterminal_Nonterminal :: NontermIdent ->- ([Identifier]) ->- Attributes ->- Attributes ->- T_Productions ->- T_Nonterminal -sem_Nonterminal_Nonterminal !nt_ !params_ !inh_ !syn_ !(T_Productions prods_ ) =- (T_Nonterminal (case (({-# LINE 147 "src-ag/DefaultRules.ag" #-}- Set.singleton nt_- {-# LINE 986 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcollect_nts ->- (case (({-# LINE 7 "src-ag/DistChildAttr.ag" #-}- Map.singleton nt_ inh_- {-# LINE 991 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOinhMap' ->- (case (({-# LINE 8 "src-ag/DistChildAttr.ag" #-}- Map.singleton nt_ syn_- {-# LINE 996 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOsynMap' ->- (case ((let sem_Nonterminal_Nonterminal_1 :: T_Nonterminal_1 - sem_Nonterminal_Nonterminal_1 =- (T_Nonterminal_1 (\ (!_lhsIaroundsIn)- (!_lhsIaugmentsIn)- (!_lhsIcr)- (!_lhsIinhMap)- (!_lhsImanualAttrOrderMap)- (!_lhsImergesIn)- (!_lhsInonterminals)- (!_lhsIo_rename)- (!_lhsIoptions)- (!_lhsIsynMap)- (!_lhsItypeSyns)- (!_lhsIuniq)- (!_lhsIuseMap)- (!_lhsIwrappers) ->- (case (({-# LINE 64 "src-ag/DefaultRules.ag" #-}- _lhsIwrappers- {-# LINE 1017 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOwrappers ->- (case (({-# LINE 71 "src-ag/DefaultRules.ag" #-}- _lhsItypeSyns- {-# LINE 1022 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOtypeSyns ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 1027 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOsynMap ->- (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}- _lhsIoptions- {-# LINE 1032 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOoptions ->- (case (({-# LINE 51 "src-ag/DefaultRules.ag" #-}- _lhsIo_rename- {-# LINE 1037 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOo_rename ->- (case (({-# LINE 759 "src-ag/DefaultRules.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsImergesIn- {-# LINE 1042 "src-ag/DefaultRules.hs" #-}- )) of- { !_mergesIn ->- (case (({-# LINE 755 "src-ag/DefaultRules.ag" #-}- _mergesIn- {-# LINE 1047 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOmergesIn ->- (case (({-# LINE 673 "src-ag/DefaultRules.ag" #-}- _lhsImanualAttrOrderMap- {-# LINE 1052 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOmanualAttrOrderMap ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 1057 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOinhMap ->- (case (({-# LINE 52 "src-ag/DefaultRules.ag" #-}- _lhsIcr- {-# LINE 1062 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOcr ->- (case (({-# LINE 533 "src-ag/DefaultRules.ag" #-}- Map.map (elimSelfId nt_ params_) syn_- {-# LINE 1067 "src-ag/DefaultRules.hs" #-}- )) of- { !_syn1 ->- (case (({-# LINE 532 "src-ag/DefaultRules.ag" #-}- Map.map (elimSelfId nt_ params_) inh_- {-# LINE 1072 "src-ag/DefaultRules.hs" #-}- )) of- { !_inh1 ->- (case (({-# LINE 177 "src-ag/DefaultRules.ag" #-}- nt_- {-# LINE 1077 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOnt ->- (case (({-# LINE 165 "src-ag/DefaultRules.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIuseMap- {-# LINE 1082 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOuseMap ->- (case (({-# LINE 164 "src-ag/DefaultRules.ag" #-}- syn_- {-# LINE 1087 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOsynOrig ->- (case (({-# LINE 162 "src-ag/DefaultRules.ag" #-}- _syn1- {-# LINE 1092 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOsyn ->- (case (({-# LINE 161 "src-ag/DefaultRules.ag" #-}- _inh1- {-# LINE 1097 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOinh ->- (case (({-# LINE 560 "src-ag/DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 1102 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOuniq ->- (case (({-# LINE 149 "src-ag/DefaultRules.ag" #-}- _lhsInonterminals- {-# LINE 1107 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOnonterminals ->- (case (({-# LINE 744 "src-ag/DefaultRules.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIaugmentsIn- {-# LINE 1112 "src-ag/DefaultRules.hs" #-}- )) of- { !_augmentsIn ->- (case (({-# LINE 741 "src-ag/DefaultRules.ag" #-}- _augmentsIn- {-# LINE 1117 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOaugmentsIn ->- (case (({-# LINE 751 "src-ag/DefaultRules.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIaroundsIn- {-# LINE 1122 "src-ag/DefaultRules.hs" #-}- )) of- { !_aroundsIn ->- (case (({-# LINE 748 "src-ag/DefaultRules.ag" #-}- _aroundsIn- {-# LINE 1127 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOaroundsIn ->- (case (({-# LINE 163 "src-ag/DefaultRules.ag" #-}- inh_- {-# LINE 1132 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOinhOrig ->- (case (({-# LINE 43 "src-ag/DefaultRules.ag" #-}- params_- {-# LINE 1137 "src-ag/DefaultRules.hs" #-}- )) of- { !_prodsOparams ->- (case (prods_ _prodsOaroundsIn _prodsOaugmentsIn _prodsOcr _prodsOinh _prodsOinhMap _prodsOinhOrig _prodsOmanualAttrOrderMap _prodsOmergesIn _prodsOnonterminals _prodsOnt _prodsOo_rename _prodsOoptions _prodsOparams _prodsOsyn _prodsOsynMap _prodsOsynOrig _prodsOtypeSyns _prodsOuniq _prodsOuseMap _prodsOwrappers ) of- { ( !_prodsIerrors,!_prodsIoutput,!_prodsIuniq) ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- _prodsIerrors- {-# LINE 1144 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 572 "src-ag/DefaultRules.ag" #-}- Nonterminal nt_ params_ _inh1 _syn1 _prodsIoutput- {-# LINE 1149 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- (case (({-# LINE 560 "src-ag/DefaultRules.ag" #-}- _prodsIuniq- {-# LINE 1154 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOuniq ->- ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )- in sem_Nonterminal_Nonterminal_1)) of- { ( !sem_Nonterminal_1) ->- ( _lhsOcollect_nts,_lhsOinhMap',_lhsOsynMap',sem_Nonterminal_1) }) }) }) }) )--- Nonterminals -------------------------------------------------{-- visit 0:- synthesized attributes:- collect_nts : Set NontermIdent- inhMap' : Map Identifier Attributes- synMap' : Map Identifier Attributes- visit 1:- inherited attributes:- aroundsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- augmentsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- cr : Bool- inhMap : Map Identifier Attributes- manualAttrOrderMap : AttrOrderMap- mergesIn : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))- nonterminals : Set NontermIdent- o_rename : Bool- options : Options- synMap : Map Identifier Attributes- typeSyns : TypeSyns- useMap : UseMap- wrappers : Set NontermIdent- chained attribute:- uniq : Int- synthesized attributes:- errors : Seq Error- output : SELF - alternatives:- alternative Cons:- child hd : Nonterminal - child tl : Nonterminals - visit 1:- local output : _- alternative Nil:- visit 1:- local output : _--}--- cata-sem_Nonterminals :: Nonterminals ->- T_Nonterminals -sem_Nonterminals !list =- (Prelude.foldr sem_Nonterminals_Cons sem_Nonterminals_Nil (Prelude.map sem_Nonterminal list) )--- semantic domain-newtype T_Nonterminals = T_Nonterminals (( (Set NontermIdent),(Map Identifier Attributes),(Map Identifier Attributes),T_Nonterminals_1 ))-newtype T_Nonterminals_1 = T_Nonterminals_1 ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- Bool ->- (Map Identifier Attributes) ->- AttrOrderMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) ->- (Set NontermIdent) ->- Bool ->- Options ->- (Map Identifier Attributes) ->- TypeSyns ->- Int ->- UseMap ->- (Set NontermIdent) ->- ( (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),inhMap_Inh_Nonterminals :: !((Map Identifier Attributes)),manualAttrOrderMap_Inh_Nonterminals :: !(AttrOrderMap),mergesIn_Inh_Nonterminals :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))))),nonterminals_Inh_Nonterminals :: !((Set NontermIdent)),o_rename_Inh_Nonterminals :: !(Bool),options_Inh_Nonterminals :: !(Options),synMap_Inh_Nonterminals :: !((Map Identifier Attributes)),typeSyns_Inh_Nonterminals :: !(TypeSyns),uniq_Inh_Nonterminals :: !(Int),useMap_Inh_Nonterminals :: !(UseMap),wrappers_Inh_Nonterminals :: !((Set NontermIdent))}-data Syn_Nonterminals = Syn_Nonterminals {collect_nts_Syn_Nonterminals :: !((Set NontermIdent)),errors_Syn_Nonterminals :: !((Seq Error)),inhMap'_Syn_Nonterminals :: !((Map Identifier Attributes)),output_Syn_Nonterminals :: !(Nonterminals ),synMap'_Syn_Nonterminals :: !((Map Identifier Attributes)),uniq_Syn_Nonterminals :: !(Int)}-wrap_Nonterminals :: T_Nonterminals ->- Inh_Nonterminals ->- Syn_Nonterminals -wrap_Nonterminals !(T_Nonterminals sem ) !(Inh_Nonterminals _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers ) =- (let ( !_lhsOcollect_nts,!_lhsOinhMap',!_lhsOsynMap',!T_Nonterminals_1 sem_1) = sem - ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) = sem_1 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers - in (Syn_Nonterminals _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq ))-sem_Nonterminals_Cons :: T_Nonterminal ->- T_Nonterminals ->- T_Nonterminals -sem_Nonterminals_Cons !(T_Nonterminal hd_ ) !(T_Nonterminals tl_ ) =- (T_Nonterminals (case (tl_ ) of- { ( !_tlIcollect_nts,!_tlIinhMap',!_tlIsynMap',!T_Nonterminals_1 tl_1) ->- (case (hd_ ) of- { ( !_hdIcollect_nts,!_hdIinhMap',!_hdIsynMap',!T_Nonterminal_1 hd_1) ->- (case (({-# LINE 145 "src-ag/DefaultRules.ag" #-}- _hdIcollect_nts `Set.union` _tlIcollect_nts- {-# LINE 1239 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcollect_nts ->- (case (({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- _hdIinhMap' `Map.union` _tlIinhMap'- {-# LINE 1244 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOinhMap' ->- (case (({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- _hdIsynMap' `Map.union` _tlIsynMap'- {-# LINE 1249 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOsynMap' ->- (case ((let sem_Nonterminals_Cons_1 :: T_Nonterminals_1 - sem_Nonterminals_Cons_1 =- (T_Nonterminals_1 (\ (!_lhsIaroundsIn)- (!_lhsIaugmentsIn)- (!_lhsIcr)- (!_lhsIinhMap)- (!_lhsImanualAttrOrderMap)- (!_lhsImergesIn)- (!_lhsInonterminals)- (!_lhsIo_rename)- (!_lhsIoptions)- (!_lhsIsynMap)- (!_lhsItypeSyns)- (!_lhsIuniq)- (!_lhsIuseMap)- (!_lhsIwrappers) ->- (case (({-# LINE 64 "src-ag/DefaultRules.ag" #-}- _lhsIwrappers- {-# LINE 1270 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOwrappers ->- (case (({-# LINE 157 "src-ag/DefaultRules.ag" #-}- _lhsIuseMap- {-# LINE 1275 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOuseMap ->- (case (({-# LINE 71 "src-ag/DefaultRules.ag" #-}- _lhsItypeSyns- {-# LINE 1280 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOtypeSyns ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 1285 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOsynMap ->- (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}- _lhsIoptions- {-# LINE 1290 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOoptions ->- (case (({-# LINE 51 "src-ag/DefaultRules.ag" #-}- _lhsIo_rename- {-# LINE 1295 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOo_rename ->- (case (({-# LINE 754 "src-ag/DefaultRules.ag" #-}- _lhsImergesIn- {-# LINE 1300 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOmergesIn ->- (case (({-# LINE 673 "src-ag/DefaultRules.ag" #-}- _lhsImanualAttrOrderMap- {-# LINE 1305 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOmanualAttrOrderMap ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 1310 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOinhMap ->- (case (({-# LINE 52 "src-ag/DefaultRules.ag" #-}- _lhsIcr- {-# LINE 1315 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOcr ->- (case (({-# LINE 64 "src-ag/DefaultRules.ag" #-}- _lhsIwrappers- {-# LINE 1320 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOwrappers ->- (case (({-# LINE 157 "src-ag/DefaultRules.ag" #-}- _lhsIuseMap- {-# LINE 1325 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOuseMap ->- (case (({-# LINE 71 "src-ag/DefaultRules.ag" #-}- _lhsItypeSyns- {-# LINE 1330 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOtypeSyns ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 1335 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOsynMap ->- (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}- _lhsIoptions- {-# LINE 1340 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOoptions ->- (case (({-# LINE 51 "src-ag/DefaultRules.ag" #-}- _lhsIo_rename- {-# LINE 1345 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOo_rename ->- (case (({-# LINE 754 "src-ag/DefaultRules.ag" #-}- _lhsImergesIn- {-# LINE 1350 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOmergesIn ->- (case (({-# LINE 673 "src-ag/DefaultRules.ag" #-}- _lhsImanualAttrOrderMap- {-# LINE 1355 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOmanualAttrOrderMap ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 1360 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOinhMap ->- (case (({-# LINE 52 "src-ag/DefaultRules.ag" #-}- _lhsIcr- {-# LINE 1365 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOcr ->- (case (({-# LINE 560 "src-ag/DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 1370 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOuniq ->- (case (({-# LINE 149 "src-ag/DefaultRules.ag" #-}- _lhsInonterminals- {-# LINE 1375 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOnonterminals ->- (case (({-# LINE 740 "src-ag/DefaultRules.ag" #-}- _lhsIaugmentsIn- {-# LINE 1380 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOaugmentsIn ->- (case (({-# LINE 747 "src-ag/DefaultRules.ag" #-}- _lhsIaroundsIn- {-# LINE 1385 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOaroundsIn ->- (case (hd_1 _hdOaroundsIn _hdOaugmentsIn _hdOcr _hdOinhMap _hdOmanualAttrOrderMap _hdOmergesIn _hdOnonterminals _hdOo_rename _hdOoptions _hdOsynMap _hdOtypeSyns _hdOuniq _hdOuseMap _hdOwrappers ) of- { ( !_hdIerrors,!_hdIoutput,!_hdIuniq) ->- (case (({-# LINE 560 "src-ag/DefaultRules.ag" #-}- _hdIuniq- {-# LINE 1392 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOuniq ->- (case (({-# LINE 149 "src-ag/DefaultRules.ag" #-}- _lhsInonterminals- {-# LINE 1397 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOnonterminals ->- (case (({-# LINE 740 "src-ag/DefaultRules.ag" #-}- _lhsIaugmentsIn- {-# LINE 1402 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOaugmentsIn ->- (case (({-# LINE 747 "src-ag/DefaultRules.ag" #-}- _lhsIaroundsIn- {-# LINE 1407 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOaroundsIn ->- (case (tl_1 _tlOaroundsIn _tlOaugmentsIn _tlOcr _tlOinhMap _tlOmanualAttrOrderMap _tlOmergesIn _tlOnonterminals _tlOo_rename _tlOoptions _tlOsynMap _tlOtypeSyns _tlOuniq _tlOuseMap _tlOwrappers ) of- { ( !_tlIerrors,!_tlIoutput,!_tlIuniq) ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 1414 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 1419 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 1424 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- (case (({-# LINE 560 "src-ag/DefaultRules.ag" #-}- _tlIuniq- {-# LINE 1429 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOuniq ->- ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )- in sem_Nonterminals_Cons_1)) of- { ( !sem_Nonterminals_1) ->- ( _lhsOcollect_nts,_lhsOinhMap',_lhsOsynMap',sem_Nonterminals_1) }) }) }) }) }) }) )-sem_Nonterminals_Nil :: T_Nonterminals -sem_Nonterminals_Nil =- (T_Nonterminals (case (({-# LINE 145 "src-ag/DefaultRules.ag" #-}- Set.empty- {-# LINE 1440 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcollect_nts ->- (case (({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- Map.empty- {-# LINE 1445 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOinhMap' ->- (case (({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- Map.empty- {-# LINE 1450 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOsynMap' ->- (case ((let sem_Nonterminals_Nil_1 :: T_Nonterminals_1 - sem_Nonterminals_Nil_1 =- (T_Nonterminals_1 (\ (!_lhsIaroundsIn)- (!_lhsIaugmentsIn)- (!_lhsIcr)- (!_lhsIinhMap)- (!_lhsImanualAttrOrderMap)- (!_lhsImergesIn)- (!_lhsInonterminals)- (!_lhsIo_rename)- (!_lhsIoptions)- (!_lhsIsynMap)- (!_lhsItypeSyns)- (!_lhsIuniq)- (!_lhsIuseMap)- (!_lhsIwrappers) ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- Seq.empty- {-# LINE 1471 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- []- {-# LINE 1476 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 1481 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- (case (({-# LINE 560 "src-ag/DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 1486 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOuniq ->- ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) })) )- in sem_Nonterminals_Nil_1)) of- { ( !sem_Nonterminals_1) ->- ( _lhsOcollect_nts,_lhsOinhMap',_lhsOsynMap',sem_Nonterminals_1) }) }) }) }) )--- Pattern ------------------------------------------------------{-- visit 0:- inherited attributes:- con : ConstructorIdent- nt : NontermIdent- synthesized attributes:- containsVars : Bool- copy : SELF - definedAttrs : Set (Identifier,Identifier)- errors : Seq Error- locals : Set Identifier- output : SELF - alternatives:- alternative Alias:- child field : {Identifier}- child attr : {Identifier}- child pat : Pattern - visit 0:- local copy : _- local output : _- alternative Constr:- child name : {ConstructorIdent}- child pats : Patterns - visit 0:- local copy : _- local output : _- alternative Irrefutable:- child pat : Pattern - visit 0:- local copy : _- local output : _- alternative Product:- child pos : {Pos}- child pats : Patterns - visit 0:- local copy : _- local output : _- alternative Underscore:- child pos : {Pos}- visit 0:- local copy : _- local output : _--}--- cata-sem_Pattern :: Pattern ->- T_Pattern -sem_Pattern !(Alias _field _attr _pat ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) )-sem_Pattern !(Constr _name _pats ) =- (sem_Pattern_Constr _name (sem_Patterns _pats ) )-sem_Pattern !(Irrefutable _pat ) =- (sem_Pattern_Irrefutable (sem_Pattern _pat ) )-sem_Pattern !(Product _pos _pats ) =- (sem_Pattern_Product _pos (sem_Patterns _pats ) )-sem_Pattern !(Underscore _pos ) =- (sem_Pattern_Underscore _pos )--- semantic domain-newtype T_Pattern = T_Pattern (ConstructorIdent ->- NontermIdent ->- ( Bool,Pattern ,(Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Pattern ))-data Inh_Pattern = Inh_Pattern {con_Inh_Pattern :: !(ConstructorIdent),nt_Inh_Pattern :: !(NontermIdent)}-data Syn_Pattern = Syn_Pattern {containsVars_Syn_Pattern :: !(Bool),copy_Syn_Pattern :: !(Pattern ),definedAttrs_Syn_Pattern :: !((Set (Identifier,Identifier))),errors_Syn_Pattern :: !((Seq Error)),locals_Syn_Pattern :: !((Set Identifier)),output_Syn_Pattern :: !(Pattern )}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern !(T_Pattern sem ) !(Inh_Pattern _lhsIcon _lhsInt ) =- (let ( !_lhsOcontainsVars,!_lhsOcopy,!_lhsOdefinedAttrs,!_lhsOerrors,!_lhsOlocals,!_lhsOoutput) = sem _lhsIcon _lhsInt - in (Syn_Pattern _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput ))-sem_Pattern_Alias :: Identifier ->- Identifier ->- T_Pattern ->- T_Pattern -sem_Pattern_Alias !field_ !attr_ !(T_Pattern pat_ ) =- (T_Pattern (\ (!_lhsIcon)- (!_lhsInt) ->- (case (({-# LINE 522 "src-ag/DefaultRules.ag" #-}- True- {-# LINE 1571 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcontainsVars ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 1576 "src-ag/DefaultRules.hs" #-}- )) of- { !_patOnt ->- (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}- _lhsIcon- {-# LINE 1581 "src-ag/DefaultRules.hs" #-}- )) of- { !_patOcon ->- (case (pat_ _patOcon _patOnt ) of- { ( !_patIcontainsVars,!_patIcopy,!_patIdefinedAttrs,!_patIerrors,!_patIlocals,!_patIoutput) ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Alias field_ attr_ _patIcopy- {-# LINE 1588 "src-ag/DefaultRules.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1593 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 504 "src-ag/DefaultRules.ag" #-}- Set.insert (field_,attr_) _patIdefinedAttrs- {-# LINE 1598 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- _patIerrors- {-# LINE 1603 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 505 "src-ag/DefaultRules.ag" #-}- if field_ == _LOC- then Set.insert attr_ _patIlocals- else _patIlocals- {-# LINE 1610 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOlocals ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- Alias field_ attr_ _patIoutput- {-# LINE 1615 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 1620 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr !name_ !(T_Patterns pats_ ) =- (T_Pattern (\ (!_lhsIcon)- (!_lhsInt) ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 1632 "src-ag/DefaultRules.hs" #-}- )) of- { !_patsOnt ->- (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}- _lhsIcon- {-# LINE 1637 "src-ag/DefaultRules.hs" #-}- )) of- { !_patsOcon ->- (case (pats_ _patsOcon _patsOnt ) of- { ( !_patsIcontainsVars,!_patsIcopy,!_patsIdefinedAttrs,!_patsIerrors,!_patsIlocals,!_patsIoutput) ->- (case (({-# LINE 519 "src-ag/DefaultRules.ag" #-}- _patsIcontainsVars- {-# LINE 1644 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcontainsVars ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 1649 "src-ag/DefaultRules.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1654 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}- _patsIdefinedAttrs- {-# LINE 1659 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- _patsIerrors- {-# LINE 1664 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 498 "src-ag/DefaultRules.ag" #-}- _patsIlocals- {-# LINE 1669 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOlocals ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- Constr name_ _patsIoutput- {-# LINE 1674 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 1679 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable !(T_Pattern pat_ ) =- (T_Pattern (\ (!_lhsIcon)- (!_lhsInt) ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 1690 "src-ag/DefaultRules.hs" #-}- )) of- { !_patOnt ->- (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}- _lhsIcon- {-# LINE 1695 "src-ag/DefaultRules.hs" #-}- )) of- { !_patOcon ->- (case (pat_ _patOcon _patOnt ) of- { ( !_patIcontainsVars,!_patIcopy,!_patIdefinedAttrs,!_patIerrors,!_patIlocals,!_patIoutput) ->- (case (({-# LINE 519 "src-ag/DefaultRules.ag" #-}- _patIcontainsVars- {-# LINE 1702 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcontainsVars ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 1707 "src-ag/DefaultRules.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1712 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}- _patIdefinedAttrs- {-# LINE 1717 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- _patIerrors- {-# LINE 1722 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 498 "src-ag/DefaultRules.ag" #-}- _patIlocals- {-# LINE 1727 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOlocals ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- Irrefutable _patIoutput- {-# LINE 1732 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 1737 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product !pos_ !(T_Patterns pats_ ) =- (T_Pattern (\ (!_lhsIcon)- (!_lhsInt) ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 1749 "src-ag/DefaultRules.hs" #-}- )) of- { !_patsOnt ->- (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}- _lhsIcon- {-# LINE 1754 "src-ag/DefaultRules.hs" #-}- )) of- { !_patsOcon ->- (case (pats_ _patsOcon _patsOnt ) of- { ( !_patsIcontainsVars,!_patsIcopy,!_patsIdefinedAttrs,!_patsIerrors,!_patsIlocals,!_patsIoutput) ->- (case (({-# LINE 519 "src-ag/DefaultRules.ag" #-}- _patsIcontainsVars- {-# LINE 1761 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcontainsVars ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 1766 "src-ag/DefaultRules.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1771 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}- _patsIdefinedAttrs- {-# LINE 1776 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- _patsIerrors- {-# LINE 1781 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 498 "src-ag/DefaultRules.ag" #-}- _patsIlocals- {-# LINE 1786 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOlocals ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- Product pos_ _patsIoutput- {-# LINE 1791 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 1796 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore !pos_ =- (T_Pattern (\ (!_lhsIcon)- (!_lhsInt) ->- (case (({-# LINE 519 "src-ag/DefaultRules.ag" #-}- False- {-# LINE 1807 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcontainsVars ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Underscore pos_- {-# LINE 1812 "src-ag/DefaultRules.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1817 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}- Set.empty- {-# LINE 1822 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- Seq.empty- {-# LINE 1827 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 498 "src-ag/DefaultRules.ag" #-}- Set.empty- {-# LINE 1832 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOlocals ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- Underscore pos_- {-# LINE 1837 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 1842 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) })) )--- Patterns -----------------------------------------------------{-- visit 0:- inherited attributes:- con : ConstructorIdent- nt : NontermIdent- synthesized attributes:- containsVars : Bool- copy : SELF - definedAttrs : Set (Identifier,Identifier)- errors : Seq Error- locals : Set Identifier- output : SELF - alternatives:- alternative Cons:- child hd : Pattern - child tl : Patterns - visit 0:- local copy : _- local output : _- alternative Nil:- visit 0:- local copy : _- local output : _--}--- cata-sem_Patterns :: Patterns ->- T_Patterns -sem_Patterns !list =- (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list) )--- semantic domain-newtype T_Patterns = T_Patterns (ConstructorIdent ->- NontermIdent ->- ( Bool,Patterns ,(Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Patterns ))-data Inh_Patterns = Inh_Patterns {con_Inh_Patterns :: !(ConstructorIdent),nt_Inh_Patterns :: !(NontermIdent)}-data Syn_Patterns = Syn_Patterns {containsVars_Syn_Patterns :: !(Bool),copy_Syn_Patterns :: !(Patterns ),definedAttrs_Syn_Patterns :: !((Set (Identifier,Identifier))),errors_Syn_Patterns :: !((Seq Error)),locals_Syn_Patterns :: !((Set Identifier)),output_Syn_Patterns :: !(Patterns )}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns !(T_Patterns sem ) !(Inh_Patterns _lhsIcon _lhsInt ) =- (let ( !_lhsOcontainsVars,!_lhsOcopy,!_lhsOdefinedAttrs,!_lhsOerrors,!_lhsOlocals,!_lhsOoutput) = sem _lhsIcon _lhsInt - in (Syn_Patterns _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons !(T_Pattern hd_ ) !(T_Patterns tl_ ) =- (T_Patterns (\ (!_lhsIcon)- (!_lhsInt) ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 1896 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOnt ->- (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}- _lhsIcon- {-# LINE 1901 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOcon ->- (case (tl_ _tlOcon _tlOnt ) of- { ( !_tlIcontainsVars,!_tlIcopy,!_tlIdefinedAttrs,!_tlIerrors,!_tlIlocals,!_tlIoutput) ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 1908 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOnt ->- (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}- _lhsIcon- {-# LINE 1913 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOcon ->- (case (hd_ _hdOcon _hdOnt ) of- { ( !_hdIcontainsVars,!_hdIcopy,!_hdIdefinedAttrs,!_hdIerrors,!_hdIlocals,!_hdIoutput) ->- (case (({-# LINE 519 "src-ag/DefaultRules.ag" #-}- _hdIcontainsVars || _tlIcontainsVars- {-# LINE 1920 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcontainsVars ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 1925 "src-ag/DefaultRules.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1930 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}- _hdIdefinedAttrs `Set.union` _tlIdefinedAttrs- {-# LINE 1935 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 1940 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 498 "src-ag/DefaultRules.ag" #-}- _hdIlocals `Set.union` _tlIlocals- {-# LINE 1945 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOlocals ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 1950 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 1955 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =- (T_Patterns (\ (!_lhsIcon)- (!_lhsInt) ->- (case (({-# LINE 519 "src-ag/DefaultRules.ag" #-}- False- {-# LINE 1965 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcontainsVars ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- []- {-# LINE 1970 "src-ag/DefaultRules.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1975 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}- Set.empty- {-# LINE 1980 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- Seq.empty- {-# LINE 1985 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 498 "src-ag/DefaultRules.ag" #-}- Set.empty- {-# LINE 1990 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOlocals ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- []- {-# LINE 1995 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 2000 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) })) )--- Production ---------------------------------------------------{-- visit 0:- inherited attributes:- aroundsIn : Map ConstructorIdent (Map Identifier [Expression])- augmentsIn : Map ConstructorIdent (Map Identifier [Expression])- cr : Bool- inh : Attributes- inhMap : Map Identifier Attributes- inhOrig : Attributes- manualAttrOrderMap : AttrOrderMap- mergesIn : Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))- nonterminals : Set NontermIdent- nt : NontermIdent- o_rename : Bool- options : Options- params : [Identifier]- syn : Attributes- synMap : Map Identifier Attributes- synOrig : Attributes- typeSyns : TypeSyns- useMap : Map Identifier (String,String,String)- wrappers : Set NontermIdent- chained attribute:- uniq : Int- synthesized attributes:- errors : Seq Error- output : SELF - alternatives:- alternative Production:- child con : {ConstructorIdent}- child params : {[Identifier]}- child constraints : {[Type]}- child children : Children - child rules : Rules - child typeSigs : TypeSigs - child macro : {MaybeMacro}- visit 0:- local mergesIn : _- local merged : _- local orderDeps : _- local orderErrs : _- local _tup2 : _- local errs : _- local aroundsIn : _- local augmentsIn : _- local newRls : _- local extra1 : _- local extra2 : _- local extra3 : _--}--- cata-sem_Production :: Production ->- T_Production -sem_Production !(Production _con _params _constraints _children _rules _typeSigs _macro ) =- (sem_Production_Production _con _params _constraints (sem_Children _children ) (sem_Rules _rules ) (sem_TypeSigs _typeSigs ) _macro )--- semantic domain-newtype T_Production = T_Production ((Map ConstructorIdent (Map Identifier [Expression])) ->- (Map ConstructorIdent (Map Identifier [Expression])) ->- Bool ->- Attributes ->- (Map Identifier Attributes) ->- Attributes ->- AttrOrderMap ->- (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) ->- (Set NontermIdent) ->- NontermIdent ->- Bool ->- Options ->- ([Identifier]) ->- Attributes ->- (Map Identifier Attributes) ->- Attributes ->- TypeSyns ->- Int ->- (Map Identifier (String,String,String)) ->- (Set NontermIdent) ->- ( (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),inhMap_Inh_Production :: !((Map Identifier Attributes)),inhOrig_Inh_Production :: !(Attributes),manualAttrOrderMap_Inh_Production :: !(AttrOrderMap),mergesIn_Inh_Production :: !((Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))),nonterminals_Inh_Production :: !((Set NontermIdent)),nt_Inh_Production :: !(NontermIdent),o_rename_Inh_Production :: !(Bool),options_Inh_Production :: !(Options),params_Inh_Production :: !(([Identifier])),syn_Inh_Production :: !(Attributes),synMap_Inh_Production :: !((Map Identifier Attributes)),synOrig_Inh_Production :: !(Attributes),typeSyns_Inh_Production :: !(TypeSyns),uniq_Inh_Production :: !(Int),useMap_Inh_Production :: !((Map Identifier (String,String,String))),wrappers_Inh_Production :: !((Set NontermIdent))}-data Syn_Production = Syn_Production {errors_Syn_Production :: !((Seq Error)),output_Syn_Production :: !(Production ),uniq_Syn_Production :: !(Int)}-wrap_Production :: T_Production ->- Inh_Production ->- Syn_Production -wrap_Production !(T_Production sem ) !(Inh_Production _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers ) =- (let ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) = sem _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers - in (Syn_Production _lhsOerrors _lhsOoutput _lhsOuniq ))-sem_Production_Production :: ConstructorIdent ->- ([Identifier]) ->- ([Type]) ->- T_Children ->- T_Rules ->- T_TypeSigs ->- MaybeMacro ->- T_Production -sem_Production_Production !con_ !params_ !constraints_ !(T_Children children_ ) !(T_Rules rules_ ) !(T_TypeSigs typeSigs_ ) !macro_ =- (T_Production (\ (!_lhsIaroundsIn)- (!_lhsIaugmentsIn)- (!_lhsIcr)- (!_lhsIinh)- (!_lhsIinhMap)- (!_lhsIinhOrig)- (!_lhsImanualAttrOrderMap)- (!_lhsImergesIn)- (!_lhsInonterminals)- (!_lhsInt)- (!_lhsIo_rename)- (!_lhsIoptions)- (!_lhsIparams)- (!_lhsIsyn)- (!_lhsIsynMap)- (!_lhsIsynOrig)- (!_lhsItypeSyns)- (!_lhsIuniq)- (!_lhsIuseMap)- (!_lhsIwrappers) ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 2121 "src-ag/DefaultRules.hs" #-}- )) of- { !_childrenOsynMap ->- (case (({-# LINE 760 "src-ag/DefaultRules.ag" #-}- Map.findWithDefault Map.empty con_ _lhsImergesIn- {-# LINE 2126 "src-ag/DefaultRules.hs" #-}- )) of- { !_mergesIn ->- (case (({-# LINE 761 "src-ag/DefaultRules.ag" #-}- Set.fromList [ c | (_,cs,_) <- Map.elems _mergesIn , c <- cs ]- {-# LINE 2131 "src-ag/DefaultRules.hs" #-}- )) of- { !_merged ->- (case (({-# LINE 756 "src-ag/DefaultRules.ag" #-}- _merged- {-# LINE 2136 "src-ag/DefaultRules.hs" #-}- )) of- { !_childrenOmerged ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 2141 "src-ag/DefaultRules.hs" #-}- )) of- { !_childrenOinhMap ->- (case (({-# LINE 687 "src-ag/DefaultRules.ag" #-}- Set.toList $ Map.findWithDefault Set.empty con_ $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrOrderMap- {-# LINE 2146 "src-ag/DefaultRules.hs" #-}- )) of- { !_orderDeps ->- (case (({-# LINE 560 "src-ag/DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 2151 "src-ag/DefaultRules.hs" #-}- )) of- { !_rulesOuniq ->- (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}- _lhsIoptions- {-# LINE 2156 "src-ag/DefaultRules.hs" #-}- )) of- { !_rulesOoptions ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 2161 "src-ag/DefaultRules.hs" #-}- )) of- { !_rulesOnt ->- (case (({-# LINE 168 "src-ag/DefaultRules.ag" #-}- con_- {-# LINE 2166 "src-ag/DefaultRules.hs" #-}- )) of- { !_rulesOcon ->- (case (rules_ _rulesOcon _rulesOnt _rulesOoptions _rulesOuniq ) of- { ( !_rulesIdefinedAttrs,!_rulesIerrors,!_rulesIlocals,!_rulesIoutput,!_rulesIruleNames,!_rulesIuniq) ->- (case (({-# LINE 41 "src-ag/DefaultRules.ag" #-}- _lhsIparams- {-# LINE 2173 "src-ag/DefaultRules.hs" #-}- )) of- { !_childrenOparams ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 2178 "src-ag/DefaultRules.hs" #-}- )) of- { !_childrenOnt ->- (case (({-# LINE 55 "src-ag/DefaultRules.ag" #-}- _lhsIcr- {-# LINE 2183 "src-ag/DefaultRules.hs" #-}- )) of- { !_childrenOcr ->- (case (({-# LINE 169 "src-ag/DefaultRules.ag" #-}- con_- {-# LINE 2188 "src-ag/DefaultRules.hs" #-}- )) of- { !_childrenOcon ->- (case (children_ _childrenOcon _childrenOcr _childrenOinhMap _childrenOmerged _childrenOnt _childrenOparams _childrenOsynMap ) of- { ( !_childrenIerrors,!_childrenIfields,!_childrenIinputs,!_childrenIoutput,!_childrenIoutputs) ->- (case (({-# LINE 689 "src-ag/DefaultRules.ag" #-}- let chldOutMap = Map.fromList [ (k, Map.keysSet s) | (k,s) <- _childrenIoutputs ]- chldInMap = Map.fromList [ (k, Map.keysSet s) | (k,s) <- _childrenIinputs ]- isInAttribute :: Identifier -> Identifier -> [Error]- isInAttribute fld nm- | fld == _LOC = if nm `Set.member` _rulesIlocals- then []- else [UndefAttr _lhsInt con_ fld nm False]- | fld == _LHS = if nm `Map.member` _lhsIinh- then []- else [UndefAttr _lhsInt con_ fld nm False]- | otherwise = if nm `Set.member` (Map.findWithDefault Set.empty fld chldOutMap)- then []- else [UndefAttr _lhsInt con_ fld nm False]- isOutAttribute :: Identifier -> Identifier -> [Error]- isOutAttribute fld nm- | fld == _LOC = if nm `Set.member` _rulesIlocals- then []- else [UndefAttr _lhsInt con_ fld nm True]- | fld == _LHS = if nm `Map.member` _lhsIsyn- then []- else [UndefAttr _lhsInt con_ fld nm True]- | otherwise = if nm `Set.member` (Map.findWithDefault Set.empty fld chldInMap)- then []- else [UndefAttr _lhsInt con_ fld nm True]- existsRule nm = if nm `Set.member` _rulesIruleNames- then []- else [MissingNamedRule _lhsInt con_ nm]- checkIn (OccAttr fld nm) = isInAttribute fld nm- checkIn (OccRule nm) = existsRule nm- checkOut (OccAttr fld nm) = isOutAttribute fld nm- checkOut (OccRule nm) = existsRule nm- in Seq.fromList . concat $- [ checkIn occA ++ checkOut occB- | (Dependency occA occB) <- _orderDeps- ]- {-# LINE 2229 "src-ag/DefaultRules.hs" #-}- )) of- { !_orderErrs ->- (case (({-# LINE 358 "src-ag/DefaultRules.ag" #-}- let locals = _rulesIlocals- initenv = Map.fromList ( [ (a,_ACHILD)- | (a,_,_) <- _childrenIfields- ]- ++ attrs(_LHS, _lhsIinh)- ++ [ (a,_LOC)- | a <- Set.toList locals- ]- )- attrs (n,as) = [ (a,n) | a <- Map.keys as ]- envs = scanl (flip Map.union)- initenv- (map (Map.fromList . attrs ) _childrenIoutputs)- child_envs = init envs- lhs_env = last envs- (selfAttrs, normalAttrs)- = Map.partitionWithKey (\k _ -> maybe False isSELFNonterminal $ Map.lookup k _lhsIsynOrig) _lhsIsyn- (_,undefAttrs)- = removeDefined _rulesIdefinedAttrs (_LHS, normalAttrs)- (useAttrs,others)- = splitAttrs _lhsIuseMap undefAttrs- (rules1, errors1)- = concatRE $ map (copyRule _lhsIoptions _lhsIwrappers _lhsInt con_ _lhsIcr locals)- (zip envs (map (removeDefined _rulesIdefinedAttrs) _childrenIinputs))- uRules- = map (useRule locals _childrenIoutputs) useAttrs- selfLocRules- = [ selfRule False attr (constructor [childSelf attr nm tp | (nm,tp,virt) <- _childrenIfields, childExists virt])- | attr <- Map.keys selfAttrs- , not (Set.member attr locals)- ]- where- childSelf self nm tp- = case tp of NT nt _ _ -> attrName nm self- _ | nm `Set.member` locals -> locname nm- | otherwise -> fieldName nm- constructor fs- | getName con_ == "Tuple" && _lhsInt `elem` map fst _lhsItypeSyns- = "(" ++ concat (intersperse "," fs) ++ ")"- | otherwise- = getConName _lhsItypeSyns _lhsIo_rename _lhsInt con_ ++ " " ++ unwords fs- childExists ChildAttr = False- childExists _ = True- selfRules- = [ selfRule True attr undefined- | attr <- Map.keys selfAttrs- , not (Set.member (_LHS,attr) _rulesIdefinedAttrs)- ]- (rules5, errs5)- = copyRule _lhsIoptions- _lhsIwrappers- _lhsInt- con_- _lhsIcr- locals- (lhs_env, (_LHS, others))- in (uRules++selfLocRules++selfRules++rules5++rules1, errors1><errs5)- {-# LINE 2290 "src-ag/DefaultRules.hs" #-}- )) of- { !__tup2 ->- (case (({-# LINE 358 "src-ag/DefaultRules.ag" #-}- __tup2- {-# LINE 2295 "src-ag/DefaultRules.hs" #-}- )) of- { !(_,!_errs) ->- (case (({-# LINE 356 "src-ag/DefaultRules.ag" #-}- _childrenIerrors >< _errs >< _rulesIerrors >< _orderErrs- {-# LINE 2300 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 41 "src-ag/DefaultRules.ag" #-}- _lhsIparams- {-# LINE 2305 "src-ag/DefaultRules.hs" #-}- )) of- { !_typeSigsOparams ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 2310 "src-ag/DefaultRules.hs" #-}- )) of- { !_typeSigsOnt ->- (case (({-# LINE 752 "src-ag/DefaultRules.ag" #-}- Map.findWithDefault Map.empty con_ _lhsIaroundsIn- {-# LINE 2315 "src-ag/DefaultRules.hs" #-}- )) of- { !_aroundsIn ->- (case (({-# LINE 745 "src-ag/DefaultRules.ag" #-}- Map.findWithDefault Map.empty con_ _lhsIaugmentsIn- {-# LINE 2320 "src-ag/DefaultRules.hs" #-}- )) of- { !_augmentsIn ->- (case (({-# LINE 358 "src-ag/DefaultRules.ag" #-}- __tup2- {-# LINE 2325 "src-ag/DefaultRules.hs" #-}- )) of- { !(!_newRls,_) ->- (case (({-# LINE 576 "src-ag/DefaultRules.ag" #-}- foldr addAugments (_rulesIoutput ++ _newRls) (Map.assocs _augmentsIn )- {-# LINE 2330 "src-ag/DefaultRules.hs" #-}- )) of- { !_extra1 ->- (case (({-# LINE 577 "src-ag/DefaultRules.ag" #-}- foldr addArounds _extra1 (Map.assocs _aroundsIn )- {-# LINE 2335 "src-ag/DefaultRules.hs" #-}- )) of- { !_extra2 ->- (case (({-# LINE 578 "src-ag/DefaultRules.ag" #-}- foldr addMerges _extra2 (Map.assocs _mergesIn )- {-# LINE 2340 "src-ag/DefaultRules.hs" #-}- )) of- { !_extra3 ->- (case (typeSigs_ _typeSigsOnt _typeSigsOparams ) of- { ( !_typeSigsIoutput) ->- (case (({-# LINE 579 "src-ag/DefaultRules.ag" #-}- Production con_ params_ constraints_ _childrenIoutput _extra3 _typeSigsIoutput macro_- {-# LINE 2347 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- (case (({-# LINE 560 "src-ag/DefaultRules.ag" #-}- _rulesIuniq- {-# LINE 2352 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOuniq ->- ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Productions --------------------------------------------------{-- visit 0:- inherited attributes:- aroundsIn : Map ConstructorIdent (Map Identifier [Expression])- augmentsIn : Map ConstructorIdent (Map Identifier [Expression])- cr : Bool- inh : Attributes- inhMap : Map Identifier Attributes- inhOrig : Attributes- manualAttrOrderMap : AttrOrderMap- mergesIn : Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))- nonterminals : Set NontermIdent- nt : NontermIdent- o_rename : Bool- options : Options- params : [Identifier]- syn : Attributes- synMap : Map Identifier Attributes- synOrig : Attributes- typeSyns : TypeSyns- useMap : Map Identifier (String,String,String)- wrappers : Set NontermIdent- chained attribute:- uniq : Int- synthesized attributes:- errors : Seq Error- output : SELF - alternatives:- alternative Cons:- child hd : Production - child tl : Productions - visit 0:- local output : _- alternative Nil:- visit 0:- local output : _--}--- cata-sem_Productions :: Productions ->- T_Productions -sem_Productions !list =- (Prelude.foldr sem_Productions_Cons sem_Productions_Nil (Prelude.map sem_Production list) )--- semantic domain-newtype T_Productions = T_Productions ((Map ConstructorIdent (Map Identifier [Expression])) ->- (Map ConstructorIdent (Map Identifier [Expression])) ->- Bool ->- Attributes ->- (Map Identifier Attributes) ->- Attributes ->- AttrOrderMap ->- (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) ->- (Set NontermIdent) ->- NontermIdent ->- Bool ->- Options ->- ([Identifier]) ->- Attributes ->- (Map Identifier Attributes) ->- Attributes ->- TypeSyns ->- Int ->- (Map Identifier (String,String,String)) ->- (Set NontermIdent) ->- ( (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),inhMap_Inh_Productions :: !((Map Identifier Attributes)),inhOrig_Inh_Productions :: !(Attributes),manualAttrOrderMap_Inh_Productions :: !(AttrOrderMap),mergesIn_Inh_Productions :: !((Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))),nonterminals_Inh_Productions :: !((Set NontermIdent)),nt_Inh_Productions :: !(NontermIdent),o_rename_Inh_Productions :: !(Bool),options_Inh_Productions :: !(Options),params_Inh_Productions :: !(([Identifier])),syn_Inh_Productions :: !(Attributes),synMap_Inh_Productions :: !((Map Identifier Attributes)),synOrig_Inh_Productions :: !(Attributes),typeSyns_Inh_Productions :: !(TypeSyns),uniq_Inh_Productions :: !(Int),useMap_Inh_Productions :: !((Map Identifier (String,String,String))),wrappers_Inh_Productions :: !((Set NontermIdent))}-data Syn_Productions = Syn_Productions {errors_Syn_Productions :: !((Seq Error)),output_Syn_Productions :: !(Productions ),uniq_Syn_Productions :: !(Int)}-wrap_Productions :: T_Productions ->- Inh_Productions ->- Syn_Productions -wrap_Productions !(T_Productions sem ) !(Inh_Productions _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers ) =- (let ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) = sem _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers - in (Syn_Productions _lhsOerrors _lhsOoutput _lhsOuniq ))-sem_Productions_Cons :: T_Production ->- T_Productions ->- T_Productions -sem_Productions_Cons !(T_Production hd_ ) !(T_Productions tl_ ) =- (T_Productions (\ (!_lhsIaroundsIn)- (!_lhsIaugmentsIn)- (!_lhsIcr)- (!_lhsIinh)- (!_lhsIinhMap)- (!_lhsIinhOrig)- (!_lhsImanualAttrOrderMap)- (!_lhsImergesIn)- (!_lhsInonterminals)- (!_lhsInt)- (!_lhsIo_rename)- (!_lhsIoptions)- (!_lhsIparams)- (!_lhsIsyn)- (!_lhsIsynMap)- (!_lhsIsynOrig)- (!_lhsItypeSyns)- (!_lhsIuniq)- (!_lhsIuseMap)- (!_lhsIwrappers) ->- (case (({-# LINE 64 "src-ag/DefaultRules.ag" #-}- _lhsIwrappers- {-# LINE 2455 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOwrappers ->- (case (({-# LINE 158 "src-ag/DefaultRules.ag" #-}- _lhsIuseMap- {-# LINE 2460 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOuseMap ->- (case (({-# LINE 71 "src-ag/DefaultRules.ag" #-}- _lhsItypeSyns- {-# LINE 2465 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOtypeSyns ->- (case (({-# LINE 158 "src-ag/DefaultRules.ag" #-}- _lhsIsynOrig- {-# LINE 2470 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOsynOrig ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 2475 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOsynMap ->- (case (({-# LINE 158 "src-ag/DefaultRules.ag" #-}- _lhsIsyn- {-# LINE 2480 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOsyn ->- (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}- _lhsIoptions- {-# LINE 2485 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOoptions ->- (case (({-# LINE 51 "src-ag/DefaultRules.ag" #-}- _lhsIo_rename- {-# LINE 2490 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOo_rename ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 2495 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOnt ->- (case (({-# LINE 755 "src-ag/DefaultRules.ag" #-}- _lhsImergesIn- {-# LINE 2500 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOmergesIn ->- (case (({-# LINE 673 "src-ag/DefaultRules.ag" #-}- _lhsImanualAttrOrderMap- {-# LINE 2505 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOmanualAttrOrderMap ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 2510 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOinhMap ->- (case (({-# LINE 158 "src-ag/DefaultRules.ag" #-}- _lhsIinh- {-# LINE 2515 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOinh ->- (case (({-# LINE 52 "src-ag/DefaultRules.ag" #-}- _lhsIcr- {-# LINE 2520 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOcr ->- (case (({-# LINE 64 "src-ag/DefaultRules.ag" #-}- _lhsIwrappers- {-# LINE 2525 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOwrappers ->- (case (({-# LINE 158 "src-ag/DefaultRules.ag" #-}- _lhsIuseMap- {-# LINE 2530 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOuseMap ->- (case (({-# LINE 71 "src-ag/DefaultRules.ag" #-}- _lhsItypeSyns- {-# LINE 2535 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOtypeSyns ->- (case (({-# LINE 158 "src-ag/DefaultRules.ag" #-}- _lhsIsynOrig- {-# LINE 2540 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOsynOrig ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 2545 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOsynMap ->- (case (({-# LINE 158 "src-ag/DefaultRules.ag" #-}- _lhsIsyn- {-# LINE 2550 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOsyn ->- (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}- _lhsIoptions- {-# LINE 2555 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOoptions ->- (case (({-# LINE 51 "src-ag/DefaultRules.ag" #-}- _lhsIo_rename- {-# LINE 2560 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOo_rename ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 2565 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOnt ->- (case (({-# LINE 755 "src-ag/DefaultRules.ag" #-}- _lhsImergesIn- {-# LINE 2570 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOmergesIn ->- (case (({-# LINE 673 "src-ag/DefaultRules.ag" #-}- _lhsImanualAttrOrderMap- {-# LINE 2575 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOmanualAttrOrderMap ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 2580 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOinhMap ->- (case (({-# LINE 158 "src-ag/DefaultRules.ag" #-}- _lhsIinh- {-# LINE 2585 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOinh ->- (case (({-# LINE 52 "src-ag/DefaultRules.ag" #-}- _lhsIcr- {-# LINE 2590 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOcr ->- (case (({-# LINE 560 "src-ag/DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 2595 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOuniq ->- (case (({-# LINE 41 "src-ag/DefaultRules.ag" #-}- _lhsIparams- {-# LINE 2600 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOparams ->- (case (({-# LINE 149 "src-ag/DefaultRules.ag" #-}- _lhsInonterminals- {-# LINE 2605 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOnonterminals ->- (case (({-# LINE 158 "src-ag/DefaultRules.ag" #-}- _lhsIinhOrig- {-# LINE 2610 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOinhOrig ->- (case (({-# LINE 741 "src-ag/DefaultRules.ag" #-}- _lhsIaugmentsIn- {-# LINE 2615 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOaugmentsIn ->- (case (({-# LINE 748 "src-ag/DefaultRules.ag" #-}- _lhsIaroundsIn- {-# LINE 2620 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOaroundsIn ->- (case (hd_ _hdOaroundsIn _hdOaugmentsIn _hdOcr _hdOinh _hdOinhMap _hdOinhOrig _hdOmanualAttrOrderMap _hdOmergesIn _hdOnonterminals _hdOnt _hdOo_rename _hdOoptions _hdOparams _hdOsyn _hdOsynMap _hdOsynOrig _hdOtypeSyns _hdOuniq _hdOuseMap _hdOwrappers ) of- { ( !_hdIerrors,!_hdIoutput,!_hdIuniq) ->- (case (({-# LINE 560 "src-ag/DefaultRules.ag" #-}- _hdIuniq- {-# LINE 2627 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOuniq ->- (case (({-# LINE 41 "src-ag/DefaultRules.ag" #-}- _lhsIparams- {-# LINE 2632 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOparams ->- (case (({-# LINE 149 "src-ag/DefaultRules.ag" #-}- _lhsInonterminals- {-# LINE 2637 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOnonterminals ->- (case (({-# LINE 158 "src-ag/DefaultRules.ag" #-}- _lhsIinhOrig- {-# LINE 2642 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOinhOrig ->- (case (({-# LINE 741 "src-ag/DefaultRules.ag" #-}- _lhsIaugmentsIn- {-# LINE 2647 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOaugmentsIn ->- (case (({-# LINE 748 "src-ag/DefaultRules.ag" #-}- _lhsIaroundsIn- {-# LINE 2652 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOaroundsIn ->- (case (tl_ _tlOaroundsIn _tlOaugmentsIn _tlOcr _tlOinh _tlOinhMap _tlOinhOrig _tlOmanualAttrOrderMap _tlOmergesIn _tlOnonterminals _tlOnt _tlOo_rename _tlOoptions _tlOparams _tlOsyn _tlOsynMap _tlOsynOrig _tlOtypeSyns _tlOuniq _tlOuseMap _tlOwrappers ) of- { ( !_tlIerrors,!_tlIoutput,!_tlIuniq) ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 2659 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 2664 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 2669 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- (case (({-# LINE 560 "src-ag/DefaultRules.ag" #-}- _tlIuniq- {-# LINE 2674 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOuniq ->- ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Productions_Nil :: T_Productions -sem_Productions_Nil =- (T_Productions (\ (!_lhsIaroundsIn)- (!_lhsIaugmentsIn)- (!_lhsIcr)- (!_lhsIinh)- (!_lhsIinhMap)- (!_lhsIinhOrig)- (!_lhsImanualAttrOrderMap)- (!_lhsImergesIn)- (!_lhsInonterminals)- (!_lhsInt)- (!_lhsIo_rename)- (!_lhsIoptions)- (!_lhsIparams)- (!_lhsIsyn)- (!_lhsIsynMap)- (!_lhsIsynOrig)- (!_lhsItypeSyns)- (!_lhsIuniq)- (!_lhsIuseMap)- (!_lhsIwrappers) ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- Seq.empty- {-# LINE 2702 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- []- {-# LINE 2707 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 2712 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- (case (({-# LINE 560 "src-ag/DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 2717 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOuniq ->- ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) })) )--- Rule ---------------------------------------------------------{-- visit 0:- inherited attributes:- con : ConstructorIdent- nt : NontermIdent- options : Options- chained attribute:- uniq : Int- synthesized attributes:- containsVars : Bool- definedAttrs : Set (Identifier,Identifier)- errors : Seq Error- isPure : Bool- locals : Set Identifier- output : SELF - outputs : Rules - ruleNames : Set Identifier- alternatives:- alternative Rule:- child mbName : {Maybe Identifier}- child pattern : Pattern - child rhs : {Expression}- child owrt : {Bool}- child origin : {String}- child explicit : {Bool}- child pure : {Bool}- child identity : {Bool}- child mbError : {Maybe Error}- child eager : {Bool}- visit 0:- local output : _- local _tup3 : _- local output1 : _- local _tup4 : _- local outputs : _- local mbAlias : _--}--- cata-sem_Rule :: Rule ->- T_Rule -sem_Rule !(Rule _mbName _pattern _rhs _owrt _origin _explicit _pure _identity _mbError _eager ) =- (sem_Rule_Rule _mbName (sem_Pattern _pattern ) _rhs _owrt _origin _explicit _pure _identity _mbError _eager )--- semantic domain-newtype T_Rule = T_Rule (ConstructorIdent ->- NontermIdent ->- Options ->- Int ->- ( Bool,(Set (Identifier,Identifier)),(Seq Error),Bool,(Set Identifier),Rule ,Rules ,(Set Identifier),Int))-data Inh_Rule = Inh_Rule {con_Inh_Rule :: !(ConstructorIdent),nt_Inh_Rule :: !(NontermIdent),options_Inh_Rule :: !(Options),uniq_Inh_Rule :: !(Int)}-data Syn_Rule = Syn_Rule {containsVars_Syn_Rule :: !(Bool),definedAttrs_Syn_Rule :: !((Set (Identifier,Identifier))),errors_Syn_Rule :: !((Seq Error)),isPure_Syn_Rule :: !(Bool),locals_Syn_Rule :: !((Set Identifier)),output_Syn_Rule :: !(Rule ),outputs_Syn_Rule :: !(Rules ),ruleNames_Syn_Rule :: !((Set Identifier)),uniq_Syn_Rule :: !(Int)}-wrap_Rule :: T_Rule ->- Inh_Rule ->- Syn_Rule -wrap_Rule !(T_Rule sem ) !(Inh_Rule _lhsIcon _lhsInt _lhsIoptions _lhsIuniq ) =- (let ( !_lhsOcontainsVars,!_lhsOdefinedAttrs,!_lhsOerrors,!_lhsOisPure,!_lhsOlocals,!_lhsOoutput,!_lhsOoutputs,!_lhsOruleNames,!_lhsOuniq) = sem _lhsIcon _lhsInt _lhsIoptions _lhsIuniq - in (Syn_Rule _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOisPure _lhsOlocals _lhsOoutput _lhsOoutputs _lhsOruleNames _lhsOuniq ))-sem_Rule_Rule :: (Maybe Identifier) ->- T_Pattern ->- Expression ->- Bool ->- String ->- Bool ->- Bool ->- Bool ->- (Maybe Error) ->- Bool ->- T_Rule -sem_Rule_Rule !mbName_ !(T_Pattern pattern_ ) !rhs_ !owrt_ !origin_ !explicit_ !pure_ !identity_ !mbError_ !eager_ =- (T_Rule (\ (!_lhsIcon)- (!_lhsInt)- (!_lhsIoptions)- (!_lhsIuniq) ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 2796 "src-ag/DefaultRules.hs" #-}- )) of- { !_patternOnt ->- (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}- _lhsIcon- {-# LINE 2801 "src-ag/DefaultRules.hs" #-}- )) of- { !_patternOcon ->- (case (pattern_ _patternOcon _patternOnt ) of- { ( !_patternIcontainsVars,!_patternIcopy,!_patternIdefinedAttrs,!_patternIerrors,!_patternIlocals,!_patternIoutput) ->- (case (({-# LINE 519 "src-ag/DefaultRules.ag" #-}- _patternIcontainsVars- {-# LINE 2808 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOcontainsVars ->- (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}- _patternIdefinedAttrs- {-# LINE 2813 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- _patternIerrors- {-# LINE 2818 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 525 "src-ag/DefaultRules.ag" #-}- pure_- {-# LINE 2823 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOisPure ->- (case (({-# LINE 498 "src-ag/DefaultRules.ag" #-}- _patternIlocals- {-# LINE 2828 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOlocals ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- Rule mbName_ _patternIoutput rhs_ owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_- {-# LINE 2833 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 2838 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- (case (({-# LINE 592 "src-ag/DefaultRules.ag" #-}- mkRuleAlias _output- {-# LINE 2843 "src-ag/DefaultRules.hs" #-}- )) of- { !__tup3 ->- (case (({-# LINE 592 "src-ag/DefaultRules.ag" #-}- __tup3- {-# LINE 2848 "src-ag/DefaultRules.hs" #-}- )) of- { !(!_output1,_) ->- (case (({-# LINE 593 "src-ag/DefaultRules.ag" #-}- if needsMultiRules _lhsIoptions- then multiRule _output1 _lhsIuniq- else ([_output1 ], _lhsIuniq)- {-# LINE 2855 "src-ag/DefaultRules.hs" #-}- )) of- { !__tup4 ->- (case (({-# LINE 593 "src-ag/DefaultRules.ag" #-}- __tup4- {-# LINE 2860 "src-ag/DefaultRules.hs" #-}- )) of- { !(!_outputs,_) ->- (case (({-# LINE 592 "src-ag/DefaultRules.ag" #-}- __tup3- {-# LINE 2865 "src-ag/DefaultRules.hs" #-}- )) of- { !(_,!_mbAlias) ->- (case (({-# LINE 596 "src-ag/DefaultRules.ag" #-}- maybe [] return _mbAlias ++ _outputs- {-# LINE 2870 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutputs ->- (case (({-# LINE 681 "src-ag/DefaultRules.ag" #-}- case mbName_ of- Nothing -> Set.empty- Just nm -> Set.singleton nm- {-# LINE 2877 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOruleNames ->- (case (({-# LINE 593 "src-ag/DefaultRules.ag" #-}- __tup4- {-# LINE 2882 "src-ag/DefaultRules.hs" #-}- )) of- { !(_,!_lhsOuniq) ->- ( _lhsOcontainsVars,_lhsOdefinedAttrs,_lhsOerrors,_lhsOisPure,_lhsOlocals,_lhsOoutput,_lhsOoutputs,_lhsOruleNames,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Rules --------------------------------------------------------{-- visit 0:- inherited attributes:- con : ConstructorIdent- nt : NontermIdent- options : Options- chained attribute:- uniq : Int- synthesized attributes:- definedAttrs : Set (Identifier,Identifier)- errors : Seq Error- locals : Set Identifier- output : SELF - ruleNames : Set Identifier- alternatives:- alternative Cons:- child hd : Rule - child tl : Rules - alternative Nil:- visit 0:- local output : _--}--- cata-sem_Rules :: Rules ->- T_Rules -sem_Rules !list =- (Prelude.foldr sem_Rules_Cons sem_Rules_Nil (Prelude.map sem_Rule list) )--- semantic domain-newtype T_Rules = T_Rules (ConstructorIdent ->- NontermIdent ->- Options ->- 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),options_Inh_Rules :: !(Options),uniq_Inh_Rules :: !(Int)}-data Syn_Rules = Syn_Rules {definedAttrs_Syn_Rules :: !((Set (Identifier,Identifier))),errors_Syn_Rules :: !((Seq Error)),locals_Syn_Rules :: !((Set Identifier)),output_Syn_Rules :: !(Rules ),ruleNames_Syn_Rules :: !((Set Identifier)),uniq_Syn_Rules :: !(Int)}-wrap_Rules :: T_Rules ->- Inh_Rules ->- Syn_Rules -wrap_Rules !(T_Rules sem ) !(Inh_Rules _lhsIcon _lhsInt _lhsIoptions _lhsIuniq ) =- (let ( !_lhsOdefinedAttrs,!_lhsOerrors,!_lhsOlocals,!_lhsOoutput,!_lhsOruleNames,!_lhsOuniq) = sem _lhsIcon _lhsInt _lhsIoptions _lhsIuniq - in (Syn_Rules _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOruleNames _lhsOuniq ))-sem_Rules_Cons :: T_Rule ->- T_Rules ->- T_Rules -sem_Rules_Cons !(T_Rule hd_ ) !(T_Rules tl_ ) =- (T_Rules (\ (!_lhsIcon)- (!_lhsInt)- (!_lhsIoptions)- (!_lhsIuniq) ->- (case (({-# LINE 560 "src-ag/DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 2938 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOuniq ->- (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}- _lhsIoptions- {-# LINE 2943 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOoptions ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 2948 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOnt ->- (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}- _lhsIcon- {-# LINE 2953 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOcon ->- (case (hd_ _hdOcon _hdOnt _hdOoptions _hdOuniq ) of- { ( !_hdIcontainsVars,!_hdIdefinedAttrs,!_hdIerrors,!_hdIisPure,!_hdIlocals,!_hdIoutput,!_hdIoutputs,!_hdIruleNames,!_hdIuniq) ->- (case (({-# LINE 560 "src-ag/DefaultRules.ag" #-}- _hdIuniq- {-# LINE 2960 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOuniq ->- (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}- _lhsIoptions- {-# LINE 2965 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOoptions ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 2970 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOnt ->- (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}- _lhsIcon- {-# LINE 2975 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOcon ->- (case (tl_ _tlOcon _tlOnt _tlOoptions _tlOuniq ) of- { ( !_tlIdefinedAttrs,!_tlIerrors,!_tlIlocals,!_tlIoutput,!_tlIruleNames,!_tlIuniq) ->- (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}- _hdIdefinedAttrs `Set.union` _tlIdefinedAttrs- {-# LINE 2982 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 2987 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 498 "src-ag/DefaultRules.ag" #-}- _hdIlocals `Set.union` _tlIlocals- {-# LINE 2992 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOlocals ->- (case (({-# LINE 588 "src-ag/DefaultRules.ag" #-}- if _hdIcontainsVars && _hdIisPure then _hdIoutputs ++ _tlIoutput else _tlIoutput- {-# LINE 2997 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- (case (({-# LINE 679 "src-ag/DefaultRules.ag" #-}- _hdIruleNames `Set.union` _tlIruleNames- {-# LINE 3002 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOruleNames ->- (case (({-# LINE 560 "src-ag/DefaultRules.ag" #-}- _tlIuniq- {-# LINE 3007 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOuniq ->- ( _lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_lhsOruleNames,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Rules_Nil :: T_Rules -sem_Rules_Nil =- (T_Rules (\ (!_lhsIcon)- (!_lhsInt)- (!_lhsIoptions)- (!_lhsIuniq) ->- (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}- Set.empty- {-# LINE 3019 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 139 "src-ag/DefaultRules.ag" #-}- Seq.empty- {-# LINE 3024 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 498 "src-ag/DefaultRules.ag" #-}- Set.empty- {-# LINE 3029 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOlocals ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- []- {-# LINE 3034 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 3039 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- (case (({-# LINE 679 "src-ag/DefaultRules.ag" #-}- Set.empty- {-# LINE 3044 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOruleNames ->- (case (({-# LINE 560 "src-ag/DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 3049 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOuniq ->- ( _lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_lhsOruleNames,_lhsOuniq) }) }) }) }) }) }) })) )--- TypeSig ------------------------------------------------------{-- visit 0:- inherited attributes:- nt : NontermIdent- params : [Identifier]- synthesized attribute:- output : SELF - alternatives:- alternative TypeSig:- child name : {Identifier}- child tp : {Type}- visit 0:- local tp1 : _--}--- cata-sem_TypeSig :: TypeSig ->- T_TypeSig -sem_TypeSig !(TypeSig _name _tp ) =- (sem_TypeSig_TypeSig _name _tp )--- semantic domain-newtype T_TypeSig = T_TypeSig (NontermIdent ->- ([Identifier]) ->- ( TypeSig ))-data Inh_TypeSig = Inh_TypeSig {nt_Inh_TypeSig :: !(NontermIdent),params_Inh_TypeSig :: !(([Identifier]))}-data Syn_TypeSig = Syn_TypeSig {output_Syn_TypeSig :: !(TypeSig )}-wrap_TypeSig :: T_TypeSig ->- Inh_TypeSig ->- Syn_TypeSig -wrap_TypeSig !(T_TypeSig sem ) !(Inh_TypeSig _lhsInt _lhsIparams ) =- (let ( !_lhsOoutput) = sem _lhsInt _lhsIparams - in (Syn_TypeSig _lhsOoutput ))-sem_TypeSig_TypeSig :: Identifier ->- Type ->- T_TypeSig -sem_TypeSig_TypeSig !name_ !tp_ =- (T_TypeSig (\ (!_lhsInt)- (!_lhsIparams) ->- (case (({-# LINE 544 "src-ag/DefaultRules.ag" #-}- elimSelfId _lhsInt _lhsIparams tp_- {-# LINE 3093 "src-ag/DefaultRules.hs" #-}- )) of- { !_tp1 ->- (case (({-# LINE 585 "src-ag/DefaultRules.ag" #-}- TypeSig name_ _tp1- {-# LINE 3098 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOoutput) }) })) )--- TypeSigs -----------------------------------------------------{-- visit 0:- inherited attributes:- nt : NontermIdent- params : [Identifier]- 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 (NontermIdent ->- ([Identifier]) ->- ( TypeSigs ))-data Inh_TypeSigs = Inh_TypeSigs {nt_Inh_TypeSigs :: !(NontermIdent),params_Inh_TypeSigs :: !(([Identifier]))}-data Syn_TypeSigs = Syn_TypeSigs {output_Syn_TypeSigs :: !(TypeSigs )}-wrap_TypeSigs :: T_TypeSigs ->- Inh_TypeSigs ->- Syn_TypeSigs -wrap_TypeSigs !(T_TypeSigs sem ) !(Inh_TypeSigs _lhsInt _lhsIparams ) =- (let ( !_lhsOoutput) = sem _lhsInt _lhsIparams - in (Syn_TypeSigs _lhsOoutput ))-sem_TypeSigs_Cons :: T_TypeSig ->- T_TypeSigs ->- T_TypeSigs -sem_TypeSigs_Cons !(T_TypeSig hd_ ) !(T_TypeSigs tl_ ) =- (T_TypeSigs (\ (!_lhsInt)- (!_lhsIparams) ->- (case (({-# LINE 41 "src-ag/DefaultRules.ag" #-}- _lhsIparams- {-# LINE 3145 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOparams ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 3150 "src-ag/DefaultRules.hs" #-}- )) of- { !_tlOnt ->- (case (({-# LINE 41 "src-ag/DefaultRules.ag" #-}- _lhsIparams- {-# LINE 3155 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOparams ->- (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}- _lhsInt- {-# LINE 3160 "src-ag/DefaultRules.hs" #-}- )) of- { !_hdOnt ->- (case (tl_ _tlOnt _tlOparams ) of- { ( !_tlIoutput) ->- (case (hd_ _hdOnt _hdOparams ) of- { ( !_hdIoutput) ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 3169 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 3174 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOoutput) }) }) }) }) }) }) }) })) )-sem_TypeSigs_Nil :: T_TypeSigs -sem_TypeSigs_Nil =- (T_TypeSigs (\ (!_lhsInt)- (!_lhsIparams) ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- []- {-# LINE 3184 "src-ag/DefaultRules.hs" #-}- )) of- { !_output ->- (case (({-# LINE 567 "src-ag/DefaultRules.ag" #-}- _output- {-# LINE 3189 "src-ag/DefaultRules.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOoutput) }) })) )+-- UUAGC 0.9.40.1 (src-ag/DefaultRules.ag)+module DefaultRules where+{-# LINE 15 "src-ag/DefaultRules.ag" #-}++import qualified Data.List+import qualified Data.Set as Set+import qualified Data.Map as Map+import Data.Map(Map)+import qualified Data.Sequence as Seq+import Data.Sequence(Seq,(><))+import UU.Scanner.Position(noPos)+import Pretty+import Data.Maybe+import HsToken+import HsTokenScanner+import Data.List(intersperse)++import AbstractSyntax+import ErrorMessages++import Options+{-# LINE 25 "dist/build/DefaultRules.hs" #-}++{-# LINE 2 "src-ag/AbstractSyntax.ag" #-}++-- AbstractSyntax.ag imports+import Data.Set(Set)+import Data.Map(Map)+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import Macro --marcos+import CommonTypes+import ErrorMessages+{-# LINE 37 "dist/build/DefaultRules.hs" #-}++{-# LINE 2 "src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 44 "dist/build/DefaultRules.hs" #-}+{-# LINE 77 "src-ag/DefaultRules.ag" #-}++fieldName n = '@' : getName n++locName n = "@loc." ++ getName n++attrName fld attr+ | fld == _LOC = locName attr+ | fld == _FIELD = fieldName attr+ | otherwise = '@' : getName fld ++ "." ++ getName attr++_ACHILD = Ident "(" noPos -- hack++mkLocVar = AGField _LOC+++getConName typeSyns rename nt con1+ | nt `elem` map fst typeSyns = synonym+ | otherwise = normalName+ where con = getName con1+ normalName | rename = getName nt++"_"++ con+ | otherwise = con+ synonym | con == "Cons" = "(:)"+ | con == "Nil" = case lookup nt typeSyns of+ Just (Map _ _) -> "Data.Map.empty"+ Just (IntMap _) -> "Data.IntMap.empty"+ Just (OrdSet _) -> "Data.Set.empty"+ Just IntSet -> "Data.IntSet.empty"+ _ -> "[]"+ | con == "Just" = "Just"+ | con == "Nothing" = "Nothing"+ | con == "Entry" = case lookup nt typeSyns of+ Just (Map _ _) -> "Data.Map.insert"+ Just (IntMap _) -> "Data.IntMap.insert"+ Just (OrdSet _) -> "Data.Set.insert"+ Just IntSet -> "Data.IntSet.insert"+ | otherwise = normalName++concatSeq = foldr (Seq.><) Seq.empty++splitAttrs :: Map Identifier a -> [Identifier] -> ([(Identifier,a)],[Identifier]) -- a used as (String,String)+splitAttrs _ []+ = ([],[])+splitAttrs useMap (n:rest)+ = let (uses,normals) = splitAttrs useMap rest+ in case Map.lookup n useMap of+ Just x -> ((n,x):uses , normals )+ Nothing -> ( uses , n:normals )++removeDefined :: Set (Identifier,Identifier) -> (Identifier,Attributes) -> (Identifier,[Identifier])+removeDefined defined (fld,as)+ = ( fld+ , [ a+ | a <- Map.keys as+ , not (Set.member (fld,a) defined)+ ]+ )++{-# LINE 103 "dist/build/DefaultRules.hs" #-}++{-# LINE 200 "src-ag/DefaultRules.ag" #-}+++++deprecatedCopyRuleError nt con fld a+ = let mesg =+ "In the definitions for alternative"+ >#< getName con+ >#< "of nonterminal"+ >#< getName nt+ >|< ","+ >-< "the value of field"+ >#< getName a+ >#< "is copied by a copy-rule."+ >-< "Copying the value of a field using a copy-rule is deprecated"+ >-< "Please add the following lines to your code:"+ >-< ( "SEM"+ >#< getName nt+ >-< indent 2 ( "|"+ >#< getName con+ >#< getName fld+ >#< "."+ >#< a+ >#< "="+ >#< "@"+ >|< a+ )+ )+ in CustomError True (getPos a) mesg+++missingRuleErrorExpr nt con fld a+ = "error \"missing rule: "+ ++ show nt ++ "." ++ show con ++ "."+ ++ show fld ++ "." ++ show a ++ "\""++++makeRule :: (Identifier,Identifier) -> Expression -> String -> Bool -> Maybe Error -> Rule+makeRule (f1,a1) expr origin identity mbDelayedError+ = Rule Nothing+ (Alias f1 a1 (Underscore noPos))+ expr+ False+ origin+ False+ True+ identity+ mbDelayedError+ False+++useRule :: Set Identifier -> [(Identifier,Attributes)] -> (Identifier,(String,String,String)) -> Rule+useRule locals ch_outs (n,(op,e,pos))+ = let elems = [ fld+ | (fld,as) <- ch_outs+ , Map.member n as+ ]++ expr | Set.member n locals = attrName _LOC n+ | null elems = e+ | otherwise = foldr1 (\x y -> x ++ " " ++ op ++ " " ++ y)+ (map (flip attrName n) elems)++ tks | Set.member n locals = [mkLocVar n noPos Nothing]+ | null elems = lexTokens noPos e+ | otherwise = lexTokens noPos str+ where+ str = foldr1 (\x y -> x ++ " " ++ op ++ " " ++ y)+ (map (flip attrName n) elems)++ in makeRule (_LHS,n)+ (Expression noPos tks)+ ("use rule " ++ pos)+ False+ Nothing+++selfRule :: Bool -> Identifier -> [HsToken] -> Rule+selfRule lhsNecLoc attr tks+ = makeRule (if lhsNecLoc then _LHS else _LOC,attr)+ (Expression noPos tks)+ "self rule"+ False+ Nothing+++++concatRE rsess = let (rss,ess) = unzip rsess+ in (concat rss, concatSeq ess)+++copyRule :: Options -> Set NontermIdent -> Identifier -> Identifier -> Bool -> Set Identifier -> (Map Identifier Identifier, (Identifier,[Identifier])) -> ([Rule], Seq Error)+copyRule options wrappers nt con modcopy locals (env,(fld,as))+ = concatRE (map copyRu as)++ where+ copyRu a+ = ( [ makeRule (fld,a)+ (Expression noPos tks)+ (cruletxt sel)+ True+ mbDelayedErr+ ]+ , err+ )++ where+ sel+ | not modcopy+ && Set.member a locals = Just _LOC+ | otherwise = Map.lookup a env++ (tks,err,mbDelayedErr)+ = case sel of+ Nothing -> let tks = [HsToken (missingRuleErrorExpr nt con fld a) noPos]+ err = MissingRule nt con fld a+ in if nt `Set.member` wrappers && kennedyWarren options+ then (tks, Seq.empty, Just err) -- yield error only if the rule is actually scheduled; for kennedyWarren code gen only+ else (tks, Seq.singleton err, Nothing)+ Just f+ | f == _ACHILD -> ( [AGLocal a noPos Nothing]+ , Seq.singleton (deprecatedCopyRuleError nt con fld a)+ , Nothing+ )+ | otherwise -> ( [AGField f a noPos Nothing]+ , Seq.empty+ , Nothing+ )++ cruletxt sel+ | local = "copy rule (from local)"+ | deprChild = "deprecated child copy"+ | Set.member a locals && nonlocal = "modified copy rule"+ | incoming && outgoing = "copy rule (chain)"+ | incoming = "copy rule (down)"+ | outgoing = "copy rule (up)"+ | otherwise = "copy rule (chain)"+ where outgoing = fld == _LHS+ incoming = maybe False (== _LHS) sel+ nonlocal = maybe False (/= _LOC) sel+ local = maybe False (== _LOC) sel+ deprChild = maybe False (== _ACHILD) sel+{-# LINE 250 "dist/build/DefaultRules.hs" #-}++{-# LINE 431 "src-ag/DefaultRules.ag" #-}++addAugments :: (Identifier, [Expression]) -> [Rule] -> [Rule]+addAugments (_, exprs) rules+ | null exprs = rules+addAugments (syn, exprs) rules+ = [rule] ++ funRules ++ map modify rules+ where+ rule = Rule Nothing (Alias _LHS syn (Underscore noPos)) rhs False "augmented rule" False True False Nothing False+ rhs = Expression noPos tks+ tks = [ HsToken "foldr ($) " noPos, mkLocVar substSyn noPos Nothing, HsToken " [" noPos] ++ funs ++ [HsToken "]" noPos]+ funs = intersperse (HsToken ", " noPos) (map (\n -> mkLocVar n noPos Nothing) funNames)++ substSyn = Ident (show syn ++ "_augmented_syn") (getPos syn)+ funNames = zipWith (\i _ -> Ident (show syn ++ "_augmented_f" ++ show i) (getPos syn)) [1..] exprs+ funRules = zipWith (\name expr -> Rule Nothing (Alias _LOC name (Underscore noPos)) expr False "augment function" False True False Nothing False) funNames exprs++ modify (Rule mbNm pat rhs owrt origin expl pure identity mbErr eager)+ | containsSyn pat = Rule mbNm (modifyPat pat) rhs owrt origin expl pure identity mbErr eager+ modify r = r++ containsSyn (Constr _ pats) = any containsSyn pats+ containsSyn (Product _ pats) = any containsSyn pats+ containsSyn (Irrefutable pat) = containsSyn pat+ containsSyn (Alias field attr pat) = (field == _LHS && attr == syn) || containsSyn pat+ containsSyn _ = False++ modifyPat (Constr name pats) = Constr name (map modifyPat pats)+ modifyPat (Product pos pats) = Product pos (map modifyPat pats)+ modifyPat (Irrefutable pat) = Irrefutable (modifyPat pat)+ modifyPat (Alias field attr pat)+ | field == _LHS && attr == syn = Alias _LOC substSyn (modifyPat pat)+ | otherwise = Alias field attr (modifyPat pat)+ modifyPat p = p++-- adds the additional rules needed for around, which creates a sequence of+-- rules that form a function that each transforms the semantics of a child+-- before attaching the child.+-- The rule defines a local attribute "<child>_around" and <child> is dependent+-- on this attribute.+addArounds :: (Identifier, [Expression]) -> [Rule] -> [Rule]+addArounds (_, exprs) rules | null exprs = rules+addArounds (child, exprs) rules+ = [rule] ++ funRules ++ rules+ where+ rule = Rule Nothing (Alias _LOC childLoc (Underscore noPos)) rhs False "around rule" False True False Nothing False+ rhs = Expression noPos tks+ tks = [ HsToken "\\s -> foldr ($) s " noPos, HsToken " [" noPos] ++ funs ++ [HsToken "]" noPos]+ funs = intersperse (HsToken ", " noPos) (map (\n -> mkLocVar n noPos Nothing) funNames)++ childLoc = Ident (show child ++ "_around") (getPos child)+ funNames = zipWith (\i _ -> Ident (show child ++ "_around_f" ++ show i) (getPos child)) [1..] exprs+ funRules = zipWith (\name expr -> Rule Nothing (Alias _LOC name (Underscore noPos)) expr False "around function" False True False Nothing False) funNames exprs++-- adds the additional rules needed for merging.+-- It produces for each merging child a rule with local attribute: "<child>_merged".+-- this rules takes the semantics of the first children and feeds it to the function+-- represented by this attribute. This attribute then defines the semantics for+-- the merging child.+addMerges :: (Identifier, (Identifier,[Identifier],Expression)) -> [Rule] -> [Rule]+addMerges (target,(_,_,expr)) rules+ = rule : rules+ where+ rule = Rule Nothing (Alias _LOC childLoc (Underscore noPos)) expr False "merge rule" False True False Nothing False+ childLoc = Ident (show target ++ "_merge") (getPos target)+{-# LINE 317 "dist/build/DefaultRules.hs" #-}++{-# LINE 547 "src-ag/DefaultRules.ag" #-}++elimSelfId :: NontermIdent -> [Identifier] -> Type -> Type+elimSelfId nt args Self = NT nt (map locname args) False+elimSelfId _ _ tp = tp++elimSelfStr :: NontermIdent -> [String] -> Type -> Type+elimSelfStr nt args Self = NT nt args False+elimSelfStr _ _ tp = tp+{-# LINE 328 "dist/build/DefaultRules.hs" #-}++{-# LINE 599 "src-ag/DefaultRules.ag" #-}++-- When a rule has a name, create an alias for a rule+-- and a modified rule that refers to the alias+-- Thus it removes rule names from rules+mkRuleAlias :: Rule -> (Rule, Maybe Rule)+mkRuleAlias r@(Rule Nothing _ _ _ _ _ _ _ _ _) = (r, Nothing)+mkRuleAlias (Rule (Just nm) pat expr owrt origin expl pure identity mbErr eager) = (r', Just alias) where+ alias = Rule Nothing (Alias _LOC (Ident ("_rule_" ++ show nm) pos) (Underscore pos)) expr owrt origin expl pure identity mbErr eager+ pos = getPos nm+ expr' = Expression pos tks+ tks = [mkLocVar (Ident ("_rule_" ++ show nm) pos) pos (Just ("Indirection to rule " ++ show nm))]+ r' = Rule Nothing pat expr' owrt origin False True identity Nothing False+{-# LINE 343 "dist/build/DefaultRules.hs" #-}++{-# LINE 616 "src-ag/DefaultRules.ag" #-}++needsMultiRules :: Options -> Bool+needsMultiRules opts = (visit opts || withCycle opts) && not (kennedyWarren opts)+{-# LINE 349 "dist/build/DefaultRules.hs" #-}++{-# LINE 621 "src-ag/DefaultRules.ag" #-}++{-+multiRule replaces+ loc.(a,b) = e+by+ loc.tup1 = e+ loc.(a,_) = @loc.tup1+ loc.(_,b) = @loc.tup1+It needs to thread a unique number for inventing names for the tuples.++It also works for nested tuples:+ loc.(a,(b,c)) = e+becomes+ loc.tup1 = e+ loc.(a,_) = @loc.tup1+ loc.(_,tup2) = @loc.tup1+ loc.(b,_) = @loc.tup2+ loc.(_,c) = @loc.tup2+-}++multiRule :: Rule -> Int -> ([Rule], Int)+multiRule (Rule _ pat expr owrt origin expl pure identity mbErr eager) uniq+ = let f :: Bool -> (Pattern->Pattern) -> Expression -> Pattern -> Int -> (Pattern, ([Rule], Int))+ f expl' w e (Product pos pats) n+ = let freshName = Ident ("_tup" ++ show n) pos+ freshExpr = Expression pos freshTks+ freshTks = [AGField _LOC freshName pos Nothing]+ freshPat = Alias _LOC freshName (Underscore pos)+ a = length pats - 1+ us b p = Product pos (replicate (a-b) (Underscore pos) ++ [p] ++ replicate b (Underscore pos))+ g :: Pattern -> ([Pattern],[Rule],Int) -> ([Pattern],[Rule],Int)+ g p (xs1,rs1,n1) = let (x2,(rs2,n2)) = f False (us (length xs1)) freshExpr p n1+ in (x2:xs1, rs2++rs1, n2)+ (xs9,rs9,n9) = foldr g ([], [], n+1) pats+ in ( freshPat+ , ( Rule Nothing (w freshPat) e owrt origin expl' True False mbErr eager : rs9+ , n9+ )+ )+ f expl' w e p n+ = ( p+ , ( [Rule Nothing (w p) e owrt origin expl' True False mbErr eager]+ , n+ )+ )+ in snd (f expl id expr pat uniq)++{-# LINE 399 "dist/build/DefaultRules.hs" #-}+-- Child -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ con : ConstructorIdent+ cr : Bool+ inhMap : Map Identifier Attributes+ merged : Set Identifier+ nt : NontermIdent+ params : [Identifier]+ synMap : Map Identifier Attributes+ synthesized attributes:+ errors : Seq Error+ field : (Identifier,Type,ChildKind) + inherited : Attributes+ name : Identifier+ output : Child + synthesized : Attributes+ alternatives:+ alternative Child:+ child name : {Identifier}+ child tp : {Type}+ child kind : {ChildKind}+ visit 0:+ local chnt : _+ local inh : _+ local _tup1 : _+ local params : _+ local nt : _+ local inh1 : _+ local syn : _+ local syn1 : _+-}+-- cata+sem_Child :: Child ->+ T_Child+sem_Child !(Child _name _tp _kind) =+ (sem_Child_Child _name _tp _kind)+-- semantic domain+newtype T_Child = T_Child (ConstructorIdent ->+ Bool ->+ (Map Identifier Attributes) ->+ (Set Identifier) ->+ NontermIdent ->+ ([Identifier]) ->+ (Map Identifier Attributes) ->+ ( (Seq Error),( (Identifier,Type,ChildKind) ),Attributes,Identifier,Child,Attributes))+data Inh_Child = Inh_Child {con_Inh_Child :: !(ConstructorIdent),cr_Inh_Child :: !(Bool),inhMap_Inh_Child :: !((Map Identifier Attributes)),merged_Inh_Child :: !((Set Identifier)),nt_Inh_Child :: !(NontermIdent),params_Inh_Child :: !(([Identifier])),synMap_Inh_Child :: !((Map Identifier Attributes))}+data Syn_Child = Syn_Child {errors_Syn_Child :: !((Seq Error)),field_Syn_Child :: !(( (Identifier,Type,ChildKind) )),inherited_Syn_Child :: !(Attributes),name_Syn_Child :: !(Identifier),output_Syn_Child :: !(Child),synthesized_Syn_Child :: !(Attributes)}+wrap_Child :: T_Child ->+ Inh_Child ->+ Syn_Child+wrap_Child !(T_Child sem) !(Inh_Child _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap) =+ (let ( !_lhsOerrors,!_lhsOfield,!_lhsOinherited,!_lhsOname,!_lhsOoutput,!_lhsOsynthesized) = sem _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap+ in (Syn_Child _lhsOerrors _lhsOfield _lhsOinherited _lhsOname _lhsOoutput _lhsOsynthesized))+sem_Child_Child :: Identifier ->+ Type ->+ ChildKind ->+ T_Child+sem_Child_Child !name_ !tp_ !kind_ =+ (T_Child (\ (!_lhsIcon)+ (!_lhsIcr)+ (!_lhsIinhMap)+ (!_lhsImerged)+ (!_lhsInt)+ (!_lhsIparams)+ (!_lhsIsynMap) ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ Seq.empty+ {-# LINE 469 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 515 "src-ag/DefaultRules.ag" #-}+ (name_,tp_,kind_)+ {-# LINE 474 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOfield ->+ (case (({-# LINE 19 "src-ag/DistChildAttr.ag" #-}+ case tp_ of+ NT nt _ _ -> nt+ Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")+ Haskell t -> identifier ""+ {-# LINE 482 "dist/build/DefaultRules" #-}+ )) of+ { !_chnt ->+ (case (({-# LINE 23 "src-ag/DistChildAttr.ag" #-}+ Map.findWithDefault Map.empty _chnt _lhsIinhMap+ {-# LINE 487 "dist/build/DefaultRules" #-}+ )) of+ { !_inh ->+ (case (({-# LINE 537 "src-ag/DefaultRules.ag" #-}+ case tp_ of+ NT nt params _ -> (nt, params)+ Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")+ Haskell t -> (identifier t, [])+ {-# LINE 495 "dist/build/DefaultRules" #-}+ )) of+ { !__tup1 ->+ (case (({-# LINE 537 "src-ag/DefaultRules.ag" #-}+ __tup1+ {-# LINE 500 "dist/build/DefaultRules" #-}+ )) of+ { !(_,!_params) ->+ (case (({-# LINE 537 "src-ag/DefaultRules.ag" #-}+ __tup1+ {-# LINE 505 "dist/build/DefaultRules" #-}+ )) of+ { !(!_nt,_) ->+ (case (({-# LINE 541 "src-ag/DefaultRules.ag" #-}+ Map.map (elimSelfStr _nt _params ) _inh+ {-# LINE 510 "dist/build/DefaultRules" #-}+ )) of+ { !_inh1 ->+ (case (({-# LINE 183 "src-ag/DefaultRules.ag" #-}+ _inh1+ {-# LINE 515 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOinherited ->+ (case (({-# LINE 174 "src-ag/DefaultRules.ag" #-}+ name_+ {-# LINE 520 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOname ->+ (case (({-# LINE 583 "src-ag/DefaultRules.ag" #-}+ Child name_ tp_ kind_+ {-# LINE 525 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ (case (({-# LINE 24 "src-ag/DistChildAttr.ag" #-}+ Map.findWithDefault Map.empty _chnt _lhsIsynMap+ {-# LINE 530 "dist/build/DefaultRules" #-}+ )) of+ { !_syn ->+ (case (({-# LINE 542 "src-ag/DefaultRules.ag" #-}+ Map.map (elimSelfStr _nt _params ) _syn+ {-# LINE 535 "dist/build/DefaultRules" #-}+ )) of+ { !_syn1 ->+ (case (({-# LINE 184 "src-ag/DefaultRules.ag" #-}+ if name_ `Set.member` _lhsImerged+ then Map.empty+ else _syn1+ {-# LINE 542 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOsynthesized ->+ ( _lhsOerrors,_lhsOfield,_lhsOinherited,_lhsOname,_lhsOoutput,_lhsOsynthesized) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+-- Children ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ con : ConstructorIdent+ cr : Bool+ inhMap : Map Identifier Attributes+ merged : Set Identifier+ nt : NontermIdent+ params : [Identifier]+ synMap : Map Identifier Attributes+ synthesized attributes:+ errors : Seq Error+ fields : [(Identifier,Type,ChildKind)]+ inputs : [(Identifier, Attributes)]+ output : Children + outputs : [(Identifier, Attributes)]+ alternatives:+ alternative Cons:+ child hd : Child + child tl : Children + visit 0:+ local output : _+ alternative Nil:+ visit 0:+ local output : _+-}+-- cata+sem_Children :: Children ->+ T_Children+sem_Children !list =+ (Prelude.foldr sem_Children_Cons sem_Children_Nil (Prelude.map sem_Child list))+-- semantic domain+newtype T_Children = T_Children (ConstructorIdent ->+ Bool ->+ (Map Identifier Attributes) ->+ (Set Identifier) ->+ NontermIdent ->+ ([Identifier]) ->+ (Map Identifier Attributes) ->+ ( (Seq Error),([(Identifier,Type,ChildKind)]),([(Identifier, Attributes)]),Children,([(Identifier, Attributes)])))+data Inh_Children = Inh_Children {con_Inh_Children :: !(ConstructorIdent),cr_Inh_Children :: !(Bool),inhMap_Inh_Children :: !((Map Identifier Attributes)),merged_Inh_Children :: !((Set Identifier)),nt_Inh_Children :: !(NontermIdent),params_Inh_Children :: !(([Identifier])),synMap_Inh_Children :: !((Map Identifier Attributes))}+data Syn_Children = Syn_Children {errors_Syn_Children :: !((Seq Error)),fields_Syn_Children :: !(([(Identifier,Type,ChildKind)])),inputs_Syn_Children :: !(([(Identifier, Attributes)])),output_Syn_Children :: !(Children),outputs_Syn_Children :: !(([(Identifier, Attributes)]))}+wrap_Children :: T_Children ->+ Inh_Children ->+ Syn_Children+wrap_Children !(T_Children sem) !(Inh_Children _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap) =+ (let ( !_lhsOerrors,!_lhsOfields,!_lhsOinputs,!_lhsOoutput,!_lhsOoutputs) = sem _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap+ in (Syn_Children _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutput _lhsOoutputs))+sem_Children_Cons :: T_Child ->+ T_Children ->+ T_Children+sem_Children_Cons !(T_Child hd_) !(T_Children tl_) =+ (T_Children (\ (!_lhsIcon)+ (!_lhsIcr)+ (!_lhsIinhMap)+ (!_lhsImerged)+ (!_lhsInt)+ (!_lhsIparams)+ (!_lhsIsynMap) ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 608 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOsynMap ->+ (case (({-# LINE 41 "src-ag/DefaultRules.ag" #-}+ _lhsIparams+ {-# LINE 613 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOparams ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 618 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOnt ->+ (case (({-# LINE 757 "src-ag/DefaultRules.ag" #-}+ _lhsImerged+ {-# LINE 623 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOmerged ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 628 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOinhMap ->+ (case (({-# LINE 55 "src-ag/DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 633 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOcr ->+ (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 638 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOcon ->+ (case (tl_ _tlOcon _tlOcr _tlOinhMap _tlOmerged _tlOnt _tlOparams _tlOsynMap) of+ { ( !_tlIerrors,!_tlIfields,!_tlIinputs,!_tlIoutput,!_tlIoutputs) ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 645 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOsynMap ->+ (case (({-# LINE 41 "src-ag/DefaultRules.ag" #-}+ _lhsIparams+ {-# LINE 650 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOparams ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 655 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOnt ->+ (case (({-# LINE 757 "src-ag/DefaultRules.ag" #-}+ _lhsImerged+ {-# LINE 660 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOmerged ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 665 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOinhMap ->+ (case (({-# LINE 55 "src-ag/DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 670 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOcr ->+ (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 675 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOcon ->+ (case (hd_ _hdOcon _hdOcr _hdOinhMap _hdOmerged _hdOnt _hdOparams _hdOsynMap) of+ { ( !_hdIerrors,!_hdIfield,!_hdIinherited,!_hdIname,!_hdIoutput,!_hdIsynthesized) ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 682 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 511 "src-ag/DefaultRules.ag" #-}+ _hdIfield : _tlIfields+ {-# LINE 687 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOfields ->+ (case (({-# LINE 189 "src-ag/DefaultRules.ag" #-}+ (_hdIname, _hdIinherited) : _tlIinputs+ {-# LINE 692 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOinputs ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 697 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 702 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ (case (({-# LINE 190 "src-ag/DefaultRules.ag" #-}+ (_hdIname, _hdIsynthesized) : _tlIoutputs+ {-# LINE 707 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutputs ->+ ( _lhsOerrors,_lhsOfields,_lhsOinputs,_lhsOoutput,_lhsOoutputs) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+sem_Children_Nil :: T_Children+sem_Children_Nil =+ (T_Children (\ (!_lhsIcon)+ (!_lhsIcr)+ (!_lhsIinhMap)+ (!_lhsImerged)+ (!_lhsInt)+ (!_lhsIparams)+ (!_lhsIsynMap) ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ Seq.empty+ {-# LINE 722 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 512 "src-ag/DefaultRules.ag" #-}+ []+ {-# LINE 727 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOfields ->+ (case (({-# LINE 191 "src-ag/DefaultRules.ag" #-}+ []+ {-# LINE 732 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOinputs ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ []+ {-# LINE 737 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 742 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ (case (({-# LINE 192 "src-ag/DefaultRules.ag" #-}+ []+ {-# LINE 747 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutputs ->+ ( _lhsOerrors,_lhsOfields,_lhsOinputs,_lhsOoutput,_lhsOoutputs) }) }) }) }) }) })))+-- Grammar -----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attributes:+ errors : Seq Error+ output : Grammar + 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 quantMap : {QuantMap}+ child uniqueMap : {UniqueMap}+ child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}+ visit 0:+ local output : _+-}+-- cata+sem_Grammar :: Grammar ->+ T_Grammar+sem_Grammar !(Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap) =+ (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts) _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap)+-- semantic domain+newtype T_Grammar = T_Grammar (Options ->+ ( (Seq Error),Grammar))+data Inh_Grammar = Inh_Grammar {options_Inh_Grammar :: !(Options)}+data Syn_Grammar = Syn_Grammar {errors_Syn_Grammar :: !((Seq Error)),output_Syn_Grammar :: !(Grammar)}+wrap_Grammar :: T_Grammar ->+ Inh_Grammar ->+ Syn_Grammar+wrap_Grammar !(T_Grammar sem) !(Inh_Grammar _lhsIoptions) =+ (let ( !_lhsOerrors,!_lhsOoutput) = sem _lhsIoptions+ in (Syn_Grammar _lhsOerrors _lhsOoutput))+sem_Grammar_Grammar :: TypeSyns ->+ UseMap ->+ Derivings ->+ (Set NontermIdent) ->+ T_Nonterminals ->+ PragmaMap ->+ AttrOrderMap ->+ ParamMap ->+ ContextMap ->+ QuantMap ->+ UniqueMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->+ T_Grammar+sem_Grammar_Grammar !typeSyns_ !useMap_ !derivings_ !wrappers_ !(T_Nonterminals nonts_) !pragmas_ !manualAttrOrderMap_ !paramMap_ !contextMap_ !quantMap_ !uniqueMap_ !augmentsMap_ !aroundsMap_ !mergeMap_ =+ (T_Grammar (\ (!_lhsIoptions) ->+ (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}+ _lhsIoptions+ {-# LINE 813 "dist/build/DefaultRules" #-}+ )) of+ { !_nontsOoptions ->+ (case (nonts_) of+ { ( !_nontsIcollect_nts,!_nontsIinhMap',!_nontsIsynMap',!T_Nonterminals_1 nonts_1) ->+ (case (({-# LINE 16 "src-ag/DistChildAttr.ag" #-}+ _nontsIsynMap'+ {-# LINE 820 "dist/build/DefaultRules" #-}+ )) of+ { !_nontsOsynMap ->+ (case (({-# LINE 15 "src-ag/DistChildAttr.ag" #-}+ _nontsIinhMap'+ {-# LINE 825 "dist/build/DefaultRules" #-}+ )) of+ { !_nontsOinhMap ->+ (case (({-# LINE 759 "src-ag/DefaultRules.ag" #-}+ mergeMap_+ {-# LINE 830 "dist/build/DefaultRules" #-}+ )) of+ { !_nontsOmergesIn ->+ (case (({-# LINE 678 "src-ag/DefaultRules.ag" #-}+ manualAttrOrderMap_+ {-# LINE 835 "dist/build/DefaultRules" #-}+ )) of+ { !_nontsOmanualAttrOrderMap ->+ (case (({-# LINE 178 "src-ag/DefaultRules.ag" #-}+ typeSyns_+ {-# LINE 840 "dist/build/DefaultRules" #-}+ )) of+ { !_nontsOtypeSyns ->+ (case (({-# LINE 176 "src-ag/DefaultRules.ag" #-}+ useMap_+ {-# LINE 845 "dist/build/DefaultRules" #-}+ )) of+ { !_nontsOuseMap ->+ (case (({-# LINE 66 "src-ag/DefaultRules.ag" #-}+ wrappers_+ {-# LINE 850 "dist/build/DefaultRules" #-}+ )) of+ { !_nontsOwrappers ->+ (case (({-# LINE 58 "src-ag/DefaultRules.ag" #-}+ modcopy _lhsIoptions+ {-# LINE 855 "dist/build/DefaultRules" #-}+ )) of+ { !_nontsOcr ->+ (case (({-# LINE 57 "src-ag/DefaultRules.ag" #-}+ rename _lhsIoptions+ {-# LINE 860 "dist/build/DefaultRules" #-}+ )) of+ { !_nontsOo_rename ->+ (case (({-# LINE 751 "src-ag/DefaultRules.ag" #-}+ aroundsMap_+ {-# LINE 865 "dist/build/DefaultRules" #-}+ )) of+ { !_nontsOaroundsIn ->+ (case (({-# LINE 744 "src-ag/DefaultRules.ag" #-}+ augmentsMap_+ {-# LINE 870 "dist/build/DefaultRules" #-}+ )) of+ { !_nontsOaugmentsIn ->+ (case (({-# LINE 564 "src-ag/DefaultRules.ag" #-}+ 1+ {-# LINE 875 "dist/build/DefaultRules" #-}+ )) of+ { !_nontsOuniq ->+ (case (({-# LINE 154 "src-ag/DefaultRules.ag" #-}+ _nontsIcollect_nts+ {-# LINE 880 "dist/build/DefaultRules" #-}+ )) of+ { !_nontsOnonterminals ->+ (case (nonts_1 _nontsOaroundsIn _nontsOaugmentsIn _nontsOcr _nontsOinhMap _nontsOmanualAttrOrderMap _nontsOmergesIn _nontsOnonterminals _nontsOo_rename _nontsOoptions _nontsOsynMap _nontsOtypeSyns _nontsOuniq _nontsOuseMap _nontsOwrappers) of+ { ( !_nontsIerrors,!_nontsIoutput,!_nontsIuniq) ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ _nontsIerrors+ {-# LINE 887 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ Grammar typeSyns_ useMap_ derivings_ wrappers_ _nontsIoutput pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_+ {-# LINE 892 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 897 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+-- Nonterminal -------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ collect_nts : Set NontermIdent+ inhMap' : Map Identifier Attributes+ synMap' : Map Identifier Attributes+ visit 1:+ inherited attributes:+ aroundsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ augmentsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ cr : Bool+ inhMap : Map Identifier Attributes+ manualAttrOrderMap : AttrOrderMap+ mergesIn : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))+ nonterminals : Set NontermIdent+ o_rename : Bool+ options : Options+ synMap : Map Identifier Attributes+ typeSyns : TypeSyns+ useMap : UseMap+ wrappers : Set NontermIdent+ chained attribute:+ uniq : Int+ synthesized attributes:+ errors : Seq Error+ output : Nonterminal + alternatives:+ alternative Nonterminal:+ child nt : {NontermIdent}+ child params : {[Identifier]}+ child inh : {Attributes}+ child syn : {Attributes}+ child prods : Productions + visit 1:+ local mergesIn : _+ local syn1 : _+ local inh1 : _+ local augmentsIn : _+ local aroundsIn : _+-}+-- cata+sem_Nonterminal :: Nonterminal ->+ T_Nonterminal+sem_Nonterminal !(Nonterminal _nt _params _inh _syn _prods) =+ (sem_Nonterminal_Nonterminal _nt _params _inh _syn (sem_Productions _prods))+-- semantic domain+newtype T_Nonterminal = T_Nonterminal (( (Set NontermIdent),(Map Identifier Attributes),(Map Identifier Attributes),T_Nonterminal_1))+newtype T_Nonterminal_1 = T_Nonterminal_1 ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ Bool ->+ (Map Identifier Attributes) ->+ AttrOrderMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) ->+ (Set NontermIdent) ->+ Bool ->+ Options ->+ (Map Identifier Attributes) ->+ TypeSyns ->+ Int ->+ UseMap ->+ (Set NontermIdent) ->+ ( (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),inhMap_Inh_Nonterminal :: !((Map Identifier Attributes)),manualAttrOrderMap_Inh_Nonterminal :: !(AttrOrderMap),mergesIn_Inh_Nonterminal :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))))),nonterminals_Inh_Nonterminal :: !((Set NontermIdent)),o_rename_Inh_Nonterminal :: !(Bool),options_Inh_Nonterminal :: !(Options),synMap_Inh_Nonterminal :: !((Map Identifier Attributes)),typeSyns_Inh_Nonterminal :: !(TypeSyns),uniq_Inh_Nonterminal :: !(Int),useMap_Inh_Nonterminal :: !(UseMap),wrappers_Inh_Nonterminal :: !((Set NontermIdent))}+data Syn_Nonterminal = Syn_Nonterminal {collect_nts_Syn_Nonterminal :: !((Set NontermIdent)),errors_Syn_Nonterminal :: !((Seq Error)),inhMap'_Syn_Nonterminal :: !((Map Identifier Attributes)),output_Syn_Nonterminal :: !(Nonterminal),synMap'_Syn_Nonterminal :: !((Map Identifier Attributes)),uniq_Syn_Nonterminal :: !(Int)}+wrap_Nonterminal :: T_Nonterminal ->+ Inh_Nonterminal ->+ Syn_Nonterminal+wrap_Nonterminal !(T_Nonterminal sem) !(Inh_Nonterminal _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) =+ (let ( !_lhsOcollect_nts,!_lhsOinhMap',!_lhsOsynMap',!T_Nonterminal_1 sem_1) = sem+ ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) = sem_1 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers+ in (Syn_Nonterminal _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq))+sem_Nonterminal_Nonterminal :: NontermIdent ->+ ([Identifier]) ->+ Attributes ->+ Attributes ->+ T_Productions ->+ T_Nonterminal+sem_Nonterminal_Nonterminal !nt_ !params_ !inh_ !syn_ !(T_Productions prods_) =+ (T_Nonterminal (case (({-# LINE 150 "src-ag/DefaultRules.ag" #-}+ Set.singleton nt_+ {-# LINE 982 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcollect_nts ->+ (case (({-# LINE 7 "src-ag/DistChildAttr.ag" #-}+ Map.singleton nt_ inh_+ {-# LINE 987 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOinhMap' ->+ (case (({-# LINE 8 "src-ag/DistChildAttr.ag" #-}+ Map.singleton nt_ syn_+ {-# LINE 992 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOsynMap' ->+ (case ((let sem_Nonterminal_Nonterminal_1 :: T_Nonterminal_1+ sem_Nonterminal_Nonterminal_1 =+ (T_Nonterminal_1 (\ (!_lhsIaroundsIn)+ (!_lhsIaugmentsIn)+ (!_lhsIcr)+ (!_lhsIinhMap)+ (!_lhsImanualAttrOrderMap)+ (!_lhsImergesIn)+ (!_lhsInonterminals)+ (!_lhsIo_rename)+ (!_lhsIoptions)+ (!_lhsIsynMap)+ (!_lhsItypeSyns)+ (!_lhsIuniq)+ (!_lhsIuseMap)+ (!_lhsIwrappers) ->+ (case (({-# LINE 64 "src-ag/DefaultRules.ag" #-}+ _lhsIwrappers+ {-# LINE 1013 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOwrappers ->+ (case (({-# LINE 71 "src-ag/DefaultRules.ag" #-}+ _lhsItypeSyns+ {-# LINE 1018 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOtypeSyns ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 1023 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOsynMap ->+ (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}+ _lhsIoptions+ {-# LINE 1028 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOoptions ->+ (case (({-# LINE 51 "src-ag/DefaultRules.ag" #-}+ _lhsIo_rename+ {-# LINE 1033 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOo_rename ->+ (case (({-# LINE 760 "src-ag/DefaultRules.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsImergesIn+ {-# LINE 1038 "dist/build/DefaultRules" #-}+ )) of+ { !_mergesIn ->+ (case (({-# LINE 756 "src-ag/DefaultRules.ag" #-}+ _mergesIn+ {-# LINE 1043 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOmergesIn ->+ (case (({-# LINE 674 "src-ag/DefaultRules.ag" #-}+ _lhsImanualAttrOrderMap+ {-# LINE 1048 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOmanualAttrOrderMap ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 1053 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOinhMap ->+ (case (({-# LINE 52 "src-ag/DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 1058 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOcr ->+ (case (({-# LINE 534 "src-ag/DefaultRules.ag" #-}+ Map.map (elimSelfId nt_ params_) syn_+ {-# LINE 1063 "dist/build/DefaultRules" #-}+ )) of+ { !_syn1 ->+ (case (({-# LINE 533 "src-ag/DefaultRules.ag" #-}+ Map.map (elimSelfId nt_ params_) inh_+ {-# LINE 1068 "dist/build/DefaultRules" #-}+ )) of+ { !_inh1 ->+ (case (({-# LINE 180 "src-ag/DefaultRules.ag" #-}+ nt_+ {-# LINE 1073 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOnt ->+ (case (({-# LINE 168 "src-ag/DefaultRules.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIuseMap+ {-# LINE 1078 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOuseMap ->+ (case (({-# LINE 167 "src-ag/DefaultRules.ag" #-}+ syn_+ {-# LINE 1083 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOsynOrig ->+ (case (({-# LINE 165 "src-ag/DefaultRules.ag" #-}+ _syn1+ {-# LINE 1088 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOsyn ->+ (case (({-# LINE 164 "src-ag/DefaultRules.ag" #-}+ _inh1+ {-# LINE 1093 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOinh ->+ (case (({-# LINE 561 "src-ag/DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 1098 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOuniq ->+ (case (({-# LINE 152 "src-ag/DefaultRules.ag" #-}+ _lhsInonterminals+ {-# LINE 1103 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOnonterminals ->+ (case (({-# LINE 745 "src-ag/DefaultRules.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIaugmentsIn+ {-# LINE 1108 "dist/build/DefaultRules" #-}+ )) of+ { !_augmentsIn ->+ (case (({-# LINE 742 "src-ag/DefaultRules.ag" #-}+ _augmentsIn+ {-# LINE 1113 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOaugmentsIn ->+ (case (({-# LINE 752 "src-ag/DefaultRules.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIaroundsIn+ {-# LINE 1118 "dist/build/DefaultRules" #-}+ )) of+ { !_aroundsIn ->+ (case (({-# LINE 749 "src-ag/DefaultRules.ag" #-}+ _aroundsIn+ {-# LINE 1123 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOaroundsIn ->+ (case (({-# LINE 166 "src-ag/DefaultRules.ag" #-}+ inh_+ {-# LINE 1128 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOinhOrig ->+ (case (({-# LINE 43 "src-ag/DefaultRules.ag" #-}+ params_+ {-# LINE 1133 "dist/build/DefaultRules" #-}+ )) of+ { !_prodsOparams ->+ (case (prods_ _prodsOaroundsIn _prodsOaugmentsIn _prodsOcr _prodsOinh _prodsOinhMap _prodsOinhOrig _prodsOmanualAttrOrderMap _prodsOmergesIn _prodsOnonterminals _prodsOnt _prodsOo_rename _prodsOoptions _prodsOparams _prodsOsyn _prodsOsynMap _prodsOsynOrig _prodsOtypeSyns _prodsOuniq _prodsOuseMap _prodsOwrappers) of+ { ( !_prodsIerrors,!_prodsIoutput,!_prodsIuniq) ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ _prodsIerrors+ {-# LINE 1140 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 573 "src-ag/DefaultRules.ag" #-}+ Nonterminal nt_ params_ _inh1 _syn1 _prodsIoutput+ {-# LINE 1145 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ (case (({-# LINE 561 "src-ag/DefaultRules.ag" #-}+ _prodsIuniq+ {-# LINE 1150 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOuniq ->+ ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+ in sem_Nonterminal_Nonterminal_1)) of+ { ( !sem_Nonterminal_1) ->+ ( _lhsOcollect_nts,_lhsOinhMap',_lhsOsynMap',sem_Nonterminal_1) }) }) }) }))+-- Nonterminals ------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ collect_nts : Set NontermIdent+ inhMap' : Map Identifier Attributes+ synMap' : Map Identifier Attributes+ visit 1:+ inherited attributes:+ aroundsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ augmentsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ cr : Bool+ inhMap : Map Identifier Attributes+ manualAttrOrderMap : AttrOrderMap+ mergesIn : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))+ nonterminals : Set NontermIdent+ o_rename : Bool+ options : Options+ synMap : Map Identifier Attributes+ typeSyns : TypeSyns+ useMap : UseMap+ wrappers : Set NontermIdent+ chained attribute:+ uniq : Int+ synthesized attributes:+ errors : Seq Error+ output : Nonterminals + alternatives:+ alternative Cons:+ child hd : Nonterminal + child tl : Nonterminals + visit 1:+ local output : _+ alternative Nil:+ visit 1:+ local output : _+-}+-- cata+sem_Nonterminals :: Nonterminals ->+ T_Nonterminals+sem_Nonterminals !list =+ (Prelude.foldr sem_Nonterminals_Cons sem_Nonterminals_Nil (Prelude.map sem_Nonterminal list))+-- semantic domain+newtype T_Nonterminals = T_Nonterminals (( (Set NontermIdent),(Map Identifier Attributes),(Map Identifier Attributes),T_Nonterminals_1))+newtype T_Nonterminals_1 = T_Nonterminals_1 ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ Bool ->+ (Map Identifier Attributes) ->+ AttrOrderMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) ->+ (Set NontermIdent) ->+ Bool ->+ Options ->+ (Map Identifier Attributes) ->+ TypeSyns ->+ Int ->+ UseMap ->+ (Set NontermIdent) ->+ ( (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),inhMap_Inh_Nonterminals :: !((Map Identifier Attributes)),manualAttrOrderMap_Inh_Nonterminals :: !(AttrOrderMap),mergesIn_Inh_Nonterminals :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))))),nonterminals_Inh_Nonterminals :: !((Set NontermIdent)),o_rename_Inh_Nonterminals :: !(Bool),options_Inh_Nonterminals :: !(Options),synMap_Inh_Nonterminals :: !((Map Identifier Attributes)),typeSyns_Inh_Nonterminals :: !(TypeSyns),uniq_Inh_Nonterminals :: !(Int),useMap_Inh_Nonterminals :: !(UseMap),wrappers_Inh_Nonterminals :: !((Set NontermIdent))}+data Syn_Nonterminals = Syn_Nonterminals {collect_nts_Syn_Nonterminals :: !((Set NontermIdent)),errors_Syn_Nonterminals :: !((Seq Error)),inhMap'_Syn_Nonterminals :: !((Map Identifier Attributes)),output_Syn_Nonterminals :: !(Nonterminals),synMap'_Syn_Nonterminals :: !((Map Identifier Attributes)),uniq_Syn_Nonterminals :: !(Int)}+wrap_Nonterminals :: T_Nonterminals ->+ Inh_Nonterminals ->+ Syn_Nonterminals+wrap_Nonterminals !(T_Nonterminals sem) !(Inh_Nonterminals _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) =+ (let ( !_lhsOcollect_nts,!_lhsOinhMap',!_lhsOsynMap',!T_Nonterminals_1 sem_1) = sem+ ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) = sem_1 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers+ in (Syn_Nonterminals _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq))+sem_Nonterminals_Cons :: T_Nonterminal ->+ T_Nonterminals ->+ T_Nonterminals+sem_Nonterminals_Cons !(T_Nonterminal hd_) !(T_Nonterminals tl_) =+ (T_Nonterminals (case (tl_) of+ { ( !_tlIcollect_nts,!_tlIinhMap',!_tlIsynMap',!T_Nonterminals_1 tl_1) ->+ (case (hd_) of+ { ( !_hdIcollect_nts,!_hdIinhMap',!_hdIsynMap',!T_Nonterminal_1 hd_1) ->+ (case (({-# LINE 148 "src-ag/DefaultRules.ag" #-}+ _hdIcollect_nts `Set.union` _tlIcollect_nts+ {-# LINE 1235 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcollect_nts ->+ (case (({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ _hdIinhMap' `Map.union` _tlIinhMap'+ {-# LINE 1240 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOinhMap' ->+ (case (({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ _hdIsynMap' `Map.union` _tlIsynMap'+ {-# LINE 1245 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOsynMap' ->+ (case ((let sem_Nonterminals_Cons_1 :: T_Nonterminals_1+ sem_Nonterminals_Cons_1 =+ (T_Nonterminals_1 (\ (!_lhsIaroundsIn)+ (!_lhsIaugmentsIn)+ (!_lhsIcr)+ (!_lhsIinhMap)+ (!_lhsImanualAttrOrderMap)+ (!_lhsImergesIn)+ (!_lhsInonterminals)+ (!_lhsIo_rename)+ (!_lhsIoptions)+ (!_lhsIsynMap)+ (!_lhsItypeSyns)+ (!_lhsIuniq)+ (!_lhsIuseMap)+ (!_lhsIwrappers) ->+ (case (({-# LINE 64 "src-ag/DefaultRules.ag" #-}+ _lhsIwrappers+ {-# LINE 1266 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOwrappers ->+ (case (({-# LINE 160 "src-ag/DefaultRules.ag" #-}+ _lhsIuseMap+ {-# LINE 1271 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOuseMap ->+ (case (({-# LINE 71 "src-ag/DefaultRules.ag" #-}+ _lhsItypeSyns+ {-# LINE 1276 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOtypeSyns ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 1281 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOsynMap ->+ (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}+ _lhsIoptions+ {-# LINE 1286 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOoptions ->+ (case (({-# LINE 51 "src-ag/DefaultRules.ag" #-}+ _lhsIo_rename+ {-# LINE 1291 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOo_rename ->+ (case (({-# LINE 755 "src-ag/DefaultRules.ag" #-}+ _lhsImergesIn+ {-# LINE 1296 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOmergesIn ->+ (case (({-# LINE 674 "src-ag/DefaultRules.ag" #-}+ _lhsImanualAttrOrderMap+ {-# LINE 1301 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOmanualAttrOrderMap ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 1306 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOinhMap ->+ (case (({-# LINE 52 "src-ag/DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 1311 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOcr ->+ (case (({-# LINE 64 "src-ag/DefaultRules.ag" #-}+ _lhsIwrappers+ {-# LINE 1316 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOwrappers ->+ (case (({-# LINE 160 "src-ag/DefaultRules.ag" #-}+ _lhsIuseMap+ {-# LINE 1321 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOuseMap ->+ (case (({-# LINE 71 "src-ag/DefaultRules.ag" #-}+ _lhsItypeSyns+ {-# LINE 1326 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOtypeSyns ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 1331 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOsynMap ->+ (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}+ _lhsIoptions+ {-# LINE 1336 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOoptions ->+ (case (({-# LINE 51 "src-ag/DefaultRules.ag" #-}+ _lhsIo_rename+ {-# LINE 1341 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOo_rename ->+ (case (({-# LINE 755 "src-ag/DefaultRules.ag" #-}+ _lhsImergesIn+ {-# LINE 1346 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOmergesIn ->+ (case (({-# LINE 674 "src-ag/DefaultRules.ag" #-}+ _lhsImanualAttrOrderMap+ {-# LINE 1351 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOmanualAttrOrderMap ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 1356 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOinhMap ->+ (case (({-# LINE 52 "src-ag/DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 1361 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOcr ->+ (case (({-# LINE 561 "src-ag/DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 1366 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOuniq ->+ (case (({-# LINE 152 "src-ag/DefaultRules.ag" #-}+ _lhsInonterminals+ {-# LINE 1371 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOnonterminals ->+ (case (({-# LINE 741 "src-ag/DefaultRules.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 1376 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOaugmentsIn ->+ (case (({-# LINE 748 "src-ag/DefaultRules.ag" #-}+ _lhsIaroundsIn+ {-# LINE 1381 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOaroundsIn ->+ (case (hd_1 _hdOaroundsIn _hdOaugmentsIn _hdOcr _hdOinhMap _hdOmanualAttrOrderMap _hdOmergesIn _hdOnonterminals _hdOo_rename _hdOoptions _hdOsynMap _hdOtypeSyns _hdOuniq _hdOuseMap _hdOwrappers) of+ { ( !_hdIerrors,!_hdIoutput,!_hdIuniq) ->+ (case (({-# LINE 561 "src-ag/DefaultRules.ag" #-}+ _hdIuniq+ {-# LINE 1388 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOuniq ->+ (case (({-# LINE 152 "src-ag/DefaultRules.ag" #-}+ _lhsInonterminals+ {-# LINE 1393 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOnonterminals ->+ (case (({-# LINE 741 "src-ag/DefaultRules.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 1398 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOaugmentsIn ->+ (case (({-# LINE 748 "src-ag/DefaultRules.ag" #-}+ _lhsIaroundsIn+ {-# LINE 1403 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOaroundsIn ->+ (case (tl_1 _tlOaroundsIn _tlOaugmentsIn _tlOcr _tlOinhMap _tlOmanualAttrOrderMap _tlOmergesIn _tlOnonterminals _tlOo_rename _tlOoptions _tlOsynMap _tlOtypeSyns _tlOuniq _tlOuseMap _tlOwrappers) of+ { ( !_tlIerrors,!_tlIoutput,!_tlIuniq) ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 1410 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 1415 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 1420 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ (case (({-# LINE 561 "src-ag/DefaultRules.ag" #-}+ _tlIuniq+ {-# LINE 1425 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOuniq ->+ ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+ in sem_Nonterminals_Cons_1)) of+ { ( !sem_Nonterminals_1) ->+ ( _lhsOcollect_nts,_lhsOinhMap',_lhsOsynMap',sem_Nonterminals_1) }) }) }) }) }) }))+sem_Nonterminals_Nil :: T_Nonterminals+sem_Nonterminals_Nil =+ (T_Nonterminals (case (({-# LINE 148 "src-ag/DefaultRules.ag" #-}+ Set.empty+ {-# LINE 1436 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcollect_nts ->+ (case (({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ Map.empty+ {-# LINE 1441 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOinhMap' ->+ (case (({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ Map.empty+ {-# LINE 1446 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOsynMap' ->+ (case ((let sem_Nonterminals_Nil_1 :: T_Nonterminals_1+ sem_Nonterminals_Nil_1 =+ (T_Nonterminals_1 (\ (!_lhsIaroundsIn)+ (!_lhsIaugmentsIn)+ (!_lhsIcr)+ (!_lhsIinhMap)+ (!_lhsImanualAttrOrderMap)+ (!_lhsImergesIn)+ (!_lhsInonterminals)+ (!_lhsIo_rename)+ (!_lhsIoptions)+ (!_lhsIsynMap)+ (!_lhsItypeSyns)+ (!_lhsIuniq)+ (!_lhsIuseMap)+ (!_lhsIwrappers) ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ Seq.empty+ {-# LINE 1467 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ []+ {-# LINE 1472 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 1477 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ (case (({-# LINE 561 "src-ag/DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 1482 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOuniq ->+ ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) })))+ in sem_Nonterminals_Nil_1)) of+ { ( !sem_Nonterminals_1) ->+ ( _lhsOcollect_nts,_lhsOinhMap',_lhsOsynMap',sem_Nonterminals_1) }) }) }) }))+-- Pattern -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ con : ConstructorIdent+ nt : NontermIdent+ synthesized attributes:+ containsVars : Bool+ copy : Pattern + definedAttrs : Set (Identifier,Identifier)+ errors : Seq Error+ locals : Set Identifier+ output : Pattern + alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + visit 0:+ local copy : _+ local output : _+ alternative Constr:+ child name : {ConstructorIdent}+ child pats : Patterns + visit 0:+ local copy : _+ local output : _+ alternative Irrefutable:+ child pat : Pattern + visit 0:+ local copy : _+ local output : _+ alternative Product:+ child pos : {Pos}+ child pats : Patterns + visit 0:+ local copy : _+ local output : _+ alternative Underscore:+ child pos : {Pos}+ visit 0:+ local copy : _+ local output : _+-}+-- cata+sem_Pattern :: Pattern ->+ T_Pattern+sem_Pattern !(Alias _field _attr _pat) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat))+sem_Pattern !(Constr _name _pats) =+ (sem_Pattern_Constr _name (sem_Patterns _pats))+sem_Pattern !(Irrefutable _pat) =+ (sem_Pattern_Irrefutable (sem_Pattern _pat))+sem_Pattern !(Product _pos _pats) =+ (sem_Pattern_Product _pos (sem_Patterns _pats))+sem_Pattern !(Underscore _pos) =+ (sem_Pattern_Underscore _pos)+-- semantic domain+newtype T_Pattern = T_Pattern (ConstructorIdent ->+ NontermIdent ->+ ( Bool,Pattern,(Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Pattern))+data Inh_Pattern = Inh_Pattern {con_Inh_Pattern :: !(ConstructorIdent),nt_Inh_Pattern :: !(NontermIdent)}+data Syn_Pattern = Syn_Pattern {containsVars_Syn_Pattern :: !(Bool),copy_Syn_Pattern :: !(Pattern),definedAttrs_Syn_Pattern :: !((Set (Identifier,Identifier))),errors_Syn_Pattern :: !((Seq Error)),locals_Syn_Pattern :: !((Set Identifier)),output_Syn_Pattern :: !(Pattern)}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern+wrap_Pattern !(T_Pattern sem) !(Inh_Pattern _lhsIcon _lhsInt) =+ (let ( !_lhsOcontainsVars,!_lhsOcopy,!_lhsOdefinedAttrs,!_lhsOerrors,!_lhsOlocals,!_lhsOoutput) = sem _lhsIcon _lhsInt+ in (Syn_Pattern _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput))+sem_Pattern_Alias :: Identifier ->+ Identifier ->+ T_Pattern ->+ T_Pattern+sem_Pattern_Alias !field_ !attr_ !(T_Pattern pat_) =+ (T_Pattern (\ (!_lhsIcon)+ (!_lhsInt) ->+ (case (({-# LINE 523 "src-ag/DefaultRules.ag" #-}+ True+ {-# LINE 1567 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcontainsVars ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 1572 "dist/build/DefaultRules" #-}+ )) of+ { !_patOnt ->+ (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 1577 "dist/build/DefaultRules" #-}+ )) of+ { !_patOcon ->+ (case (pat_ _patOcon _patOnt) of+ { ( !_patIcontainsVars,!_patIcopy,!_patIdefinedAttrs,!_patIerrors,!_patIlocals,!_patIoutput) ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Alias field_ attr_ _patIcopy+ {-# LINE 1584 "dist/build/DefaultRules" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1589 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 505 "src-ag/DefaultRules.ag" #-}+ Set.insert (field_,attr_) _patIdefinedAttrs+ {-# LINE 1594 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ _patIerrors+ {-# LINE 1599 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 506 "src-ag/DefaultRules.ag" #-}+ if field_ == _LOC+ then Set.insert attr_ _patIlocals+ else _patIlocals+ {-# LINE 1606 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOlocals ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ Alias field_ attr_ _patIoutput+ {-# LINE 1611 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 1616 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })))+sem_Pattern_Constr :: ConstructorIdent ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Constr !name_ !(T_Patterns pats_) =+ (T_Pattern (\ (!_lhsIcon)+ (!_lhsInt) ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 1628 "dist/build/DefaultRules" #-}+ )) of+ { !_patsOnt ->+ (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 1633 "dist/build/DefaultRules" #-}+ )) of+ { !_patsOcon ->+ (case (pats_ _patsOcon _patsOnt) of+ { ( !_patsIcontainsVars,!_patsIcopy,!_patsIdefinedAttrs,!_patsIerrors,!_patsIlocals,!_patsIoutput) ->+ (case (({-# LINE 520 "src-ag/DefaultRules.ag" #-}+ _patsIcontainsVars+ {-# LINE 1640 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcontainsVars ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 1645 "dist/build/DefaultRules" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1650 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 500 "src-ag/DefaultRules.ag" #-}+ _patsIdefinedAttrs+ {-# LINE 1655 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ _patsIerrors+ {-# LINE 1660 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}+ _patsIlocals+ {-# LINE 1665 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOlocals ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ Constr name_ _patsIoutput+ {-# LINE 1670 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 1675 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })))+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern+sem_Pattern_Irrefutable !(T_Pattern pat_) =+ (T_Pattern (\ (!_lhsIcon)+ (!_lhsInt) ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 1686 "dist/build/DefaultRules" #-}+ )) of+ { !_patOnt ->+ (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 1691 "dist/build/DefaultRules" #-}+ )) of+ { !_patOcon ->+ (case (pat_ _patOcon _patOnt) of+ { ( !_patIcontainsVars,!_patIcopy,!_patIdefinedAttrs,!_patIerrors,!_patIlocals,!_patIoutput) ->+ (case (({-# LINE 520 "src-ag/DefaultRules.ag" #-}+ _patIcontainsVars+ {-# LINE 1698 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcontainsVars ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 1703 "dist/build/DefaultRules" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1708 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 500 "src-ag/DefaultRules.ag" #-}+ _patIdefinedAttrs+ {-# LINE 1713 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ _patIerrors+ {-# LINE 1718 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}+ _patIlocals+ {-# LINE 1723 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOlocals ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ Irrefutable _patIoutput+ {-# LINE 1728 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 1733 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })))+sem_Pattern_Product :: Pos ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Product !pos_ !(T_Patterns pats_) =+ (T_Pattern (\ (!_lhsIcon)+ (!_lhsInt) ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 1745 "dist/build/DefaultRules" #-}+ )) of+ { !_patsOnt ->+ (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 1750 "dist/build/DefaultRules" #-}+ )) of+ { !_patsOcon ->+ (case (pats_ _patsOcon _patsOnt) of+ { ( !_patsIcontainsVars,!_patsIcopy,!_patsIdefinedAttrs,!_patsIerrors,!_patsIlocals,!_patsIoutput) ->+ (case (({-# LINE 520 "src-ag/DefaultRules.ag" #-}+ _patsIcontainsVars+ {-# LINE 1757 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcontainsVars ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 1762 "dist/build/DefaultRules" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1767 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 500 "src-ag/DefaultRules.ag" #-}+ _patsIdefinedAttrs+ {-# LINE 1772 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ _patsIerrors+ {-# LINE 1777 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}+ _patsIlocals+ {-# LINE 1782 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOlocals ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ Product pos_ _patsIoutput+ {-# LINE 1787 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 1792 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })))+sem_Pattern_Underscore :: Pos ->+ T_Pattern+sem_Pattern_Underscore !pos_ =+ (T_Pattern (\ (!_lhsIcon)+ (!_lhsInt) ->+ (case (({-# LINE 520 "src-ag/DefaultRules.ag" #-}+ False+ {-# LINE 1803 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcontainsVars ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Underscore pos_+ {-# LINE 1808 "dist/build/DefaultRules" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1813 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 500 "src-ag/DefaultRules.ag" #-}+ Set.empty+ {-# LINE 1818 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ Seq.empty+ {-# LINE 1823 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}+ Set.empty+ {-# LINE 1828 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOlocals ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ Underscore pos_+ {-# LINE 1833 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 1838 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) })))+-- Patterns ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ con : ConstructorIdent+ nt : NontermIdent+ synthesized attributes:+ containsVars : Bool+ copy : Patterns + definedAttrs : Set (Identifier,Identifier)+ errors : Seq Error+ locals : Set Identifier+ output : Patterns + alternatives:+ alternative Cons:+ child hd : Pattern + child tl : Patterns + visit 0:+ local copy : _+ local output : _+ alternative Nil:+ visit 0:+ local copy : _+ local output : _+-}+-- cata+sem_Patterns :: Patterns ->+ T_Patterns+sem_Patterns !list =+ (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list))+-- semantic domain+newtype T_Patterns = T_Patterns (ConstructorIdent ->+ NontermIdent ->+ ( Bool,Patterns,(Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Patterns))+data Inh_Patterns = Inh_Patterns {con_Inh_Patterns :: !(ConstructorIdent),nt_Inh_Patterns :: !(NontermIdent)}+data Syn_Patterns = Syn_Patterns {containsVars_Syn_Patterns :: !(Bool),copy_Syn_Patterns :: !(Patterns),definedAttrs_Syn_Patterns :: !((Set (Identifier,Identifier))),errors_Syn_Patterns :: !((Seq Error)),locals_Syn_Patterns :: !((Set Identifier)),output_Syn_Patterns :: !(Patterns)}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns+wrap_Patterns !(T_Patterns sem) !(Inh_Patterns _lhsIcon _lhsInt) =+ (let ( !_lhsOcontainsVars,!_lhsOcopy,!_lhsOdefinedAttrs,!_lhsOerrors,!_lhsOlocals,!_lhsOoutput) = sem _lhsIcon _lhsInt+ in (Syn_Patterns _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns+sem_Patterns_Cons !(T_Pattern hd_) !(T_Patterns tl_) =+ (T_Patterns (\ (!_lhsIcon)+ (!_lhsInt) ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 1892 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOnt ->+ (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 1897 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOcon ->+ (case (tl_ _tlOcon _tlOnt) of+ { ( !_tlIcontainsVars,!_tlIcopy,!_tlIdefinedAttrs,!_tlIerrors,!_tlIlocals,!_tlIoutput) ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 1904 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOnt ->+ (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 1909 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOcon ->+ (case (hd_ _hdOcon _hdOnt) of+ { ( !_hdIcontainsVars,!_hdIcopy,!_hdIdefinedAttrs,!_hdIerrors,!_hdIlocals,!_hdIoutput) ->+ (case (({-# LINE 520 "src-ag/DefaultRules.ag" #-}+ _hdIcontainsVars || _tlIcontainsVars+ {-# LINE 1916 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcontainsVars ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 1921 "dist/build/DefaultRules" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1926 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 500 "src-ag/DefaultRules.ag" #-}+ _hdIdefinedAttrs `Set.union` _tlIdefinedAttrs+ {-# LINE 1931 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 1936 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}+ _hdIlocals `Set.union` _tlIlocals+ {-# LINE 1941 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOlocals ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 1946 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 1951 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+sem_Patterns_Nil :: T_Patterns+sem_Patterns_Nil =+ (T_Patterns (\ (!_lhsIcon)+ (!_lhsInt) ->+ (case (({-# LINE 520 "src-ag/DefaultRules.ag" #-}+ False+ {-# LINE 1961 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcontainsVars ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ []+ {-# LINE 1966 "dist/build/DefaultRules" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1971 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 500 "src-ag/DefaultRules.ag" #-}+ Set.empty+ {-# LINE 1976 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ Seq.empty+ {-# LINE 1981 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}+ Set.empty+ {-# LINE 1986 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOlocals ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ []+ {-# LINE 1991 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 1996 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) })))+-- Production --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ aroundsIn : Map ConstructorIdent (Map Identifier [Expression])+ augmentsIn : Map ConstructorIdent (Map Identifier [Expression])+ cr : Bool+ inh : Attributes+ inhMap : Map Identifier Attributes+ inhOrig : Attributes+ manualAttrOrderMap : AttrOrderMap+ mergesIn : Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))+ nonterminals : Set NontermIdent+ nt : NontermIdent+ o_rename : Bool+ options : Options+ params : [Identifier]+ syn : Attributes+ synMap : Map Identifier Attributes+ synOrig : Attributes+ typeSyns : TypeSyns+ useMap : Map Identifier (String,String,String)+ wrappers : Set NontermIdent+ chained attribute:+ uniq : Int+ synthesized attributes:+ errors : Seq Error+ output : Production + alternatives:+ alternative Production:+ child con : {ConstructorIdent}+ child params : {[Identifier]}+ child constraints : {[Type]}+ child children : Children + child rules : Rules + child typeSigs : TypeSigs + child macro : {MaybeMacro}+ visit 0:+ local mergesIn : _+ local merged : _+ local orderDeps : _+ local orderErrs : _+ local _tup2 : _+ local errs : _+ local aroundsIn : _+ local augmentsIn : _+ local newRls : _+ local extra1 : _+ local extra2 : _+ local extra3 : _+-}+-- cata+sem_Production :: Production ->+ T_Production+sem_Production !(Production _con _params _constraints _children _rules _typeSigs _macro) =+ (sem_Production_Production _con _params _constraints (sem_Children _children) (sem_Rules _rules) (sem_TypeSigs _typeSigs) _macro)+-- semantic domain+newtype T_Production = T_Production ((Map ConstructorIdent (Map Identifier [Expression])) ->+ (Map ConstructorIdent (Map Identifier [Expression])) ->+ Bool ->+ Attributes ->+ (Map Identifier Attributes) ->+ Attributes ->+ AttrOrderMap ->+ (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) ->+ (Set NontermIdent) ->+ NontermIdent ->+ Bool ->+ Options ->+ ([Identifier]) ->+ Attributes ->+ (Map Identifier Attributes) ->+ Attributes ->+ TypeSyns ->+ Int ->+ (Map Identifier (String,String,String)) ->+ (Set NontermIdent) ->+ ( (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),inhMap_Inh_Production :: !((Map Identifier Attributes)),inhOrig_Inh_Production :: !(Attributes),manualAttrOrderMap_Inh_Production :: !(AttrOrderMap),mergesIn_Inh_Production :: !((Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))),nonterminals_Inh_Production :: !((Set NontermIdent)),nt_Inh_Production :: !(NontermIdent),o_rename_Inh_Production :: !(Bool),options_Inh_Production :: !(Options),params_Inh_Production :: !(([Identifier])),syn_Inh_Production :: !(Attributes),synMap_Inh_Production :: !((Map Identifier Attributes)),synOrig_Inh_Production :: !(Attributes),typeSyns_Inh_Production :: !(TypeSyns),uniq_Inh_Production :: !(Int),useMap_Inh_Production :: !((Map Identifier (String,String,String))),wrappers_Inh_Production :: !((Set NontermIdent))}+data Syn_Production = Syn_Production {errors_Syn_Production :: !((Seq Error)),output_Syn_Production :: !(Production),uniq_Syn_Production :: !(Int)}+wrap_Production :: T_Production ->+ Inh_Production ->+ Syn_Production+wrap_Production !(T_Production sem) !(Inh_Production _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) =+ (let ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) = sem _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers+ in (Syn_Production _lhsOerrors _lhsOoutput _lhsOuniq))+sem_Production_Production :: ConstructorIdent ->+ ([Identifier]) ->+ ([Type]) ->+ T_Children ->+ T_Rules ->+ T_TypeSigs ->+ MaybeMacro ->+ T_Production+sem_Production_Production !con_ !params_ !constraints_ !(T_Children children_) !(T_Rules rules_) !(T_TypeSigs typeSigs_) !macro_ =+ (T_Production (\ (!_lhsIaroundsIn)+ (!_lhsIaugmentsIn)+ (!_lhsIcr)+ (!_lhsIinh)+ (!_lhsIinhMap)+ (!_lhsIinhOrig)+ (!_lhsImanualAttrOrderMap)+ (!_lhsImergesIn)+ (!_lhsInonterminals)+ (!_lhsInt)+ (!_lhsIo_rename)+ (!_lhsIoptions)+ (!_lhsIparams)+ (!_lhsIsyn)+ (!_lhsIsynMap)+ (!_lhsIsynOrig)+ (!_lhsItypeSyns)+ (!_lhsIuniq)+ (!_lhsIuseMap)+ (!_lhsIwrappers) ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 2117 "dist/build/DefaultRules" #-}+ )) of+ { !_childrenOsynMap ->+ (case (({-# LINE 761 "src-ag/DefaultRules.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsImergesIn+ {-# LINE 2122 "dist/build/DefaultRules" #-}+ )) of+ { !_mergesIn ->+ (case (({-# LINE 762 "src-ag/DefaultRules.ag" #-}+ Set.fromList [ c | (_,cs,_) <- Map.elems _mergesIn , c <- cs ]+ {-# LINE 2127 "dist/build/DefaultRules" #-}+ )) of+ { !_merged ->+ (case (({-# LINE 757 "src-ag/DefaultRules.ag" #-}+ _merged+ {-# LINE 2132 "dist/build/DefaultRules" #-}+ )) of+ { !_childrenOmerged ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 2137 "dist/build/DefaultRules" #-}+ )) of+ { !_childrenOinhMap ->+ (case (({-# LINE 688 "src-ag/DefaultRules.ag" #-}+ Set.toList $ Map.findWithDefault Set.empty con_ $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrOrderMap+ {-# LINE 2142 "dist/build/DefaultRules" #-}+ )) of+ { !_orderDeps ->+ (case (({-# LINE 561 "src-ag/DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 2147 "dist/build/DefaultRules" #-}+ )) of+ { !_rulesOuniq ->+ (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}+ _lhsIoptions+ {-# LINE 2152 "dist/build/DefaultRules" #-}+ )) of+ { !_rulesOoptions ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 2157 "dist/build/DefaultRules" #-}+ )) of+ { !_rulesOnt ->+ (case (({-# LINE 171 "src-ag/DefaultRules.ag" #-}+ con_+ {-# LINE 2162 "dist/build/DefaultRules" #-}+ )) of+ { !_rulesOcon ->+ (case (rules_ _rulesOcon _rulesOnt _rulesOoptions _rulesOuniq) of+ { ( !_rulesIdefinedAttrs,!_rulesIerrors,!_rulesIlocals,!_rulesIoutput,!_rulesIruleNames,!_rulesIuniq) ->+ (case (({-# LINE 41 "src-ag/DefaultRules.ag" #-}+ _lhsIparams+ {-# LINE 2169 "dist/build/DefaultRules" #-}+ )) of+ { !_childrenOparams ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 2174 "dist/build/DefaultRules" #-}+ )) of+ { !_childrenOnt ->+ (case (({-# LINE 55 "src-ag/DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 2179 "dist/build/DefaultRules" #-}+ )) of+ { !_childrenOcr ->+ (case (({-# LINE 172 "src-ag/DefaultRules.ag" #-}+ con_+ {-# LINE 2184 "dist/build/DefaultRules" #-}+ )) of+ { !_childrenOcon ->+ (case (children_ _childrenOcon _childrenOcr _childrenOinhMap _childrenOmerged _childrenOnt _childrenOparams _childrenOsynMap) of+ { ( !_childrenIerrors,!_childrenIfields,!_childrenIinputs,!_childrenIoutput,!_childrenIoutputs) ->+ (case (({-# LINE 690 "src-ag/DefaultRules.ag" #-}+ let chldOutMap = Map.fromList [ (k, Map.keysSet s) | (k,s) <- _childrenIoutputs ]+ chldInMap = Map.fromList [ (k, Map.keysSet s) | (k,s) <- _childrenIinputs ]+ isInAttribute :: Identifier -> Identifier -> [Error]+ isInAttribute fld nm+ | fld == _LOC = if nm `Set.member` _rulesIlocals+ then []+ else [UndefAttr _lhsInt con_ fld nm False]+ | fld == _LHS = if nm `Map.member` _lhsIinh+ then []+ else [UndefAttr _lhsInt con_ fld nm False]+ | otherwise = if nm `Set.member` (Map.findWithDefault Set.empty fld chldOutMap)+ then []+ else [UndefAttr _lhsInt con_ fld nm False]+ isOutAttribute :: Identifier -> Identifier -> [Error]+ isOutAttribute fld nm+ | fld == _LOC = if nm `Set.member` _rulesIlocals+ then []+ else [UndefAttr _lhsInt con_ fld nm True]+ | fld == _LHS = if nm `Map.member` _lhsIsyn+ then []+ else [UndefAttr _lhsInt con_ fld nm True]+ | otherwise = if nm `Set.member` (Map.findWithDefault Set.empty fld chldInMap)+ then []+ else [UndefAttr _lhsInt con_ fld nm True]+ existsRule nm = if nm `Set.member` _rulesIruleNames+ then []+ else [MissingNamedRule _lhsInt con_ nm]+ checkIn (OccAttr fld nm) = isInAttribute fld nm+ checkIn (OccRule nm) = existsRule nm+ checkOut (OccAttr fld nm) = isOutAttribute fld nm+ checkOut (OccRule nm) = existsRule nm+ in Seq.fromList . concat $+ [ checkIn occA ++ checkOut occB+ | (Dependency occA occB) <- _orderDeps+ ]+ {-# LINE 2225 "dist/build/DefaultRules" #-}+ )) of+ { !_orderErrs ->+ (case (({-# LINE 354 "src-ag/DefaultRules.ag" #-}+ let locals = _rulesIlocals+ initenv = Map.fromList ( [ (a,_ACHILD)+ | (a,_,_) <- _childrenIfields+ ]+ ++ attrs(_LHS, _lhsIinh)+ ++ [ (a,_LOC)+ | a <- Set.toList locals+ ]+ )+ attrs (n,as) = [ (a,n) | a <- Map.keys as ]+ envs = scanl (flip Map.union)+ initenv+ (map (Map.fromList . attrs ) _childrenIoutputs)+ child_envs = init envs+ lhs_env = last envs+ (selfAttrs, normalAttrs)+ = Map.partitionWithKey (\k _ -> maybe False isSELFNonterminal $ Map.lookup k _lhsIsynOrig) _lhsIsyn+ (_,undefAttrs)+ = removeDefined _rulesIdefinedAttrs (_LHS, normalAttrs)+ (useAttrs,others)+ = splitAttrs _lhsIuseMap undefAttrs+ (rules1, errors1)+ = concatRE $ map (copyRule _lhsIoptions _lhsIwrappers _lhsInt con_ _lhsIcr locals)+ (zip envs (map (removeDefined _rulesIdefinedAttrs) _childrenIinputs))+ uRules+ = map (useRule locals _childrenIoutputs) useAttrs+ selfLocRules+ = [ selfRule False attr $+ lexTokens noPos $+ constructor [childSelf attr nm tp | (nm,tp,virt) <- _childrenIfields, childExists virt]+ | attr <- Map.keys selfAttrs+ , not (Set.member attr locals)+ ]+ where+ childSelf self nm tp+ = case tp of NT nt _ _ -> attrName nm self+ _ | nm `Set.member` locals -> locName nm+ | otherwise -> fieldName nm+ constructor fs+ | getName con_ == "Tuple" && _lhsInt `elem` map fst _lhsItypeSyns+ = "(" ++ concat (intersperse "," fs) ++ ")"+ | otherwise+ = getConName _lhsItypeSyns _lhsIo_rename _lhsInt con_ ++ " " ++ unwords fs+ childExists ChildAttr = False+ childExists _ = True+ selfRules+ = [ selfRule True attr [mkLocVar attr noPos Nothing]+ | attr <- Map.keys selfAttrs+ , not (Set.member (_LHS,attr) _rulesIdefinedAttrs)+ ]+ (rules5, errs5)+ = copyRule _lhsIoptions+ _lhsIwrappers+ _lhsInt+ con_+ _lhsIcr+ locals+ (lhs_env, (_LHS, others))+ in (uRules++selfLocRules++selfRules++rules5++rules1, errors1><errs5)+ {-# LINE 2288 "dist/build/DefaultRules" #-}+ )) of+ { !__tup2 ->+ (case (({-# LINE 354 "src-ag/DefaultRules.ag" #-}+ __tup2+ {-# LINE 2293 "dist/build/DefaultRules" #-}+ )) of+ { !(_,!_errs) ->+ (case (({-# LINE 352 "src-ag/DefaultRules.ag" #-}+ _childrenIerrors >< _errs >< _rulesIerrors >< _orderErrs+ {-# LINE 2298 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 41 "src-ag/DefaultRules.ag" #-}+ _lhsIparams+ {-# LINE 2303 "dist/build/DefaultRules" #-}+ )) of+ { !_typeSigsOparams ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 2308 "dist/build/DefaultRules" #-}+ )) of+ { !_typeSigsOnt ->+ (case (({-# LINE 753 "src-ag/DefaultRules.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsIaroundsIn+ {-# LINE 2313 "dist/build/DefaultRules" #-}+ )) of+ { !_aroundsIn ->+ (case (({-# LINE 746 "src-ag/DefaultRules.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsIaugmentsIn+ {-# LINE 2318 "dist/build/DefaultRules" #-}+ )) of+ { !_augmentsIn ->+ (case (({-# LINE 354 "src-ag/DefaultRules.ag" #-}+ __tup2+ {-# LINE 2323 "dist/build/DefaultRules" #-}+ )) of+ { !(!_newRls,_) ->+ (case (({-# LINE 577 "src-ag/DefaultRules.ag" #-}+ foldr addAugments (_rulesIoutput ++ _newRls) (Map.assocs _augmentsIn )+ {-# LINE 2328 "dist/build/DefaultRules" #-}+ )) of+ { !_extra1 ->+ (case (({-# LINE 578 "src-ag/DefaultRules.ag" #-}+ foldr addArounds _extra1 (Map.assocs _aroundsIn )+ {-# LINE 2333 "dist/build/DefaultRules" #-}+ )) of+ { !_extra2 ->+ (case (({-# LINE 579 "src-ag/DefaultRules.ag" #-}+ foldr addMerges _extra2 (Map.assocs _mergesIn )+ {-# LINE 2338 "dist/build/DefaultRules" #-}+ )) of+ { !_extra3 ->+ (case (typeSigs_ _typeSigsOnt _typeSigsOparams) of+ { ( !_typeSigsIoutput) ->+ (case (({-# LINE 580 "src-ag/DefaultRules.ag" #-}+ Production con_ params_ constraints_ _childrenIoutput _extra3 _typeSigsIoutput macro_+ {-# LINE 2345 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ (case (({-# LINE 561 "src-ag/DefaultRules.ag" #-}+ _rulesIuniq+ {-# LINE 2350 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOuniq ->+ ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+-- Productions -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ aroundsIn : Map ConstructorIdent (Map Identifier [Expression])+ augmentsIn : Map ConstructorIdent (Map Identifier [Expression])+ cr : Bool+ inh : Attributes+ inhMap : Map Identifier Attributes+ inhOrig : Attributes+ manualAttrOrderMap : AttrOrderMap+ mergesIn : Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))+ nonterminals : Set NontermIdent+ nt : NontermIdent+ o_rename : Bool+ options : Options+ params : [Identifier]+ syn : Attributes+ synMap : Map Identifier Attributes+ synOrig : Attributes+ typeSyns : TypeSyns+ useMap : Map Identifier (String,String,String)+ wrappers : Set NontermIdent+ chained attribute:+ uniq : Int+ synthesized attributes:+ errors : Seq Error+ output : Productions + alternatives:+ alternative Cons:+ child hd : Production + child tl : Productions + visit 0:+ local output : _+ alternative Nil:+ visit 0:+ local output : _+-}+-- cata+sem_Productions :: Productions ->+ T_Productions+sem_Productions !list =+ (Prelude.foldr sem_Productions_Cons sem_Productions_Nil (Prelude.map sem_Production list))+-- semantic domain+newtype T_Productions = T_Productions ((Map ConstructorIdent (Map Identifier [Expression])) ->+ (Map ConstructorIdent (Map Identifier [Expression])) ->+ Bool ->+ Attributes ->+ (Map Identifier Attributes) ->+ Attributes ->+ AttrOrderMap ->+ (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) ->+ (Set NontermIdent) ->+ NontermIdent ->+ Bool ->+ Options ->+ ([Identifier]) ->+ Attributes ->+ (Map Identifier Attributes) ->+ Attributes ->+ TypeSyns ->+ Int ->+ (Map Identifier (String,String,String)) ->+ (Set NontermIdent) ->+ ( (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),inhMap_Inh_Productions :: !((Map Identifier Attributes)),inhOrig_Inh_Productions :: !(Attributes),manualAttrOrderMap_Inh_Productions :: !(AttrOrderMap),mergesIn_Inh_Productions :: !((Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))),nonterminals_Inh_Productions :: !((Set NontermIdent)),nt_Inh_Productions :: !(NontermIdent),o_rename_Inh_Productions :: !(Bool),options_Inh_Productions :: !(Options),params_Inh_Productions :: !(([Identifier])),syn_Inh_Productions :: !(Attributes),synMap_Inh_Productions :: !((Map Identifier Attributes)),synOrig_Inh_Productions :: !(Attributes),typeSyns_Inh_Productions :: !(TypeSyns),uniq_Inh_Productions :: !(Int),useMap_Inh_Productions :: !((Map Identifier (String,String,String))),wrappers_Inh_Productions :: !((Set NontermIdent))}+data Syn_Productions = Syn_Productions {errors_Syn_Productions :: !((Seq Error)),output_Syn_Productions :: !(Productions),uniq_Syn_Productions :: !(Int)}+wrap_Productions :: T_Productions ->+ Inh_Productions ->+ Syn_Productions+wrap_Productions !(T_Productions sem) !(Inh_Productions _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) =+ (let ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) = sem _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers+ in (Syn_Productions _lhsOerrors _lhsOoutput _lhsOuniq))+sem_Productions_Cons :: T_Production ->+ T_Productions ->+ T_Productions+sem_Productions_Cons !(T_Production hd_) !(T_Productions tl_) =+ (T_Productions (\ (!_lhsIaroundsIn)+ (!_lhsIaugmentsIn)+ (!_lhsIcr)+ (!_lhsIinh)+ (!_lhsIinhMap)+ (!_lhsIinhOrig)+ (!_lhsImanualAttrOrderMap)+ (!_lhsImergesIn)+ (!_lhsInonterminals)+ (!_lhsInt)+ (!_lhsIo_rename)+ (!_lhsIoptions)+ (!_lhsIparams)+ (!_lhsIsyn)+ (!_lhsIsynMap)+ (!_lhsIsynOrig)+ (!_lhsItypeSyns)+ (!_lhsIuniq)+ (!_lhsIuseMap)+ (!_lhsIwrappers) ->+ (case (({-# LINE 64 "src-ag/DefaultRules.ag" #-}+ _lhsIwrappers+ {-# LINE 2453 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOwrappers ->+ (case (({-# LINE 161 "src-ag/DefaultRules.ag" #-}+ _lhsIuseMap+ {-# LINE 2458 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOuseMap ->+ (case (({-# LINE 71 "src-ag/DefaultRules.ag" #-}+ _lhsItypeSyns+ {-# LINE 2463 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOtypeSyns ->+ (case (({-# LINE 161 "src-ag/DefaultRules.ag" #-}+ _lhsIsynOrig+ {-# LINE 2468 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOsynOrig ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 2473 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOsynMap ->+ (case (({-# LINE 161 "src-ag/DefaultRules.ag" #-}+ _lhsIsyn+ {-# LINE 2478 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOsyn ->+ (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}+ _lhsIoptions+ {-# LINE 2483 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOoptions ->+ (case (({-# LINE 51 "src-ag/DefaultRules.ag" #-}+ _lhsIo_rename+ {-# LINE 2488 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOo_rename ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 2493 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOnt ->+ (case (({-# LINE 756 "src-ag/DefaultRules.ag" #-}+ _lhsImergesIn+ {-# LINE 2498 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOmergesIn ->+ (case (({-# LINE 674 "src-ag/DefaultRules.ag" #-}+ _lhsImanualAttrOrderMap+ {-# LINE 2503 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOmanualAttrOrderMap ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 2508 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOinhMap ->+ (case (({-# LINE 161 "src-ag/DefaultRules.ag" #-}+ _lhsIinh+ {-# LINE 2513 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOinh ->+ (case (({-# LINE 52 "src-ag/DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 2518 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOcr ->+ (case (({-# LINE 64 "src-ag/DefaultRules.ag" #-}+ _lhsIwrappers+ {-# LINE 2523 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOwrappers ->+ (case (({-# LINE 161 "src-ag/DefaultRules.ag" #-}+ _lhsIuseMap+ {-# LINE 2528 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOuseMap ->+ (case (({-# LINE 71 "src-ag/DefaultRules.ag" #-}+ _lhsItypeSyns+ {-# LINE 2533 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOtypeSyns ->+ (case (({-# LINE 161 "src-ag/DefaultRules.ag" #-}+ _lhsIsynOrig+ {-# LINE 2538 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOsynOrig ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 2543 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOsynMap ->+ (case (({-# LINE 161 "src-ag/DefaultRules.ag" #-}+ _lhsIsyn+ {-# LINE 2548 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOsyn ->+ (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}+ _lhsIoptions+ {-# LINE 2553 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOoptions ->+ (case (({-# LINE 51 "src-ag/DefaultRules.ag" #-}+ _lhsIo_rename+ {-# LINE 2558 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOo_rename ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 2563 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOnt ->+ (case (({-# LINE 756 "src-ag/DefaultRules.ag" #-}+ _lhsImergesIn+ {-# LINE 2568 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOmergesIn ->+ (case (({-# LINE 674 "src-ag/DefaultRules.ag" #-}+ _lhsImanualAttrOrderMap+ {-# LINE 2573 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOmanualAttrOrderMap ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 2578 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOinhMap ->+ (case (({-# LINE 161 "src-ag/DefaultRules.ag" #-}+ _lhsIinh+ {-# LINE 2583 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOinh ->+ (case (({-# LINE 52 "src-ag/DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 2588 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOcr ->+ (case (({-# LINE 561 "src-ag/DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 2593 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOuniq ->+ (case (({-# LINE 41 "src-ag/DefaultRules.ag" #-}+ _lhsIparams+ {-# LINE 2598 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOparams ->+ (case (({-# LINE 152 "src-ag/DefaultRules.ag" #-}+ _lhsInonterminals+ {-# LINE 2603 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOnonterminals ->+ (case (({-# LINE 161 "src-ag/DefaultRules.ag" #-}+ _lhsIinhOrig+ {-# LINE 2608 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOinhOrig ->+ (case (({-# LINE 742 "src-ag/DefaultRules.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 2613 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOaugmentsIn ->+ (case (({-# LINE 749 "src-ag/DefaultRules.ag" #-}+ _lhsIaroundsIn+ {-# LINE 2618 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOaroundsIn ->+ (case (hd_ _hdOaroundsIn _hdOaugmentsIn _hdOcr _hdOinh _hdOinhMap _hdOinhOrig _hdOmanualAttrOrderMap _hdOmergesIn _hdOnonterminals _hdOnt _hdOo_rename _hdOoptions _hdOparams _hdOsyn _hdOsynMap _hdOsynOrig _hdOtypeSyns _hdOuniq _hdOuseMap _hdOwrappers) of+ { ( !_hdIerrors,!_hdIoutput,!_hdIuniq) ->+ (case (({-# LINE 561 "src-ag/DefaultRules.ag" #-}+ _hdIuniq+ {-# LINE 2625 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOuniq ->+ (case (({-# LINE 41 "src-ag/DefaultRules.ag" #-}+ _lhsIparams+ {-# LINE 2630 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOparams ->+ (case (({-# LINE 152 "src-ag/DefaultRules.ag" #-}+ _lhsInonterminals+ {-# LINE 2635 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOnonterminals ->+ (case (({-# LINE 161 "src-ag/DefaultRules.ag" #-}+ _lhsIinhOrig+ {-# LINE 2640 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOinhOrig ->+ (case (({-# LINE 742 "src-ag/DefaultRules.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 2645 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOaugmentsIn ->+ (case (({-# LINE 749 "src-ag/DefaultRules.ag" #-}+ _lhsIaroundsIn+ {-# LINE 2650 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOaroundsIn ->+ (case (tl_ _tlOaroundsIn _tlOaugmentsIn _tlOcr _tlOinh _tlOinhMap _tlOinhOrig _tlOmanualAttrOrderMap _tlOmergesIn _tlOnonterminals _tlOnt _tlOo_rename _tlOoptions _tlOparams _tlOsyn _tlOsynMap _tlOsynOrig _tlOtypeSyns _tlOuniq _tlOuseMap _tlOwrappers) of+ { ( !_tlIerrors,!_tlIoutput,!_tlIuniq) ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 2657 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 2662 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 2667 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ (case (({-# LINE 561 "src-ag/DefaultRules.ag" #-}+ _tlIuniq+ {-# LINE 2672 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOuniq ->+ ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+sem_Productions_Nil :: T_Productions+sem_Productions_Nil =+ (T_Productions (\ (!_lhsIaroundsIn)+ (!_lhsIaugmentsIn)+ (!_lhsIcr)+ (!_lhsIinh)+ (!_lhsIinhMap)+ (!_lhsIinhOrig)+ (!_lhsImanualAttrOrderMap)+ (!_lhsImergesIn)+ (!_lhsInonterminals)+ (!_lhsInt)+ (!_lhsIo_rename)+ (!_lhsIoptions)+ (!_lhsIparams)+ (!_lhsIsyn)+ (!_lhsIsynMap)+ (!_lhsIsynOrig)+ (!_lhsItypeSyns)+ (!_lhsIuniq)+ (!_lhsIuseMap)+ (!_lhsIwrappers) ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ Seq.empty+ {-# LINE 2700 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ []+ {-# LINE 2705 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 2710 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ (case (({-# LINE 561 "src-ag/DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 2715 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOuniq ->+ ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) })))+-- Rule --------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ con : ConstructorIdent+ nt : NontermIdent+ options : Options+ chained attribute:+ uniq : Int+ synthesized attributes:+ containsVars : Bool+ definedAttrs : Set (Identifier,Identifier)+ errors : Seq Error+ isPure : Bool+ locals : Set Identifier+ output : Rule + outputs : Rules + ruleNames : Set Identifier+ alternatives:+ alternative Rule:+ child mbName : {Maybe Identifier}+ child pattern : Pattern + child rhs : {Expression}+ child owrt : {Bool}+ child origin : {String}+ child explicit : {Bool}+ child pure : {Bool}+ child identity : {Bool}+ child mbError : {Maybe Error}+ child eager : {Bool}+ visit 0:+ local output : _+ local _tup3 : _+ local output1 : _+ local _tup4 : _+ local outputs : _+ local mbAlias : _+-}+-- cata+sem_Rule :: Rule ->+ T_Rule+sem_Rule !(Rule _mbName _pattern _rhs _owrt _origin _explicit _pure _identity _mbError _eager) =+ (sem_Rule_Rule _mbName (sem_Pattern _pattern) _rhs _owrt _origin _explicit _pure _identity _mbError _eager)+-- semantic domain+newtype T_Rule = T_Rule (ConstructorIdent ->+ NontermIdent ->+ Options ->+ Int ->+ ( Bool,(Set (Identifier,Identifier)),(Seq Error),Bool,(Set Identifier),Rule,Rules,(Set Identifier),Int))+data Inh_Rule = Inh_Rule {con_Inh_Rule :: !(ConstructorIdent),nt_Inh_Rule :: !(NontermIdent),options_Inh_Rule :: !(Options),uniq_Inh_Rule :: !(Int)}+data Syn_Rule = Syn_Rule {containsVars_Syn_Rule :: !(Bool),definedAttrs_Syn_Rule :: !((Set (Identifier,Identifier))),errors_Syn_Rule :: !((Seq Error)),isPure_Syn_Rule :: !(Bool),locals_Syn_Rule :: !((Set Identifier)),output_Syn_Rule :: !(Rule),outputs_Syn_Rule :: !(Rules),ruleNames_Syn_Rule :: !((Set Identifier)),uniq_Syn_Rule :: !(Int)}+wrap_Rule :: T_Rule ->+ Inh_Rule ->+ Syn_Rule+wrap_Rule !(T_Rule sem) !(Inh_Rule _lhsIcon _lhsInt _lhsIoptions _lhsIuniq) =+ (let ( !_lhsOcontainsVars,!_lhsOdefinedAttrs,!_lhsOerrors,!_lhsOisPure,!_lhsOlocals,!_lhsOoutput,!_lhsOoutputs,!_lhsOruleNames,!_lhsOuniq) = sem _lhsIcon _lhsInt _lhsIoptions _lhsIuniq+ in (Syn_Rule _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOisPure _lhsOlocals _lhsOoutput _lhsOoutputs _lhsOruleNames _lhsOuniq))+sem_Rule_Rule :: (Maybe Identifier) ->+ T_Pattern ->+ Expression ->+ Bool ->+ String ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Error) ->+ Bool ->+ T_Rule+sem_Rule_Rule !mbName_ !(T_Pattern pattern_) !rhs_ !owrt_ !origin_ !explicit_ !pure_ !identity_ !mbError_ !eager_ =+ (T_Rule (\ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIoptions)+ (!_lhsIuniq) ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 2794 "dist/build/DefaultRules" #-}+ )) of+ { !_patternOnt ->+ (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 2799 "dist/build/DefaultRules" #-}+ )) of+ { !_patternOcon ->+ (case (pattern_ _patternOcon _patternOnt) of+ { ( !_patternIcontainsVars,!_patternIcopy,!_patternIdefinedAttrs,!_patternIerrors,!_patternIlocals,!_patternIoutput) ->+ (case (({-# LINE 520 "src-ag/DefaultRules.ag" #-}+ _patternIcontainsVars+ {-# LINE 2806 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOcontainsVars ->+ (case (({-# LINE 500 "src-ag/DefaultRules.ag" #-}+ _patternIdefinedAttrs+ {-# LINE 2811 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ _patternIerrors+ {-# LINE 2816 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 526 "src-ag/DefaultRules.ag" #-}+ pure_+ {-# LINE 2821 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOisPure ->+ (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}+ _patternIlocals+ {-# LINE 2826 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOlocals ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ Rule mbName_ _patternIoutput rhs_ owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_+ {-# LINE 2831 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 2836 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ (case (({-# LINE 593 "src-ag/DefaultRules.ag" #-}+ mkRuleAlias _output+ {-# LINE 2841 "dist/build/DefaultRules" #-}+ )) of+ { !__tup3 ->+ (case (({-# LINE 593 "src-ag/DefaultRules.ag" #-}+ __tup3+ {-# LINE 2846 "dist/build/DefaultRules" #-}+ )) of+ { !(!_output1,_) ->+ (case (({-# LINE 594 "src-ag/DefaultRules.ag" #-}+ if needsMultiRules _lhsIoptions+ then multiRule _output1 _lhsIuniq+ else ([_output1 ], _lhsIuniq)+ {-# LINE 2853 "dist/build/DefaultRules" #-}+ )) of+ { !__tup4 ->+ (case (({-# LINE 594 "src-ag/DefaultRules.ag" #-}+ __tup4+ {-# LINE 2858 "dist/build/DefaultRules" #-}+ )) of+ { !(!_outputs,_) ->+ (case (({-# LINE 593 "src-ag/DefaultRules.ag" #-}+ __tup3+ {-# LINE 2863 "dist/build/DefaultRules" #-}+ )) of+ { !(_,!_mbAlias) ->+ (case (({-# LINE 597 "src-ag/DefaultRules.ag" #-}+ maybe [] return _mbAlias ++ _outputs+ {-# LINE 2868 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutputs ->+ (case (({-# LINE 682 "src-ag/DefaultRules.ag" #-}+ case mbName_ of+ Nothing -> Set.empty+ Just nm -> Set.singleton nm+ {-# LINE 2875 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOruleNames ->+ (case (({-# LINE 594 "src-ag/DefaultRules.ag" #-}+ __tup4+ {-# LINE 2880 "dist/build/DefaultRules" #-}+ )) of+ { !(_,!_lhsOuniq) ->+ ( _lhsOcontainsVars,_lhsOdefinedAttrs,_lhsOerrors,_lhsOisPure,_lhsOlocals,_lhsOoutput,_lhsOoutputs,_lhsOruleNames,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+-- Rules -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ con : ConstructorIdent+ nt : NontermIdent+ options : Options+ chained attribute:+ uniq : Int+ synthesized attributes:+ definedAttrs : Set (Identifier,Identifier)+ errors : Seq Error+ locals : Set Identifier+ output : Rules + ruleNames : Set Identifier+ alternatives:+ alternative Cons:+ child hd : Rule + child tl : Rules + alternative Nil:+ visit 0:+ local output : _+-}+-- cata+sem_Rules :: Rules ->+ T_Rules+sem_Rules !list =+ (Prelude.foldr sem_Rules_Cons sem_Rules_Nil (Prelude.map sem_Rule list))+-- semantic domain+newtype T_Rules = T_Rules (ConstructorIdent ->+ NontermIdent ->+ Options ->+ 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),options_Inh_Rules :: !(Options),uniq_Inh_Rules :: !(Int)}+data Syn_Rules = Syn_Rules {definedAttrs_Syn_Rules :: !((Set (Identifier,Identifier))),errors_Syn_Rules :: !((Seq Error)),locals_Syn_Rules :: !((Set Identifier)),output_Syn_Rules :: !(Rules),ruleNames_Syn_Rules :: !((Set Identifier)),uniq_Syn_Rules :: !(Int)}+wrap_Rules :: T_Rules ->+ Inh_Rules ->+ Syn_Rules+wrap_Rules !(T_Rules sem) !(Inh_Rules _lhsIcon _lhsInt _lhsIoptions _lhsIuniq) =+ (let ( !_lhsOdefinedAttrs,!_lhsOerrors,!_lhsOlocals,!_lhsOoutput,!_lhsOruleNames,!_lhsOuniq) = sem _lhsIcon _lhsInt _lhsIoptions _lhsIuniq+ in (Syn_Rules _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOruleNames _lhsOuniq))+sem_Rules_Cons :: T_Rule ->+ T_Rules ->+ T_Rules+sem_Rules_Cons !(T_Rule hd_) !(T_Rules tl_) =+ (T_Rules (\ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIoptions)+ (!_lhsIuniq) ->+ (case (({-# LINE 561 "src-ag/DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 2936 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOuniq ->+ (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}+ _lhsIoptions+ {-# LINE 2941 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOoptions ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 2946 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOnt ->+ (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 2951 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOcon ->+ (case (hd_ _hdOcon _hdOnt _hdOoptions _hdOuniq) of+ { ( !_hdIcontainsVars,!_hdIdefinedAttrs,!_hdIerrors,!_hdIisPure,!_hdIlocals,!_hdIoutput,!_hdIoutputs,!_hdIruleNames,!_hdIuniq) ->+ (case (({-# LINE 561 "src-ag/DefaultRules.ag" #-}+ _hdIuniq+ {-# LINE 2958 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOuniq ->+ (case (({-# LINE 50 "src-ag/DefaultRules.ag" #-}+ _lhsIoptions+ {-# LINE 2963 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOoptions ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 2968 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOnt ->+ (case (({-# LINE 39 "src-ag/DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 2973 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOcon ->+ (case (tl_ _tlOcon _tlOnt _tlOoptions _tlOuniq) of+ { ( !_tlIdefinedAttrs,!_tlIerrors,!_tlIlocals,!_tlIoutput,!_tlIruleNames,!_tlIuniq) ->+ (case (({-# LINE 500 "src-ag/DefaultRules.ag" #-}+ _hdIdefinedAttrs `Set.union` _tlIdefinedAttrs+ {-# LINE 2980 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 2985 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}+ _hdIlocals `Set.union` _tlIlocals+ {-# LINE 2990 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOlocals ->+ (case (({-# LINE 589 "src-ag/DefaultRules.ag" #-}+ if _hdIcontainsVars && _hdIisPure then _hdIoutputs ++ _tlIoutput else _tlIoutput+ {-# LINE 2995 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ (case (({-# LINE 680 "src-ag/DefaultRules.ag" #-}+ _hdIruleNames `Set.union` _tlIruleNames+ {-# LINE 3000 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOruleNames ->+ (case (({-# LINE 561 "src-ag/DefaultRules.ag" #-}+ _tlIuniq+ {-# LINE 3005 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOuniq ->+ ( _lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_lhsOruleNames,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+sem_Rules_Nil :: T_Rules+sem_Rules_Nil =+ (T_Rules (\ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIoptions)+ (!_lhsIuniq) ->+ (case (({-# LINE 500 "src-ag/DefaultRules.ag" #-}+ Set.empty+ {-# LINE 3017 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 142 "src-ag/DefaultRules.ag" #-}+ Seq.empty+ {-# LINE 3022 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 499 "src-ag/DefaultRules.ag" #-}+ Set.empty+ {-# LINE 3027 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOlocals ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ []+ {-# LINE 3032 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 3037 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ (case (({-# LINE 680 "src-ag/DefaultRules.ag" #-}+ Set.empty+ {-# LINE 3042 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOruleNames ->+ (case (({-# LINE 561 "src-ag/DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 3047 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOuniq ->+ ( _lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_lhsOruleNames,_lhsOuniq) }) }) }) }) }) }) })))+-- TypeSig -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ nt : NontermIdent+ params : [Identifier]+ synthesized attribute:+ output : TypeSig + alternatives:+ alternative TypeSig:+ child name : {Identifier}+ child tp : {Type}+ visit 0:+ local tp1 : _+-}+-- cata+sem_TypeSig :: TypeSig ->+ T_TypeSig+sem_TypeSig !(TypeSig _name _tp) =+ (sem_TypeSig_TypeSig _name _tp)+-- semantic domain+newtype T_TypeSig = T_TypeSig (NontermIdent ->+ ([Identifier]) ->+ ( TypeSig))+data Inh_TypeSig = Inh_TypeSig {nt_Inh_TypeSig :: !(NontermIdent),params_Inh_TypeSig :: !(([Identifier]))}+data Syn_TypeSig = Syn_TypeSig {output_Syn_TypeSig :: !(TypeSig)}+wrap_TypeSig :: T_TypeSig ->+ Inh_TypeSig ->+ Syn_TypeSig+wrap_TypeSig !(T_TypeSig sem) !(Inh_TypeSig _lhsInt _lhsIparams) =+ (let ( !_lhsOoutput) = sem _lhsInt _lhsIparams+ in (Syn_TypeSig _lhsOoutput))+sem_TypeSig_TypeSig :: Identifier ->+ Type ->+ T_TypeSig+sem_TypeSig_TypeSig !name_ !tp_ =+ (T_TypeSig (\ (!_lhsInt)+ (!_lhsIparams) ->+ (case (({-# LINE 545 "src-ag/DefaultRules.ag" #-}+ elimSelfId _lhsInt _lhsIparams tp_+ {-# LINE 3091 "dist/build/DefaultRules" #-}+ )) of+ { !_tp1 ->+ (case (({-# LINE 586 "src-ag/DefaultRules.ag" #-}+ TypeSig name_ _tp1+ {-# LINE 3096 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOoutput) }) })))+-- TypeSigs ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ nt : NontermIdent+ params : [Identifier]+ synthesized attribute:+ output : TypeSigs + 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 (NontermIdent ->+ ([Identifier]) ->+ ( TypeSigs))+data Inh_TypeSigs = Inh_TypeSigs {nt_Inh_TypeSigs :: !(NontermIdent),params_Inh_TypeSigs :: !(([Identifier]))}+data Syn_TypeSigs = Syn_TypeSigs {output_Syn_TypeSigs :: !(TypeSigs)}+wrap_TypeSigs :: T_TypeSigs ->+ Inh_TypeSigs ->+ Syn_TypeSigs+wrap_TypeSigs !(T_TypeSigs sem) !(Inh_TypeSigs _lhsInt _lhsIparams) =+ (let ( !_lhsOoutput) = sem _lhsInt _lhsIparams+ in (Syn_TypeSigs _lhsOoutput))+sem_TypeSigs_Cons :: T_TypeSig ->+ T_TypeSigs ->+ T_TypeSigs+sem_TypeSigs_Cons !(T_TypeSig hd_) !(T_TypeSigs tl_) =+ (T_TypeSigs (\ (!_lhsInt)+ (!_lhsIparams) ->+ (case (({-# LINE 41 "src-ag/DefaultRules.ag" #-}+ _lhsIparams+ {-# LINE 3143 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOparams ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 3148 "dist/build/DefaultRules" #-}+ )) of+ { !_tlOnt ->+ (case (({-# LINE 41 "src-ag/DefaultRules.ag" #-}+ _lhsIparams+ {-# LINE 3153 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOparams ->+ (case (({-# LINE 38 "src-ag/DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 3158 "dist/build/DefaultRules" #-}+ )) of+ { !_hdOnt ->+ (case (tl_ _tlOnt _tlOparams) of+ { ( !_tlIoutput) ->+ (case (hd_ _hdOnt _hdOparams) of+ { ( !_hdIoutput) ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 3167 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 3172 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOoutput) }) }) }) }) }) }) }) })))+sem_TypeSigs_Nil :: T_TypeSigs+sem_TypeSigs_Nil =+ (T_TypeSigs (\ (!_lhsInt)+ (!_lhsIparams) ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ []+ {-# LINE 3182 "dist/build/DefaultRules" #-}+ )) of+ { !_output ->+ (case (({-# LINE 568 "src-ag/DefaultRules.ag" #-}+ _output+ {-# LINE 3187 "dist/build/DefaultRules" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOoutput) }) })))
src-derived/Desugar.hs view
@@ -1,3104 +1,3104 @@ {-# OPTIONS_GHC -XBangPatterns #-} --- UUAGC 0.9.39.1.0 (src-ag/Desugar.ag)-module Desugar where-{-# LINE 14 "src-ag/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 Data.Maybe-import Data.List(intersperse)--import AbstractSyntax-import ErrorMessages-import Options-import HsToken-import HsTokenScanner-import TokenDef-import CommonTypes-{-# LINE 24 "dist/build/uuagc/uuagc-tmp/Desugar.hs" #-}--{-# LINE 2 "src-ag/AbstractSyntax.ag" #-}---- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import Macro --marcos-import CommonTypes-import ErrorMessages-{-# LINE 36 "dist/build/uuagc/uuagc-tmp/Desugar.hs" #-}--{-# LINE 2 "src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 43 "dist/build/uuagc/uuagc-tmp/Desugar.hs" #-}--{-# LINE 2 "src-ag/Expression.ag" #-}--import UU.Scanner.Position(Pos)-import HsToken-{-# LINE 49 "dist/build/uuagc/uuagc-tmp/Desugar.hs" #-}--{-# LINE 2 "src-ag/HsToken.ag" #-}--import CommonTypes-import UU.Scanner.Position(Pos)-{-# LINE 55 "dist/build/uuagc/uuagc-tmp/Desugar.hs" #-}-{-# LINE 98 "src-ag/Desugar.ag" #-}--addl :: Int -> Pos -> Pos-addl n (Pos l c f) = Pos (l+n) c f-{-# LINE 60 "dist/build/uuagc/uuagc-tmp/Desugar.hs" #-}--{-# LINE 133 "src-ag/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 75 "dist/build/uuagc/uuagc-tmp/Desugar.hs" #-}--{-# LINE 204 "src-ag/Desugar.ag" #-}--mergeAttributes :: AttrMap -> AttrMap -> AttrMap-mergeAttributes = Map.unionWith $ Map.unionWith $ Set.union-{-# LINE 81 "dist/build/uuagc/uuagc-tmp/Desugar.hs" #-}--{-# LINE 251 "src-ag/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 107 "dist/build/uuagc/uuagc-tmp/Desugar.hs" #-}--{-# LINE 294 "src-ag/Desugar.ag" #-}--addLateAttr :: Options -> String -> Attributes-addLateAttr options mainName- | kennedyWarren options && lateHigherOrderBinding options =- let tp = lateBindingType mainName- in Map.singleton idLateBindingAttr tp- | otherwise = Map.empty-{-# LINE 117 "dist/build/uuagc/uuagc-tmp/Desugar.hs" #-}--- Child --------------------------------------------------------{-- visit 0:- inherited attributes:- inhMap : Map Identifier Attributes- mainName : String- options : Options- synMap : Map Identifier Attributes- synthesized attributes:- childInhs : [(Identifier, Identifier)]- childSyns : [(Identifier, Identifier)]- output : SELF - alternatives:- alternative Child:- child name : {Identifier}- child tp : {Type}- child kind : {ChildKind}- visit 0:- local chnt : _- local inh : _- local syn : _--}--- cata-sem_Child :: Child ->- T_Child -sem_Child !(Child _name _tp _kind ) =- (sem_Child_Child _name _tp _kind )--- semantic domain-newtype T_Child = T_Child ((Map Identifier Attributes) ->- String ->- Options ->- (Map Identifier Attributes) ->- ( ([(Identifier, Identifier)]),([(Identifier, Identifier)]),Child ))-data Inh_Child = Inh_Child {inhMap_Inh_Child :: !((Map Identifier Attributes)),mainName_Inh_Child :: !(String),options_Inh_Child :: !(Options),synMap_Inh_Child :: !((Map Identifier Attributes))}-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 _lhsIinhMap _lhsImainName _lhsIoptions _lhsIsynMap ) =- (let ( !_lhsOchildInhs,!_lhsOchildSyns,!_lhsOoutput) = sem _lhsIinhMap _lhsImainName _lhsIoptions _lhsIsynMap - in (Syn_Child _lhsOchildInhs _lhsOchildSyns _lhsOoutput ))-sem_Child_Child :: Identifier ->- Type ->- ChildKind ->- T_Child -sem_Child_Child !name_ !tp_ !kind_ =- (T_Child (\ (!_lhsIinhMap)- (!_lhsImainName)- (!_lhsIoptions)- (!_lhsIsynMap) ->- (case (({-# LINE 19 "src-ag/DistChildAttr.ag" #-}- case tp_ of- NT nt _ _ -> nt- Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")- Haskell t -> identifier t- {-# LINE 173 "src-ag/Desugar.hs" #-}- )) of- { !_chnt ->- (case (({-# LINE 23 "src-ag/DistChildAttr.ag" #-}- Map.findWithDefault Map.empty _chnt _lhsIinhMap- {-# LINE 178 "src-ag/Desugar.hs" #-}- )) of- { !_inh ->- (case (({-# LINE 130 "src-ag/Desugar.ag" #-}- [(i, name_) | i <- Map.keys _inh ]- {-# LINE 183 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOchildInhs ->- (case (({-# LINE 24 "src-ag/DistChildAttr.ag" #-}- Map.findWithDefault Map.empty _chnt _lhsIsynMap- {-# LINE 188 "src-ag/Desugar.hs" #-}- )) of- { !_syn ->- (case (({-# LINE 131 "src-ag/Desugar.ag" #-}- [(s, name_) | s <- Map.keys _syn ]- {-# LINE 193 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOchildSyns ->- (case (({-# LINE 315 "src-ag/Desugar.ag" #-}- Child name_ tp_ kind_- {-# LINE 198 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOchildInhs,_lhsOchildSyns,_lhsOoutput) }) }) }) }) }) })) )--- Children -----------------------------------------------------{-- visit 0:- inherited attributes:- inhMap : Map Identifier Attributes- mainName : String- options : Options- synMap : Map Identifier Attributes- 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 ((Map Identifier Attributes) ->- String ->- Options ->- (Map Identifier Attributes) ->- ( ([(Identifier, Identifier)]),([(Identifier, Identifier)]),Children ))-data Inh_Children = Inh_Children {inhMap_Inh_Children :: !((Map Identifier Attributes)),mainName_Inh_Children :: !(String),options_Inh_Children :: !(Options),synMap_Inh_Children :: !((Map Identifier Attributes))}-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 _lhsIinhMap _lhsImainName _lhsIoptions _lhsIsynMap ) =- (let ( !_lhsOchildInhs,!_lhsOchildSyns,!_lhsOoutput) = sem _lhsIinhMap _lhsImainName _lhsIoptions _lhsIsynMap - 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 (\ (!_lhsIinhMap)- (!_lhsImainName)- (!_lhsIoptions)- (!_lhsIsynMap) ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 253 "src-ag/Desugar.hs" #-}- )) of- { !_tlOinhMap ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 258 "src-ag/Desugar.hs" #-}- )) of- { !_hdOinhMap ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 263 "src-ag/Desugar.hs" #-}- )) of- { !_tlOsynMap ->- (case (({-# LINE 36 "src-ag/Desugar.ag" #-}- _lhsIoptions- {-# LINE 268 "src-ag/Desugar.hs" #-}- )) of- { !_tlOoptions ->- (case (({-# LINE 289 "src-ag/Desugar.ag" #-}- _lhsImainName- {-# LINE 273 "src-ag/Desugar.hs" #-}- )) of- { !_tlOmainName ->- (case (tl_ _tlOinhMap _tlOmainName _tlOoptions _tlOsynMap ) of- { ( !_tlIchildInhs,!_tlIchildSyns,!_tlIoutput) ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 280 "src-ag/Desugar.hs" #-}- )) of- { !_hdOsynMap ->- (case (({-# LINE 36 "src-ag/Desugar.ag" #-}- _lhsIoptions- {-# LINE 285 "src-ag/Desugar.hs" #-}- )) of- { !_hdOoptions ->- (case (({-# LINE 289 "src-ag/Desugar.ag" #-}- _lhsImainName- {-# LINE 290 "src-ag/Desugar.hs" #-}- )) of- { !_hdOmainName ->- (case (hd_ _hdOinhMap _hdOmainName _hdOoptions _hdOsynMap ) of- { ( !_hdIchildInhs,!_hdIchildSyns,!_hdIoutput) ->- (case (({-# LINE 125 "src-ag/Desugar.ag" #-}- _hdIchildInhs ++ _tlIchildInhs- {-# LINE 297 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOchildInhs ->- (case (({-# LINE 125 "src-ag/Desugar.ag" #-}- _hdIchildSyns ++ _tlIchildSyns- {-# LINE 302 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOchildSyns ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 307 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 312 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOchildInhs,_lhsOchildSyns,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Children_Nil :: T_Children -sem_Children_Nil =- (T_Children (\ (!_lhsIinhMap)- (!_lhsImainName)- (!_lhsIoptions)- (!_lhsIsynMap) ->- (case (({-# LINE 125 "src-ag/Desugar.ag" #-}- []- {-# LINE 324 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOchildInhs ->- (case (({-# LINE 125 "src-ag/Desugar.ag" #-}- []- {-# LINE 329 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOchildSyns ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- []- {-# LINE 334 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 339 "src-ag/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 49 "src-ag/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 406 "src-ag/Desugar.hs" #-}- )) of- { !__tup1 ->- (case (({-# LINE 49 "src-ag/Desugar.ag" #-}- __tup1- {-# LINE 411 "src-ag/Desugar.hs" #-}- )) of- { !(_,!_lhsOerrors) ->- (case (({-# LINE 49 "src-ag/Desugar.ag" #-}- __tup1- {-# LINE 416 "src-ag/Desugar.hs" #-}- )) of- { !(!_tks',_) ->- (case (({-# LINE 59 "src-ag/Desugar.ag" #-}- Expression pos_ _tks'- {-# LINE 421 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOerrors,_lhsOoutput) }) }) }) })) )--- Grammar ------------------------------------------------------{-- visit 0:- inherited attributes:- forcedIrrefutables : AttrMap- mainName : String- 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 quantMap : {QuantMap}- child uniqueMap : {UniqueMap}- child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}--}--- cata-sem_Grammar :: Grammar ->- T_Grammar -sem_Grammar !(Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap ) =- (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap )--- semantic domain-newtype T_Grammar = T_Grammar (AttrMap ->- String ->- Options ->- ( AttrMap,(Seq Error),Grammar ))-data Inh_Grammar = Inh_Grammar {forcedIrrefutables_Inh_Grammar :: !(AttrMap),mainName_Inh_Grammar :: !(String),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 _lhsImainName _lhsIoptions ) =- (let ( !_lhsOallAttributes,!_lhsOerrors,!_lhsOoutput) = sem _lhsIforcedIrrefutables _lhsImainName _lhsIoptions - in (Syn_Grammar _lhsOallAttributes _lhsOerrors _lhsOoutput ))-sem_Grammar_Grammar :: TypeSyns ->- UseMap ->- Derivings ->- (Set NontermIdent) ->- T_Nonterminals ->- PragmaMap ->- AttrOrderMap ->- ParamMap ->- ContextMap ->- QuantMap ->- UniqueMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->- T_Grammar -sem_Grammar_Grammar !typeSyns_ !useMap_ !derivings_ !wrappers_ !(T_Nonterminals nonts_ ) !pragmas_ !manualAttrOrderMap_ !paramMap_ !contextMap_ !quantMap_ !uniqueMap_ !augmentsMap_ !aroundsMap_ !mergeMap_ =- (T_Grammar (\ (!_lhsIforcedIrrefutables)- (!_lhsImainName)- (!_lhsIoptions) ->- (case (nonts_ ) of- { ( !_nontsIinhMap',!_nontsIsynMap',!T_Nonterminals_1 nonts_1) ->- (case (({-# LINE 36 "src-ag/Desugar.ag" #-}- _lhsIoptions- {-# LINE 494 "src-ag/Desugar.hs" #-}- )) of- { !_nontsOoptions ->- (case (({-# LINE 289 "src-ag/Desugar.ag" #-}- _lhsImainName- {-# LINE 499 "src-ag/Desugar.hs" #-}- )) of- { !_nontsOmainName ->- (case (({-# LINE 215 "src-ag/Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 504 "src-ag/Desugar.hs" #-}- )) of- { !_nontsOforcedIrrefutables ->- (case (({-# LINE 16 "src-ag/DistChildAttr.ag" #-}- _nontsIsynMap'- {-# LINE 509 "src-ag/Desugar.hs" #-}- )) of- { !_nontsOsynMap ->- (case (({-# LINE 15 "src-ag/DistChildAttr.ag" #-}- _nontsIinhMap'- {-# LINE 514 "src-ag/Desugar.hs" #-}- )) of- { !_nontsOinhMap ->- (case (({-# LINE 235 "src-ag/Desugar.ag" #-}- augmentsMap_- {-# LINE 519 "src-ag/Desugar.hs" #-}- )) of- { !_nontsOaugmentsIn ->- (case (nonts_1 _nontsOaugmentsIn _nontsOforcedIrrefutables _nontsOinhMap _nontsOmainName _nontsOoptions _nontsOsynMap ) of- { ( !_nontsIallAttributes,!_nontsIaugmentsOut,!_nontsIerrors,!_nontsIoutput) ->- (case (({-# LINE 196 "src-ag/Desugar.ag" #-}- _nontsIallAttributes- {-# LINE 526 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOallAttributes ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- _nontsIerrors- {-# LINE 531 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 319 "src-ag/Desugar.ag" #-}- Grammar typeSyns_- useMap_- derivings_- wrappers_- _nontsIoutput- pragmas_- manualAttrOrderMap_- paramMap_- contextMap_- quantMap_- uniqueMap_- _nontsIaugmentsOut- aroundsMap_- mergeMap_- {-# LINE 549 "src-ag/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 79 "src-ag/Desugar.ag" #-}- findField field_ attr_ _lhsIchildSyns- {-# LINE 652 "src-ag/Desugar.hs" #-}- )) of- { !_mField ->- (case (({-# LINE 81 "src-ag/Desugar.ag" #-}- maybe field_ id _mField- {-# LINE 657 "src-ag/Desugar.hs" #-}- )) of- { !_field' ->- (case (({-# LINE 84 "src-ag/Desugar.ag" #-}- if _lhsIuseFieldIdent || length (getName field_) < length (getName _field' )- then _lhsIaddLines + 1- else _lhsIaddLines- {-# LINE 664 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOaddLines ->- (case (({-# LINE 82 "src-ag/Desugar.ag" #-}- maybe (Seq.singleton (UndefAttr _lhsInt _lhsIcon field_ (Ident "<ANY>" (getPos field_)) False)) (const Seq.empty) _mField- {-# LINE 669 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 88 "src-ag/Desugar.ag" #-}- AGField _field' attr_ (addl _lhsIaddLines pos_) (if _lhsIuseFieldIdent then Just _lhsIruleDescr else Nothing)- {-# LINE 674 "src-ag/Desugar.hs" #-}- )) of- { !_tks ->- (case (({-# LINE 70 "src-ag/Desugar.ag" #-}- _tks- {-# LINE 679 "src-ag/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 74 "src-ag/Desugar.ag" #-}- if _lhsIuseFieldIdent- then _lhsIaddLines + 1- else _lhsIaddLines- {-# LINE 699 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOaddLines ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- Seq.empty- {-# LINE 704 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 77 "src-ag/Desugar.ag" #-}- AGLocal var_ (addl _lhsIaddLines pos_) (if _lhsIuseFieldIdent then Just _lhsIruleDescr else Nothing)- {-# LINE 709 "src-ag/Desugar.hs" #-}- )) of- { !_tks ->- (case (({-# LINE 70 "src-ag/Desugar.ag" #-}- _tks- {-# LINE 714 "src-ag/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 64 "src-ag/Desugar.ag" #-}- _lhsIaddLines- {-# LINE 731 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOaddLines ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- Seq.empty- {-# LINE 736 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 92 "src-ag/Desugar.ag" #-}- CharToken value_ (addl _lhsIaddLines pos_)- {-# LINE 741 "src-ag/Desugar.hs" #-}- )) of- { !_tks ->- (case (({-# LINE 70 "src-ag/Desugar.ag" #-}- _tks- {-# LINE 746 "src-ag/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 64 "src-ag/Desugar.ag" #-}- _lhsIaddLines- {-# LINE 763 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOaddLines ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- Seq.empty- {-# LINE 768 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 96 "src-ag/Desugar.ag" #-}- Err mesg_ (addl _lhsIaddLines pos_)- {-# LINE 773 "src-ag/Desugar.hs" #-}- )) of- { !_tks ->- (case (({-# LINE 70 "src-ag/Desugar.ag" #-}- _tks- {-# LINE 778 "src-ag/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 64 "src-ag/Desugar.ag" #-}- _lhsIaddLines- {-# LINE 795 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOaddLines ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- Seq.empty- {-# LINE 800 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 90 "src-ag/Desugar.ag" #-}- HsToken value_ (addl _lhsIaddLines pos_)- {-# LINE 805 "src-ag/Desugar.hs" #-}- )) of- { !_tks ->- (case (({-# LINE 70 "src-ag/Desugar.ag" #-}- _tks- {-# LINE 810 "src-ag/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 64 "src-ag/Desugar.ag" #-}- _lhsIaddLines- {-# LINE 827 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOaddLines ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- Seq.empty- {-# LINE 832 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 94 "src-ag/Desugar.ag" #-}- StrToken value_ (addl _lhsIaddLines pos_)- {-# LINE 837 "src-ag/Desugar.hs" #-}- )) of- { !_tks ->- (case (({-# LINE 70 "src-ag/Desugar.ag" #-}- _tks- {-# LINE 842 "src-ag/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 62 "src-ag/Desugar.ag" #-}- _lhsIuseFieldIdent- {-# LINE 906 "src-ag/Desugar.hs" #-}- )) of- { !_tlOuseFieldIdent ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 911 "src-ag/Desugar.hs" #-}- )) of- { !_tlOchildSyns ->- (case (({-# LINE 62 "src-ag/Desugar.ag" #-}- _lhsIuseFieldIdent- {-# LINE 916 "src-ag/Desugar.hs" #-}- )) of- { !_hdOuseFieldIdent ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 921 "src-ag/Desugar.hs" #-}- )) of- { !_hdOchildSyns ->- (case (({-# LINE 64 "src-ag/Desugar.ag" #-}- _lhsIaddLines- {-# LINE 926 "src-ag/Desugar.hs" #-}- )) of- { !_hdOaddLines ->- (case (({-# LINE 168 "src-ag/Desugar.ag" #-}- _lhsIruleDescr- {-# LINE 931 "src-ag/Desugar.hs" #-}- )) of- { !_hdOruleDescr ->- (case (({-# LINE 152 "src-ag/Desugar.ag" #-}- _lhsInt- {-# LINE 936 "src-ag/Desugar.hs" #-}- )) of- { !_hdOnt ->- (case (({-# LINE 153 "src-ag/Desugar.ag" #-}- _lhsIcon- {-# LINE 941 "src-ag/Desugar.hs" #-}- )) of- { !_hdOcon ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 946 "src-ag/Desugar.hs" #-}- )) of- { !_hdOchildInhs ->- (case (hd_ _hdOaddLines _hdOchildInhs _hdOchildSyns _hdOcon _hdOnt _hdOruleDescr _hdOuseFieldIdent ) of- { ( !_hdIaddLines,!_hdIerrors,!_hdItks) ->- (case (({-# LINE 64 "src-ag/Desugar.ag" #-}- _hdIaddLines- {-# LINE 953 "src-ag/Desugar.hs" #-}- )) of- { !_tlOaddLines ->- (case (({-# LINE 168 "src-ag/Desugar.ag" #-}- _lhsIruleDescr- {-# LINE 958 "src-ag/Desugar.hs" #-}- )) of- { !_tlOruleDescr ->- (case (({-# LINE 152 "src-ag/Desugar.ag" #-}- _lhsInt- {-# LINE 963 "src-ag/Desugar.hs" #-}- )) of- { !_tlOnt ->- (case (({-# LINE 153 "src-ag/Desugar.ag" #-}- _lhsIcon- {-# LINE 968 "src-ag/Desugar.hs" #-}- )) of- { !_tlOcon ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 973 "src-ag/Desugar.hs" #-}- )) of- { !_tlOchildInhs ->- (case (tl_ _tlOaddLines _tlOchildInhs _tlOchildSyns _tlOcon _tlOnt _tlOruleDescr _tlOuseFieldIdent ) of- { ( !_tlIaddLines,!_tlIerrors,!_tlItks) ->- (case (({-# LINE 64 "src-ag/Desugar.ag" #-}- _tlIaddLines- {-# LINE 980 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOaddLines ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 985 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 70 "src-ag/Desugar.ag" #-}- (:) _hdItks _tlItks- {-# LINE 990 "src-ag/Desugar.hs" #-}- )) of- { !_tks ->- (case (({-# LINE 70 "src-ag/Desugar.ag" #-}- _tks- {-# LINE 995 "src-ag/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 64 "src-ag/Desugar.ag" #-}- _lhsIaddLines- {-# LINE 1010 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOaddLines ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- Seq.empty- {-# LINE 1015 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 70 "src-ag/Desugar.ag" #-}- []- {-# LINE 1020 "src-ag/Desugar.hs" #-}- )) of- { !_tks ->- (case (({-# LINE 70 "src-ag/Desugar.ag" #-}- _tks- {-# LINE 1025 "src-ag/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 152 "src-ag/Desugar.ag" #-}- _lhsInt- {-# LINE 1078 "src-ag/Desugar.hs" #-}- )) of- { !_tokensOnt ->- (case (({-# LINE 153 "src-ag/Desugar.ag" #-}- _lhsIcon- {-# LINE 1083 "src-ag/Desugar.hs" #-}- )) of- { !_tokensOcon ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 1088 "src-ag/Desugar.hs" #-}- )) of- { !_tokensOchildSyns ->- (case (({-# LINE 62 "src-ag/Desugar.ag" #-}- _lhsIuseFieldIdent- {-# LINE 1093 "src-ag/Desugar.hs" #-}- )) of- { !_tokensOuseFieldIdent ->- (case (({-# LINE 168 "src-ag/Desugar.ag" #-}- _lhsIruleDescr- {-# LINE 1098 "src-ag/Desugar.hs" #-}- )) of- { !_tokensOruleDescr ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 1103 "src-ag/Desugar.hs" #-}- )) of- { !_tokensOchildInhs ->- (case (({-# LINE 67 "src-ag/Desugar.ag" #-}- 0- {-# LINE 1108 "src-ag/Desugar.hs" #-}- )) of- { !_tokensOaddLines ->- (case (tokens_ _tokensOaddLines _tokensOchildInhs _tokensOchildSyns _tokensOcon _tokensOnt _tokensOruleDescr _tokensOuseFieldIdent ) of- { ( !_tokensIaddLines,!_tokensIerrors,!_tokensItks) ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- _tokensIerrors- {-# LINE 1115 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 69 "src-ag/Desugar.ag" #-}- _tokensItks- {-# LINE 1120 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOtks ->- ( _lhsOerrors,_lhsOtks) }) }) }) }) }) }) }) }) }) })) )--- Nonterminal --------------------------------------------------{-- visit 0:- synthesized attributes:- inhMap' : Map Identifier Attributes- synMap' : Map Identifier Attributes- visit 1:- inherited attributes:- augmentsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- forcedIrrefutables : AttrMap- inhMap : Map Identifier Attributes- mainName : String- options : Options- synMap : Map Identifier Attributes- 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 1:- local augmentsIn : _- local augmentsOut : _- local extraInh : _--}--- 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 Identifier Attributes),(Map Identifier Attributes),T_Nonterminal_1 ))-newtype T_Nonterminal_1 = T_Nonterminal_1 ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- AttrMap ->- (Map Identifier Attributes) ->- String ->- Options ->- (Map Identifier Attributes) ->- ( 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),inhMap_Inh_Nonterminal :: !((Map Identifier Attributes)),mainName_Inh_Nonterminal :: !(String),options_Inh_Nonterminal :: !(Options),synMap_Inh_Nonterminal :: !((Map Identifier Attributes))}-data Syn_Nonterminal = Syn_Nonterminal {allAttributes_Syn_Nonterminal :: !(AttrMap),augmentsOut_Syn_Nonterminal :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))),errors_Syn_Nonterminal :: !((Seq Error)),inhMap'_Syn_Nonterminal :: !((Map Identifier Attributes)),output_Syn_Nonterminal :: !(Nonterminal ),synMap'_Syn_Nonterminal :: !((Map Identifier Attributes))}-wrap_Nonterminal :: T_Nonterminal ->- Inh_Nonterminal ->- Syn_Nonterminal -wrap_Nonterminal !(T_Nonterminal sem ) !(Inh_Nonterminal _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIinhMap _lhsImainName _lhsIoptions _lhsIsynMap ) =- (let ( !_lhsOinhMap',!_lhsOsynMap',!T_Nonterminal_1 sem_1) = sem - ( !_lhsOallAttributes,!_lhsOaugmentsOut,!_lhsOerrors,!_lhsOoutput) = sem_1 _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIinhMap _lhsImainName _lhsIoptions _lhsIsynMap - in (Syn_Nonterminal _lhsOallAttributes _lhsOaugmentsOut _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' ))-sem_Nonterminal_Nonterminal :: NontermIdent ->- ([Identifier]) ->- Attributes ->- Attributes ->- T_Productions ->- T_Nonterminal -sem_Nonterminal_Nonterminal !nt_ !params_ !inh_ !syn_ !(T_Productions prods_ ) =- (T_Nonterminal (case (({-# LINE 7 "src-ag/DistChildAttr.ag" #-}- Map.singleton nt_ inh_- {-# LINE 1187 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOinhMap' ->- (case (({-# LINE 8 "src-ag/DistChildAttr.ag" #-}- Map.singleton nt_ syn_- {-# LINE 1192 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOsynMap' ->- (case ((let sem_Nonterminal_Nonterminal_1 :: T_Nonterminal_1 - sem_Nonterminal_Nonterminal_1 =- (T_Nonterminal_1 (\ (!_lhsIaugmentsIn)- (!_lhsIforcedIrrefutables)- (!_lhsIinhMap)- (!_lhsImainName)- (!_lhsIoptions)- (!_lhsIsynMap) ->- (case (({-# LINE 157 "src-ag/Desugar.ag" #-}- nt_- {-# LINE 1205 "src-ag/Desugar.hs" #-}- )) of- { !_prodsOnt ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 1210 "src-ag/Desugar.hs" #-}- )) of- { !_prodsOsynMap ->- (case (({-# LINE 36 "src-ag/Desugar.ag" #-}- _lhsIoptions- {-# LINE 1215 "src-ag/Desugar.hs" #-}- )) of- { !_prodsOoptions ->- (case (({-# LINE 289 "src-ag/Desugar.ag" #-}- _lhsImainName- {-# LINE 1220 "src-ag/Desugar.hs" #-}- )) of- { !_prodsOmainName ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 1225 "src-ag/Desugar.hs" #-}- )) of- { !_prodsOinhMap ->- (case (({-# LINE 215 "src-ag/Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 1230 "src-ag/Desugar.hs" #-}- )) of- { !_prodsOforcedIrrefutables ->- (case (({-# LINE 239 "src-ag/Desugar.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIaugmentsIn- {-# LINE 1235 "src-ag/Desugar.hs" #-}- )) of- { !_augmentsIn ->- (case (({-# LINE 230 "src-ag/Desugar.ag" #-}- _augmentsIn- {-# LINE 1240 "src-ag/Desugar.hs" #-}- )) of- { !_prodsOaugmentsIn ->- (case (prods_ _prodsOaugmentsIn _prodsOforcedIrrefutables _prodsOinhMap _prodsOmainName _prodsOnt _prodsOoptions _prodsOsynMap ) of- { ( !_prodsIallAttributes,!_prodsIaugmentsOut,!_prodsIerrors,!_prodsIoutput) ->- (case (({-# LINE 196 "src-ag/Desugar.ag" #-}- _prodsIallAttributes- {-# LINE 1247 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOallAttributes ->- (case (({-# LINE 240 "src-ag/Desugar.ag" #-}- Map.singleton nt_ _prodsIaugmentsOut- {-# LINE 1252 "src-ag/Desugar.hs" #-}- )) of- { !_augmentsOut ->- (case (({-# LINE 229 "src-ag/Desugar.ag" #-}- _augmentsOut- {-# LINE 1257 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOaugmentsOut ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- _prodsIerrors- {-# LINE 1262 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 292 "src-ag/Desugar.ag" #-}- addLateAttr _lhsIoptions _lhsImainName- {-# LINE 1267 "src-ag/Desugar.hs" #-}- )) of- { !_extraInh ->- (case (({-# LINE 308 "src-ag/Desugar.ag" #-}- Nonterminal- nt_ params_- (_extraInh `Map.union` inh_)- syn_- _prodsIoutput- {-# LINE 1276 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )- in sem_Nonterminal_Nonterminal_1)) of- { ( !sem_Nonterminal_1) ->- ( _lhsOinhMap',_lhsOsynMap',sem_Nonterminal_1) }) }) }) )--- Nonterminals -------------------------------------------------{-- visit 0:- synthesized attributes:- inhMap' : Map Identifier Attributes- synMap' : Map Identifier Attributes- visit 1:- inherited attributes:- augmentsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- forcedIrrefutables : AttrMap- inhMap : Map Identifier Attributes- mainName : String- options : Options- synMap : Map Identifier Attributes- 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 1:- local output : _- alternative Nil:- visit 1:- local output : _--}--- cata-sem_Nonterminals :: Nonterminals ->- T_Nonterminals -sem_Nonterminals !list =- (Prelude.foldr sem_Nonterminals_Cons sem_Nonterminals_Nil (Prelude.map sem_Nonterminal list) )--- semantic domain-newtype T_Nonterminals = T_Nonterminals (( (Map Identifier Attributes),(Map Identifier Attributes),T_Nonterminals_1 ))-newtype T_Nonterminals_1 = T_Nonterminals_1 ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- AttrMap ->- (Map Identifier Attributes) ->- String ->- Options ->- (Map Identifier Attributes) ->- ( 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),inhMap_Inh_Nonterminals :: !((Map Identifier Attributes)),mainName_Inh_Nonterminals :: !(String),options_Inh_Nonterminals :: !(Options),synMap_Inh_Nonterminals :: !((Map Identifier Attributes))}-data Syn_Nonterminals = Syn_Nonterminals {allAttributes_Syn_Nonterminals :: !(AttrMap),augmentsOut_Syn_Nonterminals :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))),errors_Syn_Nonterminals :: !((Seq Error)),inhMap'_Syn_Nonterminals :: !((Map Identifier Attributes)),output_Syn_Nonterminals :: !(Nonterminals ),synMap'_Syn_Nonterminals :: !((Map Identifier Attributes))}-wrap_Nonterminals :: T_Nonterminals ->- Inh_Nonterminals ->- Syn_Nonterminals -wrap_Nonterminals !(T_Nonterminals sem ) !(Inh_Nonterminals _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIinhMap _lhsImainName _lhsIoptions _lhsIsynMap ) =- (let ( !_lhsOinhMap',!_lhsOsynMap',!T_Nonterminals_1 sem_1) = sem - ( !_lhsOallAttributes,!_lhsOaugmentsOut,!_lhsOerrors,!_lhsOoutput) = sem_1 _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIinhMap _lhsImainName _lhsIoptions _lhsIsynMap - in (Syn_Nonterminals _lhsOallAttributes _lhsOaugmentsOut _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' ))-sem_Nonterminals_Cons :: T_Nonterminal ->- T_Nonterminals ->- T_Nonterminals -sem_Nonterminals_Cons !(T_Nonterminal hd_ ) !(T_Nonterminals tl_ ) =- (T_Nonterminals (case (tl_ ) of- { ( !_tlIinhMap',!_tlIsynMap',!T_Nonterminals_1 tl_1) ->- (case (hd_ ) of- { ( !_hdIinhMap',!_hdIsynMap',!T_Nonterminal_1 hd_1) ->- (case (({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- _hdIinhMap' `Map.union` _tlIinhMap'- {-# LINE 1345 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOinhMap' ->- (case (({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- _hdIsynMap' `Map.union` _tlIsynMap'- {-# LINE 1350 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOsynMap' ->- (case ((let sem_Nonterminals_Cons_1 :: T_Nonterminals_1 - sem_Nonterminals_Cons_1 =- (T_Nonterminals_1 (\ (!_lhsIaugmentsIn)- (!_lhsIforcedIrrefutables)- (!_lhsIinhMap)- (!_lhsImainName)- (!_lhsIoptions)- (!_lhsIsynMap) ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 1363 "src-ag/Desugar.hs" #-}- )) of- { !_tlOsynMap ->- (case (({-# LINE 36 "src-ag/Desugar.ag" #-}- _lhsIoptions- {-# LINE 1368 "src-ag/Desugar.hs" #-}- )) of- { !_tlOoptions ->- (case (({-# LINE 289 "src-ag/Desugar.ag" #-}- _lhsImainName- {-# LINE 1373 "src-ag/Desugar.hs" #-}- )) of- { !_tlOmainName ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 1378 "src-ag/Desugar.hs" #-}- )) of- { !_tlOinhMap ->- (case (({-# LINE 215 "src-ag/Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 1383 "src-ag/Desugar.hs" #-}- )) of- { !_tlOforcedIrrefutables ->- (case (({-# LINE 228 "src-ag/Desugar.ag" #-}- _lhsIaugmentsIn- {-# LINE 1388 "src-ag/Desugar.hs" #-}- )) of- { !_tlOaugmentsIn ->- (case (tl_1 _tlOaugmentsIn _tlOforcedIrrefutables _tlOinhMap _tlOmainName _tlOoptions _tlOsynMap ) of- { ( !_tlIallAttributes,!_tlIaugmentsOut,!_tlIerrors,!_tlIoutput) ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 1395 "src-ag/Desugar.hs" #-}- )) of- { !_hdOsynMap ->- (case (({-# LINE 36 "src-ag/Desugar.ag" #-}- _lhsIoptions- {-# LINE 1400 "src-ag/Desugar.hs" #-}- )) of- { !_hdOoptions ->- (case (({-# LINE 289 "src-ag/Desugar.ag" #-}- _lhsImainName- {-# LINE 1405 "src-ag/Desugar.hs" #-}- )) of- { !_hdOmainName ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 1410 "src-ag/Desugar.hs" #-}- )) of- { !_hdOinhMap ->- (case (({-# LINE 215 "src-ag/Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 1415 "src-ag/Desugar.hs" #-}- )) of- { !_hdOforcedIrrefutables ->- (case (({-# LINE 228 "src-ag/Desugar.ag" #-}- _lhsIaugmentsIn- {-# LINE 1420 "src-ag/Desugar.hs" #-}- )) of- { !_hdOaugmentsIn ->- (case (hd_1 _hdOaugmentsIn _hdOforcedIrrefutables _hdOinhMap _hdOmainName _hdOoptions _hdOsynMap ) of- { ( !_hdIallAttributes,!_hdIaugmentsOut,!_hdIerrors,!_hdIoutput) ->- (case (({-# LINE 196 "src-ag/Desugar.ag" #-}- _hdIallAttributes `mergeAttributes` _tlIallAttributes- {-# LINE 1427 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOallAttributes ->- (case (({-# LINE 229 "src-ag/Desugar.ag" #-}- _hdIaugmentsOut `Map.union` _tlIaugmentsOut- {-# LINE 1432 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOaugmentsOut ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 1437 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 1442 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 1447 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )- in sem_Nonterminals_Cons_1)) of- { ( !sem_Nonterminals_1) ->- ( _lhsOinhMap',_lhsOsynMap',sem_Nonterminals_1) }) }) }) }) }) )-sem_Nonterminals_Nil :: T_Nonterminals -sem_Nonterminals_Nil =- (T_Nonterminals (case (({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- Map.empty- {-# LINE 1458 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOinhMap' ->- (case (({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- Map.empty- {-# LINE 1463 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOsynMap' ->- (case ((let sem_Nonterminals_Nil_1 :: T_Nonterminals_1 - sem_Nonterminals_Nil_1 =- (T_Nonterminals_1 (\ (!_lhsIaugmentsIn)- (!_lhsIforcedIrrefutables)- (!_lhsIinhMap)- (!_lhsImainName)- (!_lhsIoptions)- (!_lhsIsynMap) ->- (case (({-# LINE 196 "src-ag/Desugar.ag" #-}- Map.empty- {-# LINE 1476 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOallAttributes ->- (case (({-# LINE 229 "src-ag/Desugar.ag" #-}- Map.empty- {-# LINE 1481 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOaugmentsOut ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- Seq.empty- {-# LINE 1486 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- []- {-# LINE 1491 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 1496 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) })) )- in sem_Nonterminals_Nil_1)) of- { ( !sem_Nonterminals_1) ->- ( _lhsOinhMap',_lhsOsynMap',sem_Nonterminals_1) }) }) }) )--- 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 - 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 ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) )-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_Pattern -sem_Pattern_Alias !field_ !attr_ !(T_Pattern pat_ ) =- (T_Pattern (case (({-# LINE 182 "src-ag/Desugar.ag" #-}- Set.singleton (field_, attr_)- {-# LINE 1596 "src-ag/Desugar.hs" #-}- )) of- { !_def ->- (case (pat_ ) of- { ( !_patIdefsCollect,!T_Pattern_1 pat_1) ->- (case (({-# LINE 183 "src-ag/Desugar.ag" #-}- _def `Set.union` _patIdefsCollect- {-# LINE 1603 "src-ag/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 152 "src-ag/Desugar.ag" #-}- _lhsInt- {-# LINE 1616 "src-ag/Desugar.hs" #-}- )) of- { !_patOnt ->- (case (({-# LINE 153 "src-ag/Desugar.ag" #-}- _lhsIcon- {-# LINE 1621 "src-ag/Desugar.hs" #-}- )) of- { !_patOcon ->- (case (({-# LINE 215 "src-ag/Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 1626 "src-ag/Desugar.hs" #-}- )) of- { !_patOforcedIrrefutables ->- (case (({-# LINE 185 "src-ag/Desugar.ag" #-}- _lhsIdefs- {-# LINE 1631 "src-ag/Desugar.hs" #-}- )) of- { !_patOdefs ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 1636 "src-ag/Desugar.hs" #-}- )) of- { !_patOchildSyns ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 1641 "src-ag/Desugar.hs" #-}- )) of- { !_patOchildInhs ->- (case (pat_1 _patOchildInhs _patOchildSyns _patOcon _patOdefs _patOforcedIrrefutables _patOnt ) of- { ( !_patIallAttributes,!_patIcopy,!_patIerrors,!_patIoutput) ->- (case (({-# LINE 200 "src-ag/Desugar.ag" #-}- (Map.singleton _lhsInt $ Map.singleton _lhsIcon $ Set.singleton (field_, attr_)) `mergeAttributes` _patIallAttributes- {-# LINE 1648 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOallAttributes ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Alias field_ attr_ _patIcopy- {-# LINE 1653 "src-ag/Desugar.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1658 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 110 "src-ag/Desugar.ag" #-}- maybeError field_ (UndefAttr _lhsInt _lhsIcon (Ident "<ANY>" (getPos field_)) attr_ True) $- findField field_ attr_ _lhsIchildInhs- {-# LINE 1664 "src-ag/Desugar.hs" #-}- )) of- { !__tup2 ->- (case (({-# LINE 110 "src-ag/Desugar.ag" #-}- __tup2- {-# LINE 1669 "src-ag/Desugar.hs" #-}- )) of- { !(!_field',_) ->- (case (({-# LINE 112 "src-ag/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 1678 "src-ag/Desugar.hs" #-}- )) of- { !_err2 ->- (case (({-# LINE 110 "src-ag/Desugar.ag" #-}- __tup2- {-# LINE 1683 "src-ag/Desugar.hs" #-}- )) of- { !(_,!_err1) ->- (case (({-# LINE 117 "src-ag/Desugar.ag" #-}- _err1 Seq.>< _err2 Seq.>< _patIerrors- {-# LINE 1688 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 118 "src-ag/Desugar.ag" #-}- Alias _field' attr_ _patIoutput- {-# LINE 1693 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 219 "src-ag/Desugar.ag" #-}- if Set.member (field_, attr_) $ Map.findWithDefault Set.empty _lhsIcon $ Map.findWithDefault Map.empty _lhsInt $ _lhsIforcedIrrefutables- then Irrefutable _output- else _output- {-# LINE 1700 "src-ag/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 179 "src-ag/Desugar.ag" #-}- _patsIdefsCollect- {-# LINE 1715 "src-ag/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 152 "src-ag/Desugar.ag" #-}- _lhsInt- {-# LINE 1728 "src-ag/Desugar.hs" #-}- )) of- { !_patsOnt ->- (case (({-# LINE 153 "src-ag/Desugar.ag" #-}- _lhsIcon- {-# LINE 1733 "src-ag/Desugar.hs" #-}- )) of- { !_patsOcon ->- (case (({-# LINE 215 "src-ag/Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 1738 "src-ag/Desugar.hs" #-}- )) of- { !_patsOforcedIrrefutables ->- (case (({-# LINE 185 "src-ag/Desugar.ag" #-}- _lhsIdefs- {-# LINE 1743 "src-ag/Desugar.hs" #-}- )) of- { !_patsOdefs ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 1748 "src-ag/Desugar.hs" #-}- )) of- { !_patsOchildSyns ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 1753 "src-ag/Desugar.hs" #-}- )) of- { !_patsOchildInhs ->- (case (pats_1 _patsOchildInhs _patsOchildSyns _patsOcon _patsOdefs _patsOforcedIrrefutables _patsOnt ) of- { ( !_patsIallAttributes,!_patsIcopy,!_patsIerrors,!_patsIoutput) ->- (case (({-# LINE 196 "src-ag/Desugar.ag" #-}- _patsIallAttributes- {-# LINE 1760 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOallAttributes ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 1765 "src-ag/Desugar.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1770 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- _patsIerrors- {-# LINE 1775 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- Constr name_ _patsIoutput- {-# LINE 1780 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 1785 "src-ag/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 179 "src-ag/Desugar.ag" #-}- _patIdefsCollect- {-# LINE 1799 "src-ag/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 202 "src-ag/Desugar.ag" #-}- Map.empty- {-# LINE 1812 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOallAttributes ->- (case (({-# LINE 152 "src-ag/Desugar.ag" #-}- _lhsInt- {-# LINE 1817 "src-ag/Desugar.hs" #-}- )) of- { !_patOnt ->- (case (({-# LINE 215 "src-ag/Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 1822 "src-ag/Desugar.hs" #-}- )) of- { !_patOforcedIrrefutables ->- (case (({-# LINE 185 "src-ag/Desugar.ag" #-}- _lhsIdefs- {-# LINE 1827 "src-ag/Desugar.hs" #-}- )) of- { !_patOdefs ->- (case (({-# LINE 153 "src-ag/Desugar.ag" #-}- _lhsIcon- {-# LINE 1832 "src-ag/Desugar.hs" #-}- )) of- { !_patOcon ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 1837 "src-ag/Desugar.hs" #-}- )) of- { !_patOchildSyns ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 1842 "src-ag/Desugar.hs" #-}- )) of- { !_patOchildInhs ->- (case (pat_1 _patOchildInhs _patOchildSyns _patOcon _patOdefs _patOforcedIrrefutables _patOnt ) of- { ( !_patIallAttributes,!_patIcopy,!_patIerrors,!_patIoutput) ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 1849 "src-ag/Desugar.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1854 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- _patIerrors- {-# LINE 1859 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- Irrefutable _patIoutput- {-# LINE 1864 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 1869 "src-ag/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 179 "src-ag/Desugar.ag" #-}- _patsIdefsCollect- {-# LINE 1884 "src-ag/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 152 "src-ag/Desugar.ag" #-}- _lhsInt- {-# LINE 1897 "src-ag/Desugar.hs" #-}- )) of- { !_patsOnt ->- (case (({-# LINE 153 "src-ag/Desugar.ag" #-}- _lhsIcon- {-# LINE 1902 "src-ag/Desugar.hs" #-}- )) of- { !_patsOcon ->- (case (({-# LINE 215 "src-ag/Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 1907 "src-ag/Desugar.hs" #-}- )) of- { !_patsOforcedIrrefutables ->- (case (({-# LINE 185 "src-ag/Desugar.ag" #-}- _lhsIdefs- {-# LINE 1912 "src-ag/Desugar.hs" #-}- )) of- { !_patsOdefs ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 1917 "src-ag/Desugar.hs" #-}- )) of- { !_patsOchildSyns ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 1922 "src-ag/Desugar.hs" #-}- )) of- { !_patsOchildInhs ->- (case (pats_1 _patsOchildInhs _patsOchildSyns _patsOcon _patsOdefs _patsOforcedIrrefutables _patsOnt ) of- { ( !_patsIallAttributes,!_patsIcopy,!_patsIerrors,!_patsIoutput) ->- (case (({-# LINE 196 "src-ag/Desugar.ag" #-}- _patsIallAttributes- {-# LINE 1929 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOallAttributes ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 1934 "src-ag/Desugar.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1939 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- _patsIerrors- {-# LINE 1944 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- Product pos_ _patsIoutput- {-# LINE 1949 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 1954 "src-ag/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 179 "src-ag/Desugar.ag" #-}- Set.empty- {-# LINE 1966 "src-ag/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 196 "src-ag/Desugar.ag" #-}- Map.empty- {-# LINE 1979 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOallAttributes ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Underscore pos_- {-# LINE 1984 "src-ag/Desugar.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1989 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- Seq.empty- {-# LINE 1994 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- Underscore pos_- {-# LINE 1999 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 2004 "src-ag/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 179 "src-ag/Desugar.ag" #-}- _hdIdefsCollect `Set.union` _tlIdefsCollect- {-# LINE 2074 "src-ag/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 152 "src-ag/Desugar.ag" #-}- _lhsInt- {-# LINE 2087 "src-ag/Desugar.hs" #-}- )) of- { !_tlOnt ->- (case (({-# LINE 153 "src-ag/Desugar.ag" #-}- _lhsIcon- {-# LINE 2092 "src-ag/Desugar.hs" #-}- )) of- { !_tlOcon ->- (case (({-# LINE 152 "src-ag/Desugar.ag" #-}- _lhsInt- {-# LINE 2097 "src-ag/Desugar.hs" #-}- )) of- { !_hdOnt ->- (case (({-# LINE 153 "src-ag/Desugar.ag" #-}- _lhsIcon- {-# LINE 2102 "src-ag/Desugar.hs" #-}- )) of- { !_hdOcon ->- (case (({-# LINE 215 "src-ag/Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 2107 "src-ag/Desugar.hs" #-}- )) of- { !_tlOforcedIrrefutables ->- (case (({-# LINE 185 "src-ag/Desugar.ag" #-}- _lhsIdefs- {-# LINE 2112 "src-ag/Desugar.hs" #-}- )) of- { !_tlOdefs ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 2117 "src-ag/Desugar.hs" #-}- )) of- { !_tlOchildSyns ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 2122 "src-ag/Desugar.hs" #-}- )) of- { !_tlOchildInhs ->- (case (tl_1 _tlOchildInhs _tlOchildSyns _tlOcon _tlOdefs _tlOforcedIrrefutables _tlOnt ) of- { ( !_tlIallAttributes,!_tlIcopy,!_tlIerrors,!_tlIoutput) ->- (case (({-# LINE 215 "src-ag/Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 2129 "src-ag/Desugar.hs" #-}- )) of- { !_hdOforcedIrrefutables ->- (case (({-# LINE 185 "src-ag/Desugar.ag" #-}- _lhsIdefs- {-# LINE 2134 "src-ag/Desugar.hs" #-}- )) of- { !_hdOdefs ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 2139 "src-ag/Desugar.hs" #-}- )) of- { !_hdOchildSyns ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 2144 "src-ag/Desugar.hs" #-}- )) of- { !_hdOchildInhs ->- (case (hd_1 _hdOchildInhs _hdOchildSyns _hdOcon _hdOdefs _hdOforcedIrrefutables _hdOnt ) of- { ( !_hdIallAttributes,!_hdIcopy,!_hdIerrors,!_hdIoutput) ->- (case (({-# LINE 196 "src-ag/Desugar.ag" #-}- _hdIallAttributes `mergeAttributes` _tlIallAttributes- {-# LINE 2151 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOallAttributes ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 2156 "src-ag/Desugar.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 2161 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 2166 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 2171 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 2176 "src-ag/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 179 "src-ag/Desugar.ag" #-}- Set.empty- {-# LINE 2187 "src-ag/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 196 "src-ag/Desugar.ag" #-}- Map.empty- {-# LINE 2200 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOallAttributes ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- []- {-# LINE 2205 "src-ag/Desugar.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 2210 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- Seq.empty- {-# LINE 2215 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- []- {-# LINE 2220 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 2225 "src-ag/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- inhMap : Map Identifier Attributes- mainName : String- nt : NontermIdent- options : Options- synMap : Map Identifier Attributes- synthesized attributes:- allAttributes : AttrMap- augmentsOut : Map ConstructorIdent (Map Identifier [Expression])- errors : Seq Error- output : SELF - alternatives:- alternative Production:- child con : {ConstructorIdent}- child params : {[Identifier]}- child constraints : {[Type]}- child children : Children - child rules : Rules - child typeSigs : TypeSigs - child macro : {MaybeMacro}- visit 0:- local augmentsIn : _- local _tup3 : _- local augmentsOut1 : _- local augmentsOut : _- local augmentErrs : _- local output : _--}--- cata-sem_Production :: Production ->- T_Production -sem_Production !(Production _con _params _constraints _children _rules _typeSigs _macro ) =- (sem_Production_Production _con _params _constraints (sem_Children _children ) (sem_Rules _rules ) (sem_TypeSigs _typeSigs ) _macro )--- semantic domain-newtype T_Production = T_Production ((Map ConstructorIdent (Map Identifier [Expression])) ->- AttrMap ->- (Map Identifier Attributes) ->- String ->- NontermIdent ->- Options ->- (Map Identifier Attributes) ->- ( 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),inhMap_Inh_Production :: !((Map Identifier Attributes)),mainName_Inh_Production :: !(String),nt_Inh_Production :: !(NontermIdent),options_Inh_Production :: !(Options),synMap_Inh_Production :: !((Map Identifier Attributes))}-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 _lhsIinhMap _lhsImainName _lhsInt _lhsIoptions _lhsIsynMap ) =- (let ( !_lhsOallAttributes,!_lhsOaugmentsOut,!_lhsOerrors,!_lhsOoutput) = sem _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIinhMap _lhsImainName _lhsInt _lhsIoptions _lhsIsynMap - in (Syn_Production _lhsOallAttributes _lhsOaugmentsOut _lhsOerrors _lhsOoutput ))-sem_Production_Production :: ConstructorIdent ->- ([Identifier]) ->- ([Type]) ->- T_Children ->- T_Rules ->- T_TypeSigs ->- MaybeMacro ->- T_Production -sem_Production_Production !con_ !params_ !constraints_ !(T_Children children_ ) !(T_Rules rules_ ) !(T_TypeSigs typeSigs_ ) !macro_ =- (T_Production (\ (!_lhsIaugmentsIn)- (!_lhsIforcedIrrefutables)- (!_lhsIinhMap)- (!_lhsImainName)- (!_lhsInt)- (!_lhsIoptions)- (!_lhsIsynMap) ->- (case (({-# LINE 152 "src-ag/Desugar.ag" #-}- _lhsInt- {-# LINE 2305 "src-ag/Desugar.hs" #-}- )) of- { !_rulesOnt ->- (case (({-# LINE 161 "src-ag/Desugar.ag" #-}- con_- {-# LINE 2310 "src-ag/Desugar.hs" #-}- )) of- { !_rulesOcon ->- (case (rules_ ) of- { ( !_rulesIdefsCollect,!T_Rules_1 rules_1) ->- (case (({-# LINE 36 "src-ag/Desugar.ag" #-}- _lhsIoptions- {-# LINE 2317 "src-ag/Desugar.hs" #-}- )) of- { !_rulesOoptions ->- (case (({-# LINE 215 "src-ag/Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 2322 "src-ag/Desugar.hs" #-}- )) of- { !_rulesOforcedIrrefutables ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 2327 "src-ag/Desugar.hs" #-}- )) of- { !_childrenOsynMap ->- (case (({-# LINE 36 "src-ag/Desugar.ag" #-}- _lhsIoptions- {-# LINE 2332 "src-ag/Desugar.hs" #-}- )) of- { !_childrenOoptions ->- (case (({-# LINE 289 "src-ag/Desugar.ag" #-}- _lhsImainName- {-# LINE 2337 "src-ag/Desugar.hs" #-}- )) of- { !_childrenOmainName ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 2342 "src-ag/Desugar.hs" #-}- )) of- { !_childrenOinhMap ->- (case (children_ _childrenOinhMap _childrenOmainName _childrenOoptions _childrenOsynMap ) of- { ( !_childrenIchildInhs,!_childrenIchildSyns,!_childrenIoutput) ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _childrenIchildSyns- {-# LINE 2349 "src-ag/Desugar.hs" #-}- )) of- { !_rulesOchildSyns ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _childrenIchildInhs- {-# LINE 2354 "src-ag/Desugar.hs" #-}- )) of- { !_rulesOchildInhs ->- (case (({-# LINE 188 "src-ag/Desugar.ag" #-}- _rulesIdefsCollect- {-# LINE 2359 "src-ag/Desugar.hs" #-}- )) of- { !_rulesOdefs ->- (case (rules_1 _rulesOchildInhs _rulesOchildSyns _rulesOcon _rulesOdefs _rulesOforcedIrrefutables _rulesOnt _rulesOoptions ) of- { ( !_rulesIallAttributes,!_rulesIerrors,!_rulesIoutput) ->- (case (({-# LINE 196 "src-ag/Desugar.ag" #-}- _rulesIallAttributes- {-# LINE 2366 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOallAttributes ->- (case (({-# LINE 244 "src-ag/Desugar.ag" #-}- Map.findWithDefault Map.empty con_ _lhsIaugmentsIn- {-# LINE 2371 "src-ag/Desugar.hs" #-}- )) of- { !_augmentsIn ->- (case (({-# LINE 247 "src-ag/Desugar.ag" #-}- Map.mapAccum (desugarExprs _lhsIoptions _lhsInt con_ _childrenIchildInhs _childrenIchildSyns) Seq.empty _augmentsIn- {-# LINE 2376 "src-ag/Desugar.hs" #-}- )) of- { !__tup3 ->- (case (({-# LINE 247 "src-ag/Desugar.ag" #-}- __tup3- {-# LINE 2381 "src-ag/Desugar.hs" #-}- )) of- { !(_,!_augmentsOut1) ->- (case (({-# LINE 245 "src-ag/Desugar.ag" #-}- Map.singleton con_ _augmentsOut1- {-# LINE 2386 "src-ag/Desugar.hs" #-}- )) of- { !_augmentsOut ->- (case (({-# LINE 231 "src-ag/Desugar.ag" #-}- _augmentsOut- {-# LINE 2391 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOaugmentsOut ->- (case (({-# LINE 247 "src-ag/Desugar.ag" #-}- __tup3- {-# LINE 2396 "src-ag/Desugar.hs" #-}- )) of- { !(!_augmentErrs,_) ->- (case (({-# LINE 283 "src-ag/Desugar.ag" #-}- _rulesIerrors Seq.>< _augmentErrs- {-# LINE 2401 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (typeSigs_ ) of- { ( !_typeSigsIoutput) ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- Production con_ params_ constraints_ _childrenIoutput _rulesIoutput _typeSigsIoutput macro_- {-# LINE 2408 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 2413 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Productions --------------------------------------------------{-- visit 0:- inherited attributes:- augmentsIn : Map ConstructorIdent (Map Identifier [Expression])- forcedIrrefutables : AttrMap- inhMap : Map Identifier Attributes- mainName : String- nt : NontermIdent- options : Options- synMap : Map Identifier Attributes- 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 ->- (Map Identifier Attributes) ->- String ->- NontermIdent ->- Options ->- (Map Identifier Attributes) ->- ( 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),inhMap_Inh_Productions :: !((Map Identifier Attributes)),mainName_Inh_Productions :: !(String),nt_Inh_Productions :: !(NontermIdent),options_Inh_Productions :: !(Options),synMap_Inh_Productions :: !((Map Identifier Attributes))}-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 _lhsIinhMap _lhsImainName _lhsInt _lhsIoptions _lhsIsynMap ) =- (let ( !_lhsOallAttributes,!_lhsOaugmentsOut,!_lhsOerrors,!_lhsOoutput) = sem _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIinhMap _lhsImainName _lhsInt _lhsIoptions _lhsIsynMap - 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)- (!_lhsIinhMap)- (!_lhsImainName)- (!_lhsInt)- (!_lhsIoptions)- (!_lhsIsynMap) ->- (case (({-# LINE 152 "src-ag/Desugar.ag" #-}- _lhsInt- {-# LINE 2478 "src-ag/Desugar.hs" #-}- )) of- { !_tlOnt ->- (case (({-# LINE 152 "src-ag/Desugar.ag" #-}- _lhsInt- {-# LINE 2483 "src-ag/Desugar.hs" #-}- )) of- { !_hdOnt ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 2488 "src-ag/Desugar.hs" #-}- )) of- { !_tlOsynMap ->- (case (({-# LINE 36 "src-ag/Desugar.ag" #-}- _lhsIoptions- {-# LINE 2493 "src-ag/Desugar.hs" #-}- )) of- { !_tlOoptions ->- (case (({-# LINE 289 "src-ag/Desugar.ag" #-}- _lhsImainName- {-# LINE 2498 "src-ag/Desugar.hs" #-}- )) of- { !_tlOmainName ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 2503 "src-ag/Desugar.hs" #-}- )) of- { !_tlOinhMap ->- (case (({-# LINE 215 "src-ag/Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 2508 "src-ag/Desugar.hs" #-}- )) of- { !_tlOforcedIrrefutables ->- (case (({-# LINE 230 "src-ag/Desugar.ag" #-}- _lhsIaugmentsIn- {-# LINE 2513 "src-ag/Desugar.hs" #-}- )) of- { !_tlOaugmentsIn ->- (case (tl_ _tlOaugmentsIn _tlOforcedIrrefutables _tlOinhMap _tlOmainName _tlOnt _tlOoptions _tlOsynMap ) of- { ( !_tlIallAttributes,!_tlIaugmentsOut,!_tlIerrors,!_tlIoutput) ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 2520 "src-ag/Desugar.hs" #-}- )) of- { !_hdOsynMap ->- (case (({-# LINE 36 "src-ag/Desugar.ag" #-}- _lhsIoptions- {-# LINE 2525 "src-ag/Desugar.hs" #-}- )) of- { !_hdOoptions ->- (case (({-# LINE 289 "src-ag/Desugar.ag" #-}- _lhsImainName- {-# LINE 2530 "src-ag/Desugar.hs" #-}- )) of- { !_hdOmainName ->- (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 2535 "src-ag/Desugar.hs" #-}- )) of- { !_hdOinhMap ->- (case (({-# LINE 215 "src-ag/Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 2540 "src-ag/Desugar.hs" #-}- )) of- { !_hdOforcedIrrefutables ->- (case (({-# LINE 230 "src-ag/Desugar.ag" #-}- _lhsIaugmentsIn- {-# LINE 2545 "src-ag/Desugar.hs" #-}- )) of- { !_hdOaugmentsIn ->- (case (hd_ _hdOaugmentsIn _hdOforcedIrrefutables _hdOinhMap _hdOmainName _hdOnt _hdOoptions _hdOsynMap ) of- { ( !_hdIallAttributes,!_hdIaugmentsOut,!_hdIerrors,!_hdIoutput) ->- (case (({-# LINE 196 "src-ag/Desugar.ag" #-}- _hdIallAttributes `mergeAttributes` _tlIallAttributes- {-# LINE 2552 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOallAttributes ->- (case (({-# LINE 231 "src-ag/Desugar.ag" #-}- _hdIaugmentsOut `Map.union` _tlIaugmentsOut- {-# LINE 2557 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOaugmentsOut ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 2562 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 2567 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 2572 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Productions_Nil :: T_Productions -sem_Productions_Nil =- (T_Productions (\ (!_lhsIaugmentsIn)- (!_lhsIforcedIrrefutables)- (!_lhsIinhMap)- (!_lhsImainName)- (!_lhsInt)- (!_lhsIoptions)- (!_lhsIsynMap) ->- (case (({-# LINE 196 "src-ag/Desugar.ag" #-}- Map.empty- {-# LINE 2587 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOallAttributes ->- (case (({-# LINE 231 "src-ag/Desugar.ag" #-}- Map.empty- {-# LINE 2592 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOaugmentsOut ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- Seq.empty- {-# LINE 2597 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- []- {-# LINE 2602 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 2607 "src-ag/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}- child pure : {Bool}- child identity : {Bool}- child mbError : {Maybe Error}- child eager : {Bool}- visit 1:- local ruleDescr : _- local output : _--}--- cata-sem_Rule :: Rule ->- T_Rule -sem_Rule !(Rule _mbName _pattern _rhs _owrt _origin _explicit _pure _identity _mbError _eager ) =- (sem_Rule_Rule _mbName (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin _explicit _pure _identity _mbError _eager )--- semantic domain-newtype T_Rule = T_Rule (( (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 ->- Bool ->- Bool ->- (Maybe Error) ->- Bool ->- T_Rule -sem_Rule_Rule !mbName_ !(T_Pattern pattern_ ) !(T_Expression rhs_ ) !owrt_ !origin_ !explicit_ !pure_ !identity_ !mbError_ !eager_ =- (T_Rule (case (pattern_ ) of- { ( !_patternIdefsCollect,!T_Pattern_1 pattern_1) ->- (case (({-# LINE 179 "src-ag/Desugar.ag" #-}- _patternIdefsCollect- {-# LINE 2685 "src-ag/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 152 "src-ag/Desugar.ag" #-}- _lhsInt- {-# LINE 2699 "src-ag/Desugar.hs" #-}- )) of- { !_patternOnt ->- (case (({-# LINE 153 "src-ag/Desugar.ag" #-}- _lhsIcon- {-# LINE 2704 "src-ag/Desugar.hs" #-}- )) of- { !_patternOcon ->- (case (({-# LINE 215 "src-ag/Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 2709 "src-ag/Desugar.hs" #-}- )) of- { !_patternOforcedIrrefutables ->- (case (({-# LINE 185 "src-ag/Desugar.ag" #-}- _lhsIdefs- {-# LINE 2714 "src-ag/Desugar.hs" #-}- )) of- { !_patternOdefs ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 2719 "src-ag/Desugar.hs" #-}- )) of- { !_patternOchildSyns ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 2724 "src-ag/Desugar.hs" #-}- )) of- { !_patternOchildInhs ->- (case (pattern_1 _patternOchildInhs _patternOchildSyns _patternOcon _patternOdefs _patternOforcedIrrefutables _patternOnt ) of- { ( !_patternIallAttributes,!_patternIcopy,!_patternIerrors,!_patternIoutput) ->- (case (({-# LINE 196 "src-ag/Desugar.ag" #-}- _patternIallAttributes- {-# LINE 2731 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOallAttributes ->- (case (({-# LINE 172 "src-ag/Desugar.ag" #-}- show _lhsInt ++ " :: " ++ show _lhsIcon ++ " :: " ++ (concat $ intersperse "," $ map (\(f,a) -> show f ++ "." ++ show a) $ Set.toList _patternIdefsCollect)- {-# LINE 2736 "src-ag/Desugar.hs" #-}- )) of- { !_ruleDescr ->- (case (({-# LINE 168 "src-ag/Desugar.ag" #-}- _ruleDescr- {-# LINE 2741 "src-ag/Desugar.hs" #-}- )) of- { !_rhsOruleDescr ->- (case (({-# LINE 36 "src-ag/Desugar.ag" #-}- _lhsIoptions- {-# LINE 2746 "src-ag/Desugar.hs" #-}- )) of- { !_rhsOoptions ->- (case (({-# LINE 152 "src-ag/Desugar.ag" #-}- _lhsInt- {-# LINE 2751 "src-ag/Desugar.hs" #-}- )) of- { !_rhsOnt ->- (case (({-# LINE 153 "src-ag/Desugar.ag" #-}- _lhsIcon- {-# LINE 2756 "src-ag/Desugar.hs" #-}- )) of- { !_rhsOcon ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 2761 "src-ag/Desugar.hs" #-}- )) of- { !_rhsOchildSyns ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 2766 "src-ag/Desugar.hs" #-}- )) of- { !_rhsOchildInhs ->- (case (rhs_ _rhsOchildInhs _rhsOchildSyns _rhsOcon _rhsOnt _rhsOoptions _rhsOruleDescr ) of- { ( !_rhsIerrors,!_rhsIoutput) ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- _patternIerrors Seq.>< _rhsIerrors- {-# LINE 2773 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- Rule mbName_ _patternIoutput _rhsIoutput owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_- {-# LINE 2778 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 2783 "src-ag/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 179 "src-ag/Desugar.ag" #-}- _hdIdefsCollect `Set.union` _tlIdefsCollect- {-# LINE 2852 "src-ag/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 152 "src-ag/Desugar.ag" #-}- _lhsInt- {-# LINE 2866 "src-ag/Desugar.hs" #-}- )) of- { !_tlOnt ->- (case (({-# LINE 153 "src-ag/Desugar.ag" #-}- _lhsIcon- {-# LINE 2871 "src-ag/Desugar.hs" #-}- )) of- { !_tlOcon ->- (case (({-# LINE 152 "src-ag/Desugar.ag" #-}- _lhsInt- {-# LINE 2876 "src-ag/Desugar.hs" #-}- )) of- { !_hdOnt ->- (case (({-# LINE 153 "src-ag/Desugar.ag" #-}- _lhsIcon- {-# LINE 2881 "src-ag/Desugar.hs" #-}- )) of- { !_hdOcon ->- (case (({-# LINE 36 "src-ag/Desugar.ag" #-}- _lhsIoptions- {-# LINE 2886 "src-ag/Desugar.hs" #-}- )) of- { !_tlOoptions ->- (case (({-# LINE 215 "src-ag/Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 2891 "src-ag/Desugar.hs" #-}- )) of- { !_tlOforcedIrrefutables ->- (case (({-# LINE 185 "src-ag/Desugar.ag" #-}- _lhsIdefs- {-# LINE 2896 "src-ag/Desugar.hs" #-}- )) of- { !_tlOdefs ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 2901 "src-ag/Desugar.hs" #-}- )) of- { !_tlOchildSyns ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 2906 "src-ag/Desugar.hs" #-}- )) of- { !_tlOchildInhs ->- (case (tl_1 _tlOchildInhs _tlOchildSyns _tlOcon _tlOdefs _tlOforcedIrrefutables _tlOnt _tlOoptions ) of- { ( !_tlIallAttributes,!_tlIerrors,!_tlIoutput) ->- (case (({-# LINE 36 "src-ag/Desugar.ag" #-}- _lhsIoptions- {-# LINE 2913 "src-ag/Desugar.hs" #-}- )) of- { !_hdOoptions ->- (case (({-# LINE 215 "src-ag/Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 2918 "src-ag/Desugar.hs" #-}- )) of- { !_hdOforcedIrrefutables ->- (case (({-# LINE 185 "src-ag/Desugar.ag" #-}- _lhsIdefs- {-# LINE 2923 "src-ag/Desugar.hs" #-}- )) of- { !_hdOdefs ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 2928 "src-ag/Desugar.hs" #-}- )) of- { !_hdOchildSyns ->- (case (({-# LINE 126 "src-ag/Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 2933 "src-ag/Desugar.hs" #-}- )) of- { !_hdOchildInhs ->- (case (hd_1 _hdOchildInhs _hdOchildSyns _hdOcon _hdOdefs _hdOforcedIrrefutables _hdOnt _hdOoptions ) of- { ( !_hdIallAttributes,!_hdIerrors,!_hdIoutput) ->- (case (({-# LINE 196 "src-ag/Desugar.ag" #-}- _hdIallAttributes `mergeAttributes` _tlIallAttributes- {-# LINE 2940 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOallAttributes ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 2945 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 2950 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 2955 "src-ag/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 179 "src-ag/Desugar.ag" #-}- Set.empty- {-# LINE 2966 "src-ag/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 196 "src-ag/Desugar.ag" #-}- Map.empty- {-# LINE 2980 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOallAttributes ->- (case (({-# LINE 38 "src-ag/Desugar.ag" #-}- Seq.empty- {-# LINE 2985 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOerrors ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- []- {-# LINE 2990 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 2995 "src-ag/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 40 "src-ag/Desugar.ag" #-}- TypeSig name_ tp_- {-# LINE 3035 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 3040 "src-ag/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 40 "src-ag/Desugar.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 3084 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 3089 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOoutput) }) }) }) }) )-sem_TypeSigs_Nil :: T_TypeSigs -sem_TypeSigs_Nil =- (T_TypeSigs (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- []- {-# LINE 3097 "src-ag/Desugar.hs" #-}- )) of- { !_output ->- (case (({-# LINE 40 "src-ag/Desugar.ag" #-}- _output- {-# LINE 3102 "src-ag/Desugar.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOoutput) }) }) )+-- UUAGC 0.9.40.1 (src-ag/Desugar.ag)+module Desugar where+{-# LINE 14 "src-ag/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 Data.Maybe+import Data.List(intersperse)++import AbstractSyntax+import ErrorMessages+import Options+import HsToken+import HsTokenScanner+import TokenDef+import CommonTypes+{-# LINE 24 "dist/build/Desugar.hs" #-}++{-# LINE 2 "src-ag/AbstractSyntax.ag" #-}++-- AbstractSyntax.ag imports+import Data.Set(Set)+import Data.Map(Map)+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import Macro --marcos+import CommonTypes+import ErrorMessages+{-# LINE 36 "dist/build/Desugar.hs" #-}++{-# LINE 2 "src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 43 "dist/build/Desugar.hs" #-}++{-# LINE 2 "src-ag/Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken+{-# LINE 49 "dist/build/Desugar.hs" #-}++{-# LINE 2 "src-ag/HsToken.ag" #-}++import CommonTypes+import UU.Scanner.Position(Pos)+{-# LINE 55 "dist/build/Desugar.hs" #-}+{-# LINE 98 "src-ag/Desugar.ag" #-}++addl :: Int -> Pos -> Pos+addl n (Pos l c f) = Pos (l+n) c f+{-# LINE 60 "dist/build/Desugar.hs" #-}++{-# LINE 133 "src-ag/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 75 "dist/build/Desugar.hs" #-}++{-# LINE 204 "src-ag/Desugar.ag" #-}++mergeAttributes :: AttrMap -> AttrMap -> AttrMap+mergeAttributes = Map.unionWith $ Map.unionWith $ Set.union+{-# LINE 81 "dist/build/Desugar.hs" #-}++{-# LINE 251 "src-ag/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 107 "dist/build/Desugar.hs" #-}++{-# LINE 294 "src-ag/Desugar.ag" #-}++addLateAttr :: Options -> String -> Attributes+addLateAttr options mainName+ | kennedyWarren options && lateHigherOrderBinding options =+ let tp = lateBindingType mainName+ in Map.singleton idLateBindingAttr tp+ | otherwise = Map.empty+{-# LINE 117 "dist/build/Desugar.hs" #-}+-- Child -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ inhMap : Map Identifier Attributes+ mainName : String+ options : Options+ synMap : Map Identifier Attributes+ synthesized attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ output : Child + alternatives:+ alternative Child:+ child name : {Identifier}+ child tp : {Type}+ child kind : {ChildKind}+ visit 0:+ local chnt : _+ local inh : _+ local syn : _+-}+-- cata+sem_Child :: Child ->+ T_Child+sem_Child !(Child _name _tp _kind) =+ (sem_Child_Child _name _tp _kind)+-- semantic domain+newtype T_Child = T_Child ((Map Identifier Attributes) ->+ String ->+ Options ->+ (Map Identifier Attributes) ->+ ( ([(Identifier, Identifier)]),([(Identifier, Identifier)]),Child))+data Inh_Child = Inh_Child {inhMap_Inh_Child :: !((Map Identifier Attributes)),mainName_Inh_Child :: !(String),options_Inh_Child :: !(Options),synMap_Inh_Child :: !((Map Identifier Attributes))}+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 _lhsIinhMap _lhsImainName _lhsIoptions _lhsIsynMap) =+ (let ( !_lhsOchildInhs,!_lhsOchildSyns,!_lhsOoutput) = sem _lhsIinhMap _lhsImainName _lhsIoptions _lhsIsynMap+ in (Syn_Child _lhsOchildInhs _lhsOchildSyns _lhsOoutput))+sem_Child_Child :: Identifier ->+ Type ->+ ChildKind ->+ T_Child+sem_Child_Child !name_ !tp_ !kind_ =+ (T_Child (\ (!_lhsIinhMap)+ (!_lhsImainName)+ (!_lhsIoptions)+ (!_lhsIsynMap) ->+ (case (({-# LINE 19 "src-ag/DistChildAttr.ag" #-}+ case tp_ of+ NT nt _ _ -> nt+ Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")+ Haskell t -> identifier ""+ {-# LINE 173 "dist/build/Desugar" #-}+ )) of+ { !_chnt ->+ (case (({-# LINE 23 "src-ag/DistChildAttr.ag" #-}+ Map.findWithDefault Map.empty _chnt _lhsIinhMap+ {-# LINE 178 "dist/build/Desugar" #-}+ )) of+ { !_inh ->+ (case (({-# LINE 130 "src-ag/Desugar.ag" #-}+ [(i, name_) | i <- Map.keys _inh ]+ {-# LINE 183 "dist/build/Desugar" #-}+ )) of+ { !_lhsOchildInhs ->+ (case (({-# LINE 24 "src-ag/DistChildAttr.ag" #-}+ Map.findWithDefault Map.empty _chnt _lhsIsynMap+ {-# LINE 188 "dist/build/Desugar" #-}+ )) of+ { !_syn ->+ (case (({-# LINE 131 "src-ag/Desugar.ag" #-}+ [(s, name_) | s <- Map.keys _syn ]+ {-# LINE 193 "dist/build/Desugar" #-}+ )) of+ { !_lhsOchildSyns ->+ (case (({-# LINE 315 "src-ag/Desugar.ag" #-}+ Child name_ tp_ kind_+ {-# LINE 198 "dist/build/Desugar" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOchildInhs,_lhsOchildSyns,_lhsOoutput) }) }) }) }) }) })))+-- Children ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ inhMap : Map Identifier Attributes+ mainName : String+ options : Options+ synMap : Map Identifier Attributes+ synthesized attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ output : Children + 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 ((Map Identifier Attributes) ->+ String ->+ Options ->+ (Map Identifier Attributes) ->+ ( ([(Identifier, Identifier)]),([(Identifier, Identifier)]),Children))+data Inh_Children = Inh_Children {inhMap_Inh_Children :: !((Map Identifier Attributes)),mainName_Inh_Children :: !(String),options_Inh_Children :: !(Options),synMap_Inh_Children :: !((Map Identifier Attributes))}+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 _lhsIinhMap _lhsImainName _lhsIoptions _lhsIsynMap) =+ (let ( !_lhsOchildInhs,!_lhsOchildSyns,!_lhsOoutput) = sem _lhsIinhMap _lhsImainName _lhsIoptions _lhsIsynMap+ 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 (\ (!_lhsIinhMap)+ (!_lhsImainName)+ (!_lhsIoptions)+ (!_lhsIsynMap) ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 253 "dist/build/Desugar" #-}+ )) of+ { !_tlOinhMap ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 258 "dist/build/Desugar" #-}+ )) of+ { !_hdOinhMap ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 263 "dist/build/Desugar" #-}+ )) of+ { !_tlOsynMap ->+ (case (({-# LINE 36 "src-ag/Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 268 "dist/build/Desugar" #-}+ )) of+ { !_tlOoptions ->+ (case (({-# LINE 289 "src-ag/Desugar.ag" #-}+ _lhsImainName+ {-# LINE 273 "dist/build/Desugar" #-}+ )) of+ { !_tlOmainName ->+ (case (tl_ _tlOinhMap _tlOmainName _tlOoptions _tlOsynMap) of+ { ( !_tlIchildInhs,!_tlIchildSyns,!_tlIoutput) ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 280 "dist/build/Desugar" #-}+ )) of+ { !_hdOsynMap ->+ (case (({-# LINE 36 "src-ag/Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 285 "dist/build/Desugar" #-}+ )) of+ { !_hdOoptions ->+ (case (({-# LINE 289 "src-ag/Desugar.ag" #-}+ _lhsImainName+ {-# LINE 290 "dist/build/Desugar" #-}+ )) of+ { !_hdOmainName ->+ (case (hd_ _hdOinhMap _hdOmainName _hdOoptions _hdOsynMap) of+ { ( !_hdIchildInhs,!_hdIchildSyns,!_hdIoutput) ->+ (case (({-# LINE 125 "src-ag/Desugar.ag" #-}+ _hdIchildInhs ++ _tlIchildInhs+ {-# LINE 297 "dist/build/Desugar" #-}+ )) of+ { !_lhsOchildInhs ->+ (case (({-# LINE 125 "src-ag/Desugar.ag" #-}+ _hdIchildSyns ++ _tlIchildSyns+ {-# LINE 302 "dist/build/Desugar" #-}+ )) of+ { !_lhsOchildSyns ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 307 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 312 "dist/build/Desugar" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOchildInhs,_lhsOchildSyns,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+sem_Children_Nil :: T_Children+sem_Children_Nil =+ (T_Children (\ (!_lhsIinhMap)+ (!_lhsImainName)+ (!_lhsIoptions)+ (!_lhsIsynMap) ->+ (case (({-# LINE 125 "src-ag/Desugar.ag" #-}+ []+ {-# LINE 324 "dist/build/Desugar" #-}+ )) of+ { !_lhsOchildInhs ->+ (case (({-# LINE 125 "src-ag/Desugar.ag" #-}+ []+ {-# LINE 329 "dist/build/Desugar" #-}+ )) of+ { !_lhsOchildSyns ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ []+ {-# LINE 334 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 339 "dist/build/Desugar" #-}+ )) 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 : Expression + 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 49 "src-ag/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 406 "dist/build/Desugar" #-}+ )) of+ { !__tup1 ->+ (case (({-# LINE 49 "src-ag/Desugar.ag" #-}+ __tup1+ {-# LINE 411 "dist/build/Desugar" #-}+ )) of+ { !(_,!_lhsOerrors) ->+ (case (({-# LINE 49 "src-ag/Desugar.ag" #-}+ __tup1+ {-# LINE 416 "dist/build/Desugar" #-}+ )) of+ { !(!_tks',_) ->+ (case (({-# LINE 59 "src-ag/Desugar.ag" #-}+ Expression pos_ _tks'+ {-# LINE 421 "dist/build/Desugar" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOerrors,_lhsOoutput) }) }) }) })))+-- Grammar -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ forcedIrrefutables : AttrMap+ mainName : String+ options : Options+ synthesized attributes:+ allAttributes : AttrMap+ errors : Seq Error+ output : Grammar + 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 quantMap : {QuantMap}+ child uniqueMap : {UniqueMap}+ child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}+-}+-- cata+sem_Grammar :: Grammar ->+ T_Grammar+sem_Grammar !(Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap) =+ (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts) _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap)+-- semantic domain+newtype T_Grammar = T_Grammar (AttrMap ->+ String ->+ Options ->+ ( AttrMap,(Seq Error),Grammar))+data Inh_Grammar = Inh_Grammar {forcedIrrefutables_Inh_Grammar :: !(AttrMap),mainName_Inh_Grammar :: !(String),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 _lhsImainName _lhsIoptions) =+ (let ( !_lhsOallAttributes,!_lhsOerrors,!_lhsOoutput) = sem _lhsIforcedIrrefutables _lhsImainName _lhsIoptions+ in (Syn_Grammar _lhsOallAttributes _lhsOerrors _lhsOoutput))+sem_Grammar_Grammar :: TypeSyns ->+ UseMap ->+ Derivings ->+ (Set NontermIdent) ->+ T_Nonterminals ->+ PragmaMap ->+ AttrOrderMap ->+ ParamMap ->+ ContextMap ->+ QuantMap ->+ UniqueMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->+ T_Grammar+sem_Grammar_Grammar !typeSyns_ !useMap_ !derivings_ !wrappers_ !(T_Nonterminals nonts_) !pragmas_ !manualAttrOrderMap_ !paramMap_ !contextMap_ !quantMap_ !uniqueMap_ !augmentsMap_ !aroundsMap_ !mergeMap_ =+ (T_Grammar (\ (!_lhsIforcedIrrefutables)+ (!_lhsImainName)+ (!_lhsIoptions) ->+ (case (nonts_) of+ { ( !_nontsIinhMap',!_nontsIsynMap',!T_Nonterminals_1 nonts_1) ->+ (case (({-# LINE 36 "src-ag/Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 494 "dist/build/Desugar" #-}+ )) of+ { !_nontsOoptions ->+ (case (({-# LINE 289 "src-ag/Desugar.ag" #-}+ _lhsImainName+ {-# LINE 499 "dist/build/Desugar" #-}+ )) of+ { !_nontsOmainName ->+ (case (({-# LINE 215 "src-ag/Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 504 "dist/build/Desugar" #-}+ )) of+ { !_nontsOforcedIrrefutables ->+ (case (({-# LINE 16 "src-ag/DistChildAttr.ag" #-}+ _nontsIsynMap'+ {-# LINE 509 "dist/build/Desugar" #-}+ )) of+ { !_nontsOsynMap ->+ (case (({-# LINE 15 "src-ag/DistChildAttr.ag" #-}+ _nontsIinhMap'+ {-# LINE 514 "dist/build/Desugar" #-}+ )) of+ { !_nontsOinhMap ->+ (case (({-# LINE 235 "src-ag/Desugar.ag" #-}+ augmentsMap_+ {-# LINE 519 "dist/build/Desugar" #-}+ )) of+ { !_nontsOaugmentsIn ->+ (case (nonts_1 _nontsOaugmentsIn _nontsOforcedIrrefutables _nontsOinhMap _nontsOmainName _nontsOoptions _nontsOsynMap) of+ { ( !_nontsIallAttributes,!_nontsIaugmentsOut,!_nontsIerrors,!_nontsIoutput) ->+ (case (({-# LINE 196 "src-ag/Desugar.ag" #-}+ _nontsIallAttributes+ {-# LINE 526 "dist/build/Desugar" #-}+ )) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ _nontsIerrors+ {-# LINE 531 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 319 "src-ag/Desugar.ag" #-}+ Grammar typeSyns_+ useMap_+ derivings_+ wrappers_+ _nontsIoutput+ pragmas_+ manualAttrOrderMap_+ paramMap_+ contextMap_+ quantMap_+ uniqueMap_+ _nontsIaugmentsOut+ aroundsMap_+ mergeMap_+ {-# LINE 549 "dist/build/Desugar" #-}+ )) 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 : HsToken + 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 79 "src-ag/Desugar.ag" #-}+ findField field_ attr_ _lhsIchildSyns+ {-# LINE 652 "dist/build/Desugar" #-}+ )) of+ { !_mField ->+ (case (({-# LINE 81 "src-ag/Desugar.ag" #-}+ maybe field_ id _mField+ {-# LINE 657 "dist/build/Desugar" #-}+ )) of+ { !_field' ->+ (case (({-# LINE 84 "src-ag/Desugar.ag" #-}+ if _lhsIuseFieldIdent || length (getName field_) < length (getName _field' )+ then _lhsIaddLines + 1+ else _lhsIaddLines+ {-# LINE 664 "dist/build/Desugar" #-}+ )) of+ { !_lhsOaddLines ->+ (case (({-# LINE 82 "src-ag/Desugar.ag" #-}+ maybe (Seq.singleton (UndefAttr _lhsInt _lhsIcon field_ (Ident "<ANY>" (getPos field_)) False)) (const Seq.empty) _mField+ {-# LINE 669 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 88 "src-ag/Desugar.ag" #-}+ AGField _field' attr_ (addl _lhsIaddLines pos_) (if _lhsIuseFieldIdent then Just _lhsIruleDescr else Nothing)+ {-# LINE 674 "dist/build/Desugar" #-}+ )) of+ { !_tks ->+ (case (({-# LINE 70 "src-ag/Desugar.ag" #-}+ _tks+ {-# LINE 679 "dist/build/Desugar" #-}+ )) 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 74 "src-ag/Desugar.ag" #-}+ if _lhsIuseFieldIdent+ then _lhsIaddLines + 1+ else _lhsIaddLines+ {-# LINE 699 "dist/build/Desugar" #-}+ )) of+ { !_lhsOaddLines ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ Seq.empty+ {-# LINE 704 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 77 "src-ag/Desugar.ag" #-}+ AGLocal var_ (addl _lhsIaddLines pos_) (if _lhsIuseFieldIdent then Just _lhsIruleDescr else Nothing)+ {-# LINE 709 "dist/build/Desugar" #-}+ )) of+ { !_tks ->+ (case (({-# LINE 70 "src-ag/Desugar.ag" #-}+ _tks+ {-# LINE 714 "dist/build/Desugar" #-}+ )) 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 64 "src-ag/Desugar.ag" #-}+ _lhsIaddLines+ {-# LINE 731 "dist/build/Desugar" #-}+ )) of+ { !_lhsOaddLines ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ Seq.empty+ {-# LINE 736 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 92 "src-ag/Desugar.ag" #-}+ CharToken value_ (addl _lhsIaddLines pos_)+ {-# LINE 741 "dist/build/Desugar" #-}+ )) of+ { !_tks ->+ (case (({-# LINE 70 "src-ag/Desugar.ag" #-}+ _tks+ {-# LINE 746 "dist/build/Desugar" #-}+ )) 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 64 "src-ag/Desugar.ag" #-}+ _lhsIaddLines+ {-# LINE 763 "dist/build/Desugar" #-}+ )) of+ { !_lhsOaddLines ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ Seq.empty+ {-# LINE 768 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 96 "src-ag/Desugar.ag" #-}+ Err mesg_ (addl _lhsIaddLines pos_)+ {-# LINE 773 "dist/build/Desugar" #-}+ )) of+ { !_tks ->+ (case (({-# LINE 70 "src-ag/Desugar.ag" #-}+ _tks+ {-# LINE 778 "dist/build/Desugar" #-}+ )) 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 64 "src-ag/Desugar.ag" #-}+ _lhsIaddLines+ {-# LINE 795 "dist/build/Desugar" #-}+ )) of+ { !_lhsOaddLines ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ Seq.empty+ {-# LINE 800 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 90 "src-ag/Desugar.ag" #-}+ HsToken value_ (addl _lhsIaddLines pos_)+ {-# LINE 805 "dist/build/Desugar" #-}+ )) of+ { !_tks ->+ (case (({-# LINE 70 "src-ag/Desugar.ag" #-}+ _tks+ {-# LINE 810 "dist/build/Desugar" #-}+ )) 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 64 "src-ag/Desugar.ag" #-}+ _lhsIaddLines+ {-# LINE 827 "dist/build/Desugar" #-}+ )) of+ { !_lhsOaddLines ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ Seq.empty+ {-# LINE 832 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 94 "src-ag/Desugar.ag" #-}+ StrToken value_ (addl _lhsIaddLines pos_)+ {-# LINE 837 "dist/build/Desugar" #-}+ )) of+ { !_tks ->+ (case (({-# LINE 70 "src-ag/Desugar.ag" #-}+ _tks+ {-# LINE 842 "dist/build/Desugar" #-}+ )) 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 : HsTokens + 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 62 "src-ag/Desugar.ag" #-}+ _lhsIuseFieldIdent+ {-# LINE 906 "dist/build/Desugar" #-}+ )) of+ { !_tlOuseFieldIdent ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 911 "dist/build/Desugar" #-}+ )) of+ { !_tlOchildSyns ->+ (case (({-# LINE 62 "src-ag/Desugar.ag" #-}+ _lhsIuseFieldIdent+ {-# LINE 916 "dist/build/Desugar" #-}+ )) of+ { !_hdOuseFieldIdent ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 921 "dist/build/Desugar" #-}+ )) of+ { !_hdOchildSyns ->+ (case (({-# LINE 64 "src-ag/Desugar.ag" #-}+ _lhsIaddLines+ {-# LINE 926 "dist/build/Desugar" #-}+ )) of+ { !_hdOaddLines ->+ (case (({-# LINE 168 "src-ag/Desugar.ag" #-}+ _lhsIruleDescr+ {-# LINE 931 "dist/build/Desugar" #-}+ )) of+ { !_hdOruleDescr ->+ (case (({-# LINE 152 "src-ag/Desugar.ag" #-}+ _lhsInt+ {-# LINE 936 "dist/build/Desugar" #-}+ )) of+ { !_hdOnt ->+ (case (({-# LINE 153 "src-ag/Desugar.ag" #-}+ _lhsIcon+ {-# LINE 941 "dist/build/Desugar" #-}+ )) of+ { !_hdOcon ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 946 "dist/build/Desugar" #-}+ )) of+ { !_hdOchildInhs ->+ (case (hd_ _hdOaddLines _hdOchildInhs _hdOchildSyns _hdOcon _hdOnt _hdOruleDescr _hdOuseFieldIdent) of+ { ( !_hdIaddLines,!_hdIerrors,!_hdItks) ->+ (case (({-# LINE 64 "src-ag/Desugar.ag" #-}+ _hdIaddLines+ {-# LINE 953 "dist/build/Desugar" #-}+ )) of+ { !_tlOaddLines ->+ (case (({-# LINE 168 "src-ag/Desugar.ag" #-}+ _lhsIruleDescr+ {-# LINE 958 "dist/build/Desugar" #-}+ )) of+ { !_tlOruleDescr ->+ (case (({-# LINE 152 "src-ag/Desugar.ag" #-}+ _lhsInt+ {-# LINE 963 "dist/build/Desugar" #-}+ )) of+ { !_tlOnt ->+ (case (({-# LINE 153 "src-ag/Desugar.ag" #-}+ _lhsIcon+ {-# LINE 968 "dist/build/Desugar" #-}+ )) of+ { !_tlOcon ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 973 "dist/build/Desugar" #-}+ )) of+ { !_tlOchildInhs ->+ (case (tl_ _tlOaddLines _tlOchildInhs _tlOchildSyns _tlOcon _tlOnt _tlOruleDescr _tlOuseFieldIdent) of+ { ( !_tlIaddLines,!_tlIerrors,!_tlItks) ->+ (case (({-# LINE 64 "src-ag/Desugar.ag" #-}+ _tlIaddLines+ {-# LINE 980 "dist/build/Desugar" #-}+ )) of+ { !_lhsOaddLines ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 985 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 70 "src-ag/Desugar.ag" #-}+ (:) _hdItks _tlItks+ {-# LINE 990 "dist/build/Desugar" #-}+ )) of+ { !_tks ->+ (case (({-# LINE 70 "src-ag/Desugar.ag" #-}+ _tks+ {-# LINE 995 "dist/build/Desugar" #-}+ )) of+ { !_lhsOtks ->+ ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+sem_HsTokens_Nil :: T_HsTokens+sem_HsTokens_Nil =+ (T_HsTokens (\ (!_lhsIaddLines)+ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIruleDescr)+ (!_lhsIuseFieldIdent) ->+ (case (({-# LINE 64 "src-ag/Desugar.ag" #-}+ _lhsIaddLines+ {-# LINE 1010 "dist/build/Desugar" #-}+ )) of+ { !_lhsOaddLines ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ Seq.empty+ {-# LINE 1015 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 70 "src-ag/Desugar.ag" #-}+ []+ {-# LINE 1020 "dist/build/Desugar" #-}+ )) of+ { !_tks ->+ (case (({-# LINE 70 "src-ag/Desugar.ag" #-}+ _tks+ {-# LINE 1025 "dist/build/Desugar" #-}+ )) 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 152 "src-ag/Desugar.ag" #-}+ _lhsInt+ {-# LINE 1078 "dist/build/Desugar" #-}+ )) of+ { !_tokensOnt ->+ (case (({-# LINE 153 "src-ag/Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1083 "dist/build/Desugar" #-}+ )) of+ { !_tokensOcon ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1088 "dist/build/Desugar" #-}+ )) of+ { !_tokensOchildSyns ->+ (case (({-# LINE 62 "src-ag/Desugar.ag" #-}+ _lhsIuseFieldIdent+ {-# LINE 1093 "dist/build/Desugar" #-}+ )) of+ { !_tokensOuseFieldIdent ->+ (case (({-# LINE 168 "src-ag/Desugar.ag" #-}+ _lhsIruleDescr+ {-# LINE 1098 "dist/build/Desugar" #-}+ )) of+ { !_tokensOruleDescr ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1103 "dist/build/Desugar" #-}+ )) of+ { !_tokensOchildInhs ->+ (case (({-# LINE 67 "src-ag/Desugar.ag" #-}+ 0+ {-# LINE 1108 "dist/build/Desugar" #-}+ )) of+ { !_tokensOaddLines ->+ (case (tokens_ _tokensOaddLines _tokensOchildInhs _tokensOchildSyns _tokensOcon _tokensOnt _tokensOruleDescr _tokensOuseFieldIdent) of+ { ( !_tokensIaddLines,!_tokensIerrors,!_tokensItks) ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ _tokensIerrors+ {-# LINE 1115 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 69 "src-ag/Desugar.ag" #-}+ _tokensItks+ {-# LINE 1120 "dist/build/Desugar" #-}+ )) of+ { !_lhsOtks ->+ ( _lhsOerrors,_lhsOtks) }) }) }) }) }) }) }) }) }) })))+-- Nonterminal -------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ inhMap' : Map Identifier Attributes+ synMap' : Map Identifier Attributes+ visit 1:+ inherited attributes:+ augmentsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ forcedIrrefutables : AttrMap+ inhMap : Map Identifier Attributes+ mainName : String+ options : Options+ synMap : Map Identifier Attributes+ synthesized attributes:+ allAttributes : AttrMap+ augmentsOut : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ errors : Seq Error+ output : Nonterminal + alternatives:+ alternative Nonterminal:+ child nt : {NontermIdent}+ child params : {[Identifier]}+ child inh : {Attributes}+ child syn : {Attributes}+ child prods : Productions + visit 1:+ local augmentsIn : _+ local augmentsOut : _+ local extraInh : _+-}+-- 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 Identifier Attributes),(Map Identifier Attributes),T_Nonterminal_1))+newtype T_Nonterminal_1 = T_Nonterminal_1 ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ AttrMap ->+ (Map Identifier Attributes) ->+ String ->+ Options ->+ (Map Identifier Attributes) ->+ ( 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),inhMap_Inh_Nonterminal :: !((Map Identifier Attributes)),mainName_Inh_Nonterminal :: !(String),options_Inh_Nonterminal :: !(Options),synMap_Inh_Nonterminal :: !((Map Identifier Attributes))}+data Syn_Nonterminal = Syn_Nonterminal {allAttributes_Syn_Nonterminal :: !(AttrMap),augmentsOut_Syn_Nonterminal :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))),errors_Syn_Nonterminal :: !((Seq Error)),inhMap'_Syn_Nonterminal :: !((Map Identifier Attributes)),output_Syn_Nonterminal :: !(Nonterminal),synMap'_Syn_Nonterminal :: !((Map Identifier Attributes))}+wrap_Nonterminal :: T_Nonterminal ->+ Inh_Nonterminal ->+ Syn_Nonterminal+wrap_Nonterminal !(T_Nonterminal sem) !(Inh_Nonterminal _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIinhMap _lhsImainName _lhsIoptions _lhsIsynMap) =+ (let ( !_lhsOinhMap',!_lhsOsynMap',!T_Nonterminal_1 sem_1) = sem+ ( !_lhsOallAttributes,!_lhsOaugmentsOut,!_lhsOerrors,!_lhsOoutput) = sem_1 _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIinhMap _lhsImainName _lhsIoptions _lhsIsynMap+ in (Syn_Nonterminal _lhsOallAttributes _lhsOaugmentsOut _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap'))+sem_Nonterminal_Nonterminal :: NontermIdent ->+ ([Identifier]) ->+ Attributes ->+ Attributes ->+ T_Productions ->+ T_Nonterminal+sem_Nonterminal_Nonterminal !nt_ !params_ !inh_ !syn_ !(T_Productions prods_) =+ (T_Nonterminal (case (({-# LINE 7 "src-ag/DistChildAttr.ag" #-}+ Map.singleton nt_ inh_+ {-# LINE 1187 "dist/build/Desugar" #-}+ )) of+ { !_lhsOinhMap' ->+ (case (({-# LINE 8 "src-ag/DistChildAttr.ag" #-}+ Map.singleton nt_ syn_+ {-# LINE 1192 "dist/build/Desugar" #-}+ )) of+ { !_lhsOsynMap' ->+ (case ((let sem_Nonterminal_Nonterminal_1 :: T_Nonterminal_1+ sem_Nonterminal_Nonterminal_1 =+ (T_Nonterminal_1 (\ (!_lhsIaugmentsIn)+ (!_lhsIforcedIrrefutables)+ (!_lhsIinhMap)+ (!_lhsImainName)+ (!_lhsIoptions)+ (!_lhsIsynMap) ->+ (case (({-# LINE 157 "src-ag/Desugar.ag" #-}+ nt_+ {-# LINE 1205 "dist/build/Desugar" #-}+ )) of+ { !_prodsOnt ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 1210 "dist/build/Desugar" #-}+ )) of+ { !_prodsOsynMap ->+ (case (({-# LINE 36 "src-ag/Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 1215 "dist/build/Desugar" #-}+ )) of+ { !_prodsOoptions ->+ (case (({-# LINE 289 "src-ag/Desugar.ag" #-}+ _lhsImainName+ {-# LINE 1220 "dist/build/Desugar" #-}+ )) of+ { !_prodsOmainName ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 1225 "dist/build/Desugar" #-}+ )) of+ { !_prodsOinhMap ->+ (case (({-# LINE 215 "src-ag/Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1230 "dist/build/Desugar" #-}+ )) of+ { !_prodsOforcedIrrefutables ->+ (case (({-# LINE 239 "src-ag/Desugar.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIaugmentsIn+ {-# LINE 1235 "dist/build/Desugar" #-}+ )) of+ { !_augmentsIn ->+ (case (({-# LINE 230 "src-ag/Desugar.ag" #-}+ _augmentsIn+ {-# LINE 1240 "dist/build/Desugar" #-}+ )) of+ { !_prodsOaugmentsIn ->+ (case (prods_ _prodsOaugmentsIn _prodsOforcedIrrefutables _prodsOinhMap _prodsOmainName _prodsOnt _prodsOoptions _prodsOsynMap) of+ { ( !_prodsIallAttributes,!_prodsIaugmentsOut,!_prodsIerrors,!_prodsIoutput) ->+ (case (({-# LINE 196 "src-ag/Desugar.ag" #-}+ _prodsIallAttributes+ {-# LINE 1247 "dist/build/Desugar" #-}+ )) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 240 "src-ag/Desugar.ag" #-}+ Map.singleton nt_ _prodsIaugmentsOut+ {-# LINE 1252 "dist/build/Desugar" #-}+ )) of+ { !_augmentsOut ->+ (case (({-# LINE 229 "src-ag/Desugar.ag" #-}+ _augmentsOut+ {-# LINE 1257 "dist/build/Desugar" #-}+ )) of+ { !_lhsOaugmentsOut ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ _prodsIerrors+ {-# LINE 1262 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 292 "src-ag/Desugar.ag" #-}+ addLateAttr _lhsIoptions _lhsImainName+ {-# LINE 1267 "dist/build/Desugar" #-}+ )) of+ { !_extraInh ->+ (case (({-# LINE 308 "src-ag/Desugar.ag" #-}+ Nonterminal+ nt_ params_+ (_extraInh `Map.union` inh_)+ syn_+ _prodsIoutput+ {-# LINE 1276 "dist/build/Desugar" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+ in sem_Nonterminal_Nonterminal_1)) of+ { ( !sem_Nonterminal_1) ->+ ( _lhsOinhMap',_lhsOsynMap',sem_Nonterminal_1) }) }) }))+-- Nonterminals ------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ inhMap' : Map Identifier Attributes+ synMap' : Map Identifier Attributes+ visit 1:+ inherited attributes:+ augmentsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ forcedIrrefutables : AttrMap+ inhMap : Map Identifier Attributes+ mainName : String+ options : Options+ synMap : Map Identifier Attributes+ synthesized attributes:+ allAttributes : AttrMap+ augmentsOut : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ errors : Seq Error+ output : Nonterminals + alternatives:+ alternative Cons:+ child hd : Nonterminal + child tl : Nonterminals + visit 1:+ local output : _+ alternative Nil:+ visit 1:+ local output : _+-}+-- cata+sem_Nonterminals :: Nonterminals ->+ T_Nonterminals+sem_Nonterminals !list =+ (Prelude.foldr sem_Nonterminals_Cons sem_Nonterminals_Nil (Prelude.map sem_Nonterminal list))+-- semantic domain+newtype T_Nonterminals = T_Nonterminals (( (Map Identifier Attributes),(Map Identifier Attributes),T_Nonterminals_1))+newtype T_Nonterminals_1 = T_Nonterminals_1 ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ AttrMap ->+ (Map Identifier Attributes) ->+ String ->+ Options ->+ (Map Identifier Attributes) ->+ ( 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),inhMap_Inh_Nonterminals :: !((Map Identifier Attributes)),mainName_Inh_Nonterminals :: !(String),options_Inh_Nonterminals :: !(Options),synMap_Inh_Nonterminals :: !((Map Identifier Attributes))}+data Syn_Nonterminals = Syn_Nonterminals {allAttributes_Syn_Nonterminals :: !(AttrMap),augmentsOut_Syn_Nonterminals :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))),errors_Syn_Nonterminals :: !((Seq Error)),inhMap'_Syn_Nonterminals :: !((Map Identifier Attributes)),output_Syn_Nonterminals :: !(Nonterminals),synMap'_Syn_Nonterminals :: !((Map Identifier Attributes))}+wrap_Nonterminals :: T_Nonterminals ->+ Inh_Nonterminals ->+ Syn_Nonterminals+wrap_Nonterminals !(T_Nonterminals sem) !(Inh_Nonterminals _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIinhMap _lhsImainName _lhsIoptions _lhsIsynMap) =+ (let ( !_lhsOinhMap',!_lhsOsynMap',!T_Nonterminals_1 sem_1) = sem+ ( !_lhsOallAttributes,!_lhsOaugmentsOut,!_lhsOerrors,!_lhsOoutput) = sem_1 _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIinhMap _lhsImainName _lhsIoptions _lhsIsynMap+ in (Syn_Nonterminals _lhsOallAttributes _lhsOaugmentsOut _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap'))+sem_Nonterminals_Cons :: T_Nonterminal ->+ T_Nonterminals ->+ T_Nonterminals+sem_Nonterminals_Cons !(T_Nonterminal hd_) !(T_Nonterminals tl_) =+ (T_Nonterminals (case (tl_) of+ { ( !_tlIinhMap',!_tlIsynMap',!T_Nonterminals_1 tl_1) ->+ (case (hd_) of+ { ( !_hdIinhMap',!_hdIsynMap',!T_Nonterminal_1 hd_1) ->+ (case (({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ _hdIinhMap' `Map.union` _tlIinhMap'+ {-# LINE 1345 "dist/build/Desugar" #-}+ )) of+ { !_lhsOinhMap' ->+ (case (({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ _hdIsynMap' `Map.union` _tlIsynMap'+ {-# LINE 1350 "dist/build/Desugar" #-}+ )) of+ { !_lhsOsynMap' ->+ (case ((let sem_Nonterminals_Cons_1 :: T_Nonterminals_1+ sem_Nonterminals_Cons_1 =+ (T_Nonterminals_1 (\ (!_lhsIaugmentsIn)+ (!_lhsIforcedIrrefutables)+ (!_lhsIinhMap)+ (!_lhsImainName)+ (!_lhsIoptions)+ (!_lhsIsynMap) ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 1363 "dist/build/Desugar" #-}+ )) of+ { !_tlOsynMap ->+ (case (({-# LINE 36 "src-ag/Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 1368 "dist/build/Desugar" #-}+ )) of+ { !_tlOoptions ->+ (case (({-# LINE 289 "src-ag/Desugar.ag" #-}+ _lhsImainName+ {-# LINE 1373 "dist/build/Desugar" #-}+ )) of+ { !_tlOmainName ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 1378 "dist/build/Desugar" #-}+ )) of+ { !_tlOinhMap ->+ (case (({-# LINE 215 "src-ag/Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1383 "dist/build/Desugar" #-}+ )) of+ { !_tlOforcedIrrefutables ->+ (case (({-# LINE 228 "src-ag/Desugar.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 1388 "dist/build/Desugar" #-}+ )) of+ { !_tlOaugmentsIn ->+ (case (tl_1 _tlOaugmentsIn _tlOforcedIrrefutables _tlOinhMap _tlOmainName _tlOoptions _tlOsynMap) of+ { ( !_tlIallAttributes,!_tlIaugmentsOut,!_tlIerrors,!_tlIoutput) ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 1395 "dist/build/Desugar" #-}+ )) of+ { !_hdOsynMap ->+ (case (({-# LINE 36 "src-ag/Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 1400 "dist/build/Desugar" #-}+ )) of+ { !_hdOoptions ->+ (case (({-# LINE 289 "src-ag/Desugar.ag" #-}+ _lhsImainName+ {-# LINE 1405 "dist/build/Desugar" #-}+ )) of+ { !_hdOmainName ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 1410 "dist/build/Desugar" #-}+ )) of+ { !_hdOinhMap ->+ (case (({-# LINE 215 "src-ag/Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1415 "dist/build/Desugar" #-}+ )) of+ { !_hdOforcedIrrefutables ->+ (case (({-# LINE 228 "src-ag/Desugar.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 1420 "dist/build/Desugar" #-}+ )) of+ { !_hdOaugmentsIn ->+ (case (hd_1 _hdOaugmentsIn _hdOforcedIrrefutables _hdOinhMap _hdOmainName _hdOoptions _hdOsynMap) of+ { ( !_hdIallAttributes,!_hdIaugmentsOut,!_hdIerrors,!_hdIoutput) ->+ (case (({-# LINE 196 "src-ag/Desugar.ag" #-}+ _hdIallAttributes `mergeAttributes` _tlIallAttributes+ {-# LINE 1427 "dist/build/Desugar" #-}+ )) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 229 "src-ag/Desugar.ag" #-}+ _hdIaugmentsOut `Map.union` _tlIaugmentsOut+ {-# LINE 1432 "dist/build/Desugar" #-}+ )) of+ { !_lhsOaugmentsOut ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 1437 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 1442 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 1447 "dist/build/Desugar" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+ in sem_Nonterminals_Cons_1)) of+ { ( !sem_Nonterminals_1) ->+ ( _lhsOinhMap',_lhsOsynMap',sem_Nonterminals_1) }) }) }) }) }))+sem_Nonterminals_Nil :: T_Nonterminals+sem_Nonterminals_Nil =+ (T_Nonterminals (case (({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ Map.empty+ {-# LINE 1458 "dist/build/Desugar" #-}+ )) of+ { !_lhsOinhMap' ->+ (case (({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ Map.empty+ {-# LINE 1463 "dist/build/Desugar" #-}+ )) of+ { !_lhsOsynMap' ->+ (case ((let sem_Nonterminals_Nil_1 :: T_Nonterminals_1+ sem_Nonterminals_Nil_1 =+ (T_Nonterminals_1 (\ (!_lhsIaugmentsIn)+ (!_lhsIforcedIrrefutables)+ (!_lhsIinhMap)+ (!_lhsImainName)+ (!_lhsIoptions)+ (!_lhsIsynMap) ->+ (case (({-# LINE 196 "src-ag/Desugar.ag" #-}+ Map.empty+ {-# LINE 1476 "dist/build/Desugar" #-}+ )) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 229 "src-ag/Desugar.ag" #-}+ Map.empty+ {-# LINE 1481 "dist/build/Desugar" #-}+ )) of+ { !_lhsOaugmentsOut ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ Seq.empty+ {-# LINE 1486 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ []+ {-# LINE 1491 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 1496 "dist/build/Desugar" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) })))+ in sem_Nonterminals_Nil_1)) of+ { ( !sem_Nonterminals_1) ->+ ( _lhsOinhMap',_lhsOsynMap',sem_Nonterminals_1) }) }) }))+-- 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 : Pattern + errors : Seq Error+ output : Pattern + alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + 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) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat))+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_Pattern+sem_Pattern_Alias !field_ !attr_ !(T_Pattern pat_) =+ (T_Pattern (case (({-# LINE 182 "src-ag/Desugar.ag" #-}+ Set.singleton (field_, attr_)+ {-# LINE 1596 "dist/build/Desugar" #-}+ )) of+ { !_def ->+ (case (pat_) of+ { ( !_patIdefsCollect,!T_Pattern_1 pat_1) ->+ (case (({-# LINE 183 "src-ag/Desugar.ag" #-}+ _def `Set.union` _patIdefsCollect+ {-# LINE 1603 "dist/build/Desugar" #-}+ )) 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 152 "src-ag/Desugar.ag" #-}+ _lhsInt+ {-# LINE 1616 "dist/build/Desugar" #-}+ )) of+ { !_patOnt ->+ (case (({-# LINE 153 "src-ag/Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1621 "dist/build/Desugar" #-}+ )) of+ { !_patOcon ->+ (case (({-# LINE 215 "src-ag/Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1626 "dist/build/Desugar" #-}+ )) of+ { !_patOforcedIrrefutables ->+ (case (({-# LINE 185 "src-ag/Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1631 "dist/build/Desugar" #-}+ )) of+ { !_patOdefs ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1636 "dist/build/Desugar" #-}+ )) of+ { !_patOchildSyns ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1641 "dist/build/Desugar" #-}+ )) of+ { !_patOchildInhs ->+ (case (pat_1 _patOchildInhs _patOchildSyns _patOcon _patOdefs _patOforcedIrrefutables _patOnt) of+ { ( !_patIallAttributes,!_patIcopy,!_patIerrors,!_patIoutput) ->+ (case (({-# LINE 200 "src-ag/Desugar.ag" #-}+ (Map.singleton _lhsInt $ Map.singleton _lhsIcon $ Set.singleton (field_, attr_)) `mergeAttributes` _patIallAttributes+ {-# LINE 1648 "dist/build/Desugar" #-}+ )) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Alias field_ attr_ _patIcopy+ {-# LINE 1653 "dist/build/Desugar" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1658 "dist/build/Desugar" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 110 "src-ag/Desugar.ag" #-}+ maybeError field_ (UndefAttr _lhsInt _lhsIcon (Ident "<ANY>" (getPos field_)) attr_ True) $+ findField field_ attr_ _lhsIchildInhs+ {-# LINE 1664 "dist/build/Desugar" #-}+ )) of+ { !__tup2 ->+ (case (({-# LINE 110 "src-ag/Desugar.ag" #-}+ __tup2+ {-# LINE 1669 "dist/build/Desugar" #-}+ )) of+ { !(!_field',_) ->+ (case (({-# LINE 112 "src-ag/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 1678 "dist/build/Desugar" #-}+ )) of+ { !_err2 ->+ (case (({-# LINE 110 "src-ag/Desugar.ag" #-}+ __tup2+ {-# LINE 1683 "dist/build/Desugar" #-}+ )) of+ { !(_,!_err1) ->+ (case (({-# LINE 117 "src-ag/Desugar.ag" #-}+ _err1 Seq.>< _err2 Seq.>< _patIerrors+ {-# LINE 1688 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 118 "src-ag/Desugar.ag" #-}+ Alias _field' attr_ _patIoutput+ {-# LINE 1693 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 219 "src-ag/Desugar.ag" #-}+ if Set.member (field_, attr_) $ Map.findWithDefault Set.empty _lhsIcon $ Map.findWithDefault Map.empty _lhsInt $ _lhsIforcedIrrefutables+ then Irrefutable _output+ else _output+ {-# LINE 1700 "dist/build/Desugar" #-}+ )) 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 179 "src-ag/Desugar.ag" #-}+ _patsIdefsCollect+ {-# LINE 1715 "dist/build/Desugar" #-}+ )) 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 152 "src-ag/Desugar.ag" #-}+ _lhsInt+ {-# LINE 1728 "dist/build/Desugar" #-}+ )) of+ { !_patsOnt ->+ (case (({-# LINE 153 "src-ag/Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1733 "dist/build/Desugar" #-}+ )) of+ { !_patsOcon ->+ (case (({-# LINE 215 "src-ag/Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1738 "dist/build/Desugar" #-}+ )) of+ { !_patsOforcedIrrefutables ->+ (case (({-# LINE 185 "src-ag/Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1743 "dist/build/Desugar" #-}+ )) of+ { !_patsOdefs ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1748 "dist/build/Desugar" #-}+ )) of+ { !_patsOchildSyns ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1753 "dist/build/Desugar" #-}+ )) of+ { !_patsOchildInhs ->+ (case (pats_1 _patsOchildInhs _patsOchildSyns _patsOcon _patsOdefs _patsOforcedIrrefutables _patsOnt) of+ { ( !_patsIallAttributes,!_patsIcopy,!_patsIerrors,!_patsIoutput) ->+ (case (({-# LINE 196 "src-ag/Desugar.ag" #-}+ _patsIallAttributes+ {-# LINE 1760 "dist/build/Desugar" #-}+ )) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 1765 "dist/build/Desugar" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1770 "dist/build/Desugar" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ _patsIerrors+ {-# LINE 1775 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ Constr name_ _patsIoutput+ {-# LINE 1780 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 1785 "dist/build/Desugar" #-}+ )) 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 179 "src-ag/Desugar.ag" #-}+ _patIdefsCollect+ {-# LINE 1799 "dist/build/Desugar" #-}+ )) 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 202 "src-ag/Desugar.ag" #-}+ Map.empty+ {-# LINE 1812 "dist/build/Desugar" #-}+ )) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 152 "src-ag/Desugar.ag" #-}+ _lhsInt+ {-# LINE 1817 "dist/build/Desugar" #-}+ )) of+ { !_patOnt ->+ (case (({-# LINE 215 "src-ag/Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1822 "dist/build/Desugar" #-}+ )) of+ { !_patOforcedIrrefutables ->+ (case (({-# LINE 185 "src-ag/Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1827 "dist/build/Desugar" #-}+ )) of+ { !_patOdefs ->+ (case (({-# LINE 153 "src-ag/Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1832 "dist/build/Desugar" #-}+ )) of+ { !_patOcon ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1837 "dist/build/Desugar" #-}+ )) of+ { !_patOchildSyns ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1842 "dist/build/Desugar" #-}+ )) of+ { !_patOchildInhs ->+ (case (pat_1 _patOchildInhs _patOchildSyns _patOcon _patOdefs _patOforcedIrrefutables _patOnt) of+ { ( !_patIallAttributes,!_patIcopy,!_patIerrors,!_patIoutput) ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 1849 "dist/build/Desugar" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1854 "dist/build/Desugar" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ _patIerrors+ {-# LINE 1859 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ Irrefutable _patIoutput+ {-# LINE 1864 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 1869 "dist/build/Desugar" #-}+ )) 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 179 "src-ag/Desugar.ag" #-}+ _patsIdefsCollect+ {-# LINE 1884 "dist/build/Desugar" #-}+ )) 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 152 "src-ag/Desugar.ag" #-}+ _lhsInt+ {-# LINE 1897 "dist/build/Desugar" #-}+ )) of+ { !_patsOnt ->+ (case (({-# LINE 153 "src-ag/Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1902 "dist/build/Desugar" #-}+ )) of+ { !_patsOcon ->+ (case (({-# LINE 215 "src-ag/Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1907 "dist/build/Desugar" #-}+ )) of+ { !_patsOforcedIrrefutables ->+ (case (({-# LINE 185 "src-ag/Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1912 "dist/build/Desugar" #-}+ )) of+ { !_patsOdefs ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1917 "dist/build/Desugar" #-}+ )) of+ { !_patsOchildSyns ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1922 "dist/build/Desugar" #-}+ )) of+ { !_patsOchildInhs ->+ (case (pats_1 _patsOchildInhs _patsOchildSyns _patsOcon _patsOdefs _patsOforcedIrrefutables _patsOnt) of+ { ( !_patsIallAttributes,!_patsIcopy,!_patsIerrors,!_patsIoutput) ->+ (case (({-# LINE 196 "src-ag/Desugar.ag" #-}+ _patsIallAttributes+ {-# LINE 1929 "dist/build/Desugar" #-}+ )) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 1934 "dist/build/Desugar" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1939 "dist/build/Desugar" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ _patsIerrors+ {-# LINE 1944 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ Product pos_ _patsIoutput+ {-# LINE 1949 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 1954 "dist/build/Desugar" #-}+ )) 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 179 "src-ag/Desugar.ag" #-}+ Set.empty+ {-# LINE 1966 "dist/build/Desugar" #-}+ )) 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 196 "src-ag/Desugar.ag" #-}+ Map.empty+ {-# LINE 1979 "dist/build/Desugar" #-}+ )) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Underscore pos_+ {-# LINE 1984 "dist/build/Desugar" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1989 "dist/build/Desugar" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ Seq.empty+ {-# LINE 1994 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ Underscore pos_+ {-# LINE 1999 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 2004 "dist/build/Desugar" #-}+ )) 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 : Patterns + errors : Seq Error+ output : Patterns + 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 179 "src-ag/Desugar.ag" #-}+ _hdIdefsCollect `Set.union` _tlIdefsCollect+ {-# LINE 2074 "dist/build/Desugar" #-}+ )) 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 152 "src-ag/Desugar.ag" #-}+ _lhsInt+ {-# LINE 2087 "dist/build/Desugar" #-}+ )) of+ { !_tlOnt ->+ (case (({-# LINE 153 "src-ag/Desugar.ag" #-}+ _lhsIcon+ {-# LINE 2092 "dist/build/Desugar" #-}+ )) of+ { !_tlOcon ->+ (case (({-# LINE 152 "src-ag/Desugar.ag" #-}+ _lhsInt+ {-# LINE 2097 "dist/build/Desugar" #-}+ )) of+ { !_hdOnt ->+ (case (({-# LINE 153 "src-ag/Desugar.ag" #-}+ _lhsIcon+ {-# LINE 2102 "dist/build/Desugar" #-}+ )) of+ { !_hdOcon ->+ (case (({-# LINE 215 "src-ag/Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2107 "dist/build/Desugar" #-}+ )) of+ { !_tlOforcedIrrefutables ->+ (case (({-# LINE 185 "src-ag/Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 2112 "dist/build/Desugar" #-}+ )) of+ { !_tlOdefs ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 2117 "dist/build/Desugar" #-}+ )) of+ { !_tlOchildSyns ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 2122 "dist/build/Desugar" #-}+ )) of+ { !_tlOchildInhs ->+ (case (tl_1 _tlOchildInhs _tlOchildSyns _tlOcon _tlOdefs _tlOforcedIrrefutables _tlOnt) of+ { ( !_tlIallAttributes,!_tlIcopy,!_tlIerrors,!_tlIoutput) ->+ (case (({-# LINE 215 "src-ag/Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2129 "dist/build/Desugar" #-}+ )) of+ { !_hdOforcedIrrefutables ->+ (case (({-# LINE 185 "src-ag/Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 2134 "dist/build/Desugar" #-}+ )) of+ { !_hdOdefs ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 2139 "dist/build/Desugar" #-}+ )) of+ { !_hdOchildSyns ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 2144 "dist/build/Desugar" #-}+ )) of+ { !_hdOchildInhs ->+ (case (hd_1 _hdOchildInhs _hdOchildSyns _hdOcon _hdOdefs _hdOforcedIrrefutables _hdOnt) of+ { ( !_hdIallAttributes,!_hdIcopy,!_hdIerrors,!_hdIoutput) ->+ (case (({-# LINE 196 "src-ag/Desugar.ag" #-}+ _hdIallAttributes `mergeAttributes` _tlIallAttributes+ {-# LINE 2151 "dist/build/Desugar" #-}+ )) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 2156 "dist/build/Desugar" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 2161 "dist/build/Desugar" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 2166 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 2171 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 2176 "dist/build/Desugar" #-}+ )) 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 179 "src-ag/Desugar.ag" #-}+ Set.empty+ {-# LINE 2187 "dist/build/Desugar" #-}+ )) 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 196 "src-ag/Desugar.ag" #-}+ Map.empty+ {-# LINE 2200 "dist/build/Desugar" #-}+ )) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ []+ {-# LINE 2205 "dist/build/Desugar" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 2210 "dist/build/Desugar" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ Seq.empty+ {-# LINE 2215 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ []+ {-# LINE 2220 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 2225 "dist/build/Desugar" #-}+ )) 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+ inhMap : Map Identifier Attributes+ mainName : String+ nt : NontermIdent+ options : Options+ synMap : Map Identifier Attributes+ synthesized attributes:+ allAttributes : AttrMap+ augmentsOut : Map ConstructorIdent (Map Identifier [Expression])+ errors : Seq Error+ output : Production + alternatives:+ alternative Production:+ child con : {ConstructorIdent}+ child params : {[Identifier]}+ child constraints : {[Type]}+ child children : Children + child rules : Rules + child typeSigs : TypeSigs + child macro : {MaybeMacro}+ visit 0:+ local augmentsIn : _+ local _tup3 : _+ local augmentsOut1 : _+ local augmentsOut : _+ local augmentErrs : _+ local output : _+-}+-- cata+sem_Production :: Production ->+ T_Production+sem_Production !(Production _con _params _constraints _children _rules _typeSigs _macro) =+ (sem_Production_Production _con _params _constraints (sem_Children _children) (sem_Rules _rules) (sem_TypeSigs _typeSigs) _macro)+-- semantic domain+newtype T_Production = T_Production ((Map ConstructorIdent (Map Identifier [Expression])) ->+ AttrMap ->+ (Map Identifier Attributes) ->+ String ->+ NontermIdent ->+ Options ->+ (Map Identifier Attributes) ->+ ( 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),inhMap_Inh_Production :: !((Map Identifier Attributes)),mainName_Inh_Production :: !(String),nt_Inh_Production :: !(NontermIdent),options_Inh_Production :: !(Options),synMap_Inh_Production :: !((Map Identifier Attributes))}+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 _lhsIinhMap _lhsImainName _lhsInt _lhsIoptions _lhsIsynMap) =+ (let ( !_lhsOallAttributes,!_lhsOaugmentsOut,!_lhsOerrors,!_lhsOoutput) = sem _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIinhMap _lhsImainName _lhsInt _lhsIoptions _lhsIsynMap+ in (Syn_Production _lhsOallAttributes _lhsOaugmentsOut _lhsOerrors _lhsOoutput))+sem_Production_Production :: ConstructorIdent ->+ ([Identifier]) ->+ ([Type]) ->+ T_Children ->+ T_Rules ->+ T_TypeSigs ->+ MaybeMacro ->+ T_Production+sem_Production_Production !con_ !params_ !constraints_ !(T_Children children_) !(T_Rules rules_) !(T_TypeSigs typeSigs_) !macro_ =+ (T_Production (\ (!_lhsIaugmentsIn)+ (!_lhsIforcedIrrefutables)+ (!_lhsIinhMap)+ (!_lhsImainName)+ (!_lhsInt)+ (!_lhsIoptions)+ (!_lhsIsynMap) ->+ (case (({-# LINE 152 "src-ag/Desugar.ag" #-}+ _lhsInt+ {-# LINE 2305 "dist/build/Desugar" #-}+ )) of+ { !_rulesOnt ->+ (case (({-# LINE 161 "src-ag/Desugar.ag" #-}+ con_+ {-# LINE 2310 "dist/build/Desugar" #-}+ )) of+ { !_rulesOcon ->+ (case (rules_) of+ { ( !_rulesIdefsCollect,!T_Rules_1 rules_1) ->+ (case (({-# LINE 36 "src-ag/Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 2317 "dist/build/Desugar" #-}+ )) of+ { !_rulesOoptions ->+ (case (({-# LINE 215 "src-ag/Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2322 "dist/build/Desugar" #-}+ )) of+ { !_rulesOforcedIrrefutables ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 2327 "dist/build/Desugar" #-}+ )) of+ { !_childrenOsynMap ->+ (case (({-# LINE 36 "src-ag/Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 2332 "dist/build/Desugar" #-}+ )) of+ { !_childrenOoptions ->+ (case (({-# LINE 289 "src-ag/Desugar.ag" #-}+ _lhsImainName+ {-# LINE 2337 "dist/build/Desugar" #-}+ )) of+ { !_childrenOmainName ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 2342 "dist/build/Desugar" #-}+ )) of+ { !_childrenOinhMap ->+ (case (children_ _childrenOinhMap _childrenOmainName _childrenOoptions _childrenOsynMap) of+ { ( !_childrenIchildInhs,!_childrenIchildSyns,!_childrenIoutput) ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _childrenIchildSyns+ {-# LINE 2349 "dist/build/Desugar" #-}+ )) of+ { !_rulesOchildSyns ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _childrenIchildInhs+ {-# LINE 2354 "dist/build/Desugar" #-}+ )) of+ { !_rulesOchildInhs ->+ (case (({-# LINE 188 "src-ag/Desugar.ag" #-}+ _rulesIdefsCollect+ {-# LINE 2359 "dist/build/Desugar" #-}+ )) of+ { !_rulesOdefs ->+ (case (rules_1 _rulesOchildInhs _rulesOchildSyns _rulesOcon _rulesOdefs _rulesOforcedIrrefutables _rulesOnt _rulesOoptions) of+ { ( !_rulesIallAttributes,!_rulesIerrors,!_rulesIoutput) ->+ (case (({-# LINE 196 "src-ag/Desugar.ag" #-}+ _rulesIallAttributes+ {-# LINE 2366 "dist/build/Desugar" #-}+ )) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 244 "src-ag/Desugar.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsIaugmentsIn+ {-# LINE 2371 "dist/build/Desugar" #-}+ )) of+ { !_augmentsIn ->+ (case (({-# LINE 247 "src-ag/Desugar.ag" #-}+ Map.mapAccum (desugarExprs _lhsIoptions _lhsInt con_ _childrenIchildInhs _childrenIchildSyns) Seq.empty _augmentsIn+ {-# LINE 2376 "dist/build/Desugar" #-}+ )) of+ { !__tup3 ->+ (case (({-# LINE 247 "src-ag/Desugar.ag" #-}+ __tup3+ {-# LINE 2381 "dist/build/Desugar" #-}+ )) of+ { !(_,!_augmentsOut1) ->+ (case (({-# LINE 245 "src-ag/Desugar.ag" #-}+ Map.singleton con_ _augmentsOut1+ {-# LINE 2386 "dist/build/Desugar" #-}+ )) of+ { !_augmentsOut ->+ (case (({-# LINE 231 "src-ag/Desugar.ag" #-}+ _augmentsOut+ {-# LINE 2391 "dist/build/Desugar" #-}+ )) of+ { !_lhsOaugmentsOut ->+ (case (({-# LINE 247 "src-ag/Desugar.ag" #-}+ __tup3+ {-# LINE 2396 "dist/build/Desugar" #-}+ )) of+ { !(!_augmentErrs,_) ->+ (case (({-# LINE 283 "src-ag/Desugar.ag" #-}+ _rulesIerrors Seq.>< _augmentErrs+ {-# LINE 2401 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (typeSigs_) of+ { ( !_typeSigsIoutput) ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ Production con_ params_ constraints_ _childrenIoutput _rulesIoutput _typeSigsIoutput macro_+ {-# LINE 2408 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 2413 "dist/build/Desugar" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+-- Productions -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ augmentsIn : Map ConstructorIdent (Map Identifier [Expression])+ forcedIrrefutables : AttrMap+ inhMap : Map Identifier Attributes+ mainName : String+ nt : NontermIdent+ options : Options+ synMap : Map Identifier Attributes+ synthesized attributes:+ allAttributes : AttrMap+ augmentsOut : Map ConstructorIdent (Map Identifier [Expression])+ errors : Seq Error+ output : Productions + 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 ->+ (Map Identifier Attributes) ->+ String ->+ NontermIdent ->+ Options ->+ (Map Identifier Attributes) ->+ ( 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),inhMap_Inh_Productions :: !((Map Identifier Attributes)),mainName_Inh_Productions :: !(String),nt_Inh_Productions :: !(NontermIdent),options_Inh_Productions :: !(Options),synMap_Inh_Productions :: !((Map Identifier Attributes))}+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 _lhsIinhMap _lhsImainName _lhsInt _lhsIoptions _lhsIsynMap) =+ (let ( !_lhsOallAttributes,!_lhsOaugmentsOut,!_lhsOerrors,!_lhsOoutput) = sem _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIinhMap _lhsImainName _lhsInt _lhsIoptions _lhsIsynMap+ 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)+ (!_lhsIinhMap)+ (!_lhsImainName)+ (!_lhsInt)+ (!_lhsIoptions)+ (!_lhsIsynMap) ->+ (case (({-# LINE 152 "src-ag/Desugar.ag" #-}+ _lhsInt+ {-# LINE 2478 "dist/build/Desugar" #-}+ )) of+ { !_tlOnt ->+ (case (({-# LINE 152 "src-ag/Desugar.ag" #-}+ _lhsInt+ {-# LINE 2483 "dist/build/Desugar" #-}+ )) of+ { !_hdOnt ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 2488 "dist/build/Desugar" #-}+ )) of+ { !_tlOsynMap ->+ (case (({-# LINE 36 "src-ag/Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 2493 "dist/build/Desugar" #-}+ )) of+ { !_tlOoptions ->+ (case (({-# LINE 289 "src-ag/Desugar.ag" #-}+ _lhsImainName+ {-# LINE 2498 "dist/build/Desugar" #-}+ )) of+ { !_tlOmainName ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 2503 "dist/build/Desugar" #-}+ )) of+ { !_tlOinhMap ->+ (case (({-# LINE 215 "src-ag/Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2508 "dist/build/Desugar" #-}+ )) of+ { !_tlOforcedIrrefutables ->+ (case (({-# LINE 230 "src-ag/Desugar.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 2513 "dist/build/Desugar" #-}+ )) of+ { !_tlOaugmentsIn ->+ (case (tl_ _tlOaugmentsIn _tlOforcedIrrefutables _tlOinhMap _tlOmainName _tlOnt _tlOoptions _tlOsynMap) of+ { ( !_tlIallAttributes,!_tlIaugmentsOut,!_tlIerrors,!_tlIoutput) ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 2520 "dist/build/Desugar" #-}+ )) of+ { !_hdOsynMap ->+ (case (({-# LINE 36 "src-ag/Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 2525 "dist/build/Desugar" #-}+ )) of+ { !_hdOoptions ->+ (case (({-# LINE 289 "src-ag/Desugar.ag" #-}+ _lhsImainName+ {-# LINE 2530 "dist/build/Desugar" #-}+ )) of+ { !_hdOmainName ->+ (case (({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 2535 "dist/build/Desugar" #-}+ )) of+ { !_hdOinhMap ->+ (case (({-# LINE 215 "src-ag/Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2540 "dist/build/Desugar" #-}+ )) of+ { !_hdOforcedIrrefutables ->+ (case (({-# LINE 230 "src-ag/Desugar.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 2545 "dist/build/Desugar" #-}+ )) of+ { !_hdOaugmentsIn ->+ (case (hd_ _hdOaugmentsIn _hdOforcedIrrefutables _hdOinhMap _hdOmainName _hdOnt _hdOoptions _hdOsynMap) of+ { ( !_hdIallAttributes,!_hdIaugmentsOut,!_hdIerrors,!_hdIoutput) ->+ (case (({-# LINE 196 "src-ag/Desugar.ag" #-}+ _hdIallAttributes `mergeAttributes` _tlIallAttributes+ {-# LINE 2552 "dist/build/Desugar" #-}+ )) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 231 "src-ag/Desugar.ag" #-}+ _hdIaugmentsOut `Map.union` _tlIaugmentsOut+ {-# LINE 2557 "dist/build/Desugar" #-}+ )) of+ { !_lhsOaugmentsOut ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 2562 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 2567 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 2572 "dist/build/Desugar" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+sem_Productions_Nil :: T_Productions+sem_Productions_Nil =+ (T_Productions (\ (!_lhsIaugmentsIn)+ (!_lhsIforcedIrrefutables)+ (!_lhsIinhMap)+ (!_lhsImainName)+ (!_lhsInt)+ (!_lhsIoptions)+ (!_lhsIsynMap) ->+ (case (({-# LINE 196 "src-ag/Desugar.ag" #-}+ Map.empty+ {-# LINE 2587 "dist/build/Desugar" #-}+ )) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 231 "src-ag/Desugar.ag" #-}+ Map.empty+ {-# LINE 2592 "dist/build/Desugar" #-}+ )) of+ { !_lhsOaugmentsOut ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ Seq.empty+ {-# LINE 2597 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ []+ {-# LINE 2602 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 2607 "dist/build/Desugar" #-}+ )) 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 : Rule + alternatives:+ alternative Rule:+ child mbName : {Maybe Identifier}+ child pattern : Pattern + child rhs : Expression + child owrt : {Bool}+ child origin : {String}+ child explicit : {Bool}+ child pure : {Bool}+ child identity : {Bool}+ child mbError : {Maybe Error}+ child eager : {Bool}+ visit 1:+ local ruleDescr : _+ local output : _+-}+-- cata+sem_Rule :: Rule ->+ T_Rule+sem_Rule !(Rule _mbName _pattern _rhs _owrt _origin _explicit _pure _identity _mbError _eager) =+ (sem_Rule_Rule _mbName (sem_Pattern _pattern) (sem_Expression _rhs) _owrt _origin _explicit _pure _identity _mbError _eager)+-- semantic domain+newtype T_Rule = T_Rule (( (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 ->+ Bool ->+ Bool ->+ (Maybe Error) ->+ Bool ->+ T_Rule+sem_Rule_Rule !mbName_ !(T_Pattern pattern_) !(T_Expression rhs_) !owrt_ !origin_ !explicit_ !pure_ !identity_ !mbError_ !eager_ =+ (T_Rule (case (pattern_) of+ { ( !_patternIdefsCollect,!T_Pattern_1 pattern_1) ->+ (case (({-# LINE 179 "src-ag/Desugar.ag" #-}+ _patternIdefsCollect+ {-# LINE 2685 "dist/build/Desugar" #-}+ )) 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 152 "src-ag/Desugar.ag" #-}+ _lhsInt+ {-# LINE 2699 "dist/build/Desugar" #-}+ )) of+ { !_patternOnt ->+ (case (({-# LINE 153 "src-ag/Desugar.ag" #-}+ _lhsIcon+ {-# LINE 2704 "dist/build/Desugar" #-}+ )) of+ { !_patternOcon ->+ (case (({-# LINE 215 "src-ag/Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2709 "dist/build/Desugar" #-}+ )) of+ { !_patternOforcedIrrefutables ->+ (case (({-# LINE 185 "src-ag/Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 2714 "dist/build/Desugar" #-}+ )) of+ { !_patternOdefs ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 2719 "dist/build/Desugar" #-}+ )) of+ { !_patternOchildSyns ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 2724 "dist/build/Desugar" #-}+ )) of+ { !_patternOchildInhs ->+ (case (pattern_1 _patternOchildInhs _patternOchildSyns _patternOcon _patternOdefs _patternOforcedIrrefutables _patternOnt) of+ { ( !_patternIallAttributes,!_patternIcopy,!_patternIerrors,!_patternIoutput) ->+ (case (({-# LINE 196 "src-ag/Desugar.ag" #-}+ _patternIallAttributes+ {-# LINE 2731 "dist/build/Desugar" #-}+ )) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 172 "src-ag/Desugar.ag" #-}+ show _lhsInt ++ " :: " ++ show _lhsIcon ++ " :: " ++ (concat $ intersperse "," $ map (\(f,a) -> show f ++ "." ++ show a) $ Set.toList _patternIdefsCollect)+ {-# LINE 2736 "dist/build/Desugar" #-}+ )) of+ { !_ruleDescr ->+ (case (({-# LINE 168 "src-ag/Desugar.ag" #-}+ _ruleDescr+ {-# LINE 2741 "dist/build/Desugar" #-}+ )) of+ { !_rhsOruleDescr ->+ (case (({-# LINE 36 "src-ag/Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 2746 "dist/build/Desugar" #-}+ )) of+ { !_rhsOoptions ->+ (case (({-# LINE 152 "src-ag/Desugar.ag" #-}+ _lhsInt+ {-# LINE 2751 "dist/build/Desugar" #-}+ )) of+ { !_rhsOnt ->+ (case (({-# LINE 153 "src-ag/Desugar.ag" #-}+ _lhsIcon+ {-# LINE 2756 "dist/build/Desugar" #-}+ )) of+ { !_rhsOcon ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 2761 "dist/build/Desugar" #-}+ )) of+ { !_rhsOchildSyns ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 2766 "dist/build/Desugar" #-}+ )) of+ { !_rhsOchildInhs ->+ (case (rhs_ _rhsOchildInhs _rhsOchildSyns _rhsOcon _rhsOnt _rhsOoptions _rhsOruleDescr) of+ { ( !_rhsIerrors,!_rhsIoutput) ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ _patternIerrors Seq.>< _rhsIerrors+ {-# LINE 2773 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ Rule mbName_ _patternIoutput _rhsIoutput owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_+ {-# LINE 2778 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 2783 "dist/build/Desugar" #-}+ )) 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 : Rules + 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 179 "src-ag/Desugar.ag" #-}+ _hdIdefsCollect `Set.union` _tlIdefsCollect+ {-# LINE 2852 "dist/build/Desugar" #-}+ )) 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 152 "src-ag/Desugar.ag" #-}+ _lhsInt+ {-# LINE 2866 "dist/build/Desugar" #-}+ )) of+ { !_tlOnt ->+ (case (({-# LINE 153 "src-ag/Desugar.ag" #-}+ _lhsIcon+ {-# LINE 2871 "dist/build/Desugar" #-}+ )) of+ { !_tlOcon ->+ (case (({-# LINE 152 "src-ag/Desugar.ag" #-}+ _lhsInt+ {-# LINE 2876 "dist/build/Desugar" #-}+ )) of+ { !_hdOnt ->+ (case (({-# LINE 153 "src-ag/Desugar.ag" #-}+ _lhsIcon+ {-# LINE 2881 "dist/build/Desugar" #-}+ )) of+ { !_hdOcon ->+ (case (({-# LINE 36 "src-ag/Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 2886 "dist/build/Desugar" #-}+ )) of+ { !_tlOoptions ->+ (case (({-# LINE 215 "src-ag/Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2891 "dist/build/Desugar" #-}+ )) of+ { !_tlOforcedIrrefutables ->+ (case (({-# LINE 185 "src-ag/Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 2896 "dist/build/Desugar" #-}+ )) of+ { !_tlOdefs ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 2901 "dist/build/Desugar" #-}+ )) of+ { !_tlOchildSyns ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 2906 "dist/build/Desugar" #-}+ )) of+ { !_tlOchildInhs ->+ (case (tl_1 _tlOchildInhs _tlOchildSyns _tlOcon _tlOdefs _tlOforcedIrrefutables _tlOnt _tlOoptions) of+ { ( !_tlIallAttributes,!_tlIerrors,!_tlIoutput) ->+ (case (({-# LINE 36 "src-ag/Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 2913 "dist/build/Desugar" #-}+ )) of+ { !_hdOoptions ->+ (case (({-# LINE 215 "src-ag/Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2918 "dist/build/Desugar" #-}+ )) of+ { !_hdOforcedIrrefutables ->+ (case (({-# LINE 185 "src-ag/Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 2923 "dist/build/Desugar" #-}+ )) of+ { !_hdOdefs ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 2928 "dist/build/Desugar" #-}+ )) of+ { !_hdOchildSyns ->+ (case (({-# LINE 126 "src-ag/Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 2933 "dist/build/Desugar" #-}+ )) of+ { !_hdOchildInhs ->+ (case (hd_1 _hdOchildInhs _hdOchildSyns _hdOcon _hdOdefs _hdOforcedIrrefutables _hdOnt _hdOoptions) of+ { ( !_hdIallAttributes,!_hdIerrors,!_hdIoutput) ->+ (case (({-# LINE 196 "src-ag/Desugar.ag" #-}+ _hdIallAttributes `mergeAttributes` _tlIallAttributes+ {-# LINE 2940 "dist/build/Desugar" #-}+ )) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 2945 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 2950 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 2955 "dist/build/Desugar" #-}+ )) 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 179 "src-ag/Desugar.ag" #-}+ Set.empty+ {-# LINE 2966 "dist/build/Desugar" #-}+ )) 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 196 "src-ag/Desugar.ag" #-}+ Map.empty+ {-# LINE 2980 "dist/build/Desugar" #-}+ )) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 38 "src-ag/Desugar.ag" #-}+ Seq.empty+ {-# LINE 2985 "dist/build/Desugar" #-}+ )) of+ { !_lhsOerrors ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ []+ {-# LINE 2990 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 2995 "dist/build/Desugar" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) })))+ in sem_Rules_Nil_1)) of+ { ( !sem_Rules_1) ->+ ( _lhsOdefsCollect,sem_Rules_1) }) }))+-- TypeSig -----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ output : TypeSig + 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 40 "src-ag/Desugar.ag" #-}+ TypeSig name_ tp_+ {-# LINE 3035 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 3040 "dist/build/Desugar" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOoutput) }) }))+-- TypeSigs ----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ output : TypeSigs + 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 40 "src-ag/Desugar.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 3084 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 3089 "dist/build/Desugar" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOoutput) }) }) }) }))+sem_TypeSigs_Nil :: T_TypeSigs+sem_TypeSigs_Nil =+ (T_TypeSigs (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ []+ {-# LINE 3097 "dist/build/Desugar" #-}+ )) of+ { !_output ->+ (case (({-# LINE 40 "src-ag/Desugar.ag" #-}+ _output+ {-# LINE 3102 "dist/build/Desugar" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOoutput) }) }))
src-derived/ErrorMessages.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.39.1.0 (src-ag/ErrorMessages.ag)+-- UUAGC 0.9.40.1 (src-ag/ErrorMessages.ag) module ErrorMessages where {-# LINE 2 "src-ag/ErrorMessages.ag" #-} @@ -8,7 +8,7 @@ import Pretty import CodeSyntax import CommonTypes-{-# LINE 12 "dist/build/uuagc/uuagc-tmp/ErrorMessages.hs" #-}+{-# LINE 12 "dist/build/ErrorMessages.hs" #-} -- Error ------------------------------------------------------- {- alternatives:@@ -153,41 +153,41 @@ alternative UndefNont: child nt : {NontermIdent} -}-data Error = ChildAsLocal (NontermIdent) (ConstructorIdent) (Identifier) - | CustomError (Bool) (Pos) (PP_Doc) - | Cyclic (NontermIdent) ((Maybe ConstructorIdent)) (([String])) - | CyclicSet (Identifier) - | DirectCirc (NontermIdent) (Bool) (([((Identifier,Identifier),[String],[String])])) - | DupAlt (NontermIdent) (ConstructorIdent) (ConstructorIdent) - | DupChild (NontermIdent) (ConstructorIdent) (Identifier) (Identifier) - | DupInhAttr (NontermIdent) (Identifier) (Identifier) - | DupRule (NontermIdent) (ConstructorIdent) (Identifier) (Identifier) (Identifier) - | DupRuleName (NontermIdent) (ConstructorIdent) (Identifier) - | DupSet (NontermIdent) (NontermIdent) - | DupSig (NontermIdent) (ConstructorIdent) (Identifier) - | DupSynAttr (NontermIdent) (Identifier) (Identifier) - | DupSynonym (NontermIdent) (NontermIdent) - | DupUnique (NontermIdent) (ConstructorIdent) (Identifier) - | HsParseError (Pos) (String) - | IncompatibleAttachKind (Identifier) (VisitKind) - | IncompatibleRuleKind (Identifier) (VisitKind) - | IncompatibleVisitKind (Identifier) (VisitIdentifier) (VisitKind) (VisitKind) - | 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) - | MissingSyn (NontermIdent) (Identifier) - | MissingTypeSig (NontermIdent) (ConstructorIdent) (Identifier) - | MissingUnique (NontermIdent) (Identifier) - | ParserError (Pos) (String) (String) - | SuperfluousRule (NontermIdent) (ConstructorIdent) (Identifier) (Identifier) - | UndefAlt (NontermIdent) (ConstructorIdent) - | UndefAttr (NontermIdent) (ConstructorIdent) (Identifier) (Identifier) (Bool) - | UndefChild (NontermIdent) (ConstructorIdent) (Identifier) - | UndefLocal (NontermIdent) (ConstructorIdent) (Identifier) - | UndefNont (NontermIdent) +data Error = ChildAsLocal (NontermIdent) (ConstructorIdent) (Identifier)+ | CustomError (Bool) (Pos) (PP_Doc)+ | Cyclic (NontermIdent) ((Maybe ConstructorIdent)) (([String]))+ | CyclicSet (Identifier)+ | DirectCirc (NontermIdent) (Bool) (([((Identifier,Identifier),[String],[String])]))+ | DupAlt (NontermIdent) (ConstructorIdent) (ConstructorIdent)+ | DupChild (NontermIdent) (ConstructorIdent) (Identifier) (Identifier)+ | DupInhAttr (NontermIdent) (Identifier) (Identifier)+ | DupRule (NontermIdent) (ConstructorIdent) (Identifier) (Identifier) (Identifier)+ | DupRuleName (NontermIdent) (ConstructorIdent) (Identifier)+ | DupSet (NontermIdent) (NontermIdent)+ | DupSig (NontermIdent) (ConstructorIdent) (Identifier)+ | DupSynAttr (NontermIdent) (Identifier) (Identifier)+ | DupSynonym (NontermIdent) (NontermIdent)+ | DupUnique (NontermIdent) (ConstructorIdent) (Identifier)+ | HsParseError (Pos) (String)+ | IncompatibleAttachKind (Identifier) (VisitKind)+ | IncompatibleRuleKind (Identifier) (VisitKind)+ | IncompatibleVisitKind (Identifier) (VisitIdentifier) (VisitKind) (VisitKind)+ | 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)+ | MissingSyn (NontermIdent) (Identifier)+ | MissingTypeSig (NontermIdent) (ConstructorIdent) (Identifier)+ | MissingUnique (NontermIdent) (Identifier)+ | ParserError (Pos) (String) (String)+ | SuperfluousRule (NontermIdent) (ConstructorIdent) (Identifier) (Identifier)+ | UndefAlt (NontermIdent) (ConstructorIdent)+ | UndefAttr (NontermIdent) (ConstructorIdent) (Identifier) (Identifier) (Bool)+ | UndefChild (NontermIdent) (ConstructorIdent) (Identifier)+ | UndefLocal (NontermIdent) (ConstructorIdent) (Identifier)+ | UndefNont (NontermIdent) -- Errors ------------------------------------------------------ {- alternatives:@@ -196,4 +196,4 @@ child tl : Errors alternative Nil: -}-type Errors = [Error ]+type Errors = [Error]
src-derived/ExecutionPlan.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.39.1.0 (src-ag/ExecutionPlan.ag)+-- UUAGC 0.9.40.1 (src-ag/ExecutionPlan.ag) module ExecutionPlan where {-# LINE 2 "src-ag/ExecutionPlan.ag" #-} @@ -14,7 +14,7 @@ import Data.Set(Set) import qualified Data.Map as Map import Data.Map(Map)-{-# LINE 18 "dist/build/uuagc/uuagc-tmp/ExecutionPlan.hs" #-}+{-# LINE 18 "dist/build/ExecutionPlan.hs" #-} -- EChild ------------------------------------------------------ {- alternatives:@@ -29,8 +29,8 @@ child name : {Identifier} child tp : {Type} -}-data EChild = EChild (Identifier) (Type) (ChildKind) (Bool) ((Maybe [Identifier])) (Bool) - | ETerm (Identifier) (Type) +data EChild = EChild (Identifier) (Type) (ChildKind) (Bool) ((Maybe [Identifier])) (Bool)+ | ETerm (Identifier) (Type) -- EChildren --------------------------------------------------- {- alternatives:@@ -39,7 +39,7 @@ child tl : EChildren alternative Nil: -}-type EChildren = [EChild ]+type EChildren = [EChild] -- ENonterminal ------------------------------------------------ {- alternatives:@@ -55,7 +55,7 @@ child recursive : {Bool} child hoInfo : {HigherOrderInfo} -}-data ENonterminal = ENonterminal (NontermIdent) (([Identifier])) (ClassContext) (StateIdentifier) ((Maybe VisitIdentifier)) ((Map StateIdentifier StateCtx)) ((Map StateIdentifier StateCtx)) (EProductions ) (Bool) (HigherOrderInfo) +data ENonterminal = ENonterminal (NontermIdent) (([Identifier])) (ClassContext) (StateIdentifier) ((Maybe VisitIdentifier)) ((Map StateIdentifier StateCtx)) ((Map StateIdentifier StateCtx)) (EProductions) (Bool) (HigherOrderInfo) -- ENonterminals ----------------------------------------------- {- alternatives:@@ -64,7 +64,7 @@ child tl : ENonterminals alternative Nil: -}-type ENonterminals = [ENonterminal ]+type ENonterminals = [ENonterminal] -- EProduction ------------------------------------------------- {- alternatives:@@ -76,7 +76,7 @@ child children : EChildren child visits : Visits -}-data EProduction = EProduction (ConstructorIdent) (([Identifier])) (([Type])) (ERules ) (EChildren ) (Visits ) +data EProduction = EProduction (ConstructorIdent) (([Identifier])) (([Type])) (ERules) (EChildren) (Visits) -- EProductions ------------------------------------------------ {- alternatives:@@ -85,7 +85,7 @@ child tl : EProductions alternative Nil: -}-type EProductions = [EProduction ]+type EProductions = [EProduction] -- ERule ------------------------------------------------------- {- alternatives:@@ -99,7 +99,7 @@ child pure : {Bool} child mbError : {Maybe Error} -}-data ERule = ERule (Identifier) (Pattern) (Expression) (Bool) (String) (Bool) (Bool) ((Maybe Error)) +data ERule = ERule (Identifier) (Pattern) (Expression) (Bool) (String) (Bool) (Bool) ((Maybe Error)) -- ERules ------------------------------------------------------ {- alternatives:@@ -108,7 +108,7 @@ child tl : ERules alternative Nil: -}-type ERules = [ERule ]+type ERules = [ERule] -- ExecutionPlan ----------------------------------------------- {- alternatives:@@ -118,7 +118,7 @@ child wrappers : {Set NontermIdent} child derivings : {Derivings} -}-data ExecutionPlan = ExecutionPlan (ENonterminals ) (TypeSyns) ((Set NontermIdent)) (Derivings) +data ExecutionPlan = ExecutionPlan (ENonterminals) (TypeSyns) ((Set NontermIdent)) (Derivings) -- Visit ------------------------------------------------------- {- alternatives:@@ -131,7 +131,7 @@ child steps : VisitSteps child kind : {VisitKind} -}-data Visit = Visit (VisitIdentifier) (StateIdentifier) (StateIdentifier) ((Set Identifier)) ((Set Identifier)) (VisitSteps ) (VisitKind) +data Visit = Visit (VisitIdentifier) (StateIdentifier) (StateIdentifier) ((Set Identifier)) ((Set Identifier)) (VisitSteps) (VisitKind) -- VisitStep --------------------------------------------------- {- alternatives:@@ -149,11 +149,11 @@ alternative Sim: child steps : VisitSteps -}-data VisitStep = ChildIntro (Identifier) - | ChildVisit (Identifier) (NontermIdent) (VisitIdentifier) - | PureGroup (VisitSteps ) (Bool) - | Sem (Identifier) - | Sim (VisitSteps ) +data VisitStep = ChildIntro (Identifier)+ | ChildVisit (Identifier) (NontermIdent) (VisitIdentifier)+ | PureGroup (VisitSteps) (Bool)+ | Sem (Identifier)+ | Sim (VisitSteps) -- VisitSteps -------------------------------------------------- {- alternatives:@@ -162,7 +162,7 @@ child tl : VisitSteps alternative Nil: -}-type VisitSteps = [VisitStep ]+type VisitSteps = [VisitStep] -- Visits ------------------------------------------------------ {- alternatives:@@ -171,4 +171,4 @@ child tl : Visits alternative Nil: -}-type Visits = [Visit ]+type Visits = [Visit]
src-derived/ExecutionPlan2Hs.hs view
@@ -1,9296 +1,9594 @@ --- UUAGC 0.9.39.1.0 (src-ag/ExecutionPlan2Hs.ag)-module ExecutionPlan2Hs where-{-# LINE 7 "src-ag/ExecutionPlan2Hs.ag" #-}--import ExecutionPlan-import Pretty-import PPUtil-import Options-import Data.Monoid(mappend,mempty)-import Data.Maybe-import Debug.Trace-import System.IO-import System.Directory-import System.FilePath-import UU.Scanner.Position--import TokenDef-import HsToken-import ErrorMessages--import Data.Set (Set)-import qualified Data.Set as Set-import Data.Map (Map)-import qualified Data.Map as Map-import Data.Sequence(Seq)-import qualified Data.Sequence as Seq-import Data.Foldable(toList)-{-# LINE 31 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 2 "src-ag/ExecutionPlan.ag" #-}---- VisitSyntax.ag imports-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import CommonTypes-import ErrorMessages--import qualified Data.Set as Set-import Data.Set(Set)-import qualified Data.Map as Map-import Data.Map(Map)-{-# LINE 45 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 2 "src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 52 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 2 "src-ag/Expression.ag" #-}--import UU.Scanner.Position(Pos)-import HsToken-{-# LINE 58 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 2 "src-ag/HsToken.ag" #-}--import CommonTypes-import UU.Scanner.Position(Pos)-{-# LINE 64 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}-{-# LINE 161 "src-ag/ExecutionPlan2Hs.ag" #-}--classCtxsToDocs :: ClassContext -> [PP_Doc]-classCtxsToDocs = map toDoc where- toDoc (ident,args) = (ident >#< ppSpaced (map pp_parens args))--classConstrsToDocs :: [Type] -> [PP_Doc]-classConstrsToDocs = map ppTp--ppClasses :: [PP_Doc] -> PP_Doc-ppClasses [] = empty-ppClasses xs = pp_block "(" ")" "," xs >#< "=>"--ppQuants :: [Identifier] -> PP_Doc-ppQuants [] = empty-ppQuants ps = "forall" >#< ppSpaced ps >#< "."-{-# LINE 81 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 190 "src-ag/ExecutionPlan2Hs.ag" #-}---- first parameter indicates: generate a record or not-ppConFields :: Bool -> [PP_Doc] -> PP_Doc-ppConFields True flds = ppListSep "{" "}" ", " flds-ppConFields False flds = ppSpaced flds-{-# LINE 89 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 216 "src-ag/ExecutionPlan2Hs.ag" #-}--ppTp :: Type -> PP_Doc-ppTp (Haskell s) = text s-ppTp (NT nt args for) = prefix >|< nt >#< ppSpaced (map pp_parens args) where- prefix | for = text "T_"- | otherwise = empty-{-# LINE 98 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 332 "src-ag/ExecutionPlan2Hs.ag" #-}-type VisitStateState = (VisitIdentifier,StateIdentifier, StateIdentifier)-{-# LINE 102 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 428 "src-ag/ExecutionPlan2Hs.ag" #-}--conNmTVisit nt vId = "T_" >|< nt >|< "_v" >|< vId-conNmTVisitIn nt vId = "T_" >|< nt >|< "_vIn" >|< vId-conNmTVisitOut nt vId = "T_" >|< nt >|< "_vOut" >|< vId-conNmTNextVisit nt stId = "T_" >|< nt >|< "_s" >|< stId--ppMonadType :: Options -> PP_Doc-ppMonadType opts- | parallelInvoke opts = text "IO"- | otherwise = text "Identity"-{-# LINE 115 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 578 "src-ag/ExecutionPlan2Hs.ag" #-}--ppDefor :: Type -> PP_Doc-ppDefor (NT nt args _) = "T_" >|< nt >#< ppSpaced (map pp_parens args)-ppDefor (Haskell s) = text s-{-# LINE 122 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 693 "src-ag/ExecutionPlan2Hs.ag" #-}--mklet :: (PP a, PP b, PP c) => a -> b -> c -> PP_Doc-mklet prefix defs body =- prefix >#< "let"- >-< indent 3 defs- >-< indent 2 "in" >#< body-{-# LINE 131 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 759 "src-ag/ExecutionPlan2Hs.ag" #-}--resultValName :: String-resultValName = "__result_"--nextStName :: String-nextStName = "__st_"-{-# LINE 140 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 830 "src-ag/ExecutionPlan2Hs.ag" #-}--parResultName :: String-parResultName = "__outcome_"--fmtDecl :: PP a => Bool -> FormatMode -> a -> PP_Doc-fmtDecl declPure fmt decl = case fmt of- FormatLetDecl -> pp decl- FormatLetLine -> "let" >#< decl >#< "in"- FormatDo | declPure -> "let" >#< decl- | otherwise -> pp decl-{-# LINE 153 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 944 "src-ag/ExecutionPlan2Hs.ag" #-}--stname :: Identifier -> Int -> String-stname child st = "_" ++ getName child ++ "X" ++ show st---- should actually return some conversion info-compatibleAttach :: VisitKind -> NontermIdent -> Options -> Bool-compatibleAttach _ _ _ = True--unMon :: Options -> PP_Doc-unMon options- | parallelInvoke options = text "System.IO.Unsafe.unsafePerformIO" -- IO monad- | otherwise = text "Control.Monad.Identity.runIdentity" -- identity monad-{-# LINE 168 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 1041 "src-ag/ExecutionPlan2Hs.ag" #-}--dummyPat :: Options -> Bool -> PP_Doc-dummyPat opts noArgs- | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples- | tupleAsDummyToken opts = if strictDummyToken opts- then text "()"- else text "(_ :: ())"- | otherwise = let match | strictDummyToken opts = "!_"- | otherwise = "_"- in pp_parens (match >#< "::" >#< dummyType opts noArgs)- where match | strictDummyToken opts = "(!_)"- | otherwise = "_"--dummyArg :: Options -> Bool -> PP_Doc-dummyArg opts noArgs- | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples- | tupleAsDummyToken opts = text "()"- | otherwise = text "GHC.Prim.realWorld#"--dummyType :: Options -> Bool -> PP_Doc-dummyType opts noArgs- | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples- | tupleAsDummyToken opts = text "()"- | otherwise = text "(GHC.Prim.State# GHC.Prim.RealWorld)"-{-# LINE 195 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 1067 "src-ag/ExecutionPlan2Hs.ag" #-}---- rules are "deinlined" to prevent needless code duplication.--- if there is only a bit of duplication, we allow ghc to decide if it is worth it.--- if the duplication crosses this threshold, however, we tell ghc definitely not to inline it.-ruleInlineThresholdSoft :: Int-ruleInlineThresholdSoft = 3--ruleInlineThresholdHard :: Int-ruleInlineThresholdHard = 5--reallyOftenUsedThreshold :: Int-reallyOftenUsedThreshold = 12-{-# LINE 210 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 1122 "src-ag/ExecutionPlan2Hs.ag" #-}--data NonLocalAttr- = AttrInh Identifier Identifier- | AttrSyn Identifier Identifier--mkNonLocalAttr :: Bool -> Identifier -> Identifier -> NonLocalAttr-mkNonLocalAttr True = AttrInh -- True: inherited attr-mkNonLocalAttr False = AttrSyn--lookupAttrType :: NonLocalAttr -> Map Identifier Attributes -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc-lookupAttrType (AttrInh child name) inhs _ = lookupType child name inhs-lookupAttrType (AttrSyn child name) _ syns = lookupType child name syns---- Note: if the child takes type parameters, the type of an attribute of this child may refer to these parameters. This means that--- the actual type of the attribute needs to have its type parameters substituted with the actual type argument of the child.--- However, for now we simply decide to return Nothing in this case, which skips the type annotation.-lookupType :: Identifier -> Identifier -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc-lookupType child name attrMp childMp- | noParameters childTp = Just ppDoc- | otherwise = Nothing- where- attrTp = Map.findWithDefault (error "lookupType: the attribute is not in the attrs of the child") name childAttrs- childAttrs = Map.findWithDefault (error "lookupType: the attributes of the nonterm are not in the map") nonterm attrMp- nonterm = extractNonterminal childTp- childTp = Map.findWithDefault (error ("lookupType: the child " ++ show child ++ "is not in the appropriate map")) child childMp- ppDoc = ppTp attrTp--noParameters :: Type -> Bool-noParameters (Haskell _) = True-noParameters (NT _ args _) = null args-{-# LINE 243 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 1208 "src-ag/ExecutionPlan2Hs.ag" #-}---- a `compatibleKind` b means: can kind b be invoked from a-compatibleKind :: VisitKind -> VisitKind -> Bool-compatibleKind _ _ = True--compatibleRule :: VisitKind -> Bool -> Bool-compatibleRule (VisitPure _) False = False-compatibleRule _ _ = True-{-# LINE 254 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 1230 "src-ag/ExecutionPlan2Hs.ag" #-}--unionWithSum = Map.unionWith (+)-{-# LINE 259 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 1253 "src-ag/ExecutionPlan2Hs.ag" #-}--uwSetUnion :: (Ord a, Ord b) => Map a (Set b) -> Map a (Set b) -> Map a (Set b)-uwSetUnion = Map.unionWith Set.union--uwMapUnion :: (Ord a, Ord b) => Map a (Map b c) -> Map a (Map b c) -> Map a (Map b c)-uwMapUnion = Map.unionWith Map.union-{-# LINE 268 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 1470 "src-ag/ExecutionPlan2Hs.ag" #-}--renderDocs :: [PP_Doc] -> String-renderDocs pps = foldr (.) id (map (\d -> (disp d 50000) . ( '\n':) ) pps) ""--writeModule :: FilePath -> [PP_Doc] -> IO ()-writeModule path docs- = do bExists <- doesFileExist path- if bExists- then do input <- readFile path- seq (length input) (return ())- if input /= output- then dumpIt- else return ()- else dumpIt- where- output = renderDocs docs- dumpIt = writeFile path output-{-# LINE 288 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--{-# LINE 1617 "src-ag/ExecutionPlan2Hs.ag" #-}--ppNoInline :: PP a => a -> PP_Doc-ppNoInline = ppPragmaBinding "NOINLINE"--ppInline :: PP a => a -> PP_Doc-ppInline = ppPragmaBinding "INLINE"--ppInlinable :: PP a => a -> PP_Doc-ppInlinable = ppPragmaBinding "INLINABLE"--ppPragmaBinding :: (PP a, PP b) => a -> b -> PP_Doc-ppPragmaBinding pragma nm = "{-#" >#< pragma >#< nm >#< "#-}"--ppCostCentre :: PP a => a -> PP_Doc-ppCostCentre nm = "{-#" >#< "SCC" >#< "\"" >|< nm >|< "\"" >#< "#-}"--warrenFlagsPP :: Options -> PP_Doc-warrenFlagsPP options = vlist- [ pp "{-# LANGUAGE Rank2Types, GADTs #-}"- , if bangpats options- then pp "{-# LANGUAGE BangPatterns #-}"- else empty- , if noPerRuleTypeSigs options && noPerStateTypeSigs options- then empty- else pp "{-# LANGUAGE ScopedTypeVariables #-}"- , if tupleAsDummyToken options- then empty- else pp "{-# LANGUAGE ScopedTypeVariables, MagicHash #-}"- , -- not that the meaning of "unbox" is here that strict fields in data types may be- -- unboxed if possible. This may affect user-defined data types declared in the module.- -- Unfortunately, we cannot turn it on for only the AG generated data types without- -- causing a zillion of warnings.- if unbox options && bangpats options- then pp $ "{-# OPTIONS_GHC -funbox-strict-fields -fstrictness #-}"- else empty- , if parallelInvoke options && not (noEagerBlackholing options)- then pp $ "{-# OPTIONS_GHC -feager-blackholing #-}"- else empty- ]-{-# LINE 330 "dist/build/uuagc/uuagc-tmp/ExecutionPlan2Hs.hs" #-}--- EChild -------------------------------------------------------{-- visit 0:- inherited attributes:- allInitStates : Map NontermIdent Int- con : ConstructorIdent- importBlocks : PP_Doc- mainFile : String- mainName : String- moduleHeader : String -> String -> String -> Bool -> String- nt : NontermIdent- options : Options- pragmaBlocks : String- textBlocks : PP_Doc- synthesized attributes:- argnamesw : PP_Doc - argpats : PP_Doc - argtps : PP_Doc - childTypes : Map Identifier Type- childintros : Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))- datatype : PP_Doc- terminaldefs : Set String- alternatives:- alternative EChild:- child name : {Identifier}- child tp : {Type}- child kind : {ChildKind}- child hasAround : {Bool}- child merges : {Maybe [Identifier]}- child isMerged : {Bool}- visit 0:- local tpDoc : _- local strNm : _- local field : _- local addStrict : _- local argpats : _- local isDefor : _- local valcode : _- local aroundcode : _- local introcode : _- local nt : _- local addbang : _- local initSt : _- alternative ETerm:- child name : {Identifier}- child tp : {Type}- visit 0:- local tpDoc : _- local strNm : _- local field : _- local addStrict : _- local argpats : _- local addbang : _--}--- cata-sem_EChild :: EChild ->- T_EChild -sem_EChild (EChild _name _tp _kind _hasAround _merges _isMerged ) =- (sem_EChild_EChild _name _tp _kind _hasAround _merges _isMerged )-sem_EChild (ETerm _name _tp ) =- (sem_EChild_ETerm _name _tp )--- semantic domain-newtype T_EChild = T_EChild ((Map NontermIdent Int) ->- ConstructorIdent ->- PP_Doc ->- String ->- String ->- (String -> String -> String -> Bool -> String) ->- NontermIdent ->- Options ->- String ->- PP_Doc ->- ( ( PP_Doc ),( PP_Doc ),( PP_Doc ),(Map Identifier Type),(Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))),PP_Doc,(Set String)))-data Inh_EChild = Inh_EChild {allInitStates_Inh_EChild :: (Map NontermIdent Int),con_Inh_EChild :: ConstructorIdent,importBlocks_Inh_EChild :: PP_Doc,mainFile_Inh_EChild :: String,mainName_Inh_EChild :: String,moduleHeader_Inh_EChild :: (String -> String -> String -> Bool -> String),nt_Inh_EChild :: NontermIdent,options_Inh_EChild :: Options,pragmaBlocks_Inh_EChild :: String,textBlocks_Inh_EChild :: PP_Doc}-data Syn_EChild = Syn_EChild {argnamesw_Syn_EChild :: ( PP_Doc ),argpats_Syn_EChild :: ( PP_Doc ),argtps_Syn_EChild :: ( PP_Doc ),childTypes_Syn_EChild :: (Map Identifier Type),childintros_Syn_EChild :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))),datatype_Syn_EChild :: PP_Doc,terminaldefs_Syn_EChild :: (Set String)}-wrap_EChild :: T_EChild ->- Inh_EChild ->- Syn_EChild -wrap_EChild (T_EChild sem ) (Inh_EChild _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks ) =- (let ( _lhsOargnamesw,_lhsOargpats,_lhsOargtps,_lhsOchildTypes,_lhsOchildintros,_lhsOdatatype,_lhsOterminaldefs) = sem _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks - in (Syn_EChild _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs ))-sem_EChild_EChild :: Identifier ->- Type ->- ChildKind ->- Bool ->- (Maybe [Identifier]) ->- Bool ->- T_EChild -sem_EChild_EChild name_ tp_ kind_ hasAround_ merges_ isMerged_ =- (T_EChild (\ _lhsIallInitStates- _lhsIcon- _lhsIimportBlocks- _lhsImainFile- _lhsImainName- _lhsImoduleHeader- _lhsInt- _lhsIoptions- _lhsIpragmaBlocks- _lhsItextBlocks ->- (let _lhsOdatatype :: PP_Doc- _lhsOargnamesw :: ( PP_Doc )- _lhsOargtps :: ( PP_Doc )- _lhsOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))- _lhsOchildTypes :: (Map Identifier Type)- _lhsOterminaldefs :: (Set String)- _lhsOargpats :: ( PP_Doc )- -- "src-ag/ExecutionPlan2Hs.ag"(line 204, column 7)- _tpDoc =- ({-# LINE 204 "src-ag/ExecutionPlan2Hs.ag" #-}- _addStrict $ pp_parens $ ppTp $ removeDeforested tp_- {-# LINE 441 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 205, column 7)- _strNm =- ({-# LINE 205 "src-ag/ExecutionPlan2Hs.ag" #-}- recordFieldname _lhsInt _lhsIcon name_- {-# LINE 447 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 206, column 7)- _field =- ({-# LINE 206 "src-ag/ExecutionPlan2Hs.ag" #-}- if dataRecords _lhsIoptions- then _strNm >#< "::" >#< _tpDoc- else _tpDoc- {-# LINE 455 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 209, column 7)- _addStrict =- ({-# LINE 209 "src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if strictData _lhsIoptions then "!" >|< x else x- {-# LINE 461 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 210, column 13)- _lhsOdatatype =- ({-# LINE 210 "src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- ChildAttr -> empty- _ -> _field- {-# LINE 469 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 301, column 12)- _lhsOargnamesw =- ({-# LINE 301 "src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- ChildSyntax -> "(" >#< "sem_" >|< _nt >#< "field_" >|< name_ >#< ")"- ChildAttr -> empty- ChildReplace tp -> "(" >#< "sem_" >|< extractNonterminal tp >#< "field_" >|< name_ >#< ")"- {-# LINE 478 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 567, column 12)- _lhsOargtps =- ({-# LINE 567 "src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- ChildSyntax -> ppDefor tp_ >#< "->"- ChildReplace tp -> ppDefor tp >#< "->"- _ -> empty- {-# LINE 487 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 571, column 12)- _argpats =- ({-# LINE 571 "src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- ChildSyntax -> "field_" >|< name_- ChildReplace _ -> "field_" >|< name_- _ -> empty- {-# LINE 496 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 898, column 12)- _lhsOchildintros =- ({-# LINE 898 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton name_ _introcode- {-# LINE 502 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 899, column 12)- _isDefor =- ({-# LINE 899 "src-ag/ExecutionPlan2Hs.ag" #-}- case tp_ of- NT _ _ defor -> defor- _ -> False- {-# LINE 510 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 902, column 12)- _valcode =- ({-# LINE 902 "src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- ChildSyntax -> "field_" >|< name_- ChildAttr ->- let prefix | not _isDefor = if lateHigherOrderBinding _lhsIoptions- then lateSemNtLabel _nt >#< lhsname True idLateBindingAttr- else "sem_" >|< _nt- | otherwise = empty- in pp_parens (prefix >#< instname name_)- ChildReplace _ ->- pp_parens (instname name_ >#< "field_" >|< name_)- {-# LINE 525 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 913, column 12)- _aroundcode =- ({-# LINE 913 "src-ag/ExecutionPlan2Hs.ag" #-}- if hasAround_- then locname name_ >|< "_around"- else empty- {-# LINE 533 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 916, column 12)- _introcode =- ({-# LINE 916 "src-ag/ExecutionPlan2Hs.ag" #-}- \kind fmtMode ->- let pat = text $ stname name_ _initSt- patStrict = _addbang pat- attach = "attach_T_" >|< _nt >#< pp_parens (_aroundcode >#< _valcode )- runAttach = unMon _lhsIoptions >#< pp_parens attach- decl = case kind of- VisitPure False -> pat >#< "=" >#< runAttach- VisitPure True -> patStrict >#< "=" >#< runAttach- VisitMonadic -> patStrict >#< "<-" >#< attach- in if compatibleAttach kind _nt _lhsIoptions- then Right ( fmtDecl False fmtMode decl- , Set.singleton (stname name_ _initSt )- , case kind_ of- ChildAttr -> Map.insert (instname name_) Nothing $- ( if _isDefor || not (lateHigherOrderBinding _lhsIoptions)- then id- else Map.insert (lhsname True idLateBindingAttr) (Just $ AttrInh _LHS idLateBindingAttr)- ) $- ( if hasAround_- then Map.insert (locname (name_) ++ "_around") Nothing- else id- ) $ Map.empty- ChildReplace _ -> Map.singleton (instname name_) Nothing- ChildSyntax -> Map.empty- )- else Left $ IncompatibleAttachKind name_ kind- {-# LINE 564 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 942, column 12)- _nt =- ({-# LINE 942 "src-ag/ExecutionPlan2Hs.ag" #-}- extractNonterminal tp_- {-# LINE 570 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1498, column 37)- _addbang =- ({-# LINE 1498 "src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 576 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1550, column 3)- _lhsOchildTypes =- ({-# LINE 1550 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton name_ tp_- {-# LINE 582 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1594, column 3)- _initSt =- ({-# LINE 1594 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault (error "nonterminal not in allInitStates map") _nt _lhsIallInitStates- {-# LINE 588 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1264, column 42)- _lhsOterminaldefs =- ({-# LINE 1264 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.empty- {-# LINE 594 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (from local)- _lhsOargpats =- ({-# LINE 562 "src-ag/ExecutionPlan2Hs.ag" #-}- _argpats- {-# LINE 600 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOargnamesw,_lhsOargpats,_lhsOargtps,_lhsOchildTypes,_lhsOchildintros,_lhsOdatatype,_lhsOterminaldefs))) )-sem_EChild_ETerm :: Identifier ->- Type ->- T_EChild -sem_EChild_ETerm name_ tp_ =- (T_EChild (\ _lhsIallInitStates- _lhsIcon- _lhsIimportBlocks- _lhsImainFile- _lhsImainName- _lhsImoduleHeader- _lhsInt- _lhsIoptions- _lhsIpragmaBlocks- _lhsItextBlocks ->- (let _lhsOdatatype :: PP_Doc- _lhsOargnamesw :: ( PP_Doc )- _lhsOargtps :: ( PP_Doc )- _lhsOterminaldefs :: (Set String)- _lhsOchildTypes :: (Map Identifier Type)- _lhsOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))- _lhsOargpats :: ( PP_Doc )- -- "src-ag/ExecutionPlan2Hs.ag"(line 204, column 7)- _tpDoc =- ({-# LINE 204 "src-ag/ExecutionPlan2Hs.ag" #-}- _addStrict $ pp_parens $ ppTp $ removeDeforested tp_- {-# LINE 628 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 205, column 7)- _strNm =- ({-# LINE 205 "src-ag/ExecutionPlan2Hs.ag" #-}- recordFieldname _lhsInt _lhsIcon name_- {-# LINE 634 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 206, column 7)- _field =- ({-# LINE 206 "src-ag/ExecutionPlan2Hs.ag" #-}- if dataRecords _lhsIoptions- then _strNm >#< "::" >#< _tpDoc- else _tpDoc- {-# LINE 642 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 209, column 7)- _addStrict =- ({-# LINE 209 "src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if strictData _lhsIoptions then "!" >|< x else x- {-# LINE 648 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 214, column 13)- _lhsOdatatype =- ({-# LINE 214 "src-ag/ExecutionPlan2Hs.ag" #-}- _field- {-# LINE 654 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 305, column 12)- _lhsOargnamesw =- ({-# LINE 305 "src-ag/ExecutionPlan2Hs.ag" #-}- text $ locname name_- {-# LINE 660 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 575, column 12)- _lhsOargtps =- ({-# LINE 575 "src-ag/ExecutionPlan2Hs.ag" #-}- (pp_parens $ show tp_) >#< "->"- {-# LINE 666 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 576, column 12)- _argpats =- ({-# LINE 576 "src-ag/ExecutionPlan2Hs.ag" #-}- _addbang $ text $ locname name_- {-# LINE 672 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1267, column 3)- _lhsOterminaldefs =- ({-# LINE 1267 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.singleton $ locname name_- {-# LINE 678 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1499, column 37)- _addbang =- ({-# LINE 1499 "src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 684 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1550, column 3)- _lhsOchildTypes =- ({-# LINE 1550 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton name_ tp_- {-# LINE 690 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 889, column 41)- _lhsOchildintros =- ({-# LINE 889 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 696 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (from local)- _lhsOargpats =- ({-# LINE 562 "src-ag/ExecutionPlan2Hs.ag" #-}- _argpats- {-# LINE 702 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOargnamesw,_lhsOargpats,_lhsOargtps,_lhsOchildTypes,_lhsOchildintros,_lhsOdatatype,_lhsOterminaldefs))) )--- EChildren ----------------------------------------------------{-- visit 0:- inherited attributes:- allInitStates : Map NontermIdent Int- con : ConstructorIdent- importBlocks : PP_Doc- mainFile : String- mainName : String- moduleHeader : String -> String -> String -> Bool -> String- nt : NontermIdent- options : Options- pragmaBlocks : String- textBlocks : PP_Doc- synthesized attributes:- argnamesw : [PP_Doc]- argpats : [PP_Doc] - argtps : [PP_Doc] - childTypes : Map Identifier Type- childintros : Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))- datatype : [PP_Doc]- terminaldefs : Set String- alternatives:- alternative Cons:- child hd : EChild - child tl : EChildren - alternative Nil:--}--- cata-sem_EChildren :: EChildren ->- T_EChildren -sem_EChildren list =- (Prelude.foldr sem_EChildren_Cons sem_EChildren_Nil (Prelude.map sem_EChild list) )--- semantic domain-newtype T_EChildren = T_EChildren ((Map NontermIdent Int) ->- ConstructorIdent ->- PP_Doc ->- String ->- String ->- (String -> String -> String -> Bool -> String) ->- NontermIdent ->- Options ->- String ->- PP_Doc ->- ( ([PP_Doc]),( [PP_Doc] ),( [PP_Doc] ),(Map Identifier Type),(Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))),([PP_Doc]),(Set String)))-data Inh_EChildren = Inh_EChildren {allInitStates_Inh_EChildren :: (Map NontermIdent Int),con_Inh_EChildren :: ConstructorIdent,importBlocks_Inh_EChildren :: PP_Doc,mainFile_Inh_EChildren :: String,mainName_Inh_EChildren :: String,moduleHeader_Inh_EChildren :: (String -> String -> String -> Bool -> String),nt_Inh_EChildren :: NontermIdent,options_Inh_EChildren :: Options,pragmaBlocks_Inh_EChildren :: String,textBlocks_Inh_EChildren :: PP_Doc}-data Syn_EChildren = Syn_EChildren {argnamesw_Syn_EChildren :: ([PP_Doc]),argpats_Syn_EChildren :: ( [PP_Doc] ),argtps_Syn_EChildren :: ( [PP_Doc] ),childTypes_Syn_EChildren :: (Map Identifier Type),childintros_Syn_EChildren :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))),datatype_Syn_EChildren :: ([PP_Doc]),terminaldefs_Syn_EChildren :: (Set String)}-wrap_EChildren :: T_EChildren ->- Inh_EChildren ->- Syn_EChildren -wrap_EChildren (T_EChildren sem ) (Inh_EChildren _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks ) =- (let ( _lhsOargnamesw,_lhsOargpats,_lhsOargtps,_lhsOchildTypes,_lhsOchildintros,_lhsOdatatype,_lhsOterminaldefs) = sem _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks - in (Syn_EChildren _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs ))-sem_EChildren_Cons :: T_EChild ->- T_EChildren ->- T_EChildren -sem_EChildren_Cons (T_EChild hd_ ) (T_EChildren tl_ ) =- (T_EChildren (\ _lhsIallInitStates- _lhsIcon- _lhsIimportBlocks- _lhsImainFile- _lhsImainName- _lhsImoduleHeader- _lhsInt- _lhsIoptions- _lhsIpragmaBlocks- _lhsItextBlocks ->- (let _lhsOargnamesw :: ([PP_Doc])- _lhsOargpats :: ( [PP_Doc] )- _lhsOargtps :: ( [PP_Doc] )- _lhsOchildTypes :: (Map Identifier Type)- _lhsOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))- _lhsOdatatype :: ([PP_Doc])- _lhsOterminaldefs :: (Set String)- _hdOallInitStates :: (Map NontermIdent Int)- _hdOcon :: ConstructorIdent- _hdOimportBlocks :: PP_Doc- _hdOmainFile :: String- _hdOmainName :: String- _hdOmoduleHeader :: (String -> String -> String -> Bool -> String)- _hdOnt :: NontermIdent- _hdOoptions :: Options- _hdOpragmaBlocks :: String- _hdOtextBlocks :: PP_Doc- _tlOallInitStates :: (Map NontermIdent Int)- _tlOcon :: ConstructorIdent- _tlOimportBlocks :: PP_Doc- _tlOmainFile :: String- _tlOmainName :: String- _tlOmoduleHeader :: (String -> String -> String -> Bool -> String)- _tlOnt :: NontermIdent- _tlOoptions :: Options- _tlOpragmaBlocks :: String- _tlOtextBlocks :: PP_Doc- _hdIargnamesw :: ( PP_Doc )- _hdIargpats :: ( PP_Doc )- _hdIargtps :: ( PP_Doc )- _hdIchildTypes :: (Map Identifier Type)- _hdIchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))- _hdIdatatype :: PP_Doc- _hdIterminaldefs :: (Set String)- _tlIargnamesw :: ([PP_Doc])- _tlIargpats :: ( [PP_Doc] )- _tlIargtps :: ( [PP_Doc] )- _tlIchildTypes :: (Map Identifier Type)- _tlIchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))- _tlIdatatype :: ([PP_Doc])- _tlIterminaldefs :: (Set String)- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 298, column 32)- _lhsOargnamesw =- ({-# LINE 298 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIargnamesw : _tlIargnamesw- {-# LINE 817 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 564, column 30)- _lhsOargpats =- ({-# LINE 564 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIargpats : _tlIargpats- {-# LINE 823 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 563, column 30)- _lhsOargtps =- ({-# LINE 563 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIargtps : _tlIargtps- {-# LINE 829 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1543, column 40)- _lhsOchildTypes =- ({-# LINE 1543 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIchildTypes `mappend` _tlIchildTypes- {-# LINE 835 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 889, column 41)- _lhsOchildintros =- ({-# LINE 889 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIchildintros `Map.union` _tlIchildintros- {-# LINE 841 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 199, column 31)- _lhsOdatatype =- ({-# LINE 199 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIdatatype : _tlIdatatype- {-# LINE 847 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1264, column 42)- _lhsOterminaldefs =- ({-# LINE 1264 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIterminaldefs `Set.union` _tlIterminaldefs- {-# LINE 853 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallInitStates =- ({-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInitStates- {-# LINE 859 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOcon =- ({-# LINE 66 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIcon- {-# LINE 865 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOimportBlocks =- ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIimportBlocks- {-# LINE 871 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOmainFile =- ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainFile- {-# LINE 877 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOmainName =- ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainName- {-# LINE 883 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOmoduleHeader =- ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImoduleHeader- {-# LINE 889 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOnt =- ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsInt- {-# LINE 895 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 901 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOpragmaBlocks =- ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIpragmaBlocks- {-# LINE 907 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOtextBlocks =- ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsItextBlocks- {-# LINE 913 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallInitStates =- ({-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInitStates- {-# LINE 919 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOcon =- ({-# LINE 66 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIcon- {-# LINE 925 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOimportBlocks =- ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIimportBlocks- {-# LINE 931 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOmainFile =- ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainFile- {-# LINE 937 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOmainName =- ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainName- {-# LINE 943 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOmoduleHeader =- ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImoduleHeader- {-# LINE 949 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOnt =- ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsInt- {-# LINE 955 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 961 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOpragmaBlocks =- ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIpragmaBlocks- {-# LINE 967 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOtextBlocks =- ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsItextBlocks- {-# LINE 973 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _hdIargnamesw,_hdIargpats,_hdIargtps,_hdIchildTypes,_hdIchildintros,_hdIdatatype,_hdIterminaldefs) =- hd_ _hdOallInitStates _hdOcon _hdOimportBlocks _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnt _hdOoptions _hdOpragmaBlocks _hdOtextBlocks - ( _tlIargnamesw,_tlIargpats,_tlIargtps,_tlIchildTypes,_tlIchildintros,_tlIdatatype,_tlIterminaldefs) =- tl_ _tlOallInitStates _tlOcon _tlOimportBlocks _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnt _tlOoptions _tlOpragmaBlocks _tlOtextBlocks - in ( _lhsOargnamesw,_lhsOargpats,_lhsOargtps,_lhsOchildTypes,_lhsOchildintros,_lhsOdatatype,_lhsOterminaldefs))) )-sem_EChildren_Nil :: T_EChildren -sem_EChildren_Nil =- (T_EChildren (\ _lhsIallInitStates- _lhsIcon- _lhsIimportBlocks- _lhsImainFile- _lhsImainName- _lhsImoduleHeader- _lhsInt- _lhsIoptions- _lhsIpragmaBlocks- _lhsItextBlocks ->- (let _lhsOargnamesw :: ([PP_Doc])- _lhsOargpats :: ( [PP_Doc] )- _lhsOargtps :: ( [PP_Doc] )- _lhsOchildTypes :: (Map Identifier Type)- _lhsOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))- _lhsOdatatype :: ([PP_Doc])- _lhsOterminaldefs :: (Set String)- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 298, column 32)- _lhsOargnamesw =- ({-# LINE 298 "src-ag/ExecutionPlan2Hs.ag" #-}- []- {-# LINE 1003 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 564, column 30)- _lhsOargpats =- ({-# LINE 564 "src-ag/ExecutionPlan2Hs.ag" #-}- []- {-# LINE 1009 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 563, column 30)- _lhsOargtps =- ({-# LINE 563 "src-ag/ExecutionPlan2Hs.ag" #-}- []- {-# LINE 1015 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1543, column 40)- _lhsOchildTypes =- ({-# LINE 1543 "src-ag/ExecutionPlan2Hs.ag" #-}- mempty- {-# LINE 1021 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 889, column 41)- _lhsOchildintros =- ({-# LINE 889 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 1027 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 199, column 31)- _lhsOdatatype =- ({-# LINE 199 "src-ag/ExecutionPlan2Hs.ag" #-}- []- {-# LINE 1033 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1264, column 42)- _lhsOterminaldefs =- ({-# LINE 1264 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.empty- {-# LINE 1039 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOargnamesw,_lhsOargpats,_lhsOargtps,_lhsOchildTypes,_lhsOchildintros,_lhsOdatatype,_lhsOterminaldefs))) )--- ENonterminal -------------------------------------------------{-- visit 0:- inherited attributes:- allFromToStates : Map VisitIdentifier (Int,Int)- allInitStates : Map NontermIdent Int- allVisitKinds : Map VisitIdentifier VisitKind- allchildvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- avisitdefs : Map VisitIdentifier (Set Identifier)- avisituses : Map VisitIdentifier (Set Identifier)- derivings : Derivings- importBlocks : PP_Doc- inhmap : Map NontermIdent Attributes- localAttrTypes : Map NontermIdent (Map ConstructorIdent (Map Identifier Type))- mainFile : String- mainName : String- moduleHeader : String -> String -> String -> Bool -> String- options : Options- pragmaBlocks : String- synmap : Map NontermIdent Attributes- textBlocks : PP_Doc- typeSyns : TypeSyns- wrappers : Set NontermIdent- synthesized attributes:- appendCommon : PP_Doc - appendMain : PP_Doc - childvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- errors : Seq Error- fromToStates : Map VisitIdentifier (Int,Int)- genProdIO : IO ()- imports : [PP_Doc]- initStates : Map NontermIdent Int- output : PP_Doc- semFunBndDefs : Seq PP_Doc- semFunBndTps : Seq PP_Doc- visitKinds : Map VisitIdentifier VisitKind- visitdefs : Map VisitIdentifier (Set Identifier)- visituses : Map VisitIdentifier (Set Identifier)- alternatives:- alternative ENonterminal:- child nt : {NontermIdent}- child params : {[Identifier]}- child classCtxs : {ClassContext}- child initial : {StateIdentifier}- child initialv : {Maybe VisitIdentifier}- child nextVisits : {Map StateIdentifier StateCtx}- child prevVisits : {Map StateIdentifier StateCtx}- child prods : EProductions - child recursive : {Bool}- child hoInfo : {HigherOrderInfo}- visit 0:- local hasWrapper : _- local classPP : _- local aliasPre : _- local datatype : _- local derivings : _- local fsemname : _- local semname : _- local frecarg : _- local sem_tp : _- local quantPP : _- local sem_nt : _- local inlineNt : _- local semPragma : _- local outedges : _- local inedges : _- local allstates : _- local stvisits : _- local t_type : _- local t_params : _- local t_init : _- local t_states : _- local k_type : _- local k_states : _- local wr_inh : _- local wr_syn : _- local genwrap : _- local synAttrs : _- local wr_inhs : _- local wr_inhs1 : _- local wr_filter : _- local wr_syns : _- local inhlist : _- local inhlist1 : _- local synlist : _- local wrapname : _- local inhname : _- local synname : _- local firstVisitInfo : _- local wrapper : _- local wrapPragma : _- local semFunBndDef : _- local semFunBndTp : _- local semFunBndNm : _- local addbang : _- local addbangWrap : _- local ntType : _--}--- cata-sem_ENonterminal :: ENonterminal ->- T_ENonterminal -sem_ENonterminal (ENonterminal _nt _params _classCtxs _initial _initialv _nextVisits _prevVisits _prods _recursive _hoInfo ) =- (sem_ENonterminal_ENonterminal _nt _params _classCtxs _initial _initialv _nextVisits _prevVisits (sem_EProductions _prods ) _recursive _hoInfo )--- semantic domain-newtype T_ENonterminal = T_ENonterminal ((Map VisitIdentifier (Int,Int)) ->- (Map NontermIdent Int) ->- (Map VisitIdentifier VisitKind) ->- (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- (Map VisitIdentifier (Set Identifier)) ->- (Map VisitIdentifier (Set Identifier)) ->- Derivings ->- PP_Doc ->- (Map NontermIdent Attributes) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->- String ->- String ->- (String -> String -> String -> Bool -> String) ->- Options ->- String ->- (Map NontermIdent Attributes) ->- PP_Doc ->- TypeSyns ->- (Set NontermIdent) ->- ( ( PP_Doc ),( PP_Doc ),(Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),(Seq Error),(Map VisitIdentifier (Int,Int)),(IO ()),([PP_Doc]),(Map NontermIdent Int),PP_Doc,(Seq PP_Doc),(Seq PP_Doc),(Map VisitIdentifier VisitKind),(Map VisitIdentifier (Set Identifier)),(Map VisitIdentifier (Set Identifier))))-data Inh_ENonterminal = Inh_ENonterminal {allFromToStates_Inh_ENonterminal :: (Map VisitIdentifier (Int,Int)),allInitStates_Inh_ENonterminal :: (Map NontermIdent Int),allVisitKinds_Inh_ENonterminal :: (Map VisitIdentifier VisitKind),allchildvisit_Inh_ENonterminal :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),avisitdefs_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)),avisituses_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)),derivings_Inh_ENonterminal :: Derivings,importBlocks_Inh_ENonterminal :: PP_Doc,inhmap_Inh_ENonterminal :: (Map NontermIdent Attributes),localAttrTypes_Inh_ENonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))),mainFile_Inh_ENonterminal :: String,mainName_Inh_ENonterminal :: String,moduleHeader_Inh_ENonterminal :: (String -> String -> String -> Bool -> String),options_Inh_ENonterminal :: Options,pragmaBlocks_Inh_ENonterminal :: String,synmap_Inh_ENonterminal :: (Map NontermIdent Attributes),textBlocks_Inh_ENonterminal :: PP_Doc,typeSyns_Inh_ENonterminal :: TypeSyns,wrappers_Inh_ENonterminal :: (Set NontermIdent)}-data Syn_ENonterminal = Syn_ENonterminal {appendCommon_Syn_ENonterminal :: ( PP_Doc ),appendMain_Syn_ENonterminal :: ( PP_Doc ),childvisit_Syn_ENonterminal :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),errors_Syn_ENonterminal :: (Seq Error),fromToStates_Syn_ENonterminal :: (Map VisitIdentifier (Int,Int)),genProdIO_Syn_ENonterminal :: (IO ()),imports_Syn_ENonterminal :: ([PP_Doc]),initStates_Syn_ENonterminal :: (Map NontermIdent Int),output_Syn_ENonterminal :: PP_Doc,semFunBndDefs_Syn_ENonterminal :: (Seq PP_Doc),semFunBndTps_Syn_ENonterminal :: (Seq PP_Doc),visitKinds_Syn_ENonterminal :: (Map VisitIdentifier VisitKind),visitdefs_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier)),visituses_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier))}-wrap_ENonterminal :: T_ENonterminal ->- Inh_ENonterminal ->- Syn_ENonterminal -wrap_ENonterminal (T_ENonterminal sem ) (Inh_ENonterminal _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers ) =- (let ( _lhsOappendCommon,_lhsOappendMain,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOinitStates,_lhsOoutput,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses) = sem _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers - in (Syn_ENonterminal _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses ))-sem_ENonterminal_ENonterminal :: NontermIdent ->- ([Identifier]) ->- ClassContext ->- StateIdentifier ->- (Maybe VisitIdentifier) ->- (Map StateIdentifier StateCtx) ->- (Map StateIdentifier StateCtx) ->- T_EProductions ->- Bool ->- HigherOrderInfo ->- T_ENonterminal -sem_ENonterminal_ENonterminal nt_ params_ classCtxs_ initial_ initialv_ nextVisits_ prevVisits_ (T_EProductions prods_ ) recursive_ hoInfo_ =- (T_ENonterminal (\ _lhsIallFromToStates- _lhsIallInitStates- _lhsIallVisitKinds- _lhsIallchildvisit- _lhsIavisitdefs- _lhsIavisituses- _lhsIderivings- _lhsIimportBlocks- _lhsIinhmap- _lhsIlocalAttrTypes- _lhsImainFile- _lhsImainName- _lhsImoduleHeader- _lhsIoptions- _lhsIpragmaBlocks- _lhsIsynmap- _lhsItextBlocks- _lhsItypeSyns- _lhsIwrappers ->- (let _prodsOrename :: Bool- _prodsOnt :: NontermIdent- _prodsOparams :: ([Identifier])- _prodsOclassCtxs :: ClassContext- _lhsOoutput :: PP_Doc- _prodsOinhmap :: Attributes- _prodsOsynmap :: Attributes- _prodsOallInhmap :: (Map NontermIdent Attributes)- _prodsOallSynmap :: (Map NontermIdent Attributes)- _lhsOsemFunBndDefs :: (Seq PP_Doc)- _lhsOsemFunBndTps :: (Seq PP_Doc)- _prodsOinitial :: StateIdentifier- _prodsOallstates :: (Set StateIdentifier)- _lhsOappendMain :: ( PP_Doc )- _lhsOappendCommon :: ( PP_Doc )- _prodsOnextVisits :: (Map StateIdentifier StateCtx)- _prodsOprevVisits :: (Map StateIdentifier StateCtx)- _prodsOlocalAttrTypes :: (Map ConstructorIdent (Map Identifier Type))- _lhsOinitStates :: (Map NontermIdent Int)- _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _lhsOerrors :: (Seq Error)- _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))- _lhsOgenProdIO :: (IO ())- _lhsOimports :: ([PP_Doc])- _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)- _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))- _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))- _prodsOallFromToStates :: (Map VisitIdentifier (Int,Int))- _prodsOallInitStates :: (Map NontermIdent Int)- _prodsOallVisitKinds :: (Map VisitIdentifier VisitKind)- _prodsOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _prodsOavisitdefs :: (Map VisitIdentifier (Set Identifier))- _prodsOavisituses :: (Map VisitIdentifier (Set Identifier))- _prodsOimportBlocks :: PP_Doc- _prodsOmainFile :: String- _prodsOmainName :: String- _prodsOmoduleHeader :: (String -> String -> String -> Bool -> String)- _prodsOntType :: Type- _prodsOoptions :: Options- _prodsOpragmaBlocks :: String- _prodsOtextBlocks :: PP_Doc- _prodsIallvisits :: ([VisitStateState])- _prodsIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _prodsIcount :: Int- _prodsIdatatype :: ([PP_Doc])- _prodsIerrors :: (Seq Error)- _prodsIfromToStates :: (Map VisitIdentifier (Int,Int))- _prodsIgenProdIO :: (IO ())- _prodsIimports :: ([PP_Doc])- _prodsIsemFunBndDefs :: (Seq PP_Doc)- _prodsIsemFunBndTps :: (Seq PP_Doc)- _prodsIsem_nt :: PP_Doc- _prodsIsem_prod :: PP_Doc- _prodsIt_visits :: PP_Doc- _prodsIvisitKinds :: (Map VisitIdentifier VisitKind)- _prodsIvisitdefs :: (Map VisitIdentifier (Set Identifier))- _prodsIvisituses :: (Map VisitIdentifier (Set Identifier))- -- "src-ag/ExecutionPlan2Hs.ag"(line 55, column 18)- _prodsOrename =- ({-# LINE 55 "src-ag/ExecutionPlan2Hs.ag" #-}- rename _lhsIoptions- {-# LINE 1266 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 63, column 18)- _prodsOnt =- ({-# LINE 63 "src-ag/ExecutionPlan2Hs.ag" #-}- nt_- {-# LINE 1272 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 75, column 3)- _prodsOparams =- ({-# LINE 75 "src-ag/ExecutionPlan2Hs.ag" #-}- params_- {-# LINE 1278 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 79, column 3)- _prodsOclassCtxs =- ({-# LINE 79 "src-ag/ExecutionPlan2Hs.ag" #-}- classCtxs_- {-# LINE 1284 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 96, column 18)- _lhsOoutput =- ({-# LINE 96 "src-ag/ExecutionPlan2Hs.ag" #-}- ("-- " ++ getName nt_ ++ " " ++ replicate (60 - length (getName nt_)) '-')- >-< (if dataTypes _lhsIoptions- then "-- data"- >-< _datatype- >-< ""- else empty)- >-< (if _hasWrapper- then "-- wrapper"- >-< _wr_inh- >-< _wr_syn- >-< _wrapper- >-< ""- else empty)- >-< (if folds _lhsIoptions- then "-- cata"- >-< _sem_nt- >-< ""- else empty)- >-< (if semfuns _lhsIoptions- then "-- semantic domain"- >-< _t_init- >-< _t_states- >-< _k_states- >-< _prodsIt_visits- >-< _prodsIsem_prod- >-< ""- else empty)- {-# LINE 1316 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 123, column 18)- _hasWrapper =- ({-# LINE 123 "src-ag/ExecutionPlan2Hs.ag" #-}- nt_ `Set.member` _lhsIwrappers- {-# LINE 1322 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 136, column 18)- _classPP =- ({-# LINE 136 "src-ag/ExecutionPlan2Hs.ag" #-}- ppClasses $ classCtxsToDocs classCtxs_- {-# LINE 1328 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 137, column 18)- _aliasPre =- ({-# LINE 137 "src-ag/ExecutionPlan2Hs.ag" #-}- "type" >#< _classPP >#< nt_ >#< _t_params >#< "="- {-# LINE 1334 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 138, column 18)- _datatype =- ({-# LINE 138 "src-ag/ExecutionPlan2Hs.ag" #-}- case lookup nt_ _lhsItypeSyns of- Nothing -> "data" >#< _classPP >#< nt_ >#< _t_params- >-< ( if null _prodsIdatatype- then empty- else indent 2 $ vlist $ ( ("=" >#< head _prodsIdatatype)- : (map ("|" >#<) $ tail _prodsIdatatype))- )- >-< indent 2 _derivings- Just (List t) -> _aliasPre >#< "[" >#< show t >#< "]"- Just (Maybe t) -> _aliasPre >#< "Maybe" >#< show t- Just (Tuple ts) -> _aliasPre >#< pp_parens (ppCommas $ map (show . snd) ts)- Just (Either l r) -> _aliasPre >#< "Either" >#< show l >#< show r- Just (Map k v) -> _aliasPre >#< "Data.Map" >#< pp_parens (show k) >#< show v- Just (IntMap t) -> _aliasPre >#< "Data.IntMap.IntMap" >#< show t- Just (OrdSet t) -> _aliasPre >#< "Data.Set.Set" >#< show t- Just IntSet -> _aliasPre >#< "Data.IntSet.IntSet"- {-# LINE 1355 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 155, column 18)- _derivings =- ({-# LINE 155 "src-ag/ExecutionPlan2Hs.ag" #-}- case Map.lookup nt_ _lhsIderivings of- Nothing -> empty- Just s -> if Set.null s- then empty- else "deriving" >#< (pp_parens $ ppCommas $ map pp $ Set.toList s)- {-# LINE 1365 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 228, column 18)- _fsemname =- ({-# LINE 228 "src-ag/ExecutionPlan2Hs.ag" #-}- \x -> "sem_" ++ show x- {-# LINE 1371 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 229, column 18)- _semname =- ({-# LINE 229 "src-ag/ExecutionPlan2Hs.ag" #-}- _fsemname nt_- {-# LINE 1377 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 230, column 18)- _frecarg =- ({-# LINE 230 "src-ag/ExecutionPlan2Hs.ag" #-}- \t x -> case t of- NT nt _ _ -> pp_parens (_fsemname nt >#< x)- _ -> pp x- {-# LINE 1385 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 236, column 18)- _sem_tp =- ({-# LINE 236 "src-ag/ExecutionPlan2Hs.ag" #-}- _quantPP >#< _classPP >#< nt_ >#< _t_params >#< "->" >#< _t_type >#< _t_params- {-# LINE 1391 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 237, column 18)- _quantPP =- ({-# LINE 237 "src-ag/ExecutionPlan2Hs.ag" #-}- ppQuants params_- {-# LINE 1397 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 238, column 18)- _sem_nt =- ({-# LINE 238 "src-ag/ExecutionPlan2Hs.ag" #-}- _semPragma- >-< _semname >#< "::" >#< _sem_tp- >-< case lookup nt_ _lhsItypeSyns of- Nothing -> _prodsIsem_nt- Just (List t) -> _semname >#< "list" >#< "=" >#< "Prelude.foldr" >#< _semname >|< "_Cons"- >#< _semname >|< "_Nil"- >#< case t of- NT nt _ _ -> pp_parens ("Prelude.map" >#< _fsemname nt >#< "list")- _ -> pp "list"- Just (Maybe t) -> _semname >#< "Prelude.Nothing" >#< "=" >#< _semname >|< "_Nothing"- >-< _semname >#< pp_parens ("Prelude.Just just") >#< "="- >#< _semname >|< "_Just" >#< _frecarg t "just"- Just (Tuple ts) -> _semname >#< pp_parens (ppCommas $ map fst ts) >#< "="- >#< _semname >|< "_Tuple" >#< ppSpaced (map (\t -> _frecarg (snd t) (show $ fst t)) ts)- Just (Either l r) -> _semname >#< "(Prelude.Left left)" >#< "=" >#< _semname >|< "_Left" >#< _frecarg l "left"- >-< _semname >#< "(Prelude.Right right)" >#< "=" >#< _semname >|< "_Right" >#< _frecarg r "right"- Just (Map k v) -> _semname >#< "m" >#< "=" >#< "Data.Map.foldrWithKey"- >#< _semname >|< "_Entry" >#< _semname >|< "_Nil"- >#< case v of- NT nt _ _ -> pp_parens ("Data.Map.map" >#< _fsemname nt >#< "m")- _ -> pp "m"- Just (IntMap v) -> _semname >#< "m" >#< "=" >#< "Data.IntMap.foldWithKey"- >#< _semname >|< "_Entry" >#< _semname >|< "_Nil"- >#< case v of- NT nt _ _ -> pp_parens ("Data.IntMap.map" >#< _fsemname nt >#< "m")- _ -> pp "m"- Just (OrdSet t) -> _semname >#< "s" >#< "=" >#< "Prelude.foldr" >#< _semname >|< "_Entry"- >#< _semname >|< "_Nil"- >#< pp_parens (- ( case t of- NT nt _ _ -> pp_parens ("Prelude.map" >#< _fsemname nt)- _ -> empty- ) >#< pp_parens ("Data.IntSet.elems" >#< "s")- )- Just IntSet -> _semname >#< "s" >#< "=" >#< "Prelude.foldr" >#< _semname >|< "_Entry"- >#< _semname >|< "_Nil"- >#< pp_parens ("Data.IntSet.elems" >#< "s")- {-# LINE 1439 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 278, column 17)- _inlineNt =- ({-# LINE 278 "src-ag/ExecutionPlan2Hs.ag" #-}- not (lateHigherOrderBinding _lhsIoptions) && not recursive_ && (_prodsIcount == 1 || (aggressiveInlinePragmas _lhsIoptions && not _hasWrapper ))- {-# LINE 1445 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 279, column 17)- _semPragma =- ({-# LINE 279 "src-ag/ExecutionPlan2Hs.ag" #-}- if noInlinePragmas _lhsIoptions- then empty- else if _inlineNt- then ppInline _semname- else if helpInlining _lhsIoptions && not (lateHigherOrderBinding _lhsIoptions)- then ppInlinable _semname- else ppNoInline _semname- {-# LINE 1457 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 324, column 19)- (Just _prodsOinhmap ) =- ({-# LINE 324 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.lookup nt_ _lhsIinhmap- {-# LINE 1463 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 325, column 19)- (Just _prodsOsynmap ) =- ({-# LINE 325 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.lookup nt_ _lhsIsynmap- {-# LINE 1469 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 326, column 18)- _prodsOallInhmap =- ({-# LINE 326 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIinhmap- {-# LINE 1475 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 327, column 18)- _prodsOallSynmap =- ({-# LINE 327 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIsynmap- {-# LINE 1481 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 348, column 18)- _outedges =- ({-# LINE 348 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.fromList $ map (\(_,f,_) -> f) _prodsIallvisits- {-# LINE 1487 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 349, column 18)- _inedges =- ({-# LINE 349 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.fromList $ map (\(_,_,t) -> t) _prodsIallvisits- {-# LINE 1493 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 350, column 18)- _allstates =- ({-# LINE 350 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.insert initial_ $ _inedges `Set.union` _outedges- {-# LINE 1499 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 351, column 18)- _stvisits =- ({-# LINE 351 "src-ag/ExecutionPlan2Hs.ag" #-}- \st -> filter (\(v,f,t) -> f == st) _prodsIallvisits- {-# LINE 1505 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 352, column 18)- _t_type =- ({-# LINE 352 "src-ag/ExecutionPlan2Hs.ag" #-}- "T_" >|< nt_- {-# LINE 1511 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 353, column 18)- _t_params =- ({-# LINE 353 "src-ag/ExecutionPlan2Hs.ag" #-}- ppSpaced params_- {-# LINE 1517 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 354, column 18)- _t_init =- ({-# LINE 354 "src-ag/ExecutionPlan2Hs.ag" #-}- "newtype" >#< _t_type >#< _t_params >#< "=" >#< _t_type >#<- pp_braces (- "attach_">|< _t_type >#< "::"- >#< ppMonadType _lhsIoptions >#< pp_parens (_t_type >|< "_s" >|< initial_ >#< _t_params ))- {-# LINE 1526 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 358, column 18)- _t_states =- ({-# LINE 358 "src-ag/ExecutionPlan2Hs.ag" #-}- vlist $ map (\st ->- let nt_st = nt_ >|< "_s" >|< st- t_st = "T_" >|< nt_st- k_st = "K_" >|< nt_st- c_st = "C_" >|< nt_st- inv_st = "inv_" >|< nt_st- nextVisit = Map.findWithDefault ManyVis st nextVisits_- in case nextVisit of- NoneVis -> "data" >#< t_st >#< _t_params >#< "=" >#< c_st- OneVis vId -> "newtype" >#< t_st >#< _t_params >#< "=" >#< c_st- >#< (pp_braces $ inv_st >#< "::" >#< pp_parens (conNmTVisit nt_ vId >#< _t_params ))- ManyVis -> "data" >#< t_st >#< _t_params >#< "where" >#< c_st >#< "::"- >#< (pp_braces $ inv_st >#< "::" >#< "!" >|< pp_parens ("forall t." >#< k_st >#< _t_params >#< "t" >#< "->" >#< "t"))- >#< "->" >#< t_st >#< _t_params- ) $ Set.toList _allstates- {-# LINE 1546 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 376, column 18)- _k_type =- ({-# LINE 376 "src-ag/ExecutionPlan2Hs.ag" #-}- "K_" ++ show nt_- {-# LINE 1552 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 377, column 18)- _k_states =- ({-# LINE 377 "src-ag/ExecutionPlan2Hs.ag" #-}- vlist $ map (\st ->- let nt_st = nt_ >|< "_s" >|< st- k_st = "K_" >|< nt_st- outg = filter (\(v,f,t) -> f == st) _prodsIallvisits- visitlist = vlist $ map (\(v,f,t) ->- _k_type >|< "_v" >|< v >#< "::" >#< k_st >#< _t_params >#< pp_parens (_t_type >|< "_v" >|< v >#< _t_params )- ) outg- nextVisit = Map.findWithDefault ManyVis st nextVisits_- decl = "data" >#< k_st >#< "k" >#< _t_params >#< "where" >-< indent 3 visitlist- in case nextVisit of- NoneVis -> empty- OneVis _ -> empty- ManyVis -> decl- ) $ Set.toList _allstates- {-# LINE 1571 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 444, column 18)- _wr_inh =- ({-# LINE 444 "src-ag/ExecutionPlan2Hs.ag" #-}- _genwrap "Inh" _wr_inhs- {-# LINE 1577 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 445, column 18)- _wr_syn =- ({-# LINE 445 "src-ag/ExecutionPlan2Hs.ag" #-}- _genwrap "Syn" _wr_syns- {-# LINE 1583 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 446, column 18)- _genwrap =- ({-# LINE 446 "src-ag/ExecutionPlan2Hs.ag" #-}- \nm attr -> "data" >#< nm >|< "_" >|< nt_ >#< _t_params >#< "=" >#< nm >|< "_" >|< nt_ >#< "{"- >#< (ppCommas $ map (\(i,t) -> i >|< "_" >|< nm >|< "_" >|< nt_ >#< "::"- >#< (_addbang $ pp_parens $ typeToHaskellString (Just nt_) [] t)) attr) >#< "}"- {-# LINE 1591 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 449, column 18)- _synAttrs =- ({-# LINE 449 "src-ag/ExecutionPlan2Hs.ag" #-}- fromJust $ Map.lookup nt_ _lhsIinhmap- {-# LINE 1597 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 450, column 18)- _wr_inhs =- ({-# LINE 450 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.toList $ _wr_filter $ _synAttrs- {-# LINE 1603 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 451, column 18)- _wr_inhs1 =- ({-# LINE 451 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.toList _synAttrs- {-# LINE 1609 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 452, column 18)- _wr_filter =- ({-# LINE 452 "src-ag/ExecutionPlan2Hs.ag" #-}- if kennedyWarren _lhsIoptions && lateHigherOrderBinding _lhsIoptions- then Map.delete idLateBindingAttr- else id- {-# LINE 1617 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 455, column 18)- _wr_syns =- ({-# LINE 455 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.toList $ fromJust $ Map.lookup nt_ _lhsIsynmap- {-# LINE 1623 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 456, column 18)- _inhlist =- ({-# LINE 456 "src-ag/ExecutionPlan2Hs.ag" #-}- map (lhsname True . fst) _wr_inhs- {-# LINE 1629 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 457, column 18)- _inhlist1 =- ({-# LINE 457 "src-ag/ExecutionPlan2Hs.ag" #-}- map (lhsname True . fst) _wr_inhs1- {-# LINE 1635 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 458, column 18)- _synlist =- ({-# LINE 458 "src-ag/ExecutionPlan2Hs.ag" #-}- map (lhsname False . fst) _wr_syns- {-# LINE 1641 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 459, column 18)- _wrapname =- ({-# LINE 459 "src-ag/ExecutionPlan2Hs.ag" #-}- "wrap_" ++ show nt_- {-# LINE 1647 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 460, column 18)- _inhname =- ({-# LINE 460 "src-ag/ExecutionPlan2Hs.ag" #-}- "Inh_" ++ show nt_- {-# LINE 1653 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 461, column 18)- _synname =- ({-# LINE 461 "src-ag/ExecutionPlan2Hs.ag" #-}- "Syn_" ++ show nt_- {-# LINE 1659 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 462, column 18)- _firstVisitInfo =- ({-# LINE 462 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault ManyVis initial_ nextVisits_- {-# LINE 1665 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 463, column 18)- _wrapper =- ({-# LINE 463 "src-ag/ExecutionPlan2Hs.ag" #-}- _wrapPragma- >-< (_wrapname >#< "::" >#< _quantPP >#< _classPP >#< _t_type >#< _t_params >#< "->"- >#< _inhname >#< _t_params >#< "->" >#< ( if monadicWrappers _lhsIoptions then ppMonadType _lhsIoptions else empty) >#< pp_parens (_synname >#< _t_params ))- >-< (_wrapname >#< (_addbang $ pp_parens (_t_type >#< pp "act"))- >#< (_addbang $ pp_parens (_inhname- >#< (ppSpaced $ map (_addbangWrap . pp) _inhlist )) >#< "="))- >-<- indent 3 (case initialv_ of- Nothing -> _synname >#< " { }"- Just initv ->- let inCon = conNmTVisitIn nt_ initv- outCon = conNmTVisitOut nt_ initv- pat = _addbang $ pp_parens $ pat0- pat0 = outCon >#< ppSpaced _synlist- arg = inCon >#< ppSpaced _inhlist1- ind = case _firstVisitInfo of- NoneVis -> error "wrapper: initial state should have a next visit but it has none"- OneVis _ -> empty- ManyVis -> _k_type >|< "_v" >|< initv- extra = if dummyTokenVisit _lhsIoptions- then pp $ dummyArg _lhsIoptions True- else empty- convert = case Map.lookup initv _lhsIallVisitKinds of- Just kind -> case kind of- VisitPure _ -> text "return"- VisitMonadic -> empty- unMonad | monadicWrappers _lhsIoptions = empty- | otherwise = unMon _lhsIoptions- in unMonad >#< "("- >-< indent 2 (- "do" >#< ( _addbang (pp "sem") >#< "<-" >#< "act"- >-< "let" >#< _addbangWrap (pp "arg") >#< "=" >#< arg- >-< pat >#< "<-" >#< convert >#< pp_parens ("inv_" >|< nt_ >|< "_s" >|< initial_ >#< "sem" >#< ind >#< "arg" >#< extra)- >-< "return" >#< pp_parens (_synname >#< ppSpaced _synlist )- )- )- >-< ")" )- >-< if kennedyWarren _lhsIoptions && lateHigherOrderBinding _lhsIoptions- then indent 2 ("where" >#< lhsname True idLateBindingAttr >#< "=" >#< lateBindingFieldNm _lhsImainName)- else empty- {-# LINE 1710 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 504, column 18)- _wrapPragma =- ({-# LINE 504 "src-ag/ExecutionPlan2Hs.ag" #-}- if parallelInvoke _lhsIoptions && not (monadicWrappers _lhsIoptions)- then ppNoInline _wrapname- else if noInlinePragmas _lhsIoptions- then empty- else ppInlinable _wrapname- {-# LINE 1720 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 516, column 3)- _lhsOsemFunBndDefs =- ({-# LINE 516 "src-ag/ExecutionPlan2Hs.ag" #-}- _semFunBndDef Seq.<| _prodsIsemFunBndDefs- {-# LINE 1726 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 517, column 3)- _lhsOsemFunBndTps =- ({-# LINE 517 "src-ag/ExecutionPlan2Hs.ag" #-}- _semFunBndTp Seq.<| _prodsIsemFunBndTps- {-# LINE 1732 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 518, column 3)- _semFunBndDef =- ({-# LINE 518 "src-ag/ExecutionPlan2Hs.ag" #-}- _semFunBndNm >#< "=" >#< _semname- {-# LINE 1738 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 519, column 3)- _semFunBndTp =- ({-# LINE 519 "src-ag/ExecutionPlan2Hs.ag" #-}- _semFunBndNm >#< "::" >#< _sem_tp- {-# LINE 1744 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 520, column 3)- _semFunBndNm =- ({-# LINE 520 "src-ag/ExecutionPlan2Hs.ag" #-}- lateSemNtLabel nt_- {-# LINE 1750 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 558, column 18)- _prodsOinitial =- ({-# LINE 558 "src-ag/ExecutionPlan2Hs.ag" #-}- initial_- {-# LINE 1756 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 559, column 18)- _prodsOallstates =- ({-# LINE 559 "src-ag/ExecutionPlan2Hs.ag" #-}- _allstates- {-# LINE 1762 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1430, column 18)- _lhsOappendMain =- ({-# LINE 1430 "src-ag/ExecutionPlan2Hs.ag" #-}- (if nt_ `Set.member` _lhsIwrappers- then _wr_inh- >-< _wr_syn- >-< _wrapper- else empty)- >-< _sem_nt- {-# LINE 1773 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1436, column 18)- _lhsOappendCommon =- ({-# LINE 1436 "src-ag/ExecutionPlan2Hs.ag" #-}- (if dataTypes _lhsIoptions then _datatype else empty)- >-< _t_init- >-< _t_states- >-< _k_states- >-< _prodsIt_visits- {-# LINE 1783 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1496, column 37)- _addbang =- ({-# LINE 1496 "src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 1789 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1504, column 37)- _addbangWrap =- ({-# LINE 1504 "src-ag/ExecutionPlan2Hs.ag" #-}- if strictWrap _lhsIoptions then _addbang else id- {-# LINE 1795 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1516, column 3)- _prodsOnextVisits =- ({-# LINE 1516 "src-ag/ExecutionPlan2Hs.ag" #-}- nextVisits_- {-# LINE 1801 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1517, column 3)- _prodsOprevVisits =- ({-# LINE 1517 "src-ag/ExecutionPlan2Hs.ag" #-}- prevVisits_- {-# LINE 1807 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1561, column 3)- _prodsOlocalAttrTypes =- ({-# LINE 1561 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIlocalAttrTypes- {-# LINE 1813 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1588, column 3)- _lhsOinitStates =- ({-# LINE 1588 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton nt_ initial_- {-# LINE 1819 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1602, column 3)- _ntType =- ({-# LINE 1602 "src-ag/ExecutionPlan2Hs.ag" #-}- NT nt_ (map show params_) False- {-# LINE 1825 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1167, column 37)- _lhsOchildvisit =- ({-# LINE 1167 "src-ag/ExecutionPlan2Hs.ag" #-}- _prodsIchildvisit- {-# LINE 1831 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1609, column 132)- _lhsOerrors =- ({-# LINE 1609 "src-ag/ExecutionPlan2Hs.ag" #-}- _prodsIerrors- {-# LINE 1837 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1524, column 22)- _lhsOfromToStates =- ({-# LINE 1524 "src-ag/ExecutionPlan2Hs.ag" #-}- _prodsIfromToStates- {-# LINE 1843 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1444, column 49)- _lhsOgenProdIO =- ({-# LINE 1444 "src-ag/ExecutionPlan2Hs.ag" #-}- _prodsIgenProdIO- {-# LINE 1849 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1443, column 47)- _lhsOimports =- ({-# LINE 1443 "src-ag/ExecutionPlan2Hs.ag" #-}- _prodsIimports- {-# LINE 1855 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1571, column 68)- _lhsOvisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _prodsIvisitKinds- {-# LINE 1861 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1302, column 36)- _lhsOvisitdefs =- ({-# LINE 1302 "src-ag/ExecutionPlan2Hs.ag" #-}- _prodsIvisitdefs- {-# LINE 1867 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1303, column 36)- _lhsOvisituses =- ({-# LINE 1303 "src-ag/ExecutionPlan2Hs.ag" #-}- _prodsIvisituses- {-# LINE 1873 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _prodsOallFromToStates =- ({-# LINE 1527 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallFromToStates- {-# LINE 1879 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _prodsOallInitStates =- ({-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInitStates- {-# LINE 1885 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _prodsOallVisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallVisitKinds- {-# LINE 1891 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _prodsOallchildvisit =- ({-# LINE 1166 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallchildvisit- {-# LINE 1897 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _prodsOavisitdefs =- ({-# LINE 1312 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisitdefs- {-# LINE 1903 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _prodsOavisituses =- ({-# LINE 1313 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisituses- {-# LINE 1909 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _prodsOimportBlocks =- ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIimportBlocks- {-# LINE 1915 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _prodsOmainFile =- ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainFile- {-# LINE 1921 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _prodsOmainName =- ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainName- {-# LINE 1927 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _prodsOmoduleHeader =- ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImoduleHeader- {-# LINE 1933 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (from local)- _prodsOntType =- ({-# LINE 1600 "src-ag/ExecutionPlan2Hs.ag" #-}- _ntType- {-# LINE 1939 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _prodsOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 1945 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _prodsOpragmaBlocks =- ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIpragmaBlocks- {-# LINE 1951 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _prodsOtextBlocks =- ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsItextBlocks- {-# LINE 1957 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _prodsIallvisits,_prodsIchildvisit,_prodsIcount,_prodsIdatatype,_prodsIerrors,_prodsIfromToStates,_prodsIgenProdIO,_prodsIimports,_prodsIsemFunBndDefs,_prodsIsemFunBndTps,_prodsIsem_nt,_prodsIsem_prod,_prodsIt_visits,_prodsIvisitKinds,_prodsIvisitdefs,_prodsIvisituses) =- prods_ _prodsOallFromToStates _prodsOallInhmap _prodsOallInitStates _prodsOallSynmap _prodsOallVisitKinds _prodsOallchildvisit _prodsOallstates _prodsOavisitdefs _prodsOavisituses _prodsOclassCtxs _prodsOimportBlocks _prodsOinhmap _prodsOinitial _prodsOlocalAttrTypes _prodsOmainFile _prodsOmainName _prodsOmoduleHeader _prodsOnextVisits _prodsOnt _prodsOntType _prodsOoptions _prodsOparams _prodsOpragmaBlocks _prodsOprevVisits _prodsOrename _prodsOsynmap _prodsOtextBlocks - in ( _lhsOappendCommon,_lhsOappendMain,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOinitStates,_lhsOoutput,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))) )--- ENonterminals ------------------------------------------------{-- visit 0:- inherited attributes:- allFromToStates : Map VisitIdentifier (Int,Int)- allInitStates : Map NontermIdent Int- allVisitKinds : Map VisitIdentifier VisitKind- allchildvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- avisitdefs : Map VisitIdentifier (Set Identifier)- avisituses : Map VisitIdentifier (Set Identifier)- derivings : Derivings- importBlocks : PP_Doc- inhmap : Map NontermIdent Attributes- localAttrTypes : Map NontermIdent (Map ConstructorIdent (Map Identifier Type))- mainFile : String- mainName : String- moduleHeader : String -> String -> String -> Bool -> String- options : Options- pragmaBlocks : String- synmap : Map NontermIdent Attributes- textBlocks : PP_Doc- typeSyns : TypeSyns- wrappers : Set NontermIdent- synthesized attributes:- appendCommon : [PP_Doc]- appendMain : [PP_Doc]- childvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- errors : Seq Error- fromToStates : Map VisitIdentifier (Int,Int)- genProdIO : IO ()- imports : [PP_Doc]- initStates : Map NontermIdent Int- output : PP_Doc- semFunBndDefs : Seq PP_Doc- semFunBndTps : Seq PP_Doc- visitKinds : Map VisitIdentifier VisitKind- visitdefs : Map VisitIdentifier (Set Identifier)- visituses : Map VisitIdentifier (Set Identifier)- alternatives:- alternative Cons:- child hd : ENonterminal - child tl : ENonterminals - alternative Nil:--}--- cata-sem_ENonterminals :: ENonterminals ->- T_ENonterminals -sem_ENonterminals list =- (Prelude.foldr sem_ENonterminals_Cons sem_ENonterminals_Nil (Prelude.map sem_ENonterminal list) )--- semantic domain-newtype T_ENonterminals = T_ENonterminals ((Map VisitIdentifier (Int,Int)) ->- (Map NontermIdent Int) ->- (Map VisitIdentifier VisitKind) ->- (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- (Map VisitIdentifier (Set Identifier)) ->- (Map VisitIdentifier (Set Identifier)) ->- Derivings ->- PP_Doc ->- (Map NontermIdent Attributes) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->- String ->- String ->- (String -> String -> String -> Bool -> String) ->- Options ->- String ->- (Map NontermIdent Attributes) ->- PP_Doc ->- TypeSyns ->- (Set NontermIdent) ->- ( ([PP_Doc]),([PP_Doc]),(Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),(Seq Error),(Map VisitIdentifier (Int,Int)),(IO ()),([PP_Doc]),(Map NontermIdent Int),PP_Doc,(Seq PP_Doc),(Seq PP_Doc),(Map VisitIdentifier VisitKind),(Map VisitIdentifier (Set Identifier)),(Map VisitIdentifier (Set Identifier))))-data Inh_ENonterminals = Inh_ENonterminals {allFromToStates_Inh_ENonterminals :: (Map VisitIdentifier (Int,Int)),allInitStates_Inh_ENonterminals :: (Map NontermIdent Int),allVisitKinds_Inh_ENonterminals :: (Map VisitIdentifier VisitKind),allchildvisit_Inh_ENonterminals :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),avisitdefs_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)),avisituses_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)),derivings_Inh_ENonterminals :: Derivings,importBlocks_Inh_ENonterminals :: PP_Doc,inhmap_Inh_ENonterminals :: (Map NontermIdent Attributes),localAttrTypes_Inh_ENonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))),mainFile_Inh_ENonterminals :: String,mainName_Inh_ENonterminals :: String,moduleHeader_Inh_ENonterminals :: (String -> String -> String -> Bool -> String),options_Inh_ENonterminals :: Options,pragmaBlocks_Inh_ENonterminals :: String,synmap_Inh_ENonterminals :: (Map NontermIdent Attributes),textBlocks_Inh_ENonterminals :: PP_Doc,typeSyns_Inh_ENonterminals :: TypeSyns,wrappers_Inh_ENonterminals :: (Set NontermIdent)}-data Syn_ENonterminals = Syn_ENonterminals {appendCommon_Syn_ENonterminals :: ([PP_Doc]),appendMain_Syn_ENonterminals :: ([PP_Doc]),childvisit_Syn_ENonterminals :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),errors_Syn_ENonterminals :: (Seq Error),fromToStates_Syn_ENonterminals :: (Map VisitIdentifier (Int,Int)),genProdIO_Syn_ENonterminals :: (IO ()),imports_Syn_ENonterminals :: ([PP_Doc]),initStates_Syn_ENonterminals :: (Map NontermIdent Int),output_Syn_ENonterminals :: PP_Doc,semFunBndDefs_Syn_ENonterminals :: (Seq PP_Doc),semFunBndTps_Syn_ENonterminals :: (Seq PP_Doc),visitKinds_Syn_ENonterminals :: (Map VisitIdentifier VisitKind),visitdefs_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier)),visituses_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier))}-wrap_ENonterminals :: T_ENonterminals ->- Inh_ENonterminals ->- Syn_ENonterminals -wrap_ENonterminals (T_ENonterminals sem ) (Inh_ENonterminals _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers ) =- (let ( _lhsOappendCommon,_lhsOappendMain,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOinitStates,_lhsOoutput,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses) = sem _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers - in (Syn_ENonterminals _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses ))-sem_ENonterminals_Cons :: T_ENonterminal ->- T_ENonterminals ->- T_ENonterminals -sem_ENonterminals_Cons (T_ENonterminal hd_ ) (T_ENonterminals tl_ ) =- (T_ENonterminals (\ _lhsIallFromToStates- _lhsIallInitStates- _lhsIallVisitKinds- _lhsIallchildvisit- _lhsIavisitdefs- _lhsIavisituses- _lhsIderivings- _lhsIimportBlocks- _lhsIinhmap- _lhsIlocalAttrTypes- _lhsImainFile- _lhsImainName- _lhsImoduleHeader- _lhsIoptions- _lhsIpragmaBlocks- _lhsIsynmap- _lhsItextBlocks- _lhsItypeSyns- _lhsIwrappers ->- (let _lhsOappendCommon :: ([PP_Doc])- _lhsOappendMain :: ([PP_Doc])- _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _lhsOerrors :: (Seq Error)- _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))- _lhsOgenProdIO :: (IO ())- _lhsOimports :: ([PP_Doc])- _lhsOinitStates :: (Map NontermIdent Int)- _lhsOoutput :: PP_Doc- _lhsOsemFunBndDefs :: (Seq PP_Doc)- _lhsOsemFunBndTps :: (Seq PP_Doc)- _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)- _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))- _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))- _hdOallFromToStates :: (Map VisitIdentifier (Int,Int))- _hdOallInitStates :: (Map NontermIdent Int)- _hdOallVisitKinds :: (Map VisitIdentifier VisitKind)- _hdOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _hdOavisitdefs :: (Map VisitIdentifier (Set Identifier))- _hdOavisituses :: (Map VisitIdentifier (Set Identifier))- _hdOderivings :: Derivings- _hdOimportBlocks :: PP_Doc- _hdOinhmap :: (Map NontermIdent Attributes)- _hdOlocalAttrTypes :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type)))- _hdOmainFile :: String- _hdOmainName :: String- _hdOmoduleHeader :: (String -> String -> String -> Bool -> String)- _hdOoptions :: Options- _hdOpragmaBlocks :: String- _hdOsynmap :: (Map NontermIdent Attributes)- _hdOtextBlocks :: PP_Doc- _hdOtypeSyns :: TypeSyns- _hdOwrappers :: (Set NontermIdent)- _tlOallFromToStates :: (Map VisitIdentifier (Int,Int))- _tlOallInitStates :: (Map NontermIdent Int)- _tlOallVisitKinds :: (Map VisitIdentifier VisitKind)- _tlOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _tlOavisitdefs :: (Map VisitIdentifier (Set Identifier))- _tlOavisituses :: (Map VisitIdentifier (Set Identifier))- _tlOderivings :: Derivings- _tlOimportBlocks :: PP_Doc- _tlOinhmap :: (Map NontermIdent Attributes)- _tlOlocalAttrTypes :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type)))- _tlOmainFile :: String- _tlOmainName :: String- _tlOmoduleHeader :: (String -> String -> String -> Bool -> String)- _tlOoptions :: Options- _tlOpragmaBlocks :: String- _tlOsynmap :: (Map NontermIdent Attributes)- _tlOtextBlocks :: PP_Doc- _tlOtypeSyns :: TypeSyns- _tlOwrappers :: (Set NontermIdent)- _hdIappendCommon :: ( PP_Doc )- _hdIappendMain :: ( PP_Doc )- _hdIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _hdIerrors :: (Seq Error)- _hdIfromToStates :: (Map VisitIdentifier (Int,Int))- _hdIgenProdIO :: (IO ())- _hdIimports :: ([PP_Doc])- _hdIinitStates :: (Map NontermIdent Int)- _hdIoutput :: PP_Doc- _hdIsemFunBndDefs :: (Seq PP_Doc)- _hdIsemFunBndTps :: (Seq PP_Doc)- _hdIvisitKinds :: (Map VisitIdentifier VisitKind)- _hdIvisitdefs :: (Map VisitIdentifier (Set Identifier))- _hdIvisituses :: (Map VisitIdentifier (Set Identifier))- _tlIappendCommon :: ([PP_Doc])- _tlIappendMain :: ([PP_Doc])- _tlIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _tlIerrors :: (Seq Error)- _tlIfromToStates :: (Map VisitIdentifier (Int,Int))- _tlIgenProdIO :: (IO ())- _tlIimports :: ([PP_Doc])- _tlIinitStates :: (Map NontermIdent Int)- _tlIoutput :: PP_Doc- _tlIsemFunBndDefs :: (Seq PP_Doc)- _tlIsemFunBndTps :: (Seq PP_Doc)- _tlIvisitKinds :: (Map VisitIdentifier VisitKind)- _tlIvisitdefs :: (Map VisitIdentifier (Set Identifier))- _tlIvisituses :: (Map VisitIdentifier (Set Identifier))- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1427, column 51)- _lhsOappendCommon =- ({-# LINE 1427 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIappendCommon : _tlIappendCommon- {-# LINE 2147 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1427, column 51)- _lhsOappendMain =- ({-# LINE 1427 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIappendMain : _tlIappendMain- {-# LINE 2153 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1167, column 37)- _lhsOchildvisit =- ({-# LINE 1167 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIchildvisit `Map.union` _tlIchildvisit- {-# LINE 2159 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1609, column 132)- _lhsOerrors =- ({-# LINE 1609 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 2165 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1524, column 22)- _lhsOfromToStates =- ({-# LINE 1524 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIfromToStates `mappend` _tlIfromToStates- {-# LINE 2171 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1444, column 49)- _lhsOgenProdIO =- ({-# LINE 1444 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIgenProdIO >> _tlIgenProdIO- {-# LINE 2177 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1443, column 47)- _lhsOimports =- ({-# LINE 1443 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIimports ++ _tlIimports- {-# LINE 2183 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1583, column 50)- _lhsOinitStates =- ({-# LINE 1583 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIinitStates `mappend` _tlIinitStates- {-# LINE 2189 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 90, column 45)- _lhsOoutput =- ({-# LINE 90 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIoutput >-< _tlIoutput- {-# LINE 2195 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 514, column 92)- _lhsOsemFunBndDefs =- ({-# LINE 514 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIsemFunBndDefs Seq.>< _tlIsemFunBndDefs- {-# LINE 2201 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 514, column 92)- _lhsOsemFunBndTps =- ({-# LINE 514 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIsemFunBndTps Seq.>< _tlIsemFunBndTps- {-# LINE 2207 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1571, column 68)- _lhsOvisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIvisitKinds `mappend` _tlIvisitKinds- {-# LINE 2213 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1302, column 36)- _lhsOvisitdefs =- ({-# LINE 1302 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIvisitdefs `uwSetUnion` _tlIvisitdefs- {-# LINE 2219 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1303, column 36)- _lhsOvisituses =- ({-# LINE 1303 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIvisituses `uwSetUnion` _tlIvisituses- {-# LINE 2225 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallFromToStates =- ({-# LINE 1527 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallFromToStates- {-# LINE 2231 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallInitStates =- ({-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInitStates- {-# LINE 2237 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallVisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallVisitKinds- {-# LINE 2243 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallchildvisit =- ({-# LINE 1166 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallchildvisit- {-# LINE 2249 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOavisitdefs =- ({-# LINE 1312 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisitdefs- {-# LINE 2255 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOavisituses =- ({-# LINE 1313 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisituses- {-# LINE 2261 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOderivings =- ({-# LINE 129 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIderivings- {-# LINE 2267 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOimportBlocks =- ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIimportBlocks- {-# LINE 2273 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOinhmap =- ({-# LINE 312 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIinhmap- {-# LINE 2279 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOlocalAttrTypes =- ({-# LINE 1556 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIlocalAttrTypes- {-# LINE 2285 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOmainFile =- ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainFile- {-# LINE 2291 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOmainName =- ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainName- {-# LINE 2297 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOmoduleHeader =- ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImoduleHeader- {-# LINE 2303 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 2309 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOpragmaBlocks =- ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIpragmaBlocks- {-# LINE 2315 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOsynmap =- ({-# LINE 313 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIsynmap- {-# LINE 2321 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOtextBlocks =- ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsItextBlocks- {-# LINE 2327 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOtypeSyns =- ({-# LINE 128 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsItypeSyns- {-# LINE 2333 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOwrappers =- ({-# LINE 89 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIwrappers- {-# LINE 2339 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallFromToStates =- ({-# LINE 1527 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallFromToStates- {-# LINE 2345 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallInitStates =- ({-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInitStates- {-# LINE 2351 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallVisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallVisitKinds- {-# LINE 2357 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallchildvisit =- ({-# LINE 1166 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallchildvisit- {-# LINE 2363 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOavisitdefs =- ({-# LINE 1312 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisitdefs- {-# LINE 2369 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOavisituses =- ({-# LINE 1313 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisituses- {-# LINE 2375 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOderivings =- ({-# LINE 129 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIderivings- {-# LINE 2381 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOimportBlocks =- ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIimportBlocks- {-# LINE 2387 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOinhmap =- ({-# LINE 312 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIinhmap- {-# LINE 2393 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOlocalAttrTypes =- ({-# LINE 1556 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIlocalAttrTypes- {-# LINE 2399 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOmainFile =- ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainFile- {-# LINE 2405 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOmainName =- ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainName- {-# LINE 2411 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOmoduleHeader =- ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImoduleHeader- {-# LINE 2417 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 2423 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOpragmaBlocks =- ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIpragmaBlocks- {-# LINE 2429 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOsynmap =- ({-# LINE 313 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIsynmap- {-# LINE 2435 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOtextBlocks =- ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsItextBlocks- {-# LINE 2441 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOtypeSyns =- ({-# LINE 128 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsItypeSyns- {-# LINE 2447 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOwrappers =- ({-# LINE 89 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIwrappers- {-# LINE 2453 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _hdIappendCommon,_hdIappendMain,_hdIchildvisit,_hdIerrors,_hdIfromToStates,_hdIgenProdIO,_hdIimports,_hdIinitStates,_hdIoutput,_hdIsemFunBndDefs,_hdIsemFunBndTps,_hdIvisitKinds,_hdIvisitdefs,_hdIvisituses) =- hd_ _hdOallFromToStates _hdOallInitStates _hdOallVisitKinds _hdOallchildvisit _hdOavisitdefs _hdOavisituses _hdOderivings _hdOimportBlocks _hdOinhmap _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOoptions _hdOpragmaBlocks _hdOsynmap _hdOtextBlocks _hdOtypeSyns _hdOwrappers - ( _tlIappendCommon,_tlIappendMain,_tlIchildvisit,_tlIerrors,_tlIfromToStates,_tlIgenProdIO,_tlIimports,_tlIinitStates,_tlIoutput,_tlIsemFunBndDefs,_tlIsemFunBndTps,_tlIvisitKinds,_tlIvisitdefs,_tlIvisituses) =- tl_ _tlOallFromToStates _tlOallInitStates _tlOallVisitKinds _tlOallchildvisit _tlOavisitdefs _tlOavisituses _tlOderivings _tlOimportBlocks _tlOinhmap _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOoptions _tlOpragmaBlocks _tlOsynmap _tlOtextBlocks _tlOtypeSyns _tlOwrappers - in ( _lhsOappendCommon,_lhsOappendMain,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOinitStates,_lhsOoutput,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))) )-sem_ENonterminals_Nil :: T_ENonterminals -sem_ENonterminals_Nil =- (T_ENonterminals (\ _lhsIallFromToStates- _lhsIallInitStates- _lhsIallVisitKinds- _lhsIallchildvisit- _lhsIavisitdefs- _lhsIavisituses- _lhsIderivings- _lhsIimportBlocks- _lhsIinhmap- _lhsIlocalAttrTypes- _lhsImainFile- _lhsImainName- _lhsImoduleHeader- _lhsIoptions- _lhsIpragmaBlocks- _lhsIsynmap- _lhsItextBlocks- _lhsItypeSyns- _lhsIwrappers ->- (let _lhsOappendCommon :: ([PP_Doc])- _lhsOappendMain :: ([PP_Doc])- _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _lhsOerrors :: (Seq Error)- _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))- _lhsOgenProdIO :: (IO ())- _lhsOimports :: ([PP_Doc])- _lhsOinitStates :: (Map NontermIdent Int)- _lhsOoutput :: PP_Doc- _lhsOsemFunBndDefs :: (Seq PP_Doc)- _lhsOsemFunBndTps :: (Seq PP_Doc)- _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)- _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))- _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1427, column 51)- _lhsOappendCommon =- ({-# LINE 1427 "src-ag/ExecutionPlan2Hs.ag" #-}- []- {-# LINE 2499 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1427, column 51)- _lhsOappendMain =- ({-# LINE 1427 "src-ag/ExecutionPlan2Hs.ag" #-}- []- {-# LINE 2505 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1167, column 37)- _lhsOchildvisit =- ({-# LINE 1167 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 2511 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1609, column 132)- _lhsOerrors =- ({-# LINE 1609 "src-ag/ExecutionPlan2Hs.ag" #-}- Seq.empty- {-# LINE 2517 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1524, column 22)- _lhsOfromToStates =- ({-# LINE 1524 "src-ag/ExecutionPlan2Hs.ag" #-}- mempty- {-# LINE 2523 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1444, column 49)- _lhsOgenProdIO =- ({-# LINE 1444 "src-ag/ExecutionPlan2Hs.ag" #-}- return ()- {-# LINE 2529 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1443, column 47)- _lhsOimports =- ({-# LINE 1443 "src-ag/ExecutionPlan2Hs.ag" #-}- []- {-# LINE 2535 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1583, column 50)- _lhsOinitStates =- ({-# LINE 1583 "src-ag/ExecutionPlan2Hs.ag" #-}- mempty- {-# LINE 2541 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 90, column 45)- _lhsOoutput =- ({-# LINE 90 "src-ag/ExecutionPlan2Hs.ag" #-}- empty- {-# LINE 2547 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 514, column 92)- _lhsOsemFunBndDefs =- ({-# LINE 514 "src-ag/ExecutionPlan2Hs.ag" #-}- Seq.empty- {-# LINE 2553 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 514, column 92)- _lhsOsemFunBndTps =- ({-# LINE 514 "src-ag/ExecutionPlan2Hs.ag" #-}- Seq.empty- {-# LINE 2559 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1571, column 68)- _lhsOvisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- mempty- {-# LINE 2565 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1302, column 36)- _lhsOvisitdefs =- ({-# LINE 1302 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 2571 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1303, column 36)- _lhsOvisituses =- ({-# LINE 1303 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 2577 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOappendCommon,_lhsOappendMain,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOinitStates,_lhsOoutput,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))) )--- EProduction --------------------------------------------------{-- visit 0:- inherited attributes:- allFromToStates : Map VisitIdentifier (Int,Int)- allInhmap : Map NontermIdent Attributes- allInitStates : Map NontermIdent Int- allSynmap : Map NontermIdent Attributes- allVisitKinds : Map VisitIdentifier VisitKind- allchildvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- allstates : Set StateIdentifier- avisitdefs : Map VisitIdentifier (Set Identifier)- avisituses : Map VisitIdentifier (Set Identifier)- classCtxs : ClassContext- importBlocks : PP_Doc- inhmap : Attributes- initial : StateIdentifier- localAttrTypes : Map ConstructorIdent (Map Identifier Type)- mainFile : String- mainName : String- moduleHeader : String -> String -> String -> Bool -> String- nextVisits : Map StateIdentifier StateCtx- nt : NontermIdent- ntType : Type- options : Options- params : [Identifier]- pragmaBlocks : String- prevVisits : Map StateIdentifier StateCtx- rename : Bool- synmap : Attributes- textBlocks : PP_Doc- synthesized attributes:- allvisits : [VisitStateState]- childvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- count : Int- datatype : PP_Doc- errors : Seq Error- fromToStates : Map VisitIdentifier (Int,Int)- genProdIO : IO ()- imports : [PP_Doc]- semFunBndDefs : Seq PP_Doc- semFunBndTps : Seq PP_Doc- sem_nt : PP_Doc- sem_prod : PP_Doc- t_visits : PP_Doc- visitKinds : Map VisitIdentifier VisitKind- visitdefs : Map VisitIdentifier (Set Identifier)- visituses : Map VisitIdentifier (Set Identifier)- alternatives:- alternative EProduction:- child con : {ConstructorIdent}- child params : {[Identifier]}- child constraints : {[Type]}- child rules : ERules - child children : EChildren - child visits : Visits - visit 0:- local classPP1 : _- local quantPP1 : _- local semFunBndDef : _- local semFunBndTp : _- local semFunBndNm : _- local t_type : _- local t_params : _- local args : _- local semname : _- local sem_tp : _- local classPP2 : _- local quantPP2 : _- local sem_prod : _- local mkSemBody : _- local mbInitializer : _- local scc : _- local semInlinePragma : _- local outerlet : _- local statefns : _- local genstfn : _- local stargs : _- local stks : _- local stvisits : _- local stvs : _- local lazyIntras : _- local moduleName : _- local suffix : _- local outputfile : _- local ppMonadImports : _- local addbang : _- local childTypes : _- local localAttrTypes : _--}--- cata-sem_EProduction :: EProduction ->- T_EProduction -sem_EProduction (EProduction _con _params _constraints _rules _children _visits ) =- (sem_EProduction_EProduction _con _params _constraints (sem_ERules _rules ) (sem_EChildren _children ) (sem_Visits _visits ) )--- semantic domain-newtype T_EProduction = T_EProduction ((Map VisitIdentifier (Int,Int)) ->- (Map NontermIdent Attributes) ->- (Map NontermIdent Int) ->- (Map NontermIdent Attributes) ->- (Map VisitIdentifier VisitKind) ->- (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- (Set StateIdentifier) ->- (Map VisitIdentifier (Set Identifier)) ->- (Map VisitIdentifier (Set Identifier)) ->- ClassContext ->- PP_Doc ->- Attributes ->- StateIdentifier ->- (Map ConstructorIdent (Map Identifier Type)) ->- String ->- String ->- (String -> String -> String -> Bool -> String) ->- (Map StateIdentifier StateCtx) ->- NontermIdent ->- Type ->- Options ->- ([Identifier]) ->- String ->- (Map StateIdentifier StateCtx) ->- Bool ->- Attributes ->- PP_Doc ->- ( ([VisitStateState]),(Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),Int,PP_Doc,(Seq Error),(Map VisitIdentifier (Int,Int)),(IO ()),([PP_Doc]),(Seq PP_Doc),(Seq PP_Doc),PP_Doc,PP_Doc,PP_Doc,(Map VisitIdentifier VisitKind),(Map VisitIdentifier (Set Identifier)),(Map VisitIdentifier (Set Identifier))))-data Inh_EProduction = Inh_EProduction {allFromToStates_Inh_EProduction :: (Map VisitIdentifier (Int,Int)),allInhmap_Inh_EProduction :: (Map NontermIdent Attributes),allInitStates_Inh_EProduction :: (Map NontermIdent Int),allSynmap_Inh_EProduction :: (Map NontermIdent Attributes),allVisitKinds_Inh_EProduction :: (Map VisitIdentifier VisitKind),allchildvisit_Inh_EProduction :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),allstates_Inh_EProduction :: (Set StateIdentifier),avisitdefs_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)),avisituses_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)),classCtxs_Inh_EProduction :: ClassContext,importBlocks_Inh_EProduction :: PP_Doc,inhmap_Inh_EProduction :: Attributes,initial_Inh_EProduction :: StateIdentifier,localAttrTypes_Inh_EProduction :: (Map ConstructorIdent (Map Identifier Type)),mainFile_Inh_EProduction :: String,mainName_Inh_EProduction :: String,moduleHeader_Inh_EProduction :: (String -> String -> String -> Bool -> String),nextVisits_Inh_EProduction :: (Map StateIdentifier StateCtx),nt_Inh_EProduction :: NontermIdent,ntType_Inh_EProduction :: Type,options_Inh_EProduction :: Options,params_Inh_EProduction :: ([Identifier]),pragmaBlocks_Inh_EProduction :: String,prevVisits_Inh_EProduction :: (Map StateIdentifier StateCtx),rename_Inh_EProduction :: Bool,synmap_Inh_EProduction :: Attributes,textBlocks_Inh_EProduction :: PP_Doc}-data Syn_EProduction = Syn_EProduction {allvisits_Syn_EProduction :: ([VisitStateState]),childvisit_Syn_EProduction :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),count_Syn_EProduction :: Int,datatype_Syn_EProduction :: PP_Doc,errors_Syn_EProduction :: (Seq Error),fromToStates_Syn_EProduction :: (Map VisitIdentifier (Int,Int)),genProdIO_Syn_EProduction :: (IO ()),imports_Syn_EProduction :: ([PP_Doc]),semFunBndDefs_Syn_EProduction :: (Seq PP_Doc),semFunBndTps_Syn_EProduction :: (Seq PP_Doc),sem_nt_Syn_EProduction :: PP_Doc,sem_prod_Syn_EProduction :: PP_Doc,t_visits_Syn_EProduction :: PP_Doc,visitKinds_Syn_EProduction :: (Map VisitIdentifier VisitKind),visitdefs_Syn_EProduction :: (Map VisitIdentifier (Set Identifier)),visituses_Syn_EProduction :: (Map VisitIdentifier (Set Identifier))}-wrap_EProduction :: T_EProduction ->- Inh_EProduction ->- Syn_EProduction -wrap_EProduction (T_EProduction sem ) (Inh_EProduction _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks ) =- (let ( _lhsOallvisits,_lhsOchildvisit,_lhsOcount,_lhsOdatatype,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOsem_nt,_lhsOsem_prod,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses) = sem _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks - in (Syn_EProduction _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses ))-sem_EProduction_EProduction :: ConstructorIdent ->- ([Identifier]) ->- ([Type]) ->- T_ERules ->- T_EChildren ->- T_Visits ->- T_EProduction -sem_EProduction_EProduction con_ params_ constraints_ (T_ERules rules_ ) (T_EChildren children_ ) (T_Visits visits_ ) =- (T_EProduction (\ _lhsIallFromToStates- _lhsIallInhmap- _lhsIallInitStates- _lhsIallSynmap- _lhsIallVisitKinds- _lhsIallchildvisit- _lhsIallstates- _lhsIavisitdefs- _lhsIavisituses- _lhsIclassCtxs- _lhsIimportBlocks- _lhsIinhmap- _lhsIinitial- _lhsIlocalAttrTypes- _lhsImainFile- _lhsImainName- _lhsImoduleHeader- _lhsInextVisits- _lhsInt- _lhsIntType- _lhsIoptions- _lhsIparams- _lhsIpragmaBlocks- _lhsIprevVisits- _lhsIrename- _lhsIsynmap- _lhsItextBlocks ->- (let _childrenOcon :: ConstructorIdent- _rulesOcon :: ConstructorIdent- _visitsOcon :: ConstructorIdent- _lhsOdatatype :: PP_Doc- _lhsOcount :: Int- _lhsOsem_nt :: PP_Doc- _lhsOsemFunBndDefs :: (Seq PP_Doc)- _lhsOsemFunBndTps :: (Seq PP_Doc)- _visitsOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))- _visitsOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))- _rulesOusageInfo :: (Map Identifier Int)- _rulesOruleKinds :: (Map Identifier (Set VisitKind))- _visitsOallintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))- _visitsOterminaldefs :: (Set String)- _visitsOruledefs :: (Map Identifier (Set String))- _visitsOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))- _lhsOimports :: ([PP_Doc])- _lhsOgenProdIO :: (IO ())- _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _lhsOerrors :: (Seq Error)- _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))- _lhsOt_visits :: PP_Doc- _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)- _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))- _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))- _lhsOallvisits :: ([VisitStateState])- _lhsOsem_prod :: PP_Doc- _rulesOallInhmap :: (Map NontermIdent Attributes)- _rulesOallSynmap :: (Map NontermIdent Attributes)- _rulesOchildTypes :: (Map Identifier Type)- _rulesOimportBlocks :: PP_Doc- _rulesOinhmap :: Attributes- _rulesOlazyIntras :: (Set String)- _rulesOlocalAttrTypes :: (Map Identifier Type)- _rulesOmainFile :: String- _rulesOmainName :: String- _rulesOmoduleHeader :: (String -> String -> String -> Bool -> String)- _rulesOnt :: NontermIdent- _rulesOoptions :: Options- _rulesOpragmaBlocks :: String- _rulesOsynmap :: Attributes- _rulesOtextBlocks :: PP_Doc- _childrenOallInitStates :: (Map NontermIdent Int)- _childrenOimportBlocks :: PP_Doc- _childrenOmainFile :: String- _childrenOmainName :: String- _childrenOmoduleHeader :: (String -> String -> String -> Bool -> String)- _childrenOnt :: NontermIdent- _childrenOoptions :: Options- _childrenOpragmaBlocks :: String- _childrenOtextBlocks :: PP_Doc- _visitsOallFromToStates :: (Map VisitIdentifier (Int,Int))- _visitsOallInhmap :: (Map NontermIdent Attributes)- _visitsOallInitStates :: (Map NontermIdent Int)- _visitsOallSynmap :: (Map NontermIdent Attributes)- _visitsOallVisitKinds :: (Map VisitIdentifier VisitKind)- _visitsOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _visitsOavisitdefs :: (Map VisitIdentifier (Set Identifier))- _visitsOavisituses :: (Map VisitIdentifier (Set Identifier))- _visitsOchildTypes :: (Map Identifier Type)- _visitsOinhmap :: Attributes- _visitsOnextVisits :: (Map StateIdentifier StateCtx)- _visitsOnt :: NontermIdent- _visitsOoptions :: Options- _visitsOparams :: ([Identifier])- _visitsOprevVisits :: (Map StateIdentifier StateCtx)- _visitsOsynmap :: Attributes- _rulesIerrors :: (Seq Error)- _rulesImrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))- _rulesIruledefs :: (Map Identifier (Set String))- _rulesIruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))- _rulesIsem_rules :: PP_Doc- _childrenIargnamesw :: ([PP_Doc])- _childrenIargpats :: ( [PP_Doc] )- _childrenIargtps :: ( [PP_Doc] )- _childrenIchildTypes :: (Map Identifier Type)- _childrenIchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))- _childrenIdatatype :: ([PP_Doc])- _childrenIterminaldefs :: (Set String)- _visitsIallvisits :: ([VisitStateState])- _visitsIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _visitsIerrors :: (Seq Error)- _visitsIfromToStates :: (Map VisitIdentifier (Int,Int))- _visitsIintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))- _visitsIlazyIntras :: (Set String)- _visitsIruleKinds :: (Map Identifier (Set VisitKind))- _visitsIruleUsage :: (Map Identifier Int)- _visitsIsem_visit :: ( [(StateIdentifier,Bool -> PP_Doc)] )- _visitsIt_visits :: PP_Doc- _visitsIvisitKinds :: (Map VisitIdentifier VisitKind)- _visitsIvisitdefs :: (Map VisitIdentifier (Set Identifier))- _visitsIvisituses :: (Map VisitIdentifier (Set Identifier))- -- "src-ag/ExecutionPlan2Hs.ag"(line 69, column 17)- _childrenOcon =- ({-# LINE 69 "src-ag/ExecutionPlan2Hs.ag" #-}- con_- {-# LINE 2843 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 70, column 17)- _rulesOcon =- ({-# LINE 70 "src-ag/ExecutionPlan2Hs.ag" #-}- con_- {-# LINE 2849 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 71, column 17)- _visitsOcon =- ({-# LINE 71 "src-ag/ExecutionPlan2Hs.ag" #-}- con_- {-# LINE 2855 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 184, column 17)- _lhsOdatatype =- ({-# LINE 184 "src-ag/ExecutionPlan2Hs.ag" #-}- _quantPP1 >#< _classPP1- >#< conname _lhsIrename _lhsInt con_- >#< ppConFields (dataRecords _lhsIoptions) _childrenIdatatype- {-# LINE 2863 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 187, column 17)- _classPP1 =- ({-# LINE 187 "src-ag/ExecutionPlan2Hs.ag" #-}- ppClasses (classConstrsToDocs constraints_)- {-# LINE 2869 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 188, column 17)- _quantPP1 =- ({-# LINE 188 "src-ag/ExecutionPlan2Hs.ag" #-}- ppQuants params_- {-# LINE 2875 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 289, column 32)- _lhsOcount =- ({-# LINE 289 "src-ag/ExecutionPlan2Hs.ag" #-}- 1- {-# LINE 2881 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 294, column 17)- _lhsOsem_nt =- ({-# LINE 294 "src-ag/ExecutionPlan2Hs.ag" #-}- "sem_" >|< _lhsInt >#< "(" >#< conname _lhsIrename _lhsInt con_ >#< ppSpaced _childrenIargpats >#< ")"- >#< "=" >#< "sem_" >|< _lhsInt >|< "_" >|< con_ >#< ppSpaced _childrenIargnamesw- {-# LINE 2888 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 523, column 3)- _lhsOsemFunBndDefs =- ({-# LINE 523 "src-ag/ExecutionPlan2Hs.ag" #-}- Seq.singleton _semFunBndDef- {-# LINE 2894 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 524, column 3)- _lhsOsemFunBndTps =- ({-# LINE 524 "src-ag/ExecutionPlan2Hs.ag" #-}- Seq.singleton _semFunBndTp- {-# LINE 2900 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 525, column 3)- _semFunBndDef =- ({-# LINE 525 "src-ag/ExecutionPlan2Hs.ag" #-}- _semFunBndNm >#< "=" >#< _semname- {-# LINE 2906 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 526, column 3)- _semFunBndTp =- ({-# LINE 526 "src-ag/ExecutionPlan2Hs.ag" #-}- _semFunBndNm >#< "::" >#< _sem_tp- {-# LINE 2912 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 527, column 3)- _semFunBndNm =- ({-# LINE 527 "src-ag/ExecutionPlan2Hs.ag" #-}- lateSemConLabel _lhsInt con_- {-# LINE 2918 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 585, column 17)- _t_type =- ({-# LINE 585 "src-ag/ExecutionPlan2Hs.ag" #-}- "T_" >|< _lhsInt- {-# LINE 2924 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 586, column 17)- _t_params =- ({-# LINE 586 "src-ag/ExecutionPlan2Hs.ag" #-}- ppSpaced _lhsIparams- {-# LINE 2930 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 587, column 17)- _args =- ({-# LINE 587 "src-ag/ExecutionPlan2Hs.ag" #-}- _childrenIargpats- {-# LINE 2936 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 588, column 17)- _semname =- ({-# LINE 588 "src-ag/ExecutionPlan2Hs.ag" #-}- "sem_" ++ show _lhsInt ++ "_" ++ show con_- {-# LINE 2942 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 589, column 17)- _sem_tp =- ({-# LINE 589 "src-ag/ExecutionPlan2Hs.ag" #-}- _quantPP2 >#< _classPP2 >#< ppSpaced _childrenIargtps >#< _t_type >#< _t_params- {-# LINE 2948 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 590, column 17)- _classPP2 =- ({-# LINE 590 "src-ag/ExecutionPlan2Hs.ag" #-}- ppClasses (classCtxsToDocs _lhsIclassCtxs ++ classConstrsToDocs constraints_)- {-# LINE 2954 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 591, column 17)- _quantPP2 =- ({-# LINE 591 "src-ag/ExecutionPlan2Hs.ag" #-}- ppQuants (_lhsIparams ++ params_)- {-# LINE 2960 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 592, column 17)- _sem_prod =- ({-# LINE 592 "src-ag/ExecutionPlan2Hs.ag" #-}- _semInlinePragma- >-< _semname >#< "::" >#< _sem_tp- >-< _mkSemBody (_semname >#< ppSpaced _args >#< "=" >#< _scc >#< _t_type )- _mbInitializer _outerlet ("return" >#< "st" >|< _lhsIinitial)- {-# LINE 2969 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 596, column 17)- _mkSemBody =- ({-# LINE 596 "src-ag/ExecutionPlan2Hs.ag" #-}- \prefix mbInit outerlet ret ->- case mbInit of- Nothing -> prefix >#< pp_parens ret >#< "where"- >-< indent 3 outerlet- Just m -> prefix >#< "(" >#< "do"- >-< indent 1 (- m- >-< "let"- >-< indent 2 outerlet- >-< ret )- >-< indent 1 ")"- {-# LINE 2985 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 608, column 17)- _mbInitializer =- ({-# LINE 608 "src-ag/ExecutionPlan2Hs.ag" #-}- if parallelInvoke _lhsIoptions- then (Nothing :: Maybe PP_Doc)- else Nothing- {-# LINE 2993 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 614, column 17)- _scc =- ({-# LINE 614 "src-ag/ExecutionPlan2Hs.ag" #-}- if genCostCentres _lhsIoptions- then ppCostCentre _semname- else empty- {-# LINE 3001 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 617, column 17)- _semInlinePragma =- ({-# LINE 617 "src-ag/ExecutionPlan2Hs.ag" #-}- if noInlinePragmas _lhsIoptions- then empty- else ppNoInline _semname- {-# LINE 3009 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 620, column 17)- _outerlet =- ({-# LINE 620 "src-ag/ExecutionPlan2Hs.ag" #-}- vlist _statefns >-< _rulesIsem_rules- {-# LINE 3015 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 621, column 17)- _statefns =- ({-# LINE 621 "src-ag/ExecutionPlan2Hs.ag" #-}- map _genstfn $ Set.toList _lhsIallstates- {-# LINE 3021 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 622, column 17)- _genstfn =- ({-# LINE 622 "src-ag/ExecutionPlan2Hs.ag" #-}- \st -> let nextVisitInfo = Map.findWithDefault ManyVis st _lhsInextVisits- prevVisitInfo = Map.findWithDefault ManyVis st _lhsIprevVisits- stNm = "st" >|< st- lhs = pragma >-< bang stNm >#< "=" >#<- (- if st == _lhsIinitial- then empty- else "\\" >#< _stargs st >#< "->"- )- pragma = if noInlinePragmas _lhsIoptions- then empty- else if helpInlining _lhsIoptions- then case prevVisitInfo of- ManyVis -> ppNoInline stNm- OneVis _ -> if aggressiveInlinePragmas _lhsIoptions- then ppInline stNm- else ppInlinable stNm- NoneVis -> if st /= _lhsIinitial- then error ("State " ++ show st ++ " is not reachable from the initial state.")- else if aggressiveInlinePragmas _lhsIoptions- then ppInline stNm- else ppInlinable stNm- else ppNoInline stNm- cCon = "C_" >|< _lhsInt >|< "_s" >|< st- bang | st == _lhsIinitial = _addbang- | otherwise = id- in case nextVisitInfo of- NoneVis ->- if st == _lhsIinitial- then lhs >#< cCon- else empty- OneVis vId -> mklet lhs (_stvs st False) (cCon >#< "v" >|< vId)- ManyVis -> mklet lhs (_stks st >-< _stvs st True) (cCon >#< "k" >|< st)- {-# LINE 3059 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 664, column 17)- _stargs =- ({-# LINE 664 "src-ag/ExecutionPlan2Hs.ag" #-}- \st -> let attrs = maybe Map.empty id $ Map.lookup st _visitsIintramap- in ppSpaced [ let match | str `Set.member` _lazyIntras = pp str- | otherwise = _addbang (pp str)- in case mbAttr of- Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->- case Map.lookup nm _localAttrTypes of- Just tp -> pp_parens (pp_parens match >#< "::" >#< ppTp tp)- Nothing -> match- Just attr | not (noPerStateTypeSigs _lhsIoptions) ->- case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _childTypes of- Just tpDoc -> pp_parens (pp_parens match >#< "::" >#< tpDoc)- Nothing -> match- _ -> match- | (str,mbAttr) <- Map.assocs attrs- ] >#< dummyPat _lhsIoptions (Map.null attrs)- {-# LINE 3079 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 680, column 17)- _stks =- ({-# LINE 680 "src-ag/ExecutionPlan2Hs.ag" #-}- \st -> if null (_stvisits st)- then empty- else ( if not (noInlinePragmas _lhsIoptions) && helpInlining _lhsIoptions- then ppNoInline ("k" >|< st)- else empty- )- >-< "k" >|< st >#< "::" >#< "K_" >|< _lhsInt >|< "_s" >|< st >#< "t" >#< "->" >#< "t"- >-< vlist (map (\(v,f,t) -> "k" >|< st >#< "K_" >|< _lhsInt >|< "_v" >|< v >#< "="- >#< "v" >|< v) $ _stvisits st)- {-# LINE 3093 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 689, column 17)- _stvisits =- ({-# LINE 689 "src-ag/ExecutionPlan2Hs.ag" #-}- \st -> filter (\(v,f,t) -> f == st) _visitsIallvisits- {-# LINE 3099 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 690, column 17)- _stvs =- ({-# LINE 690 "src-ag/ExecutionPlan2Hs.ag" #-}- \st inlinePragma -> vlist [ppf inlinePragma | (f,ppf) <- _visitsIsem_visit, f == st]- {-# LINE 3105 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 691, column 17)- _visitsOmrules =- ({-# LINE 691 "src-ag/ExecutionPlan2Hs.ag" #-}- _rulesImrules- {-# LINE 3111 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 895, column 17)- _visitsOchildintros =- ({-# LINE 895 "src-ag/ExecutionPlan2Hs.ag" #-}- _childrenIchildintros- {-# LINE 3117 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1226, column 32)- _rulesOusageInfo =- ({-# LINE 1226 "src-ag/ExecutionPlan2Hs.ag" #-}- _visitsIruleUsage- {-# LINE 3123 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1241, column 3)- _rulesOruleKinds =- ({-# LINE 1241 "src-ag/ExecutionPlan2Hs.ag" #-}- _visitsIruleKinds- {-# LINE 3129 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1270, column 3)- _visitsOallintramap =- ({-# LINE 1270 "src-ag/ExecutionPlan2Hs.ag" #-}- _visitsIintramap- {-# LINE 3135 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1271, column 3)- _visitsOterminaldefs =- ({-# LINE 1271 "src-ag/ExecutionPlan2Hs.ag" #-}- _childrenIterminaldefs- {-# LINE 3141 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1295, column 17)- _visitsOruledefs =- ({-# LINE 1295 "src-ag/ExecutionPlan2Hs.ag" #-}- _rulesIruledefs- {-# LINE 3147 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1296, column 17)- _visitsOruleuses =- ({-# LINE 1296 "src-ag/ExecutionPlan2Hs.ag" #-}- _rulesIruleuses- {-# LINE 3153 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1350, column 3)- _lazyIntras =- ({-# LINE 1350 "src-ag/ExecutionPlan2Hs.ag" #-}- _visitsIlazyIntras- {-# LINE 3159 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1447, column 17)- _lhsOimports =- ({-# LINE 1447 "src-ag/ExecutionPlan2Hs.ag" #-}- [pp $ "import " ++ _moduleName ]- {-# LINE 3165 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1448, column 17)- _moduleName =- ({-# LINE 1448 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainName ++ _suffix- {-# LINE 3171 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1449, column 17)- _suffix =- ({-# LINE 1449 "src-ag/ExecutionPlan2Hs.ag" #-}- "_" ++ show _lhsInt ++ "_" ++ show con_- {-# LINE 3177 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1450, column 17)- _outputfile =- ({-# LINE 1450 "src-ag/ExecutionPlan2Hs.ag" #-}- replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ _suffix )- {-# LINE 3183 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1451, column 17)- _ppMonadImports =- ({-# LINE 1451 "src-ag/ExecutionPlan2Hs.ag" #-}- if parallelInvoke _lhsIoptions- then pp "import qualified System.IO.Unsafe(unsafePerformIO)"- >-< pp "import System.IO(IO)"- >-< pp "import Control.Concurrent(newEmptyMVar,forkIO,putMVar,takeMVar)"- else pp "import Control.Monad.Identity"- {-# LINE 3193 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1456, column 17)- _lhsOgenProdIO =- ({-# LINE 1456 "src-ag/ExecutionPlan2Hs.ag" #-}- writeModule _outputfile- [ warrenFlagsPP _lhsIoptions- , pp $ _lhsIpragmaBlocks- , pp $ _lhsImoduleHeader _lhsImainName _suffix _semname True- , _lhsIimportBlocks- , _ppMonadImports- , ( if tupleAsDummyToken _lhsIoptions- then empty- else pp "import GHC.Prim"- )- , pp $ "import " ++ _lhsImainName ++ "_common"- , _sem_prod- ]- {-# LINE 3211 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1497, column 37)- _addbang =- ({-# LINE 1497 "src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 3217 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1547, column 3)- _childTypes =- ({-# LINE 1547 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton _LHS _lhsIntType `Map.union` _childrenIchildTypes- {-# LINE 3223 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1564, column 3)- _localAttrTypes =- ({-# LINE 1564 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault Map.empty con_ _lhsIlocalAttrTypes- {-# LINE 3229 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1167, column 37)- _lhsOchildvisit =- ({-# LINE 1167 "src-ag/ExecutionPlan2Hs.ag" #-}- _visitsIchildvisit- {-# LINE 3235 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1609, column 132)- _lhsOerrors =- ({-# LINE 1609 "src-ag/ExecutionPlan2Hs.ag" #-}- _rulesIerrors Seq.>< _visitsIerrors- {-# LINE 3241 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1524, column 22)- _lhsOfromToStates =- ({-# LINE 1524 "src-ag/ExecutionPlan2Hs.ag" #-}- _visitsIfromToStates- {-# LINE 3247 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 393, column 59)- _lhsOt_visits =- ({-# LINE 393 "src-ag/ExecutionPlan2Hs.ag" #-}- _visitsIt_visits- {-# LINE 3253 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1571, column 68)- _lhsOvisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _visitsIvisitKinds- {-# LINE 3259 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1302, column 36)- _lhsOvisitdefs =- ({-# LINE 1302 "src-ag/ExecutionPlan2Hs.ag" #-}- _visitsIvisitdefs- {-# LINE 3265 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1303, column 36)- _lhsOvisituses =- ({-# LINE 1303 "src-ag/ExecutionPlan2Hs.ag" #-}- _visitsIvisituses- {-# LINE 3271 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (up)- _lhsOallvisits =- ({-# LINE 337 "src-ag/ExecutionPlan2Hs.ag" #-}- _visitsIallvisits- {-# LINE 3277 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (from local)- _lhsOsem_prod =- ({-# LINE 552 "src-ag/ExecutionPlan2Hs.ag" #-}- _sem_prod- {-# LINE 3283 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _rulesOallInhmap =- ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInhmap- {-# LINE 3289 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _rulesOallSynmap =- ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallSynmap- {-# LINE 3295 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (from local)- _rulesOchildTypes =- ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}- _childTypes- {-# LINE 3301 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _rulesOimportBlocks =- ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIimportBlocks- {-# LINE 3307 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _rulesOinhmap =- ({-# LINE 318 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIinhmap- {-# LINE 3313 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (from local)- _rulesOlazyIntras =- ({-# LINE 1336 "src-ag/ExecutionPlan2Hs.ag" #-}- _lazyIntras- {-# LINE 3319 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (from local)- _rulesOlocalAttrTypes =- ({-# LINE 1558 "src-ag/ExecutionPlan2Hs.ag" #-}- _localAttrTypes- {-# LINE 3325 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _rulesOmainFile =- ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainFile- {-# LINE 3331 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _rulesOmainName =- ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainName- {-# LINE 3337 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _rulesOmoduleHeader =- ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImoduleHeader- {-# LINE 3343 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _rulesOnt =- ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsInt- {-# LINE 3349 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _rulesOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 3355 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _rulesOpragmaBlocks =- ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIpragmaBlocks- {-# LINE 3361 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _rulesOsynmap =- ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIsynmap- {-# LINE 3367 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _rulesOtextBlocks =- ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsItextBlocks- {-# LINE 3373 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _childrenOallInitStates =- ({-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInitStates- {-# LINE 3379 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _childrenOimportBlocks =- ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIimportBlocks- {-# LINE 3385 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _childrenOmainFile =- ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainFile- {-# LINE 3391 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _childrenOmainName =- ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainName- {-# LINE 3397 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _childrenOmoduleHeader =- ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImoduleHeader- {-# LINE 3403 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _childrenOnt =- ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsInt- {-# LINE 3409 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _childrenOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 3415 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _childrenOpragmaBlocks =- ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIpragmaBlocks- {-# LINE 3421 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _childrenOtextBlocks =- ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsItextBlocks- {-# LINE 3427 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _visitsOallFromToStates =- ({-# LINE 1527 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallFromToStates- {-# LINE 3433 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _visitsOallInhmap =- ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInhmap- {-# LINE 3439 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _visitsOallInitStates =- ({-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInitStates- {-# LINE 3445 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _visitsOallSynmap =- ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallSynmap- {-# LINE 3451 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _visitsOallVisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallVisitKinds- {-# LINE 3457 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _visitsOallchildvisit =- ({-# LINE 1166 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallchildvisit- {-# LINE 3463 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _visitsOavisitdefs =- ({-# LINE 1312 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisitdefs- {-# LINE 3469 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _visitsOavisituses =- ({-# LINE 1313 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisituses- {-# LINE 3475 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (from local)- _visitsOchildTypes =- ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}- _childTypes- {-# LINE 3481 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _visitsOinhmap =- ({-# LINE 318 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIinhmap- {-# LINE 3487 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _visitsOnextVisits =- ({-# LINE 1513 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsInextVisits- {-# LINE 3493 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _visitsOnt =- ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsInt- {-# LINE 3499 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _visitsOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 3505 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _visitsOparams =- ({-# LINE 73 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIparams- {-# LINE 3511 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _visitsOprevVisits =- ({-# LINE 1513 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIprevVisits- {-# LINE 3517 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _visitsOsynmap =- ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIsynmap- {-# LINE 3523 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _rulesIerrors,_rulesImrules,_rulesIruledefs,_rulesIruleuses,_rulesIsem_rules) =- rules_ _rulesOallInhmap _rulesOallSynmap _rulesOchildTypes _rulesOcon _rulesOimportBlocks _rulesOinhmap _rulesOlazyIntras _rulesOlocalAttrTypes _rulesOmainFile _rulesOmainName _rulesOmoduleHeader _rulesOnt _rulesOoptions _rulesOpragmaBlocks _rulesOruleKinds _rulesOsynmap _rulesOtextBlocks _rulesOusageInfo - ( _childrenIargnamesw,_childrenIargpats,_childrenIargtps,_childrenIchildTypes,_childrenIchildintros,_childrenIdatatype,_childrenIterminaldefs) =- children_ _childrenOallInitStates _childrenOcon _childrenOimportBlocks _childrenOmainFile _childrenOmainName _childrenOmoduleHeader _childrenOnt _childrenOoptions _childrenOpragmaBlocks _childrenOtextBlocks - ( _visitsIallvisits,_visitsIchildvisit,_visitsIerrors,_visitsIfromToStates,_visitsIintramap,_visitsIlazyIntras,_visitsIruleKinds,_visitsIruleUsage,_visitsIsem_visit,_visitsIt_visits,_visitsIvisitKinds,_visitsIvisitdefs,_visitsIvisituses) =- visits_ _visitsOallFromToStates _visitsOallInhmap _visitsOallInitStates _visitsOallSynmap _visitsOallVisitKinds _visitsOallchildvisit _visitsOallintramap _visitsOavisitdefs _visitsOavisituses _visitsOchildTypes _visitsOchildintros _visitsOcon _visitsOinhmap _visitsOmrules _visitsOnextVisits _visitsOnt _visitsOoptions _visitsOparams _visitsOprevVisits _visitsOruledefs _visitsOruleuses _visitsOsynmap _visitsOterminaldefs - in ( _lhsOallvisits,_lhsOchildvisit,_lhsOcount,_lhsOdatatype,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOsem_nt,_lhsOsem_prod,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))) )--- EProductions -------------------------------------------------{-- visit 0:- inherited attributes:- allFromToStates : Map VisitIdentifier (Int,Int)- allInhmap : Map NontermIdent Attributes- allInitStates : Map NontermIdent Int- allSynmap : Map NontermIdent Attributes- allVisitKinds : Map VisitIdentifier VisitKind- allchildvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- allstates : Set StateIdentifier- avisitdefs : Map VisitIdentifier (Set Identifier)- avisituses : Map VisitIdentifier (Set Identifier)- classCtxs : ClassContext- importBlocks : PP_Doc- inhmap : Attributes- initial : StateIdentifier- localAttrTypes : Map ConstructorIdent (Map Identifier Type)- mainFile : String- mainName : String- moduleHeader : String -> String -> String -> Bool -> String- nextVisits : Map StateIdentifier StateCtx- nt : NontermIdent- ntType : Type- options : Options- params : [Identifier]- pragmaBlocks : String- prevVisits : Map StateIdentifier StateCtx- rename : Bool- synmap : Attributes- textBlocks : PP_Doc- synthesized attributes:- allvisits : [VisitStateState]- childvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- count : Int- datatype : [PP_Doc]- errors : Seq Error- fromToStates : Map VisitIdentifier (Int,Int)- genProdIO : IO ()- imports : [PP_Doc]- semFunBndDefs : Seq PP_Doc- semFunBndTps : Seq PP_Doc- sem_nt : PP_Doc- sem_prod : PP_Doc- t_visits : PP_Doc- visitKinds : Map VisitIdentifier VisitKind- visitdefs : Map VisitIdentifier (Set Identifier)- visituses : Map VisitIdentifier (Set Identifier)- alternatives:- alternative Cons:- child hd : EProduction - child tl : EProductions - alternative Nil:--}--- cata-sem_EProductions :: EProductions ->- T_EProductions -sem_EProductions list =- (Prelude.foldr sem_EProductions_Cons sem_EProductions_Nil (Prelude.map sem_EProduction list) )--- semantic domain-newtype T_EProductions = T_EProductions ((Map VisitIdentifier (Int,Int)) ->- (Map NontermIdent Attributes) ->- (Map NontermIdent Int) ->- (Map NontermIdent Attributes) ->- (Map VisitIdentifier VisitKind) ->- (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- (Set StateIdentifier) ->- (Map VisitIdentifier (Set Identifier)) ->- (Map VisitIdentifier (Set Identifier)) ->- ClassContext ->- PP_Doc ->- Attributes ->- StateIdentifier ->- (Map ConstructorIdent (Map Identifier Type)) ->- String ->- String ->- (String -> String -> String -> Bool -> String) ->- (Map StateIdentifier StateCtx) ->- NontermIdent ->- Type ->- Options ->- ([Identifier]) ->- String ->- (Map StateIdentifier StateCtx) ->- Bool ->- Attributes ->- PP_Doc ->- ( ([VisitStateState]),(Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),Int,([PP_Doc]),(Seq Error),(Map VisitIdentifier (Int,Int)),(IO ()),([PP_Doc]),(Seq PP_Doc),(Seq PP_Doc),PP_Doc,PP_Doc,PP_Doc,(Map VisitIdentifier VisitKind),(Map VisitIdentifier (Set Identifier)),(Map VisitIdentifier (Set Identifier))))-data Inh_EProductions = Inh_EProductions {allFromToStates_Inh_EProductions :: (Map VisitIdentifier (Int,Int)),allInhmap_Inh_EProductions :: (Map NontermIdent Attributes),allInitStates_Inh_EProductions :: (Map NontermIdent Int),allSynmap_Inh_EProductions :: (Map NontermIdent Attributes),allVisitKinds_Inh_EProductions :: (Map VisitIdentifier VisitKind),allchildvisit_Inh_EProductions :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),allstates_Inh_EProductions :: (Set StateIdentifier),avisitdefs_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)),avisituses_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)),classCtxs_Inh_EProductions :: ClassContext,importBlocks_Inh_EProductions :: PP_Doc,inhmap_Inh_EProductions :: Attributes,initial_Inh_EProductions :: StateIdentifier,localAttrTypes_Inh_EProductions :: (Map ConstructorIdent (Map Identifier Type)),mainFile_Inh_EProductions :: String,mainName_Inh_EProductions :: String,moduleHeader_Inh_EProductions :: (String -> String -> String -> Bool -> String),nextVisits_Inh_EProductions :: (Map StateIdentifier StateCtx),nt_Inh_EProductions :: NontermIdent,ntType_Inh_EProductions :: Type,options_Inh_EProductions :: Options,params_Inh_EProductions :: ([Identifier]),pragmaBlocks_Inh_EProductions :: String,prevVisits_Inh_EProductions :: (Map StateIdentifier StateCtx),rename_Inh_EProductions :: Bool,synmap_Inh_EProductions :: Attributes,textBlocks_Inh_EProductions :: PP_Doc}-data Syn_EProductions = Syn_EProductions {allvisits_Syn_EProductions :: ([VisitStateState]),childvisit_Syn_EProductions :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),count_Syn_EProductions :: Int,datatype_Syn_EProductions :: ([PP_Doc]),errors_Syn_EProductions :: (Seq Error),fromToStates_Syn_EProductions :: (Map VisitIdentifier (Int,Int)),genProdIO_Syn_EProductions :: (IO ()),imports_Syn_EProductions :: ([PP_Doc]),semFunBndDefs_Syn_EProductions :: (Seq PP_Doc),semFunBndTps_Syn_EProductions :: (Seq PP_Doc),sem_nt_Syn_EProductions :: PP_Doc,sem_prod_Syn_EProductions :: PP_Doc,t_visits_Syn_EProductions :: PP_Doc,visitKinds_Syn_EProductions :: (Map VisitIdentifier VisitKind),visitdefs_Syn_EProductions :: (Map VisitIdentifier (Set Identifier)),visituses_Syn_EProductions :: (Map VisitIdentifier (Set Identifier))}-wrap_EProductions :: T_EProductions ->- Inh_EProductions ->- Syn_EProductions -wrap_EProductions (T_EProductions sem ) (Inh_EProductions _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks ) =- (let ( _lhsOallvisits,_lhsOchildvisit,_lhsOcount,_lhsOdatatype,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOsem_nt,_lhsOsem_prod,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses) = sem _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks - in (Syn_EProductions _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses ))-sem_EProductions_Cons :: T_EProduction ->- T_EProductions ->- T_EProductions -sem_EProductions_Cons (T_EProduction hd_ ) (T_EProductions tl_ ) =- (T_EProductions (\ _lhsIallFromToStates- _lhsIallInhmap- _lhsIallInitStates- _lhsIallSynmap- _lhsIallVisitKinds- _lhsIallchildvisit- _lhsIallstates- _lhsIavisitdefs- _lhsIavisituses- _lhsIclassCtxs- _lhsIimportBlocks- _lhsIinhmap- _lhsIinitial- _lhsIlocalAttrTypes- _lhsImainFile- _lhsImainName- _lhsImoduleHeader- _lhsInextVisits- _lhsInt- _lhsIntType- _lhsIoptions- _lhsIparams- _lhsIpragmaBlocks- _lhsIprevVisits- _lhsIrename- _lhsIsynmap- _lhsItextBlocks ->- (let _lhsOallvisits :: ([VisitStateState])- _lhsOt_visits :: PP_Doc- _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _lhsOcount :: Int- _lhsOdatatype :: ([PP_Doc])- _lhsOerrors :: (Seq Error)- _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))- _lhsOgenProdIO :: (IO ())- _lhsOimports :: ([PP_Doc])- _lhsOsemFunBndDefs :: (Seq PP_Doc)- _lhsOsemFunBndTps :: (Seq PP_Doc)- _lhsOsem_nt :: PP_Doc- _lhsOsem_prod :: PP_Doc- _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)- _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))- _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))- _hdOallFromToStates :: (Map VisitIdentifier (Int,Int))- _hdOallInhmap :: (Map NontermIdent Attributes)- _hdOallInitStates :: (Map NontermIdent Int)- _hdOallSynmap :: (Map NontermIdent Attributes)- _hdOallVisitKinds :: (Map VisitIdentifier VisitKind)- _hdOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _hdOallstates :: (Set StateIdentifier)- _hdOavisitdefs :: (Map VisitIdentifier (Set Identifier))- _hdOavisituses :: (Map VisitIdentifier (Set Identifier))- _hdOclassCtxs :: ClassContext- _hdOimportBlocks :: PP_Doc- _hdOinhmap :: Attributes- _hdOinitial :: StateIdentifier- _hdOlocalAttrTypes :: (Map ConstructorIdent (Map Identifier Type))- _hdOmainFile :: String- _hdOmainName :: String- _hdOmoduleHeader :: (String -> String -> String -> Bool -> String)- _hdOnextVisits :: (Map StateIdentifier StateCtx)- _hdOnt :: NontermIdent- _hdOntType :: Type- _hdOoptions :: Options- _hdOparams :: ([Identifier])- _hdOpragmaBlocks :: String- _hdOprevVisits :: (Map StateIdentifier StateCtx)- _hdOrename :: Bool- _hdOsynmap :: Attributes- _hdOtextBlocks :: PP_Doc- _tlOallFromToStates :: (Map VisitIdentifier (Int,Int))- _tlOallInhmap :: (Map NontermIdent Attributes)- _tlOallInitStates :: (Map NontermIdent Int)- _tlOallSynmap :: (Map NontermIdent Attributes)- _tlOallVisitKinds :: (Map VisitIdentifier VisitKind)- _tlOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _tlOallstates :: (Set StateIdentifier)- _tlOavisitdefs :: (Map VisitIdentifier (Set Identifier))- _tlOavisituses :: (Map VisitIdentifier (Set Identifier))- _tlOclassCtxs :: ClassContext- _tlOimportBlocks :: PP_Doc- _tlOinhmap :: Attributes- _tlOinitial :: StateIdentifier- _tlOlocalAttrTypes :: (Map ConstructorIdent (Map Identifier Type))- _tlOmainFile :: String- _tlOmainName :: String- _tlOmoduleHeader :: (String -> String -> String -> Bool -> String)- _tlOnextVisits :: (Map StateIdentifier StateCtx)- _tlOnt :: NontermIdent- _tlOntType :: Type- _tlOoptions :: Options- _tlOparams :: ([Identifier])- _tlOpragmaBlocks :: String- _tlOprevVisits :: (Map StateIdentifier StateCtx)- _tlOrename :: Bool- _tlOsynmap :: Attributes- _tlOtextBlocks :: PP_Doc- _hdIallvisits :: ([VisitStateState])- _hdIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _hdIcount :: Int- _hdIdatatype :: PP_Doc- _hdIerrors :: (Seq Error)- _hdIfromToStates :: (Map VisitIdentifier (Int,Int))- _hdIgenProdIO :: (IO ())- _hdIimports :: ([PP_Doc])- _hdIsemFunBndDefs :: (Seq PP_Doc)- _hdIsemFunBndTps :: (Seq PP_Doc)- _hdIsem_nt :: PP_Doc- _hdIsem_prod :: PP_Doc- _hdIt_visits :: PP_Doc- _hdIvisitKinds :: (Map VisitIdentifier VisitKind)- _hdIvisitdefs :: (Map VisitIdentifier (Set Identifier))- _hdIvisituses :: (Map VisitIdentifier (Set Identifier))- _tlIallvisits :: ([VisitStateState])- _tlIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _tlIcount :: Int- _tlIdatatype :: ([PP_Doc])- _tlIerrors :: (Seq Error)- _tlIfromToStates :: (Map VisitIdentifier (Int,Int))- _tlIgenProdIO :: (IO ())- _tlIimports :: ([PP_Doc])- _tlIsemFunBndDefs :: (Seq PP_Doc)- _tlIsemFunBndTps :: (Seq PP_Doc)- _tlIsem_nt :: PP_Doc- _tlIsem_prod :: PP_Doc- _tlIt_visits :: PP_Doc- _tlIvisitKinds :: (Map VisitIdentifier VisitKind)- _tlIvisitdefs :: (Map VisitIdentifier (Set Identifier))- _tlIvisituses :: (Map VisitIdentifier (Set Identifier))- -- "src-ag/ExecutionPlan2Hs.ag"(line 343, column 10)- _lhsOallvisits =- ({-# LINE 343 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIallvisits- {-# LINE 3765 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 396, column 10)- _lhsOt_visits =- ({-# LINE 396 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIt_visits- {-# LINE 3771 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1167, column 37)- _lhsOchildvisit =- ({-# LINE 1167 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIchildvisit `Map.union` _tlIchildvisit- {-# LINE 3777 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 288, column 43)- _lhsOcount =- ({-# LINE 288 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIcount + _tlIcount- {-# LINE 3783 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 179, column 34)- _lhsOdatatype =- ({-# LINE 179 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIdatatype : _tlIdatatype- {-# LINE 3789 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1609, column 132)- _lhsOerrors =- ({-# LINE 1609 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 3795 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1524, column 22)- _lhsOfromToStates =- ({-# LINE 1524 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIfromToStates `mappend` _tlIfromToStates- {-# LINE 3801 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1444, column 49)- _lhsOgenProdIO =- ({-# LINE 1444 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIgenProdIO >> _tlIgenProdIO- {-# LINE 3807 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1443, column 47)- _lhsOimports =- ({-# LINE 1443 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIimports ++ _tlIimports- {-# LINE 3813 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 514, column 92)- _lhsOsemFunBndDefs =- ({-# LINE 514 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIsemFunBndDefs Seq.>< _tlIsemFunBndDefs- {-# LINE 3819 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 514, column 92)- _lhsOsemFunBndTps =- ({-# LINE 514 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIsemFunBndTps Seq.>< _tlIsemFunBndTps- {-# LINE 3825 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 292, column 44)- _lhsOsem_nt =- ({-# LINE 292 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIsem_nt >-< _tlIsem_nt- {-# LINE 3831 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 553, column 34)- _lhsOsem_prod =- ({-# LINE 553 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIsem_prod >-< _tlIsem_prod- {-# LINE 3837 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1571, column 68)- _lhsOvisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIvisitKinds `mappend` _tlIvisitKinds- {-# LINE 3843 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1302, column 36)- _lhsOvisitdefs =- ({-# LINE 1302 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIvisitdefs `uwSetUnion` _tlIvisitdefs- {-# LINE 3849 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1303, column 36)- _lhsOvisituses =- ({-# LINE 1303 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIvisituses `uwSetUnion` _tlIvisituses- {-# LINE 3855 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallFromToStates =- ({-# LINE 1527 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallFromToStates- {-# LINE 3861 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallInhmap =- ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInhmap- {-# LINE 3867 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallInitStates =- ({-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInitStates- {-# LINE 3873 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallSynmap =- ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallSynmap- {-# LINE 3879 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallVisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallVisitKinds- {-# LINE 3885 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallchildvisit =- ({-# LINE 1166 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallchildvisit- {-# LINE 3891 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallstates =- ({-# LINE 556 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallstates- {-# LINE 3897 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOavisitdefs =- ({-# LINE 1312 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisitdefs- {-# LINE 3903 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOavisituses =- ({-# LINE 1313 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisituses- {-# LINE 3909 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOclassCtxs =- ({-# LINE 77 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIclassCtxs- {-# LINE 3915 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOimportBlocks =- ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIimportBlocks- {-# LINE 3921 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOinhmap =- ({-# LINE 318 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIinhmap- {-# LINE 3927 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOinitial =- ({-# LINE 555 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIinitial- {-# LINE 3933 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOlocalAttrTypes =- ({-# LINE 1557 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIlocalAttrTypes- {-# LINE 3939 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOmainFile =- ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainFile- {-# LINE 3945 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOmainName =- ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainName- {-# LINE 3951 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOmoduleHeader =- ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImoduleHeader- {-# LINE 3957 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOnextVisits =- ({-# LINE 1513 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsInextVisits- {-# LINE 3963 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOnt =- ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsInt- {-# LINE 3969 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOntType =- ({-# LINE 1600 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIntType- {-# LINE 3975 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 3981 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOparams =- ({-# LINE 73 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIparams- {-# LINE 3987 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOpragmaBlocks =- ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIpragmaBlocks- {-# LINE 3993 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOprevVisits =- ({-# LINE 1513 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIprevVisits- {-# LINE 3999 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOrename =- ({-# LINE 52 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIrename- {-# LINE 4005 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOsynmap =- ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIsynmap- {-# LINE 4011 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOtextBlocks =- ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsItextBlocks- {-# LINE 4017 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallFromToStates =- ({-# LINE 1527 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallFromToStates- {-# LINE 4023 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallInhmap =- ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInhmap- {-# LINE 4029 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallInitStates =- ({-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInitStates- {-# LINE 4035 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallSynmap =- ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallSynmap- {-# LINE 4041 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallVisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallVisitKinds- {-# LINE 4047 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallchildvisit =- ({-# LINE 1166 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallchildvisit- {-# LINE 4053 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallstates =- ({-# LINE 556 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallstates- {-# LINE 4059 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOavisitdefs =- ({-# LINE 1312 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisitdefs- {-# LINE 4065 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOavisituses =- ({-# LINE 1313 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisituses- {-# LINE 4071 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOclassCtxs =- ({-# LINE 77 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIclassCtxs- {-# LINE 4077 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOimportBlocks =- ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIimportBlocks- {-# LINE 4083 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOinhmap =- ({-# LINE 318 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIinhmap- {-# LINE 4089 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOinitial =- ({-# LINE 555 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIinitial- {-# LINE 4095 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOlocalAttrTypes =- ({-# LINE 1557 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIlocalAttrTypes- {-# LINE 4101 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOmainFile =- ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainFile- {-# LINE 4107 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOmainName =- ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainName- {-# LINE 4113 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOmoduleHeader =- ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImoduleHeader- {-# LINE 4119 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOnextVisits =- ({-# LINE 1513 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsInextVisits- {-# LINE 4125 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOnt =- ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsInt- {-# LINE 4131 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOntType =- ({-# LINE 1600 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIntType- {-# LINE 4137 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 4143 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOparams =- ({-# LINE 73 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIparams- {-# LINE 4149 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOpragmaBlocks =- ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIpragmaBlocks- {-# LINE 4155 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOprevVisits =- ({-# LINE 1513 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIprevVisits- {-# LINE 4161 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOrename =- ({-# LINE 52 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIrename- {-# LINE 4167 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOsynmap =- ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIsynmap- {-# LINE 4173 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOtextBlocks =- ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsItextBlocks- {-# LINE 4179 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _hdIallvisits,_hdIchildvisit,_hdIcount,_hdIdatatype,_hdIerrors,_hdIfromToStates,_hdIgenProdIO,_hdIimports,_hdIsemFunBndDefs,_hdIsemFunBndTps,_hdIsem_nt,_hdIsem_prod,_hdIt_visits,_hdIvisitKinds,_hdIvisitdefs,_hdIvisituses) =- hd_ _hdOallFromToStates _hdOallInhmap _hdOallInitStates _hdOallSynmap _hdOallVisitKinds _hdOallchildvisit _hdOallstates _hdOavisitdefs _hdOavisituses _hdOclassCtxs _hdOimportBlocks _hdOinhmap _hdOinitial _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnextVisits _hdOnt _hdOntType _hdOoptions _hdOparams _hdOpragmaBlocks _hdOprevVisits _hdOrename _hdOsynmap _hdOtextBlocks - ( _tlIallvisits,_tlIchildvisit,_tlIcount,_tlIdatatype,_tlIerrors,_tlIfromToStates,_tlIgenProdIO,_tlIimports,_tlIsemFunBndDefs,_tlIsemFunBndTps,_tlIsem_nt,_tlIsem_prod,_tlIt_visits,_tlIvisitKinds,_tlIvisitdefs,_tlIvisituses) =- tl_ _tlOallFromToStates _tlOallInhmap _tlOallInitStates _tlOallSynmap _tlOallVisitKinds _tlOallchildvisit _tlOallstates _tlOavisitdefs _tlOavisituses _tlOclassCtxs _tlOimportBlocks _tlOinhmap _tlOinitial _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnextVisits _tlOnt _tlOntType _tlOoptions _tlOparams _tlOpragmaBlocks _tlOprevVisits _tlOrename _tlOsynmap _tlOtextBlocks - in ( _lhsOallvisits,_lhsOchildvisit,_lhsOcount,_lhsOdatatype,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOsem_nt,_lhsOsem_prod,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))) )-sem_EProductions_Nil :: T_EProductions -sem_EProductions_Nil =- (T_EProductions (\ _lhsIallFromToStates- _lhsIallInhmap- _lhsIallInitStates- _lhsIallSynmap- _lhsIallVisitKinds- _lhsIallchildvisit- _lhsIallstates- _lhsIavisitdefs- _lhsIavisituses- _lhsIclassCtxs- _lhsIimportBlocks- _lhsIinhmap- _lhsIinitial- _lhsIlocalAttrTypes- _lhsImainFile- _lhsImainName- _lhsImoduleHeader- _lhsInextVisits- _lhsInt- _lhsIntType- _lhsIoptions- _lhsIparams- _lhsIpragmaBlocks- _lhsIprevVisits- _lhsIrename- _lhsIsynmap- _lhsItextBlocks ->- (let _lhsOallvisits :: ([VisitStateState])- _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _lhsOcount :: Int- _lhsOdatatype :: ([PP_Doc])- _lhsOerrors :: (Seq Error)- _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))- _lhsOgenProdIO :: (IO ())- _lhsOimports :: ([PP_Doc])- _lhsOsemFunBndDefs :: (Seq PP_Doc)- _lhsOsemFunBndTps :: (Seq PP_Doc)- _lhsOsem_nt :: PP_Doc- _lhsOsem_prod :: PP_Doc- _lhsOt_visits :: PP_Doc- _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)- _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))- _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))- -- "src-ag/ExecutionPlan2Hs.ag"(line 344, column 10)- _lhsOallvisits =- ({-# LINE 344 "src-ag/ExecutionPlan2Hs.ag" #-}- error "Every nonterminal should have at least 1 production"- {-# LINE 4235 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1167, column 37)- _lhsOchildvisit =- ({-# LINE 1167 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 4241 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 288, column 43)- _lhsOcount =- ({-# LINE 288 "src-ag/ExecutionPlan2Hs.ag" #-}- 0- {-# LINE 4247 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 179, column 34)- _lhsOdatatype =- ({-# LINE 179 "src-ag/ExecutionPlan2Hs.ag" #-}- []- {-# LINE 4253 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1609, column 132)- _lhsOerrors =- ({-# LINE 1609 "src-ag/ExecutionPlan2Hs.ag" #-}- Seq.empty- {-# LINE 4259 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1524, column 22)- _lhsOfromToStates =- ({-# LINE 1524 "src-ag/ExecutionPlan2Hs.ag" #-}- mempty- {-# LINE 4265 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1444, column 49)- _lhsOgenProdIO =- ({-# LINE 1444 "src-ag/ExecutionPlan2Hs.ag" #-}- return ()- {-# LINE 4271 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1443, column 47)- _lhsOimports =- ({-# LINE 1443 "src-ag/ExecutionPlan2Hs.ag" #-}- []- {-# LINE 4277 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 514, column 92)- _lhsOsemFunBndDefs =- ({-# LINE 514 "src-ag/ExecutionPlan2Hs.ag" #-}- Seq.empty- {-# LINE 4283 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 514, column 92)- _lhsOsemFunBndTps =- ({-# LINE 514 "src-ag/ExecutionPlan2Hs.ag" #-}- Seq.empty- {-# LINE 4289 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 292, column 44)- _lhsOsem_nt =- ({-# LINE 292 "src-ag/ExecutionPlan2Hs.ag" #-}- empty- {-# LINE 4295 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 553, column 34)- _lhsOsem_prod =- ({-# LINE 553 "src-ag/ExecutionPlan2Hs.ag" #-}- empty- {-# LINE 4301 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 393, column 59)- _lhsOt_visits =- ({-# LINE 393 "src-ag/ExecutionPlan2Hs.ag" #-}- empty- {-# LINE 4307 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1571, column 68)- _lhsOvisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- mempty- {-# LINE 4313 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1302, column 36)- _lhsOvisitdefs =- ({-# LINE 1302 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 4319 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1303, column 36)- _lhsOvisituses =- ({-# LINE 1303 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 4325 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOallvisits,_lhsOchildvisit,_lhsOcount,_lhsOdatatype,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOsem_nt,_lhsOsem_prod,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))) )--- ERule --------------------------------------------------------{-- visit 0:- inherited attributes:- allInhmap : Map NontermIdent Attributes- allSynmap : Map NontermIdent Attributes- childTypes : Map Identifier Type- con : ConstructorIdent- importBlocks : PP_Doc- inhmap : Attributes- lazyIntras : Set String- localAttrTypes : Map Identifier Type- mainFile : String- mainName : String- moduleHeader : String -> String -> String -> Bool -> String- nt : NontermIdent- options : Options- pragmaBlocks : String- ruleKinds : Map Identifier (Set VisitKind)- synmap : Attributes- textBlocks : PP_Doc- usageInfo : Map Identifier Int- synthesized attributes:- errors : Seq Error- mrules : Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)- ruledefs : Map Identifier (Set String)- ruleuses : Map Identifier (Map String (Maybe NonLocalAttr))- sem_rules : PP_Doc- alternatives:- alternative ERule:- child name : {Identifier}- child pattern : Pattern - child rhs : Expression - child owrt : {Bool}- child origin : {String}- child explicit : {Bool}- child pure : {Bool}- child mbError : {Maybe Error}- visit 0:- local rulecode : _- local rulePragma : _- local scc : _- local pragma : _- local endpragma : _- local genpragma : _- local haspos : _- local lambda : _- local argPats : _- local argExprs : _- local stepcode : _- local used : _- local kinds : _- local anyLazyKind : _- local addbang : _- local addbang1 : _--}--- cata-sem_ERule :: ERule ->- T_ERule -sem_ERule (ERule _name _pattern _rhs _owrt _origin _explicit _pure _mbError ) =- (sem_ERule_ERule _name (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin _explicit _pure _mbError )--- semantic domain-newtype T_ERule = T_ERule ((Map NontermIdent Attributes) ->- (Map NontermIdent Attributes) ->- (Map Identifier Type) ->- ConstructorIdent ->- PP_Doc ->- Attributes ->- (Set String) ->- (Map Identifier Type) ->- String ->- String ->- (String -> String -> String -> Bool -> String) ->- NontermIdent ->- Options ->- String ->- (Map Identifier (Set VisitKind)) ->- Attributes ->- PP_Doc ->- (Map Identifier Int) ->- ( (Seq Error),(Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)),(Map Identifier (Set String)),(Map Identifier (Map String (Maybe NonLocalAttr))),PP_Doc))-data Inh_ERule = Inh_ERule {allInhmap_Inh_ERule :: (Map NontermIdent Attributes),allSynmap_Inh_ERule :: (Map NontermIdent Attributes),childTypes_Inh_ERule :: (Map Identifier Type),con_Inh_ERule :: ConstructorIdent,importBlocks_Inh_ERule :: PP_Doc,inhmap_Inh_ERule :: Attributes,lazyIntras_Inh_ERule :: (Set String),localAttrTypes_Inh_ERule :: (Map Identifier Type),mainFile_Inh_ERule :: String,mainName_Inh_ERule :: String,moduleHeader_Inh_ERule :: (String -> String -> String -> Bool -> String),nt_Inh_ERule :: NontermIdent,options_Inh_ERule :: Options,pragmaBlocks_Inh_ERule :: String,ruleKinds_Inh_ERule :: (Map Identifier (Set VisitKind)),synmap_Inh_ERule :: Attributes,textBlocks_Inh_ERule :: PP_Doc,usageInfo_Inh_ERule :: (Map Identifier Int)}-data Syn_ERule = Syn_ERule {errors_Syn_ERule :: (Seq Error),mrules_Syn_ERule :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)),ruledefs_Syn_ERule :: (Map Identifier (Set String)),ruleuses_Syn_ERule :: (Map Identifier (Map String (Maybe NonLocalAttr))),sem_rules_Syn_ERule :: PP_Doc}-wrap_ERule :: T_ERule ->- Inh_ERule ->- Syn_ERule -wrap_ERule (T_ERule sem ) (Inh_ERule _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo ) =- (let ( _lhsOerrors,_lhsOmrules,_lhsOruledefs,_lhsOruleuses,_lhsOsem_rules) = sem _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo - in (Syn_ERule _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules ))-sem_ERule_ERule :: Identifier ->- T_Pattern ->- T_Expression ->- Bool ->- String ->- Bool ->- Bool ->- (Maybe Error) ->- T_ERule -sem_ERule_ERule name_ (T_Pattern pattern_ ) (T_Expression rhs_ ) owrt_ origin_ explicit_ pure_ mbError_ =- (T_ERule (\ _lhsIallInhmap- _lhsIallSynmap- _lhsIchildTypes- _lhsIcon- _lhsIimportBlocks- _lhsIinhmap- _lhsIlazyIntras- _lhsIlocalAttrTypes- _lhsImainFile- _lhsImainName- _lhsImoduleHeader- _lhsInt- _lhsIoptions- _lhsIpragmaBlocks- _lhsIruleKinds- _lhsIsynmap- _lhsItextBlocks- _lhsIusageInfo ->- (let _lhsOsem_rules :: PP_Doc- _lhsOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))- _lhsOruledefs :: (Map Identifier (Set String))- _lhsOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))- _lhsOerrors :: (Seq Error)- _patternOanyLazyKind :: Bool- _patternOoptions :: Options- _patternIattrs :: (Set String)- _patternIcopy :: Pattern - _patternIisUnderscore :: Bool- _patternIsem_lhs :: ( PP_Doc )- _rhsIattrs :: (Map String (Maybe NonLocalAttr))- _rhsIpos :: Pos- _rhsIsemfunc :: PP_Doc- -- "src-ag/ExecutionPlan2Hs.ag"(line 963, column 6)- _lhsOsem_rules =- ({-# LINE 963 "src-ag/ExecutionPlan2Hs.ag" #-}- if _used == 0- then empty- else _rulePragma >-< _rulecode- {-# LINE 4465 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 966, column 6)- _rulecode =- ({-# LINE 966 "src-ag/ExecutionPlan2Hs.ag" #-}- ( if _genpragma- then _pragma- else empty- )- >-< _lambda >#< _scc- >-< indent ((column _rhsIpos - 2) `max` 2)- ( if _genpragma- then _pragma >-< _rhsIsemfunc >-< _endpragma- else _rhsIsemfunc- )- {-# LINE 4480 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 978, column 7)- _rulePragma =- ({-# LINE 978 "src-ag/ExecutionPlan2Hs.ag" #-}- ( let reallyInlineStr = "INLINE"- reallyNoInlineStr = "NOINLINE"- in if noInlinePragmas _lhsIoptions- then empty- else if _used == 1- then ppPragmaBinding reallyInlineStr name_- else if helpInlining _lhsIoptions- then if not explicit_ && _used <= reallyOftenUsedThreshold- then ppPragmaBinding "INLINE[1]" name_- else if _used > ruleInlineThresholdSoft && explicit_- then if _used > ruleInlineThresholdHard- then ppPragmaBinding reallyNoInlineStr name_- else if aggressiveInlinePragmas _lhsIoptions- then ppPragmaBinding "NOINLINE[2]" name_- else ppNoInline name_- else if aggressiveInlinePragmas _lhsIoptions- then ppPragmaBinding "NOINLINE[1]" name_- else ppNoInline name_- else if not explicit_ || _used <= ruleInlineThresholdSoft- then ppPragmaBinding "NOINLINE[1]" name_- else ppNoInline name_- )- {-# LINE 4507 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1000, column 7)- _scc =- ({-# LINE 1000 "src-ag/ExecutionPlan2Hs.ag" #-}- if genCostCentres _lhsIoptions && explicit_ && pure_ && not (noPerRuleCostCentres _lhsIoptions)- then ppCostCentre (name_ >|< "_" >|< line _rhsIpos >|< "_" >|< _lhsInt >|< "_" >|< _lhsIcon)- else empty- {-# LINE 4515 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1003, column 7)- _pragma =- ({-# LINE 1003 "src-ag/ExecutionPlan2Hs.ag" #-}- "{-# LINE" >#< show (line _rhsIpos) >#< show (file _rhsIpos) >#< "#-}"- {-# LINE 4521 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1004, column 7)- _endpragma =- ({-# LINE 1004 "src-ag/ExecutionPlan2Hs.ag" #-}- ppWithLineNr (\ln -> "{-# LINE " ++ show (ln+1) ++ " " ++ show _lhsImainFile ++ "#-}")- {-# LINE 4527 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1005, column 7)- _genpragma =- ({-# LINE 1005 "src-ag/ExecutionPlan2Hs.ag" #-}- genLinePragmas _lhsIoptions && explicit_ && _haspos- {-# LINE 4533 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1006, column 7)- _haspos =- ({-# LINE 1006 "src-ag/ExecutionPlan2Hs.ag" #-}- line _rhsIpos > 0 && column _rhsIpos >= 0 && not (null (file _rhsIpos))- {-# LINE 4539 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1015, column 7)- _lambda =- ({-# LINE 1015 "src-ag/ExecutionPlan2Hs.ag" #-}- name_ >#< "=" >#< "\\" >#< _argPats >#< dummyPat _lhsIoptions (Map.null _rhsIattrs) >#< "->"- {-# LINE 4545 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1017, column 7)- _argPats =- ({-# LINE 1017 "src-ag/ExecutionPlan2Hs.ag" #-}- ppSpaced [ let match | str `Set.member` _lhsIlazyIntras = pp str- | otherwise = _addbang1 (pp str)- in case mbAttr of- Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->- case Map.lookup nm _lhsIlocalAttrTypes of- Just tp -> pp_parens (pp_parens match >#< "::" >#< ppTp tp)- Nothing -> match- Just attr | not (noPerRuleTypeSigs _lhsIoptions) ->- case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes of- Just tpDoc -> pp_parens (pp_parens match >#< "::" >#< tpDoc)- Nothing -> match- _ -> match- | (str,mbAttr) <- Map.assocs _rhsIattrs- ]- {-# LINE 4564 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1031, column 7)- _argExprs =- ({-# LINE 1031 "src-ag/ExecutionPlan2Hs.ag" #-}- ppSpaced $ Map.keys _rhsIattrs- {-# LINE 4570 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1032, column 7)- _stepcode =- ({-# LINE 1032 "src-ag/ExecutionPlan2Hs.ag" #-}- \kind fmtMode -> if kind `compatibleRule` pure_- then Right $ let oper | pure_ = "="- | otherwise = "<-"- decl = _patternIsem_lhs >#< oper >#< name_ >#< _argExprs >#< dummyArg _lhsIoptions (Map.null _rhsIattrs)- in fmtDecl pure_ fmtMode decl- else Left $ IncompatibleRuleKind name_ kind- {-# LINE 4581 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1039, column 7)- _lhsOmrules =- ({-# LINE 1039 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton name_ _stepcode- {-# LINE 4587 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1228, column 32)- _used =- ({-# LINE 1228 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault 0 name_ _lhsIusageInfo- {-# LINE 4593 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1244, column 3)- _kinds =- ({-# LINE 1244 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault Set.empty name_ _lhsIruleKinds- {-# LINE 4599 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1245, column 3)- _anyLazyKind =- ({-# LINE 1245 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.fold (\k r -> isLazyKind k || r) False _kinds- {-# LINE 4605 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1291, column 11)- _lhsOruledefs =- ({-# LINE 1291 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton name_ _patternIattrs- {-# LINE 4611 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1292, column 11)- _lhsOruleuses =- ({-# LINE 1292 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton name_ _rhsIattrs- {-# LINE 4617 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1494, column 37)- _addbang =- ({-# LINE 1494 "src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 4623 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1505, column 37)- _addbang1 =- ({-# LINE 1505 "src-ag/ExecutionPlan2Hs.ag" #-}- if _anyLazyKind then id else _addbang- {-# LINE 4629 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1611, column 3)- _lhsOerrors =- ({-# LINE 1611 "src-ag/ExecutionPlan2Hs.ag" #-}- case mbError_ of- Just e | _used > 0 -> Seq.singleton e- _ -> Seq.empty- {-# LINE 4637 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (from local)- _patternOanyLazyKind =- ({-# LINE 1247 "src-ag/ExecutionPlan2Hs.ag" #-}- _anyLazyKind- {-# LINE 4643 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _patternOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 4649 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _patternIattrs,_patternIcopy,_patternIisUnderscore,_patternIsem_lhs) =- pattern_ _patternOanyLazyKind _patternOoptions - ( _rhsIattrs,_rhsIpos,_rhsIsemfunc) =- rhs_ - in ( _lhsOerrors,_lhsOmrules,_lhsOruledefs,_lhsOruleuses,_lhsOsem_rules))) )--- ERules -------------------------------------------------------{-- visit 0:- inherited attributes:- allInhmap : Map NontermIdent Attributes- allSynmap : Map NontermIdent Attributes- childTypes : Map Identifier Type- con : ConstructorIdent- importBlocks : PP_Doc- inhmap : Attributes- lazyIntras : Set String- localAttrTypes : Map Identifier Type- mainFile : String- mainName : String- moduleHeader : String -> String -> String -> Bool -> String- nt : NontermIdent- options : Options- pragmaBlocks : String- ruleKinds : Map Identifier (Set VisitKind)- synmap : Attributes- textBlocks : PP_Doc- usageInfo : Map Identifier Int- synthesized attributes:- errors : Seq Error- mrules : Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)- ruledefs : Map Identifier (Set String)- ruleuses : Map Identifier (Map String (Maybe NonLocalAttr))- sem_rules : PP_Doc- alternatives:- alternative Cons:- child hd : ERule - child tl : ERules - alternative Nil:--}--- cata-sem_ERules :: ERules ->- T_ERules -sem_ERules list =- (Prelude.foldr sem_ERules_Cons sem_ERules_Nil (Prelude.map sem_ERule list) )--- semantic domain-newtype T_ERules = T_ERules ((Map NontermIdent Attributes) ->- (Map NontermIdent Attributes) ->- (Map Identifier Type) ->- ConstructorIdent ->- PP_Doc ->- Attributes ->- (Set String) ->- (Map Identifier Type) ->- String ->- String ->- (String -> String -> String -> Bool -> String) ->- NontermIdent ->- Options ->- String ->- (Map Identifier (Set VisitKind)) ->- Attributes ->- PP_Doc ->- (Map Identifier Int) ->- ( (Seq Error),(Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)),(Map Identifier (Set String)),(Map Identifier (Map String (Maybe NonLocalAttr))),PP_Doc))-data Inh_ERules = Inh_ERules {allInhmap_Inh_ERules :: (Map NontermIdent Attributes),allSynmap_Inh_ERules :: (Map NontermIdent Attributes),childTypes_Inh_ERules :: (Map Identifier Type),con_Inh_ERules :: ConstructorIdent,importBlocks_Inh_ERules :: PP_Doc,inhmap_Inh_ERules :: Attributes,lazyIntras_Inh_ERules :: (Set String),localAttrTypes_Inh_ERules :: (Map Identifier Type),mainFile_Inh_ERules :: String,mainName_Inh_ERules :: String,moduleHeader_Inh_ERules :: (String -> String -> String -> Bool -> String),nt_Inh_ERules :: NontermIdent,options_Inh_ERules :: Options,pragmaBlocks_Inh_ERules :: String,ruleKinds_Inh_ERules :: (Map Identifier (Set VisitKind)),synmap_Inh_ERules :: Attributes,textBlocks_Inh_ERules :: PP_Doc,usageInfo_Inh_ERules :: (Map Identifier Int)}-data Syn_ERules = Syn_ERules {errors_Syn_ERules :: (Seq Error),mrules_Syn_ERules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)),ruledefs_Syn_ERules :: (Map Identifier (Set String)),ruleuses_Syn_ERules :: (Map Identifier (Map String (Maybe NonLocalAttr))),sem_rules_Syn_ERules :: PP_Doc}-wrap_ERules :: T_ERules ->- Inh_ERules ->- Syn_ERules -wrap_ERules (T_ERules sem ) (Inh_ERules _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo ) =- (let ( _lhsOerrors,_lhsOmrules,_lhsOruledefs,_lhsOruleuses,_lhsOsem_rules) = sem _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo - in (Syn_ERules _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules ))-sem_ERules_Cons :: T_ERule ->- T_ERules ->- T_ERules -sem_ERules_Cons (T_ERule hd_ ) (T_ERules tl_ ) =- (T_ERules (\ _lhsIallInhmap- _lhsIallSynmap- _lhsIchildTypes- _lhsIcon- _lhsIimportBlocks- _lhsIinhmap- _lhsIlazyIntras- _lhsIlocalAttrTypes- _lhsImainFile- _lhsImainName- _lhsImoduleHeader- _lhsInt- _lhsIoptions- _lhsIpragmaBlocks- _lhsIruleKinds- _lhsIsynmap- _lhsItextBlocks- _lhsIusageInfo ->- (let _lhsOerrors :: (Seq Error)- _lhsOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))- _lhsOruledefs :: (Map Identifier (Set String))- _lhsOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))- _lhsOsem_rules :: PP_Doc- _hdOallInhmap :: (Map NontermIdent Attributes)- _hdOallSynmap :: (Map NontermIdent Attributes)- _hdOchildTypes :: (Map Identifier Type)- _hdOcon :: ConstructorIdent- _hdOimportBlocks :: PP_Doc- _hdOinhmap :: Attributes- _hdOlazyIntras :: (Set String)- _hdOlocalAttrTypes :: (Map Identifier Type)- _hdOmainFile :: String- _hdOmainName :: String- _hdOmoduleHeader :: (String -> String -> String -> Bool -> String)- _hdOnt :: NontermIdent- _hdOoptions :: Options- _hdOpragmaBlocks :: String- _hdOruleKinds :: (Map Identifier (Set VisitKind))- _hdOsynmap :: Attributes- _hdOtextBlocks :: PP_Doc- _hdOusageInfo :: (Map Identifier Int)- _tlOallInhmap :: (Map NontermIdent Attributes)- _tlOallSynmap :: (Map NontermIdent Attributes)- _tlOchildTypes :: (Map Identifier Type)- _tlOcon :: ConstructorIdent- _tlOimportBlocks :: PP_Doc- _tlOinhmap :: Attributes- _tlOlazyIntras :: (Set String)- _tlOlocalAttrTypes :: (Map Identifier Type)- _tlOmainFile :: String- _tlOmainName :: String- _tlOmoduleHeader :: (String -> String -> String -> Bool -> String)- _tlOnt :: NontermIdent- _tlOoptions :: Options- _tlOpragmaBlocks :: String- _tlOruleKinds :: (Map Identifier (Set VisitKind))- _tlOsynmap :: Attributes- _tlOtextBlocks :: PP_Doc- _tlOusageInfo :: (Map Identifier Int)- _hdIerrors :: (Seq Error)- _hdImrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))- _hdIruledefs :: (Map Identifier (Set String))- _hdIruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))- _hdIsem_rules :: PP_Doc- _tlIerrors :: (Seq Error)- _tlImrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))- _tlIruledefs :: (Map Identifier (Set String))- _tlIruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))- _tlIsem_rules :: PP_Doc- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1609, column 132)- _lhsOerrors =- ({-# LINE 1609 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 4800 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 960, column 32)- _lhsOmrules =- ({-# LINE 960 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdImrules `Map.union` _tlImrules- {-# LINE 4806 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1284, column 34)- _lhsOruledefs =- ({-# LINE 1284 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIruledefs `uwSetUnion` _tlIruledefs- {-# LINE 4812 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1285, column 34)- _lhsOruleuses =- ({-# LINE 1285 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIruleuses `uwMapUnion` _tlIruleuses- {-# LINE 4818 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 959, column 35)- _lhsOsem_rules =- ({-# LINE 959 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIsem_rules >-< _tlIsem_rules- {-# LINE 4824 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallInhmap =- ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInhmap- {-# LINE 4830 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallSynmap =- ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallSynmap- {-# LINE 4836 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOchildTypes =- ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIchildTypes- {-# LINE 4842 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOcon =- ({-# LINE 66 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIcon- {-# LINE 4848 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOimportBlocks =- ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIimportBlocks- {-# LINE 4854 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOinhmap =- ({-# LINE 318 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIinhmap- {-# LINE 4860 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOlazyIntras =- ({-# LINE 1336 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIlazyIntras- {-# LINE 4866 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOlocalAttrTypes =- ({-# LINE 1558 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIlocalAttrTypes- {-# LINE 4872 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOmainFile =- ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainFile- {-# LINE 4878 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOmainName =- ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainName- {-# LINE 4884 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOmoduleHeader =- ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImoduleHeader- {-# LINE 4890 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOnt =- ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsInt- {-# LINE 4896 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 4902 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOpragmaBlocks =- ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIpragmaBlocks- {-# LINE 4908 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOruleKinds =- ({-# LINE 1239 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIruleKinds- {-# LINE 4914 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOsynmap =- ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIsynmap- {-# LINE 4920 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOtextBlocks =- ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsItextBlocks- {-# LINE 4926 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOusageInfo =- ({-# LINE 1224 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIusageInfo- {-# LINE 4932 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallInhmap =- ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInhmap- {-# LINE 4938 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallSynmap =- ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallSynmap- {-# LINE 4944 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOchildTypes =- ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIchildTypes- {-# LINE 4950 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOcon =- ({-# LINE 66 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIcon- {-# LINE 4956 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOimportBlocks =- ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIimportBlocks- {-# LINE 4962 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOinhmap =- ({-# LINE 318 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIinhmap- {-# LINE 4968 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOlazyIntras =- ({-# LINE 1336 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIlazyIntras- {-# LINE 4974 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOlocalAttrTypes =- ({-# LINE 1558 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIlocalAttrTypes- {-# LINE 4980 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOmainFile =- ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainFile- {-# LINE 4986 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOmainName =- ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainName- {-# LINE 4992 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOmoduleHeader =- ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImoduleHeader- {-# LINE 4998 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOnt =- ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsInt- {-# LINE 5004 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 5010 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOpragmaBlocks =- ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIpragmaBlocks- {-# LINE 5016 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOruleKinds =- ({-# LINE 1239 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIruleKinds- {-# LINE 5022 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOsynmap =- ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIsynmap- {-# LINE 5028 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOtextBlocks =- ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsItextBlocks- {-# LINE 5034 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOusageInfo =- ({-# LINE 1224 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIusageInfo- {-# LINE 5040 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _hdIerrors,_hdImrules,_hdIruledefs,_hdIruleuses,_hdIsem_rules) =- hd_ _hdOallInhmap _hdOallSynmap _hdOchildTypes _hdOcon _hdOimportBlocks _hdOinhmap _hdOlazyIntras _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnt _hdOoptions _hdOpragmaBlocks _hdOruleKinds _hdOsynmap _hdOtextBlocks _hdOusageInfo - ( _tlIerrors,_tlImrules,_tlIruledefs,_tlIruleuses,_tlIsem_rules) =- tl_ _tlOallInhmap _tlOallSynmap _tlOchildTypes _tlOcon _tlOimportBlocks _tlOinhmap _tlOlazyIntras _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnt _tlOoptions _tlOpragmaBlocks _tlOruleKinds _tlOsynmap _tlOtextBlocks _tlOusageInfo - in ( _lhsOerrors,_lhsOmrules,_lhsOruledefs,_lhsOruleuses,_lhsOsem_rules))) )-sem_ERules_Nil :: T_ERules -sem_ERules_Nil =- (T_ERules (\ _lhsIallInhmap- _lhsIallSynmap- _lhsIchildTypes- _lhsIcon- _lhsIimportBlocks- _lhsIinhmap- _lhsIlazyIntras- _lhsIlocalAttrTypes- _lhsImainFile- _lhsImainName- _lhsImoduleHeader- _lhsInt- _lhsIoptions- _lhsIpragmaBlocks- _lhsIruleKinds- _lhsIsynmap- _lhsItextBlocks- _lhsIusageInfo ->- (let _lhsOerrors :: (Seq Error)- _lhsOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))- _lhsOruledefs :: (Map Identifier (Set String))- _lhsOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))- _lhsOsem_rules :: PP_Doc- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1609, column 132)- _lhsOerrors =- ({-# LINE 1609 "src-ag/ExecutionPlan2Hs.ag" #-}- Seq.empty- {-# LINE 5076 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 960, column 32)- _lhsOmrules =- ({-# LINE 960 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 5082 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1284, column 34)- _lhsOruledefs =- ({-# LINE 1284 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 5088 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1285, column 34)- _lhsOruleuses =- ({-# LINE 1285 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 5094 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 959, column 35)- _lhsOsem_rules =- ({-# LINE 959 "src-ag/ExecutionPlan2Hs.ag" #-}- empty- {-# LINE 5100 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOerrors,_lhsOmrules,_lhsOruledefs,_lhsOruleuses,_lhsOsem_rules))) )--- ExecutionPlan ------------------------------------------------{-- visit 0:- inherited attributes:- importBlocks : PP_Doc- inhmap : Map NontermIdent Attributes- localAttrTypes : Map NontermIdent (Map ConstructorIdent (Map Identifier Type))- mainBlocksDoc : PP_Doc- mainFile : String- mainName : String- moduleHeader : String -> String -> String -> Bool -> String- options : Options- pragmaBlocks : String- synmap : Map NontermIdent Attributes- textBlockMap : Map BlockInfo PP_Doc- textBlocks : PP_Doc- synthesized attributes:- errors : Seq Error- genIO : IO ()- output : PP_Doc- alternatives:- alternative ExecutionPlan:- child nonts : ENonterminals - child typeSyns : {TypeSyns}- child wrappers : {Set NontermIdent}- child derivings : {Derivings}- visit 0:- local wrappersExtra : _- local commonExtra : _- local lateSemBndTp : _- local lateSemBndDef : _- local mainModuleFile : _- local ppMonadImports : _- local genMainModule : _- local commonFile : _- local genCommonModule : _--}--- cata-sem_ExecutionPlan :: ExecutionPlan ->- T_ExecutionPlan -sem_ExecutionPlan (ExecutionPlan _nonts _typeSyns _wrappers _derivings ) =- (sem_ExecutionPlan_ExecutionPlan (sem_ENonterminals _nonts ) _typeSyns _wrappers _derivings )--- semantic domain-newtype T_ExecutionPlan = T_ExecutionPlan (PP_Doc ->- (Map NontermIdent Attributes) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->- PP_Doc ->- String ->- String ->- (String -> String -> String -> Bool -> String) ->- Options ->- String ->- (Map NontermIdent Attributes) ->- (Map BlockInfo PP_Doc) ->- PP_Doc ->- ( (Seq Error),(IO ()),PP_Doc))-data Inh_ExecutionPlan = Inh_ExecutionPlan {importBlocks_Inh_ExecutionPlan :: PP_Doc,inhmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes),localAttrTypes_Inh_ExecutionPlan :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))),mainBlocksDoc_Inh_ExecutionPlan :: PP_Doc,mainFile_Inh_ExecutionPlan :: String,mainName_Inh_ExecutionPlan :: String,moduleHeader_Inh_ExecutionPlan :: (String -> String -> String -> Bool -> String),options_Inh_ExecutionPlan :: Options,pragmaBlocks_Inh_ExecutionPlan :: String,synmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes),textBlockMap_Inh_ExecutionPlan :: (Map BlockInfo PP_Doc),textBlocks_Inh_ExecutionPlan :: PP_Doc}-data Syn_ExecutionPlan = Syn_ExecutionPlan {errors_Syn_ExecutionPlan :: (Seq Error),genIO_Syn_ExecutionPlan :: (IO ()),output_Syn_ExecutionPlan :: PP_Doc}-wrap_ExecutionPlan :: T_ExecutionPlan ->- Inh_ExecutionPlan ->- Syn_ExecutionPlan -wrap_ExecutionPlan (T_ExecutionPlan sem ) (Inh_ExecutionPlan _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlockMap _lhsItextBlocks ) =- (let ( _lhsOerrors,_lhsOgenIO,_lhsOoutput) = sem _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlockMap _lhsItextBlocks - in (Syn_ExecutionPlan _lhsOerrors _lhsOgenIO _lhsOoutput ))-sem_ExecutionPlan_ExecutionPlan :: T_ENonterminals ->- TypeSyns ->- (Set NontermIdent) ->- Derivings ->- T_ExecutionPlan -sem_ExecutionPlan_ExecutionPlan (T_ENonterminals nonts_ ) typeSyns_ wrappers_ derivings_ =- (T_ExecutionPlan (\ _lhsIimportBlocks- _lhsIinhmap- _lhsIlocalAttrTypes- _lhsImainBlocksDoc- _lhsImainFile- _lhsImainName- _lhsImoduleHeader- _lhsIoptions- _lhsIpragmaBlocks- _lhsIsynmap- _lhsItextBlockMap- _lhsItextBlocks ->- (let _lhsOoutput :: PP_Doc- _nontsOwrappers :: (Set NontermIdent)- _nontsOtypeSyns :: TypeSyns- _nontsOderivings :: Derivings- _nontsOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _nontsOavisitdefs :: (Map VisitIdentifier (Set Identifier))- _nontsOavisituses :: (Map VisitIdentifier (Set Identifier))- _lhsOgenIO :: (IO ())- _nontsOallFromToStates :: (Map VisitIdentifier (Int,Int))- _nontsOallVisitKinds :: (Map VisitIdentifier VisitKind)- _nontsOallInitStates :: (Map NontermIdent Int)- _lhsOerrors :: (Seq Error)- _nontsOimportBlocks :: PP_Doc- _nontsOinhmap :: (Map NontermIdent Attributes)- _nontsOlocalAttrTypes :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type)))- _nontsOmainFile :: String- _nontsOmainName :: String- _nontsOmoduleHeader :: (String -> String -> String -> Bool -> String)- _nontsOoptions :: Options- _nontsOpragmaBlocks :: String- _nontsOsynmap :: (Map NontermIdent Attributes)- _nontsOtextBlocks :: PP_Doc- _nontsIappendCommon :: ([PP_Doc])- _nontsIappendMain :: ([PP_Doc])- _nontsIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _nontsIerrors :: (Seq Error)- _nontsIfromToStates :: (Map VisitIdentifier (Int,Int))- _nontsIgenProdIO :: (IO ())- _nontsIimports :: ([PP_Doc])- _nontsIinitStates :: (Map NontermIdent Int)- _nontsIoutput :: PP_Doc- _nontsIsemFunBndDefs :: (Seq PP_Doc)- _nontsIsemFunBndTps :: (Seq PP_Doc)- _nontsIvisitKinds :: (Map VisitIdentifier VisitKind)- _nontsIvisitdefs :: (Map VisitIdentifier (Set Identifier))- _nontsIvisituses :: (Map VisitIdentifier (Set Identifier))- -- "src-ag/ExecutionPlan2Hs.ag"(line 87, column 19)- _lhsOoutput =- ({-# LINE 87 "src-ag/ExecutionPlan2Hs.ag" #-}- _nontsIoutput >-< _commonExtra >-< _wrappersExtra- {-# LINE 5225 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 93, column 19)- _nontsOwrappers =- ({-# LINE 93 "src-ag/ExecutionPlan2Hs.ag" #-}- wrappers_- {-# LINE 5231 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 132, column 19)- _nontsOtypeSyns =- ({-# LINE 132 "src-ag/ExecutionPlan2Hs.ag" #-}- typeSyns_- {-# LINE 5237 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 133, column 19)- _nontsOderivings =- ({-# LINE 133 "src-ag/ExecutionPlan2Hs.ag" #-}- derivings_- {-# LINE 5243 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 531, column 3)- _wrappersExtra =- ({-# LINE 531 "src-ag/ExecutionPlan2Hs.ag" #-}- if kennedyWarren _lhsIoptions && lateHigherOrderBinding _lhsIoptions- then _lateSemBndDef- else empty- {-# LINE 5251 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 534, column 3)- _commonExtra =- ({-# LINE 534 "src-ag/ExecutionPlan2Hs.ag" #-}- if kennedyWarren _lhsIoptions && lateHigherOrderBinding _lhsIoptions- then _lateSemBndTp- else empty- {-# LINE 5259 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 537, column 3)- _lateSemBndTp =- ({-# LINE 537 "src-ag/ExecutionPlan2Hs.ag" #-}- "data" >#< lateBindingTypeNm _lhsImainName >#< "=" >#< lateBindingTypeNm _lhsImainName- >-< (indent 2 $ pp_block "{" "}" "," $ toList _nontsIsemFunBndTps)- {-# LINE 5266 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 539, column 3)- _lateSemBndDef =- ({-# LINE 539 "src-ag/ExecutionPlan2Hs.ag" #-}- ( if noInlinePragmas _lhsIoptions- then empty- else if helpInlining _lhsIoptions && Set.size wrappers_ == 1- then ppInline $ lateBindingFieldNm _lhsImainName- else ppNoInline $ lateBindingFieldNm _lhsImainName- )- >-< lateBindingFieldNm _lhsImainName >#< "::" >#< lateBindingTypeNm _lhsImainName- >-< lateBindingFieldNm _lhsImainName >#< "=" >#< lateBindingTypeNm _lhsImainName- >-< (indent 2 $ pp_block "{" "}" "," $ toList _nontsIsemFunBndDefs )- {-# LINE 5280 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1172, column 19)- _nontsOallchildvisit =- ({-# LINE 1172 "src-ag/ExecutionPlan2Hs.ag" #-}- _nontsIchildvisit- {-# LINE 5286 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1316, column 19)- _nontsOavisitdefs =- ({-# LINE 1316 "src-ag/ExecutionPlan2Hs.ag" #-}- _nontsIvisitdefs- {-# LINE 5292 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1317, column 19)- _nontsOavisituses =- ({-# LINE 1317 "src-ag/ExecutionPlan2Hs.ag" #-}- _nontsIvisituses- {-# LINE 5298 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1388, column 19)- _lhsOgenIO =- ({-# LINE 1388 "src-ag/ExecutionPlan2Hs.ag" #-}- do _genMainModule- _genCommonModule- _nontsIgenProdIO- {-# LINE 5306 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1391, column 19)- _mainModuleFile =- ({-# LINE 1391 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainFile- {-# LINE 5312 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1392, column 19)- _ppMonadImports =- ({-# LINE 1392 "src-ag/ExecutionPlan2Hs.ag" #-}- ( if tupleAsDummyToken _lhsIoptions- then empty- else pp "import GHC.Prim"- )- >-< if parallelInvoke _lhsIoptions- then pp "import qualified System.IO.Unsafe(unsafePerformIO)"- >-< pp "import System.IO(IO)"- >-< pp "import Control.Concurrent(newEmptyMVar,forkIO,putMVar,takeMVar)"- else pp "import Control.Monad.Identity"- {-# LINE 5326 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1401, column 19)- _genMainModule =- ({-# LINE 1401 "src-ag/ExecutionPlan2Hs.ag" #-}- writeModule _mainModuleFile- ( [ warrenFlagsPP _lhsIoptions- , pp $ _lhsIpragmaBlocks- , pp $ _lhsImoduleHeader _lhsImainName "" "" False- , _ppMonadImports- , pp $ "import " ++ _lhsImainName ++ "_common"- ]- ++ _nontsIimports- ++ [_lhsImainBlocksDoc]- ++ [_wrappersExtra ]- ++ _nontsIappendMain- )- {-# LINE 5343 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1413, column 19)- _commonFile =- ({-# LINE 1413 "src-ag/ExecutionPlan2Hs.ag" #-}- replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ "_common")- {-# LINE 5349 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1414, column 19)- _genCommonModule =- ({-# LINE 1414 "src-ag/ExecutionPlan2Hs.ag" #-}- writeModule _commonFile- ( [ pp $ "{-# LANGUAGE GADTs #-}"- , pp $ _lhsIpragmaBlocks- , pp $ _lhsImoduleHeader _lhsImainName "_common" "" True- , _ppMonadImports- , _lhsIimportBlocks- , _lhsItextBlocks- , _commonExtra- ]- ++ _nontsIappendCommon- )- {-# LINE 5365 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1533, column 3)- _nontsOallFromToStates =- ({-# LINE 1533 "src-ag/ExecutionPlan2Hs.ag" #-}- _nontsIfromToStates- {-# LINE 5371 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1577, column 3)- _nontsOallVisitKinds =- ({-# LINE 1577 "src-ag/ExecutionPlan2Hs.ag" #-}- _nontsIvisitKinds- {-# LINE 5377 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1591, column 3)- _nontsOallInitStates =- ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}- _nontsIinitStates- {-# LINE 5383 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1609, column 132)- _lhsOerrors =- ({-# LINE 1609 "src-ag/ExecutionPlan2Hs.ag" #-}- _nontsIerrors- {-# LINE 5389 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _nontsOimportBlocks =- ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIimportBlocks- {-# LINE 5395 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _nontsOinhmap =- ({-# LINE 312 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIinhmap- {-# LINE 5401 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _nontsOlocalAttrTypes =- ({-# LINE 1556 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIlocalAttrTypes- {-# LINE 5407 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _nontsOmainFile =- ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainFile- {-# LINE 5413 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _nontsOmainName =- ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainName- {-# LINE 5419 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _nontsOmoduleHeader =- ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImoduleHeader- {-# LINE 5425 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _nontsOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 5431 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _nontsOpragmaBlocks =- ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIpragmaBlocks- {-# LINE 5437 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _nontsOsynmap =- ({-# LINE 313 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIsynmap- {-# LINE 5443 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _nontsOtextBlocks =- ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsItextBlocks- {-# LINE 5449 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _nontsIappendCommon,_nontsIappendMain,_nontsIchildvisit,_nontsIerrors,_nontsIfromToStates,_nontsIgenProdIO,_nontsIimports,_nontsIinitStates,_nontsIoutput,_nontsIsemFunBndDefs,_nontsIsemFunBndTps,_nontsIvisitKinds,_nontsIvisitdefs,_nontsIvisituses) =- nonts_ _nontsOallFromToStates _nontsOallInitStates _nontsOallVisitKinds _nontsOallchildvisit _nontsOavisitdefs _nontsOavisituses _nontsOderivings _nontsOimportBlocks _nontsOinhmap _nontsOlocalAttrTypes _nontsOmainFile _nontsOmainName _nontsOmoduleHeader _nontsOoptions _nontsOpragmaBlocks _nontsOsynmap _nontsOtextBlocks _nontsOtypeSyns _nontsOwrappers - in ( _lhsOerrors,_lhsOgenIO,_lhsOoutput))) )--- Expression ---------------------------------------------------{-- visit 0:- synthesized attributes:- attrs : Map String (Maybe NonLocalAttr)- pos : Pos- semfunc : PP_Doc- alternatives:- alternative Expression:- child pos : {Pos}- child tks : {[HsToken]}--}--- cata-sem_Expression :: Expression ->- T_Expression -sem_Expression (Expression _pos _tks ) =- (sem_Expression_Expression _pos _tks )--- semantic domain-newtype T_Expression = T_Expression (( (Map String (Maybe NonLocalAttr)),Pos,PP_Doc))-data Inh_Expression = Inh_Expression {}-data Syn_Expression = Syn_Expression {attrs_Syn_Expression :: (Map String (Maybe NonLocalAttr)),pos_Syn_Expression :: Pos,semfunc_Syn_Expression :: PP_Doc}-wrap_Expression :: T_Expression ->- Inh_Expression ->- Syn_Expression -wrap_Expression (T_Expression sem ) (Inh_Expression ) =- (let ( _lhsOattrs,_lhsOpos,_lhsOsemfunc) = sem - in (Syn_Expression _lhsOattrs _lhsOpos _lhsOsemfunc ))-sem_Expression_Expression :: Pos ->- ([HsToken]) ->- T_Expression -sem_Expression_Expression pos_ tks_ =- (T_Expression (let _lhsOpos :: Pos- _lhsOattrs :: (Map String (Maybe NonLocalAttr))- _lhsOsemfunc :: PP_Doc- -- "src-ag/ExecutionPlan2Hs.ag"(line 1082, column 29)- _lhsOpos =- ({-# LINE 1082 "src-ag/ExecutionPlan2Hs.ag" #-}- pos_- {-# LINE 5492 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1157, column 16)- _lhsOattrs =- ({-# LINE 1157 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.unions $ map (\tok -> attrs_Syn_HsToken (wrap_HsToken (sem_HsToken tok) Inh_HsToken)) tks_- {-# LINE 5498 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1158, column 16)- _lhsOsemfunc =- ({-# LINE 1158 "src-ag/ExecutionPlan2Hs.ag" #-}- vlist $ showTokens $ map (\tok -> tok_Syn_HsToken (wrap_HsToken (sem_HsToken tok) Inh_HsToken)) tks_- {-# LINE 5504 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOattrs,_lhsOpos,_lhsOsemfunc)) )--- HsToken ------------------------------------------------------{-- visit 0:- synthesized attributes:- attrs : Map String (Maybe NonLocalAttr)- tok : (Pos,String)- alternatives:- alternative AGField:- child field : {Identifier}- child attr : {Identifier}- child pos : {Pos}- child rdesc : {Maybe String}- visit 0:- local mbAttr : _- local addTrace : _- alternative AGLocal:- child var : {Identifier}- child pos : {Pos}- child rdesc : {Maybe String}- visit 0:- local tok : _- alternative CharToken:- child value : {String}- child pos : {Pos}- alternative Err:- child mesg : {String}- child pos : {Pos}- alternative HsToken:- child value : {String}- child pos : {Pos}- alternative StrToken:- child value : {String}- child pos : {Pos}--}--- 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 (( (Map String (Maybe NonLocalAttr)),((Pos,String))))-data Inh_HsToken = Inh_HsToken {}-data Syn_HsToken = Syn_HsToken {attrs_Syn_HsToken :: (Map String (Maybe NonLocalAttr)),tok_Syn_HsToken :: ((Pos,String))}-wrap_HsToken :: T_HsToken ->- Inh_HsToken ->- Syn_HsToken -wrap_HsToken (T_HsToken sem ) (Inh_HsToken ) =- (let ( _lhsOattrs,_lhsOtok) = sem - in (Syn_HsToken _lhsOattrs _lhsOtok ))-sem_HsToken_AGField :: Identifier ->- Identifier ->- Pos ->- (Maybe String) ->- T_HsToken -sem_HsToken_AGField field_ attr_ pos_ rdesc_ =- (T_HsToken (let _lhsOattrs :: (Map String (Maybe NonLocalAttr))- _lhsOtok :: ((Pos,String))- -- "src-ag/ExecutionPlan2Hs.ag"(line 1117, column 15)- _mbAttr =- ({-# LINE 1117 "src-ag/ExecutionPlan2Hs.ag" #-}- if field_ == _INST || field_ == _FIELD || field_ == _INST'- then Nothing- else Just $ mkNonLocalAttr (field_ == _LHS) field_ attr_- {-# LINE 5580 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1120, column 15)- _lhsOattrs =- ({-# LINE 1120 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton (attrname True field_ attr_) _mbAttr- {-# LINE 5586 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1365, column 8)- _addTrace =- ({-# LINE 1365 "src-ag/ExecutionPlan2Hs.ag" #-}- case rdesc_ of- Just d -> \x -> "(trace " ++ show (d ++ " -> " ++ show field_ ++ "." ++ show attr_) ++ " (" ++ x ++ "))"- Nothing -> id- {-# LINE 5594 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1368, column 8)- _lhsOtok =- ({-# LINE 1368 "src-ag/ExecutionPlan2Hs.ag" #-}- (pos_, _addTrace $ attrname True field_ attr_)- {-# LINE 5600 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOattrs,_lhsOtok)) )-sem_HsToken_AGLocal :: Identifier ->- Pos ->- (Maybe String) ->- T_HsToken -sem_HsToken_AGLocal var_ pos_ rdesc_ =- (T_HsToken (let _lhsOattrs :: (Map String (Maybe NonLocalAttr))- _lhsOtok :: ((Pos,String))- -- "src-ag/ExecutionPlan2Hs.ag"(line 1116, column 15)- _lhsOattrs =- ({-# LINE 1116 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton (locname var_) Nothing- {-# LINE 5614 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1361, column 15)- _tok =- ({-# LINE 1361 "src-ag/ExecutionPlan2Hs.ag" #-}- (pos_,locname var_)- {-# LINE 5620 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (from local)- _lhsOtok =- ({-# LINE 1363 "src-ag/ExecutionPlan2Hs.ag" #-}- _tok- {-# LINE 5626 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOattrs,_lhsOtok)) )-sem_HsToken_CharToken :: String ->- Pos ->- T_HsToken -sem_HsToken_CharToken value_ pos_ =- (T_HsToken (let _lhsOtok :: ((Pos,String))- _lhsOattrs :: (Map String (Maybe NonLocalAttr))- -- "src-ag/ExecutionPlan2Hs.ag"(line 1372, column 16)- _lhsOtok =- ({-# LINE 1372 "src-ag/ExecutionPlan2Hs.ag" #-}- (pos_, if null value_- then ""- else showCharShort (head value_)- )- {-# LINE 5642 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1114, column 37)- _lhsOattrs =- ({-# LINE 1114 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 5648 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOattrs,_lhsOtok)) )-sem_HsToken_Err :: String ->- Pos ->- T_HsToken -sem_HsToken_Err mesg_ pos_ =- (T_HsToken (let _lhsOtok :: ((Pos,String))- _lhsOattrs :: (Map String (Maybe NonLocalAttr))- -- "src-ag/ExecutionPlan2Hs.ag"(line 1378, column 16)- _lhsOtok =- ({-# LINE 1378 "src-ag/ExecutionPlan2Hs.ag" #-}- (pos_, "")- {-# LINE 5661 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1114, column 37)- _lhsOattrs =- ({-# LINE 1114 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 5667 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOattrs,_lhsOtok)) )-sem_HsToken_HsToken :: String ->- Pos ->- T_HsToken -sem_HsToken_HsToken value_ pos_ =- (T_HsToken (let _lhsOtok :: ((Pos,String))- _lhsOattrs :: (Map String (Maybe NonLocalAttr))- -- "src-ag/ExecutionPlan2Hs.ag"(line 1370, column 14)- _lhsOtok =- ({-# LINE 1370 "src-ag/ExecutionPlan2Hs.ag" #-}- (pos_, value_)- {-# LINE 5680 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1114, column 37)- _lhsOattrs =- ({-# LINE 1114 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 5686 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOattrs,_lhsOtok)) )-sem_HsToken_StrToken :: String ->- Pos ->- T_HsToken -sem_HsToken_StrToken value_ pos_ =- (T_HsToken (let _lhsOtok :: ((Pos,String))- _lhsOattrs :: (Map String (Maybe NonLocalAttr))- -- "src-ag/ExecutionPlan2Hs.ag"(line 1377, column 16)- _lhsOtok =- ({-# LINE 1377 "src-ag/ExecutionPlan2Hs.ag" #-}- (pos_, showStrShort value_)- {-# LINE 5699 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1114, column 37)- _lhsOattrs =- ({-# LINE 1114 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 5705 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOattrs,_lhsOtok)) )--- HsTokens -----------------------------------------------------{-- visit 0:- synthesized attribute:- tks : [(Pos,String)]- alternatives:- alternative Cons:- child hd : HsToken - child tl : HsTokens - alternative Nil:--}--- 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 (( ([(Pos,String)])))-data Inh_HsTokens = Inh_HsTokens {}-data Syn_HsTokens = Syn_HsTokens {tks_Syn_HsTokens :: ([(Pos,String)])}-wrap_HsTokens :: T_HsTokens ->- Inh_HsTokens ->- Syn_HsTokens -wrap_HsTokens (T_HsTokens sem ) (Inh_HsTokens ) =- (let ( _lhsOtks) = sem - in (Syn_HsTokens _lhsOtks ))-sem_HsTokens_Cons :: T_HsToken ->- T_HsTokens ->- T_HsTokens -sem_HsTokens_Cons (T_HsToken hd_ ) (T_HsTokens tl_ ) =- (T_HsTokens (let _lhsOtks :: ([(Pos,String)])- _hdIattrs :: (Map String (Maybe NonLocalAttr))- _hdItok :: ((Pos,String))- _tlItks :: ([(Pos,String)])- -- "src-ag/ExecutionPlan2Hs.ag"(line 1357, column 10)- _lhsOtks =- ({-# LINE 1357 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdItok : _tlItks- {-# LINE 5746 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _hdIattrs,_hdItok) =- hd_ - ( _tlItks) =- tl_ - in ( _lhsOtks)) )-sem_HsTokens_Nil :: T_HsTokens -sem_HsTokens_Nil =- (T_HsTokens (let _lhsOtks :: ([(Pos,String)])- -- "src-ag/ExecutionPlan2Hs.ag"(line 1358, column 10)- _lhsOtks =- ({-# LINE 1358 "src-ag/ExecutionPlan2Hs.ag" #-}- []- {-# LINE 5760 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOtks)) )--- HsTokensRoot -------------------------------------------------{-- 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 (( ))-data Inh_HsTokensRoot = Inh_HsTokensRoot {}-data Syn_HsTokensRoot = Syn_HsTokensRoot {}-wrap_HsTokensRoot :: T_HsTokensRoot ->- Inh_HsTokensRoot ->- Syn_HsTokensRoot -wrap_HsTokensRoot (T_HsTokensRoot sem ) (Inh_HsTokensRoot ) =- (let ( ) = sem - in (Syn_HsTokensRoot ))-sem_HsTokensRoot_HsTokensRoot :: T_HsTokens ->- T_HsTokensRoot -sem_HsTokensRoot_HsTokensRoot (T_HsTokens tokens_ ) =- (T_HsTokensRoot (let _tokensItks :: ([(Pos,String)])- ( _tokensItks) =- tokens_ - in ( )) )--- Pattern ------------------------------------------------------{-- visit 0:- inherited attributes:- anyLazyKind : Bool- options : Options- synthesized attributes:- attrs : Set String- copy : SELF - isUnderscore : Bool- sem_lhs : PP_Doc - alternatives:- alternative Alias:- child field : {Identifier}- child attr : {Identifier}- child pat : Pattern - visit 0:- local varPat : _- local patExpr : _- local addbang : _- local addbang1 : _- local copy : _- alternative Constr:- child name : {ConstructorIdent}- child pats : Patterns - visit 0:- local addbang : _- local addbang1 : _- local copy : _- alternative Irrefutable:- child pat : Pattern - visit 0:- local copy : _- alternative Product:- child pos : {Pos}- child pats : Patterns - visit 0:- local addbang : _- local addbang1 : _- local copy : _- alternative Underscore:- child pos : {Pos}- visit 0:- local copy : _--}--- cata-sem_Pattern :: Pattern ->- T_Pattern -sem_Pattern (Alias _field _attr _pat ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) )-sem_Pattern (Constr _name _pats ) =- (sem_Pattern_Constr _name (sem_Patterns _pats ) )-sem_Pattern (Irrefutable _pat ) =- (sem_Pattern_Irrefutable (sem_Pattern _pat ) )-sem_Pattern (Product _pos _pats ) =- (sem_Pattern_Product _pos (sem_Patterns _pats ) )-sem_Pattern (Underscore _pos ) =- (sem_Pattern_Underscore _pos )--- semantic domain-newtype T_Pattern = T_Pattern (Bool ->- Options ->- ( (Set String),Pattern ,Bool,( PP_Doc )))-data Inh_Pattern = Inh_Pattern {anyLazyKind_Inh_Pattern :: Bool,options_Inh_Pattern :: Options}-data Syn_Pattern = Syn_Pattern {attrs_Syn_Pattern :: (Set String),copy_Syn_Pattern :: Pattern ,isUnderscore_Syn_Pattern :: Bool,sem_lhs_Syn_Pattern :: ( PP_Doc )}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern (T_Pattern sem ) (Inh_Pattern _lhsIanyLazyKind _lhsIoptions ) =- (let ( _lhsOattrs,_lhsOcopy,_lhsOisUnderscore,_lhsOsem_lhs) = sem _lhsIanyLazyKind _lhsIoptions - in (Syn_Pattern _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs ))-sem_Pattern_Alias :: Identifier ->- Identifier ->- T_Pattern ->- T_Pattern -sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) =- (T_Pattern (\ _lhsIanyLazyKind- _lhsIoptions ->- (let _lhsOsem_lhs :: ( PP_Doc )- _lhsOisUnderscore :: Bool- _lhsOattrs :: (Set String)- _lhsOcopy :: Pattern - _patOanyLazyKind :: Bool- _patOoptions :: Options- _patIattrs :: (Set String)- _patIcopy :: Pattern - _patIisUnderscore :: Bool- _patIsem_lhs :: ( PP_Doc )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1090, column 17)- _varPat =- ({-# LINE 1090 "src-ag/ExecutionPlan2Hs.ag" #-}- text $ attrname False field_ attr_- {-# LINE 5882 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1091, column 17)- _patExpr =- ({-# LINE 1091 "src-ag/ExecutionPlan2Hs.ag" #-}- if _patIisUnderscore- then _varPat- else _varPat >|< "@" >|< _patIsem_lhs- {-# LINE 5890 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1094, column 17)- _lhsOsem_lhs =- ({-# LINE 1094 "src-ag/ExecutionPlan2Hs.ag" #-}- _addbang1 _patExpr- {-# LINE 5896 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1105, column 16)- _lhsOisUnderscore =- ({-# LINE 1105 "src-ag/ExecutionPlan2Hs.ag" #-}- False- {-# LINE 5902 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1111, column 3)- _lhsOattrs =- ({-# LINE 1111 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.insert (attrname False field_ attr_) _patIattrs- {-# LINE 5908 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1501, column 37)- _addbang =- ({-# LINE 1501 "src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 5914 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1506, column 37)- _addbang1 =- ({-# LINE 1506 "src-ag/ExecutionPlan2Hs.ag" #-}- if _lhsIanyLazyKind then id else _addbang- {-# LINE 5920 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Alias field_ attr_ _patIcopy- {-# LINE 5926 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 5932 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _patOanyLazyKind =- ({-# LINE 1247 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIanyLazyKind- {-# LINE 5938 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _patOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 5944 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _patIattrs,_patIcopy,_patIisUnderscore,_patIsem_lhs) =- pat_ _patOanyLazyKind _patOoptions - in ( _lhsOattrs,_lhsOcopy,_lhsOisUnderscore,_lhsOsem_lhs))) )-sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr name_ (T_Patterns pats_ ) =- (T_Pattern (\ _lhsIanyLazyKind- _lhsIoptions ->- (let _lhsOsem_lhs :: ( PP_Doc )- _lhsOisUnderscore :: Bool- _lhsOattrs :: (Set String)- _lhsOcopy :: Pattern - _patsOanyLazyKind :: Bool- _patsOoptions :: Options- _patsIattrs :: (Set String)- _patsIcopy :: Patterns - _patsIsem_lhs :: ([PP_Doc])- -- "src-ag/ExecutionPlan2Hs.ag"(line 1096, column 17)- _lhsOsem_lhs =- ({-# LINE 1096 "src-ag/ExecutionPlan2Hs.ag" #-}- _addbang1 $ pp_parens $ name_ >#< hv_sp _patsIsem_lhs- {-# LINE 5968 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1103, column 16)- _lhsOisUnderscore =- ({-# LINE 1103 "src-ag/ExecutionPlan2Hs.ag" #-}- False- {-# LINE 5974 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1501, column 37)- _addbang =- ({-# LINE 1501 "src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 5980 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1506, column 37)- _addbang1 =- ({-# LINE 1506 "src-ag/ExecutionPlan2Hs.ag" #-}- if _lhsIanyLazyKind then id else _addbang- {-# LINE 5986 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1109, column 36)- _lhsOattrs =- ({-# LINE 1109 "src-ag/ExecutionPlan2Hs.ag" #-}- _patsIattrs- {-# LINE 5992 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 5998 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 6004 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _patsOanyLazyKind =- ({-# LINE 1247 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIanyLazyKind- {-# LINE 6010 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _patsOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 6016 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _patsIattrs,_patsIcopy,_patsIsem_lhs) =- pats_ _patsOanyLazyKind _patsOoptions - in ( _lhsOattrs,_lhsOcopy,_lhsOisUnderscore,_lhsOsem_lhs))) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable (T_Pattern pat_ ) =- (T_Pattern (\ _lhsIanyLazyKind- _lhsIoptions ->- (let _lhsOsem_lhs :: ( PP_Doc )- _lhsOattrs :: (Set String)- _lhsOcopy :: Pattern - _lhsOisUnderscore :: Bool- _patOanyLazyKind :: Bool- _patOoptions :: Options- _patIattrs :: (Set String)- _patIcopy :: Pattern - _patIisUnderscore :: Bool- _patIsem_lhs :: ( PP_Doc )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1098, column 17)- _lhsOsem_lhs =- ({-# LINE 1098 "src-ag/ExecutionPlan2Hs.ag" #-}- text "~" >|< pp_parens _patIsem_lhs- {-# LINE 6040 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1109, column 36)- _lhsOattrs =- ({-# LINE 1109 "src-ag/ExecutionPlan2Hs.ag" #-}- _patIattrs- {-# LINE 6046 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 6052 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 6058 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (up)- _lhsOisUnderscore =- ({-# LINE 1101 "src-ag/ExecutionPlan2Hs.ag" #-}- _patIisUnderscore- {-# LINE 6064 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _patOanyLazyKind =- ({-# LINE 1247 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIanyLazyKind- {-# LINE 6070 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _patOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 6076 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _patIattrs,_patIcopy,_patIisUnderscore,_patIsem_lhs) =- pat_ _patOanyLazyKind _patOoptions - in ( _lhsOattrs,_lhsOcopy,_lhsOisUnderscore,_lhsOsem_lhs))) )-sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product pos_ (T_Patterns pats_ ) =- (T_Pattern (\ _lhsIanyLazyKind- _lhsIoptions ->- (let _lhsOsem_lhs :: ( PP_Doc )- _lhsOisUnderscore :: Bool- _lhsOattrs :: (Set String)- _lhsOcopy :: Pattern - _patsOanyLazyKind :: Bool- _patsOoptions :: Options- _patsIattrs :: (Set String)- _patsIcopy :: Patterns - _patsIsem_lhs :: ([PP_Doc])- -- "src-ag/ExecutionPlan2Hs.ag"(line 1095, column 17)- _lhsOsem_lhs =- ({-# LINE 1095 "src-ag/ExecutionPlan2Hs.ag" #-}- _addbang1 $ pp_block "(" ")" "," _patsIsem_lhs- {-# LINE 6100 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1104, column 16)- _lhsOisUnderscore =- ({-# LINE 1104 "src-ag/ExecutionPlan2Hs.ag" #-}- False- {-# LINE 6106 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1501, column 37)- _addbang =- ({-# LINE 1501 "src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 6112 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1506, column 37)- _addbang1 =- ({-# LINE 1506 "src-ag/ExecutionPlan2Hs.ag" #-}- if _lhsIanyLazyKind then id else _addbang- {-# LINE 6118 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1109, column 36)- _lhsOattrs =- ({-# LINE 1109 "src-ag/ExecutionPlan2Hs.ag" #-}- _patsIattrs- {-# LINE 6124 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 6130 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 6136 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _patsOanyLazyKind =- ({-# LINE 1247 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIanyLazyKind- {-# LINE 6142 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _patsOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 6148 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _patsIattrs,_patsIcopy,_patsIsem_lhs) =- pats_ _patsOanyLazyKind _patsOoptions - in ( _lhsOattrs,_lhsOcopy,_lhsOisUnderscore,_lhsOsem_lhs))) )-sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore pos_ =- (T_Pattern (\ _lhsIanyLazyKind- _lhsIoptions ->- (let _lhsOsem_lhs :: ( PP_Doc )- _lhsOisUnderscore :: Bool- _lhsOattrs :: (Set String)- _lhsOcopy :: Pattern - -- "src-ag/ExecutionPlan2Hs.ag"(line 1097, column 17)- _lhsOsem_lhs =- ({-# LINE 1097 "src-ag/ExecutionPlan2Hs.ag" #-}- text "_"- {-# LINE 6166 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1106, column 16)- _lhsOisUnderscore =- ({-# LINE 1106 "src-ag/ExecutionPlan2Hs.ag" #-}- True- {-# LINE 6172 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1109, column 36)- _lhsOattrs =- ({-# LINE 1109 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.empty- {-# LINE 6178 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Underscore pos_- {-# LINE 6184 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 6190 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOattrs,_lhsOcopy,_lhsOisUnderscore,_lhsOsem_lhs))) )--- Patterns -----------------------------------------------------{-- visit 0:- inherited attributes:- anyLazyKind : Bool- options : Options- synthesized attributes:- attrs : Set String- copy : SELF - sem_lhs : [PP_Doc]- alternatives:- alternative Cons:- child hd : Pattern - child tl : Patterns - visit 0:- local copy : _- alternative Nil:- visit 0:- local copy : _--}--- cata-sem_Patterns :: Patterns ->- T_Patterns -sem_Patterns list =- (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list) )--- semantic domain-newtype T_Patterns = T_Patterns (Bool ->- Options ->- ( (Set String),Patterns ,([PP_Doc])))-data Inh_Patterns = Inh_Patterns {anyLazyKind_Inh_Patterns :: Bool,options_Inh_Patterns :: Options}-data Syn_Patterns = Syn_Patterns {attrs_Syn_Patterns :: (Set String),copy_Syn_Patterns :: Patterns ,sem_lhs_Syn_Patterns :: ([PP_Doc])}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns (T_Patterns sem ) (Inh_Patterns _lhsIanyLazyKind _lhsIoptions ) =- (let ( _lhsOattrs,_lhsOcopy,_lhsOsem_lhs) = sem _lhsIanyLazyKind _lhsIoptions - in (Syn_Patterns _lhsOattrs _lhsOcopy _lhsOsem_lhs ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) =- (T_Patterns (\ _lhsIanyLazyKind- _lhsIoptions ->- (let _lhsOattrs :: (Set String)- _lhsOsem_lhs :: ([PP_Doc])- _lhsOcopy :: Patterns - _hdOanyLazyKind :: Bool- _hdOoptions :: Options- _tlOanyLazyKind :: Bool- _tlOoptions :: Options- _hdIattrs :: (Set String)- _hdIcopy :: Pattern - _hdIisUnderscore :: Bool- _hdIsem_lhs :: ( PP_Doc )- _tlIattrs :: (Set String)- _tlIcopy :: Patterns - _tlIsem_lhs :: ([PP_Doc])- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1109, column 36)- _lhsOattrs =- ({-# LINE 1109 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIattrs `Set.union` _tlIattrs- {-# LINE 6254 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1086, column 29)- _lhsOsem_lhs =- ({-# LINE 1086 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIsem_lhs : _tlIsem_lhs- {-# LINE 6260 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 6266 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 6272 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOanyLazyKind =- ({-# LINE 1247 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIanyLazyKind- {-# LINE 6278 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 6284 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOanyLazyKind =- ({-# LINE 1247 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIanyLazyKind- {-# LINE 6290 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 6296 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _hdIattrs,_hdIcopy,_hdIisUnderscore,_hdIsem_lhs) =- hd_ _hdOanyLazyKind _hdOoptions - ( _tlIattrs,_tlIcopy,_tlIsem_lhs) =- tl_ _tlOanyLazyKind _tlOoptions - in ( _lhsOattrs,_lhsOcopy,_lhsOsem_lhs))) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =- (T_Patterns (\ _lhsIanyLazyKind- _lhsIoptions ->- (let _lhsOattrs :: (Set String)- _lhsOsem_lhs :: ([PP_Doc])- _lhsOcopy :: Patterns - -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1109, column 36)- _lhsOattrs =- ({-# LINE 1109 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.empty- {-# LINE 6314 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1086, column 29)- _lhsOsem_lhs =- ({-# LINE 1086 "src-ag/ExecutionPlan2Hs.ag" #-}- []- {-# LINE 6320 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- []- {-# LINE 6326 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 6332 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOattrs,_lhsOcopy,_lhsOsem_lhs))) )--- Visit --------------------------------------------------------{-- visit 0:- inherited attributes:- allFromToStates : Map VisitIdentifier (Int,Int)- allInhmap : Map NontermIdent Attributes- allInitStates : Map NontermIdent Int- allSynmap : Map NontermIdent Attributes- allVisitKinds : Map VisitIdentifier VisitKind- allchildvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- allintramap : Map StateIdentifier (Map String (Maybe NonLocalAttr))- avisitdefs : Map VisitIdentifier (Set Identifier)- avisituses : Map VisitIdentifier (Set Identifier)- childTypes : Map Identifier Type- childintros : Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))- con : ConstructorIdent- inhmap : Attributes- mrules : Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)- nextVisits : Map StateIdentifier StateCtx- nt : NontermIdent- options : Options- params : [Identifier]- prevVisits : Map StateIdentifier StateCtx- ruledefs : Map Identifier (Set String)- ruleuses : Map Identifier (Map String (Maybe NonLocalAttr))- synmap : Attributes- terminaldefs : Set String- synthesized attributes:- allvisits : VisitStateState - childvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- errors : Seq Error- fromToStates : Map VisitIdentifier (Int,Int)- intramap : Map StateIdentifier (Map String (Maybe NonLocalAttr))- lazyIntras : Set String- ruleKinds : Map Identifier (Set VisitKind)- ruleUsage : Map Identifier Int- sem_visit : (StateIdentifier,Bool -> PP_Doc) - t_visits : PP_Doc- visitKinds : Map VisitIdentifier VisitKind- visitdefs : Map VisitIdentifier (Set Identifier)- visituses : Map VisitIdentifier (Set Identifier)- alternatives:- alternative Visit:- child ident : {VisitIdentifier}- child from : {StateIdentifier}- child to : {StateIdentifier}- child inh : {Set Identifier}- child syn : {Set Identifier}- child steps : VisitSteps - child kind : {VisitKind}- visit 0:- local nameT_visit : _- local nameTIn_visit : _- local nameTOut_visit : _- local nameTNext_visit : _- local nextVisitInfo : _- local typecon : _- local t_params : _- local inhpart : _- local synpart : _- local ppTypeList : _- local stepsInitial : _- local stepsClosing : _- local vname : _- local inhpats : _- local inhargs : _- local synargs : _- local nextargsMp : _- local nextargs : _- local nextst : _- local resultval : _- local _tup1 : _- local nextStBuild : _- local nextStRef : _- local prevVisitInfo : _- local invokecode : _- local thisintra : _- local nextintra : _- local uses : _- local inhVarNms : _- local defs : _- local defsAsMap : _- local lazyIntrasInh : _- local addbang : _- local addbang1 : _--}--- cata-sem_Visit :: Visit ->- T_Visit -sem_Visit (Visit _ident _from _to _inh _syn _steps _kind ) =- (sem_Visit_Visit _ident _from _to _inh _syn (sem_VisitSteps _steps ) _kind )--- semantic domain-newtype T_Visit = T_Visit ((Map VisitIdentifier (Int,Int)) ->- (Map NontermIdent Attributes) ->- (Map NontermIdent Int) ->- (Map NontermIdent Attributes) ->- (Map VisitIdentifier VisitKind) ->- (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- (Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->- (Map VisitIdentifier (Set Identifier)) ->- (Map VisitIdentifier (Set Identifier)) ->- (Map Identifier Type) ->- (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- ConstructorIdent ->- Attributes ->- (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->- (Map StateIdentifier StateCtx) ->- NontermIdent ->- Options ->- ([Identifier]) ->- (Map StateIdentifier StateCtx) ->- (Map Identifier (Set String)) ->- (Map Identifier (Map String (Maybe NonLocalAttr))) ->- Attributes ->- (Set String) ->- ( ( VisitStateState ),(Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),(Seq Error),(Map VisitIdentifier (Int,Int)),(Map StateIdentifier (Map String (Maybe NonLocalAttr))),(Set String),(Map Identifier (Set VisitKind)),(Map Identifier Int),( (StateIdentifier,Bool -> PP_Doc) ),PP_Doc,(Map VisitIdentifier VisitKind),(Map VisitIdentifier (Set Identifier)),(Map VisitIdentifier (Set Identifier))))-data Inh_Visit = Inh_Visit {allFromToStates_Inh_Visit :: (Map VisitIdentifier (Int,Int)),allInhmap_Inh_Visit :: (Map NontermIdent Attributes),allInitStates_Inh_Visit :: (Map NontermIdent Int),allSynmap_Inh_Visit :: (Map NontermIdent Attributes),allVisitKinds_Inh_Visit :: (Map VisitIdentifier VisitKind),allchildvisit_Inh_Visit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),allintramap_Inh_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))),avisitdefs_Inh_Visit :: (Map VisitIdentifier (Set Identifier)),avisituses_Inh_Visit :: (Map VisitIdentifier (Set Identifier)),childTypes_Inh_Visit :: (Map Identifier Type),childintros_Inh_Visit :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))),con_Inh_Visit :: ConstructorIdent,inhmap_Inh_Visit :: Attributes,mrules_Inh_Visit :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)),nextVisits_Inh_Visit :: (Map StateIdentifier StateCtx),nt_Inh_Visit :: NontermIdent,options_Inh_Visit :: Options,params_Inh_Visit :: ([Identifier]),prevVisits_Inh_Visit :: (Map StateIdentifier StateCtx),ruledefs_Inh_Visit :: (Map Identifier (Set String)),ruleuses_Inh_Visit :: (Map Identifier (Map String (Maybe NonLocalAttr))),synmap_Inh_Visit :: Attributes,terminaldefs_Inh_Visit :: (Set String)}-data Syn_Visit = Syn_Visit {allvisits_Syn_Visit :: ( VisitStateState ),childvisit_Syn_Visit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),errors_Syn_Visit :: (Seq Error),fromToStates_Syn_Visit :: (Map VisitIdentifier (Int,Int)),intramap_Syn_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))),lazyIntras_Syn_Visit :: (Set String),ruleKinds_Syn_Visit :: (Map Identifier (Set VisitKind)),ruleUsage_Syn_Visit :: (Map Identifier Int),sem_visit_Syn_Visit :: ( (StateIdentifier,Bool -> PP_Doc) ),t_visits_Syn_Visit :: PP_Doc,visitKinds_Syn_Visit :: (Map VisitIdentifier VisitKind),visitdefs_Syn_Visit :: (Map VisitIdentifier (Set Identifier)),visituses_Syn_Visit :: (Map VisitIdentifier (Set Identifier))}-wrap_Visit :: T_Visit ->- Inh_Visit ->- Syn_Visit -wrap_Visit (T_Visit sem ) (Inh_Visit _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs ) =- (let ( _lhsOallvisits,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOintramap,_lhsOlazyIntras,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_visit,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses) = sem _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs - in (Syn_Visit _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses ))-sem_Visit_Visit :: VisitIdentifier ->- StateIdentifier ->- StateIdentifier ->- (Set Identifier) ->- (Set Identifier) ->- T_VisitSteps ->- VisitKind ->- T_Visit -sem_Visit_Visit ident_ from_ to_ inh_ syn_ (T_VisitSteps steps_ ) kind_ =- (T_Visit (\ _lhsIallFromToStates- _lhsIallInhmap- _lhsIallInitStates- _lhsIallSynmap- _lhsIallVisitKinds- _lhsIallchildvisit- _lhsIallintramap- _lhsIavisitdefs- _lhsIavisituses- _lhsIchildTypes- _lhsIchildintros- _lhsIcon- _lhsIinhmap- _lhsImrules- _lhsInextVisits- _lhsInt- _lhsIoptions- _lhsIparams- _lhsIprevVisits- _lhsIruledefs- _lhsIruleuses- _lhsIsynmap- _lhsIterminaldefs ->- (let _lhsOallvisits :: ( VisitStateState )- _lhsOt_visits :: PP_Doc- _lhsOsem_visit :: ( (StateIdentifier,Bool -> PP_Doc) )- _stepsOkind :: VisitKind- _stepsOfmtMode :: FormatMode- _stepsOindex :: Int- _stepsOprevMaxSimRefs :: Int- _stepsOuseParallel :: Bool- _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _lhsOintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))- _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))- _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))- _lhsOlazyIntras :: (Set String)- _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))- _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)- _lhsOerrors :: (Seq Error)- _lhsOruleKinds :: (Map Identifier (Set VisitKind))- _lhsOruleUsage :: (Map Identifier Int)- _stepsOallFromToStates :: (Map VisitIdentifier (Int,Int))- _stepsOallInitStates :: (Map NontermIdent Int)- _stepsOallVisitKinds :: (Map VisitIdentifier VisitKind)- _stepsOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _stepsOavisitdefs :: (Map VisitIdentifier (Set Identifier))- _stepsOavisituses :: (Map VisitIdentifier (Set Identifier))- _stepsOchildTypes :: (Map Identifier Type)- _stepsOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))- _stepsOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))- _stepsOoptions :: Options- _stepsOruledefs :: (Map Identifier (Set String))- _stepsOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))- _stepsIdefs :: (Set String)- _stepsIerrors :: (Seq Error)- _stepsIindex :: Int- _stepsIisLast :: Bool- _stepsIlazyIntras :: (Set String)- _stepsIprevMaxSimRefs :: Int- _stepsIruleKinds :: (Map Identifier (Set VisitKind))- _stepsIruleUsage :: (Map Identifier Int)- _stepsIsem_steps :: PP_Doc- _stepsIsize :: Int- _stepsIsync_steps :: PP_Doc- _stepsIuses :: (Map String (Maybe NonLocalAttr))- _stepsIvisitKinds :: (Map VisitIdentifier VisitKind)- -- "src-ag/ExecutionPlan2Hs.ag"(line 340, column 11)- _lhsOallvisits =- ({-# LINE 340 "src-ag/ExecutionPlan2Hs.ag" #-}- (ident_, from_, to_)- {-# LINE 6538 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 399, column 11)- _nameT_visit =- ({-# LINE 399 "src-ag/ExecutionPlan2Hs.ag" #-}- conNmTVisit _lhsInt ident_- {-# LINE 6544 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 400, column 11)- _nameTIn_visit =- ({-# LINE 400 "src-ag/ExecutionPlan2Hs.ag" #-}- conNmTVisitIn _lhsInt ident_- {-# LINE 6550 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 401, column 11)- _nameTOut_visit =- ({-# LINE 401 "src-ag/ExecutionPlan2Hs.ag" #-}- conNmTVisitOut _lhsInt ident_- {-# LINE 6556 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 402, column 11)- _nameTNext_visit =- ({-# LINE 402 "src-ag/ExecutionPlan2Hs.ag" #-}- conNmTNextVisit _lhsInt to_- {-# LINE 6562 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 404, column 11)- _nextVisitInfo =- ({-# LINE 404 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault ManyVis to_ _lhsInextVisits- {-# LINE 6568 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 405, column 11)- _typecon =- ({-# LINE 405 "src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- VisitPure _ -> empty- VisitMonadic -> ppMonadType _lhsIoptions- {-# LINE 6576 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 409, column 11)- _t_params =- ({-# LINE 409 "src-ag/ExecutionPlan2Hs.ag" #-}- ppSpaced _lhsIparams- {-# LINE 6582 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 410, column 11)- _lhsOt_visits =- ({-# LINE 410 "src-ag/ExecutionPlan2Hs.ag" #-}- "type" >#< _nameT_visit >#< _t_params >#< "=" >#<- pp_parens (_nameTIn_visit >#< _t_params )- >#< ( if dummyTokenVisit _lhsIoptions- then "->" >#< dummyType _lhsIoptions True- else empty- )- >#< "->" >#< _typecon >#< pp_parens (_nameTOut_visit >#< _t_params )- >-< "data" >#< _nameTIn_visit >#< _t_params >#< "=" >#< _nameTIn_visit >#<- _inhpart- >-< "data" >#< _nameTOut_visit >#< _t_params >#< "=" >#< _nameTOut_visit >#<- _synpart >#< case _nextVisitInfo of- NoneVis -> empty- _ -> _addbang1 $ pp_parens (_nameTNext_visit >#< _t_params )- {-# LINE 6600 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 423, column 11)- _inhpart =- ({-# LINE 423 "src-ag/ExecutionPlan2Hs.ag" #-}- _ppTypeList inh_ _lhsIinhmap- {-# LINE 6606 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 424, column 11)- _synpart =- ({-# LINE 424 "src-ag/ExecutionPlan2Hs.ag" #-}- _ppTypeList syn_ _lhsIsynmap- {-# LINE 6612 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 425, column 11)- _ppTypeList =- ({-# LINE 425 "src-ag/ExecutionPlan2Hs.ag" #-}- \s m -> ppSpaced $ map (\i -> _addbang1 $ pp_parens $ case Map.lookup i m of- Just tp -> ppTp tp ) $ Set.toList s- {-# LINE 6619 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 708, column 11)- _lhsOsem_visit =- ({-# LINE 708 "src-ag/ExecutionPlan2Hs.ag" #-}- ( from_- , \addInlinePragma ->- ( if noInlinePragmas _lhsIoptions- then empty- else if addInlinePragma && aggressiveInlinePragmas _lhsIoptions- then ppInline _vname- else if helpInlining _lhsIoptions- then ppNoInline _vname- else empty- )- >-< "v" >|< ident_ >#< "::" >#< _nameT_visit >#< _t_params- >-< "v" >|< ident_ >#< "=" >#< "\\" >#< (_addbang $ pp_parens (_nameTIn_visit >#< _inhpats ))- >#< ( if dummyTokenVisit _lhsIoptions- then pp $ dummyPat _lhsIoptions True- else empty- )- >#< "->"- >#< ( if genCostCentres _lhsIoptions- then ppCostCentre (_vname >|< "_" >|< _lhsInt >|< "_" >|< _lhsIcon)- else empty- ) >#< "(" >#< _stepsInitial- >-< indent 3 (_stepsIsem_steps >-< _stepsClosing >#< ")")- )- {-# LINE 6647 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 733, column 11)- _stepsInitial =- ({-# LINE 733 "src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- VisitPure False -> text "let"- VisitPure True -> empty- VisitMonadic -> text "do"- {-# LINE 6656 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 737, column 11)- _stepsClosing =- ({-# LINE 737 "src-ag/ExecutionPlan2Hs.ag" #-}- let decls = _nextStBuild- >-< _addbang (pp resultValName) >#< "=" >#< _resultval- in case kind_ of- VisitPure False -> decls- >-< "in" >#< resultValName- VisitPure True -> "let" >#< decls- >-< indent 1 ("in" >#< resultValName)- VisitMonadic -> "let" >#< decls- >-< "return" >#< resultValName- {-# LINE 6670 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 746, column 11)- _vname =- ({-# LINE 746 "src-ag/ExecutionPlan2Hs.ag" #-}- "v" >|< ident_- {-# LINE 6676 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 747, column 11)- _inhpats =- ({-# LINE 747 "src-ag/ExecutionPlan2Hs.ag" #-}- ppSpaced $ map (\arg -> _addbang $ pp $ attrname True _LHS arg) $ Set.toList inh_- {-# LINE 6682 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 748, column 11)- _inhargs =- ({-# LINE 748 "src-ag/ExecutionPlan2Hs.ag" #-}- \chn -> ppSpaced $ map (attrname False chn) $ Set.toList inh_- {-# LINE 6688 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 749, column 11)- _synargs =- ({-# LINE 749 "src-ag/ExecutionPlan2Hs.ag" #-}- ppSpaced $ map (\arg -> attrname False _LHS arg) $ Set.toList syn_- {-# LINE 6694 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 750, column 11)- _nextargsMp =- ({-# LINE 750 "src-ag/ExecutionPlan2Hs.ag" #-}- maybe Map.empty id $ Map.lookup to_ _lhsIallintramap- {-# LINE 6700 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 751, column 11)- _nextargs =- ({-# LINE 751 "src-ag/ExecutionPlan2Hs.ag" #-}- ppSpaced $ Map.keys $ _nextargsMp- {-# LINE 6706 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 752, column 11)- _nextst =- ({-# LINE 752 "src-ag/ExecutionPlan2Hs.ag" #-}- "st" >|< to_ >#< _nextargs >#< dummyArg _lhsIoptions (Map.null _nextargsMp )- {-# LINE 6712 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 753, column 11)- _resultval =- ({-# LINE 753 "src-ag/ExecutionPlan2Hs.ag" #-}- _nameTOut_visit >#< _synargs >#< _nextStRef- {-# LINE 6718 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 754, column 11)- __tup1 =- ({-# LINE 754 "src-ag/ExecutionPlan2Hs.ag" #-}- case _nextVisitInfo of- NoneVis -> (empty, empty)- _ -> (_addbang (pp nextStName) >#< "=" >#< _nextst , pp nextStName)- {-# LINE 6726 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 754, column 11)- (_nextStBuild,_) =- ({-# LINE 754 "src-ag/ExecutionPlan2Hs.ag" #-}- __tup1- {-# LINE 6732 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 754, column 11)- (_,_nextStRef) =- ({-# LINE 754 "src-ag/ExecutionPlan2Hs.ag" #-}- __tup1- {-# LINE 6738 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 769, column 20)- _stepsOkind =- ({-# LINE 769 "src-ag/ExecutionPlan2Hs.ag" #-}- kind_- {-# LINE 6744 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 820, column 3)- _stepsOfmtMode =- ({-# LINE 820 "src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- VisitPure False -> FormatLetDecl- VisitPure True -> FormatLetLine- VisitMonadic -> FormatDo- {-# LINE 6753 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 858, column 22)- _stepsOindex =- ({-# LINE 858 "src-ag/ExecutionPlan2Hs.ag" #-}- 0- {-# LINE 6759 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 865, column 22)- _stepsOprevMaxSimRefs =- ({-# LINE 865 "src-ag/ExecutionPlan2Hs.ag" #-}- 0- {-# LINE 6765 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 881, column 22)- _stepsOuseParallel =- ({-# LINE 881 "src-ag/ExecutionPlan2Hs.ag" #-}- False- {-# LINE 6771 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1176, column 6)- _prevVisitInfo =- ({-# LINE 1176 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault ManyVis from_ _lhsInextVisits- {-# LINE 6777 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1177, column 6)- _lhsOchildvisit =- ({-# LINE 1177 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton ident_ _invokecode- {-# LINE 6783 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1178, column 6)- _invokecode =- ({-# LINE 1178 "src-ag/ExecutionPlan2Hs.ag" #-}- \chn kind ->- if kind `compatibleKind` kind_- then Right $- let pat | isLazyKind kind_ = pat0- | otherwise = _addbang pat0- pat0 = pp_parens pat1- pat1 = _nameTOut_visit >#< (ppSpaced $ map (attrname True chn) $ Set.toList syn_)- >#< cont- cont = case _nextVisitInfo of- NoneVis -> empty- _ -> ch1- ch0 = text $ stname chn from_- ch1 = text $ stname chn to_- expr = case (kind, kind_) of- (VisitPure _, VisitPure _) -> expr0- (VisitPure _, VisitMonadic) -> unMon _lhsIoptions >#< expr0- (VisitMonadic, VisitPure _) -> "return" >#< expr0- (VisitMonadic, VisitMonadic) -> expr0- expr0 = case _prevVisitInfo of- NoneVis -> error "error: invocation of a visit from a state that has no next visits"- OneVis _ -> "inv_" >|< _lhsInt >|< "_s" >|< from_ >#< ch0 >#< args- ManyVis -> "inv_" >|< _lhsInt >|< "_s" >|< from_ >#< ch0- >#< "K_" >|< _lhsInt >|< "_v" >|< ident_ >#< args- args = pp_parens args0 >#< args1- args0 = _nameTIn_visit >#< _inhargs chn- args1 | dummyTokenVisit _lhsIoptions = pp $ dummyArg _lhsIoptions True- | otherwise = empty- in (pat, expr)- else Left $ IncompatibleVisitKind chn ident_ kind kind_- {-# LINE 6817 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1274, column 11)- _thisintra =- ({-# LINE 1274 "src-ag/ExecutionPlan2Hs.ag" #-}- (_uses `Map.union` _nextintra ) `Map.difference` _defsAsMap- {-# LINE 6823 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1275, column 11)- _lhsOintramap =- ({-# LINE 1275 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton from_ _thisintra- {-# LINE 6829 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1276, column 11)- _nextintra =- ({-# LINE 1276 "src-ag/ExecutionPlan2Hs.ag" #-}- maybe Map.empty id $ Map.lookup to_ _lhsIallintramap- {-# LINE 6835 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1277, column 11)- _uses =- ({-# LINE 1277 "src-ag/ExecutionPlan2Hs.ag" #-}- let mp1 = _stepsIuses- mp2 = Map.fromList [ (lhsname False i, Just (AttrSyn _LHS i)) | i <- Set.elems syn_ ]- in mp1 `Map.union` mp2- {-# LINE 6843 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1280, column 11)- _inhVarNms =- ({-# LINE 1280 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.map (lhsname True) inh_- {-# LINE 6849 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1281, column 11)- _defs =- ({-# LINE 1281 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIdefs `Set.union` _inhVarNms `Set.union` _lhsIterminaldefs- {-# LINE 6855 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1282, column 11)- _defsAsMap =- ({-# LINE 1282 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.fromList [ (a, Nothing) | a <- Set.elems _defs ]- {-# LINE 6861 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1306, column 11)- _lhsOvisitdefs =- ({-# LINE 1306 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton ident_ syn_- {-# LINE 6867 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1307, column 11)- _lhsOvisituses =- ({-# LINE 1307 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton ident_ inh_- {-# LINE 6873 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1339, column 3)- _lazyIntrasInh =- ({-# LINE 1339 "src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- VisitPure False -> _inhVarNms `Set.union` _stepsIdefs- _ -> Set.empty- {-# LINE 6881 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1342, column 3)- _lhsOlazyIntras =- ({-# LINE 1342 "src-ag/ExecutionPlan2Hs.ag" #-}- _lazyIntrasInh `Set.union` _stepsIlazyIntras- {-# LINE 6887 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1495, column 37)- _addbang =- ({-# LINE 1495 "src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 6893 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1503, column 37)- _addbang1 =- ({-# LINE 1503 "src-ag/ExecutionPlan2Hs.ag" #-}- if isLazyKind kind_ then id else _addbang- {-# LINE 6899 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1530, column 3)- _lhsOfromToStates =- ({-# LINE 1530 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton ident_ (from_, to_)- {-# LINE 6905 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1574, column 3)- _lhsOvisitKinds =- ({-# LINE 1574 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton ident_ kind_- {-# LINE 6911 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1609, column 132)- _lhsOerrors =- ({-# LINE 1609 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIerrors- {-# LINE 6917 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1235, column 56)- _lhsOruleKinds =- ({-# LINE 1235 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIruleKinds- {-# LINE 6923 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1223, column 56)- _lhsOruleUsage =- ({-# LINE 1223 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIruleUsage- {-# LINE 6929 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOallFromToStates =- ({-# LINE 1527 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallFromToStates- {-# LINE 6935 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOallInitStates =- ({-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInitStates- {-# LINE 6941 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOallVisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallVisitKinds- {-# LINE 6947 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOallchildvisit =- ({-# LINE 1169 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallchildvisit- {-# LINE 6953 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOavisitdefs =- ({-# LINE 1312 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisitdefs- {-# LINE 6959 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOavisituses =- ({-# LINE 1313 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisituses- {-# LINE 6965 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOchildTypes =- ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIchildTypes- {-# LINE 6971 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOchildintros =- ({-# LINE 892 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIchildintros- {-# LINE 6977 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOmrules =- ({-# LINE 775 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImrules- {-# LINE 6983 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 6989 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOruledefs =- ({-# LINE 1287 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIruledefs- {-# LINE 6995 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOruleuses =- ({-# LINE 1288 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIruleuses- {-# LINE 7001 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _stepsIdefs,_stepsIerrors,_stepsIindex,_stepsIisLast,_stepsIlazyIntras,_stepsIprevMaxSimRefs,_stepsIruleKinds,_stepsIruleUsage,_stepsIsem_steps,_stepsIsize,_stepsIsync_steps,_stepsIuses,_stepsIvisitKinds) =- steps_ _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfmtMode _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel - in ( _lhsOallvisits,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOintramap,_lhsOlazyIntras,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_visit,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))) )--- VisitStep ----------------------------------------------------{-- visit 0:- inherited attributes:- allFromToStates : Map VisitIdentifier (Int,Int)- allInitStates : Map NontermIdent Int- allVisitKinds : Map VisitIdentifier VisitKind- allchildvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- avisitdefs : Map VisitIdentifier (Set Identifier)- avisituses : Map VisitIdentifier (Set Identifier)- childTypes : Map Identifier Type- childintros : Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))- fmtMode : FormatMode- kind : VisitKind- mrules : Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)- options : Options- ruledefs : Map Identifier (Set String)- ruleuses : Map Identifier (Map String (Maybe NonLocalAttr))- useParallel : Bool- chained attributes:- index : Int- isLast : Bool- prevMaxSimRefs : Int- synthesized attributes:- defs : Set String- errors : Seq Error- lazyIntras : Set String- ruleKinds : Map Identifier (Set VisitKind)- ruleUsage : Map Identifier Int- sem_steps : PP_Doc- sync_steps : PP_Doc- uses : Map String (Maybe NonLocalAttr)- visitKinds : Map VisitIdentifier VisitKind- alternatives:- alternative ChildIntro:- child child : {Identifier}- visit 0:- local attachItf : _- local _tup2 : {(Seq Error,PP_Doc,Set String,Map String (Maybe NonLocalAttr))}- alternative ChildVisit:- child child : {Identifier}- child nonterm : {NontermIdent}- child visit : {VisitIdentifier}- visit 0:- local visitItf : _- local _tup3 : _- local patPP : _- local exprPP : _- local useParallel : _- local convToMonad : _- local callKind : _- local addbang : _- local _tup4 : _- local from : _- local to : _- alternative PureGroup:- child steps : VisitSteps - child ordered : {Bool}- alternative Sem:- child name : {Identifier}- visit 0:- local ruleItf : _- local _tup5 : _- local sem_steps : _- alternative Sim:- child steps : VisitSteps - visit 0:- local useParallel : _- local isMonadic : _--}--- cata-sem_VisitStep :: VisitStep ->- T_VisitStep -sem_VisitStep (ChildIntro _child ) =- (sem_VisitStep_ChildIntro _child )-sem_VisitStep (ChildVisit _child _nonterm _visit ) =- (sem_VisitStep_ChildVisit _child _nonterm _visit )-sem_VisitStep (PureGroup _steps _ordered ) =- (sem_VisitStep_PureGroup (sem_VisitSteps _steps ) _ordered )-sem_VisitStep (Sem _name ) =- (sem_VisitStep_Sem _name )-sem_VisitStep (Sim _steps ) =- (sem_VisitStep_Sim (sem_VisitSteps _steps ) )--- semantic domain-newtype T_VisitStep = T_VisitStep ((Map VisitIdentifier (Int,Int)) ->- (Map NontermIdent Int) ->- (Map VisitIdentifier VisitKind) ->- (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- (Map VisitIdentifier (Set Identifier)) ->- (Map VisitIdentifier (Set Identifier)) ->- (Map Identifier Type) ->- (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- FormatMode ->- Int ->- Bool ->- VisitKind ->- (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->- Options ->- Int ->- (Map Identifier (Set String)) ->- (Map Identifier (Map String (Maybe NonLocalAttr))) ->- Bool ->- ( (Set String),(Seq Error),Int,Bool,(Set String),Int,(Map Identifier (Set VisitKind)),(Map Identifier Int),PP_Doc,PP_Doc,(Map String (Maybe NonLocalAttr)),(Map VisitIdentifier VisitKind)))-data Inh_VisitStep = Inh_VisitStep {allFromToStates_Inh_VisitStep :: (Map VisitIdentifier (Int,Int)),allInitStates_Inh_VisitStep :: (Map NontermIdent Int),allVisitKinds_Inh_VisitStep :: (Map VisitIdentifier VisitKind),allchildvisit_Inh_VisitStep :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),avisitdefs_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)),avisituses_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)),childTypes_Inh_VisitStep :: (Map Identifier Type),childintros_Inh_VisitStep :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))),fmtMode_Inh_VisitStep :: FormatMode,index_Inh_VisitStep :: Int,isLast_Inh_VisitStep :: Bool,kind_Inh_VisitStep :: VisitKind,mrules_Inh_VisitStep :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)),options_Inh_VisitStep :: Options,prevMaxSimRefs_Inh_VisitStep :: Int,ruledefs_Inh_VisitStep :: (Map Identifier (Set String)),ruleuses_Inh_VisitStep :: (Map Identifier (Map String (Maybe NonLocalAttr))),useParallel_Inh_VisitStep :: Bool}-data Syn_VisitStep = Syn_VisitStep {defs_Syn_VisitStep :: (Set String),errors_Syn_VisitStep :: (Seq Error),index_Syn_VisitStep :: Int,isLast_Syn_VisitStep :: Bool,lazyIntras_Syn_VisitStep :: (Set String),prevMaxSimRefs_Syn_VisitStep :: Int,ruleKinds_Syn_VisitStep :: (Map Identifier (Set VisitKind)),ruleUsage_Syn_VisitStep :: (Map Identifier Int),sem_steps_Syn_VisitStep :: PP_Doc,sync_steps_Syn_VisitStep :: PP_Doc,uses_Syn_VisitStep :: (Map String (Maybe NonLocalAttr)),visitKinds_Syn_VisitStep :: (Map VisitIdentifier VisitKind)}-wrap_VisitStep :: T_VisitStep ->- Inh_VisitStep ->- Syn_VisitStep -wrap_VisitStep (T_VisitStep sem ) (Inh_VisitStep _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel ) =- (let ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds) = sem _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel - in (Syn_VisitStep _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsync_steps _lhsOuses _lhsOvisitKinds ))-sem_VisitStep_ChildIntro :: Identifier ->- T_VisitStep -sem_VisitStep_ChildIntro child_ =- (T_VisitStep (\ _lhsIallFromToStates- _lhsIallInitStates- _lhsIallVisitKinds- _lhsIallchildvisit- _lhsIavisitdefs- _lhsIavisituses- _lhsIchildTypes- _lhsIchildintros- _lhsIfmtMode- _lhsIindex- _lhsIisLast- _lhsIkind- _lhsImrules- _lhsIoptions- _lhsIprevMaxSimRefs- _lhsIruledefs- _lhsIruleuses- _lhsIuseParallel ->- (let __tup2 :: ((Seq Error,PP_Doc,Set String,Map String (Maybe NonLocalAttr)))- _lhsOerrors :: (Seq Error)- _lhsOsem_steps :: PP_Doc- _lhsOdefs :: (Set String)- _lhsOuses :: (Map String (Maybe NonLocalAttr))- _lhsOlazyIntras :: (Set String)- _lhsOruleKinds :: (Map Identifier (Set VisitKind))- _lhsOruleUsage :: (Map Identifier Int)- _lhsOsync_steps :: PP_Doc- _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)- _lhsOindex :: Int- _lhsOisLast :: Bool- _lhsOprevMaxSimRefs :: Int- -- "src-ag/ExecutionPlan2Hs.ag"(line 782, column 16)- _attachItf =- ({-# LINE 782 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault (error $ "Child " ++ show child_ ++ " not found") child_ _lhsIchildintros- {-# LINE 7155 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 783, column 16)- __tup2 =- ({-# LINE 783 "src-ag/ExecutionPlan2Hs.ag" #-}- case _attachItf _lhsIkind _lhsIfmtMode of- Left e -> (Seq.singleton e, empty, Set.empty, Map.empty)- Right (code, defs, uses) -> (Seq.empty, code, defs, uses)- {-# LINE 7163 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 783, column 16)- (_lhsOerrors,_,_,_) =- ({-# LINE 783 "src-ag/ExecutionPlan2Hs.ag" #-}- __tup2- {-# LINE 7169 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 783, column 16)- (_,_lhsOsem_steps,_,_) =- ({-# LINE 783 "src-ag/ExecutionPlan2Hs.ag" #-}- __tup2- {-# LINE 7175 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 783, column 16)- (_,_,_lhsOdefs,_) =- ({-# LINE 783 "src-ag/ExecutionPlan2Hs.ag" #-}- __tup2- {-# LINE 7181 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 783, column 16)- (_,_,_,_lhsOuses) =- ({-# LINE 783 "src-ag/ExecutionPlan2Hs.ag" #-}- __tup2- {-# LINE 7187 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1335, column 57)- _lhsOlazyIntras =- ({-# LINE 1335 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.empty- {-# LINE 7193 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1235, column 56)- _lhsOruleKinds =- ({-# LINE 1235 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 7199 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1223, column 56)- _lhsOruleUsage =- ({-# LINE 1223 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 7205 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 809, column 44)- _lhsOsync_steps =- ({-# LINE 809 "src-ag/ExecutionPlan2Hs.ag" #-}- empty- {-# LINE 7211 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1571, column 68)- _lhsOvisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- mempty- {-# LINE 7217 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (chain)- _lhsOindex =- ({-# LINE 853 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIindex- {-# LINE 7223 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (chain)- _lhsOisLast =- ({-# LINE 872 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIisLast- {-# LINE 7229 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (chain)- _lhsOprevMaxSimRefs =- ({-# LINE 864 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIprevMaxSimRefs- {-# LINE 7235 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds))) )-sem_VisitStep_ChildVisit :: Identifier ->- NontermIdent ->- VisitIdentifier ->- T_VisitStep -sem_VisitStep_ChildVisit child_ nonterm_ visit_ =- (T_VisitStep (\ _lhsIallFromToStates- _lhsIallInitStates- _lhsIallVisitKinds- _lhsIallchildvisit- _lhsIavisitdefs- _lhsIavisituses- _lhsIchildTypes- _lhsIchildintros- _lhsIfmtMode- _lhsIindex- _lhsIisLast- _lhsIkind- _lhsImrules- _lhsIoptions- _lhsIprevMaxSimRefs- _lhsIruledefs- _lhsIruleuses- _lhsIuseParallel ->- (let _lhsOerrors :: (Seq Error)- _lhsOsem_steps :: PP_Doc- _lhsOsync_steps :: PP_Doc- _lhsOdefs :: (Set String)- _lhsOuses :: (Map String (Maybe NonLocalAttr))- _lhsOlazyIntras :: (Set String)- _lhsOruleKinds :: (Map Identifier (Set VisitKind))- _lhsOruleUsage :: (Map Identifier Int)- _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)- _lhsOindex :: Int- _lhsOisLast :: Bool- _lhsOprevMaxSimRefs :: Int- -- "src-ag/ExecutionPlan2Hs.ag"(line 787, column 16)- _visitItf =- ({-# LINE 787 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault (error $ "Visit " ++ show visit_ ++ " not found") visit_ _lhsIallchildvisit- {-# LINE 7277 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 788, column 16)- __tup3 =- ({-# LINE 788 "src-ag/ExecutionPlan2Hs.ag" #-}- case _visitItf child_ _lhsIkind of- Left e -> (Seq.singleton e, empty, empty)- Right (pat,expr) -> (Seq.empty, pat, expr)- {-# LINE 7285 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 788, column 16)- (_lhsOerrors,_,_) =- ({-# LINE 788 "src-ag/ExecutionPlan2Hs.ag" #-}- __tup3- {-# LINE 7291 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 788, column 16)- (_,_patPP,_) =- ({-# LINE 788 "src-ag/ExecutionPlan2Hs.ag" #-}- __tup3- {-# LINE 7297 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 788, column 16)- (_,_,_exprPP) =- ({-# LINE 788 "src-ag/ExecutionPlan2Hs.ag" #-}- __tup3- {-# LINE 7303 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 792, column 16)- _useParallel =- ({-# LINE 792 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIuseParallel && not _lhsIisLast- {-# LINE 7309 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 793, column 16)- _lhsOsem_steps =- ({-# LINE 793 "src-ag/ExecutionPlan2Hs.ag" #-}- if _useParallel- then _addbang ("sync_" >|< _lhsIindex) >#< "<- newEmptyMVar"- >-< "forkIO" >#< pp_parens (_convToMonad >#< pp_parens _exprPP >#< ">>= \\" >#< _addbang (pp parResultName) >#< " -> putMVar sync_" >|< _lhsIindex >#< parResultName)- else let decl = case _lhsIkind of- VisitPure _ -> _patPP >#< "=" >#< _exprPP- VisitMonadic -> _patPP >#< "<-" >#< _exprPP- in fmtDecl False _lhsIfmtMode decl- {-# LINE 7321 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 800, column 16)- _convToMonad =- ({-# LINE 800 "src-ag/ExecutionPlan2Hs.ag" #-}- case _callKind of- VisitPure _ -> text "return"- VisitMonadic -> empty- {-# LINE 7329 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 803, column 16)- _callKind =- ({-# LINE 803 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault (error "visit kind should be in the map") visit_ _lhsIallVisitKinds- {-# LINE 7335 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 811, column 3)- _lhsOsync_steps =- ({-# LINE 811 "src-ag/ExecutionPlan2Hs.ag" #-}- if _useParallel- then _patPP >#< "<-" >#< "takeMVar sync_" >|< _lhsIindex- else empty- {-# LINE 7343 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1324, column 16)- _lhsOdefs =- ({-# LINE 1324 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.insert (stname child_ _to) $ maybe (error "Visit not found") (Set.map $ attrname True child_) $ Map.lookup visit_ _lhsIavisitdefs- {-# LINE 7349 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1325, column 16)- _lhsOuses =- ({-# LINE 1325 "src-ag/ExecutionPlan2Hs.ag" #-}- let convert attrs = Map.fromList [ (attrname False child_ attr, Just $ mkNonLocalAttr True child_ attr) | attr <- Set.elems attrs ]- in Map.insert (stname child_ _from) Nothing $ convert $- maybe (error "Visit not found") id $ Map.lookup visit_ _lhsIavisituses- {-# LINE 7357 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1500, column 37)- _addbang =- ({-# LINE 1500 "src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 7363 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1536, column 3)- __tup4 =- ({-# LINE 1536 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault (error "visit not in allFromToStates") visit_ _lhsIallFromToStates- {-# LINE 7369 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1536, column 3)- (_from,_) =- ({-# LINE 1536 "src-ag/ExecutionPlan2Hs.ag" #-}- __tup4- {-# LINE 7375 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1536, column 3)- (_,_to) =- ({-# LINE 1536 "src-ag/ExecutionPlan2Hs.ag" #-}- __tup4- {-# LINE 7381 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1335, column 57)- _lhsOlazyIntras =- ({-# LINE 1335 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.empty- {-# LINE 7387 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1235, column 56)- _lhsOruleKinds =- ({-# LINE 1235 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 7393 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1223, column 56)- _lhsOruleUsage =- ({-# LINE 1223 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 7399 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1571, column 68)- _lhsOvisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- mempty- {-# LINE 7405 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (chain)- _lhsOindex =- ({-# LINE 853 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIindex- {-# LINE 7411 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (chain)- _lhsOisLast =- ({-# LINE 872 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIisLast- {-# LINE 7417 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (chain)- _lhsOprevMaxSimRefs =- ({-# LINE 864 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIprevMaxSimRefs- {-# LINE 7423 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds))) )-sem_VisitStep_PureGroup :: T_VisitSteps ->- Bool ->- T_VisitStep -sem_VisitStep_PureGroup (T_VisitSteps steps_ ) ordered_ =- (T_VisitStep (\ _lhsIallFromToStates- _lhsIallInitStates- _lhsIallVisitKinds- _lhsIallchildvisit- _lhsIavisitdefs- _lhsIavisituses- _lhsIchildTypes- _lhsIchildintros- _lhsIfmtMode- _lhsIindex- _lhsIisLast- _lhsIkind- _lhsImrules- _lhsIoptions- _lhsIprevMaxSimRefs- _lhsIruledefs- _lhsIruleuses- _lhsIuseParallel ->- (let _stepsOkind :: VisitKind- _lhsOsem_steps :: PP_Doc- _stepsOfmtMode :: FormatMode- _lhsOlazyIntras :: (Set String)- _lhsOdefs :: (Set String)- _lhsOerrors :: (Seq Error)- _lhsOruleKinds :: (Map Identifier (Set VisitKind))- _lhsOruleUsage :: (Map Identifier Int)- _lhsOsync_steps :: PP_Doc- _lhsOuses :: (Map String (Maybe NonLocalAttr))- _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)- _lhsOindex :: Int- _lhsOisLast :: Bool- _lhsOprevMaxSimRefs :: Int- _stepsOallFromToStates :: (Map VisitIdentifier (Int,Int))- _stepsOallInitStates :: (Map NontermIdent Int)- _stepsOallVisitKinds :: (Map VisitIdentifier VisitKind)- _stepsOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _stepsOavisitdefs :: (Map VisitIdentifier (Set Identifier))- _stepsOavisituses :: (Map VisitIdentifier (Set Identifier))- _stepsOchildTypes :: (Map Identifier Type)- _stepsOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))- _stepsOindex :: Int- _stepsOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))- _stepsOoptions :: Options- _stepsOprevMaxSimRefs :: Int- _stepsOruledefs :: (Map Identifier (Set String))- _stepsOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))- _stepsOuseParallel :: Bool- _stepsIdefs :: (Set String)- _stepsIerrors :: (Seq Error)- _stepsIindex :: Int- _stepsIisLast :: Bool- _stepsIlazyIntras :: (Set String)- _stepsIprevMaxSimRefs :: Int- _stepsIruleKinds :: (Map Identifier (Set VisitKind))- _stepsIruleUsage :: (Map Identifier Int)- _stepsIsem_steps :: PP_Doc- _stepsIsize :: Int- _stepsIsync_steps :: PP_Doc- _stepsIuses :: (Map String (Maybe NonLocalAttr))- _stepsIvisitKinds :: (Map VisitIdentifier VisitKind)- -- "src-ag/ExecutionPlan2Hs.ag"(line 773, column 3)- _stepsOkind =- ({-# LINE 773 "src-ag/ExecutionPlan2Hs.ag" #-}- VisitPure ordered_- {-# LINE 7494 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 805, column 16)- _lhsOsem_steps =- ({-# LINE 805 "src-ag/ExecutionPlan2Hs.ag" #-}- case _lhsIfmtMode of- FormatDo -> "let" >#< _stepsIsem_steps- _ -> _stepsIsem_steps- {-# LINE 7502 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 826, column 3)- _stepsOfmtMode =- ({-# LINE 826 "src-ag/ExecutionPlan2Hs.ag" #-}- case _lhsIfmtMode of- FormatDo -> FormatLetDecl- mode -> mode- {-# LINE 7510 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1345, column 3)- _lhsOlazyIntras =- ({-# LINE 1345 "src-ag/ExecutionPlan2Hs.ag" #-}- if ordered_- then _stepsIlazyIntras- else _stepsIdefs- {-# LINE 7518 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1319, column 38)- _lhsOdefs =- ({-# LINE 1319 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIdefs- {-# LINE 7524 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1609, column 132)- _lhsOerrors =- ({-# LINE 1609 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIerrors- {-# LINE 7530 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1235, column 56)- _lhsOruleKinds =- ({-# LINE 1235 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIruleKinds- {-# LINE 7536 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1223, column 56)- _lhsOruleUsage =- ({-# LINE 1223 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIruleUsage- {-# LINE 7542 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 809, column 44)- _lhsOsync_steps =- ({-# LINE 809 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIsync_steps- {-# LINE 7548 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1320, column 38)- _lhsOuses =- ({-# LINE 1320 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIuses- {-# LINE 7554 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1571, column 68)- _lhsOvisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIvisitKinds- {-# LINE 7560 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (up)- _lhsOindex =- ({-# LINE 853 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIindex- {-# LINE 7566 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (up)- _lhsOisLast =- ({-# LINE 872 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIisLast- {-# LINE 7572 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (up)- _lhsOprevMaxSimRefs =- ({-# LINE 864 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIprevMaxSimRefs- {-# LINE 7578 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOallFromToStates =- ({-# LINE 1527 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallFromToStates- {-# LINE 7584 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOallInitStates =- ({-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInitStates- {-# LINE 7590 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOallVisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallVisitKinds- {-# LINE 7596 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOallchildvisit =- ({-# LINE 1169 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallchildvisit- {-# LINE 7602 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOavisitdefs =- ({-# LINE 1312 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisitdefs- {-# LINE 7608 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOavisituses =- ({-# LINE 1313 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisituses- {-# LINE 7614 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOchildTypes =- ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIchildTypes- {-# LINE 7620 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOchildintros =- ({-# LINE 892 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIchildintros- {-# LINE 7626 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOindex =- ({-# LINE 853 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIindex- {-# LINE 7632 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOmrules =- ({-# LINE 775 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImrules- {-# LINE 7638 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 7644 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOprevMaxSimRefs =- ({-# LINE 864 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIprevMaxSimRefs- {-# LINE 7650 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOruledefs =- ({-# LINE 1287 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIruledefs- {-# LINE 7656 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOruleuses =- ({-# LINE 1288 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIruleuses- {-# LINE 7662 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOuseParallel =- ({-# LINE 880 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIuseParallel- {-# LINE 7668 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _stepsIdefs,_stepsIerrors,_stepsIindex,_stepsIisLast,_stepsIlazyIntras,_stepsIprevMaxSimRefs,_stepsIruleKinds,_stepsIruleUsage,_stepsIsem_steps,_stepsIsize,_stepsIsync_steps,_stepsIuses,_stepsIvisitKinds) =- steps_ _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfmtMode _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel - in ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds))) )-sem_VisitStep_Sem :: Identifier ->- T_VisitStep -sem_VisitStep_Sem name_ =- (T_VisitStep (\ _lhsIallFromToStates- _lhsIallInitStates- _lhsIallVisitKinds- _lhsIallchildvisit- _lhsIavisitdefs- _lhsIavisituses- _lhsIchildTypes- _lhsIchildintros- _lhsIfmtMode- _lhsIindex- _lhsIisLast- _lhsIkind- _lhsImrules- _lhsIoptions- _lhsIprevMaxSimRefs- _lhsIruledefs- _lhsIruleuses- _lhsIuseParallel ->- (let _lhsOerrors :: (Seq Error)- _lhsOruleUsage :: (Map Identifier Int)- _lhsOruleKinds :: (Map Identifier (Set VisitKind))- _lhsOdefs :: (Set String)- _lhsOuses :: (Map String (Maybe NonLocalAttr))- _lhsOlazyIntras :: (Set String)- _lhsOsem_steps :: PP_Doc- _lhsOsync_steps :: PP_Doc- _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)- _lhsOindex :: Int- _lhsOisLast :: Bool- _lhsOprevMaxSimRefs :: Int- -- "src-ag/ExecutionPlan2Hs.ag"(line 778, column 16)- _ruleItf =- ({-# LINE 778 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault (error $ "Rule " ++ show name_ ++ " not found") name_ _lhsImrules- {-# LINE 7710 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 779, column 16)- __tup5 =- ({-# LINE 779 "src-ag/ExecutionPlan2Hs.ag" #-}- case _ruleItf _lhsIkind _lhsIfmtMode of- Left e -> (Seq.singleton e, empty)- Right stmt -> (Seq.empty, stmt)- {-# LINE 7718 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 779, column 16)- (_lhsOerrors,_) =- ({-# LINE 779 "src-ag/ExecutionPlan2Hs.ag" #-}- __tup5- {-# LINE 7724 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 779, column 16)- (_,_sem_steps) =- ({-# LINE 779 "src-ag/ExecutionPlan2Hs.ag" #-}- __tup5- {-# LINE 7730 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1227, column 32)- _lhsOruleUsage =- ({-# LINE 1227 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton name_ 1- {-# LINE 7736 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1237, column 3)- _lhsOruleKinds =- ({-# LINE 1237 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton name_ (Set.singleton _lhsIkind)- {-# LINE 7742 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1322, column 16)- _lhsOdefs =- ({-# LINE 1322 "src-ag/ExecutionPlan2Hs.ag" #-}- maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruledefs- {-# LINE 7748 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 1323, column 16)- _lhsOuses =- ({-# LINE 1323 "src-ag/ExecutionPlan2Hs.ag" #-}- maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruleuses- {-# LINE 7754 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1335, column 57)- _lhsOlazyIntras =- ({-# LINE 1335 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.empty- {-# LINE 7760 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 776, column 43)- _lhsOsem_steps =- ({-# LINE 776 "src-ag/ExecutionPlan2Hs.ag" #-}- _sem_steps- {-# LINE 7766 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 809, column 44)- _lhsOsync_steps =- ({-# LINE 809 "src-ag/ExecutionPlan2Hs.ag" #-}- empty- {-# LINE 7772 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1571, column 68)- _lhsOvisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- mempty- {-# LINE 7778 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (chain)- _lhsOindex =- ({-# LINE 853 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIindex- {-# LINE 7784 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (chain)- _lhsOisLast =- ({-# LINE 872 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIisLast- {-# LINE 7790 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (chain)- _lhsOprevMaxSimRefs =- ({-# LINE 864 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIprevMaxSimRefs- {-# LINE 7796 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds))) )-sem_VisitStep_Sim :: T_VisitSteps ->- T_VisitStep -sem_VisitStep_Sim (T_VisitSteps steps_ ) =- (T_VisitStep (\ _lhsIallFromToStates- _lhsIallInitStates- _lhsIallVisitKinds- _lhsIallchildvisit- _lhsIavisitdefs- _lhsIavisituses- _lhsIchildTypes- _lhsIchildintros- _lhsIfmtMode- _lhsIindex- _lhsIisLast- _lhsIkind- _lhsImrules- _lhsIoptions- _lhsIprevMaxSimRefs- _lhsIruledefs- _lhsIruleuses- _lhsIuseParallel ->- (let _lhsOsem_steps :: PP_Doc- _stepsOindex :: Int- _lhsOindex :: Int- _lhsOprevMaxSimRefs :: Int- _lhsOdefs :: (Set String)- _lhsOerrors :: (Seq Error)- _lhsOlazyIntras :: (Set String)- _lhsOruleKinds :: (Map Identifier (Set VisitKind))- _lhsOruleUsage :: (Map Identifier Int)- _lhsOsync_steps :: PP_Doc- _lhsOuses :: (Map String (Maybe NonLocalAttr))- _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)- _lhsOisLast :: Bool- _stepsOallFromToStates :: (Map VisitIdentifier (Int,Int))- _stepsOallInitStates :: (Map NontermIdent Int)- _stepsOallVisitKinds :: (Map VisitIdentifier VisitKind)- _stepsOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _stepsOavisitdefs :: (Map VisitIdentifier (Set Identifier))- _stepsOavisituses :: (Map VisitIdentifier (Set Identifier))- _stepsOchildTypes :: (Map Identifier Type)- _stepsOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))- _stepsOfmtMode :: FormatMode- _stepsOkind :: VisitKind- _stepsOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))- _stepsOoptions :: Options- _stepsOprevMaxSimRefs :: Int- _stepsOruledefs :: (Map Identifier (Set String))- _stepsOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))- _stepsOuseParallel :: Bool- _stepsIdefs :: (Set String)- _stepsIerrors :: (Seq Error)- _stepsIindex :: Int- _stepsIisLast :: Bool- _stepsIlazyIntras :: (Set String)- _stepsIprevMaxSimRefs :: Int- _stepsIruleKinds :: (Map Identifier (Set VisitKind))- _stepsIruleUsage :: (Map Identifier Int)- _stepsIsem_steps :: PP_Doc- _stepsIsize :: Int- _stepsIsync_steps :: PP_Doc- _stepsIuses :: (Map String (Maybe NonLocalAttr))- _stepsIvisitKinds :: (Map VisitIdentifier VisitKind)- -- "src-ag/ExecutionPlan2Hs.ag"(line 804, column 16)- _lhsOsem_steps =- ({-# LINE 804 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIsem_steps >-< _stepsIsync_steps- {-# LINE 7866 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 859, column 22)- _stepsOindex =- ({-# LINE 859 "src-ag/ExecutionPlan2Hs.ag" #-}- 0- {-# LINE 7872 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 860, column 22)- _lhsOindex =- ({-# LINE 860 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIindex- {-# LINE 7878 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 867, column 3)- _lhsOprevMaxSimRefs =- ({-# LINE 867 "src-ag/ExecutionPlan2Hs.ag" #-}- if _useParallel- then _lhsIprevMaxSimRefs `max` (_stepsIindex - 1)- else _lhsIprevMaxSimRefs- {-# LINE 7886 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 882, column 22)- _useParallel =- ({-# LINE 882 "src-ag/ExecutionPlan2Hs.ag" #-}- parallelInvoke _lhsIoptions && _stepsIsize > 1 && _isMonadic- {-# LINE 7892 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 883, column 22)- _isMonadic =- ({-# LINE 883 "src-ag/ExecutionPlan2Hs.ag" #-}- case _lhsIkind of- VisitMonadic -> True- _ -> False- {-# LINE 7900 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1319, column 38)- _lhsOdefs =- ({-# LINE 1319 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIdefs- {-# LINE 7906 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1609, column 132)- _lhsOerrors =- ({-# LINE 1609 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIerrors- {-# LINE 7912 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1335, column 57)- _lhsOlazyIntras =- ({-# LINE 1335 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIlazyIntras- {-# LINE 7918 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1235, column 56)- _lhsOruleKinds =- ({-# LINE 1235 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIruleKinds- {-# LINE 7924 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1223, column 56)- _lhsOruleUsage =- ({-# LINE 1223 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIruleUsage- {-# LINE 7930 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 809, column 44)- _lhsOsync_steps =- ({-# LINE 809 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIsync_steps- {-# LINE 7936 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1320, column 38)- _lhsOuses =- ({-# LINE 1320 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIuses- {-# LINE 7942 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1571, column 68)- _lhsOvisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIvisitKinds- {-# LINE 7948 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (up)- _lhsOisLast =- ({-# LINE 872 "src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIisLast- {-# LINE 7954 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOallFromToStates =- ({-# LINE 1527 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallFromToStates- {-# LINE 7960 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOallInitStates =- ({-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInitStates- {-# LINE 7966 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOallVisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallVisitKinds- {-# LINE 7972 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOallchildvisit =- ({-# LINE 1169 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallchildvisit- {-# LINE 7978 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOavisitdefs =- ({-# LINE 1312 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisitdefs- {-# LINE 7984 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOavisituses =- ({-# LINE 1313 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisituses- {-# LINE 7990 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOchildTypes =- ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIchildTypes- {-# LINE 7996 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOchildintros =- ({-# LINE 892 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIchildintros- {-# LINE 8002 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOfmtMode =- ({-# LINE 818 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIfmtMode- {-# LINE 8008 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOkind =- ({-# LINE 768 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIkind- {-# LINE 8014 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOmrules =- ({-# LINE 775 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImrules- {-# LINE 8020 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 8026 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOprevMaxSimRefs =- ({-# LINE 864 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIprevMaxSimRefs- {-# LINE 8032 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOruledefs =- ({-# LINE 1287 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIruledefs- {-# LINE 8038 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _stepsOruleuses =- ({-# LINE 1288 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIruleuses- {-# LINE 8044 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (from local)- _stepsOuseParallel =- ({-# LINE 880 "src-ag/ExecutionPlan2Hs.ag" #-}- _useParallel- {-# LINE 8050 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _stepsIdefs,_stepsIerrors,_stepsIindex,_stepsIisLast,_stepsIlazyIntras,_stepsIprevMaxSimRefs,_stepsIruleKinds,_stepsIruleUsage,_stepsIsem_steps,_stepsIsize,_stepsIsync_steps,_stepsIuses,_stepsIvisitKinds) =- steps_ _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfmtMode _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel - in ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds))) )--- VisitSteps ---------------------------------------------------{-- visit 0:- inherited attributes:- allFromToStates : Map VisitIdentifier (Int,Int)- allInitStates : Map NontermIdent Int- allVisitKinds : Map VisitIdentifier VisitKind- allchildvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- avisitdefs : Map VisitIdentifier (Set Identifier)- avisituses : Map VisitIdentifier (Set Identifier)- childTypes : Map Identifier Type- childintros : Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))- fmtMode : FormatMode- kind : VisitKind- mrules : Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)- options : Options- ruledefs : Map Identifier (Set String)- ruleuses : Map Identifier (Map String (Maybe NonLocalAttr))- useParallel : Bool- chained attributes:- index : Int- prevMaxSimRefs : Int- synthesized attributes:- defs : Set String- errors : Seq Error- isLast : Bool- lazyIntras : Set String- ruleKinds : Map Identifier (Set VisitKind)- ruleUsage : Map Identifier Int- sem_steps : PP_Doc- size : Int- sync_steps : PP_Doc- uses : Map String (Maybe NonLocalAttr)- visitKinds : Map VisitIdentifier VisitKind- alternatives:- alternative Cons:- child hd : VisitStep - child tl : VisitSteps - alternative Nil:--}--- cata-sem_VisitSteps :: VisitSteps ->- T_VisitSteps -sem_VisitSteps list =- (Prelude.foldr sem_VisitSteps_Cons sem_VisitSteps_Nil (Prelude.map sem_VisitStep list) )--- semantic domain-newtype T_VisitSteps = T_VisitSteps ((Map VisitIdentifier (Int,Int)) ->- (Map NontermIdent Int) ->- (Map VisitIdentifier VisitKind) ->- (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- (Map VisitIdentifier (Set Identifier)) ->- (Map VisitIdentifier (Set Identifier)) ->- (Map Identifier Type) ->- (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- FormatMode ->- Int ->- VisitKind ->- (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->- Options ->- Int ->- (Map Identifier (Set String)) ->- (Map Identifier (Map String (Maybe NonLocalAttr))) ->- Bool ->- ( (Set String),(Seq Error),Int,Bool,(Set String),Int,(Map Identifier (Set VisitKind)),(Map Identifier Int),PP_Doc,Int,PP_Doc,(Map String (Maybe NonLocalAttr)),(Map VisitIdentifier VisitKind)))-data Inh_VisitSteps = Inh_VisitSteps {allFromToStates_Inh_VisitSteps :: (Map VisitIdentifier (Int,Int)),allInitStates_Inh_VisitSteps :: (Map NontermIdent Int),allVisitKinds_Inh_VisitSteps :: (Map VisitIdentifier VisitKind),allchildvisit_Inh_VisitSteps :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),avisitdefs_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)),avisituses_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)),childTypes_Inh_VisitSteps :: (Map Identifier Type),childintros_Inh_VisitSteps :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))),fmtMode_Inh_VisitSteps :: FormatMode,index_Inh_VisitSteps :: Int,kind_Inh_VisitSteps :: VisitKind,mrules_Inh_VisitSteps :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)),options_Inh_VisitSteps :: Options,prevMaxSimRefs_Inh_VisitSteps :: Int,ruledefs_Inh_VisitSteps :: (Map Identifier (Set String)),ruleuses_Inh_VisitSteps :: (Map Identifier (Map String (Maybe NonLocalAttr))),useParallel_Inh_VisitSteps :: Bool}-data Syn_VisitSteps = Syn_VisitSteps {defs_Syn_VisitSteps :: (Set String),errors_Syn_VisitSteps :: (Seq Error),index_Syn_VisitSteps :: Int,isLast_Syn_VisitSteps :: Bool,lazyIntras_Syn_VisitSteps :: (Set String),prevMaxSimRefs_Syn_VisitSteps :: Int,ruleKinds_Syn_VisitSteps :: (Map Identifier (Set VisitKind)),ruleUsage_Syn_VisitSteps :: (Map Identifier Int),sem_steps_Syn_VisitSteps :: PP_Doc,size_Syn_VisitSteps :: Int,sync_steps_Syn_VisitSteps :: PP_Doc,uses_Syn_VisitSteps :: (Map String (Maybe NonLocalAttr)),visitKinds_Syn_VisitSteps :: (Map VisitIdentifier VisitKind)}-wrap_VisitSteps :: T_VisitSteps ->- Inh_VisitSteps ->- Syn_VisitSteps -wrap_VisitSteps (T_VisitSteps sem ) (Inh_VisitSteps _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel ) =- (let ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsize,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds) = sem _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel - in (Syn_VisitSteps _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOsync_steps _lhsOuses _lhsOvisitKinds ))-sem_VisitSteps_Cons :: T_VisitStep ->- T_VisitSteps ->- T_VisitSteps -sem_VisitSteps_Cons (T_VisitStep hd_ ) (T_VisitSteps tl_ ) =- (T_VisitSteps (\ _lhsIallFromToStates- _lhsIallInitStates- _lhsIallVisitKinds- _lhsIallchildvisit- _lhsIavisitdefs- _lhsIavisituses- _lhsIchildTypes- _lhsIchildintros- _lhsIfmtMode- _lhsIindex- _lhsIkind- _lhsImrules- _lhsIoptions- _lhsIprevMaxSimRefs- _lhsIruledefs- _lhsIruleuses- _lhsIuseParallel ->- (let _lhsOsize :: Int- _hdOindex :: Int- _tlOindex :: Int- _lhsOindex :: Int- _lhsOisLast :: Bool- _hdOisLast :: Bool- _lhsOdefs :: (Set String)- _lhsOerrors :: (Seq Error)- _lhsOlazyIntras :: (Set String)- _lhsOruleKinds :: (Map Identifier (Set VisitKind))- _lhsOruleUsage :: (Map Identifier Int)- _lhsOsem_steps :: PP_Doc- _lhsOsync_steps :: PP_Doc- _lhsOuses :: (Map String (Maybe NonLocalAttr))- _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)- _lhsOprevMaxSimRefs :: Int- _hdOallFromToStates :: (Map VisitIdentifier (Int,Int))- _hdOallInitStates :: (Map NontermIdent Int)- _hdOallVisitKinds :: (Map VisitIdentifier VisitKind)- _hdOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _hdOavisitdefs :: (Map VisitIdentifier (Set Identifier))- _hdOavisituses :: (Map VisitIdentifier (Set Identifier))- _hdOchildTypes :: (Map Identifier Type)- _hdOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))- _hdOfmtMode :: FormatMode- _hdOkind :: VisitKind- _hdOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))- _hdOoptions :: Options- _hdOprevMaxSimRefs :: Int- _hdOruledefs :: (Map Identifier (Set String))- _hdOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))- _hdOuseParallel :: Bool- _tlOallFromToStates :: (Map VisitIdentifier (Int,Int))- _tlOallInitStates :: (Map NontermIdent Int)- _tlOallVisitKinds :: (Map VisitIdentifier VisitKind)- _tlOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _tlOavisitdefs :: (Map VisitIdentifier (Set Identifier))- _tlOavisituses :: (Map VisitIdentifier (Set Identifier))- _tlOchildTypes :: (Map Identifier Type)- _tlOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))- _tlOfmtMode :: FormatMode- _tlOkind :: VisitKind- _tlOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))- _tlOoptions :: Options- _tlOprevMaxSimRefs :: Int- _tlOruledefs :: (Map Identifier (Set String))- _tlOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))- _tlOuseParallel :: Bool- _hdIdefs :: (Set String)- _hdIerrors :: (Seq Error)- _hdIindex :: Int- _hdIisLast :: Bool- _hdIlazyIntras :: (Set String)- _hdIprevMaxSimRefs :: Int- _hdIruleKinds :: (Map Identifier (Set VisitKind))- _hdIruleUsage :: (Map Identifier Int)- _hdIsem_steps :: PP_Doc- _hdIsync_steps :: PP_Doc- _hdIuses :: (Map String (Maybe NonLocalAttr))- _hdIvisitKinds :: (Map VisitIdentifier VisitKind)- _tlIdefs :: (Set String)- _tlIerrors :: (Seq Error)- _tlIindex :: Int- _tlIisLast :: Bool- _tlIlazyIntras :: (Set String)- _tlIprevMaxSimRefs :: Int- _tlIruleKinds :: (Map Identifier (Set VisitKind))- _tlIruleUsage :: (Map Identifier Int)- _tlIsem_steps :: PP_Doc- _tlIsize :: Int- _tlIsync_steps :: PP_Doc- _tlIuses :: (Map String (Maybe NonLocalAttr))- _tlIvisitKinds :: (Map VisitIdentifier VisitKind)- -- "src-ag/ExecutionPlan2Hs.ag"(line 850, column 10)- _lhsOsize =- ({-# LINE 850 "src-ag/ExecutionPlan2Hs.ag" #-}- 1 + _tlIsize- {-# LINE 8225 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 855, column 3)- _hdOindex =- ({-# LINE 855 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIindex- {-# LINE 8231 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 856, column 3)- _tlOindex =- ({-# LINE 856 "src-ag/ExecutionPlan2Hs.ag" #-}- 1 + _lhsIindex- {-# LINE 8237 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 857, column 3)- _lhsOindex =- ({-# LINE 857 "src-ag/ExecutionPlan2Hs.ag" #-}- _tlIindex- {-# LINE 8243 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 876, column 11)- _lhsOisLast =- ({-# LINE 876 "src-ag/ExecutionPlan2Hs.ag" #-}- False- {-# LINE 8249 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 877, column 11)- _hdOisLast =- ({-# LINE 877 "src-ag/ExecutionPlan2Hs.ag" #-}- _tlIisLast- {-# LINE 8255 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1319, column 38)- _lhsOdefs =- ({-# LINE 1319 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIdefs `Set.union` _tlIdefs- {-# LINE 8261 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1609, column 132)- _lhsOerrors =- ({-# LINE 1609 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 8267 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1335, column 57)- _lhsOlazyIntras =- ({-# LINE 1335 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIlazyIntras `Set.union` _tlIlazyIntras- {-# LINE 8273 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1235, column 56)- _lhsOruleKinds =- ({-# LINE 1235 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIruleKinds `unionWithMappend` _tlIruleKinds- {-# LINE 8279 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1223, column 56)- _lhsOruleUsage =- ({-# LINE 1223 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIruleUsage `unionWithSum` _tlIruleUsage- {-# LINE 8285 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 776, column 43)- _lhsOsem_steps =- ({-# LINE 776 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIsem_steps >-< _tlIsem_steps- {-# LINE 8291 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 809, column 44)- _lhsOsync_steps =- ({-# LINE 809 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIsync_steps >-< _tlIsync_steps- {-# LINE 8297 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1320, column 38)- _lhsOuses =- ({-# LINE 1320 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIuses `Map.union` _tlIuses- {-# LINE 8303 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1571, column 68)- _lhsOvisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIvisitKinds `mappend` _tlIvisitKinds- {-# LINE 8309 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (up)- _lhsOprevMaxSimRefs =- ({-# LINE 864 "src-ag/ExecutionPlan2Hs.ag" #-}- _tlIprevMaxSimRefs- {-# LINE 8315 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallFromToStates =- ({-# LINE 1527 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallFromToStates- {-# LINE 8321 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallInitStates =- ({-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInitStates- {-# LINE 8327 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallVisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallVisitKinds- {-# LINE 8333 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallchildvisit =- ({-# LINE 1169 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallchildvisit- {-# LINE 8339 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOavisitdefs =- ({-# LINE 1312 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisitdefs- {-# LINE 8345 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOavisituses =- ({-# LINE 1313 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisituses- {-# LINE 8351 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOchildTypes =- ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIchildTypes- {-# LINE 8357 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOchildintros =- ({-# LINE 892 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIchildintros- {-# LINE 8363 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOfmtMode =- ({-# LINE 818 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIfmtMode- {-# LINE 8369 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOkind =- ({-# LINE 768 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIkind- {-# LINE 8375 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOmrules =- ({-# LINE 775 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImrules- {-# LINE 8381 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 8387 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOprevMaxSimRefs =- ({-# LINE 864 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIprevMaxSimRefs- {-# LINE 8393 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOruledefs =- ({-# LINE 1287 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIruledefs- {-# LINE 8399 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOruleuses =- ({-# LINE 1288 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIruleuses- {-# LINE 8405 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOuseParallel =- ({-# LINE 880 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIuseParallel- {-# LINE 8411 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallFromToStates =- ({-# LINE 1527 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallFromToStates- {-# LINE 8417 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallInitStates =- ({-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInitStates- {-# LINE 8423 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallVisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallVisitKinds- {-# LINE 8429 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallchildvisit =- ({-# LINE 1169 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallchildvisit- {-# LINE 8435 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOavisitdefs =- ({-# LINE 1312 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisitdefs- {-# LINE 8441 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOavisituses =- ({-# LINE 1313 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisituses- {-# LINE 8447 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOchildTypes =- ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIchildTypes- {-# LINE 8453 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOchildintros =- ({-# LINE 892 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIchildintros- {-# LINE 8459 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOfmtMode =- ({-# LINE 818 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIfmtMode- {-# LINE 8465 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOkind =- ({-# LINE 768 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIkind- {-# LINE 8471 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOmrules =- ({-# LINE 775 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImrules- {-# LINE 8477 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 8483 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (chain)- _tlOprevMaxSimRefs =- ({-# LINE 864 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIprevMaxSimRefs- {-# LINE 8489 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOruledefs =- ({-# LINE 1287 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIruledefs- {-# LINE 8495 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOruleuses =- ({-# LINE 1288 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIruleuses- {-# LINE 8501 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOuseParallel =- ({-# LINE 880 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIuseParallel- {-# LINE 8507 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _hdIdefs,_hdIerrors,_hdIindex,_hdIisLast,_hdIlazyIntras,_hdIprevMaxSimRefs,_hdIruleKinds,_hdIruleUsage,_hdIsem_steps,_hdIsync_steps,_hdIuses,_hdIvisitKinds) =- hd_ _hdOallFromToStates _hdOallInitStates _hdOallVisitKinds _hdOallchildvisit _hdOavisitdefs _hdOavisituses _hdOchildTypes _hdOchildintros _hdOfmtMode _hdOindex _hdOisLast _hdOkind _hdOmrules _hdOoptions _hdOprevMaxSimRefs _hdOruledefs _hdOruleuses _hdOuseParallel - ( _tlIdefs,_tlIerrors,_tlIindex,_tlIisLast,_tlIlazyIntras,_tlIprevMaxSimRefs,_tlIruleKinds,_tlIruleUsage,_tlIsem_steps,_tlIsize,_tlIsync_steps,_tlIuses,_tlIvisitKinds) =- tl_ _tlOallFromToStates _tlOallInitStates _tlOallVisitKinds _tlOallchildvisit _tlOavisitdefs _tlOavisituses _tlOchildTypes _tlOchildintros _tlOfmtMode _tlOindex _tlOkind _tlOmrules _tlOoptions _tlOprevMaxSimRefs _tlOruledefs _tlOruleuses _tlOuseParallel - in ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsize,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds))) )-sem_VisitSteps_Nil :: T_VisitSteps -sem_VisitSteps_Nil =- (T_VisitSteps (\ _lhsIallFromToStates- _lhsIallInitStates- _lhsIallVisitKinds- _lhsIallchildvisit- _lhsIavisitdefs- _lhsIavisituses- _lhsIchildTypes- _lhsIchildintros- _lhsIfmtMode- _lhsIindex- _lhsIkind- _lhsImrules- _lhsIoptions- _lhsIprevMaxSimRefs- _lhsIruledefs- _lhsIruleuses- _lhsIuseParallel ->- (let _lhsOsize :: Int- _lhsOisLast :: Bool- _lhsOdefs :: (Set String)- _lhsOerrors :: (Seq Error)- _lhsOlazyIntras :: (Set String)- _lhsOruleKinds :: (Map Identifier (Set VisitKind))- _lhsOruleUsage :: (Map Identifier Int)- _lhsOsem_steps :: PP_Doc- _lhsOsync_steps :: PP_Doc- _lhsOuses :: (Map String (Maybe NonLocalAttr))- _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)- _lhsOindex :: Int- _lhsOprevMaxSimRefs :: Int- -- "src-ag/ExecutionPlan2Hs.ag"(line 849, column 10)- _lhsOsize =- ({-# LINE 849 "src-ag/ExecutionPlan2Hs.ag" #-}- 0- {-# LINE 8550 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- "src-ag/ExecutionPlan2Hs.ag"(line 875, column 11)- _lhsOisLast =- ({-# LINE 875 "src-ag/ExecutionPlan2Hs.ag" #-}- True- {-# LINE 8556 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1319, column 38)- _lhsOdefs =- ({-# LINE 1319 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.empty- {-# LINE 8562 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1609, column 132)- _lhsOerrors =- ({-# LINE 1609 "src-ag/ExecutionPlan2Hs.ag" #-}- Seq.empty- {-# LINE 8568 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1335, column 57)- _lhsOlazyIntras =- ({-# LINE 1335 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.empty- {-# LINE 8574 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1235, column 56)- _lhsOruleKinds =- ({-# LINE 1235 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 8580 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1223, column 56)- _lhsOruleUsage =- ({-# LINE 1223 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 8586 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 776, column 43)- _lhsOsem_steps =- ({-# LINE 776 "src-ag/ExecutionPlan2Hs.ag" #-}- empty- {-# LINE 8592 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 809, column 44)- _lhsOsync_steps =- ({-# LINE 809 "src-ag/ExecutionPlan2Hs.ag" #-}- empty- {-# LINE 8598 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1320, column 38)- _lhsOuses =- ({-# LINE 1320 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 8604 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1571, column 68)- _lhsOvisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- mempty- {-# LINE 8610 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (chain)- _lhsOindex =- ({-# LINE 853 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIindex- {-# LINE 8616 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (chain)- _lhsOprevMaxSimRefs =- ({-# LINE 864 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIprevMaxSimRefs- {-# LINE 8622 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsize,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds))) )--- Visits -------------------------------------------------------{-- visit 0:- inherited attributes:- allFromToStates : Map VisitIdentifier (Int,Int)- allInhmap : Map NontermIdent Attributes- allInitStates : Map NontermIdent Int- allSynmap : Map NontermIdent Attributes- allVisitKinds : Map VisitIdentifier VisitKind- allchildvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- allintramap : Map StateIdentifier (Map String (Maybe NonLocalAttr))- avisitdefs : Map VisitIdentifier (Set Identifier)- avisituses : Map VisitIdentifier (Set Identifier)- childTypes : Map Identifier Type- childintros : Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))- con : ConstructorIdent- inhmap : Attributes- mrules : Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)- nextVisits : Map StateIdentifier StateCtx- nt : NontermIdent- options : Options- params : [Identifier]- prevVisits : Map StateIdentifier StateCtx- ruledefs : Map Identifier (Set String)- ruleuses : Map Identifier (Map String (Maybe NonLocalAttr))- synmap : Attributes- terminaldefs : Set String- synthesized attributes:- allvisits : [VisitStateState]- childvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- errors : Seq Error- fromToStates : Map VisitIdentifier (Int,Int)- intramap : Map StateIdentifier (Map String (Maybe NonLocalAttr))- lazyIntras : Set String- ruleKinds : Map Identifier (Set VisitKind)- ruleUsage : Map Identifier Int- sem_visit : [(StateIdentifier,Bool -> PP_Doc)] - t_visits : PP_Doc- visitKinds : Map VisitIdentifier VisitKind- visitdefs : Map VisitIdentifier (Set Identifier)- visituses : Map VisitIdentifier (Set Identifier)- alternatives:- alternative Cons:- child hd : Visit - child tl : Visits - alternative Nil:--}--- cata-sem_Visits :: Visits ->- T_Visits -sem_Visits list =- (Prelude.foldr sem_Visits_Cons sem_Visits_Nil (Prelude.map sem_Visit list) )--- semantic domain-newtype T_Visits = T_Visits ((Map VisitIdentifier (Int,Int)) ->- (Map NontermIdent Attributes) ->- (Map NontermIdent Int) ->- (Map NontermIdent Attributes) ->- (Map VisitIdentifier VisitKind) ->- (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- (Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->- (Map VisitIdentifier (Set Identifier)) ->- (Map VisitIdentifier (Set Identifier)) ->- (Map Identifier Type) ->- (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- ConstructorIdent ->- Attributes ->- (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->- (Map StateIdentifier StateCtx) ->- NontermIdent ->- Options ->- ([Identifier]) ->- (Map StateIdentifier StateCtx) ->- (Map Identifier (Set String)) ->- (Map Identifier (Map String (Maybe NonLocalAttr))) ->- Attributes ->- (Set String) ->- ( ([VisitStateState]),(Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),(Seq Error),(Map VisitIdentifier (Int,Int)),(Map StateIdentifier (Map String (Maybe NonLocalAttr))),(Set String),(Map Identifier (Set VisitKind)),(Map Identifier Int),( [(StateIdentifier,Bool -> PP_Doc)] ),PP_Doc,(Map VisitIdentifier VisitKind),(Map VisitIdentifier (Set Identifier)),(Map VisitIdentifier (Set Identifier))))-data Inh_Visits = Inh_Visits {allFromToStates_Inh_Visits :: (Map VisitIdentifier (Int,Int)),allInhmap_Inh_Visits :: (Map NontermIdent Attributes),allInitStates_Inh_Visits :: (Map NontermIdent Int),allSynmap_Inh_Visits :: (Map NontermIdent Attributes),allVisitKinds_Inh_Visits :: (Map VisitIdentifier VisitKind),allchildvisit_Inh_Visits :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),allintramap_Inh_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))),avisitdefs_Inh_Visits :: (Map VisitIdentifier (Set Identifier)),avisituses_Inh_Visits :: (Map VisitIdentifier (Set Identifier)),childTypes_Inh_Visits :: (Map Identifier Type),childintros_Inh_Visits :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))),con_Inh_Visits :: ConstructorIdent,inhmap_Inh_Visits :: Attributes,mrules_Inh_Visits :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)),nextVisits_Inh_Visits :: (Map StateIdentifier StateCtx),nt_Inh_Visits :: NontermIdent,options_Inh_Visits :: Options,params_Inh_Visits :: ([Identifier]),prevVisits_Inh_Visits :: (Map StateIdentifier StateCtx),ruledefs_Inh_Visits :: (Map Identifier (Set String)),ruleuses_Inh_Visits :: (Map Identifier (Map String (Maybe NonLocalAttr))),synmap_Inh_Visits :: Attributes,terminaldefs_Inh_Visits :: (Set String)}-data Syn_Visits = Syn_Visits {allvisits_Syn_Visits :: ([VisitStateState]),childvisit_Syn_Visits :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),errors_Syn_Visits :: (Seq Error),fromToStates_Syn_Visits :: (Map VisitIdentifier (Int,Int)),intramap_Syn_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))),lazyIntras_Syn_Visits :: (Set String),ruleKinds_Syn_Visits :: (Map Identifier (Set VisitKind)),ruleUsage_Syn_Visits :: (Map Identifier Int),sem_visit_Syn_Visits :: ( [(StateIdentifier,Bool -> PP_Doc)] ),t_visits_Syn_Visits :: PP_Doc,visitKinds_Syn_Visits :: (Map VisitIdentifier VisitKind),visitdefs_Syn_Visits :: (Map VisitIdentifier (Set Identifier)),visituses_Syn_Visits :: (Map VisitIdentifier (Set Identifier))}-wrap_Visits :: T_Visits ->- Inh_Visits ->- Syn_Visits -wrap_Visits (T_Visits sem ) (Inh_Visits _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs ) =- (let ( _lhsOallvisits,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOintramap,_lhsOlazyIntras,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_visit,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses) = sem _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs - in (Syn_Visits _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses ))-sem_Visits_Cons :: T_Visit ->- T_Visits ->- T_Visits -sem_Visits_Cons (T_Visit hd_ ) (T_Visits tl_ ) =- (T_Visits (\ _lhsIallFromToStates- _lhsIallInhmap- _lhsIallInitStates- _lhsIallSynmap- _lhsIallVisitKinds- _lhsIallchildvisit- _lhsIallintramap- _lhsIavisitdefs- _lhsIavisituses- _lhsIchildTypes- _lhsIchildintros- _lhsIcon- _lhsIinhmap- _lhsImrules- _lhsInextVisits- _lhsInt- _lhsIoptions- _lhsIparams- _lhsIprevVisits- _lhsIruledefs- _lhsIruleuses- _lhsIsynmap- _lhsIterminaldefs ->- (let _lhsOallvisits :: ([VisitStateState])- _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _lhsOerrors :: (Seq Error)- _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))- _lhsOintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))- _lhsOlazyIntras :: (Set String)- _lhsOruleKinds :: (Map Identifier (Set VisitKind))- _lhsOruleUsage :: (Map Identifier Int)- _lhsOsem_visit :: ( [(StateIdentifier,Bool -> PP_Doc)] )- _lhsOt_visits :: PP_Doc- _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)- _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))- _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))- _hdOallFromToStates :: (Map VisitIdentifier (Int,Int))- _hdOallInhmap :: (Map NontermIdent Attributes)- _hdOallInitStates :: (Map NontermIdent Int)- _hdOallSynmap :: (Map NontermIdent Attributes)- _hdOallVisitKinds :: (Map VisitIdentifier VisitKind)- _hdOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _hdOallintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))- _hdOavisitdefs :: (Map VisitIdentifier (Set Identifier))- _hdOavisituses :: (Map VisitIdentifier (Set Identifier))- _hdOchildTypes :: (Map Identifier Type)- _hdOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))- _hdOcon :: ConstructorIdent- _hdOinhmap :: Attributes- _hdOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))- _hdOnextVisits :: (Map StateIdentifier StateCtx)- _hdOnt :: NontermIdent- _hdOoptions :: Options- _hdOparams :: ([Identifier])- _hdOprevVisits :: (Map StateIdentifier StateCtx)- _hdOruledefs :: (Map Identifier (Set String))- _hdOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))- _hdOsynmap :: Attributes- _hdOterminaldefs :: (Set String)- _tlOallFromToStates :: (Map VisitIdentifier (Int,Int))- _tlOallInhmap :: (Map NontermIdent Attributes)- _tlOallInitStates :: (Map NontermIdent Int)- _tlOallSynmap :: (Map NontermIdent Attributes)- _tlOallVisitKinds :: (Map VisitIdentifier VisitKind)- _tlOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _tlOallintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))- _tlOavisitdefs :: (Map VisitIdentifier (Set Identifier))- _tlOavisituses :: (Map VisitIdentifier (Set Identifier))- _tlOchildTypes :: (Map Identifier Type)- _tlOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))- _tlOcon :: ConstructorIdent- _tlOinhmap :: Attributes- _tlOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))- _tlOnextVisits :: (Map StateIdentifier StateCtx)- _tlOnt :: NontermIdent- _tlOoptions :: Options- _tlOparams :: ([Identifier])- _tlOprevVisits :: (Map StateIdentifier StateCtx)- _tlOruledefs :: (Map Identifier (Set String))- _tlOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))- _tlOsynmap :: Attributes- _tlOterminaldefs :: (Set String)- _hdIallvisits :: ( VisitStateState )- _hdIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _hdIerrors :: (Seq Error)- _hdIfromToStates :: (Map VisitIdentifier (Int,Int))- _hdIintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))- _hdIlazyIntras :: (Set String)- _hdIruleKinds :: (Map Identifier (Set VisitKind))- _hdIruleUsage :: (Map Identifier Int)- _hdIsem_visit :: ( (StateIdentifier,Bool -> PP_Doc) )- _hdIt_visits :: PP_Doc- _hdIvisitKinds :: (Map VisitIdentifier VisitKind)- _hdIvisitdefs :: (Map VisitIdentifier (Set Identifier))- _hdIvisituses :: (Map VisitIdentifier (Set Identifier))- _tlIallvisits :: ([VisitStateState])- _tlIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _tlIerrors :: (Seq Error)- _tlIfromToStates :: (Map VisitIdentifier (Int,Int))- _tlIintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))- _tlIlazyIntras :: (Set String)- _tlIruleKinds :: (Map Identifier (Set VisitKind))- _tlIruleUsage :: (Map Identifier Int)- _tlIsem_visit :: ( [(StateIdentifier,Bool -> PP_Doc)] )- _tlIt_visits :: PP_Doc- _tlIvisitKinds :: (Map VisitIdentifier VisitKind)- _tlIvisitdefs :: (Map VisitIdentifier (Set Identifier))- _tlIvisituses :: (Map VisitIdentifier (Set Identifier))- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 335, column 29)- _lhsOallvisits =- ({-# LINE 335 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIallvisits : _tlIallvisits- {-# LINE 8826 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1167, column 37)- _lhsOchildvisit =- ({-# LINE 1167 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIchildvisit `Map.union` _tlIchildvisit- {-# LINE 8832 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1609, column 132)- _lhsOerrors =- ({-# LINE 1609 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 8838 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1524, column 22)- _lhsOfromToStates =- ({-# LINE 1524 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIfromToStates `mappend` _tlIfromToStates- {-# LINE 8844 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1261, column 34)- _lhsOintramap =- ({-# LINE 1261 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIintramap `uwMapUnion` _tlIintramap- {-# LINE 8850 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1335, column 57)- _lhsOlazyIntras =- ({-# LINE 1335 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIlazyIntras `Set.union` _tlIlazyIntras- {-# LINE 8856 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1235, column 56)- _lhsOruleKinds =- ({-# LINE 1235 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIruleKinds `unionWithMappend` _tlIruleKinds- {-# LINE 8862 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1223, column 56)- _lhsOruleUsage =- ({-# LINE 1223 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIruleUsage `unionWithSum` _tlIruleUsage- {-# LINE 8868 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 705, column 29)- _lhsOsem_visit =- ({-# LINE 705 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIsem_visit : _tlIsem_visit- {-# LINE 8874 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 393, column 59)- _lhsOt_visits =- ({-# LINE 393 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIt_visits >-< _tlIt_visits- {-# LINE 8880 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1571, column 68)- _lhsOvisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIvisitKinds `mappend` _tlIvisitKinds- {-# LINE 8886 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1302, column 36)- _lhsOvisitdefs =- ({-# LINE 1302 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIvisitdefs `uwSetUnion` _tlIvisitdefs- {-# LINE 8892 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1303, column 36)- _lhsOvisituses =- ({-# LINE 1303 "src-ag/ExecutionPlan2Hs.ag" #-}- _hdIvisituses `uwSetUnion` _tlIvisituses- {-# LINE 8898 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallFromToStates =- ({-# LINE 1527 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallFromToStates- {-# LINE 8904 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallInhmap =- ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInhmap- {-# LINE 8910 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallInitStates =- ({-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInitStates- {-# LINE 8916 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallSynmap =- ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallSynmap- {-# LINE 8922 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallVisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallVisitKinds- {-# LINE 8928 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallchildvisit =- ({-# LINE 1166 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallchildvisit- {-# LINE 8934 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOallintramap =- ({-# LINE 1260 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallintramap- {-# LINE 8940 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOavisitdefs =- ({-# LINE 1312 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisitdefs- {-# LINE 8946 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOavisituses =- ({-# LINE 1313 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisituses- {-# LINE 8952 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOchildTypes =- ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIchildTypes- {-# LINE 8958 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOchildintros =- ({-# LINE 892 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIchildintros- {-# LINE 8964 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOcon =- ({-# LINE 66 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIcon- {-# LINE 8970 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOinhmap =- ({-# LINE 318 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIinhmap- {-# LINE 8976 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOmrules =- ({-# LINE 775 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImrules- {-# LINE 8982 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOnextVisits =- ({-# LINE 1513 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsInextVisits- {-# LINE 8988 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOnt =- ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsInt- {-# LINE 8994 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 9000 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOparams =- ({-# LINE 73 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIparams- {-# LINE 9006 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOprevVisits =- ({-# LINE 1513 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIprevVisits- {-# LINE 9012 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOruledefs =- ({-# LINE 1287 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIruledefs- {-# LINE 9018 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOruleuses =- ({-# LINE 1288 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIruleuses- {-# LINE 9024 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOsynmap =- ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIsynmap- {-# LINE 9030 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _hdOterminaldefs =- ({-# LINE 1263 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIterminaldefs- {-# LINE 9036 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallFromToStates =- ({-# LINE 1527 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallFromToStates- {-# LINE 9042 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallInhmap =- ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInhmap- {-# LINE 9048 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallInitStates =- ({-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallInitStates- {-# LINE 9054 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallSynmap =- ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallSynmap- {-# LINE 9060 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallVisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallVisitKinds- {-# LINE 9066 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallchildvisit =- ({-# LINE 1166 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallchildvisit- {-# LINE 9072 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOallintramap =- ({-# LINE 1260 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIallintramap- {-# LINE 9078 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOavisitdefs =- ({-# LINE 1312 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisitdefs- {-# LINE 9084 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOavisituses =- ({-# LINE 1313 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIavisituses- {-# LINE 9090 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOchildTypes =- ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIchildTypes- {-# LINE 9096 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOchildintros =- ({-# LINE 892 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIchildintros- {-# LINE 9102 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOcon =- ({-# LINE 66 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIcon- {-# LINE 9108 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOinhmap =- ({-# LINE 318 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIinhmap- {-# LINE 9114 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOmrules =- ({-# LINE 775 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImrules- {-# LINE 9120 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOnextVisits =- ({-# LINE 1513 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsInextVisits- {-# LINE 9126 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOnt =- ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsInt- {-# LINE 9132 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIoptions- {-# LINE 9138 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOparams =- ({-# LINE 73 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIparams- {-# LINE 9144 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOprevVisits =- ({-# LINE 1513 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIprevVisits- {-# LINE 9150 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOruledefs =- ({-# LINE 1287 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIruledefs- {-# LINE 9156 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOruleuses =- ({-# LINE 1288 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIruleuses- {-# LINE 9162 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOsynmap =- ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIsynmap- {-# LINE 9168 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- copy rule (down)- _tlOterminaldefs =- ({-# LINE 1263 "src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIterminaldefs- {-# LINE 9174 "src-ag/ExecutionPlan2Hs.hs" #-}- )- ( _hdIallvisits,_hdIchildvisit,_hdIerrors,_hdIfromToStates,_hdIintramap,_hdIlazyIntras,_hdIruleKinds,_hdIruleUsage,_hdIsem_visit,_hdIt_visits,_hdIvisitKinds,_hdIvisitdefs,_hdIvisituses) =- hd_ _hdOallFromToStates _hdOallInhmap _hdOallInitStates _hdOallSynmap _hdOallVisitKinds _hdOallchildvisit _hdOallintramap _hdOavisitdefs _hdOavisituses _hdOchildTypes _hdOchildintros _hdOcon _hdOinhmap _hdOmrules _hdOnextVisits _hdOnt _hdOoptions _hdOparams _hdOprevVisits _hdOruledefs _hdOruleuses _hdOsynmap _hdOterminaldefs - ( _tlIallvisits,_tlIchildvisit,_tlIerrors,_tlIfromToStates,_tlIintramap,_tlIlazyIntras,_tlIruleKinds,_tlIruleUsage,_tlIsem_visit,_tlIt_visits,_tlIvisitKinds,_tlIvisitdefs,_tlIvisituses) =- tl_ _tlOallFromToStates _tlOallInhmap _tlOallInitStates _tlOallSynmap _tlOallVisitKinds _tlOallchildvisit _tlOallintramap _tlOavisitdefs _tlOavisituses _tlOchildTypes _tlOchildintros _tlOcon _tlOinhmap _tlOmrules _tlOnextVisits _tlOnt _tlOoptions _tlOparams _tlOprevVisits _tlOruledefs _tlOruleuses _tlOsynmap _tlOterminaldefs - in ( _lhsOallvisits,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOintramap,_lhsOlazyIntras,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_visit,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))) )-sem_Visits_Nil :: T_Visits -sem_Visits_Nil =- (T_Visits (\ _lhsIallFromToStates- _lhsIallInhmap- _lhsIallInitStates- _lhsIallSynmap- _lhsIallVisitKinds- _lhsIallchildvisit- _lhsIallintramap- _lhsIavisitdefs- _lhsIavisituses- _lhsIchildTypes- _lhsIchildintros- _lhsIcon- _lhsIinhmap- _lhsImrules- _lhsInextVisits- _lhsInt- _lhsIoptions- _lhsIparams- _lhsIprevVisits- _lhsIruledefs- _lhsIruleuses- _lhsIsynmap- _lhsIterminaldefs ->- (let _lhsOallvisits :: ([VisitStateState])- _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))- _lhsOerrors :: (Seq Error)- _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))- _lhsOintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))- _lhsOlazyIntras :: (Set String)- _lhsOruleKinds :: (Map Identifier (Set VisitKind))- _lhsOruleUsage :: (Map Identifier Int)- _lhsOsem_visit :: ( [(StateIdentifier,Bool -> PP_Doc)] )- _lhsOt_visits :: PP_Doc- _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)- _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))- _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 335, column 29)- _lhsOallvisits =- ({-# LINE 335 "src-ag/ExecutionPlan2Hs.ag" #-}- []- {-# LINE 9223 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1167, column 37)- _lhsOchildvisit =- ({-# LINE 1167 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 9229 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1609, column 132)- _lhsOerrors =- ({-# LINE 1609 "src-ag/ExecutionPlan2Hs.ag" #-}- Seq.empty- {-# LINE 9235 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1524, column 22)- _lhsOfromToStates =- ({-# LINE 1524 "src-ag/ExecutionPlan2Hs.ag" #-}- mempty- {-# LINE 9241 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1261, column 34)- _lhsOintramap =- ({-# LINE 1261 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 9247 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1335, column 57)- _lhsOlazyIntras =- ({-# LINE 1335 "src-ag/ExecutionPlan2Hs.ag" #-}- Set.empty- {-# LINE 9253 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1235, column 56)- _lhsOruleKinds =- ({-# LINE 1235 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 9259 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1223, column 56)- _lhsOruleUsage =- ({-# LINE 1223 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 9265 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 705, column 29)- _lhsOsem_visit =- ({-# LINE 705 "src-ag/ExecutionPlan2Hs.ag" #-}- []- {-# LINE 9271 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 393, column 59)- _lhsOt_visits =- ({-# LINE 393 "src-ag/ExecutionPlan2Hs.ag" #-}- empty- {-# LINE 9277 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1571, column 68)- _lhsOvisitKinds =- ({-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}- mempty- {-# LINE 9283 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1302, column 36)- _lhsOvisitdefs =- ({-# LINE 1302 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 9289 "src-ag/ExecutionPlan2Hs.hs" #-}- )- -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1303, column 36)- _lhsOvisituses =- ({-# LINE 1303 "src-ag/ExecutionPlan2Hs.ag" #-}- Map.empty- {-# LINE 9295 "src-ag/ExecutionPlan2Hs.hs" #-}- )- in ( _lhsOallvisits,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOintramap,_lhsOlazyIntras,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_visit,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))) )+-- UUAGC 0.9.40.1 (src-ag/ExecutionPlan2Hs.ag)+module ExecutionPlan2Hs where+{-# LINE 7 "src-ag/ExecutionPlan2Hs.ag" #-}++import ExecutionPlan+import Pretty+import PPUtil+import Options+import Data.Monoid(mappend,mempty)+import Data.Maybe+import Debug.Trace+import System.IO+import System.Directory+import System.FilePath+import UU.Scanner.Position++import TokenDef+import HsToken+import ErrorMessages++import Data.Set (Set)+import qualified Data.Set as Set+import Data.Map (Map)+import qualified Data.Map as Map+import Data.Sequence(Seq)+import qualified Data.Sequence as Seq+import Data.Foldable(toList)+{-# LINE 31 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 2 "src-ag/ExecutionPlan.ag" #-}++-- VisitSyntax.ag imports+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import CommonTypes+import ErrorMessages++import qualified Data.Set as Set+import Data.Set(Set)+import qualified Data.Map as Map+import Data.Map(Map)+{-# LINE 45 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 2 "src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 52 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 2 "src-ag/Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken+{-# LINE 58 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 2 "src-ag/HsToken.ag" #-}++import CommonTypes+import UU.Scanner.Position(Pos)+{-# LINE 64 "dist/build/ExecutionPlan2Hs.hs" #-}+{-# LINE 161 "src-ag/ExecutionPlan2Hs.ag" #-}++classCtxsToDocs :: ClassContext -> [PP_Doc]+classCtxsToDocs = map toDoc where+ toDoc (ident,args) = (ident >#< ppSpaced (map pp_parens args))++classConstrsToDocs :: [Type] -> [PP_Doc]+classConstrsToDocs = map ppTp++ppClasses :: [PP_Doc] -> PP_Doc+ppClasses [] = empty+ppClasses xs = pp_block "(" ")" "," xs >#< "=>"++ppQuants :: [Identifier] -> PP_Doc+ppQuants [] = empty+ppQuants ps = "forall" >#< ppSpaced ps >#< "."+{-# LINE 81 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 190 "src-ag/ExecutionPlan2Hs.ag" #-}++-- first parameter indicates: generate a record or not+ppConFields :: Bool -> [PP_Doc] -> PP_Doc+ppConFields True flds = ppListSep "{" "}" ", " flds+ppConFields False flds = ppSpaced flds+{-# LINE 89 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 216 "src-ag/ExecutionPlan2Hs.ag" #-}++ppTp :: Type -> PP_Doc+ppTp (Haskell s) = text s+ppTp (NT nt args for) = prefix >|< nt >#< ppSpaced (map pp_parens args) where+ prefix | for = text "T_"+ | otherwise = empty+{-# LINE 98 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 333 "src-ag/ExecutionPlan2Hs.ag" #-}+type VisitStateState = (VisitIdentifier,StateIdentifier, StateIdentifier)+{-# LINE 102 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 429 "src-ag/ExecutionPlan2Hs.ag" #-}++conNmTVisit nt vId = "T_" >|< nt >|< "_v" >|< vId+conNmTVisitIn nt vId = "T_" >|< nt >|< "_vIn" >|< vId+conNmTVisitOut nt vId = "T_" >|< nt >|< "_vOut" >|< vId+conNmTNextVisit nt stId = "T_" >|< nt >|< "_s" >|< stId++ppMonadType :: Options -> PP_Doc+ppMonadType opts+ | parallelInvoke opts = text "IO"+ | otherwise = text "Identity"+{-# LINE 115 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 579 "src-ag/ExecutionPlan2Hs.ag" #-}++ppDefor :: Type -> PP_Doc+ppDefor (NT nt args _) = "T_" >|< nt >#< ppSpaced (map pp_parens args)+ppDefor (Haskell s) = text s+{-# LINE 122 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 694 "src-ag/ExecutionPlan2Hs.ag" #-}++mklet :: (PP a, PP b, PP c) => a -> b -> c -> PP_Doc+mklet prefix defs body =+ prefix >#< "let"+ >-< indent 3 defs+ >-< indent 2 "in" >#< body+{-# LINE 131 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 760 "src-ag/ExecutionPlan2Hs.ag" #-}++resultValName :: String+resultValName = "__result_"++nextStName :: String+nextStName = "__st_"+{-# LINE 140 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 831 "src-ag/ExecutionPlan2Hs.ag" #-}++parResultName :: String+parResultName = "__outcome_"++fmtDecl :: PP a => Bool -> FormatMode -> a -> PP_Doc+fmtDecl declPure fmt decl = case fmt of+ FormatLetDecl -> pp decl+ FormatLetLine -> "let" >#< decl >#< "in"+ FormatDo | declPure -> "let" >#< decl+ | otherwise -> pp decl+{-# LINE 153 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 946 "src-ag/ExecutionPlan2Hs.ag" #-}++stname :: Identifier -> Int -> String+stname child st = "_" ++ getName child ++ "X" ++ show st++-- should actually return some conversion info+compatibleAttach :: VisitKind -> NontermIdent -> Options -> Bool+compatibleAttach _ _ _ = True++unMon :: Options -> PP_Doc+unMon options+ | parallelInvoke options = text "System.IO.Unsafe.unsafePerformIO" -- IO monad+ | otherwise = text "Control.Monad.Identity.runIdentity" -- identity monad+{-# LINE 168 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 1050 "src-ag/ExecutionPlan2Hs.ag" #-}++dummyPat :: Options -> Bool -> PP_Doc+dummyPat opts noArgs+ | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples+ | tupleAsDummyToken opts = if strictDummyToken opts+ then text "()"+ else text "(_ :: ())"+ | otherwise = let match | strictDummyToken opts = "!_"+ | otherwise = "_"+ in pp_parens (match >#< "::" >#< dummyType opts noArgs)+ where match | strictDummyToken opts = "(!_)"+ | otherwise = "_"++dummyArg :: Options -> Bool -> PP_Doc+dummyArg opts noArgs+ | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples+ | tupleAsDummyToken opts = text "()"+ | otherwise = text "GHC.Prim.realWorld#"++dummyType :: Options -> Bool -> PP_Doc+dummyType opts noArgs+ | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples+ | tupleAsDummyToken opts = text "()"+ | otherwise = text "(GHC.Prim.State# GHC.Prim.RealWorld)"+{-# LINE 195 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 1076 "src-ag/ExecutionPlan2Hs.ag" #-}++-- rules are "deinlined" to prevent needless code duplication.+-- if there is only a bit of duplication, we allow ghc to decide if it is worth it.+-- if the duplication crosses this threshold, however, we tell ghc definitely not to inline it.+ruleInlineThresholdSoft :: Int+ruleInlineThresholdSoft = 3++ruleInlineThresholdHard :: Int+ruleInlineThresholdHard = 5++reallyOftenUsedThreshold :: Int+reallyOftenUsedThreshold = 12+{-# LINE 210 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 1142 "src-ag/ExecutionPlan2Hs.ag" #-}++data NonLocalAttr+ = AttrInh Identifier Identifier+ | AttrSyn Identifier Identifier deriving Show++mkNonLocalAttr :: Bool -> Identifier -> Identifier -> NonLocalAttr+mkNonLocalAttr True = AttrInh -- True: inherited attr+mkNonLocalAttr False = AttrSyn++lookupAttrType :: NonLocalAttr -> Map Identifier Attributes -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc+lookupAttrType (AttrInh child name) inhs _ = lookupType child name inhs+lookupAttrType (AttrSyn child name) _ syns = lookupType child name syns++-- Note: if the child takes type parameters, the type of an attribute of this child may refer to these parameters. This means that+-- the actual type of the attribute needs to have its type parameters substituted with the actual type argument of the child.+-- However, for now we simply decide to return Nothing in this case, which skips the type annotation.+lookupType :: Identifier -> Identifier -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc+lookupType child name attrMp childMp+ | noParameters childTp = Just ppDoc+ | otherwise = Nothing+ where+ attrTp = Map.findWithDefault (error "lookupType: the attribute is not in the attrs of the child") name childAttrs+ childAttrs = Map.findWithDefault (error "lookupType: the attributes of the nonterm are not in the map") nonterm attrMp+ nonterm = extractNonterminal childTp+ childTp = Map.findWithDefault (error ("lookupType: the child " ++ show child ++ "is not in the appropriate map")) child childMp+ ppDoc = ppTp attrTp++noParameters :: Type -> Bool+noParameters (Haskell _) = True+noParameters (NT _ args _) = null args+{-# LINE 243 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 1228 "src-ag/ExecutionPlan2Hs.ag" #-}++-- a `compatibleKind` b means: can kind b be invoked from a+compatibleKind :: VisitKind -> VisitKind -> Bool+compatibleKind _ _ = True++compatibleRule :: VisitKind -> Bool -> Bool+compatibleRule (VisitPure _) False = False+compatibleRule _ _ = True+{-# LINE 254 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 1250 "src-ag/ExecutionPlan2Hs.ag" #-}++unionWithSum = Map.unionWith (+)+{-# LINE 259 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 1273 "src-ag/ExecutionPlan2Hs.ag" #-}++uwSetUnion :: (Ord a, Ord b) => Map a (Set b) -> Map a (Set b) -> Map a (Set b)+uwSetUnion = Map.unionWith Set.union++uwMapUnion :: (Ord a, Ord b) => Map a (Map b c) -> Map a (Map b c) -> Map a (Map b c)+uwMapUnion = Map.unionWith Map.union+{-# LINE 268 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 1490 "src-ag/ExecutionPlan2Hs.ag" #-}++renderDocs :: [PP_Doc] -> String+renderDocs pps = foldr (.) id (map (\d -> (disp d 50000) . ( '\n':) ) pps) ""++writeModule :: FilePath -> [PP_Doc] -> IO ()+writeModule path docs+ = do bExists <- doesFileExist path+ if bExists+ then do input <- readFile path+ seq (length input) (return ())+ if input /= output+ then dumpIt+ else return ()+ else dumpIt+ where+ output = renderDocs docs+ dumpIt = writeFile path output+{-# LINE 288 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 1637 "src-ag/ExecutionPlan2Hs.ag" #-}++ppNoInline :: PP a => a -> PP_Doc+ppNoInline = ppPragmaBinding "NOINLINE"++ppInline :: PP a => a -> PP_Doc+ppInline = ppPragmaBinding "INLINE"++ppInlinable :: PP a => a -> PP_Doc+ppInlinable = ppPragmaBinding "INLINABLE"++ppPragmaBinding :: (PP a, PP b) => a -> b -> PP_Doc+ppPragmaBinding pragma nm = "{-#" >#< pragma >#< nm >#< "#-}"++ppCostCentre :: PP a => a -> PP_Doc+ppCostCentre nm = "{-#" >#< "SCC" >#< "\"" >|< nm >|< "\"" >#< "#-}"++warrenFlagsPP :: Options -> PP_Doc+warrenFlagsPP options = vlist+ [ pp "{-# LANGUAGE Rank2Types, GADTs #-}"+ , if bangpats options+ then pp "{-# LANGUAGE BangPatterns #-}"+ else empty+ , if noPerRuleTypeSigs options && noPerStateTypeSigs options+ then empty+ else pp "{-# LANGUAGE ScopedTypeVariables #-}"+ , if tupleAsDummyToken options+ then empty+ else pp "{-# LANGUAGE ScopedTypeVariables, MagicHash #-}"+ , -- not that the meaning of "unbox" is here that strict fields in data types may be+ -- unboxed if possible. This may affect user-defined data types declared in the module.+ -- Unfortunately, we cannot turn it on for only the AG generated data types without+ -- causing a zillion of warnings.+ if unbox options && bangpats options+ then pp $ "{-# OPTIONS_GHC -funbox-strict-fields -fstrictness #-}"+ else empty+ , if parallelInvoke options && not (noEagerBlackholing options)+ then pp $ "{-# OPTIONS_GHC -feager-blackholing #-}"+ else empty+ ]+{-# LINE 330 "dist/build/ExecutionPlan2Hs.hs" #-}+-- EChild ------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allInitStates : Map NontermIdent Int+ con : ConstructorIdent+ importBlocks : PP_Doc+ mainFile : String+ mainName : String+ moduleHeader : String -> String -> String -> Bool -> String+ nt : NontermIdent+ options : Options+ pragmaBlocks : String+ textBlocks : PP_Doc+ synthesized attributes:+ argnamesw : PP_Doc + argpats : PP_Doc + argtps : PP_Doc + childTypes : Map Identifier Type+ childintros : Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ datatype : PP_Doc+ terminaldefs : Set String+ alternatives:+ alternative EChild:+ child name : {Identifier}+ child tp : {Type}+ child kind : {ChildKind}+ child hasAround : {Bool}+ child merges : {Maybe [Identifier]}+ child isMerged : {Bool}+ visit 0:+ local tpDoc : _+ local strNm : _+ local field : _+ local addStrict : _+ local argpats : _+ local isDefor : _+ local valcode : _+ local aroundcode : _+ local introcode : _+ local nt : _+ local addbang : _+ local initSt : _+ alternative ETerm:+ child name : {Identifier}+ child tp : {Type}+ visit 0:+ local tpDoc : _+ local strNm : _+ local field : _+ local addStrict : _+ local argpats : _+ local addbang : _+-}+-- cata+sem_EChild :: EChild ->+ T_EChild+sem_EChild (EChild _name _tp _kind _hasAround _merges _isMerged) =+ (sem_EChild_EChild _name _tp _kind _hasAround _merges _isMerged)+sem_EChild (ETerm _name _tp) =+ (sem_EChild_ETerm _name _tp)+-- semantic domain+newtype T_EChild = T_EChild ((Map NontermIdent Int) ->+ ConstructorIdent ->+ PP_Doc ->+ String ->+ String ->+ (String -> String -> String -> Bool -> String) ->+ NontermIdent ->+ Options ->+ String ->+ PP_Doc ->+ ( ( PP_Doc ),( PP_Doc ),( PP_Doc ),(Map Identifier Type),(Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))),PP_Doc,(Set String)))+data Inh_EChild = Inh_EChild {allInitStates_Inh_EChild :: (Map NontermIdent Int),con_Inh_EChild :: ConstructorIdent,importBlocks_Inh_EChild :: PP_Doc,mainFile_Inh_EChild :: String,mainName_Inh_EChild :: String,moduleHeader_Inh_EChild :: (String -> String -> String -> Bool -> String),nt_Inh_EChild :: NontermIdent,options_Inh_EChild :: Options,pragmaBlocks_Inh_EChild :: String,textBlocks_Inh_EChild :: PP_Doc}+data Syn_EChild = Syn_EChild {argnamesw_Syn_EChild :: ( PP_Doc ),argpats_Syn_EChild :: ( PP_Doc ),argtps_Syn_EChild :: ( PP_Doc ),childTypes_Syn_EChild :: (Map Identifier Type),childintros_Syn_EChild :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))),datatype_Syn_EChild :: PP_Doc,terminaldefs_Syn_EChild :: (Set String)}+wrap_EChild :: T_EChild ->+ Inh_EChild ->+ Syn_EChild+wrap_EChild (T_EChild sem) (Inh_EChild _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks) =+ (let ( _lhsOargnamesw,_lhsOargpats,_lhsOargtps,_lhsOchildTypes,_lhsOchildintros,_lhsOdatatype,_lhsOterminaldefs) = sem _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks+ in (Syn_EChild _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs))+sem_EChild_EChild :: Identifier ->+ Type ->+ ChildKind ->+ Bool ->+ (Maybe [Identifier]) ->+ Bool ->+ T_EChild+sem_EChild_EChild name_ tp_ kind_ hasAround_ merges_ isMerged_ =+ (T_EChild (\ _lhsIallInitStates+ _lhsIcon+ _lhsIimportBlocks+ _lhsImainFile+ _lhsImainName+ _lhsImoduleHeader+ _lhsInt+ _lhsIoptions+ _lhsIpragmaBlocks+ _lhsItextBlocks ->+ (let _lhsOdatatype :: PP_Doc+ _lhsOargnamesw :: ( PP_Doc )+ _lhsOargtps :: ( PP_Doc )+ _lhsOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))+ _lhsOchildTypes :: (Map Identifier Type)+ _lhsOterminaldefs :: (Set String)+ _lhsOargpats :: ( PP_Doc )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 204, column 7)+ _tpDoc =+ ({-# LINE 204 "src-ag/ExecutionPlan2Hs.ag" #-}+ _addStrict $ pp_parens $ ppTp $ removeDeforested tp_+ {-# LINE 441 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 205, column 7)+ _strNm =+ ({-# LINE 205 "src-ag/ExecutionPlan2Hs.ag" #-}+ recordFieldname _lhsInt _lhsIcon name_+ {-# LINE 447 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 206, column 7)+ _field =+ ({-# LINE 206 "src-ag/ExecutionPlan2Hs.ag" #-}+ if dataRecords _lhsIoptions+ then _strNm >#< "::" >#< _tpDoc+ else _tpDoc+ {-# LINE 455 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 209, column 7)+ _addStrict =+ ({-# LINE 209 "src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if strictData _lhsIoptions then "!" >|< x else x+ {-# LINE 461 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 210, column 13)+ _lhsOdatatype =+ ({-# LINE 210 "src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ ChildAttr -> empty+ _ -> _field+ {-# LINE 469 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 301, column 12)+ _lhsOargnamesw =+ ({-# LINE 301 "src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ ChildSyntax -> "(" >#< "sem_" >|< _nt >#< name_ >|< "_" >#< ")"+ ChildAttr -> empty+ ChildReplace tp -> "(" >#< "sem_" >|< extractNonterminal tp >#< name_ >|< "_" >#< ")"+ {-# LINE 478 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 568, column 12)+ _lhsOargtps =+ ({-# LINE 568 "src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ ChildSyntax -> ppDefor tp_ >#< "->"+ ChildReplace tp -> ppDefor tp >#< "->"+ _ -> empty+ {-# LINE 487 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 572, column 12)+ _argpats =+ ({-# LINE 572 "src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ ChildSyntax -> name_ >|< "_"+ ChildReplace _ -> name_ >|< "_"+ _ -> empty+ {-# LINE 496 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 900, column 12)+ _lhsOchildintros =+ ({-# LINE 900 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ _introcode+ {-# LINE 502 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 901, column 12)+ _isDefor =+ ({-# LINE 901 "src-ag/ExecutionPlan2Hs.ag" #-}+ case tp_ of+ NT _ _ defor -> defor+ _ -> False+ {-# LINE 510 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 904, column 12)+ _valcode =+ ({-# LINE 904 "src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ ChildSyntax -> name_ >|< "_"+ ChildAttr ->+ let prefix | not _isDefor = if lateHigherOrderBinding _lhsIoptions+ then lateSemNtLabel _nt >#< lhsname True idLateBindingAttr+ else "sem_" >|< _nt+ | otherwise = empty+ in pp_parens (prefix >#< instname name_)+ ChildReplace _ ->+ pp_parens (instname name_ >#< name_ >|< "_")+ {-# LINE 525 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 915, column 12)+ _aroundcode =+ ({-# LINE 915 "src-ag/ExecutionPlan2Hs.ag" #-}+ if hasAround_+ then locname name_ >|< "_around"+ else empty+ {-# LINE 533 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 918, column 12)+ _introcode =+ ({-# LINE 918 "src-ag/ExecutionPlan2Hs.ag" #-}+ \kind fmtMode ->+ let pat = text $ stname name_ _initSt+ patStrict = _addbang pat+ attach = "attach_T_" >|< _nt >#< pp_parens (_aroundcode >#< _valcode )+ runAttach = unMon _lhsIoptions >#< pp_parens attach+ decl = case kind of+ VisitPure False -> pat >#< "=" >#< runAttach+ VisitPure True -> patStrict >#< "=" >#< runAttach+ VisitMonadic -> patStrict >#< "<-" >#< attach+ in if compatibleAttach kind _nt _lhsIoptions+ then Right ( fmtDecl False fmtMode decl+ , Set.singleton (stname name_ _initSt )+ , case kind_ of+ ChildAttr -> Map.insert (instname name_) Nothing $+ ( if _isDefor || not (lateHigherOrderBinding _lhsIoptions)+ then id+ else Map.insert (lhsname True idLateBindingAttr) (Just $ AttrInh _LHS idLateBindingAttr)+ ) $+ ( if hasAround_+ then Map.insert (locname (name_) ++ "_around") Nothing+ else id+ ) $ Map.empty+ ChildReplace _ -> Map.singleton (instname name_) Nothing+ ChildSyntax -> Map.empty+ )+ else Left $ IncompatibleAttachKind name_ kind+ {-# LINE 564 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 944, column 12)+ _nt =+ ({-# LINE 944 "src-ag/ExecutionPlan2Hs.ag" #-}+ extractNonterminal tp_+ {-# LINE 570 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1518, column 37)+ _addbang =+ ({-# LINE 1518 "src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 576 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1570, column 3)+ _lhsOchildTypes =+ ({-# LINE 1570 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ tp_+ {-# LINE 582 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1614, column 3)+ _initSt =+ ({-# LINE 1614 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault (error "nonterminal not in allInitStates map") _nt _lhsIallInitStates+ {-# LINE 588 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1284, column 42)+ _lhsOterminaldefs =+ ({-# LINE 1284 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.empty+ {-# LINE 594 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (from local)+ _lhsOargpats =+ ({-# LINE 563 "src-ag/ExecutionPlan2Hs.ag" #-}+ _argpats+ {-# LINE 600 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOargnamesw,_lhsOargpats,_lhsOargtps,_lhsOchildTypes,_lhsOchildintros,_lhsOdatatype,_lhsOterminaldefs))))+sem_EChild_ETerm :: Identifier ->+ Type ->+ T_EChild+sem_EChild_ETerm name_ tp_ =+ (T_EChild (\ _lhsIallInitStates+ _lhsIcon+ _lhsIimportBlocks+ _lhsImainFile+ _lhsImainName+ _lhsImoduleHeader+ _lhsInt+ _lhsIoptions+ _lhsIpragmaBlocks+ _lhsItextBlocks ->+ (let _lhsOdatatype :: PP_Doc+ _lhsOargnamesw :: ( PP_Doc )+ _lhsOargtps :: ( PP_Doc )+ _lhsOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))+ _lhsOterminaldefs :: (Set String)+ _lhsOchildTypes :: (Map Identifier Type)+ _lhsOargpats :: ( PP_Doc )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 204, column 7)+ _tpDoc =+ ({-# LINE 204 "src-ag/ExecutionPlan2Hs.ag" #-}+ _addStrict $ pp_parens $ ppTp $ removeDeforested tp_+ {-# LINE 628 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 205, column 7)+ _strNm =+ ({-# LINE 205 "src-ag/ExecutionPlan2Hs.ag" #-}+ recordFieldname _lhsInt _lhsIcon name_+ {-# LINE 634 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 206, column 7)+ _field =+ ({-# LINE 206 "src-ag/ExecutionPlan2Hs.ag" #-}+ if dataRecords _lhsIoptions+ then _strNm >#< "::" >#< _tpDoc+ else _tpDoc+ {-# LINE 642 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 209, column 7)+ _addStrict =+ ({-# LINE 209 "src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if strictData _lhsIoptions then "!" >|< x else x+ {-# LINE 648 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 214, column 13)+ _lhsOdatatype =+ ({-# LINE 214 "src-ag/ExecutionPlan2Hs.ag" #-}+ _field+ {-# LINE 654 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 305, column 12)+ _lhsOargnamesw =+ ({-# LINE 305 "src-ag/ExecutionPlan2Hs.ag" #-}+ text $ fieldname name_+ {-# LINE 660 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 576, column 12)+ _lhsOargtps =+ ({-# LINE 576 "src-ag/ExecutionPlan2Hs.ag" #-}+ (pp_parens $ show tp_) >#< "->"+ {-# LINE 666 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 577, column 12)+ _argpats =+ ({-# LINE 577 "src-ag/ExecutionPlan2Hs.ag" #-}+ _addbang $ text $ fieldname name_+ {-# LINE 672 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 899, column 12)+ _lhsOchildintros =+ ({-# LINE 899 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ (\_ _ -> Right (empty, Set.empty, Map.empty))+ {-# LINE 678 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1287, column 3)+ _lhsOterminaldefs =+ ({-# LINE 1287 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.singleton $ fieldname name_+ {-# LINE 684 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1519, column 37)+ _addbang =+ ({-# LINE 1519 "src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 690 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1570, column 3)+ _lhsOchildTypes =+ ({-# LINE 1570 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ tp_+ {-# LINE 696 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (from local)+ _lhsOargpats =+ ({-# LINE 563 "src-ag/ExecutionPlan2Hs.ag" #-}+ _argpats+ {-# LINE 702 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOargnamesw,_lhsOargpats,_lhsOargtps,_lhsOchildTypes,_lhsOchildintros,_lhsOdatatype,_lhsOterminaldefs))))+-- EChildren ---------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allInitStates : Map NontermIdent Int+ con : ConstructorIdent+ importBlocks : PP_Doc+ mainFile : String+ mainName : String+ moduleHeader : String -> String -> String -> Bool -> String+ nt : NontermIdent+ options : Options+ pragmaBlocks : String+ textBlocks : PP_Doc+ synthesized attributes:+ argnamesw : [PP_Doc]+ argpats : [PP_Doc] + argtps : [PP_Doc] + childTypes : Map Identifier Type+ childintros : Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ datatype : [PP_Doc]+ terminaldefs : Set String+ alternatives:+ alternative Cons:+ child hd : EChild + child tl : EChildren + alternative Nil:+-}+-- cata+sem_EChildren :: EChildren ->+ T_EChildren+sem_EChildren list =+ (Prelude.foldr sem_EChildren_Cons sem_EChildren_Nil (Prelude.map sem_EChild list))+-- semantic domain+newtype T_EChildren = T_EChildren ((Map NontermIdent Int) ->+ ConstructorIdent ->+ PP_Doc ->+ String ->+ String ->+ (String -> String -> String -> Bool -> String) ->+ NontermIdent ->+ Options ->+ String ->+ PP_Doc ->+ ( ([PP_Doc]),( [PP_Doc] ),( [PP_Doc] ),(Map Identifier Type),(Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))),([PP_Doc]),(Set String)))+data Inh_EChildren = Inh_EChildren {allInitStates_Inh_EChildren :: (Map NontermIdent Int),con_Inh_EChildren :: ConstructorIdent,importBlocks_Inh_EChildren :: PP_Doc,mainFile_Inh_EChildren :: String,mainName_Inh_EChildren :: String,moduleHeader_Inh_EChildren :: (String -> String -> String -> Bool -> String),nt_Inh_EChildren :: NontermIdent,options_Inh_EChildren :: Options,pragmaBlocks_Inh_EChildren :: String,textBlocks_Inh_EChildren :: PP_Doc}+data Syn_EChildren = Syn_EChildren {argnamesw_Syn_EChildren :: ([PP_Doc]),argpats_Syn_EChildren :: ( [PP_Doc] ),argtps_Syn_EChildren :: ( [PP_Doc] ),childTypes_Syn_EChildren :: (Map Identifier Type),childintros_Syn_EChildren :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))),datatype_Syn_EChildren :: ([PP_Doc]),terminaldefs_Syn_EChildren :: (Set String)}+wrap_EChildren :: T_EChildren ->+ Inh_EChildren ->+ Syn_EChildren+wrap_EChildren (T_EChildren sem) (Inh_EChildren _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks) =+ (let ( _lhsOargnamesw,_lhsOargpats,_lhsOargtps,_lhsOchildTypes,_lhsOchildintros,_lhsOdatatype,_lhsOterminaldefs) = sem _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks+ in (Syn_EChildren _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs))+sem_EChildren_Cons :: T_EChild ->+ T_EChildren ->+ T_EChildren+sem_EChildren_Cons (T_EChild hd_) (T_EChildren tl_) =+ (T_EChildren (\ _lhsIallInitStates+ _lhsIcon+ _lhsIimportBlocks+ _lhsImainFile+ _lhsImainName+ _lhsImoduleHeader+ _lhsInt+ _lhsIoptions+ _lhsIpragmaBlocks+ _lhsItextBlocks ->+ (let _lhsOargnamesw :: ([PP_Doc])+ _lhsOargpats :: ( [PP_Doc] )+ _lhsOargtps :: ( [PP_Doc] )+ _lhsOchildTypes :: (Map Identifier Type)+ _lhsOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))+ _lhsOdatatype :: ([PP_Doc])+ _lhsOterminaldefs :: (Set String)+ _hdOallInitStates :: (Map NontermIdent Int)+ _hdOcon :: ConstructorIdent+ _hdOimportBlocks :: PP_Doc+ _hdOmainFile :: String+ _hdOmainName :: String+ _hdOmoduleHeader :: (String -> String -> String -> Bool -> String)+ _hdOnt :: NontermIdent+ _hdOoptions :: Options+ _hdOpragmaBlocks :: String+ _hdOtextBlocks :: PP_Doc+ _tlOallInitStates :: (Map NontermIdent Int)+ _tlOcon :: ConstructorIdent+ _tlOimportBlocks :: PP_Doc+ _tlOmainFile :: String+ _tlOmainName :: String+ _tlOmoduleHeader :: (String -> String -> String -> Bool -> String)+ _tlOnt :: NontermIdent+ _tlOoptions :: Options+ _tlOpragmaBlocks :: String+ _tlOtextBlocks :: PP_Doc+ _hdIargnamesw :: ( PP_Doc )+ _hdIargpats :: ( PP_Doc )+ _hdIargtps :: ( PP_Doc )+ _hdIchildTypes :: (Map Identifier Type)+ _hdIchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))+ _hdIdatatype :: PP_Doc+ _hdIterminaldefs :: (Set String)+ _tlIargnamesw :: ([PP_Doc])+ _tlIargpats :: ( [PP_Doc] )+ _tlIargtps :: ( [PP_Doc] )+ _tlIchildTypes :: (Map Identifier Type)+ _tlIchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))+ _tlIdatatype :: ([PP_Doc])+ _tlIterminaldefs :: (Set String)+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 298, column 32)+ _lhsOargnamesw =+ ({-# LINE 298 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIargnamesw : _tlIargnamesw+ {-# LINE 817 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 565, column 30)+ _lhsOargpats =+ ({-# LINE 565 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIargpats : _tlIargpats+ {-# LINE 823 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 564, column 30)+ _lhsOargtps =+ ({-# LINE 564 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIargtps : _tlIargtps+ {-# LINE 829 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1563, column 40)+ _lhsOchildTypes =+ ({-# LINE 1563 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIchildTypes `mappend` _tlIchildTypes+ {-# LINE 835 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 890, column 41)+ _lhsOchildintros =+ ({-# LINE 890 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIchildintros `Map.union` _tlIchildintros+ {-# LINE 841 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 199, column 31)+ _lhsOdatatype =+ ({-# LINE 199 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIdatatype : _tlIdatatype+ {-# LINE 847 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1284, column 42)+ _lhsOterminaldefs =+ ({-# LINE 1284 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIterminaldefs `Set.union` _tlIterminaldefs+ {-# LINE 853 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallInitStates =+ ({-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInitStates+ {-# LINE 859 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOcon =+ ({-# LINE 66 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIcon+ {-# LINE 865 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOimportBlocks =+ ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIimportBlocks+ {-# LINE 871 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOmainFile =+ ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainFile+ {-# LINE 877 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOmainName =+ ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainName+ {-# LINE 883 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOmoduleHeader =+ ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImoduleHeader+ {-# LINE 889 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsInt+ {-# LINE 895 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 901 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOpragmaBlocks =+ ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 907 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOtextBlocks =+ ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsItextBlocks+ {-# LINE 913 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallInitStates =+ ({-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInitStates+ {-# LINE 919 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOcon =+ ({-# LINE 66 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIcon+ {-# LINE 925 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOimportBlocks =+ ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIimportBlocks+ {-# LINE 931 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOmainFile =+ ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainFile+ {-# LINE 937 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOmainName =+ ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainName+ {-# LINE 943 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOmoduleHeader =+ ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImoduleHeader+ {-# LINE 949 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsInt+ {-# LINE 955 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 961 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOpragmaBlocks =+ ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 967 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOtextBlocks =+ ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsItextBlocks+ {-# LINE 973 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _hdIargnamesw,_hdIargpats,_hdIargtps,_hdIchildTypes,_hdIchildintros,_hdIdatatype,_hdIterminaldefs) =+ hd_ _hdOallInitStates _hdOcon _hdOimportBlocks _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnt _hdOoptions _hdOpragmaBlocks _hdOtextBlocks+ ( _tlIargnamesw,_tlIargpats,_tlIargtps,_tlIchildTypes,_tlIchildintros,_tlIdatatype,_tlIterminaldefs) =+ tl_ _tlOallInitStates _tlOcon _tlOimportBlocks _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnt _tlOoptions _tlOpragmaBlocks _tlOtextBlocks+ in ( _lhsOargnamesw,_lhsOargpats,_lhsOargtps,_lhsOchildTypes,_lhsOchildintros,_lhsOdatatype,_lhsOterminaldefs))))+sem_EChildren_Nil :: T_EChildren+sem_EChildren_Nil =+ (T_EChildren (\ _lhsIallInitStates+ _lhsIcon+ _lhsIimportBlocks+ _lhsImainFile+ _lhsImainName+ _lhsImoduleHeader+ _lhsInt+ _lhsIoptions+ _lhsIpragmaBlocks+ _lhsItextBlocks ->+ (let _lhsOargnamesw :: ([PP_Doc])+ _lhsOargpats :: ( [PP_Doc] )+ _lhsOargtps :: ( [PP_Doc] )+ _lhsOchildTypes :: (Map Identifier Type)+ _lhsOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))+ _lhsOdatatype :: ([PP_Doc])+ _lhsOterminaldefs :: (Set String)+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 298, column 32)+ _lhsOargnamesw =+ ({-# LINE 298 "src-ag/ExecutionPlan2Hs.ag" #-}+ []+ {-# LINE 1003 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 565, column 30)+ _lhsOargpats =+ ({-# LINE 565 "src-ag/ExecutionPlan2Hs.ag" #-}+ []+ {-# LINE 1009 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 564, column 30)+ _lhsOargtps =+ ({-# LINE 564 "src-ag/ExecutionPlan2Hs.ag" #-}+ []+ {-# LINE 1015 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1563, column 40)+ _lhsOchildTypes =+ ({-# LINE 1563 "src-ag/ExecutionPlan2Hs.ag" #-}+ mempty+ {-# LINE 1021 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 890, column 41)+ _lhsOchildintros =+ ({-# LINE 890 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 1027 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 199, column 31)+ _lhsOdatatype =+ ({-# LINE 199 "src-ag/ExecutionPlan2Hs.ag" #-}+ []+ {-# LINE 1033 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1284, column 42)+ _lhsOterminaldefs =+ ({-# LINE 1284 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.empty+ {-# LINE 1039 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOargnamesw,_lhsOargpats,_lhsOargtps,_lhsOchildTypes,_lhsOchildintros,_lhsOdatatype,_lhsOterminaldefs))))+-- ENonterminal ------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allFromToStates : Map VisitIdentifier (Int,Int)+ allInitStates : Map NontermIdent Int+ allVisitKinds : Map VisitIdentifier VisitKind+ allchildvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ avisitdefs : Map VisitIdentifier (Set Identifier)+ avisituses : Map VisitIdentifier (Set Identifier)+ derivings : Derivings+ importBlocks : PP_Doc+ inhmap : Map NontermIdent Attributes+ localAttrTypes : Map NontermIdent (Map ConstructorIdent (Map Identifier Type))+ mainFile : String+ mainName : String+ moduleHeader : String -> String -> String -> Bool -> String+ options : Options+ pragmaBlocks : String+ synmap : Map NontermIdent Attributes+ textBlocks : PP_Doc+ typeSyns : TypeSyns+ wrappers : Set NontermIdent+ synthesized attributes:+ appendCommon : PP_Doc + appendMain : PP_Doc + childvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ errors : Seq Error+ fromToStates : Map VisitIdentifier (Int,Int)+ genProdIO : IO ()+ imports : [PP_Doc]+ initStates : Map NontermIdent Int+ output : PP_Doc+ semFunBndDefs : Seq PP_Doc+ semFunBndTps : Seq PP_Doc+ visitKinds : Map VisitIdentifier VisitKind+ visitdefs : Map VisitIdentifier (Set Identifier)+ visituses : Map VisitIdentifier (Set Identifier)+ alternatives:+ alternative ENonterminal:+ child nt : {NontermIdent}+ child params : {[Identifier]}+ child classCtxs : {ClassContext}+ child initial : {StateIdentifier}+ child initialv : {Maybe VisitIdentifier}+ child nextVisits : {Map StateIdentifier StateCtx}+ child prevVisits : {Map StateIdentifier StateCtx}+ child prods : EProductions + child recursive : {Bool}+ child hoInfo : {HigherOrderInfo}+ visit 0:+ local hasWrapper : _+ local classPP : _+ local aliasPre : _+ local datatype : _+ local derivings : _+ local fsemname : _+ local semname : _+ local frecarg : _+ local sem_tp : _+ local quantPP : _+ local sem_nt : _+ local inlineNt : _+ local semPragma : _+ local outedges : _+ local inedges : _+ local allstates : _+ local stvisits : _+ local t_type : _+ local t_params : _+ local t_init : _+ local t_states : _+ local k_type : _+ local k_states : _+ local wr_inh : _+ local wr_syn : _+ local genwrap : _+ local synAttrs : _+ local wr_inhs : _+ local wr_inhs1 : _+ local wr_filter : _+ local wr_syns : _+ local inhlist : _+ local inhlist1 : _+ local synlist : _+ local wrapname : _+ local inhname : _+ local synname : _+ local firstVisitInfo : _+ local wrapper : _+ local wrapPragma : _+ local semFunBndDef : _+ local semFunBndTp : _+ local semFunBndNm : _+ local addbang : _+ local addbangWrap : _+ local ntType : _+-}+-- cata+sem_ENonterminal :: ENonterminal ->+ T_ENonterminal+sem_ENonterminal (ENonterminal _nt _params _classCtxs _initial _initialv _nextVisits _prevVisits _prods _recursive _hoInfo) =+ (sem_ENonterminal_ENonterminal _nt _params _classCtxs _initial _initialv _nextVisits _prevVisits (sem_EProductions _prods) _recursive _hoInfo)+-- semantic domain+newtype T_ENonterminal = T_ENonterminal ((Map VisitIdentifier (Int,Int)) ->+ (Map NontermIdent Int) ->+ (Map VisitIdentifier VisitKind) ->+ (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ (Map VisitIdentifier (Set Identifier)) ->+ (Map VisitIdentifier (Set Identifier)) ->+ Derivings ->+ PP_Doc ->+ (Map NontermIdent Attributes) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->+ String ->+ String ->+ (String -> String -> String -> Bool -> String) ->+ Options ->+ String ->+ (Map NontermIdent Attributes) ->+ PP_Doc ->+ TypeSyns ->+ (Set NontermIdent) ->+ ( ( PP_Doc ),( PP_Doc ),(Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),(Seq Error),(Map VisitIdentifier (Int,Int)),(IO ()),([PP_Doc]),(Map NontermIdent Int),PP_Doc,(Seq PP_Doc),(Seq PP_Doc),(Map VisitIdentifier VisitKind),(Map VisitIdentifier (Set Identifier)),(Map VisitIdentifier (Set Identifier))))+data Inh_ENonterminal = Inh_ENonterminal {allFromToStates_Inh_ENonterminal :: (Map VisitIdentifier (Int,Int)),allInitStates_Inh_ENonterminal :: (Map NontermIdent Int),allVisitKinds_Inh_ENonterminal :: (Map VisitIdentifier VisitKind),allchildvisit_Inh_ENonterminal :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),avisitdefs_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)),avisituses_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)),derivings_Inh_ENonterminal :: Derivings,importBlocks_Inh_ENonterminal :: PP_Doc,inhmap_Inh_ENonterminal :: (Map NontermIdent Attributes),localAttrTypes_Inh_ENonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))),mainFile_Inh_ENonterminal :: String,mainName_Inh_ENonterminal :: String,moduleHeader_Inh_ENonterminal :: (String -> String -> String -> Bool -> String),options_Inh_ENonterminal :: Options,pragmaBlocks_Inh_ENonterminal :: String,synmap_Inh_ENonterminal :: (Map NontermIdent Attributes),textBlocks_Inh_ENonterminal :: PP_Doc,typeSyns_Inh_ENonterminal :: TypeSyns,wrappers_Inh_ENonterminal :: (Set NontermIdent)}+data Syn_ENonterminal = Syn_ENonterminal {appendCommon_Syn_ENonterminal :: ( PP_Doc ),appendMain_Syn_ENonterminal :: ( PP_Doc ),childvisit_Syn_ENonterminal :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),errors_Syn_ENonterminal :: (Seq Error),fromToStates_Syn_ENonterminal :: (Map VisitIdentifier (Int,Int)),genProdIO_Syn_ENonterminal :: (IO ()),imports_Syn_ENonterminal :: ([PP_Doc]),initStates_Syn_ENonterminal :: (Map NontermIdent Int),output_Syn_ENonterminal :: PP_Doc,semFunBndDefs_Syn_ENonterminal :: (Seq PP_Doc),semFunBndTps_Syn_ENonterminal :: (Seq PP_Doc),visitKinds_Syn_ENonterminal :: (Map VisitIdentifier VisitKind),visitdefs_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier)),visituses_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier))}+wrap_ENonterminal :: T_ENonterminal ->+ Inh_ENonterminal ->+ Syn_ENonterminal+wrap_ENonterminal (T_ENonterminal sem) (Inh_ENonterminal _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers) =+ (let ( _lhsOappendCommon,_lhsOappendMain,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOinitStates,_lhsOoutput,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses) = sem _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers+ in (Syn_ENonterminal _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses))+sem_ENonterminal_ENonterminal :: NontermIdent ->+ ([Identifier]) ->+ ClassContext ->+ StateIdentifier ->+ (Maybe VisitIdentifier) ->+ (Map StateIdentifier StateCtx) ->+ (Map StateIdentifier StateCtx) ->+ T_EProductions ->+ Bool ->+ HigherOrderInfo ->+ T_ENonterminal+sem_ENonterminal_ENonterminal nt_ params_ classCtxs_ initial_ initialv_ nextVisits_ prevVisits_ (T_EProductions prods_) recursive_ hoInfo_ =+ (T_ENonterminal (\ _lhsIallFromToStates+ _lhsIallInitStates+ _lhsIallVisitKinds+ _lhsIallchildvisit+ _lhsIavisitdefs+ _lhsIavisituses+ _lhsIderivings+ _lhsIimportBlocks+ _lhsIinhmap+ _lhsIlocalAttrTypes+ _lhsImainFile+ _lhsImainName+ _lhsImoduleHeader+ _lhsIoptions+ _lhsIpragmaBlocks+ _lhsIsynmap+ _lhsItextBlocks+ _lhsItypeSyns+ _lhsIwrappers ->+ (let _prodsOrename :: Bool+ _prodsOnt :: NontermIdent+ _prodsOparams :: ([Identifier])+ _prodsOclassCtxs :: ClassContext+ _lhsOoutput :: PP_Doc+ _prodsOinhmap :: Attributes+ _prodsOsynmap :: Attributes+ _prodsOallInhmap :: (Map NontermIdent Attributes)+ _prodsOallSynmap :: (Map NontermIdent Attributes)+ _lhsOsemFunBndDefs :: (Seq PP_Doc)+ _lhsOsemFunBndTps :: (Seq PP_Doc)+ _prodsOinitial :: StateIdentifier+ _prodsOallstates :: (Set StateIdentifier)+ _lhsOappendMain :: ( PP_Doc )+ _lhsOappendCommon :: ( PP_Doc )+ _prodsOnextVisits :: (Map StateIdentifier StateCtx)+ _prodsOprevVisits :: (Map StateIdentifier StateCtx)+ _prodsOlocalAttrTypes :: (Map ConstructorIdent (Map Identifier Type))+ _lhsOinitStates :: (Map NontermIdent Int)+ _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _lhsOerrors :: (Seq Error)+ _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))+ _lhsOgenProdIO :: (IO ())+ _lhsOimports :: ([PP_Doc])+ _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)+ _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))+ _prodsOallFromToStates :: (Map VisitIdentifier (Int,Int))+ _prodsOallInitStates :: (Map NontermIdent Int)+ _prodsOallVisitKinds :: (Map VisitIdentifier VisitKind)+ _prodsOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _prodsOavisitdefs :: (Map VisitIdentifier (Set Identifier))+ _prodsOavisituses :: (Map VisitIdentifier (Set Identifier))+ _prodsOimportBlocks :: PP_Doc+ _prodsOmainFile :: String+ _prodsOmainName :: String+ _prodsOmoduleHeader :: (String -> String -> String -> Bool -> String)+ _prodsOntType :: Type+ _prodsOoptions :: Options+ _prodsOpragmaBlocks :: String+ _prodsOtextBlocks :: PP_Doc+ _prodsIallvisits :: ([VisitStateState])+ _prodsIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _prodsIcount :: Int+ _prodsIdatatype :: ([PP_Doc])+ _prodsIerrors :: (Seq Error)+ _prodsIfromToStates :: (Map VisitIdentifier (Int,Int))+ _prodsIgenProdIO :: (IO ())+ _prodsIimports :: ([PP_Doc])+ _prodsIsemFunBndDefs :: (Seq PP_Doc)+ _prodsIsemFunBndTps :: (Seq PP_Doc)+ _prodsIsem_nt :: PP_Doc+ _prodsIsem_prod :: PP_Doc+ _prodsIt_visits :: PP_Doc+ _prodsIvisitKinds :: (Map VisitIdentifier VisitKind)+ _prodsIvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _prodsIvisituses :: (Map VisitIdentifier (Set Identifier))+ -- "src-ag/ExecutionPlan2Hs.ag"(line 55, column 18)+ _prodsOrename =+ ({-# LINE 55 "src-ag/ExecutionPlan2Hs.ag" #-}+ rename _lhsIoptions+ {-# LINE 1266 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 63, column 18)+ _prodsOnt =+ ({-# LINE 63 "src-ag/ExecutionPlan2Hs.ag" #-}+ nt_+ {-# LINE 1272 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 75, column 3)+ _prodsOparams =+ ({-# LINE 75 "src-ag/ExecutionPlan2Hs.ag" #-}+ params_+ {-# LINE 1278 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 79, column 3)+ _prodsOclassCtxs =+ ({-# LINE 79 "src-ag/ExecutionPlan2Hs.ag" #-}+ classCtxs_+ {-# LINE 1284 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 96, column 18)+ _lhsOoutput =+ ({-# LINE 96 "src-ag/ExecutionPlan2Hs.ag" #-}+ ("-- " ++ getName nt_ ++ " " ++ replicate (60 - length (getName nt_)) '-')+ >-< (if dataTypes _lhsIoptions+ then "-- data"+ >-< _datatype+ >-< ""+ else empty)+ >-< (if _hasWrapper+ then "-- wrapper"+ >-< _wr_inh+ >-< _wr_syn+ >-< _wrapper+ >-< ""+ else empty)+ >-< (if folds _lhsIoptions+ then "-- cata"+ >-< _sem_nt+ >-< ""+ else empty)+ >-< (if semfuns _lhsIoptions+ then "-- semantic domain"+ >-< _t_init+ >-< _t_states+ >-< _k_states+ >-< _prodsIt_visits+ >-< _prodsIsem_prod+ >-< ""+ else empty)+ {-# LINE 1316 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 123, column 18)+ _hasWrapper =+ ({-# LINE 123 "src-ag/ExecutionPlan2Hs.ag" #-}+ nt_ `Set.member` _lhsIwrappers+ {-# LINE 1322 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 136, column 18)+ _classPP =+ ({-# LINE 136 "src-ag/ExecutionPlan2Hs.ag" #-}+ ppClasses $ classCtxsToDocs classCtxs_+ {-# LINE 1328 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 137, column 18)+ _aliasPre =+ ({-# LINE 137 "src-ag/ExecutionPlan2Hs.ag" #-}+ "type" >#< _classPP >#< nt_ >#< _t_params >#< "="+ {-# LINE 1334 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 138, column 18)+ _datatype =+ ({-# LINE 138 "src-ag/ExecutionPlan2Hs.ag" #-}+ case lookup nt_ _lhsItypeSyns of+ Nothing -> "data" >#< _classPP >#< nt_ >#< _t_params+ >-< ( if null _prodsIdatatype+ then empty+ else indent 2 $ vlist $ ( ("=" >#< head _prodsIdatatype)+ : (map ("|" >#<) $ tail _prodsIdatatype))+ )+ >-< indent 2 _derivings+ Just (List t) -> _aliasPre >#< "[" >#< show t >#< "]"+ Just (Maybe t) -> _aliasPre >#< "Maybe" >#< show t+ Just (Tuple ts) -> _aliasPre >#< pp_parens (ppCommas $ map (show . snd) ts)+ Just (Either l r) -> _aliasPre >#< "Either" >#< show l >#< show r+ Just (Map k v) -> _aliasPre >#< "Data.Map" >#< pp_parens (show k) >#< show v+ Just (IntMap t) -> _aliasPre >#< "Data.IntMap.IntMap" >#< show t+ Just (OrdSet t) -> _aliasPre >#< "Data.Set.Set" >#< show t+ Just IntSet -> _aliasPre >#< "Data.IntSet.IntSet"+ {-# LINE 1355 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 155, column 18)+ _derivings =+ ({-# LINE 155 "src-ag/ExecutionPlan2Hs.ag" #-}+ case Map.lookup nt_ _lhsIderivings of+ Nothing -> empty+ Just s -> if Set.null s+ then empty+ else "deriving" >#< (pp_parens $ ppCommas $ map pp $ Set.toList s)+ {-# LINE 1365 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 228, column 18)+ _fsemname =+ ({-# LINE 228 "src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> "sem_" ++ show x+ {-# LINE 1371 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 229, column 18)+ _semname =+ ({-# LINE 229 "src-ag/ExecutionPlan2Hs.ag" #-}+ _fsemname nt_+ {-# LINE 1377 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 230, column 18)+ _frecarg =+ ({-# LINE 230 "src-ag/ExecutionPlan2Hs.ag" #-}+ \t x -> case t of+ NT nt _ _ -> pp_parens (_fsemname nt >#< x)+ _ -> pp x+ {-# LINE 1385 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 236, column 18)+ _sem_tp =+ ({-# LINE 236 "src-ag/ExecutionPlan2Hs.ag" #-}+ _quantPP >#< _classPP >#< nt_ >#< _t_params >#< "->" >#< _t_type >#< _t_params+ {-# LINE 1391 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 237, column 18)+ _quantPP =+ ({-# LINE 237 "src-ag/ExecutionPlan2Hs.ag" #-}+ ppQuants params_+ {-# LINE 1397 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 238, column 18)+ _sem_nt =+ ({-# LINE 238 "src-ag/ExecutionPlan2Hs.ag" #-}+ _semPragma+ >-< _semname >#< "::" >#< _sem_tp+ >-< case lookup nt_ _lhsItypeSyns of+ Nothing -> _prodsIsem_nt+ Just (List t) -> _semname >#< "list" >#< "=" >#< "Prelude.foldr" >#< _semname >|< "_Cons"+ >#< _semname >|< "_Nil"+ >#< case t of+ NT nt _ _ -> pp_parens ("Prelude.map" >#< _fsemname nt >#< "list")+ _ -> pp "list"+ Just (Maybe t) -> _semname >#< "Prelude.Nothing" >#< "=" >#< _semname >|< "_Nothing"+ >-< _semname >#< pp_parens ("Prelude.Just just") >#< "="+ >#< _semname >|< "_Just" >#< _frecarg t "just"+ Just (Tuple ts) -> _semname >#< pp_parens (ppCommas $ map fst ts) >#< "="+ >#< _semname >|< "_Tuple" >#< ppSpaced (map (\t -> _frecarg (snd t) (show $ fst t)) ts)+ Just (Either l r) -> _semname >#< "(Prelude.Left left)" >#< "=" >#< _semname >|< "_Left" >#< _frecarg l "left"+ >-< _semname >#< "(Prelude.Right right)" >#< "=" >#< _semname >|< "_Right" >#< _frecarg r "right"+ Just (Map k v) -> _semname >#< "m" >#< "=" >#< "Data.Map.foldrWithKey"+ >#< _semname >|< "_Entry" >#< _semname >|< "_Nil"+ >#< case v of+ NT nt _ _ -> pp_parens ("Data.Map.map" >#< _fsemname nt >#< "m")+ _ -> pp "m"+ Just (IntMap v) -> _semname >#< "m" >#< "=" >#< "Data.IntMap.foldWithKey"+ >#< _semname >|< "_Entry" >#< _semname >|< "_Nil"+ >#< case v of+ NT nt _ _ -> pp_parens ("Data.IntMap.map" >#< _fsemname nt >#< "m")+ _ -> pp "m"+ Just (OrdSet t) -> _semname >#< "s" >#< "=" >#< "Prelude.foldr" >#< _semname >|< "_Entry"+ >#< _semname >|< "_Nil"+ >#< pp_parens (+ ( case t of+ NT nt _ _ -> pp_parens ("Prelude.map" >#< _fsemname nt)+ _ -> empty+ ) >#< pp_parens ("Data.IntSet.elems" >#< "s")+ )+ Just IntSet -> _semname >#< "s" >#< "=" >#< "Prelude.foldr" >#< _semname >|< "_Entry"+ >#< _semname >|< "_Nil"+ >#< pp_parens ("Data.IntSet.elems" >#< "s")+ {-# LINE 1439 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 278, column 17)+ _inlineNt =+ ({-# LINE 278 "src-ag/ExecutionPlan2Hs.ag" #-}+ not (lateHigherOrderBinding _lhsIoptions) && not recursive_ && (_prodsIcount == 1 || (aggressiveInlinePragmas _lhsIoptions && not _hasWrapper ))+ {-# LINE 1445 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 279, column 17)+ _semPragma =+ ({-# LINE 279 "src-ag/ExecutionPlan2Hs.ag" #-}+ if noInlinePragmas _lhsIoptions+ then empty+ else if _inlineNt+ then ppInline _semname+ else if helpInlining _lhsIoptions && not (lateHigherOrderBinding _lhsIoptions)+ then ppInlinable _semname+ else ppNoInline _semname+ {-# LINE 1457 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 325, column 19)+ (Just _prodsOinhmap) =+ ({-# LINE 325 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.lookup nt_ _lhsIinhmap+ {-# LINE 1463 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 326, column 19)+ (Just _prodsOsynmap) =+ ({-# LINE 326 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.lookup nt_ _lhsIsynmap+ {-# LINE 1469 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 327, column 18)+ _prodsOallInhmap =+ ({-# LINE 327 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 1475 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 328, column 18)+ _prodsOallSynmap =+ ({-# LINE 328 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 1481 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 349, column 18)+ _outedges =+ ({-# LINE 349 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.fromList $ map (\(_,f,_) -> f) _prodsIallvisits+ {-# LINE 1487 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 350, column 18)+ _inedges =+ ({-# LINE 350 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.fromList $ map (\(_,_,t) -> t) _prodsIallvisits+ {-# LINE 1493 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 351, column 18)+ _allstates =+ ({-# LINE 351 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.insert initial_ $ _inedges `Set.union` _outedges+ {-# LINE 1499 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 352, column 18)+ _stvisits =+ ({-# LINE 352 "src-ag/ExecutionPlan2Hs.ag" #-}+ \st -> filter (\(v,f,t) -> f == st) _prodsIallvisits+ {-# LINE 1505 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 353, column 18)+ _t_type =+ ({-# LINE 353 "src-ag/ExecutionPlan2Hs.ag" #-}+ "T_" >|< nt_+ {-# LINE 1511 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 354, column 18)+ _t_params =+ ({-# LINE 354 "src-ag/ExecutionPlan2Hs.ag" #-}+ ppSpaced params_+ {-# LINE 1517 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 355, column 18)+ _t_init =+ ({-# LINE 355 "src-ag/ExecutionPlan2Hs.ag" #-}+ "newtype" >#< _t_type >#< _t_params >#< "=" >#< _t_type >#<+ pp_braces (+ "attach_">|< _t_type >#< "::"+ >#< ppMonadType _lhsIoptions >#< pp_parens (_t_type >|< "_s" >|< initial_ >#< _t_params ))+ {-# LINE 1526 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 359, column 18)+ _t_states =+ ({-# LINE 359 "src-ag/ExecutionPlan2Hs.ag" #-}+ vlist $ map (\st ->+ let nt_st = nt_ >|< "_s" >|< st+ t_st = "T_" >|< nt_st+ k_st = "K_" >|< nt_st+ c_st = "C_" >|< nt_st+ inv_st = "inv_" >|< nt_st+ nextVisit = Map.findWithDefault ManyVis st nextVisits_+ in case nextVisit of+ NoneVis -> "data" >#< t_st >#< _t_params >#< "=" >#< c_st+ OneVis vId -> "newtype" >#< t_st >#< _t_params >#< "=" >#< c_st+ >#< (pp_braces $ inv_st >#< "::" >#< pp_parens (conNmTVisit nt_ vId >#< _t_params ))+ ManyVis -> "data" >#< t_st >#< _t_params >#< "where" >#< c_st >#< "::"+ >#< (pp_braces $ inv_st >#< "::" >#< "!" >|< pp_parens ("forall t." >#< k_st >#< _t_params >#< "t" >#< "->" >#< "t"))+ >#< "->" >#< t_st >#< _t_params+ ) $ Set.toList _allstates+ {-# LINE 1546 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 377, column 18)+ _k_type =+ ({-# LINE 377 "src-ag/ExecutionPlan2Hs.ag" #-}+ "K_" ++ show nt_+ {-# LINE 1552 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 378, column 18)+ _k_states =+ ({-# LINE 378 "src-ag/ExecutionPlan2Hs.ag" #-}+ vlist $ map (\st ->+ let nt_st = nt_ >|< "_s" >|< st+ k_st = "K_" >|< nt_st+ outg = filter (\(v,f,t) -> f == st) _prodsIallvisits+ visitlist = vlist $ map (\(v,f,t) ->+ _k_type >|< "_v" >|< v >#< "::" >#< k_st >#< _t_params >#< pp_parens (_t_type >|< "_v" >|< v >#< _t_params )+ ) outg+ nextVisit = Map.findWithDefault ManyVis st nextVisits_+ decl = "data" >#< k_st >#< "k" >#< _t_params >#< "where" >-< indent 3 visitlist+ in case nextVisit of+ NoneVis -> empty+ OneVis _ -> empty+ ManyVis -> decl+ ) $ Set.toList _allstates+ {-# LINE 1571 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 445, column 18)+ _wr_inh =+ ({-# LINE 445 "src-ag/ExecutionPlan2Hs.ag" #-}+ _genwrap "Inh" _wr_inhs+ {-# LINE 1577 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 446, column 18)+ _wr_syn =+ ({-# LINE 446 "src-ag/ExecutionPlan2Hs.ag" #-}+ _genwrap "Syn" _wr_syns+ {-# LINE 1583 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 447, column 18)+ _genwrap =+ ({-# LINE 447 "src-ag/ExecutionPlan2Hs.ag" #-}+ \nm attr -> "data" >#< nm >|< "_" >|< nt_ >#< _t_params >#< "=" >#< nm >|< "_" >|< nt_ >#< "{"+ >#< (ppCommas $ map (\(i,t) -> i >|< "_" >|< nm >|< "_" >|< nt_ >#< "::"+ >#< (_addbang $ pp_parens $ typeToHaskellString (Just nt_) [] t)) attr) >#< "}"+ {-# LINE 1591 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 450, column 18)+ _synAttrs =+ ({-# LINE 450 "src-ag/ExecutionPlan2Hs.ag" #-}+ fromJust $ Map.lookup nt_ _lhsIinhmap+ {-# LINE 1597 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 451, column 18)+ _wr_inhs =+ ({-# LINE 451 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.toList $ _wr_filter $ _synAttrs+ {-# LINE 1603 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 452, column 18)+ _wr_inhs1 =+ ({-# LINE 452 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.toList _synAttrs+ {-# LINE 1609 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 453, column 18)+ _wr_filter =+ ({-# LINE 453 "src-ag/ExecutionPlan2Hs.ag" #-}+ if kennedyWarren _lhsIoptions && lateHigherOrderBinding _lhsIoptions+ then Map.delete idLateBindingAttr+ else id+ {-# LINE 1617 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 456, column 18)+ _wr_syns =+ ({-# LINE 456 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.toList $ fromJust $ Map.lookup nt_ _lhsIsynmap+ {-# LINE 1623 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 457, column 18)+ _inhlist =+ ({-# LINE 457 "src-ag/ExecutionPlan2Hs.ag" #-}+ map (lhsname True . fst) _wr_inhs+ {-# LINE 1629 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 458, column 18)+ _inhlist1 =+ ({-# LINE 458 "src-ag/ExecutionPlan2Hs.ag" #-}+ map (lhsname True . fst) _wr_inhs1+ {-# LINE 1635 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 459, column 18)+ _synlist =+ ({-# LINE 459 "src-ag/ExecutionPlan2Hs.ag" #-}+ map (lhsname False . fst) _wr_syns+ {-# LINE 1641 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 460, column 18)+ _wrapname =+ ({-# LINE 460 "src-ag/ExecutionPlan2Hs.ag" #-}+ "wrap_" ++ show nt_+ {-# LINE 1647 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 461, column 18)+ _inhname =+ ({-# LINE 461 "src-ag/ExecutionPlan2Hs.ag" #-}+ "Inh_" ++ show nt_+ {-# LINE 1653 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 462, column 18)+ _synname =+ ({-# LINE 462 "src-ag/ExecutionPlan2Hs.ag" #-}+ "Syn_" ++ show nt_+ {-# LINE 1659 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 463, column 18)+ _firstVisitInfo =+ ({-# LINE 463 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault ManyVis initial_ nextVisits_+ {-# LINE 1665 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 464, column 18)+ _wrapper =+ ({-# LINE 464 "src-ag/ExecutionPlan2Hs.ag" #-}+ _wrapPragma+ >-< (_wrapname >#< "::" >#< _quantPP >#< _classPP >#< _t_type >#< _t_params >#< "->"+ >#< _inhname >#< _t_params >#< "->" >#< ( if monadicWrappers _lhsIoptions then ppMonadType _lhsIoptions else empty) >#< pp_parens (_synname >#< _t_params ))+ >-< (_wrapname >#< (_addbang $ pp_parens (_t_type >#< pp "act"))+ >#< (_addbang $ pp_parens (_inhname+ >#< (ppSpaced $ map (_addbangWrap . pp) _inhlist )) >#< "="))+ >-<+ indent 3 (case initialv_ of+ Nothing -> _synname >#< " { }"+ Just initv ->+ let inCon = conNmTVisitIn nt_ initv+ outCon = conNmTVisitOut nt_ initv+ pat = _addbang $ pp_parens $ pat0+ pat0 = outCon >#< ppSpaced _synlist+ arg = inCon >#< ppSpaced _inhlist1+ ind = case _firstVisitInfo of+ NoneVis -> error "wrapper: initial state should have a next visit but it has none"+ OneVis _ -> empty+ ManyVis -> _k_type >|< "_v" >|< initv+ extra = if dummyTokenVisit _lhsIoptions+ then pp $ dummyArg _lhsIoptions True+ else empty+ convert = case Map.lookup initv _lhsIallVisitKinds of+ Just kind -> case kind of+ VisitPure _ -> text "return"+ VisitMonadic -> empty+ unMonad | monadicWrappers _lhsIoptions = empty+ | otherwise = unMon _lhsIoptions+ in unMonad >#< "("+ >-< indent 2 (+ "do" >#< ( _addbang (pp "sem") >#< "<-" >#< "act"+ >-< "let" >#< _addbangWrap (pp "arg") >#< "=" >#< arg+ >-< pat >#< "<-" >#< convert >#< pp_parens ("inv_" >|< nt_ >|< "_s" >|< initial_ >#< "sem" >#< ind >#< "arg" >#< extra)+ >-< "return" >#< pp_parens (_synname >#< ppSpaced _synlist )+ )+ )+ >-< ")" )+ >-< if kennedyWarren _lhsIoptions && lateHigherOrderBinding _lhsIoptions+ then indent 2 ("where" >#< lhsname True idLateBindingAttr >#< "=" >#< lateBindingFieldNm _lhsImainName)+ else empty+ {-# LINE 1710 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 505, column 18)+ _wrapPragma =+ ({-# LINE 505 "src-ag/ExecutionPlan2Hs.ag" #-}+ if parallelInvoke _lhsIoptions && not (monadicWrappers _lhsIoptions)+ then ppNoInline _wrapname+ else if noInlinePragmas _lhsIoptions+ then empty+ else ppInlinable _wrapname+ {-# LINE 1720 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 517, column 3)+ _lhsOsemFunBndDefs =+ ({-# LINE 517 "src-ag/ExecutionPlan2Hs.ag" #-}+ _semFunBndDef Seq.<| _prodsIsemFunBndDefs+ {-# LINE 1726 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 518, column 3)+ _lhsOsemFunBndTps =+ ({-# LINE 518 "src-ag/ExecutionPlan2Hs.ag" #-}+ _semFunBndTp Seq.<| _prodsIsemFunBndTps+ {-# LINE 1732 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 519, column 3)+ _semFunBndDef =+ ({-# LINE 519 "src-ag/ExecutionPlan2Hs.ag" #-}+ _semFunBndNm >#< "=" >#< _semname+ {-# LINE 1738 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 520, column 3)+ _semFunBndTp =+ ({-# LINE 520 "src-ag/ExecutionPlan2Hs.ag" #-}+ _semFunBndNm >#< "::" >#< _sem_tp+ {-# LINE 1744 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 521, column 3)+ _semFunBndNm =+ ({-# LINE 521 "src-ag/ExecutionPlan2Hs.ag" #-}+ lateSemNtLabel nt_+ {-# LINE 1750 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 559, column 18)+ _prodsOinitial =+ ({-# LINE 559 "src-ag/ExecutionPlan2Hs.ag" #-}+ initial_+ {-# LINE 1756 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 560, column 18)+ _prodsOallstates =+ ({-# LINE 560 "src-ag/ExecutionPlan2Hs.ag" #-}+ _allstates+ {-# LINE 1762 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1450, column 18)+ _lhsOappendMain =+ ({-# LINE 1450 "src-ag/ExecutionPlan2Hs.ag" #-}+ (if nt_ `Set.member` _lhsIwrappers+ then _wr_inh+ >-< _wr_syn+ >-< _wrapper+ else empty)+ >-< _sem_nt+ {-# LINE 1773 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1456, column 18)+ _lhsOappendCommon =+ ({-# LINE 1456 "src-ag/ExecutionPlan2Hs.ag" #-}+ (if dataTypes _lhsIoptions then _datatype else empty)+ >-< _t_init+ >-< _t_states+ >-< _k_states+ >-< _prodsIt_visits+ {-# LINE 1783 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1516, column 37)+ _addbang =+ ({-# LINE 1516 "src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 1789 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1524, column 37)+ _addbangWrap =+ ({-# LINE 1524 "src-ag/ExecutionPlan2Hs.ag" #-}+ if strictWrap _lhsIoptions then _addbang else id+ {-# LINE 1795 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1536, column 3)+ _prodsOnextVisits =+ ({-# LINE 1536 "src-ag/ExecutionPlan2Hs.ag" #-}+ nextVisits_+ {-# LINE 1801 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1537, column 3)+ _prodsOprevVisits =+ ({-# LINE 1537 "src-ag/ExecutionPlan2Hs.ag" #-}+ prevVisits_+ {-# LINE 1807 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1581, column 3)+ _prodsOlocalAttrTypes =+ ({-# LINE 1581 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIlocalAttrTypes+ {-# LINE 1813 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1608, column 3)+ _lhsOinitStates =+ ({-# LINE 1608 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton nt_ initial_+ {-# LINE 1819 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1622, column 3)+ _ntType =+ ({-# LINE 1622 "src-ag/ExecutionPlan2Hs.ag" #-}+ NT nt_ (map show params_) False+ {-# LINE 1825 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1187, column 37)+ _lhsOchildvisit =+ ({-# LINE 1187 "src-ag/ExecutionPlan2Hs.ag" #-}+ _prodsIchildvisit+ {-# LINE 1831 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1629, column 132)+ _lhsOerrors =+ ({-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}+ _prodsIerrors+ {-# LINE 1837 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1544, column 22)+ _lhsOfromToStates =+ ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}+ _prodsIfromToStates+ {-# LINE 1843 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1464, column 49)+ _lhsOgenProdIO =+ ({-# LINE 1464 "src-ag/ExecutionPlan2Hs.ag" #-}+ _prodsIgenProdIO+ {-# LINE 1849 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1463, column 47)+ _lhsOimports =+ ({-# LINE 1463 "src-ag/ExecutionPlan2Hs.ag" #-}+ _prodsIimports+ {-# LINE 1855 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1591, column 68)+ _lhsOvisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _prodsIvisitKinds+ {-# LINE 1861 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1322, column 36)+ _lhsOvisitdefs =+ ({-# LINE 1322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _prodsIvisitdefs+ {-# LINE 1867 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1323, column 36)+ _lhsOvisituses =+ ({-# LINE 1323 "src-ag/ExecutionPlan2Hs.ag" #-}+ _prodsIvisituses+ {-# LINE 1873 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _prodsOallFromToStates =+ ({-# LINE 1547 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallFromToStates+ {-# LINE 1879 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _prodsOallInitStates =+ ({-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInitStates+ {-# LINE 1885 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _prodsOallVisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallVisitKinds+ {-# LINE 1891 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _prodsOallchildvisit =+ ({-# LINE 1186 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallchildvisit+ {-# LINE 1897 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _prodsOavisitdefs =+ ({-# LINE 1332 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisitdefs+ {-# LINE 1903 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _prodsOavisituses =+ ({-# LINE 1333 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisituses+ {-# LINE 1909 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _prodsOimportBlocks =+ ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIimportBlocks+ {-# LINE 1915 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _prodsOmainFile =+ ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainFile+ {-# LINE 1921 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _prodsOmainName =+ ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainName+ {-# LINE 1927 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _prodsOmoduleHeader =+ ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImoduleHeader+ {-# LINE 1933 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (from local)+ _prodsOntType =+ ({-# LINE 1620 "src-ag/ExecutionPlan2Hs.ag" #-}+ _ntType+ {-# LINE 1939 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _prodsOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 1945 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _prodsOpragmaBlocks =+ ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 1951 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _prodsOtextBlocks =+ ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsItextBlocks+ {-# LINE 1957 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _prodsIallvisits,_prodsIchildvisit,_prodsIcount,_prodsIdatatype,_prodsIerrors,_prodsIfromToStates,_prodsIgenProdIO,_prodsIimports,_prodsIsemFunBndDefs,_prodsIsemFunBndTps,_prodsIsem_nt,_prodsIsem_prod,_prodsIt_visits,_prodsIvisitKinds,_prodsIvisitdefs,_prodsIvisituses) =+ prods_ _prodsOallFromToStates _prodsOallInhmap _prodsOallInitStates _prodsOallSynmap _prodsOallVisitKinds _prodsOallchildvisit _prodsOallstates _prodsOavisitdefs _prodsOavisituses _prodsOclassCtxs _prodsOimportBlocks _prodsOinhmap _prodsOinitial _prodsOlocalAttrTypes _prodsOmainFile _prodsOmainName _prodsOmoduleHeader _prodsOnextVisits _prodsOnt _prodsOntType _prodsOoptions _prodsOparams _prodsOpragmaBlocks _prodsOprevVisits _prodsOrename _prodsOsynmap _prodsOtextBlocks+ in ( _lhsOappendCommon,_lhsOappendMain,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOinitStates,_lhsOoutput,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))))+-- ENonterminals -----------------------------------------------+{-+ visit 0:+ inherited attributes:+ allFromToStates : Map VisitIdentifier (Int,Int)+ allInitStates : Map NontermIdent Int+ allVisitKinds : Map VisitIdentifier VisitKind+ allchildvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ avisitdefs : Map VisitIdentifier (Set Identifier)+ avisituses : Map VisitIdentifier (Set Identifier)+ derivings : Derivings+ importBlocks : PP_Doc+ inhmap : Map NontermIdent Attributes+ localAttrTypes : Map NontermIdent (Map ConstructorIdent (Map Identifier Type))+ mainFile : String+ mainName : String+ moduleHeader : String -> String -> String -> Bool -> String+ options : Options+ pragmaBlocks : String+ synmap : Map NontermIdent Attributes+ textBlocks : PP_Doc+ typeSyns : TypeSyns+ wrappers : Set NontermIdent+ synthesized attributes:+ appendCommon : [PP_Doc]+ appendMain : [PP_Doc]+ childvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ errors : Seq Error+ fromToStates : Map VisitIdentifier (Int,Int)+ genProdIO : IO ()+ imports : [PP_Doc]+ initStates : Map NontermIdent Int+ output : PP_Doc+ semFunBndDefs : Seq PP_Doc+ semFunBndTps : Seq PP_Doc+ visitKinds : Map VisitIdentifier VisitKind+ visitdefs : Map VisitIdentifier (Set Identifier)+ visituses : Map VisitIdentifier (Set Identifier)+ alternatives:+ alternative Cons:+ child hd : ENonterminal + child tl : ENonterminals + alternative Nil:+-}+-- cata+sem_ENonterminals :: ENonterminals ->+ T_ENonterminals+sem_ENonterminals list =+ (Prelude.foldr sem_ENonterminals_Cons sem_ENonterminals_Nil (Prelude.map sem_ENonterminal list))+-- semantic domain+newtype T_ENonterminals = T_ENonterminals ((Map VisitIdentifier (Int,Int)) ->+ (Map NontermIdent Int) ->+ (Map VisitIdentifier VisitKind) ->+ (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ (Map VisitIdentifier (Set Identifier)) ->+ (Map VisitIdentifier (Set Identifier)) ->+ Derivings ->+ PP_Doc ->+ (Map NontermIdent Attributes) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->+ String ->+ String ->+ (String -> String -> String -> Bool -> String) ->+ Options ->+ String ->+ (Map NontermIdent Attributes) ->+ PP_Doc ->+ TypeSyns ->+ (Set NontermIdent) ->+ ( ([PP_Doc]),([PP_Doc]),(Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),(Seq Error),(Map VisitIdentifier (Int,Int)),(IO ()),([PP_Doc]),(Map NontermIdent Int),PP_Doc,(Seq PP_Doc),(Seq PP_Doc),(Map VisitIdentifier VisitKind),(Map VisitIdentifier (Set Identifier)),(Map VisitIdentifier (Set Identifier))))+data Inh_ENonterminals = Inh_ENonterminals {allFromToStates_Inh_ENonterminals :: (Map VisitIdentifier (Int,Int)),allInitStates_Inh_ENonterminals :: (Map NontermIdent Int),allVisitKinds_Inh_ENonterminals :: (Map VisitIdentifier VisitKind),allchildvisit_Inh_ENonterminals :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),avisitdefs_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)),avisituses_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)),derivings_Inh_ENonterminals :: Derivings,importBlocks_Inh_ENonterminals :: PP_Doc,inhmap_Inh_ENonterminals :: (Map NontermIdent Attributes),localAttrTypes_Inh_ENonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))),mainFile_Inh_ENonterminals :: String,mainName_Inh_ENonterminals :: String,moduleHeader_Inh_ENonterminals :: (String -> String -> String -> Bool -> String),options_Inh_ENonterminals :: Options,pragmaBlocks_Inh_ENonterminals :: String,synmap_Inh_ENonterminals :: (Map NontermIdent Attributes),textBlocks_Inh_ENonterminals :: PP_Doc,typeSyns_Inh_ENonterminals :: TypeSyns,wrappers_Inh_ENonterminals :: (Set NontermIdent)}+data Syn_ENonterminals = Syn_ENonterminals {appendCommon_Syn_ENonterminals :: ([PP_Doc]),appendMain_Syn_ENonterminals :: ([PP_Doc]),childvisit_Syn_ENonterminals :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),errors_Syn_ENonterminals :: (Seq Error),fromToStates_Syn_ENonterminals :: (Map VisitIdentifier (Int,Int)),genProdIO_Syn_ENonterminals :: (IO ()),imports_Syn_ENonterminals :: ([PP_Doc]),initStates_Syn_ENonterminals :: (Map NontermIdent Int),output_Syn_ENonterminals :: PP_Doc,semFunBndDefs_Syn_ENonterminals :: (Seq PP_Doc),semFunBndTps_Syn_ENonterminals :: (Seq PP_Doc),visitKinds_Syn_ENonterminals :: (Map VisitIdentifier VisitKind),visitdefs_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier)),visituses_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier))}+wrap_ENonterminals :: T_ENonterminals ->+ Inh_ENonterminals ->+ Syn_ENonterminals+wrap_ENonterminals (T_ENonterminals sem) (Inh_ENonterminals _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers) =+ (let ( _lhsOappendCommon,_lhsOappendMain,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOinitStates,_lhsOoutput,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses) = sem _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers+ in (Syn_ENonterminals _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses))+sem_ENonterminals_Cons :: T_ENonterminal ->+ T_ENonterminals ->+ T_ENonterminals+sem_ENonterminals_Cons (T_ENonterminal hd_) (T_ENonterminals tl_) =+ (T_ENonterminals (\ _lhsIallFromToStates+ _lhsIallInitStates+ _lhsIallVisitKinds+ _lhsIallchildvisit+ _lhsIavisitdefs+ _lhsIavisituses+ _lhsIderivings+ _lhsIimportBlocks+ _lhsIinhmap+ _lhsIlocalAttrTypes+ _lhsImainFile+ _lhsImainName+ _lhsImoduleHeader+ _lhsIoptions+ _lhsIpragmaBlocks+ _lhsIsynmap+ _lhsItextBlocks+ _lhsItypeSyns+ _lhsIwrappers ->+ (let _lhsOappendCommon :: ([PP_Doc])+ _lhsOappendMain :: ([PP_Doc])+ _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _lhsOerrors :: (Seq Error)+ _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))+ _lhsOgenProdIO :: (IO ())+ _lhsOimports :: ([PP_Doc])+ _lhsOinitStates :: (Map NontermIdent Int)+ _lhsOoutput :: PP_Doc+ _lhsOsemFunBndDefs :: (Seq PP_Doc)+ _lhsOsemFunBndTps :: (Seq PP_Doc)+ _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)+ _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))+ _hdOallFromToStates :: (Map VisitIdentifier (Int,Int))+ _hdOallInitStates :: (Map NontermIdent Int)+ _hdOallVisitKinds :: (Map VisitIdentifier VisitKind)+ _hdOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _hdOavisitdefs :: (Map VisitIdentifier (Set Identifier))+ _hdOavisituses :: (Map VisitIdentifier (Set Identifier))+ _hdOderivings :: Derivings+ _hdOimportBlocks :: PP_Doc+ _hdOinhmap :: (Map NontermIdent Attributes)+ _hdOlocalAttrTypes :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type)))+ _hdOmainFile :: String+ _hdOmainName :: String+ _hdOmoduleHeader :: (String -> String -> String -> Bool -> String)+ _hdOoptions :: Options+ _hdOpragmaBlocks :: String+ _hdOsynmap :: (Map NontermIdent Attributes)+ _hdOtextBlocks :: PP_Doc+ _hdOtypeSyns :: TypeSyns+ _hdOwrappers :: (Set NontermIdent)+ _tlOallFromToStates :: (Map VisitIdentifier (Int,Int))+ _tlOallInitStates :: (Map NontermIdent Int)+ _tlOallVisitKinds :: (Map VisitIdentifier VisitKind)+ _tlOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _tlOavisitdefs :: (Map VisitIdentifier (Set Identifier))+ _tlOavisituses :: (Map VisitIdentifier (Set Identifier))+ _tlOderivings :: Derivings+ _tlOimportBlocks :: PP_Doc+ _tlOinhmap :: (Map NontermIdent Attributes)+ _tlOlocalAttrTypes :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type)))+ _tlOmainFile :: String+ _tlOmainName :: String+ _tlOmoduleHeader :: (String -> String -> String -> Bool -> String)+ _tlOoptions :: Options+ _tlOpragmaBlocks :: String+ _tlOsynmap :: (Map NontermIdent Attributes)+ _tlOtextBlocks :: PP_Doc+ _tlOtypeSyns :: TypeSyns+ _tlOwrappers :: (Set NontermIdent)+ _hdIappendCommon :: ( PP_Doc )+ _hdIappendMain :: ( PP_Doc )+ _hdIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _hdIerrors :: (Seq Error)+ _hdIfromToStates :: (Map VisitIdentifier (Int,Int))+ _hdIgenProdIO :: (IO ())+ _hdIimports :: ([PP_Doc])+ _hdIinitStates :: (Map NontermIdent Int)+ _hdIoutput :: PP_Doc+ _hdIsemFunBndDefs :: (Seq PP_Doc)+ _hdIsemFunBndTps :: (Seq PP_Doc)+ _hdIvisitKinds :: (Map VisitIdentifier VisitKind)+ _hdIvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _hdIvisituses :: (Map VisitIdentifier (Set Identifier))+ _tlIappendCommon :: ([PP_Doc])+ _tlIappendMain :: ([PP_Doc])+ _tlIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _tlIerrors :: (Seq Error)+ _tlIfromToStates :: (Map VisitIdentifier (Int,Int))+ _tlIgenProdIO :: (IO ())+ _tlIimports :: ([PP_Doc])+ _tlIinitStates :: (Map NontermIdent Int)+ _tlIoutput :: PP_Doc+ _tlIsemFunBndDefs :: (Seq PP_Doc)+ _tlIsemFunBndTps :: (Seq PP_Doc)+ _tlIvisitKinds :: (Map VisitIdentifier VisitKind)+ _tlIvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _tlIvisituses :: (Map VisitIdentifier (Set Identifier))+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1447, column 51)+ _lhsOappendCommon =+ ({-# LINE 1447 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIappendCommon : _tlIappendCommon+ {-# LINE 2147 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1447, column 51)+ _lhsOappendMain =+ ({-# LINE 1447 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIappendMain : _tlIappendMain+ {-# LINE 2153 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1187, column 37)+ _lhsOchildvisit =+ ({-# LINE 1187 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIchildvisit `Map.union` _tlIchildvisit+ {-# LINE 2159 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1629, column 132)+ _lhsOerrors =+ ({-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 2165 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1544, column 22)+ _lhsOfromToStates =+ ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIfromToStates `mappend` _tlIfromToStates+ {-# LINE 2171 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1464, column 49)+ _lhsOgenProdIO =+ ({-# LINE 1464 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIgenProdIO >> _tlIgenProdIO+ {-# LINE 2177 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1463, column 47)+ _lhsOimports =+ ({-# LINE 1463 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIimports ++ _tlIimports+ {-# LINE 2183 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1603, column 50)+ _lhsOinitStates =+ ({-# LINE 1603 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIinitStates `mappend` _tlIinitStates+ {-# LINE 2189 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 90, column 45)+ _lhsOoutput =+ ({-# LINE 90 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIoutput >-< _tlIoutput+ {-# LINE 2195 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 515, column 92)+ _lhsOsemFunBndDefs =+ ({-# LINE 515 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIsemFunBndDefs Seq.>< _tlIsemFunBndDefs+ {-# LINE 2201 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 515, column 92)+ _lhsOsemFunBndTps =+ ({-# LINE 515 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIsemFunBndTps Seq.>< _tlIsemFunBndTps+ {-# LINE 2207 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1591, column 68)+ _lhsOvisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIvisitKinds `mappend` _tlIvisitKinds+ {-# LINE 2213 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1322, column 36)+ _lhsOvisitdefs =+ ({-# LINE 1322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIvisitdefs `uwSetUnion` _tlIvisitdefs+ {-# LINE 2219 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1323, column 36)+ _lhsOvisituses =+ ({-# LINE 1323 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIvisituses `uwSetUnion` _tlIvisituses+ {-# LINE 2225 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallFromToStates =+ ({-# LINE 1547 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallFromToStates+ {-# LINE 2231 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallInitStates =+ ({-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInitStates+ {-# LINE 2237 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallVisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallVisitKinds+ {-# LINE 2243 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallchildvisit =+ ({-# LINE 1186 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallchildvisit+ {-# LINE 2249 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOavisitdefs =+ ({-# LINE 1332 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisitdefs+ {-# LINE 2255 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOavisituses =+ ({-# LINE 1333 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisituses+ {-# LINE 2261 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOderivings =+ ({-# LINE 129 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIderivings+ {-# LINE 2267 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOimportBlocks =+ ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIimportBlocks+ {-# LINE 2273 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOinhmap =+ ({-# LINE 312 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 2279 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOlocalAttrTypes =+ ({-# LINE 1576 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIlocalAttrTypes+ {-# LINE 2285 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOmainFile =+ ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainFile+ {-# LINE 2291 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOmainName =+ ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainName+ {-# LINE 2297 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOmoduleHeader =+ ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImoduleHeader+ {-# LINE 2303 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 2309 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOpragmaBlocks =+ ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 2315 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOsynmap =+ ({-# LINE 313 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 2321 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOtextBlocks =+ ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsItextBlocks+ {-# LINE 2327 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOtypeSyns =+ ({-# LINE 128 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsItypeSyns+ {-# LINE 2333 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOwrappers =+ ({-# LINE 89 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIwrappers+ {-# LINE 2339 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallFromToStates =+ ({-# LINE 1547 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallFromToStates+ {-# LINE 2345 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallInitStates =+ ({-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInitStates+ {-# LINE 2351 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallVisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallVisitKinds+ {-# LINE 2357 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallchildvisit =+ ({-# LINE 1186 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallchildvisit+ {-# LINE 2363 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOavisitdefs =+ ({-# LINE 1332 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisitdefs+ {-# LINE 2369 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOavisituses =+ ({-# LINE 1333 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisituses+ {-# LINE 2375 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOderivings =+ ({-# LINE 129 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIderivings+ {-# LINE 2381 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOimportBlocks =+ ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIimportBlocks+ {-# LINE 2387 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOinhmap =+ ({-# LINE 312 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 2393 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOlocalAttrTypes =+ ({-# LINE 1576 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIlocalAttrTypes+ {-# LINE 2399 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOmainFile =+ ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainFile+ {-# LINE 2405 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOmainName =+ ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainName+ {-# LINE 2411 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOmoduleHeader =+ ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImoduleHeader+ {-# LINE 2417 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 2423 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOpragmaBlocks =+ ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 2429 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOsynmap =+ ({-# LINE 313 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 2435 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOtextBlocks =+ ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsItextBlocks+ {-# LINE 2441 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOtypeSyns =+ ({-# LINE 128 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsItypeSyns+ {-# LINE 2447 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOwrappers =+ ({-# LINE 89 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIwrappers+ {-# LINE 2453 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _hdIappendCommon,_hdIappendMain,_hdIchildvisit,_hdIerrors,_hdIfromToStates,_hdIgenProdIO,_hdIimports,_hdIinitStates,_hdIoutput,_hdIsemFunBndDefs,_hdIsemFunBndTps,_hdIvisitKinds,_hdIvisitdefs,_hdIvisituses) =+ hd_ _hdOallFromToStates _hdOallInitStates _hdOallVisitKinds _hdOallchildvisit _hdOavisitdefs _hdOavisituses _hdOderivings _hdOimportBlocks _hdOinhmap _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOoptions _hdOpragmaBlocks _hdOsynmap _hdOtextBlocks _hdOtypeSyns _hdOwrappers+ ( _tlIappendCommon,_tlIappendMain,_tlIchildvisit,_tlIerrors,_tlIfromToStates,_tlIgenProdIO,_tlIimports,_tlIinitStates,_tlIoutput,_tlIsemFunBndDefs,_tlIsemFunBndTps,_tlIvisitKinds,_tlIvisitdefs,_tlIvisituses) =+ tl_ _tlOallFromToStates _tlOallInitStates _tlOallVisitKinds _tlOallchildvisit _tlOavisitdefs _tlOavisituses _tlOderivings _tlOimportBlocks _tlOinhmap _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOoptions _tlOpragmaBlocks _tlOsynmap _tlOtextBlocks _tlOtypeSyns _tlOwrappers+ in ( _lhsOappendCommon,_lhsOappendMain,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOinitStates,_lhsOoutput,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))))+sem_ENonterminals_Nil :: T_ENonterminals+sem_ENonterminals_Nil =+ (T_ENonterminals (\ _lhsIallFromToStates+ _lhsIallInitStates+ _lhsIallVisitKinds+ _lhsIallchildvisit+ _lhsIavisitdefs+ _lhsIavisituses+ _lhsIderivings+ _lhsIimportBlocks+ _lhsIinhmap+ _lhsIlocalAttrTypes+ _lhsImainFile+ _lhsImainName+ _lhsImoduleHeader+ _lhsIoptions+ _lhsIpragmaBlocks+ _lhsIsynmap+ _lhsItextBlocks+ _lhsItypeSyns+ _lhsIwrappers ->+ (let _lhsOappendCommon :: ([PP_Doc])+ _lhsOappendMain :: ([PP_Doc])+ _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _lhsOerrors :: (Seq Error)+ _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))+ _lhsOgenProdIO :: (IO ())+ _lhsOimports :: ([PP_Doc])+ _lhsOinitStates :: (Map NontermIdent Int)+ _lhsOoutput :: PP_Doc+ _lhsOsemFunBndDefs :: (Seq PP_Doc)+ _lhsOsemFunBndTps :: (Seq PP_Doc)+ _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)+ _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1447, column 51)+ _lhsOappendCommon =+ ({-# LINE 1447 "src-ag/ExecutionPlan2Hs.ag" #-}+ []+ {-# LINE 2499 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1447, column 51)+ _lhsOappendMain =+ ({-# LINE 1447 "src-ag/ExecutionPlan2Hs.ag" #-}+ []+ {-# LINE 2505 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1187, column 37)+ _lhsOchildvisit =+ ({-# LINE 1187 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 2511 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1629, column 132)+ _lhsOerrors =+ ({-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}+ Seq.empty+ {-# LINE 2517 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1544, column 22)+ _lhsOfromToStates =+ ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}+ mempty+ {-# LINE 2523 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1464, column 49)+ _lhsOgenProdIO =+ ({-# LINE 1464 "src-ag/ExecutionPlan2Hs.ag" #-}+ return ()+ {-# LINE 2529 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1463, column 47)+ _lhsOimports =+ ({-# LINE 1463 "src-ag/ExecutionPlan2Hs.ag" #-}+ []+ {-# LINE 2535 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1603, column 50)+ _lhsOinitStates =+ ({-# LINE 1603 "src-ag/ExecutionPlan2Hs.ag" #-}+ mempty+ {-# LINE 2541 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 90, column 45)+ _lhsOoutput =+ ({-# LINE 90 "src-ag/ExecutionPlan2Hs.ag" #-}+ empty+ {-# LINE 2547 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 515, column 92)+ _lhsOsemFunBndDefs =+ ({-# LINE 515 "src-ag/ExecutionPlan2Hs.ag" #-}+ Seq.empty+ {-# LINE 2553 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 515, column 92)+ _lhsOsemFunBndTps =+ ({-# LINE 515 "src-ag/ExecutionPlan2Hs.ag" #-}+ Seq.empty+ {-# LINE 2559 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1591, column 68)+ _lhsOvisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ mempty+ {-# LINE 2565 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1322, column 36)+ _lhsOvisitdefs =+ ({-# LINE 1322 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 2571 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1323, column 36)+ _lhsOvisituses =+ ({-# LINE 1323 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 2577 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOappendCommon,_lhsOappendMain,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOinitStates,_lhsOoutput,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))))+-- EProduction -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allFromToStates : Map VisitIdentifier (Int,Int)+ allInhmap : Map NontermIdent Attributes+ allInitStates : Map NontermIdent Int+ allSynmap : Map NontermIdent Attributes+ allVisitKinds : Map VisitIdentifier VisitKind+ allchildvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ allstates : Set StateIdentifier+ avisitdefs : Map VisitIdentifier (Set Identifier)+ avisituses : Map VisitIdentifier (Set Identifier)+ classCtxs : ClassContext+ importBlocks : PP_Doc+ inhmap : Attributes+ initial : StateIdentifier+ localAttrTypes : Map ConstructorIdent (Map Identifier Type)+ mainFile : String+ mainName : String+ moduleHeader : String -> String -> String -> Bool -> String+ nextVisits : Map StateIdentifier StateCtx+ nt : NontermIdent+ ntType : Type+ options : Options+ params : [Identifier]+ pragmaBlocks : String+ prevVisits : Map StateIdentifier StateCtx+ rename : Bool+ synmap : Attributes+ textBlocks : PP_Doc+ synthesized attributes:+ allvisits : [VisitStateState]+ childvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ count : Int+ datatype : PP_Doc+ errors : Seq Error+ fromToStates : Map VisitIdentifier (Int,Int)+ genProdIO : IO ()+ imports : [PP_Doc]+ semFunBndDefs : Seq PP_Doc+ semFunBndTps : Seq PP_Doc+ sem_nt : PP_Doc+ sem_prod : PP_Doc+ t_visits : PP_Doc+ visitKinds : Map VisitIdentifier VisitKind+ visitdefs : Map VisitIdentifier (Set Identifier)+ visituses : Map VisitIdentifier (Set Identifier)+ alternatives:+ alternative EProduction:+ child con : {ConstructorIdent}+ child params : {[Identifier]}+ child constraints : {[Type]}+ child rules : ERules + child children : EChildren + child visits : Visits + visit 0:+ local classPP1 : _+ local quantPP1 : _+ local semFunBndDef : _+ local semFunBndTp : _+ local semFunBndNm : _+ local t_type : _+ local t_params : _+ local args : _+ local semname : _+ local sem_tp : _+ local classPP2 : _+ local quantPP2 : _+ local sem_prod : _+ local mkSemBody : _+ local mbInitializer : _+ local scc : _+ local semInlinePragma : _+ local outerlet : _+ local statefns : _+ local genstfn : _+ local stargs : _+ local stks : _+ local stvisits : _+ local stvs : _+ local lazyIntras : _+ local moduleName : _+ local suffix : _+ local outputfile : _+ local ppMonadImports : _+ local addbang : _+ local childTypes : _+ local localAttrTypes : _+-}+-- cata+sem_EProduction :: EProduction ->+ T_EProduction+sem_EProduction (EProduction _con _params _constraints _rules _children _visits) =+ (sem_EProduction_EProduction _con _params _constraints (sem_ERules _rules) (sem_EChildren _children) (sem_Visits _visits))+-- semantic domain+newtype T_EProduction = T_EProduction ((Map VisitIdentifier (Int,Int)) ->+ (Map NontermIdent Attributes) ->+ (Map NontermIdent Int) ->+ (Map NontermIdent Attributes) ->+ (Map VisitIdentifier VisitKind) ->+ (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ (Set StateIdentifier) ->+ (Map VisitIdentifier (Set Identifier)) ->+ (Map VisitIdentifier (Set Identifier)) ->+ ClassContext ->+ PP_Doc ->+ Attributes ->+ StateIdentifier ->+ (Map ConstructorIdent (Map Identifier Type)) ->+ String ->+ String ->+ (String -> String -> String -> Bool -> String) ->+ (Map StateIdentifier StateCtx) ->+ NontermIdent ->+ Type ->+ Options ->+ ([Identifier]) ->+ String ->+ (Map StateIdentifier StateCtx) ->+ Bool ->+ Attributes ->+ PP_Doc ->+ ( ([VisitStateState]),(Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),Int,PP_Doc,(Seq Error),(Map VisitIdentifier (Int,Int)),(IO ()),([PP_Doc]),(Seq PP_Doc),(Seq PP_Doc),PP_Doc,PP_Doc,PP_Doc,(Map VisitIdentifier VisitKind),(Map VisitIdentifier (Set Identifier)),(Map VisitIdentifier (Set Identifier))))+data Inh_EProduction = Inh_EProduction {allFromToStates_Inh_EProduction :: (Map VisitIdentifier (Int,Int)),allInhmap_Inh_EProduction :: (Map NontermIdent Attributes),allInitStates_Inh_EProduction :: (Map NontermIdent Int),allSynmap_Inh_EProduction :: (Map NontermIdent Attributes),allVisitKinds_Inh_EProduction :: (Map VisitIdentifier VisitKind),allchildvisit_Inh_EProduction :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),allstates_Inh_EProduction :: (Set StateIdentifier),avisitdefs_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)),avisituses_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)),classCtxs_Inh_EProduction :: ClassContext,importBlocks_Inh_EProduction :: PP_Doc,inhmap_Inh_EProduction :: Attributes,initial_Inh_EProduction :: StateIdentifier,localAttrTypes_Inh_EProduction :: (Map ConstructorIdent (Map Identifier Type)),mainFile_Inh_EProduction :: String,mainName_Inh_EProduction :: String,moduleHeader_Inh_EProduction :: (String -> String -> String -> Bool -> String),nextVisits_Inh_EProduction :: (Map StateIdentifier StateCtx),nt_Inh_EProduction :: NontermIdent,ntType_Inh_EProduction :: Type,options_Inh_EProduction :: Options,params_Inh_EProduction :: ([Identifier]),pragmaBlocks_Inh_EProduction :: String,prevVisits_Inh_EProduction :: (Map StateIdentifier StateCtx),rename_Inh_EProduction :: Bool,synmap_Inh_EProduction :: Attributes,textBlocks_Inh_EProduction :: PP_Doc}+data Syn_EProduction = Syn_EProduction {allvisits_Syn_EProduction :: ([VisitStateState]),childvisit_Syn_EProduction :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),count_Syn_EProduction :: Int,datatype_Syn_EProduction :: PP_Doc,errors_Syn_EProduction :: (Seq Error),fromToStates_Syn_EProduction :: (Map VisitIdentifier (Int,Int)),genProdIO_Syn_EProduction :: (IO ()),imports_Syn_EProduction :: ([PP_Doc]),semFunBndDefs_Syn_EProduction :: (Seq PP_Doc),semFunBndTps_Syn_EProduction :: (Seq PP_Doc),sem_nt_Syn_EProduction :: PP_Doc,sem_prod_Syn_EProduction :: PP_Doc,t_visits_Syn_EProduction :: PP_Doc,visitKinds_Syn_EProduction :: (Map VisitIdentifier VisitKind),visitdefs_Syn_EProduction :: (Map VisitIdentifier (Set Identifier)),visituses_Syn_EProduction :: (Map VisitIdentifier (Set Identifier))}+wrap_EProduction :: T_EProduction ->+ Inh_EProduction ->+ Syn_EProduction+wrap_EProduction (T_EProduction sem) (Inh_EProduction _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks) =+ (let ( _lhsOallvisits,_lhsOchildvisit,_lhsOcount,_lhsOdatatype,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOsem_nt,_lhsOsem_prod,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses) = sem _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks+ in (Syn_EProduction _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses))+sem_EProduction_EProduction :: ConstructorIdent ->+ ([Identifier]) ->+ ([Type]) ->+ T_ERules ->+ T_EChildren ->+ T_Visits ->+ T_EProduction+sem_EProduction_EProduction con_ params_ constraints_ (T_ERules rules_) (T_EChildren children_) (T_Visits visits_) =+ (T_EProduction (\ _lhsIallFromToStates+ _lhsIallInhmap+ _lhsIallInitStates+ _lhsIallSynmap+ _lhsIallVisitKinds+ _lhsIallchildvisit+ _lhsIallstates+ _lhsIavisitdefs+ _lhsIavisituses+ _lhsIclassCtxs+ _lhsIimportBlocks+ _lhsIinhmap+ _lhsIinitial+ _lhsIlocalAttrTypes+ _lhsImainFile+ _lhsImainName+ _lhsImoduleHeader+ _lhsInextVisits+ _lhsInt+ _lhsIntType+ _lhsIoptions+ _lhsIparams+ _lhsIpragmaBlocks+ _lhsIprevVisits+ _lhsIrename+ _lhsIsynmap+ _lhsItextBlocks ->+ (let _childrenOcon :: ConstructorIdent+ _rulesOcon :: ConstructorIdent+ _visitsOcon :: ConstructorIdent+ _lhsOdatatype :: PP_Doc+ _lhsOcount :: Int+ _lhsOsem_nt :: PP_Doc+ _lhsOsemFunBndDefs :: (Seq PP_Doc)+ _lhsOsemFunBndTps :: (Seq PP_Doc)+ _visitsOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))+ _visitsOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))+ _rulesOusageInfo :: (Map Identifier Int)+ _rulesOruleKinds :: (Map Identifier (Set VisitKind))+ _visitsOallintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))+ _visitsOterminaldefs :: (Set String)+ _visitsOruledefs :: (Map Identifier (Set String))+ _visitsOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))+ _lhsOimports :: ([PP_Doc])+ _lhsOgenProdIO :: (IO ())+ _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _lhsOerrors :: (Seq Error)+ _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))+ _lhsOt_visits :: PP_Doc+ _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)+ _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))+ _lhsOallvisits :: ([VisitStateState])+ _lhsOsem_prod :: PP_Doc+ _rulesOallInhmap :: (Map NontermIdent Attributes)+ _rulesOallSynmap :: (Map NontermIdent Attributes)+ _rulesOchildTypes :: (Map Identifier Type)+ _rulesOimportBlocks :: PP_Doc+ _rulesOinhmap :: Attributes+ _rulesOlazyIntras :: (Set String)+ _rulesOlocalAttrTypes :: (Map Identifier Type)+ _rulesOmainFile :: String+ _rulesOmainName :: String+ _rulesOmoduleHeader :: (String -> String -> String -> Bool -> String)+ _rulesOnt :: NontermIdent+ _rulesOoptions :: Options+ _rulesOpragmaBlocks :: String+ _rulesOsynmap :: Attributes+ _rulesOtextBlocks :: PP_Doc+ _childrenOallInitStates :: (Map NontermIdent Int)+ _childrenOimportBlocks :: PP_Doc+ _childrenOmainFile :: String+ _childrenOmainName :: String+ _childrenOmoduleHeader :: (String -> String -> String -> Bool -> String)+ _childrenOnt :: NontermIdent+ _childrenOoptions :: Options+ _childrenOpragmaBlocks :: String+ _childrenOtextBlocks :: PP_Doc+ _visitsOallFromToStates :: (Map VisitIdentifier (Int,Int))+ _visitsOallInhmap :: (Map NontermIdent Attributes)+ _visitsOallInitStates :: (Map NontermIdent Int)+ _visitsOallSynmap :: (Map NontermIdent Attributes)+ _visitsOallVisitKinds :: (Map VisitIdentifier VisitKind)+ _visitsOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _visitsOavisitdefs :: (Map VisitIdentifier (Set Identifier))+ _visitsOavisituses :: (Map VisitIdentifier (Set Identifier))+ _visitsOchildTypes :: (Map Identifier Type)+ _visitsOinhmap :: Attributes+ _visitsOnextVisits :: (Map StateIdentifier StateCtx)+ _visitsOnt :: NontermIdent+ _visitsOoptions :: Options+ _visitsOparams :: ([Identifier])+ _visitsOprevVisits :: (Map StateIdentifier StateCtx)+ _visitsOsynmap :: Attributes+ _rulesIerrors :: (Seq Error)+ _rulesImrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))+ _rulesIruledefs :: (Map Identifier (Set String))+ _rulesIruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))+ _rulesIsem_rules :: PP_Doc+ _childrenIargnamesw :: ([PP_Doc])+ _childrenIargpats :: ( [PP_Doc] )+ _childrenIargtps :: ( [PP_Doc] )+ _childrenIchildTypes :: (Map Identifier Type)+ _childrenIchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))+ _childrenIdatatype :: ([PP_Doc])+ _childrenIterminaldefs :: (Set String)+ _visitsIallvisits :: ([VisitStateState])+ _visitsIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _visitsIerrors :: (Seq Error)+ _visitsIfromToStates :: (Map VisitIdentifier (Int,Int))+ _visitsIintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))+ _visitsIlazyIntras :: (Set String)+ _visitsIruleKinds :: (Map Identifier (Set VisitKind))+ _visitsIruleUsage :: (Map Identifier Int)+ _visitsIsem_visit :: ( [(StateIdentifier,Bool -> PP_Doc)] )+ _visitsIt_visits :: PP_Doc+ _visitsIvisitKinds :: (Map VisitIdentifier VisitKind)+ _visitsIvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _visitsIvisituses :: (Map VisitIdentifier (Set Identifier))+ -- "src-ag/ExecutionPlan2Hs.ag"(line 69, column 17)+ _childrenOcon =+ ({-# LINE 69 "src-ag/ExecutionPlan2Hs.ag" #-}+ con_+ {-# LINE 2843 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 70, column 17)+ _rulesOcon =+ ({-# LINE 70 "src-ag/ExecutionPlan2Hs.ag" #-}+ con_+ {-# LINE 2849 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 71, column 17)+ _visitsOcon =+ ({-# LINE 71 "src-ag/ExecutionPlan2Hs.ag" #-}+ con_+ {-# LINE 2855 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 184, column 17)+ _lhsOdatatype =+ ({-# LINE 184 "src-ag/ExecutionPlan2Hs.ag" #-}+ _quantPP1 >#< _classPP1+ >#< conname _lhsIrename _lhsInt con_+ >#< ppConFields (dataRecords _lhsIoptions) _childrenIdatatype+ {-# LINE 2863 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 187, column 17)+ _classPP1 =+ ({-# LINE 187 "src-ag/ExecutionPlan2Hs.ag" #-}+ ppClasses (classConstrsToDocs constraints_)+ {-# LINE 2869 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 188, column 17)+ _quantPP1 =+ ({-# LINE 188 "src-ag/ExecutionPlan2Hs.ag" #-}+ ppQuants params_+ {-# LINE 2875 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 289, column 32)+ _lhsOcount =+ ({-# LINE 289 "src-ag/ExecutionPlan2Hs.ag" #-}+ 1+ {-# LINE 2881 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 294, column 17)+ _lhsOsem_nt =+ ({-# LINE 294 "src-ag/ExecutionPlan2Hs.ag" #-}+ "sem_" >|< _lhsInt >#< "(" >#< conname _lhsIrename _lhsInt con_ >#< ppSpaced _childrenIargpats >#< ")"+ >#< "=" >#< "sem_" >|< _lhsInt >|< "_" >|< con_ >#< ppSpaced _childrenIargnamesw+ {-# LINE 2888 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 524, column 3)+ _lhsOsemFunBndDefs =+ ({-# LINE 524 "src-ag/ExecutionPlan2Hs.ag" #-}+ Seq.singleton _semFunBndDef+ {-# LINE 2894 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 525, column 3)+ _lhsOsemFunBndTps =+ ({-# LINE 525 "src-ag/ExecutionPlan2Hs.ag" #-}+ Seq.singleton _semFunBndTp+ {-# LINE 2900 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 526, column 3)+ _semFunBndDef =+ ({-# LINE 526 "src-ag/ExecutionPlan2Hs.ag" #-}+ _semFunBndNm >#< "=" >#< _semname+ {-# LINE 2906 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 527, column 3)+ _semFunBndTp =+ ({-# LINE 527 "src-ag/ExecutionPlan2Hs.ag" #-}+ _semFunBndNm >#< "::" >#< _sem_tp+ {-# LINE 2912 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 528, column 3)+ _semFunBndNm =+ ({-# LINE 528 "src-ag/ExecutionPlan2Hs.ag" #-}+ lateSemConLabel _lhsInt con_+ {-# LINE 2918 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 586, column 17)+ _t_type =+ ({-# LINE 586 "src-ag/ExecutionPlan2Hs.ag" #-}+ "T_" >|< _lhsInt+ {-# LINE 2924 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 587, column 17)+ _t_params =+ ({-# LINE 587 "src-ag/ExecutionPlan2Hs.ag" #-}+ ppSpaced _lhsIparams+ {-# LINE 2930 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 588, column 17)+ _args =+ ({-# LINE 588 "src-ag/ExecutionPlan2Hs.ag" #-}+ _childrenIargpats+ {-# LINE 2936 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 589, column 17)+ _semname =+ ({-# LINE 589 "src-ag/ExecutionPlan2Hs.ag" #-}+ "sem_" ++ show _lhsInt ++ "_" ++ show con_+ {-# LINE 2942 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 590, column 17)+ _sem_tp =+ ({-# LINE 590 "src-ag/ExecutionPlan2Hs.ag" #-}+ _quantPP2 >#< _classPP2 >#< ppSpaced _childrenIargtps >#< _t_type >#< _t_params+ {-# LINE 2948 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 591, column 17)+ _classPP2 =+ ({-# LINE 591 "src-ag/ExecutionPlan2Hs.ag" #-}+ ppClasses (classCtxsToDocs _lhsIclassCtxs ++ classConstrsToDocs constraints_)+ {-# LINE 2954 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 592, column 17)+ _quantPP2 =+ ({-# LINE 592 "src-ag/ExecutionPlan2Hs.ag" #-}+ ppQuants (_lhsIparams ++ params_)+ {-# LINE 2960 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 593, column 17)+ _sem_prod =+ ({-# LINE 593 "src-ag/ExecutionPlan2Hs.ag" #-}+ _semInlinePragma+ >-< _semname >#< "::" >#< _sem_tp+ >-< _mkSemBody (_semname >#< ppSpaced _args >#< "=" >#< _scc >#< _t_type )+ _mbInitializer _outerlet ("return" >#< "st" >|< _lhsIinitial)+ {-# LINE 2969 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 597, column 17)+ _mkSemBody =+ ({-# LINE 597 "src-ag/ExecutionPlan2Hs.ag" #-}+ \prefix mbInit outerlet ret ->+ case mbInit of+ Nothing -> prefix >#< pp_parens ret >#< "where"+ >-< indent 3 outerlet+ Just m -> prefix >#< "(" >#< "do"+ >-< indent 1 (+ m+ >-< "let"+ >-< indent 2 outerlet+ >-< ret )+ >-< indent 1 ")"+ {-# LINE 2985 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 609, column 17)+ _mbInitializer =+ ({-# LINE 609 "src-ag/ExecutionPlan2Hs.ag" #-}+ if parallelInvoke _lhsIoptions+ then (Nothing :: Maybe PP_Doc)+ else Nothing+ {-# LINE 2993 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 615, column 17)+ _scc =+ ({-# LINE 615 "src-ag/ExecutionPlan2Hs.ag" #-}+ if genCostCentres _lhsIoptions+ then ppCostCentre _semname+ else empty+ {-# LINE 3001 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 618, column 17)+ _semInlinePragma =+ ({-# LINE 618 "src-ag/ExecutionPlan2Hs.ag" #-}+ if noInlinePragmas _lhsIoptions+ then empty+ else ppNoInline _semname+ {-# LINE 3009 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 621, column 17)+ _outerlet =+ ({-# LINE 621 "src-ag/ExecutionPlan2Hs.ag" #-}+ vlist _statefns >-< _rulesIsem_rules+ {-# LINE 3015 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 622, column 17)+ _statefns =+ ({-# LINE 622 "src-ag/ExecutionPlan2Hs.ag" #-}+ map _genstfn $ Set.toList _lhsIallstates+ {-# LINE 3021 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 623, column 17)+ _genstfn =+ ({-# LINE 623 "src-ag/ExecutionPlan2Hs.ag" #-}+ \st -> let nextVisitInfo = Map.findWithDefault ManyVis st _lhsInextVisits+ prevVisitInfo = Map.findWithDefault ManyVis st _lhsIprevVisits+ stNm = "st" >|< st+ lhs = pragma >-< bang stNm >#< "=" >#<+ (+ if st == _lhsIinitial+ then empty+ else "\\" >#< _stargs st >#< "->"+ )+ pragma = if noInlinePragmas _lhsIoptions+ then empty+ else if helpInlining _lhsIoptions+ then case prevVisitInfo of+ ManyVis -> ppNoInline stNm+ OneVis _ -> if aggressiveInlinePragmas _lhsIoptions+ then ppInline stNm+ else ppInlinable stNm+ NoneVis -> if st /= _lhsIinitial+ then error ("State " ++ show st ++ " is not reachable from the initial state.")+ else if aggressiveInlinePragmas _lhsIoptions+ then ppInline stNm+ else ppInlinable stNm+ else ppNoInline stNm+ cCon = "C_" >|< _lhsInt >|< "_s" >|< st+ bang | st == _lhsIinitial = _addbang+ | otherwise = id+ in case nextVisitInfo of+ NoneVis ->+ if st == _lhsIinitial+ then lhs >#< cCon+ else empty+ OneVis vId -> mklet lhs (_stvs st False) (cCon >#< "v" >|< vId)+ ManyVis -> mklet lhs (_stks st >-< _stvs st True) (cCon >#< "k" >|< st)+ {-# LINE 3059 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 665, column 17)+ _stargs =+ ({-# LINE 665 "src-ag/ExecutionPlan2Hs.ag" #-}+ \st -> let attrs = maybe Map.empty id $ Map.lookup st _visitsIintramap+ in ppSpaced [ let match | str `Set.member` _lazyIntras = pp str+ | otherwise = _addbang (pp str)+ in case mbAttr of+ Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->+ case Map.lookup nm _localAttrTypes of+ Just tp -> pp_parens (pp_parens match >#< "::" >#< ppTp tp)+ Nothing -> match+ Just attr | not (noPerStateTypeSigs _lhsIoptions) ->+ case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _childTypes of+ Just tpDoc -> pp_parens (pp_parens match >#< "::" >#< tpDoc)+ Nothing -> match+ _ -> match+ | (str,mbAttr) <- Map.assocs attrs+ ] >#< dummyPat _lhsIoptions (Map.null attrs)+ {-# LINE 3079 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 681, column 17)+ _stks =+ ({-# LINE 681 "src-ag/ExecutionPlan2Hs.ag" #-}+ \st -> if null (_stvisits st)+ then empty+ else ( if not (noInlinePragmas _lhsIoptions) && helpInlining _lhsIoptions+ then ppNoInline ("k" >|< st)+ else empty+ )+ >-< "k" >|< st >#< "::" >#< "K_" >|< _lhsInt >|< "_s" >|< st >#< "t" >#< "->" >#< "t"+ >-< vlist (map (\(v,f,t) -> "k" >|< st >#< "K_" >|< _lhsInt >|< "_v" >|< v >#< "="+ >#< "v" >|< v) $ _stvisits st)+ {-# LINE 3093 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 690, column 17)+ _stvisits =+ ({-# LINE 690 "src-ag/ExecutionPlan2Hs.ag" #-}+ \st -> filter (\(v,f,t) -> f == st) _visitsIallvisits+ {-# LINE 3099 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 691, column 17)+ _stvs =+ ({-# LINE 691 "src-ag/ExecutionPlan2Hs.ag" #-}+ \st inlinePragma -> vlist [ppf inlinePragma | (f,ppf) <- _visitsIsem_visit, f == st]+ {-# LINE 3105 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 692, column 17)+ _visitsOmrules =+ ({-# LINE 692 "src-ag/ExecutionPlan2Hs.ag" #-}+ _rulesImrules+ {-# LINE 3111 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 896, column 17)+ _visitsOchildintros =+ ({-# LINE 896 "src-ag/ExecutionPlan2Hs.ag" #-}+ _childrenIchildintros+ {-# LINE 3117 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1246, column 32)+ _rulesOusageInfo =+ ({-# LINE 1246 "src-ag/ExecutionPlan2Hs.ag" #-}+ _visitsIruleUsage+ {-# LINE 3123 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1261, column 3)+ _rulesOruleKinds =+ ({-# LINE 1261 "src-ag/ExecutionPlan2Hs.ag" #-}+ _visitsIruleKinds+ {-# LINE 3129 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1290, column 3)+ _visitsOallintramap =+ ({-# LINE 1290 "src-ag/ExecutionPlan2Hs.ag" #-}+ _visitsIintramap+ {-# LINE 3135 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1291, column 3)+ _visitsOterminaldefs =+ ({-# LINE 1291 "src-ag/ExecutionPlan2Hs.ag" #-}+ _childrenIterminaldefs+ {-# LINE 3141 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1315, column 17)+ _visitsOruledefs =+ ({-# LINE 1315 "src-ag/ExecutionPlan2Hs.ag" #-}+ _rulesIruledefs+ {-# LINE 3147 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1316, column 17)+ _visitsOruleuses =+ ({-# LINE 1316 "src-ag/ExecutionPlan2Hs.ag" #-}+ _rulesIruleuses+ {-# LINE 3153 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1370, column 3)+ _lazyIntras =+ ({-# LINE 1370 "src-ag/ExecutionPlan2Hs.ag" #-}+ _visitsIlazyIntras+ {-# LINE 3159 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1467, column 17)+ _lhsOimports =+ ({-# LINE 1467 "src-ag/ExecutionPlan2Hs.ag" #-}+ [pp $ "import " ++ _moduleName ]+ {-# LINE 3165 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1468, column 17)+ _moduleName =+ ({-# LINE 1468 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainName ++ _suffix+ {-# LINE 3171 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1469, column 17)+ _suffix =+ ({-# LINE 1469 "src-ag/ExecutionPlan2Hs.ag" #-}+ "_" ++ show _lhsInt ++ "_" ++ show con_+ {-# LINE 3177 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1470, column 17)+ _outputfile =+ ({-# LINE 1470 "src-ag/ExecutionPlan2Hs.ag" #-}+ replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ _suffix )+ {-# LINE 3183 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1471, column 17)+ _ppMonadImports =+ ({-# LINE 1471 "src-ag/ExecutionPlan2Hs.ag" #-}+ if parallelInvoke _lhsIoptions+ then pp "import qualified System.IO.Unsafe(unsafePerformIO)"+ >-< pp "import System.IO(IO)"+ >-< pp "import Control.Concurrent(newEmptyMVar,forkIO,putMVar,takeMVar)"+ else pp "import Control.Monad.Identity"+ {-# LINE 3193 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1476, column 17)+ _lhsOgenProdIO =+ ({-# LINE 1476 "src-ag/ExecutionPlan2Hs.ag" #-}+ writeModule _outputfile+ [ warrenFlagsPP _lhsIoptions+ , pp $ _lhsIpragmaBlocks+ , pp $ _lhsImoduleHeader _lhsImainName _suffix _semname True+ , _lhsIimportBlocks+ , _ppMonadImports+ , ( if tupleAsDummyToken _lhsIoptions+ then empty+ else pp "import GHC.Prim"+ )+ , pp $ "import " ++ _lhsImainName ++ "_common"+ , _sem_prod+ ]+ {-# LINE 3211 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1517, column 37)+ _addbang =+ ({-# LINE 1517 "src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 3217 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1567, column 3)+ _childTypes =+ ({-# LINE 1567 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton _LHS _lhsIntType `Map.union` _childrenIchildTypes+ {-# LINE 3223 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1584, column 3)+ _localAttrTypes =+ ({-# LINE 1584 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsIlocalAttrTypes+ {-# LINE 3229 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1187, column 37)+ _lhsOchildvisit =+ ({-# LINE 1187 "src-ag/ExecutionPlan2Hs.ag" #-}+ _visitsIchildvisit+ {-# LINE 3235 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1629, column 132)+ _lhsOerrors =+ ({-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}+ _rulesIerrors Seq.>< _visitsIerrors+ {-# LINE 3241 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1544, column 22)+ _lhsOfromToStates =+ ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}+ _visitsIfromToStates+ {-# LINE 3247 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 394, column 59)+ _lhsOt_visits =+ ({-# LINE 394 "src-ag/ExecutionPlan2Hs.ag" #-}+ _visitsIt_visits+ {-# LINE 3253 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1591, column 68)+ _lhsOvisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _visitsIvisitKinds+ {-# LINE 3259 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1322, column 36)+ _lhsOvisitdefs =+ ({-# LINE 1322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _visitsIvisitdefs+ {-# LINE 3265 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1323, column 36)+ _lhsOvisituses =+ ({-# LINE 1323 "src-ag/ExecutionPlan2Hs.ag" #-}+ _visitsIvisituses+ {-# LINE 3271 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (up)+ _lhsOallvisits =+ ({-# LINE 338 "src-ag/ExecutionPlan2Hs.ag" #-}+ _visitsIallvisits+ {-# LINE 3277 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (from local)+ _lhsOsem_prod =+ ({-# LINE 553 "src-ag/ExecutionPlan2Hs.ag" #-}+ _sem_prod+ {-# LINE 3283 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _rulesOallInhmap =+ ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInhmap+ {-# LINE 3289 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _rulesOallSynmap =+ ({-# LINE 322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallSynmap+ {-# LINE 3295 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (from local)+ _rulesOchildTypes =+ ({-# LINE 1564 "src-ag/ExecutionPlan2Hs.ag" #-}+ _childTypes+ {-# LINE 3301 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _rulesOimportBlocks =+ ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIimportBlocks+ {-# LINE 3307 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _rulesOinhmap =+ ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 3313 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (from local)+ _rulesOlazyIntras =+ ({-# LINE 1356 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lazyIntras+ {-# LINE 3319 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (from local)+ _rulesOlocalAttrTypes =+ ({-# LINE 1578 "src-ag/ExecutionPlan2Hs.ag" #-}+ _localAttrTypes+ {-# LINE 3325 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _rulesOmainFile =+ ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainFile+ {-# LINE 3331 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _rulesOmainName =+ ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainName+ {-# LINE 3337 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _rulesOmoduleHeader =+ ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImoduleHeader+ {-# LINE 3343 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _rulesOnt =+ ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsInt+ {-# LINE 3349 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _rulesOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 3355 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _rulesOpragmaBlocks =+ ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 3361 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _rulesOsynmap =+ ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 3367 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _rulesOtextBlocks =+ ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsItextBlocks+ {-# LINE 3373 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _childrenOallInitStates =+ ({-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInitStates+ {-# LINE 3379 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _childrenOimportBlocks =+ ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIimportBlocks+ {-# LINE 3385 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _childrenOmainFile =+ ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainFile+ {-# LINE 3391 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _childrenOmainName =+ ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainName+ {-# LINE 3397 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _childrenOmoduleHeader =+ ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImoduleHeader+ {-# LINE 3403 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _childrenOnt =+ ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsInt+ {-# LINE 3409 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _childrenOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 3415 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _childrenOpragmaBlocks =+ ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 3421 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _childrenOtextBlocks =+ ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsItextBlocks+ {-# LINE 3427 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _visitsOallFromToStates =+ ({-# LINE 1547 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallFromToStates+ {-# LINE 3433 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _visitsOallInhmap =+ ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInhmap+ {-# LINE 3439 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _visitsOallInitStates =+ ({-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInitStates+ {-# LINE 3445 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _visitsOallSynmap =+ ({-# LINE 322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallSynmap+ {-# LINE 3451 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _visitsOallVisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallVisitKinds+ {-# LINE 3457 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _visitsOallchildvisit =+ ({-# LINE 1186 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallchildvisit+ {-# LINE 3463 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _visitsOavisitdefs =+ ({-# LINE 1332 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisitdefs+ {-# LINE 3469 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _visitsOavisituses =+ ({-# LINE 1333 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisituses+ {-# LINE 3475 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (from local)+ _visitsOchildTypes =+ ({-# LINE 1564 "src-ag/ExecutionPlan2Hs.ag" #-}+ _childTypes+ {-# LINE 3481 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _visitsOinhmap =+ ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 3487 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _visitsOnextVisits =+ ({-# LINE 1533 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsInextVisits+ {-# LINE 3493 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _visitsOnt =+ ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsInt+ {-# LINE 3499 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _visitsOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 3505 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _visitsOparams =+ ({-# LINE 73 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIparams+ {-# LINE 3511 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _visitsOprevVisits =+ ({-# LINE 1533 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIprevVisits+ {-# LINE 3517 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _visitsOsynmap =+ ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 3523 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _rulesIerrors,_rulesImrules,_rulesIruledefs,_rulesIruleuses,_rulesIsem_rules) =+ rules_ _rulesOallInhmap _rulesOallSynmap _rulesOchildTypes _rulesOcon _rulesOimportBlocks _rulesOinhmap _rulesOlazyIntras _rulesOlocalAttrTypes _rulesOmainFile _rulesOmainName _rulesOmoduleHeader _rulesOnt _rulesOoptions _rulesOpragmaBlocks _rulesOruleKinds _rulesOsynmap _rulesOtextBlocks _rulesOusageInfo+ ( _childrenIargnamesw,_childrenIargpats,_childrenIargtps,_childrenIchildTypes,_childrenIchildintros,_childrenIdatatype,_childrenIterminaldefs) =+ children_ _childrenOallInitStates _childrenOcon _childrenOimportBlocks _childrenOmainFile _childrenOmainName _childrenOmoduleHeader _childrenOnt _childrenOoptions _childrenOpragmaBlocks _childrenOtextBlocks+ ( _visitsIallvisits,_visitsIchildvisit,_visitsIerrors,_visitsIfromToStates,_visitsIintramap,_visitsIlazyIntras,_visitsIruleKinds,_visitsIruleUsage,_visitsIsem_visit,_visitsIt_visits,_visitsIvisitKinds,_visitsIvisitdefs,_visitsIvisituses) =+ visits_ _visitsOallFromToStates _visitsOallInhmap _visitsOallInitStates _visitsOallSynmap _visitsOallVisitKinds _visitsOallchildvisit _visitsOallintramap _visitsOavisitdefs _visitsOavisituses _visitsOchildTypes _visitsOchildintros _visitsOcon _visitsOinhmap _visitsOmrules _visitsOnextVisits _visitsOnt _visitsOoptions _visitsOparams _visitsOprevVisits _visitsOruledefs _visitsOruleuses _visitsOsynmap _visitsOterminaldefs+ in ( _lhsOallvisits,_lhsOchildvisit,_lhsOcount,_lhsOdatatype,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOsem_nt,_lhsOsem_prod,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))))+-- EProductions ------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allFromToStates : Map VisitIdentifier (Int,Int)+ allInhmap : Map NontermIdent Attributes+ allInitStates : Map NontermIdent Int+ allSynmap : Map NontermIdent Attributes+ allVisitKinds : Map VisitIdentifier VisitKind+ allchildvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ allstates : Set StateIdentifier+ avisitdefs : Map VisitIdentifier (Set Identifier)+ avisituses : Map VisitIdentifier (Set Identifier)+ classCtxs : ClassContext+ importBlocks : PP_Doc+ inhmap : Attributes+ initial : StateIdentifier+ localAttrTypes : Map ConstructorIdent (Map Identifier Type)+ mainFile : String+ mainName : String+ moduleHeader : String -> String -> String -> Bool -> String+ nextVisits : Map StateIdentifier StateCtx+ nt : NontermIdent+ ntType : Type+ options : Options+ params : [Identifier]+ pragmaBlocks : String+ prevVisits : Map StateIdentifier StateCtx+ rename : Bool+ synmap : Attributes+ textBlocks : PP_Doc+ synthesized attributes:+ allvisits : [VisitStateState]+ childvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ count : Int+ datatype : [PP_Doc]+ errors : Seq Error+ fromToStates : Map VisitIdentifier (Int,Int)+ genProdIO : IO ()+ imports : [PP_Doc]+ semFunBndDefs : Seq PP_Doc+ semFunBndTps : Seq PP_Doc+ sem_nt : PP_Doc+ sem_prod : PP_Doc+ t_visits : PP_Doc+ visitKinds : Map VisitIdentifier VisitKind+ visitdefs : Map VisitIdentifier (Set Identifier)+ visituses : Map VisitIdentifier (Set Identifier)+ alternatives:+ alternative Cons:+ child hd : EProduction + child tl : EProductions + alternative Nil:+-}+-- cata+sem_EProductions :: EProductions ->+ T_EProductions+sem_EProductions list =+ (Prelude.foldr sem_EProductions_Cons sem_EProductions_Nil (Prelude.map sem_EProduction list))+-- semantic domain+newtype T_EProductions = T_EProductions ((Map VisitIdentifier (Int,Int)) ->+ (Map NontermIdent Attributes) ->+ (Map NontermIdent Int) ->+ (Map NontermIdent Attributes) ->+ (Map VisitIdentifier VisitKind) ->+ (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ (Set StateIdentifier) ->+ (Map VisitIdentifier (Set Identifier)) ->+ (Map VisitIdentifier (Set Identifier)) ->+ ClassContext ->+ PP_Doc ->+ Attributes ->+ StateIdentifier ->+ (Map ConstructorIdent (Map Identifier Type)) ->+ String ->+ String ->+ (String -> String -> String -> Bool -> String) ->+ (Map StateIdentifier StateCtx) ->+ NontermIdent ->+ Type ->+ Options ->+ ([Identifier]) ->+ String ->+ (Map StateIdentifier StateCtx) ->+ Bool ->+ Attributes ->+ PP_Doc ->+ ( ([VisitStateState]),(Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),Int,([PP_Doc]),(Seq Error),(Map VisitIdentifier (Int,Int)),(IO ()),([PP_Doc]),(Seq PP_Doc),(Seq PP_Doc),PP_Doc,PP_Doc,PP_Doc,(Map VisitIdentifier VisitKind),(Map VisitIdentifier (Set Identifier)),(Map VisitIdentifier (Set Identifier))))+data Inh_EProductions = Inh_EProductions {allFromToStates_Inh_EProductions :: (Map VisitIdentifier (Int,Int)),allInhmap_Inh_EProductions :: (Map NontermIdent Attributes),allInitStates_Inh_EProductions :: (Map NontermIdent Int),allSynmap_Inh_EProductions :: (Map NontermIdent Attributes),allVisitKinds_Inh_EProductions :: (Map VisitIdentifier VisitKind),allchildvisit_Inh_EProductions :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),allstates_Inh_EProductions :: (Set StateIdentifier),avisitdefs_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)),avisituses_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)),classCtxs_Inh_EProductions :: ClassContext,importBlocks_Inh_EProductions :: PP_Doc,inhmap_Inh_EProductions :: Attributes,initial_Inh_EProductions :: StateIdentifier,localAttrTypes_Inh_EProductions :: (Map ConstructorIdent (Map Identifier Type)),mainFile_Inh_EProductions :: String,mainName_Inh_EProductions :: String,moduleHeader_Inh_EProductions :: (String -> String -> String -> Bool -> String),nextVisits_Inh_EProductions :: (Map StateIdentifier StateCtx),nt_Inh_EProductions :: NontermIdent,ntType_Inh_EProductions :: Type,options_Inh_EProductions :: Options,params_Inh_EProductions :: ([Identifier]),pragmaBlocks_Inh_EProductions :: String,prevVisits_Inh_EProductions :: (Map StateIdentifier StateCtx),rename_Inh_EProductions :: Bool,synmap_Inh_EProductions :: Attributes,textBlocks_Inh_EProductions :: PP_Doc}+data Syn_EProductions = Syn_EProductions {allvisits_Syn_EProductions :: ([VisitStateState]),childvisit_Syn_EProductions :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),count_Syn_EProductions :: Int,datatype_Syn_EProductions :: ([PP_Doc]),errors_Syn_EProductions :: (Seq Error),fromToStates_Syn_EProductions :: (Map VisitIdentifier (Int,Int)),genProdIO_Syn_EProductions :: (IO ()),imports_Syn_EProductions :: ([PP_Doc]),semFunBndDefs_Syn_EProductions :: (Seq PP_Doc),semFunBndTps_Syn_EProductions :: (Seq PP_Doc),sem_nt_Syn_EProductions :: PP_Doc,sem_prod_Syn_EProductions :: PP_Doc,t_visits_Syn_EProductions :: PP_Doc,visitKinds_Syn_EProductions :: (Map VisitIdentifier VisitKind),visitdefs_Syn_EProductions :: (Map VisitIdentifier (Set Identifier)),visituses_Syn_EProductions :: (Map VisitIdentifier (Set Identifier))}+wrap_EProductions :: T_EProductions ->+ Inh_EProductions ->+ Syn_EProductions+wrap_EProductions (T_EProductions sem) (Inh_EProductions _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks) =+ (let ( _lhsOallvisits,_lhsOchildvisit,_lhsOcount,_lhsOdatatype,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOsem_nt,_lhsOsem_prod,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses) = sem _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks+ in (Syn_EProductions _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses))+sem_EProductions_Cons :: T_EProduction ->+ T_EProductions ->+ T_EProductions+sem_EProductions_Cons (T_EProduction hd_) (T_EProductions tl_) =+ (T_EProductions (\ _lhsIallFromToStates+ _lhsIallInhmap+ _lhsIallInitStates+ _lhsIallSynmap+ _lhsIallVisitKinds+ _lhsIallchildvisit+ _lhsIallstates+ _lhsIavisitdefs+ _lhsIavisituses+ _lhsIclassCtxs+ _lhsIimportBlocks+ _lhsIinhmap+ _lhsIinitial+ _lhsIlocalAttrTypes+ _lhsImainFile+ _lhsImainName+ _lhsImoduleHeader+ _lhsInextVisits+ _lhsInt+ _lhsIntType+ _lhsIoptions+ _lhsIparams+ _lhsIpragmaBlocks+ _lhsIprevVisits+ _lhsIrename+ _lhsIsynmap+ _lhsItextBlocks ->+ (let _lhsOallvisits :: ([VisitStateState])+ _lhsOt_visits :: PP_Doc+ _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _lhsOcount :: Int+ _lhsOdatatype :: ([PP_Doc])+ _lhsOerrors :: (Seq Error)+ _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))+ _lhsOgenProdIO :: (IO ())+ _lhsOimports :: ([PP_Doc])+ _lhsOsemFunBndDefs :: (Seq PP_Doc)+ _lhsOsemFunBndTps :: (Seq PP_Doc)+ _lhsOsem_nt :: PP_Doc+ _lhsOsem_prod :: PP_Doc+ _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)+ _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))+ _hdOallFromToStates :: (Map VisitIdentifier (Int,Int))+ _hdOallInhmap :: (Map NontermIdent Attributes)+ _hdOallInitStates :: (Map NontermIdent Int)+ _hdOallSynmap :: (Map NontermIdent Attributes)+ _hdOallVisitKinds :: (Map VisitIdentifier VisitKind)+ _hdOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _hdOallstates :: (Set StateIdentifier)+ _hdOavisitdefs :: (Map VisitIdentifier (Set Identifier))+ _hdOavisituses :: (Map VisitIdentifier (Set Identifier))+ _hdOclassCtxs :: ClassContext+ _hdOimportBlocks :: PP_Doc+ _hdOinhmap :: Attributes+ _hdOinitial :: StateIdentifier+ _hdOlocalAttrTypes :: (Map ConstructorIdent (Map Identifier Type))+ _hdOmainFile :: String+ _hdOmainName :: String+ _hdOmoduleHeader :: (String -> String -> String -> Bool -> String)+ _hdOnextVisits :: (Map StateIdentifier StateCtx)+ _hdOnt :: NontermIdent+ _hdOntType :: Type+ _hdOoptions :: Options+ _hdOparams :: ([Identifier])+ _hdOpragmaBlocks :: String+ _hdOprevVisits :: (Map StateIdentifier StateCtx)+ _hdOrename :: Bool+ _hdOsynmap :: Attributes+ _hdOtextBlocks :: PP_Doc+ _tlOallFromToStates :: (Map VisitIdentifier (Int,Int))+ _tlOallInhmap :: (Map NontermIdent Attributes)+ _tlOallInitStates :: (Map NontermIdent Int)+ _tlOallSynmap :: (Map NontermIdent Attributes)+ _tlOallVisitKinds :: (Map VisitIdentifier VisitKind)+ _tlOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _tlOallstates :: (Set StateIdentifier)+ _tlOavisitdefs :: (Map VisitIdentifier (Set Identifier))+ _tlOavisituses :: (Map VisitIdentifier (Set Identifier))+ _tlOclassCtxs :: ClassContext+ _tlOimportBlocks :: PP_Doc+ _tlOinhmap :: Attributes+ _tlOinitial :: StateIdentifier+ _tlOlocalAttrTypes :: (Map ConstructorIdent (Map Identifier Type))+ _tlOmainFile :: String+ _tlOmainName :: String+ _tlOmoduleHeader :: (String -> String -> String -> Bool -> String)+ _tlOnextVisits :: (Map StateIdentifier StateCtx)+ _tlOnt :: NontermIdent+ _tlOntType :: Type+ _tlOoptions :: Options+ _tlOparams :: ([Identifier])+ _tlOpragmaBlocks :: String+ _tlOprevVisits :: (Map StateIdentifier StateCtx)+ _tlOrename :: Bool+ _tlOsynmap :: Attributes+ _tlOtextBlocks :: PP_Doc+ _hdIallvisits :: ([VisitStateState])+ _hdIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _hdIcount :: Int+ _hdIdatatype :: PP_Doc+ _hdIerrors :: (Seq Error)+ _hdIfromToStates :: (Map VisitIdentifier (Int,Int))+ _hdIgenProdIO :: (IO ())+ _hdIimports :: ([PP_Doc])+ _hdIsemFunBndDefs :: (Seq PP_Doc)+ _hdIsemFunBndTps :: (Seq PP_Doc)+ _hdIsem_nt :: PP_Doc+ _hdIsem_prod :: PP_Doc+ _hdIt_visits :: PP_Doc+ _hdIvisitKinds :: (Map VisitIdentifier VisitKind)+ _hdIvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _hdIvisituses :: (Map VisitIdentifier (Set Identifier))+ _tlIallvisits :: ([VisitStateState])+ _tlIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _tlIcount :: Int+ _tlIdatatype :: ([PP_Doc])+ _tlIerrors :: (Seq Error)+ _tlIfromToStates :: (Map VisitIdentifier (Int,Int))+ _tlIgenProdIO :: (IO ())+ _tlIimports :: ([PP_Doc])+ _tlIsemFunBndDefs :: (Seq PP_Doc)+ _tlIsemFunBndTps :: (Seq PP_Doc)+ _tlIsem_nt :: PP_Doc+ _tlIsem_prod :: PP_Doc+ _tlIt_visits :: PP_Doc+ _tlIvisitKinds :: (Map VisitIdentifier VisitKind)+ _tlIvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _tlIvisituses :: (Map VisitIdentifier (Set Identifier))+ -- "src-ag/ExecutionPlan2Hs.ag"(line 344, column 10)+ _lhsOallvisits =+ ({-# LINE 344 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIallvisits+ {-# LINE 3765 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 397, column 10)+ _lhsOt_visits =+ ({-# LINE 397 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIt_visits+ {-# LINE 3771 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1187, column 37)+ _lhsOchildvisit =+ ({-# LINE 1187 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIchildvisit `Map.union` _tlIchildvisit+ {-# LINE 3777 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 288, column 43)+ _lhsOcount =+ ({-# LINE 288 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIcount + _tlIcount+ {-# LINE 3783 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 179, column 34)+ _lhsOdatatype =+ ({-# LINE 179 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIdatatype : _tlIdatatype+ {-# LINE 3789 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1629, column 132)+ _lhsOerrors =+ ({-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 3795 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1544, column 22)+ _lhsOfromToStates =+ ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIfromToStates `mappend` _tlIfromToStates+ {-# LINE 3801 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1464, column 49)+ _lhsOgenProdIO =+ ({-# LINE 1464 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIgenProdIO >> _tlIgenProdIO+ {-# LINE 3807 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1463, column 47)+ _lhsOimports =+ ({-# LINE 1463 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIimports ++ _tlIimports+ {-# LINE 3813 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 515, column 92)+ _lhsOsemFunBndDefs =+ ({-# LINE 515 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIsemFunBndDefs Seq.>< _tlIsemFunBndDefs+ {-# LINE 3819 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 515, column 92)+ _lhsOsemFunBndTps =+ ({-# LINE 515 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIsemFunBndTps Seq.>< _tlIsemFunBndTps+ {-# LINE 3825 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 292, column 44)+ _lhsOsem_nt =+ ({-# LINE 292 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIsem_nt >-< _tlIsem_nt+ {-# LINE 3831 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 554, column 34)+ _lhsOsem_prod =+ ({-# LINE 554 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIsem_prod >-< _tlIsem_prod+ {-# LINE 3837 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1591, column 68)+ _lhsOvisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIvisitKinds `mappend` _tlIvisitKinds+ {-# LINE 3843 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1322, column 36)+ _lhsOvisitdefs =+ ({-# LINE 1322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIvisitdefs `uwSetUnion` _tlIvisitdefs+ {-# LINE 3849 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1323, column 36)+ _lhsOvisituses =+ ({-# LINE 1323 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIvisituses `uwSetUnion` _tlIvisituses+ {-# LINE 3855 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallFromToStates =+ ({-# LINE 1547 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallFromToStates+ {-# LINE 3861 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallInhmap =+ ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInhmap+ {-# LINE 3867 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallInitStates =+ ({-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInitStates+ {-# LINE 3873 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallSynmap =+ ({-# LINE 322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallSynmap+ {-# LINE 3879 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallVisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallVisitKinds+ {-# LINE 3885 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallchildvisit =+ ({-# LINE 1186 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallchildvisit+ {-# LINE 3891 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallstates =+ ({-# LINE 557 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallstates+ {-# LINE 3897 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOavisitdefs =+ ({-# LINE 1332 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisitdefs+ {-# LINE 3903 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOavisituses =+ ({-# LINE 1333 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisituses+ {-# LINE 3909 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOclassCtxs =+ ({-# LINE 77 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIclassCtxs+ {-# LINE 3915 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOimportBlocks =+ ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIimportBlocks+ {-# LINE 3921 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOinhmap =+ ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 3927 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOinitial =+ ({-# LINE 556 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinitial+ {-# LINE 3933 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOlocalAttrTypes =+ ({-# LINE 1577 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIlocalAttrTypes+ {-# LINE 3939 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOmainFile =+ ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainFile+ {-# LINE 3945 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOmainName =+ ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainName+ {-# LINE 3951 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOmoduleHeader =+ ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImoduleHeader+ {-# LINE 3957 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOnextVisits =+ ({-# LINE 1533 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsInextVisits+ {-# LINE 3963 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsInt+ {-# LINE 3969 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOntType =+ ({-# LINE 1620 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIntType+ {-# LINE 3975 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 3981 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOparams =+ ({-# LINE 73 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIparams+ {-# LINE 3987 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOpragmaBlocks =+ ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 3993 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOprevVisits =+ ({-# LINE 1533 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIprevVisits+ {-# LINE 3999 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOrename =+ ({-# LINE 52 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIrename+ {-# LINE 4005 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOsynmap =+ ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 4011 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOtextBlocks =+ ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsItextBlocks+ {-# LINE 4017 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallFromToStates =+ ({-# LINE 1547 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallFromToStates+ {-# LINE 4023 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallInhmap =+ ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInhmap+ {-# LINE 4029 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallInitStates =+ ({-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInitStates+ {-# LINE 4035 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallSynmap =+ ({-# LINE 322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallSynmap+ {-# LINE 4041 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallVisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallVisitKinds+ {-# LINE 4047 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallchildvisit =+ ({-# LINE 1186 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallchildvisit+ {-# LINE 4053 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallstates =+ ({-# LINE 557 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallstates+ {-# LINE 4059 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOavisitdefs =+ ({-# LINE 1332 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisitdefs+ {-# LINE 4065 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOavisituses =+ ({-# LINE 1333 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisituses+ {-# LINE 4071 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOclassCtxs =+ ({-# LINE 77 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIclassCtxs+ {-# LINE 4077 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOimportBlocks =+ ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIimportBlocks+ {-# LINE 4083 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOinhmap =+ ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 4089 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOinitial =+ ({-# LINE 556 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinitial+ {-# LINE 4095 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOlocalAttrTypes =+ ({-# LINE 1577 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIlocalAttrTypes+ {-# LINE 4101 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOmainFile =+ ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainFile+ {-# LINE 4107 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOmainName =+ ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainName+ {-# LINE 4113 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOmoduleHeader =+ ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImoduleHeader+ {-# LINE 4119 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOnextVisits =+ ({-# LINE 1533 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsInextVisits+ {-# LINE 4125 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsInt+ {-# LINE 4131 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOntType =+ ({-# LINE 1620 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIntType+ {-# LINE 4137 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 4143 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOparams =+ ({-# LINE 73 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIparams+ {-# LINE 4149 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOpragmaBlocks =+ ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 4155 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOprevVisits =+ ({-# LINE 1533 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIprevVisits+ {-# LINE 4161 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOrename =+ ({-# LINE 52 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIrename+ {-# LINE 4167 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOsynmap =+ ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 4173 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOtextBlocks =+ ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsItextBlocks+ {-# LINE 4179 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _hdIallvisits,_hdIchildvisit,_hdIcount,_hdIdatatype,_hdIerrors,_hdIfromToStates,_hdIgenProdIO,_hdIimports,_hdIsemFunBndDefs,_hdIsemFunBndTps,_hdIsem_nt,_hdIsem_prod,_hdIt_visits,_hdIvisitKinds,_hdIvisitdefs,_hdIvisituses) =+ hd_ _hdOallFromToStates _hdOallInhmap _hdOallInitStates _hdOallSynmap _hdOallVisitKinds _hdOallchildvisit _hdOallstates _hdOavisitdefs _hdOavisituses _hdOclassCtxs _hdOimportBlocks _hdOinhmap _hdOinitial _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnextVisits _hdOnt _hdOntType _hdOoptions _hdOparams _hdOpragmaBlocks _hdOprevVisits _hdOrename _hdOsynmap _hdOtextBlocks+ ( _tlIallvisits,_tlIchildvisit,_tlIcount,_tlIdatatype,_tlIerrors,_tlIfromToStates,_tlIgenProdIO,_tlIimports,_tlIsemFunBndDefs,_tlIsemFunBndTps,_tlIsem_nt,_tlIsem_prod,_tlIt_visits,_tlIvisitKinds,_tlIvisitdefs,_tlIvisituses) =+ tl_ _tlOallFromToStates _tlOallInhmap _tlOallInitStates _tlOallSynmap _tlOallVisitKinds _tlOallchildvisit _tlOallstates _tlOavisitdefs _tlOavisituses _tlOclassCtxs _tlOimportBlocks _tlOinhmap _tlOinitial _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnextVisits _tlOnt _tlOntType _tlOoptions _tlOparams _tlOpragmaBlocks _tlOprevVisits _tlOrename _tlOsynmap _tlOtextBlocks+ in ( _lhsOallvisits,_lhsOchildvisit,_lhsOcount,_lhsOdatatype,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOsem_nt,_lhsOsem_prod,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))))+sem_EProductions_Nil :: T_EProductions+sem_EProductions_Nil =+ (T_EProductions (\ _lhsIallFromToStates+ _lhsIallInhmap+ _lhsIallInitStates+ _lhsIallSynmap+ _lhsIallVisitKinds+ _lhsIallchildvisit+ _lhsIallstates+ _lhsIavisitdefs+ _lhsIavisituses+ _lhsIclassCtxs+ _lhsIimportBlocks+ _lhsIinhmap+ _lhsIinitial+ _lhsIlocalAttrTypes+ _lhsImainFile+ _lhsImainName+ _lhsImoduleHeader+ _lhsInextVisits+ _lhsInt+ _lhsIntType+ _lhsIoptions+ _lhsIparams+ _lhsIpragmaBlocks+ _lhsIprevVisits+ _lhsIrename+ _lhsIsynmap+ _lhsItextBlocks ->+ (let _lhsOallvisits :: ([VisitStateState])+ _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _lhsOcount :: Int+ _lhsOdatatype :: ([PP_Doc])+ _lhsOerrors :: (Seq Error)+ _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))+ _lhsOgenProdIO :: (IO ())+ _lhsOimports :: ([PP_Doc])+ _lhsOsemFunBndDefs :: (Seq PP_Doc)+ _lhsOsemFunBndTps :: (Seq PP_Doc)+ _lhsOsem_nt :: PP_Doc+ _lhsOsem_prod :: PP_Doc+ _lhsOt_visits :: PP_Doc+ _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)+ _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))+ -- "src-ag/ExecutionPlan2Hs.ag"(line 345, column 10)+ _lhsOallvisits =+ ({-# LINE 345 "src-ag/ExecutionPlan2Hs.ag" #-}+ error "Every nonterminal should have at least 1 production"+ {-# LINE 4235 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1187, column 37)+ _lhsOchildvisit =+ ({-# LINE 1187 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 4241 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 288, column 43)+ _lhsOcount =+ ({-# LINE 288 "src-ag/ExecutionPlan2Hs.ag" #-}+ 0+ {-# LINE 4247 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 179, column 34)+ _lhsOdatatype =+ ({-# LINE 179 "src-ag/ExecutionPlan2Hs.ag" #-}+ []+ {-# LINE 4253 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1629, column 132)+ _lhsOerrors =+ ({-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}+ Seq.empty+ {-# LINE 4259 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1544, column 22)+ _lhsOfromToStates =+ ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}+ mempty+ {-# LINE 4265 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1464, column 49)+ _lhsOgenProdIO =+ ({-# LINE 1464 "src-ag/ExecutionPlan2Hs.ag" #-}+ return ()+ {-# LINE 4271 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1463, column 47)+ _lhsOimports =+ ({-# LINE 1463 "src-ag/ExecutionPlan2Hs.ag" #-}+ []+ {-# LINE 4277 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 515, column 92)+ _lhsOsemFunBndDefs =+ ({-# LINE 515 "src-ag/ExecutionPlan2Hs.ag" #-}+ Seq.empty+ {-# LINE 4283 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 515, column 92)+ _lhsOsemFunBndTps =+ ({-# LINE 515 "src-ag/ExecutionPlan2Hs.ag" #-}+ Seq.empty+ {-# LINE 4289 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 292, column 44)+ _lhsOsem_nt =+ ({-# LINE 292 "src-ag/ExecutionPlan2Hs.ag" #-}+ empty+ {-# LINE 4295 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 554, column 34)+ _lhsOsem_prod =+ ({-# LINE 554 "src-ag/ExecutionPlan2Hs.ag" #-}+ empty+ {-# LINE 4301 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 394, column 59)+ _lhsOt_visits =+ ({-# LINE 394 "src-ag/ExecutionPlan2Hs.ag" #-}+ empty+ {-# LINE 4307 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1591, column 68)+ _lhsOvisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ mempty+ {-# LINE 4313 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1322, column 36)+ _lhsOvisitdefs =+ ({-# LINE 1322 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 4319 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1323, column 36)+ _lhsOvisituses =+ ({-# LINE 1323 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 4325 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOallvisits,_lhsOchildvisit,_lhsOcount,_lhsOdatatype,_lhsOerrors,_lhsOfromToStates,_lhsOgenProdIO,_lhsOimports,_lhsOsemFunBndDefs,_lhsOsemFunBndTps,_lhsOsem_nt,_lhsOsem_prod,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))))+-- ERule -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allInhmap : Map NontermIdent Attributes+ allSynmap : Map NontermIdent Attributes+ childTypes : Map Identifier Type+ con : ConstructorIdent+ importBlocks : PP_Doc+ inhmap : Attributes+ lazyIntras : Set String+ localAttrTypes : Map Identifier Type+ mainFile : String+ mainName : String+ moduleHeader : String -> String -> String -> Bool -> String+ nt : NontermIdent+ options : Options+ pragmaBlocks : String+ ruleKinds : Map Identifier (Set VisitKind)+ synmap : Attributes+ textBlocks : PP_Doc+ usageInfo : Map Identifier Int+ synthesized attributes:+ errors : Seq Error+ mrules : Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)+ ruledefs : Map Identifier (Set String)+ ruleuses : Map Identifier (Map String (Maybe NonLocalAttr))+ sem_rules : PP_Doc+ alternatives:+ alternative ERule:+ child name : {Identifier}+ child pattern : Pattern + child rhs : Expression + child owrt : {Bool}+ child origin : {String}+ child explicit : {Bool}+ child pure : {Bool}+ child mbError : {Maybe Error}+ visit 0:+ local rulecode : _+ local rulePragma : _+ local scc : _+ local pragma : _+ local endpragma : _+ local genpragma : _+ local haspos : _+ local lambda : _+ local argPats : _+ local argExprs : _+ local stepcode : _+ local used : _+ local kinds : _+ local anyLazyKind : _+ local addbang : _+ local addbang1 : _+-}+-- cata+sem_ERule :: ERule ->+ T_ERule+sem_ERule (ERule _name _pattern _rhs _owrt _origin _explicit _pure _mbError) =+ (sem_ERule_ERule _name (sem_Pattern _pattern) (sem_Expression _rhs) _owrt _origin _explicit _pure _mbError)+-- semantic domain+newtype T_ERule = T_ERule ((Map NontermIdent Attributes) ->+ (Map NontermIdent Attributes) ->+ (Map Identifier Type) ->+ ConstructorIdent ->+ PP_Doc ->+ Attributes ->+ (Set String) ->+ (Map Identifier Type) ->+ String ->+ String ->+ (String -> String -> String -> Bool -> String) ->+ NontermIdent ->+ Options ->+ String ->+ (Map Identifier (Set VisitKind)) ->+ Attributes ->+ PP_Doc ->+ (Map Identifier Int) ->+ ( (Seq Error),(Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)),(Map Identifier (Set String)),(Map Identifier (Map String (Maybe NonLocalAttr))),PP_Doc))+data Inh_ERule = Inh_ERule {allInhmap_Inh_ERule :: (Map NontermIdent Attributes),allSynmap_Inh_ERule :: (Map NontermIdent Attributes),childTypes_Inh_ERule :: (Map Identifier Type),con_Inh_ERule :: ConstructorIdent,importBlocks_Inh_ERule :: PP_Doc,inhmap_Inh_ERule :: Attributes,lazyIntras_Inh_ERule :: (Set String),localAttrTypes_Inh_ERule :: (Map Identifier Type),mainFile_Inh_ERule :: String,mainName_Inh_ERule :: String,moduleHeader_Inh_ERule :: (String -> String -> String -> Bool -> String),nt_Inh_ERule :: NontermIdent,options_Inh_ERule :: Options,pragmaBlocks_Inh_ERule :: String,ruleKinds_Inh_ERule :: (Map Identifier (Set VisitKind)),synmap_Inh_ERule :: Attributes,textBlocks_Inh_ERule :: PP_Doc,usageInfo_Inh_ERule :: (Map Identifier Int)}+data Syn_ERule = Syn_ERule {errors_Syn_ERule :: (Seq Error),mrules_Syn_ERule :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)),ruledefs_Syn_ERule :: (Map Identifier (Set String)),ruleuses_Syn_ERule :: (Map Identifier (Map String (Maybe NonLocalAttr))),sem_rules_Syn_ERule :: PP_Doc}+wrap_ERule :: T_ERule ->+ Inh_ERule ->+ Syn_ERule+wrap_ERule (T_ERule sem) (Inh_ERule _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo) =+ (let ( _lhsOerrors,_lhsOmrules,_lhsOruledefs,_lhsOruleuses,_lhsOsem_rules) = sem _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo+ in (Syn_ERule _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules))+sem_ERule_ERule :: Identifier ->+ T_Pattern ->+ T_Expression ->+ Bool ->+ String ->+ Bool ->+ Bool ->+ (Maybe Error) ->+ T_ERule+sem_ERule_ERule name_ (T_Pattern pattern_) (T_Expression rhs_) owrt_ origin_ explicit_ pure_ mbError_ =+ (T_ERule (\ _lhsIallInhmap+ _lhsIallSynmap+ _lhsIchildTypes+ _lhsIcon+ _lhsIimportBlocks+ _lhsIinhmap+ _lhsIlazyIntras+ _lhsIlocalAttrTypes+ _lhsImainFile+ _lhsImainName+ _lhsImoduleHeader+ _lhsInt+ _lhsIoptions+ _lhsIpragmaBlocks+ _lhsIruleKinds+ _lhsIsynmap+ _lhsItextBlocks+ _lhsIusageInfo ->+ (let _lhsOsem_rules :: PP_Doc+ _lhsOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))+ _lhsOruledefs :: (Map Identifier (Set String))+ _lhsOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))+ _lhsOerrors :: (Seq Error)+ _patternOallInhmap :: (Map NontermIdent Attributes)+ _patternOallSynmap :: (Map NontermIdent Attributes)+ _patternOanyLazyKind :: Bool+ _patternOinhmap :: Attributes+ _patternOlocalAttrTypes :: (Map Identifier Type)+ _patternOoptions :: Options+ _patternOsynmap :: Attributes+ _patternIattrTypes :: PP_Doc+ _patternIattrs :: (Set String)+ _patternIcopy :: Pattern+ _patternIisUnderscore :: Bool+ _patternIsem_lhs :: ( PP_Doc )+ _rhsIattrs :: (Map String (Maybe NonLocalAttr))+ _rhsIpos :: Pos+ _rhsIsemfunc :: PP_Doc+ _rhsItks :: ([HsToken])+ -- "src-ag/ExecutionPlan2Hs.ag"(line 965, column 6)+ _lhsOsem_rules =+ ({-# LINE 965 "src-ag/ExecutionPlan2Hs.ag" #-}+ if _used == 0+ then empty+ else _rulePragma >-< _rulecode+ {-# LINE 4472 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 968, column 6)+ _rulecode =+ ({-# LINE 968 "src-ag/ExecutionPlan2Hs.ag" #-}+ ( if _genpragma+ then _pragma+ else empty+ )+ >-< _lambda >#< _scc+ >-< indent ((column _rhsIpos - 2) `max` 2)+ ( if _genpragma+ then _pragma >-< _rhsIsemfunc >-< _endpragma+ else _rhsIsemfunc+ )+ {-# LINE 4487 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 980, column 7)+ _rulePragma =+ ({-# LINE 980 "src-ag/ExecutionPlan2Hs.ag" #-}+ ( let reallyInlineStr = "INLINE"+ reallyNoInlineStr = "NOINLINE"+ in if noInlinePragmas _lhsIoptions+ then empty+ else if _used == 1+ then ppPragmaBinding reallyInlineStr name_+ else if helpInlining _lhsIoptions+ then if not explicit_ && _used <= reallyOftenUsedThreshold+ then ppPragmaBinding "INLINE[1]" name_+ else if _used > ruleInlineThresholdSoft && explicit_+ then if _used > ruleInlineThresholdHard+ then ppPragmaBinding reallyNoInlineStr name_+ else if aggressiveInlinePragmas _lhsIoptions+ then ppPragmaBinding "NOINLINE[2]" name_+ else ppNoInline name_+ else if aggressiveInlinePragmas _lhsIoptions+ then ppPragmaBinding "NOINLINE[1]" name_+ else ppNoInline name_+ else if not explicit_ || _used <= ruleInlineThresholdSoft+ then ppPragmaBinding "NOINLINE[1]" name_+ else ppNoInline name_+ )+ {-# LINE 4514 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1002, column 7)+ _scc =+ ({-# LINE 1002 "src-ag/ExecutionPlan2Hs.ag" #-}+ if genCostCentres _lhsIoptions && explicit_ && pure_ && not (noPerRuleCostCentres _lhsIoptions)+ then ppCostCentre (name_ >|< "_" >|< line _rhsIpos >|< "_" >|< _lhsInt >|< "_" >|< _lhsIcon)+ else empty+ {-# LINE 4522 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1005, column 7)+ _pragma =+ ({-# LINE 1005 "src-ag/ExecutionPlan2Hs.ag" #-}+ "{-# LINE" >#< show (line _rhsIpos) >#< show (file _rhsIpos) >#< "#-}"+ {-# LINE 4528 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1006, column 7)+ _endpragma =+ ({-# LINE 1006 "src-ag/ExecutionPlan2Hs.ag" #-}+ ppWithLineNr (\ln -> "{-# LINE " ++ show (ln+1) ++ " " ++ show _lhsImainFile ++ "#-}")+ {-# LINE 4534 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1007, column 7)+ _genpragma =+ ({-# LINE 1007 "src-ag/ExecutionPlan2Hs.ag" #-}+ genLinePragmas _lhsIoptions && explicit_ && _haspos+ {-# LINE 4540 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1008, column 7)+ _haspos =+ ({-# LINE 1008 "src-ag/ExecutionPlan2Hs.ag" #-}+ line _rhsIpos > 0 && column _rhsIpos >= 0 && not (null (file _rhsIpos))+ {-# LINE 4546 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1017, column 7)+ _lambda =+ ({-# LINE 1017 "src-ag/ExecutionPlan2Hs.ag" #-}+ name_ >#< "=" >#< "\\" >#< _argPats >#< dummyPat _lhsIoptions (Map.null _rhsIattrs) >#< "->"+ {-# LINE 4552 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1019, column 7)+ _argPats =+ ({-# LINE 1019 "src-ag/ExecutionPlan2Hs.ag" #-}+ ppSpaced [ let match | str `Set.member` _lhsIlazyIntras = pp str+ | otherwise = _addbang1 (pp str)+ in case mbAttr of+ Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->+ case Map.lookup nm _lhsIlocalAttrTypes of+ Just tp -> pp_parens (pp_parens match >#< "::" >#< ppTp tp)+ Nothing -> match+ Just attr | not (noPerRuleTypeSigs _lhsIoptions) ->+ case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes of+ Just tpDoc -> pp_parens (pp_parens match >#< "::" >#< tpDoc)+ Nothing -> match+ _ -> match+ | (str,mbAttr) <- Map.assocs _rhsIattrs+ ]+ {-# LINE 4571 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1033, column 7)+ _argExprs =+ ({-# LINE 1033 "src-ag/ExecutionPlan2Hs.ag" #-}+ ppSpaced $ Map.keys _rhsIattrs+ {-# LINE 4577 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1034, column 7)+ _stepcode =+ ({-# LINE 1034 "src-ag/ExecutionPlan2Hs.ag" #-}+ \kind fmtMode -> if kind `compatibleRule` pure_+ then Right $ let oper | pure_ = "="+ | otherwise = "<-"+ decl = _patternIsem_lhs >#< oper >#< name_ >#< _argExprs >#< dummyArg _lhsIoptions (Map.null _rhsIattrs)+ tp = if pure_ && not (noPerRuleTypeSigs _lhsIoptions)+ then _patternIattrTypes+ else empty+ in fmtDecl pure_ fmtMode (tp >-< decl)+ else Left $ IncompatibleRuleKind name_ kind+ {-# LINE 4591 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1044, column 7)+ _lhsOmrules =+ ({-# LINE 1044 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ _stepcode+ {-# LINE 4597 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1248, column 32)+ _used =+ ({-# LINE 1248 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault 0 name_ _lhsIusageInfo+ {-# LINE 4603 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1264, column 3)+ _kinds =+ ({-# LINE 1264 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault Set.empty name_ _lhsIruleKinds+ {-# LINE 4609 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1265, column 3)+ _anyLazyKind =+ ({-# LINE 1265 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.fold (\k r -> isLazyKind k || r) False _kinds+ {-# LINE 4615 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1311, column 11)+ _lhsOruledefs =+ ({-# LINE 1311 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ _patternIattrs+ {-# LINE 4621 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1312, column 11)+ _lhsOruleuses =+ ({-# LINE 1312 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ _rhsIattrs+ {-# LINE 4627 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1514, column 37)+ _addbang =+ ({-# LINE 1514 "src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 4633 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1525, column 37)+ _addbang1 =+ ({-# LINE 1525 "src-ag/ExecutionPlan2Hs.ag" #-}+ if _anyLazyKind then id else _addbang+ {-# LINE 4639 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1631, column 3)+ _lhsOerrors =+ ({-# LINE 1631 "src-ag/ExecutionPlan2Hs.ag" #-}+ case mbError_ of+ Just e | _used > 0 -> Seq.singleton e+ _ -> Seq.empty+ {-# LINE 4647 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patternOallInhmap =+ ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInhmap+ {-# LINE 4653 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patternOallSynmap =+ ({-# LINE 322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallSynmap+ {-# LINE 4659 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (from local)+ _patternOanyLazyKind =+ ({-# LINE 1267 "src-ag/ExecutionPlan2Hs.ag" #-}+ _anyLazyKind+ {-# LINE 4665 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patternOinhmap =+ ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 4671 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patternOlocalAttrTypes =+ ({-# LINE 1578 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIlocalAttrTypes+ {-# LINE 4677 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patternOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 4683 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patternOsynmap =+ ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 4689 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _patternIattrTypes,_patternIattrs,_patternIcopy,_patternIisUnderscore,_patternIsem_lhs) =+ pattern_ _patternOallInhmap _patternOallSynmap _patternOanyLazyKind _patternOinhmap _patternOlocalAttrTypes _patternOoptions _patternOsynmap+ ( _rhsIattrs,_rhsIpos,_rhsIsemfunc,_rhsItks) =+ rhs_+ in ( _lhsOerrors,_lhsOmrules,_lhsOruledefs,_lhsOruleuses,_lhsOsem_rules))))+-- ERules ------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allInhmap : Map NontermIdent Attributes+ allSynmap : Map NontermIdent Attributes+ childTypes : Map Identifier Type+ con : ConstructorIdent+ importBlocks : PP_Doc+ inhmap : Attributes+ lazyIntras : Set String+ localAttrTypes : Map Identifier Type+ mainFile : String+ mainName : String+ moduleHeader : String -> String -> String -> Bool -> String+ nt : NontermIdent+ options : Options+ pragmaBlocks : String+ ruleKinds : Map Identifier (Set VisitKind)+ synmap : Attributes+ textBlocks : PP_Doc+ usageInfo : Map Identifier Int+ synthesized attributes:+ errors : Seq Error+ mrules : Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)+ ruledefs : Map Identifier (Set String)+ ruleuses : Map Identifier (Map String (Maybe NonLocalAttr))+ sem_rules : PP_Doc+ alternatives:+ alternative Cons:+ child hd : ERule + child tl : ERules + alternative Nil:+-}+-- cata+sem_ERules :: ERules ->+ T_ERules+sem_ERules list =+ (Prelude.foldr sem_ERules_Cons sem_ERules_Nil (Prelude.map sem_ERule list))+-- semantic domain+newtype T_ERules = T_ERules ((Map NontermIdent Attributes) ->+ (Map NontermIdent Attributes) ->+ (Map Identifier Type) ->+ ConstructorIdent ->+ PP_Doc ->+ Attributes ->+ (Set String) ->+ (Map Identifier Type) ->+ String ->+ String ->+ (String -> String -> String -> Bool -> String) ->+ NontermIdent ->+ Options ->+ String ->+ (Map Identifier (Set VisitKind)) ->+ Attributes ->+ PP_Doc ->+ (Map Identifier Int) ->+ ( (Seq Error),(Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)),(Map Identifier (Set String)),(Map Identifier (Map String (Maybe NonLocalAttr))),PP_Doc))+data Inh_ERules = Inh_ERules {allInhmap_Inh_ERules :: (Map NontermIdent Attributes),allSynmap_Inh_ERules :: (Map NontermIdent Attributes),childTypes_Inh_ERules :: (Map Identifier Type),con_Inh_ERules :: ConstructorIdent,importBlocks_Inh_ERules :: PP_Doc,inhmap_Inh_ERules :: Attributes,lazyIntras_Inh_ERules :: (Set String),localAttrTypes_Inh_ERules :: (Map Identifier Type),mainFile_Inh_ERules :: String,mainName_Inh_ERules :: String,moduleHeader_Inh_ERules :: (String -> String -> String -> Bool -> String),nt_Inh_ERules :: NontermIdent,options_Inh_ERules :: Options,pragmaBlocks_Inh_ERules :: String,ruleKinds_Inh_ERules :: (Map Identifier (Set VisitKind)),synmap_Inh_ERules :: Attributes,textBlocks_Inh_ERules :: PP_Doc,usageInfo_Inh_ERules :: (Map Identifier Int)}+data Syn_ERules = Syn_ERules {errors_Syn_ERules :: (Seq Error),mrules_Syn_ERules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)),ruledefs_Syn_ERules :: (Map Identifier (Set String)),ruleuses_Syn_ERules :: (Map Identifier (Map String (Maybe NonLocalAttr))),sem_rules_Syn_ERules :: PP_Doc}+wrap_ERules :: T_ERules ->+ Inh_ERules ->+ Syn_ERules+wrap_ERules (T_ERules sem) (Inh_ERules _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo) =+ (let ( _lhsOerrors,_lhsOmrules,_lhsOruledefs,_lhsOruleuses,_lhsOsem_rules) = sem _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo+ in (Syn_ERules _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules))+sem_ERules_Cons :: T_ERule ->+ T_ERules ->+ T_ERules+sem_ERules_Cons (T_ERule hd_) (T_ERules tl_) =+ (T_ERules (\ _lhsIallInhmap+ _lhsIallSynmap+ _lhsIchildTypes+ _lhsIcon+ _lhsIimportBlocks+ _lhsIinhmap+ _lhsIlazyIntras+ _lhsIlocalAttrTypes+ _lhsImainFile+ _lhsImainName+ _lhsImoduleHeader+ _lhsInt+ _lhsIoptions+ _lhsIpragmaBlocks+ _lhsIruleKinds+ _lhsIsynmap+ _lhsItextBlocks+ _lhsIusageInfo ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))+ _lhsOruledefs :: (Map Identifier (Set String))+ _lhsOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))+ _lhsOsem_rules :: PP_Doc+ _hdOallInhmap :: (Map NontermIdent Attributes)+ _hdOallSynmap :: (Map NontermIdent Attributes)+ _hdOchildTypes :: (Map Identifier Type)+ _hdOcon :: ConstructorIdent+ _hdOimportBlocks :: PP_Doc+ _hdOinhmap :: Attributes+ _hdOlazyIntras :: (Set String)+ _hdOlocalAttrTypes :: (Map Identifier Type)+ _hdOmainFile :: String+ _hdOmainName :: String+ _hdOmoduleHeader :: (String -> String -> String -> Bool -> String)+ _hdOnt :: NontermIdent+ _hdOoptions :: Options+ _hdOpragmaBlocks :: String+ _hdOruleKinds :: (Map Identifier (Set VisitKind))+ _hdOsynmap :: Attributes+ _hdOtextBlocks :: PP_Doc+ _hdOusageInfo :: (Map Identifier Int)+ _tlOallInhmap :: (Map NontermIdent Attributes)+ _tlOallSynmap :: (Map NontermIdent Attributes)+ _tlOchildTypes :: (Map Identifier Type)+ _tlOcon :: ConstructorIdent+ _tlOimportBlocks :: PP_Doc+ _tlOinhmap :: Attributes+ _tlOlazyIntras :: (Set String)+ _tlOlocalAttrTypes :: (Map Identifier Type)+ _tlOmainFile :: String+ _tlOmainName :: String+ _tlOmoduleHeader :: (String -> String -> String -> Bool -> String)+ _tlOnt :: NontermIdent+ _tlOoptions :: Options+ _tlOpragmaBlocks :: String+ _tlOruleKinds :: (Map Identifier (Set VisitKind))+ _tlOsynmap :: Attributes+ _tlOtextBlocks :: PP_Doc+ _tlOusageInfo :: (Map Identifier Int)+ _hdIerrors :: (Seq Error)+ _hdImrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))+ _hdIruledefs :: (Map Identifier (Set String))+ _hdIruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))+ _hdIsem_rules :: PP_Doc+ _tlIerrors :: (Seq Error)+ _tlImrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))+ _tlIruledefs :: (Map Identifier (Set String))+ _tlIruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))+ _tlIsem_rules :: PP_Doc+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1629, column 132)+ _lhsOerrors =+ ({-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 4840 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 962, column 32)+ _lhsOmrules =+ ({-# LINE 962 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdImrules `Map.union` _tlImrules+ {-# LINE 4846 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1304, column 34)+ _lhsOruledefs =+ ({-# LINE 1304 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIruledefs `uwSetUnion` _tlIruledefs+ {-# LINE 4852 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1305, column 34)+ _lhsOruleuses =+ ({-# LINE 1305 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIruleuses `uwMapUnion` _tlIruleuses+ {-# LINE 4858 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 961, column 35)+ _lhsOsem_rules =+ ({-# LINE 961 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIsem_rules >-< _tlIsem_rules+ {-# LINE 4864 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallInhmap =+ ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInhmap+ {-# LINE 4870 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallSynmap =+ ({-# LINE 322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallSynmap+ {-# LINE 4876 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOchildTypes =+ ({-# LINE 1564 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIchildTypes+ {-# LINE 4882 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOcon =+ ({-# LINE 66 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIcon+ {-# LINE 4888 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOimportBlocks =+ ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIimportBlocks+ {-# LINE 4894 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOinhmap =+ ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 4900 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOlazyIntras =+ ({-# LINE 1356 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIlazyIntras+ {-# LINE 4906 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOlocalAttrTypes =+ ({-# LINE 1578 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIlocalAttrTypes+ {-# LINE 4912 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOmainFile =+ ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainFile+ {-# LINE 4918 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOmainName =+ ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainName+ {-# LINE 4924 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOmoduleHeader =+ ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImoduleHeader+ {-# LINE 4930 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsInt+ {-# LINE 4936 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 4942 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOpragmaBlocks =+ ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 4948 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOruleKinds =+ ({-# LINE 1259 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIruleKinds+ {-# LINE 4954 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOsynmap =+ ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 4960 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOtextBlocks =+ ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsItextBlocks+ {-# LINE 4966 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOusageInfo =+ ({-# LINE 1244 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIusageInfo+ {-# LINE 4972 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallInhmap =+ ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInhmap+ {-# LINE 4978 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallSynmap =+ ({-# LINE 322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallSynmap+ {-# LINE 4984 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOchildTypes =+ ({-# LINE 1564 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIchildTypes+ {-# LINE 4990 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOcon =+ ({-# LINE 66 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIcon+ {-# LINE 4996 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOimportBlocks =+ ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIimportBlocks+ {-# LINE 5002 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOinhmap =+ ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 5008 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOlazyIntras =+ ({-# LINE 1356 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIlazyIntras+ {-# LINE 5014 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOlocalAttrTypes =+ ({-# LINE 1578 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIlocalAttrTypes+ {-# LINE 5020 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOmainFile =+ ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainFile+ {-# LINE 5026 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOmainName =+ ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainName+ {-# LINE 5032 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOmoduleHeader =+ ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImoduleHeader+ {-# LINE 5038 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsInt+ {-# LINE 5044 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 5050 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOpragmaBlocks =+ ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 5056 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOruleKinds =+ ({-# LINE 1259 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIruleKinds+ {-# LINE 5062 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOsynmap =+ ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 5068 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOtextBlocks =+ ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsItextBlocks+ {-# LINE 5074 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOusageInfo =+ ({-# LINE 1244 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIusageInfo+ {-# LINE 5080 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _hdIerrors,_hdImrules,_hdIruledefs,_hdIruleuses,_hdIsem_rules) =+ hd_ _hdOallInhmap _hdOallSynmap _hdOchildTypes _hdOcon _hdOimportBlocks _hdOinhmap _hdOlazyIntras _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnt _hdOoptions _hdOpragmaBlocks _hdOruleKinds _hdOsynmap _hdOtextBlocks _hdOusageInfo+ ( _tlIerrors,_tlImrules,_tlIruledefs,_tlIruleuses,_tlIsem_rules) =+ tl_ _tlOallInhmap _tlOallSynmap _tlOchildTypes _tlOcon _tlOimportBlocks _tlOinhmap _tlOlazyIntras _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnt _tlOoptions _tlOpragmaBlocks _tlOruleKinds _tlOsynmap _tlOtextBlocks _tlOusageInfo+ in ( _lhsOerrors,_lhsOmrules,_lhsOruledefs,_lhsOruleuses,_lhsOsem_rules))))+sem_ERules_Nil :: T_ERules+sem_ERules_Nil =+ (T_ERules (\ _lhsIallInhmap+ _lhsIallSynmap+ _lhsIchildTypes+ _lhsIcon+ _lhsIimportBlocks+ _lhsIinhmap+ _lhsIlazyIntras+ _lhsIlocalAttrTypes+ _lhsImainFile+ _lhsImainName+ _lhsImoduleHeader+ _lhsInt+ _lhsIoptions+ _lhsIpragmaBlocks+ _lhsIruleKinds+ _lhsIsynmap+ _lhsItextBlocks+ _lhsIusageInfo ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))+ _lhsOruledefs :: (Map Identifier (Set String))+ _lhsOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))+ _lhsOsem_rules :: PP_Doc+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1629, column 132)+ _lhsOerrors =+ ({-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}+ Seq.empty+ {-# LINE 5116 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 962, column 32)+ _lhsOmrules =+ ({-# LINE 962 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 5122 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1304, column 34)+ _lhsOruledefs =+ ({-# LINE 1304 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 5128 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1305, column 34)+ _lhsOruleuses =+ ({-# LINE 1305 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 5134 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 961, column 35)+ _lhsOsem_rules =+ ({-# LINE 961 "src-ag/ExecutionPlan2Hs.ag" #-}+ empty+ {-# LINE 5140 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOerrors,_lhsOmrules,_lhsOruledefs,_lhsOruleuses,_lhsOsem_rules))))+-- ExecutionPlan -----------------------------------------------+{-+ visit 0:+ inherited attributes:+ importBlocks : PP_Doc+ inhmap : Map NontermIdent Attributes+ localAttrTypes : Map NontermIdent (Map ConstructorIdent (Map Identifier Type))+ mainBlocksDoc : PP_Doc+ mainFile : String+ mainName : String+ moduleHeader : String -> String -> String -> Bool -> String+ options : Options+ pragmaBlocks : String+ synmap : Map NontermIdent Attributes+ textBlockMap : Map BlockInfo PP_Doc+ textBlocks : PP_Doc+ synthesized attributes:+ errors : Seq Error+ genIO : IO ()+ output : PP_Doc+ alternatives:+ alternative ExecutionPlan:+ child nonts : ENonterminals + child typeSyns : {TypeSyns}+ child wrappers : {Set NontermIdent}+ child derivings : {Derivings}+ visit 0:+ local wrappersExtra : _+ local commonExtra : _+ local lateSemBndTp : _+ local lateSemBndDef : _+ local mainModuleFile : _+ local ppMonadImports : _+ local genMainModule : _+ local commonFile : _+ local genCommonModule : _+-}+-- cata+sem_ExecutionPlan :: ExecutionPlan ->+ T_ExecutionPlan+sem_ExecutionPlan (ExecutionPlan _nonts _typeSyns _wrappers _derivings) =+ (sem_ExecutionPlan_ExecutionPlan (sem_ENonterminals _nonts) _typeSyns _wrappers _derivings)+-- semantic domain+newtype T_ExecutionPlan = T_ExecutionPlan (PP_Doc ->+ (Map NontermIdent Attributes) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->+ PP_Doc ->+ String ->+ String ->+ (String -> String -> String -> Bool -> String) ->+ Options ->+ String ->+ (Map NontermIdent Attributes) ->+ (Map BlockInfo PP_Doc) ->+ PP_Doc ->+ ( (Seq Error),(IO ()),PP_Doc))+data Inh_ExecutionPlan = Inh_ExecutionPlan {importBlocks_Inh_ExecutionPlan :: PP_Doc,inhmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes),localAttrTypes_Inh_ExecutionPlan :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))),mainBlocksDoc_Inh_ExecutionPlan :: PP_Doc,mainFile_Inh_ExecutionPlan :: String,mainName_Inh_ExecutionPlan :: String,moduleHeader_Inh_ExecutionPlan :: (String -> String -> String -> Bool -> String),options_Inh_ExecutionPlan :: Options,pragmaBlocks_Inh_ExecutionPlan :: String,synmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes),textBlockMap_Inh_ExecutionPlan :: (Map BlockInfo PP_Doc),textBlocks_Inh_ExecutionPlan :: PP_Doc}+data Syn_ExecutionPlan = Syn_ExecutionPlan {errors_Syn_ExecutionPlan :: (Seq Error),genIO_Syn_ExecutionPlan :: (IO ()),output_Syn_ExecutionPlan :: PP_Doc}+wrap_ExecutionPlan :: T_ExecutionPlan ->+ Inh_ExecutionPlan ->+ Syn_ExecutionPlan+wrap_ExecutionPlan (T_ExecutionPlan sem) (Inh_ExecutionPlan _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlockMap _lhsItextBlocks) =+ (let ( _lhsOerrors,_lhsOgenIO,_lhsOoutput) = sem _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlockMap _lhsItextBlocks+ in (Syn_ExecutionPlan _lhsOerrors _lhsOgenIO _lhsOoutput))+sem_ExecutionPlan_ExecutionPlan :: T_ENonterminals ->+ TypeSyns ->+ (Set NontermIdent) ->+ Derivings ->+ T_ExecutionPlan+sem_ExecutionPlan_ExecutionPlan (T_ENonterminals nonts_) typeSyns_ wrappers_ derivings_ =+ (T_ExecutionPlan (\ _lhsIimportBlocks+ _lhsIinhmap+ _lhsIlocalAttrTypes+ _lhsImainBlocksDoc+ _lhsImainFile+ _lhsImainName+ _lhsImoduleHeader+ _lhsIoptions+ _lhsIpragmaBlocks+ _lhsIsynmap+ _lhsItextBlockMap+ _lhsItextBlocks ->+ (let _lhsOoutput :: PP_Doc+ _nontsOwrappers :: (Set NontermIdent)+ _nontsOtypeSyns :: TypeSyns+ _nontsOderivings :: Derivings+ _nontsOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _nontsOavisitdefs :: (Map VisitIdentifier (Set Identifier))+ _nontsOavisituses :: (Map VisitIdentifier (Set Identifier))+ _lhsOgenIO :: (IO ())+ _nontsOallFromToStates :: (Map VisitIdentifier (Int,Int))+ _nontsOallVisitKinds :: (Map VisitIdentifier VisitKind)+ _nontsOallInitStates :: (Map NontermIdent Int)+ _lhsOerrors :: (Seq Error)+ _nontsOimportBlocks :: PP_Doc+ _nontsOinhmap :: (Map NontermIdent Attributes)+ _nontsOlocalAttrTypes :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type)))+ _nontsOmainFile :: String+ _nontsOmainName :: String+ _nontsOmoduleHeader :: (String -> String -> String -> Bool -> String)+ _nontsOoptions :: Options+ _nontsOpragmaBlocks :: String+ _nontsOsynmap :: (Map NontermIdent Attributes)+ _nontsOtextBlocks :: PP_Doc+ _nontsIappendCommon :: ([PP_Doc])+ _nontsIappendMain :: ([PP_Doc])+ _nontsIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _nontsIerrors :: (Seq Error)+ _nontsIfromToStates :: (Map VisitIdentifier (Int,Int))+ _nontsIgenProdIO :: (IO ())+ _nontsIimports :: ([PP_Doc])+ _nontsIinitStates :: (Map NontermIdent Int)+ _nontsIoutput :: PP_Doc+ _nontsIsemFunBndDefs :: (Seq PP_Doc)+ _nontsIsemFunBndTps :: (Seq PP_Doc)+ _nontsIvisitKinds :: (Map VisitIdentifier VisitKind)+ _nontsIvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _nontsIvisituses :: (Map VisitIdentifier (Set Identifier))+ -- "src-ag/ExecutionPlan2Hs.ag"(line 87, column 19)+ _lhsOoutput =+ ({-# LINE 87 "src-ag/ExecutionPlan2Hs.ag" #-}+ _nontsIoutput >-< _commonExtra >-< _wrappersExtra+ {-# LINE 5265 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 93, column 19)+ _nontsOwrappers =+ ({-# LINE 93 "src-ag/ExecutionPlan2Hs.ag" #-}+ wrappers_+ {-# LINE 5271 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 132, column 19)+ _nontsOtypeSyns =+ ({-# LINE 132 "src-ag/ExecutionPlan2Hs.ag" #-}+ typeSyns_+ {-# LINE 5277 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 133, column 19)+ _nontsOderivings =+ ({-# LINE 133 "src-ag/ExecutionPlan2Hs.ag" #-}+ derivings_+ {-# LINE 5283 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 532, column 3)+ _wrappersExtra =+ ({-# LINE 532 "src-ag/ExecutionPlan2Hs.ag" #-}+ if kennedyWarren _lhsIoptions && lateHigherOrderBinding _lhsIoptions+ then _lateSemBndDef+ else empty+ {-# LINE 5291 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 535, column 3)+ _commonExtra =+ ({-# LINE 535 "src-ag/ExecutionPlan2Hs.ag" #-}+ if kennedyWarren _lhsIoptions && lateHigherOrderBinding _lhsIoptions+ then _lateSemBndTp+ else empty+ {-# LINE 5299 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 538, column 3)+ _lateSemBndTp =+ ({-# LINE 538 "src-ag/ExecutionPlan2Hs.ag" #-}+ "data" >#< lateBindingTypeNm _lhsImainName >#< "=" >#< lateBindingTypeNm _lhsImainName+ >-< (indent 2 $ pp_block "{" "}" "," $ toList _nontsIsemFunBndTps)+ {-# LINE 5306 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 540, column 3)+ _lateSemBndDef =+ ({-# LINE 540 "src-ag/ExecutionPlan2Hs.ag" #-}+ ( if noInlinePragmas _lhsIoptions+ then empty+ else if helpInlining _lhsIoptions && Set.size wrappers_ == 1+ then ppInline $ lateBindingFieldNm _lhsImainName+ else ppNoInline $ lateBindingFieldNm _lhsImainName+ )+ >-< lateBindingFieldNm _lhsImainName >#< "::" >#< lateBindingTypeNm _lhsImainName+ >-< lateBindingFieldNm _lhsImainName >#< "=" >#< lateBindingTypeNm _lhsImainName+ >-< (indent 2 $ pp_block "{" "}" "," $ toList _nontsIsemFunBndDefs )+ {-# LINE 5320 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1192, column 19)+ _nontsOallchildvisit =+ ({-# LINE 1192 "src-ag/ExecutionPlan2Hs.ag" #-}+ _nontsIchildvisit+ {-# LINE 5326 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1336, column 19)+ _nontsOavisitdefs =+ ({-# LINE 1336 "src-ag/ExecutionPlan2Hs.ag" #-}+ _nontsIvisitdefs+ {-# LINE 5332 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1337, column 19)+ _nontsOavisituses =+ ({-# LINE 1337 "src-ag/ExecutionPlan2Hs.ag" #-}+ _nontsIvisituses+ {-# LINE 5338 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1408, column 19)+ _lhsOgenIO =+ ({-# LINE 1408 "src-ag/ExecutionPlan2Hs.ag" #-}+ do _genMainModule+ _genCommonModule+ _nontsIgenProdIO+ {-# LINE 5346 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1411, column 19)+ _mainModuleFile =+ ({-# LINE 1411 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainFile+ {-# LINE 5352 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1412, column 19)+ _ppMonadImports =+ ({-# LINE 1412 "src-ag/ExecutionPlan2Hs.ag" #-}+ ( if tupleAsDummyToken _lhsIoptions+ then empty+ else pp "import GHC.Prim"+ )+ >-< if parallelInvoke _lhsIoptions+ then pp "import qualified System.IO.Unsafe(unsafePerformIO)"+ >-< pp "import System.IO(IO)"+ >-< pp "import Control.Concurrent(newEmptyMVar,forkIO,putMVar,takeMVar)"+ else pp "import Control.Monad.Identity"+ {-# LINE 5366 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1421, column 19)+ _genMainModule =+ ({-# LINE 1421 "src-ag/ExecutionPlan2Hs.ag" #-}+ writeModule _mainModuleFile+ ( [ warrenFlagsPP _lhsIoptions+ , pp $ _lhsIpragmaBlocks+ , pp $ _lhsImoduleHeader _lhsImainName "" "" False+ , _ppMonadImports+ , pp $ "import " ++ _lhsImainName ++ "_common"+ ]+ ++ _nontsIimports+ ++ [_lhsImainBlocksDoc]+ ++ [_wrappersExtra ]+ ++ _nontsIappendMain+ )+ {-# LINE 5383 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1433, column 19)+ _commonFile =+ ({-# LINE 1433 "src-ag/ExecutionPlan2Hs.ag" #-}+ replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ "_common")+ {-# LINE 5389 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1434, column 19)+ _genCommonModule =+ ({-# LINE 1434 "src-ag/ExecutionPlan2Hs.ag" #-}+ writeModule _commonFile+ ( [ pp $ "{-# LANGUAGE Rank2Types, GADTs #-}"+ , pp $ _lhsIpragmaBlocks+ , pp $ _lhsImoduleHeader _lhsImainName "_common" "" True+ , _ppMonadImports+ , _lhsIimportBlocks+ , _lhsItextBlocks+ , _commonExtra+ ]+ ++ _nontsIappendCommon+ )+ {-# LINE 5405 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1553, column 3)+ _nontsOallFromToStates =+ ({-# LINE 1553 "src-ag/ExecutionPlan2Hs.ag" #-}+ _nontsIfromToStates+ {-# LINE 5411 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1597, column 3)+ _nontsOallVisitKinds =+ ({-# LINE 1597 "src-ag/ExecutionPlan2Hs.ag" #-}+ _nontsIvisitKinds+ {-# LINE 5417 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1611, column 3)+ _nontsOallInitStates =+ ({-# LINE 1611 "src-ag/ExecutionPlan2Hs.ag" #-}+ _nontsIinitStates+ {-# LINE 5423 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1629, column 132)+ _lhsOerrors =+ ({-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}+ _nontsIerrors+ {-# LINE 5429 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _nontsOimportBlocks =+ ({-# LINE 34 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIimportBlocks+ {-# LINE 5435 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _nontsOinhmap =+ ({-# LINE 312 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 5441 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _nontsOlocalAttrTypes =+ ({-# LINE 1576 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIlocalAttrTypes+ {-# LINE 5447 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _nontsOmainFile =+ ({-# LINE 38 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainFile+ {-# LINE 5453 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _nontsOmainName =+ ({-# LINE 39 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainName+ {-# LINE 5459 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _nontsOmoduleHeader =+ ({-# LINE 37 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImoduleHeader+ {-# LINE 5465 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _nontsOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 5471 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _nontsOpragmaBlocks =+ ({-# LINE 35 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 5477 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _nontsOsynmap =+ ({-# LINE 313 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 5483 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _nontsOtextBlocks =+ ({-# LINE 36 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsItextBlocks+ {-# LINE 5489 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _nontsIappendCommon,_nontsIappendMain,_nontsIchildvisit,_nontsIerrors,_nontsIfromToStates,_nontsIgenProdIO,_nontsIimports,_nontsIinitStates,_nontsIoutput,_nontsIsemFunBndDefs,_nontsIsemFunBndTps,_nontsIvisitKinds,_nontsIvisitdefs,_nontsIvisituses) =+ nonts_ _nontsOallFromToStates _nontsOallInitStates _nontsOallVisitKinds _nontsOallchildvisit _nontsOavisitdefs _nontsOavisituses _nontsOderivings _nontsOimportBlocks _nontsOinhmap _nontsOlocalAttrTypes _nontsOmainFile _nontsOmainName _nontsOmoduleHeader _nontsOoptions _nontsOpragmaBlocks _nontsOsynmap _nontsOtextBlocks _nontsOtypeSyns _nontsOwrappers+ in ( _lhsOerrors,_lhsOgenIO,_lhsOoutput))))+-- Expression --------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ attrs : Map String (Maybe NonLocalAttr)+ pos : Pos+ semfunc : PP_Doc+ tks : [HsToken]+ alternatives:+ alternative Expression:+ child pos : {Pos}+ child tks : {[HsToken]}+-}+-- cata+sem_Expression :: Expression ->+ T_Expression+sem_Expression (Expression _pos _tks) =+ (sem_Expression_Expression _pos _tks)+-- semantic domain+newtype T_Expression = T_Expression (( (Map String (Maybe NonLocalAttr)),Pos,PP_Doc,([HsToken])))+data Inh_Expression = Inh_Expression {}+data Syn_Expression = Syn_Expression {attrs_Syn_Expression :: (Map String (Maybe NonLocalAttr)),pos_Syn_Expression :: Pos,semfunc_Syn_Expression :: PP_Doc,tks_Syn_Expression :: ([HsToken])}+wrap_Expression :: T_Expression ->+ Inh_Expression ->+ Syn_Expression+wrap_Expression (T_Expression sem) (Inh_Expression) =+ (let ( _lhsOattrs,_lhsOpos,_lhsOsemfunc,_lhsOtks) = sem+ in (Syn_Expression _lhsOattrs _lhsOpos _lhsOsemfunc _lhsOtks))+sem_Expression_Expression :: Pos ->+ ([HsToken]) ->+ T_Expression+sem_Expression_Expression pos_ tks_ =+ (T_Expression (let _lhsOtks :: ([HsToken])+ _lhsOpos :: Pos+ _lhsOattrs :: (Map String (Maybe NonLocalAttr))+ _lhsOsemfunc :: PP_Doc+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1048, column 16)+ _lhsOtks =+ ({-# LINE 1048 "src-ag/ExecutionPlan2Hs.ag" #-}+ tks_+ {-# LINE 5534 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1091, column 29)+ _lhsOpos =+ ({-# LINE 1091 "src-ag/ExecutionPlan2Hs.ag" #-}+ pos_+ {-# LINE 5540 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1177, column 16)+ _lhsOattrs =+ ({-# LINE 1177 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.unions $ map (\tok -> attrs_Syn_HsToken (wrap_HsToken (sem_HsToken tok) Inh_HsToken)) tks_+ {-# LINE 5546 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1178, column 16)+ _lhsOsemfunc =+ ({-# LINE 1178 "src-ag/ExecutionPlan2Hs.ag" #-}+ vlist $ showTokens $ map (\tok -> tok_Syn_HsToken (wrap_HsToken (sem_HsToken tok) Inh_HsToken)) tks_+ {-# LINE 5552 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOattrs,_lhsOpos,_lhsOsemfunc,_lhsOtks)))+-- HsToken -----------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ attrs : Map String (Maybe NonLocalAttr)+ tok : (Pos,String)+ alternatives:+ alternative AGField:+ child field : {Identifier}+ child attr : {Identifier}+ child pos : {Pos}+ child rdesc : {Maybe String}+ visit 0:+ local mbAttr : _+ local addTrace : _+ alternative AGLocal:+ child var : {Identifier}+ child pos : {Pos}+ child rdesc : {Maybe String}+ visit 0:+ local tok : _+ alternative CharToken:+ child value : {String}+ child pos : {Pos}+ alternative Err:+ child mesg : {String}+ child pos : {Pos}+ alternative HsToken:+ child value : {String}+ child pos : {Pos}+ alternative StrToken:+ child value : {String}+ child pos : {Pos}+-}+-- 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 (( (Map String (Maybe NonLocalAttr)),((Pos,String))))+data Inh_HsToken = Inh_HsToken {}+data Syn_HsToken = Syn_HsToken {attrs_Syn_HsToken :: (Map String (Maybe NonLocalAttr)),tok_Syn_HsToken :: ((Pos,String))}+wrap_HsToken :: T_HsToken ->+ Inh_HsToken ->+ Syn_HsToken+wrap_HsToken (T_HsToken sem) (Inh_HsToken) =+ (let ( _lhsOattrs,_lhsOtok) = sem+ in (Syn_HsToken _lhsOattrs _lhsOtok))+sem_HsToken_AGField :: Identifier ->+ Identifier ->+ Pos ->+ (Maybe String) ->+ T_HsToken+sem_HsToken_AGField field_ attr_ pos_ rdesc_ =+ (T_HsToken (let _lhsOattrs :: (Map String (Maybe NonLocalAttr))+ _lhsOtok :: ((Pos,String))+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1137, column 15)+ _mbAttr =+ ({-# LINE 1137 "src-ag/ExecutionPlan2Hs.ag" #-}+ if field_ == _INST || field_ == _FIELD || field_ == _INST'+ then Nothing+ else Just $ mkNonLocalAttr (field_ == _LHS) field_ attr_+ {-# LINE 5628 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1140, column 15)+ _lhsOattrs =+ ({-# LINE 1140 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton (attrname True field_ attr_) _mbAttr+ {-# LINE 5634 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1385, column 8)+ _addTrace =+ ({-# LINE 1385 "src-ag/ExecutionPlan2Hs.ag" #-}+ case rdesc_ of+ Just d -> \x -> "(trace " ++ show (d ++ " -> " ++ show field_ ++ "." ++ show attr_) ++ " (" ++ x ++ "))"+ Nothing -> id+ {-# LINE 5642 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1388, column 8)+ _lhsOtok =+ ({-# LINE 1388 "src-ag/ExecutionPlan2Hs.ag" #-}+ (pos_, _addTrace $ attrname True field_ attr_)+ {-# LINE 5648 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOattrs,_lhsOtok)))+sem_HsToken_AGLocal :: Identifier ->+ Pos ->+ (Maybe String) ->+ T_HsToken+sem_HsToken_AGLocal var_ pos_ rdesc_ =+ (T_HsToken (let _lhsOattrs :: (Map String (Maybe NonLocalAttr))+ _lhsOtok :: ((Pos,String))+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1136, column 15)+ _lhsOattrs =+ ({-# LINE 1136 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton (fieldname var_) Nothing+ {-# LINE 5662 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1381, column 15)+ _tok =+ ({-# LINE 1381 "src-ag/ExecutionPlan2Hs.ag" #-}+ (pos_,fieldname var_)+ {-# LINE 5668 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (from local)+ _lhsOtok =+ ({-# LINE 1383 "src-ag/ExecutionPlan2Hs.ag" #-}+ _tok+ {-# LINE 5674 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOattrs,_lhsOtok)))+sem_HsToken_CharToken :: String ->+ Pos ->+ T_HsToken+sem_HsToken_CharToken value_ pos_ =+ (T_HsToken (let _lhsOtok :: ((Pos,String))+ _lhsOattrs :: (Map String (Maybe NonLocalAttr))+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1392, column 16)+ _lhsOtok =+ ({-# LINE 1392 "src-ag/ExecutionPlan2Hs.ag" #-}+ (pos_, if null value_+ then ""+ else showCharShort (head value_)+ )+ {-# LINE 5690 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1134, column 37)+ _lhsOattrs =+ ({-# LINE 1134 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 5696 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOattrs,_lhsOtok)))+sem_HsToken_Err :: String ->+ Pos ->+ T_HsToken+sem_HsToken_Err mesg_ pos_ =+ (T_HsToken (let _lhsOtok :: ((Pos,String))+ _lhsOattrs :: (Map String (Maybe NonLocalAttr))+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1398, column 16)+ _lhsOtok =+ ({-# LINE 1398 "src-ag/ExecutionPlan2Hs.ag" #-}+ (pos_, "")+ {-# LINE 5709 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1134, column 37)+ _lhsOattrs =+ ({-# LINE 1134 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 5715 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOattrs,_lhsOtok)))+sem_HsToken_HsToken :: String ->+ Pos ->+ T_HsToken+sem_HsToken_HsToken value_ pos_ =+ (T_HsToken (let _lhsOtok :: ((Pos,String))+ _lhsOattrs :: (Map String (Maybe NonLocalAttr))+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1390, column 14)+ _lhsOtok =+ ({-# LINE 1390 "src-ag/ExecutionPlan2Hs.ag" #-}+ (pos_, value_)+ {-# LINE 5728 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1134, column 37)+ _lhsOattrs =+ ({-# LINE 1134 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 5734 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOattrs,_lhsOtok)))+sem_HsToken_StrToken :: String ->+ Pos ->+ T_HsToken+sem_HsToken_StrToken value_ pos_ =+ (T_HsToken (let _lhsOtok :: ((Pos,String))+ _lhsOattrs :: (Map String (Maybe NonLocalAttr))+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1397, column 16)+ _lhsOtok =+ ({-# LINE 1397 "src-ag/ExecutionPlan2Hs.ag" #-}+ (pos_, showStrShort value_)+ {-# LINE 5747 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1134, column 37)+ _lhsOattrs =+ ({-# LINE 1134 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 5753 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOattrs,_lhsOtok)))+-- HsTokens ----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ tks : [(Pos,String)]+ alternatives:+ alternative Cons:+ child hd : HsToken + child tl : HsTokens + alternative Nil:+-}+-- 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 (( ([(Pos,String)])))+data Inh_HsTokens = Inh_HsTokens {}+data Syn_HsTokens = Syn_HsTokens {tks_Syn_HsTokens :: ([(Pos,String)])}+wrap_HsTokens :: T_HsTokens ->+ Inh_HsTokens ->+ Syn_HsTokens+wrap_HsTokens (T_HsTokens sem) (Inh_HsTokens) =+ (let ( _lhsOtks) = sem+ in (Syn_HsTokens _lhsOtks))+sem_HsTokens_Cons :: T_HsToken ->+ T_HsTokens ->+ T_HsTokens+sem_HsTokens_Cons (T_HsToken hd_) (T_HsTokens tl_) =+ (T_HsTokens (let _lhsOtks :: ([(Pos,String)])+ _hdIattrs :: (Map String (Maybe NonLocalAttr))+ _hdItok :: ((Pos,String))+ _tlItks :: ([(Pos,String)])+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1377, column 10)+ _lhsOtks =+ ({-# LINE 1377 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdItok : _tlItks+ {-# LINE 5794 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _hdIattrs,_hdItok) =+ hd_+ ( _tlItks) =+ tl_+ in ( _lhsOtks)))+sem_HsTokens_Nil :: T_HsTokens+sem_HsTokens_Nil =+ (T_HsTokens (let _lhsOtks :: ([(Pos,String)])+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1378, column 10)+ _lhsOtks =+ ({-# LINE 1378 "src-ag/ExecutionPlan2Hs.ag" #-}+ []+ {-# LINE 5808 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOtks)))+-- HsTokensRoot ------------------------------------------------+{-+ 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 (( ))+data Inh_HsTokensRoot = Inh_HsTokensRoot {}+data Syn_HsTokensRoot = Syn_HsTokensRoot {}+wrap_HsTokensRoot :: T_HsTokensRoot ->+ Inh_HsTokensRoot ->+ Syn_HsTokensRoot+wrap_HsTokensRoot (T_HsTokensRoot sem) (Inh_HsTokensRoot) =+ (let ( ) = sem+ in (Syn_HsTokensRoot))+sem_HsTokensRoot_HsTokensRoot :: T_HsTokens ->+ T_HsTokensRoot+sem_HsTokensRoot_HsTokensRoot (T_HsTokens tokens_) =+ (T_HsTokensRoot (let _tokensItks :: ([(Pos,String)])+ ( _tokensItks) =+ tokens_+ in ( )))+-- Pattern -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allInhmap : Map NontermIdent Attributes+ allSynmap : Map NontermIdent Attributes+ anyLazyKind : Bool+ inhmap : Attributes+ localAttrTypes : Map Identifier Type+ options : Options+ synmap : Attributes+ synthesized attributes:+ attrTypes : PP_Doc+ attrs : Set String+ copy : Pattern + isUnderscore : Bool+ sem_lhs : PP_Doc + alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + visit 0:+ local varPat : _+ local patExpr : _+ local mbTp : _+ local addbang : _+ local addbang1 : _+ local copy : _+ alternative Constr:+ child name : {ConstructorIdent}+ child pats : Patterns + visit 0:+ local addbang : _+ local addbang1 : _+ local copy : _+ alternative Irrefutable:+ child pat : Pattern + visit 0:+ local copy : _+ alternative Product:+ child pos : {Pos}+ child pats : Patterns + visit 0:+ local addbang : _+ local addbang1 : _+ local copy : _+ alternative Underscore:+ child pos : {Pos}+ visit 0:+ local copy : _+-}+-- cata+sem_Pattern :: Pattern ->+ T_Pattern+sem_Pattern (Alias _field _attr _pat) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat))+sem_Pattern (Constr _name _pats) =+ (sem_Pattern_Constr _name (sem_Patterns _pats))+sem_Pattern (Irrefutable _pat) =+ (sem_Pattern_Irrefutable (sem_Pattern _pat))+sem_Pattern (Product _pos _pats) =+ (sem_Pattern_Product _pos (sem_Patterns _pats))+sem_Pattern (Underscore _pos) =+ (sem_Pattern_Underscore _pos)+-- semantic domain+newtype T_Pattern = T_Pattern ((Map NontermIdent Attributes) ->+ (Map NontermIdent Attributes) ->+ Bool ->+ Attributes ->+ (Map Identifier Type) ->+ Options ->+ Attributes ->+ ( PP_Doc,(Set String),Pattern,Bool,( PP_Doc )))+data Inh_Pattern = Inh_Pattern {allInhmap_Inh_Pattern :: (Map NontermIdent Attributes),allSynmap_Inh_Pattern :: (Map NontermIdent Attributes),anyLazyKind_Inh_Pattern :: Bool,inhmap_Inh_Pattern :: Attributes,localAttrTypes_Inh_Pattern :: (Map Identifier Type),options_Inh_Pattern :: Options,synmap_Inh_Pattern :: Attributes}+data Syn_Pattern = Syn_Pattern {attrTypes_Syn_Pattern :: PP_Doc,attrs_Syn_Pattern :: (Set String),copy_Syn_Pattern :: Pattern,isUnderscore_Syn_Pattern :: Bool,sem_lhs_Syn_Pattern :: ( PP_Doc )}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern+wrap_Pattern (T_Pattern sem) (Inh_Pattern _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) =+ (let ( _lhsOattrTypes,_lhsOattrs,_lhsOcopy,_lhsOisUnderscore,_lhsOsem_lhs) = sem _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap+ in (Syn_Pattern _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs))+sem_Pattern_Alias :: Identifier ->+ Identifier ->+ T_Pattern ->+ T_Pattern+sem_Pattern_Alias field_ attr_ (T_Pattern pat_) =+ (T_Pattern (\ _lhsIallInhmap+ _lhsIallSynmap+ _lhsIanyLazyKind+ _lhsIinhmap+ _lhsIlocalAttrTypes+ _lhsIoptions+ _lhsIsynmap ->+ (let _lhsOsem_lhs :: ( PP_Doc )+ _lhsOisUnderscore :: Bool+ _lhsOattrs :: (Set String)+ _lhsOattrTypes :: PP_Doc+ _lhsOcopy :: Pattern+ _patOallInhmap :: (Map NontermIdent Attributes)+ _patOallSynmap :: (Map NontermIdent Attributes)+ _patOanyLazyKind :: Bool+ _patOinhmap :: Attributes+ _patOlocalAttrTypes :: (Map Identifier Type)+ _patOoptions :: Options+ _patOsynmap :: Attributes+ _patIattrTypes :: PP_Doc+ _patIattrs :: (Set String)+ _patIcopy :: Pattern+ _patIisUnderscore :: Bool+ _patIsem_lhs :: ( PP_Doc )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1099, column 17)+ _varPat =+ ({-# LINE 1099 "src-ag/ExecutionPlan2Hs.ag" #-}+ text $ attrname False field_ attr_+ {-# LINE 5954 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1100, column 17)+ _patExpr =+ ({-# LINE 1100 "src-ag/ExecutionPlan2Hs.ag" #-}+ if _patIisUnderscore+ then _varPat+ else _varPat >|< "@" >|< _patIsem_lhs+ {-# LINE 5962 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1103, column 17)+ _lhsOsem_lhs =+ ({-# LINE 1103 "src-ag/ExecutionPlan2Hs.ag" #-}+ _addbang1 _patExpr+ {-# LINE 5968 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1114, column 16)+ _lhsOisUnderscore =+ ({-# LINE 1114 "src-ag/ExecutionPlan2Hs.ag" #-}+ False+ {-# LINE 5974 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1120, column 3)+ _lhsOattrs =+ ({-# LINE 1120 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.insert (attrname False field_ attr_) _patIattrs+ {-# LINE 5980 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1125, column 3)+ _mbTp =+ ({-# LINE 1125 "src-ag/ExecutionPlan2Hs.ag" #-}+ if field_ == _LHS+ then Map.lookup attr_ _lhsIsynmap+ else if field_ == _LOC+ then Map.lookup attr_ _lhsIlocalAttrTypes+ else Nothing+ {-# LINE 5990 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1130, column 3)+ _lhsOattrTypes =+ ({-# LINE 1130 "src-ag/ExecutionPlan2Hs.ag" #-}+ maybe empty (\tp -> (attrname False field_ attr_) >#< "::" >#< ppTp tp) _mbTp+ >-< _patIattrTypes+ {-# LINE 5997 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1521, column 37)+ _addbang =+ ({-# LINE 1521 "src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 6003 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1526, column 37)+ _addbang1 =+ ({-# LINE 1526 "src-ag/ExecutionPlan2Hs.ag" #-}+ if _lhsIanyLazyKind then id else _addbang+ {-# LINE 6009 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Alias field_ attr_ _patIcopy+ {-# LINE 6015 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 6021 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patOallInhmap =+ ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInhmap+ {-# LINE 6027 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patOallSynmap =+ ({-# LINE 322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallSynmap+ {-# LINE 6033 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patOanyLazyKind =+ ({-# LINE 1267 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIanyLazyKind+ {-# LINE 6039 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patOinhmap =+ ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 6045 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patOlocalAttrTypes =+ ({-# LINE 1578 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIlocalAttrTypes+ {-# LINE 6051 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 6057 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patOsynmap =+ ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 6063 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _patIattrTypes,_patIattrs,_patIcopy,_patIisUnderscore,_patIsem_lhs) =+ pat_ _patOallInhmap _patOallSynmap _patOanyLazyKind _patOinhmap _patOlocalAttrTypes _patOoptions _patOsynmap+ in ( _lhsOattrTypes,_lhsOattrs,_lhsOcopy,_lhsOisUnderscore,_lhsOsem_lhs))))+sem_Pattern_Constr :: ConstructorIdent ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Constr name_ (T_Patterns pats_) =+ (T_Pattern (\ _lhsIallInhmap+ _lhsIallSynmap+ _lhsIanyLazyKind+ _lhsIinhmap+ _lhsIlocalAttrTypes+ _lhsIoptions+ _lhsIsynmap ->+ (let _lhsOsem_lhs :: ( PP_Doc )+ _lhsOisUnderscore :: Bool+ _lhsOattrTypes :: PP_Doc+ _lhsOattrs :: (Set String)+ _lhsOcopy :: Pattern+ _patsOallInhmap :: (Map NontermIdent Attributes)+ _patsOallSynmap :: (Map NontermIdent Attributes)+ _patsOanyLazyKind :: Bool+ _patsOinhmap :: Attributes+ _patsOlocalAttrTypes :: (Map Identifier Type)+ _patsOoptions :: Options+ _patsOsynmap :: Attributes+ _patsIattrTypes :: PP_Doc+ _patsIattrs :: (Set String)+ _patsIcopy :: Patterns+ _patsIsem_lhs :: ([PP_Doc])+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1105, column 17)+ _lhsOsem_lhs =+ ({-# LINE 1105 "src-ag/ExecutionPlan2Hs.ag" #-}+ _addbang1 $ pp_parens $ name_ >#< hv_sp _patsIsem_lhs+ {-# LINE 6099 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1112, column 16)+ _lhsOisUnderscore =+ ({-# LINE 1112 "src-ag/ExecutionPlan2Hs.ag" #-}+ False+ {-# LINE 6105 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1521, column 37)+ _addbang =+ ({-# LINE 1521 "src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 6111 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1526, column 37)+ _addbang1 =+ ({-# LINE 1526 "src-ag/ExecutionPlan2Hs.ag" #-}+ if _lhsIanyLazyKind then id else _addbang+ {-# LINE 6117 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1123, column 40)+ _lhsOattrTypes =+ ({-# LINE 1123 "src-ag/ExecutionPlan2Hs.ag" #-}+ _patsIattrTypes+ {-# LINE 6123 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1118, column 36)+ _lhsOattrs =+ ({-# LINE 1118 "src-ag/ExecutionPlan2Hs.ag" #-}+ _patsIattrs+ {-# LINE 6129 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 6135 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 6141 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patsOallInhmap =+ ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInhmap+ {-# LINE 6147 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patsOallSynmap =+ ({-# LINE 322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallSynmap+ {-# LINE 6153 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patsOanyLazyKind =+ ({-# LINE 1267 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIanyLazyKind+ {-# LINE 6159 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patsOinhmap =+ ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 6165 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patsOlocalAttrTypes =+ ({-# LINE 1578 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIlocalAttrTypes+ {-# LINE 6171 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patsOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 6177 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patsOsynmap =+ ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 6183 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _patsIattrTypes,_patsIattrs,_patsIcopy,_patsIsem_lhs) =+ pats_ _patsOallInhmap _patsOallSynmap _patsOanyLazyKind _patsOinhmap _patsOlocalAttrTypes _patsOoptions _patsOsynmap+ in ( _lhsOattrTypes,_lhsOattrs,_lhsOcopy,_lhsOisUnderscore,_lhsOsem_lhs))))+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern+sem_Pattern_Irrefutable (T_Pattern pat_) =+ (T_Pattern (\ _lhsIallInhmap+ _lhsIallSynmap+ _lhsIanyLazyKind+ _lhsIinhmap+ _lhsIlocalAttrTypes+ _lhsIoptions+ _lhsIsynmap ->+ (let _lhsOsem_lhs :: ( PP_Doc )+ _lhsOattrTypes :: PP_Doc+ _lhsOattrs :: (Set String)+ _lhsOcopy :: Pattern+ _lhsOisUnderscore :: Bool+ _patOallInhmap :: (Map NontermIdent Attributes)+ _patOallSynmap :: (Map NontermIdent Attributes)+ _patOanyLazyKind :: Bool+ _patOinhmap :: Attributes+ _patOlocalAttrTypes :: (Map Identifier Type)+ _patOoptions :: Options+ _patOsynmap :: Attributes+ _patIattrTypes :: PP_Doc+ _patIattrs :: (Set String)+ _patIcopy :: Pattern+ _patIisUnderscore :: Bool+ _patIsem_lhs :: ( PP_Doc )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1107, column 17)+ _lhsOsem_lhs =+ ({-# LINE 1107 "src-ag/ExecutionPlan2Hs.ag" #-}+ text "~" >|< pp_parens _patIsem_lhs+ {-# LINE 6219 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1123, column 40)+ _lhsOattrTypes =+ ({-# LINE 1123 "src-ag/ExecutionPlan2Hs.ag" #-}+ _patIattrTypes+ {-# LINE 6225 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1118, column 36)+ _lhsOattrs =+ ({-# LINE 1118 "src-ag/ExecutionPlan2Hs.ag" #-}+ _patIattrs+ {-# LINE 6231 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 6237 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 6243 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (up)+ _lhsOisUnderscore =+ ({-# LINE 1110 "src-ag/ExecutionPlan2Hs.ag" #-}+ _patIisUnderscore+ {-# LINE 6249 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patOallInhmap =+ ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInhmap+ {-# LINE 6255 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patOallSynmap =+ ({-# LINE 322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallSynmap+ {-# LINE 6261 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patOanyLazyKind =+ ({-# LINE 1267 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIanyLazyKind+ {-# LINE 6267 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patOinhmap =+ ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 6273 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patOlocalAttrTypes =+ ({-# LINE 1578 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIlocalAttrTypes+ {-# LINE 6279 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 6285 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patOsynmap =+ ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 6291 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _patIattrTypes,_patIattrs,_patIcopy,_patIisUnderscore,_patIsem_lhs) =+ pat_ _patOallInhmap _patOallSynmap _patOanyLazyKind _patOinhmap _patOlocalAttrTypes _patOoptions _patOsynmap+ in ( _lhsOattrTypes,_lhsOattrs,_lhsOcopy,_lhsOisUnderscore,_lhsOsem_lhs))))+sem_Pattern_Product :: Pos ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Product pos_ (T_Patterns pats_) =+ (T_Pattern (\ _lhsIallInhmap+ _lhsIallSynmap+ _lhsIanyLazyKind+ _lhsIinhmap+ _lhsIlocalAttrTypes+ _lhsIoptions+ _lhsIsynmap ->+ (let _lhsOsem_lhs :: ( PP_Doc )+ _lhsOisUnderscore :: Bool+ _lhsOattrTypes :: PP_Doc+ _lhsOattrs :: (Set String)+ _lhsOcopy :: Pattern+ _patsOallInhmap :: (Map NontermIdent Attributes)+ _patsOallSynmap :: (Map NontermIdent Attributes)+ _patsOanyLazyKind :: Bool+ _patsOinhmap :: Attributes+ _patsOlocalAttrTypes :: (Map Identifier Type)+ _patsOoptions :: Options+ _patsOsynmap :: Attributes+ _patsIattrTypes :: PP_Doc+ _patsIattrs :: (Set String)+ _patsIcopy :: Patterns+ _patsIsem_lhs :: ([PP_Doc])+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1104, column 17)+ _lhsOsem_lhs =+ ({-# LINE 1104 "src-ag/ExecutionPlan2Hs.ag" #-}+ _addbang1 $ pp_block "(" ")" "," _patsIsem_lhs+ {-# LINE 6327 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1113, column 16)+ _lhsOisUnderscore =+ ({-# LINE 1113 "src-ag/ExecutionPlan2Hs.ag" #-}+ False+ {-# LINE 6333 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1521, column 37)+ _addbang =+ ({-# LINE 1521 "src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 6339 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1526, column 37)+ _addbang1 =+ ({-# LINE 1526 "src-ag/ExecutionPlan2Hs.ag" #-}+ if _lhsIanyLazyKind then id else _addbang+ {-# LINE 6345 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1123, column 40)+ _lhsOattrTypes =+ ({-# LINE 1123 "src-ag/ExecutionPlan2Hs.ag" #-}+ _patsIattrTypes+ {-# LINE 6351 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1118, column 36)+ _lhsOattrs =+ ({-# LINE 1118 "src-ag/ExecutionPlan2Hs.ag" #-}+ _patsIattrs+ {-# LINE 6357 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 6363 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 6369 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patsOallInhmap =+ ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInhmap+ {-# LINE 6375 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patsOallSynmap =+ ({-# LINE 322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallSynmap+ {-# LINE 6381 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patsOanyLazyKind =+ ({-# LINE 1267 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIanyLazyKind+ {-# LINE 6387 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patsOinhmap =+ ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 6393 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patsOlocalAttrTypes =+ ({-# LINE 1578 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIlocalAttrTypes+ {-# LINE 6399 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patsOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 6405 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _patsOsynmap =+ ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 6411 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _patsIattrTypes,_patsIattrs,_patsIcopy,_patsIsem_lhs) =+ pats_ _patsOallInhmap _patsOallSynmap _patsOanyLazyKind _patsOinhmap _patsOlocalAttrTypes _patsOoptions _patsOsynmap+ in ( _lhsOattrTypes,_lhsOattrs,_lhsOcopy,_lhsOisUnderscore,_lhsOsem_lhs))))+sem_Pattern_Underscore :: Pos ->+ T_Pattern+sem_Pattern_Underscore pos_ =+ (T_Pattern (\ _lhsIallInhmap+ _lhsIallSynmap+ _lhsIanyLazyKind+ _lhsIinhmap+ _lhsIlocalAttrTypes+ _lhsIoptions+ _lhsIsynmap ->+ (let _lhsOsem_lhs :: ( PP_Doc )+ _lhsOisUnderscore :: Bool+ _lhsOattrTypes :: PP_Doc+ _lhsOattrs :: (Set String)+ _lhsOcopy :: Pattern+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1106, column 17)+ _lhsOsem_lhs =+ ({-# LINE 1106 "src-ag/ExecutionPlan2Hs.ag" #-}+ text "_"+ {-# LINE 6435 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1115, column 16)+ _lhsOisUnderscore =+ ({-# LINE 1115 "src-ag/ExecutionPlan2Hs.ag" #-}+ True+ {-# LINE 6441 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1123, column 40)+ _lhsOattrTypes =+ ({-# LINE 1123 "src-ag/ExecutionPlan2Hs.ag" #-}+ empty+ {-# LINE 6447 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1118, column 36)+ _lhsOattrs =+ ({-# LINE 1118 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.empty+ {-# LINE 6453 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Underscore pos_+ {-# LINE 6459 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 6465 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOattrTypes,_lhsOattrs,_lhsOcopy,_lhsOisUnderscore,_lhsOsem_lhs))))+-- Patterns ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allInhmap : Map NontermIdent Attributes+ allSynmap : Map NontermIdent Attributes+ anyLazyKind : Bool+ inhmap : Attributes+ localAttrTypes : Map Identifier Type+ options : Options+ synmap : Attributes+ synthesized attributes:+ attrTypes : PP_Doc+ attrs : Set String+ copy : Patterns + sem_lhs : [PP_Doc]+ alternatives:+ alternative Cons:+ child hd : Pattern + child tl : Patterns + visit 0:+ local copy : _+ alternative Nil:+ visit 0:+ local copy : _+-}+-- cata+sem_Patterns :: Patterns ->+ T_Patterns+sem_Patterns list =+ (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list))+-- semantic domain+newtype T_Patterns = T_Patterns ((Map NontermIdent Attributes) ->+ (Map NontermIdent Attributes) ->+ Bool ->+ Attributes ->+ (Map Identifier Type) ->+ Options ->+ Attributes ->+ ( PP_Doc,(Set String),Patterns,([PP_Doc])))+data Inh_Patterns = Inh_Patterns {allInhmap_Inh_Patterns :: (Map NontermIdent Attributes),allSynmap_Inh_Patterns :: (Map NontermIdent Attributes),anyLazyKind_Inh_Patterns :: Bool,inhmap_Inh_Patterns :: Attributes,localAttrTypes_Inh_Patterns :: (Map Identifier Type),options_Inh_Patterns :: Options,synmap_Inh_Patterns :: Attributes}+data Syn_Patterns = Syn_Patterns {attrTypes_Syn_Patterns :: PP_Doc,attrs_Syn_Patterns :: (Set String),copy_Syn_Patterns :: Patterns,sem_lhs_Syn_Patterns :: ([PP_Doc])}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns+wrap_Patterns (T_Patterns sem) (Inh_Patterns _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) =+ (let ( _lhsOattrTypes,_lhsOattrs,_lhsOcopy,_lhsOsem_lhs) = sem _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap+ in (Syn_Patterns _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOsem_lhs))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns+sem_Patterns_Cons (T_Pattern hd_) (T_Patterns tl_) =+ (T_Patterns (\ _lhsIallInhmap+ _lhsIallSynmap+ _lhsIanyLazyKind+ _lhsIinhmap+ _lhsIlocalAttrTypes+ _lhsIoptions+ _lhsIsynmap ->+ (let _lhsOattrTypes :: PP_Doc+ _lhsOattrs :: (Set String)+ _lhsOsem_lhs :: ([PP_Doc])+ _lhsOcopy :: Patterns+ _hdOallInhmap :: (Map NontermIdent Attributes)+ _hdOallSynmap :: (Map NontermIdent Attributes)+ _hdOanyLazyKind :: Bool+ _hdOinhmap :: Attributes+ _hdOlocalAttrTypes :: (Map Identifier Type)+ _hdOoptions :: Options+ _hdOsynmap :: Attributes+ _tlOallInhmap :: (Map NontermIdent Attributes)+ _tlOallSynmap :: (Map NontermIdent Attributes)+ _tlOanyLazyKind :: Bool+ _tlOinhmap :: Attributes+ _tlOlocalAttrTypes :: (Map Identifier Type)+ _tlOoptions :: Options+ _tlOsynmap :: Attributes+ _hdIattrTypes :: PP_Doc+ _hdIattrs :: (Set String)+ _hdIcopy :: Pattern+ _hdIisUnderscore :: Bool+ _hdIsem_lhs :: ( PP_Doc )+ _tlIattrTypes :: PP_Doc+ _tlIattrs :: (Set String)+ _tlIcopy :: Patterns+ _tlIsem_lhs :: ([PP_Doc])+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1123, column 40)+ _lhsOattrTypes =+ ({-# LINE 1123 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIattrTypes >-< _tlIattrTypes+ {-# LINE 6558 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1118, column 36)+ _lhsOattrs =+ ({-# LINE 1118 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIattrs `Set.union` _tlIattrs+ {-# LINE 6564 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1095, column 29)+ _lhsOsem_lhs =+ ({-# LINE 1095 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIsem_lhs : _tlIsem_lhs+ {-# LINE 6570 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 6576 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 6582 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallInhmap =+ ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInhmap+ {-# LINE 6588 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallSynmap =+ ({-# LINE 322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallSynmap+ {-# LINE 6594 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOanyLazyKind =+ ({-# LINE 1267 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIanyLazyKind+ {-# LINE 6600 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOinhmap =+ ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 6606 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOlocalAttrTypes =+ ({-# LINE 1578 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIlocalAttrTypes+ {-# LINE 6612 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 6618 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOsynmap =+ ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 6624 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallInhmap =+ ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInhmap+ {-# LINE 6630 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallSynmap =+ ({-# LINE 322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallSynmap+ {-# LINE 6636 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOanyLazyKind =+ ({-# LINE 1267 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIanyLazyKind+ {-# LINE 6642 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOinhmap =+ ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 6648 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOlocalAttrTypes =+ ({-# LINE 1578 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIlocalAttrTypes+ {-# LINE 6654 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 6660 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOsynmap =+ ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 6666 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _hdIattrTypes,_hdIattrs,_hdIcopy,_hdIisUnderscore,_hdIsem_lhs) =+ hd_ _hdOallInhmap _hdOallSynmap _hdOanyLazyKind _hdOinhmap _hdOlocalAttrTypes _hdOoptions _hdOsynmap+ ( _tlIattrTypes,_tlIattrs,_tlIcopy,_tlIsem_lhs) =+ tl_ _tlOallInhmap _tlOallSynmap _tlOanyLazyKind _tlOinhmap _tlOlocalAttrTypes _tlOoptions _tlOsynmap+ in ( _lhsOattrTypes,_lhsOattrs,_lhsOcopy,_lhsOsem_lhs))))+sem_Patterns_Nil :: T_Patterns+sem_Patterns_Nil =+ (T_Patterns (\ _lhsIallInhmap+ _lhsIallSynmap+ _lhsIanyLazyKind+ _lhsIinhmap+ _lhsIlocalAttrTypes+ _lhsIoptions+ _lhsIsynmap ->+ (let _lhsOattrTypes :: PP_Doc+ _lhsOattrs :: (Set String)+ _lhsOsem_lhs :: ([PP_Doc])+ _lhsOcopy :: Patterns+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1123, column 40)+ _lhsOattrTypes =+ ({-# LINE 1123 "src-ag/ExecutionPlan2Hs.ag" #-}+ empty+ {-# LINE 6690 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1118, column 36)+ _lhsOattrs =+ ({-# LINE 1118 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.empty+ {-# LINE 6696 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1095, column 29)+ _lhsOsem_lhs =+ ({-# LINE 1095 "src-ag/ExecutionPlan2Hs.ag" #-}+ []+ {-# LINE 6702 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ []+ {-# LINE 6708 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 6714 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOattrTypes,_lhsOattrs,_lhsOcopy,_lhsOsem_lhs))))+-- Visit -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allFromToStates : Map VisitIdentifier (Int,Int)+ allInhmap : Map NontermIdent Attributes+ allInitStates : Map NontermIdent Int+ allSynmap : Map NontermIdent Attributes+ allVisitKinds : Map VisitIdentifier VisitKind+ allchildvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ allintramap : Map StateIdentifier (Map String (Maybe NonLocalAttr))+ avisitdefs : Map VisitIdentifier (Set Identifier)+ avisituses : Map VisitIdentifier (Set Identifier)+ childTypes : Map Identifier Type+ childintros : Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ con : ConstructorIdent+ inhmap : Attributes+ mrules : Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)+ nextVisits : Map StateIdentifier StateCtx+ nt : NontermIdent+ options : Options+ params : [Identifier]+ prevVisits : Map StateIdentifier StateCtx+ ruledefs : Map Identifier (Set String)+ ruleuses : Map Identifier (Map String (Maybe NonLocalAttr))+ synmap : Attributes+ terminaldefs : Set String+ synthesized attributes:+ allvisits : VisitStateState + childvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ errors : Seq Error+ fromToStates : Map VisitIdentifier (Int,Int)+ intramap : Map StateIdentifier (Map String (Maybe NonLocalAttr))+ lazyIntras : Set String+ ruleKinds : Map Identifier (Set VisitKind)+ ruleUsage : Map Identifier Int+ sem_visit : (StateIdentifier,Bool -> PP_Doc) + t_visits : PP_Doc+ visitKinds : Map VisitIdentifier VisitKind+ visitdefs : Map VisitIdentifier (Set Identifier)+ visituses : Map VisitIdentifier (Set Identifier)+ alternatives:+ alternative Visit:+ child ident : {VisitIdentifier}+ child from : {StateIdentifier}+ child to : {StateIdentifier}+ child inh : {Set Identifier}+ child syn : {Set Identifier}+ child steps : VisitSteps + child kind : {VisitKind}+ visit 0:+ local nameT_visit : _+ local nameTIn_visit : _+ local nameTOut_visit : _+ local nameTNext_visit : _+ local nextVisitInfo : _+ local typecon : _+ local t_params : _+ local inhpart : _+ local synpart : _+ local ppTypeList : _+ local stepsInitial : _+ local stepsClosing : _+ local vname : _+ local inhpats : _+ local inhargs : _+ local synargs : _+ local nextargsMp : _+ local nextargs : _+ local nextst : _+ local resultval : _+ local nextStBuild : _+ local nextStRef : _+ local prevVisitInfo : _+ local invokecode : _+ local thisintra : _+ local nextintra : _+ local uses : _+ local inhVarNms : _+ local defs : _+ local defsAsMap : _+ local lazyIntrasInh : _+ local addbang : _+ local addbang1 : _+-}+-- cata+sem_Visit :: Visit ->+ T_Visit+sem_Visit (Visit _ident _from _to _inh _syn _steps _kind) =+ (sem_Visit_Visit _ident _from _to _inh _syn (sem_VisitSteps _steps) _kind)+-- semantic domain+newtype T_Visit = T_Visit ((Map VisitIdentifier (Int,Int)) ->+ (Map NontermIdent Attributes) ->+ (Map NontermIdent Int) ->+ (Map NontermIdent Attributes) ->+ (Map VisitIdentifier VisitKind) ->+ (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ (Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->+ (Map VisitIdentifier (Set Identifier)) ->+ (Map VisitIdentifier (Set Identifier)) ->+ (Map Identifier Type) ->+ (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ ConstructorIdent ->+ Attributes ->+ (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ (Map StateIdentifier StateCtx) ->+ NontermIdent ->+ Options ->+ ([Identifier]) ->+ (Map StateIdentifier StateCtx) ->+ (Map Identifier (Set String)) ->+ (Map Identifier (Map String (Maybe NonLocalAttr))) ->+ Attributes ->+ (Set String) ->+ ( ( VisitStateState ),(Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),(Seq Error),(Map VisitIdentifier (Int,Int)),(Map StateIdentifier (Map String (Maybe NonLocalAttr))),(Set String),(Map Identifier (Set VisitKind)),(Map Identifier Int),( (StateIdentifier,Bool -> PP_Doc) ),PP_Doc,(Map VisitIdentifier VisitKind),(Map VisitIdentifier (Set Identifier)),(Map VisitIdentifier (Set Identifier))))+data Inh_Visit = Inh_Visit {allFromToStates_Inh_Visit :: (Map VisitIdentifier (Int,Int)),allInhmap_Inh_Visit :: (Map NontermIdent Attributes),allInitStates_Inh_Visit :: (Map NontermIdent Int),allSynmap_Inh_Visit :: (Map NontermIdent Attributes),allVisitKinds_Inh_Visit :: (Map VisitIdentifier VisitKind),allchildvisit_Inh_Visit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),allintramap_Inh_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))),avisitdefs_Inh_Visit :: (Map VisitIdentifier (Set Identifier)),avisituses_Inh_Visit :: (Map VisitIdentifier (Set Identifier)),childTypes_Inh_Visit :: (Map Identifier Type),childintros_Inh_Visit :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))),con_Inh_Visit :: ConstructorIdent,inhmap_Inh_Visit :: Attributes,mrules_Inh_Visit :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)),nextVisits_Inh_Visit :: (Map StateIdentifier StateCtx),nt_Inh_Visit :: NontermIdent,options_Inh_Visit :: Options,params_Inh_Visit :: ([Identifier]),prevVisits_Inh_Visit :: (Map StateIdentifier StateCtx),ruledefs_Inh_Visit :: (Map Identifier (Set String)),ruleuses_Inh_Visit :: (Map Identifier (Map String (Maybe NonLocalAttr))),synmap_Inh_Visit :: Attributes,terminaldefs_Inh_Visit :: (Set String)}+data Syn_Visit = Syn_Visit {allvisits_Syn_Visit :: ( VisitStateState ),childvisit_Syn_Visit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),errors_Syn_Visit :: (Seq Error),fromToStates_Syn_Visit :: (Map VisitIdentifier (Int,Int)),intramap_Syn_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))),lazyIntras_Syn_Visit :: (Set String),ruleKinds_Syn_Visit :: (Map Identifier (Set VisitKind)),ruleUsage_Syn_Visit :: (Map Identifier Int),sem_visit_Syn_Visit :: ( (StateIdentifier,Bool -> PP_Doc) ),t_visits_Syn_Visit :: PP_Doc,visitKinds_Syn_Visit :: (Map VisitIdentifier VisitKind),visitdefs_Syn_Visit :: (Map VisitIdentifier (Set Identifier)),visituses_Syn_Visit :: (Map VisitIdentifier (Set Identifier))}+wrap_Visit :: T_Visit ->+ Inh_Visit ->+ Syn_Visit+wrap_Visit (T_Visit sem) (Inh_Visit _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) =+ (let ( _lhsOallvisits,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOintramap,_lhsOlazyIntras,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_visit,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses) = sem _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs+ in (Syn_Visit _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses))+sem_Visit_Visit :: VisitIdentifier ->+ StateIdentifier ->+ StateIdentifier ->+ (Set Identifier) ->+ (Set Identifier) ->+ T_VisitSteps ->+ VisitKind ->+ T_Visit+sem_Visit_Visit ident_ from_ to_ inh_ syn_ (T_VisitSteps steps_) kind_ =+ (T_Visit (\ _lhsIallFromToStates+ _lhsIallInhmap+ _lhsIallInitStates+ _lhsIallSynmap+ _lhsIallVisitKinds+ _lhsIallchildvisit+ _lhsIallintramap+ _lhsIavisitdefs+ _lhsIavisituses+ _lhsIchildTypes+ _lhsIchildintros+ _lhsIcon+ _lhsIinhmap+ _lhsImrules+ _lhsInextVisits+ _lhsInt+ _lhsIoptions+ _lhsIparams+ _lhsIprevVisits+ _lhsIruledefs+ _lhsIruleuses+ _lhsIsynmap+ _lhsIterminaldefs ->+ (let _lhsOallvisits :: ( VisitStateState )+ _lhsOt_visits :: PP_Doc+ _lhsOsem_visit :: ( (StateIdentifier,Bool -> PP_Doc) )+ _stepsOkind :: VisitKind+ _stepsOfmtMode :: FormatMode+ _stepsOindex :: Int+ _stepsOprevMaxSimRefs :: Int+ _stepsOuseParallel :: Bool+ _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _lhsOintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))+ _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))+ _lhsOlazyIntras :: (Set String)+ _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))+ _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)+ _lhsOerrors :: (Seq Error)+ _lhsOruleKinds :: (Map Identifier (Set VisitKind))+ _lhsOruleUsage :: (Map Identifier Int)+ _stepsOallFromToStates :: (Map VisitIdentifier (Int,Int))+ _stepsOallInitStates :: (Map NontermIdent Int)+ _stepsOallVisitKinds :: (Map VisitIdentifier VisitKind)+ _stepsOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _stepsOavisitdefs :: (Map VisitIdentifier (Set Identifier))+ _stepsOavisituses :: (Map VisitIdentifier (Set Identifier))+ _stepsOchildTypes :: (Map Identifier Type)+ _stepsOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))+ _stepsOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))+ _stepsOoptions :: Options+ _stepsOruledefs :: (Map Identifier (Set String))+ _stepsOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))+ _stepsIdefs :: (Set String)+ _stepsIerrors :: (Seq Error)+ _stepsIindex :: Int+ _stepsIisLast :: Bool+ _stepsIlazyIntras :: (Set String)+ _stepsIprevMaxSimRefs :: Int+ _stepsIruleKinds :: (Map Identifier (Set VisitKind))+ _stepsIruleUsage :: (Map Identifier Int)+ _stepsIsem_steps :: PP_Doc+ _stepsIsize :: Int+ _stepsIsync_steps :: PP_Doc+ _stepsIuses :: (Map String (Maybe NonLocalAttr))+ _stepsIvisitKinds :: (Map VisitIdentifier VisitKind)+ -- "src-ag/ExecutionPlan2Hs.ag"(line 341, column 11)+ _lhsOallvisits =+ ({-# LINE 341 "src-ag/ExecutionPlan2Hs.ag" #-}+ (ident_, from_, to_)+ {-# LINE 6919 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 400, column 11)+ _nameT_visit =+ ({-# LINE 400 "src-ag/ExecutionPlan2Hs.ag" #-}+ conNmTVisit _lhsInt ident_+ {-# LINE 6925 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 401, column 11)+ _nameTIn_visit =+ ({-# LINE 401 "src-ag/ExecutionPlan2Hs.ag" #-}+ conNmTVisitIn _lhsInt ident_+ {-# LINE 6931 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 402, column 11)+ _nameTOut_visit =+ ({-# LINE 402 "src-ag/ExecutionPlan2Hs.ag" #-}+ conNmTVisitOut _lhsInt ident_+ {-# LINE 6937 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 403, column 11)+ _nameTNext_visit =+ ({-# LINE 403 "src-ag/ExecutionPlan2Hs.ag" #-}+ conNmTNextVisit _lhsInt to_+ {-# LINE 6943 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 405, column 11)+ _nextVisitInfo =+ ({-# LINE 405 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault ManyVis to_ _lhsInextVisits+ {-# LINE 6949 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 406, column 11)+ _typecon =+ ({-# LINE 406 "src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ VisitPure _ -> empty+ VisitMonadic -> ppMonadType _lhsIoptions+ {-# LINE 6957 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 410, column 11)+ _t_params =+ ({-# LINE 410 "src-ag/ExecutionPlan2Hs.ag" #-}+ ppSpaced _lhsIparams+ {-# LINE 6963 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 411, column 11)+ _lhsOt_visits =+ ({-# LINE 411 "src-ag/ExecutionPlan2Hs.ag" #-}+ "type" >#< _nameT_visit >#< _t_params >#< "=" >#<+ pp_parens (_nameTIn_visit >#< _t_params )+ >#< ( if dummyTokenVisit _lhsIoptions+ then "->" >#< dummyType _lhsIoptions True+ else empty+ )+ >#< "->" >#< _typecon >#< pp_parens (_nameTOut_visit >#< _t_params )+ >-< "data" >#< _nameTIn_visit >#< _t_params >#< "=" >#< _nameTIn_visit >#<+ _inhpart+ >-< "data" >#< _nameTOut_visit >#< _t_params >#< "=" >#< _nameTOut_visit >#<+ _synpart >#< case _nextVisitInfo of+ NoneVis -> empty+ _ -> _addbang1 $ pp_parens (_nameTNext_visit >#< _t_params )+ {-# LINE 6981 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 424, column 11)+ _inhpart =+ ({-# LINE 424 "src-ag/ExecutionPlan2Hs.ag" #-}+ _ppTypeList inh_ _lhsIinhmap+ {-# LINE 6987 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 425, column 11)+ _synpart =+ ({-# LINE 425 "src-ag/ExecutionPlan2Hs.ag" #-}+ _ppTypeList syn_ _lhsIsynmap+ {-# LINE 6993 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 426, column 11)+ _ppTypeList =+ ({-# LINE 426 "src-ag/ExecutionPlan2Hs.ag" #-}+ \s m -> ppSpaced $ map (\i -> _addbang1 $ pp_parens $ case Map.lookup i m of+ Just tp -> ppTp tp ) $ Set.toList s+ {-# LINE 7000 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 709, column 11)+ _lhsOsem_visit =+ ({-# LINE 709 "src-ag/ExecutionPlan2Hs.ag" #-}+ ( from_+ , \addInlinePragma ->+ ( if noInlinePragmas _lhsIoptions+ then empty+ else if addInlinePragma && aggressiveInlinePragmas _lhsIoptions+ then ppInline _vname+ else if helpInlining _lhsIoptions+ then ppNoInline _vname+ else empty+ )+ >-< "v" >|< ident_ >#< "::" >#< _nameT_visit >#< _t_params+ >-< "v" >|< ident_ >#< "=" >#< "\\" >#< (_addbang $ pp_parens (_nameTIn_visit >#< _inhpats ))+ >#< ( if dummyTokenVisit _lhsIoptions+ then pp $ dummyPat _lhsIoptions True+ else empty+ )+ >#< "->"+ >#< ( if genCostCentres _lhsIoptions+ then ppCostCentre (_vname >|< "_" >|< _lhsInt >|< "_" >|< _lhsIcon)+ else empty+ ) >#< "(" >#< _stepsInitial+ >-< indent 3 (_stepsIsem_steps >-< _stepsClosing >#< ")")+ )+ {-# LINE 7028 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 734, column 11)+ _stepsInitial =+ ({-# LINE 734 "src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ VisitPure False -> text "let"+ VisitPure True -> empty+ VisitMonadic -> text "do"+ {-# LINE 7037 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 738, column 11)+ _stepsClosing =+ ({-# LINE 738 "src-ag/ExecutionPlan2Hs.ag" #-}+ let decls = _nextStBuild+ >-< _addbang (pp resultValName) >#< "=" >#< _resultval+ in case kind_ of+ VisitPure False -> decls+ >-< "in" >#< resultValName+ VisitPure True -> "let" >#< decls+ >-< indent 1 ("in" >#< resultValName)+ VisitMonadic -> "let" >#< decls+ >-< "return" >#< resultValName+ {-# LINE 7051 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 747, column 11)+ _vname =+ ({-# LINE 747 "src-ag/ExecutionPlan2Hs.ag" #-}+ "v" >|< ident_+ {-# LINE 7057 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 748, column 11)+ _inhpats =+ ({-# LINE 748 "src-ag/ExecutionPlan2Hs.ag" #-}+ ppSpaced $ map (\arg -> _addbang $ pp $ attrname True _LHS arg) $ Set.toList inh_+ {-# LINE 7063 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 749, column 11)+ _inhargs =+ ({-# LINE 749 "src-ag/ExecutionPlan2Hs.ag" #-}+ \chn -> ppSpaced $ map (attrname False chn) $ Set.toList inh_+ {-# LINE 7069 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 750, column 11)+ _synargs =+ ({-# LINE 750 "src-ag/ExecutionPlan2Hs.ag" #-}+ ppSpaced $ map (\arg -> attrname False _LHS arg) $ Set.toList syn_+ {-# LINE 7075 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 751, column 11)+ _nextargsMp =+ ({-# LINE 751 "src-ag/ExecutionPlan2Hs.ag" #-}+ maybe Map.empty id $ Map.lookup to_ _lhsIallintramap+ {-# LINE 7081 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 752, column 11)+ _nextargs =+ ({-# LINE 752 "src-ag/ExecutionPlan2Hs.ag" #-}+ ppSpaced $ Map.keys $ _nextargsMp+ {-# LINE 7087 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 753, column 11)+ _nextst =+ ({-# LINE 753 "src-ag/ExecutionPlan2Hs.ag" #-}+ "st" >|< to_ >#< _nextargs >#< dummyArg _lhsIoptions (Map.null _nextargsMp )+ {-# LINE 7093 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 754, column 11)+ _resultval =+ ({-# LINE 754 "src-ag/ExecutionPlan2Hs.ag" #-}+ _nameTOut_visit >#< _synargs >#< _nextStRef+ {-# LINE 7099 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 755, column 11)+ (_nextStBuild,_nextStRef) =+ ({-# LINE 755 "src-ag/ExecutionPlan2Hs.ag" #-}+ case _nextVisitInfo of+ NoneVis -> (empty, empty)+ _ -> (_addbang (pp nextStName) >#< "=" >#< _nextst , pp nextStName)+ {-# LINE 7107 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 770, column 20)+ _stepsOkind =+ ({-# LINE 770 "src-ag/ExecutionPlan2Hs.ag" #-}+ kind_+ {-# LINE 7113 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 821, column 3)+ _stepsOfmtMode =+ ({-# LINE 821 "src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ VisitPure False -> FormatLetDecl+ VisitPure True -> FormatLetLine+ VisitMonadic -> FormatDo+ {-# LINE 7122 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 859, column 22)+ _stepsOindex =+ ({-# LINE 859 "src-ag/ExecutionPlan2Hs.ag" #-}+ 0+ {-# LINE 7128 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 866, column 22)+ _stepsOprevMaxSimRefs =+ ({-# LINE 866 "src-ag/ExecutionPlan2Hs.ag" #-}+ 0+ {-# LINE 7134 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 882, column 22)+ _stepsOuseParallel =+ ({-# LINE 882 "src-ag/ExecutionPlan2Hs.ag" #-}+ False+ {-# LINE 7140 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1196, column 6)+ _prevVisitInfo =+ ({-# LINE 1196 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault ManyVis from_ _lhsInextVisits+ {-# LINE 7146 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1197, column 6)+ _lhsOchildvisit =+ ({-# LINE 1197 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton ident_ _invokecode+ {-# LINE 7152 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1198, column 6)+ _invokecode =+ ({-# LINE 1198 "src-ag/ExecutionPlan2Hs.ag" #-}+ \chn kind ->+ if kind `compatibleKind` kind_+ then Right $+ let pat | isLazyKind kind_ = pat0+ | otherwise = _addbang pat0+ pat0 = pp_parens pat1+ pat1 = _nameTOut_visit >#< (ppSpaced $ map (attrname True chn) $ Set.toList syn_)+ >#< cont+ cont = case _nextVisitInfo of+ NoneVis -> empty+ _ -> ch1+ ch0 = text $ stname chn from_+ ch1 = text $ stname chn to_+ expr = case (kind, kind_) of+ (VisitPure _, VisitPure _) -> expr0+ (VisitPure _, VisitMonadic) -> unMon _lhsIoptions >#< expr0+ (VisitMonadic, VisitPure _) -> "return" >#< expr0+ (VisitMonadic, VisitMonadic) -> expr0+ expr0 = case _prevVisitInfo of+ NoneVis -> error "error: invocation of a visit from a state that has no next visits"+ OneVis _ -> "inv_" >|< _lhsInt >|< "_s" >|< from_ >#< ch0 >#< args+ ManyVis -> "inv_" >|< _lhsInt >|< "_s" >|< from_ >#< ch0+ >#< "K_" >|< _lhsInt >|< "_v" >|< ident_ >#< args+ args = pp_parens args0 >#< args1+ args0 = _nameTIn_visit >#< _inhargs chn+ args1 | dummyTokenVisit _lhsIoptions = pp $ dummyArg _lhsIoptions True+ | otherwise = empty+ in (pat, expr)+ else Left $ IncompatibleVisitKind chn ident_ kind kind_+ {-# LINE 7186 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1294, column 11)+ _thisintra =+ ({-# LINE 1294 "src-ag/ExecutionPlan2Hs.ag" #-}+ (_uses `Map.union` _nextintra ) `Map.difference` _defsAsMap+ {-# LINE 7192 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1295, column 11)+ _lhsOintramap =+ ({-# LINE 1295 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton from_ _thisintra+ {-# LINE 7198 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1296, column 11)+ _nextintra =+ ({-# LINE 1296 "src-ag/ExecutionPlan2Hs.ag" #-}+ maybe Map.empty id $ Map.lookup to_ _lhsIallintramap+ {-# LINE 7204 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1297, column 11)+ _uses =+ ({-# LINE 1297 "src-ag/ExecutionPlan2Hs.ag" #-}+ let mp1 = _stepsIuses+ mp2 = Map.fromList [ (lhsname False i, Just (AttrSyn _LHS i)) | i <- Set.elems syn_ ]+ in mp1 `Map.union` mp2+ {-# LINE 7212 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1300, column 11)+ _inhVarNms =+ ({-# LINE 1300 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.map (lhsname True) inh_+ {-# LINE 7218 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1301, column 11)+ _defs =+ ({-# LINE 1301 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIdefs `Set.union` _inhVarNms `Set.union` _lhsIterminaldefs+ {-# LINE 7224 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1302, column 11)+ _defsAsMap =+ ({-# LINE 1302 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.fromList [ (a, Nothing) | a <- Set.elems _defs ]+ {-# LINE 7230 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1326, column 11)+ _lhsOvisitdefs =+ ({-# LINE 1326 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton ident_ syn_+ {-# LINE 7236 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1327, column 11)+ _lhsOvisituses =+ ({-# LINE 1327 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton ident_ inh_+ {-# LINE 7242 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1359, column 3)+ _lazyIntrasInh =+ ({-# LINE 1359 "src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ VisitPure False -> _inhVarNms `Set.union` _stepsIdefs+ _ -> Set.empty+ {-# LINE 7250 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1362, column 3)+ _lhsOlazyIntras =+ ({-# LINE 1362 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lazyIntrasInh `Set.union` _stepsIlazyIntras+ {-# LINE 7256 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1515, column 37)+ _addbang =+ ({-# LINE 1515 "src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 7262 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1523, column 37)+ _addbang1 =+ ({-# LINE 1523 "src-ag/ExecutionPlan2Hs.ag" #-}+ if isLazyKind kind_ then id else _addbang+ {-# LINE 7268 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1550, column 3)+ _lhsOfromToStates =+ ({-# LINE 1550 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton ident_ (from_, to_)+ {-# LINE 7274 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1594, column 3)+ _lhsOvisitKinds =+ ({-# LINE 1594 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton ident_ kind_+ {-# LINE 7280 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1629, column 132)+ _lhsOerrors =+ ({-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIerrors+ {-# LINE 7286 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1255, column 56)+ _lhsOruleKinds =+ ({-# LINE 1255 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIruleKinds+ {-# LINE 7292 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1243, column 56)+ _lhsOruleUsage =+ ({-# LINE 1243 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIruleUsage+ {-# LINE 7298 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOallFromToStates =+ ({-# LINE 1547 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallFromToStates+ {-# LINE 7304 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOallInitStates =+ ({-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInitStates+ {-# LINE 7310 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOallVisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallVisitKinds+ {-# LINE 7316 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOallchildvisit =+ ({-# LINE 1189 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallchildvisit+ {-# LINE 7322 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOavisitdefs =+ ({-# LINE 1332 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisitdefs+ {-# LINE 7328 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOavisituses =+ ({-# LINE 1333 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisituses+ {-# LINE 7334 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOchildTypes =+ ({-# LINE 1564 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIchildTypes+ {-# LINE 7340 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOchildintros =+ ({-# LINE 893 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIchildintros+ {-# LINE 7346 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOmrules =+ ({-# LINE 776 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImrules+ {-# LINE 7352 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 7358 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOruledefs =+ ({-# LINE 1307 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIruledefs+ {-# LINE 7364 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOruleuses =+ ({-# LINE 1308 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIruleuses+ {-# LINE 7370 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _stepsIdefs,_stepsIerrors,_stepsIindex,_stepsIisLast,_stepsIlazyIntras,_stepsIprevMaxSimRefs,_stepsIruleKinds,_stepsIruleUsage,_stepsIsem_steps,_stepsIsize,_stepsIsync_steps,_stepsIuses,_stepsIvisitKinds) =+ steps_ _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfmtMode _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel+ in ( _lhsOallvisits,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOintramap,_lhsOlazyIntras,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_visit,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))))+-- VisitStep ---------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allFromToStates : Map VisitIdentifier (Int,Int)+ allInitStates : Map NontermIdent Int+ allVisitKinds : Map VisitIdentifier VisitKind+ allchildvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ avisitdefs : Map VisitIdentifier (Set Identifier)+ avisituses : Map VisitIdentifier (Set Identifier)+ childTypes : Map Identifier Type+ childintros : Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ fmtMode : FormatMode+ kind : VisitKind+ mrules : Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)+ options : Options+ ruledefs : Map Identifier (Set String)+ ruleuses : Map Identifier (Map String (Maybe NonLocalAttr))+ useParallel : Bool+ chained attributes:+ index : Int+ isLast : Bool+ prevMaxSimRefs : Int+ synthesized attributes:+ defs : Set String+ errors : Seq Error+ lazyIntras : Set String+ ruleKinds : Map Identifier (Set VisitKind)+ ruleUsage : Map Identifier Int+ sem_steps : PP_Doc+ sync_steps : PP_Doc+ uses : Map String (Maybe NonLocalAttr)+ visitKinds : Map VisitIdentifier VisitKind+ alternatives:+ alternative ChildIntro:+ child child : {Identifier}+ visit 0:+ local attachItf : _+ alternative ChildVisit:+ child child : {Identifier}+ child nonterm : {NontermIdent}+ child visit : {VisitIdentifier}+ visit 0:+ local visitItf : _+ local patPP : _+ local exprPP : _+ local useParallel : _+ local convToMonad : _+ local callKind : _+ local addbang : _+ local from : _+ local to : _+ alternative PureGroup:+ child steps : VisitSteps + child ordered : {Bool}+ alternative Sem:+ child name : {Identifier}+ visit 0:+ local ruleItf : _+ local sem_steps : _+ alternative Sim:+ child steps : VisitSteps + visit 0:+ local useParallel : _+ local isMonadic : _+-}+-- cata+sem_VisitStep :: VisitStep ->+ T_VisitStep+sem_VisitStep (ChildIntro _child) =+ (sem_VisitStep_ChildIntro _child)+sem_VisitStep (ChildVisit _child _nonterm _visit) =+ (sem_VisitStep_ChildVisit _child _nonterm _visit)+sem_VisitStep (PureGroup _steps _ordered) =+ (sem_VisitStep_PureGroup (sem_VisitSteps _steps) _ordered)+sem_VisitStep (Sem _name) =+ (sem_VisitStep_Sem _name)+sem_VisitStep (Sim _steps) =+ (sem_VisitStep_Sim (sem_VisitSteps _steps))+-- semantic domain+newtype T_VisitStep = T_VisitStep ((Map VisitIdentifier (Int,Int)) ->+ (Map NontermIdent Int) ->+ (Map VisitIdentifier VisitKind) ->+ (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ (Map VisitIdentifier (Set Identifier)) ->+ (Map VisitIdentifier (Set Identifier)) ->+ (Map Identifier Type) ->+ (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ FormatMode ->+ Int ->+ Bool ->+ VisitKind ->+ (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ Options ->+ Int ->+ (Map Identifier (Set String)) ->+ (Map Identifier (Map String (Maybe NonLocalAttr))) ->+ Bool ->+ ( (Set String),(Seq Error),Int,Bool,(Set String),Int,(Map Identifier (Set VisitKind)),(Map Identifier Int),PP_Doc,PP_Doc,(Map String (Maybe NonLocalAttr)),(Map VisitIdentifier VisitKind)))+data Inh_VisitStep = Inh_VisitStep {allFromToStates_Inh_VisitStep :: (Map VisitIdentifier (Int,Int)),allInitStates_Inh_VisitStep :: (Map NontermIdent Int),allVisitKinds_Inh_VisitStep :: (Map VisitIdentifier VisitKind),allchildvisit_Inh_VisitStep :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),avisitdefs_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)),avisituses_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)),childTypes_Inh_VisitStep :: (Map Identifier Type),childintros_Inh_VisitStep :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))),fmtMode_Inh_VisitStep :: FormatMode,index_Inh_VisitStep :: Int,isLast_Inh_VisitStep :: Bool,kind_Inh_VisitStep :: VisitKind,mrules_Inh_VisitStep :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)),options_Inh_VisitStep :: Options,prevMaxSimRefs_Inh_VisitStep :: Int,ruledefs_Inh_VisitStep :: (Map Identifier (Set String)),ruleuses_Inh_VisitStep :: (Map Identifier (Map String (Maybe NonLocalAttr))),useParallel_Inh_VisitStep :: Bool}+data Syn_VisitStep = Syn_VisitStep {defs_Syn_VisitStep :: (Set String),errors_Syn_VisitStep :: (Seq Error),index_Syn_VisitStep :: Int,isLast_Syn_VisitStep :: Bool,lazyIntras_Syn_VisitStep :: (Set String),prevMaxSimRefs_Syn_VisitStep :: Int,ruleKinds_Syn_VisitStep :: (Map Identifier (Set VisitKind)),ruleUsage_Syn_VisitStep :: (Map Identifier Int),sem_steps_Syn_VisitStep :: PP_Doc,sync_steps_Syn_VisitStep :: PP_Doc,uses_Syn_VisitStep :: (Map String (Maybe NonLocalAttr)),visitKinds_Syn_VisitStep :: (Map VisitIdentifier VisitKind)}+wrap_VisitStep :: T_VisitStep ->+ Inh_VisitStep ->+ Syn_VisitStep+wrap_VisitStep (T_VisitStep sem) (Inh_VisitStep _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) =+ (let ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds) = sem _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel+ in (Syn_VisitStep _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsync_steps _lhsOuses _lhsOvisitKinds))+sem_VisitStep_ChildIntro :: Identifier ->+ T_VisitStep+sem_VisitStep_ChildIntro child_ =+ (T_VisitStep (\ _lhsIallFromToStates+ _lhsIallInitStates+ _lhsIallVisitKinds+ _lhsIallchildvisit+ _lhsIavisitdefs+ _lhsIavisituses+ _lhsIchildTypes+ _lhsIchildintros+ _lhsIfmtMode+ _lhsIindex+ _lhsIisLast+ _lhsIkind+ _lhsImrules+ _lhsIoptions+ _lhsIprevMaxSimRefs+ _lhsIruledefs+ _lhsIruleuses+ _lhsIuseParallel ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOsem_steps :: PP_Doc+ _lhsOdefs :: (Set String)+ _lhsOuses :: (Map String (Maybe NonLocalAttr))+ _lhsOlazyIntras :: (Set String)+ _lhsOruleKinds :: (Map Identifier (Set VisitKind))+ _lhsOruleUsage :: (Map Identifier Int)+ _lhsOsync_steps :: PP_Doc+ _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)+ _lhsOindex :: Int+ _lhsOisLast :: Bool+ _lhsOprevMaxSimRefs :: Int+ -- "src-ag/ExecutionPlan2Hs.ag"(line 783, column 16)+ _attachItf =+ ({-# LINE 783 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault (error $ "Child " ++ show child_ ++ " not found") child_ _lhsIchildintros+ {-# LINE 7519 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 784, column 16)+ (_lhsOerrors,_lhsOsem_steps,_lhsOdefs,_lhsOuses) =+ ({-# LINE 784 "src-ag/ExecutionPlan2Hs.ag" #-}+ case _attachItf _lhsIkind _lhsIfmtMode of+ Left e -> (Seq.singleton e, empty, Set.empty, Map.empty)+ Right (code, defs, uses) -> (Seq.empty, code, defs, uses)+ {-# LINE 7527 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1355, column 57)+ _lhsOlazyIntras =+ ({-# LINE 1355 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.empty+ {-# LINE 7533 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1255, column 56)+ _lhsOruleKinds =+ ({-# LINE 1255 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 7539 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1243, column 56)+ _lhsOruleUsage =+ ({-# LINE 1243 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 7545 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 810, column 44)+ _lhsOsync_steps =+ ({-# LINE 810 "src-ag/ExecutionPlan2Hs.ag" #-}+ empty+ {-# LINE 7551 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1591, column 68)+ _lhsOvisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ mempty+ {-# LINE 7557 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (chain)+ _lhsOindex =+ ({-# LINE 854 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIindex+ {-# LINE 7563 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (chain)+ _lhsOisLast =+ ({-# LINE 873 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIisLast+ {-# LINE 7569 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (chain)+ _lhsOprevMaxSimRefs =+ ({-# LINE 865 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIprevMaxSimRefs+ {-# LINE 7575 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds))))+sem_VisitStep_ChildVisit :: Identifier ->+ NontermIdent ->+ VisitIdentifier ->+ T_VisitStep+sem_VisitStep_ChildVisit child_ nonterm_ visit_ =+ (T_VisitStep (\ _lhsIallFromToStates+ _lhsIallInitStates+ _lhsIallVisitKinds+ _lhsIallchildvisit+ _lhsIavisitdefs+ _lhsIavisituses+ _lhsIchildTypes+ _lhsIchildintros+ _lhsIfmtMode+ _lhsIindex+ _lhsIisLast+ _lhsIkind+ _lhsImrules+ _lhsIoptions+ _lhsIprevMaxSimRefs+ _lhsIruledefs+ _lhsIruleuses+ _lhsIuseParallel ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOsem_steps :: PP_Doc+ _lhsOsync_steps :: PP_Doc+ _lhsOdefs :: (Set String)+ _lhsOuses :: (Map String (Maybe NonLocalAttr))+ _lhsOlazyIntras :: (Set String)+ _lhsOruleKinds :: (Map Identifier (Set VisitKind))+ _lhsOruleUsage :: (Map Identifier Int)+ _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)+ _lhsOindex :: Int+ _lhsOisLast :: Bool+ _lhsOprevMaxSimRefs :: Int+ -- "src-ag/ExecutionPlan2Hs.ag"(line 788, column 16)+ _visitItf =+ ({-# LINE 788 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault (error $ "Visit " ++ show visit_ ++ " not found") visit_ _lhsIallchildvisit+ {-# LINE 7617 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 789, column 16)+ (_lhsOerrors,_patPP,_exprPP) =+ ({-# LINE 789 "src-ag/ExecutionPlan2Hs.ag" #-}+ case _visitItf child_ _lhsIkind of+ Left e -> (Seq.singleton e, empty, empty)+ Right (pat,expr) -> (Seq.empty, pat, expr)+ {-# LINE 7625 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 793, column 16)+ _useParallel =+ ({-# LINE 793 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIuseParallel && not _lhsIisLast+ {-# LINE 7631 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 794, column 16)+ _lhsOsem_steps =+ ({-# LINE 794 "src-ag/ExecutionPlan2Hs.ag" #-}+ if _useParallel+ then _addbang ("sync_" >|< _lhsIindex) >#< "<- newEmptyMVar"+ >-< "forkIO" >#< pp_parens (_convToMonad >#< pp_parens _exprPP >#< ">>= \\" >#< _addbang (pp parResultName) >#< " -> putMVar sync_" >|< _lhsIindex >#< parResultName)+ else let decl = case _lhsIkind of+ VisitPure _ -> _patPP >#< "=" >#< _exprPP+ VisitMonadic -> _patPP >#< "<-" >#< _exprPP+ in fmtDecl False _lhsIfmtMode decl+ {-# LINE 7643 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 801, column 16)+ _convToMonad =+ ({-# LINE 801 "src-ag/ExecutionPlan2Hs.ag" #-}+ case _callKind of+ VisitPure _ -> text "return"+ VisitMonadic -> empty+ {-# LINE 7651 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 804, column 16)+ _callKind =+ ({-# LINE 804 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault (error "visit kind should be in the map") visit_ _lhsIallVisitKinds+ {-# LINE 7657 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 812, column 3)+ _lhsOsync_steps =+ ({-# LINE 812 "src-ag/ExecutionPlan2Hs.ag" #-}+ if _useParallel+ then _patPP >#< "<-" >#< "takeMVar sync_" >|< _lhsIindex+ else empty+ {-# LINE 7665 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1344, column 16)+ _lhsOdefs =+ ({-# LINE 1344 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.insert (stname child_ _to) $ maybe (error "Visit not found") (Set.map $ attrname True child_) $ Map.lookup visit_ _lhsIavisitdefs+ {-# LINE 7671 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1345, column 16)+ _lhsOuses =+ ({-# LINE 1345 "src-ag/ExecutionPlan2Hs.ag" #-}+ let convert attrs = Map.fromList [ (attrname False child_ attr, Just $ mkNonLocalAttr True child_ attr) | attr <- Set.elems attrs ]+ in Map.insert (stname child_ _from) Nothing $ convert $+ maybe (error "Visit not found") id $ Map.lookup visit_ _lhsIavisituses+ {-# LINE 7679 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1520, column 37)+ _addbang =+ ({-# LINE 1520 "src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 7685 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1556, column 3)+ (_from,_to) =+ ({-# LINE 1556 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault (error "visit not in allFromToStates") visit_ _lhsIallFromToStates+ {-# LINE 7691 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1355, column 57)+ _lhsOlazyIntras =+ ({-# LINE 1355 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.empty+ {-# LINE 7697 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1255, column 56)+ _lhsOruleKinds =+ ({-# LINE 1255 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 7703 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1243, column 56)+ _lhsOruleUsage =+ ({-# LINE 1243 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 7709 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1591, column 68)+ _lhsOvisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ mempty+ {-# LINE 7715 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (chain)+ _lhsOindex =+ ({-# LINE 854 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIindex+ {-# LINE 7721 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (chain)+ _lhsOisLast =+ ({-# LINE 873 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIisLast+ {-# LINE 7727 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (chain)+ _lhsOprevMaxSimRefs =+ ({-# LINE 865 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIprevMaxSimRefs+ {-# LINE 7733 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds))))+sem_VisitStep_PureGroup :: T_VisitSteps ->+ Bool ->+ T_VisitStep+sem_VisitStep_PureGroup (T_VisitSteps steps_) ordered_ =+ (T_VisitStep (\ _lhsIallFromToStates+ _lhsIallInitStates+ _lhsIallVisitKinds+ _lhsIallchildvisit+ _lhsIavisitdefs+ _lhsIavisituses+ _lhsIchildTypes+ _lhsIchildintros+ _lhsIfmtMode+ _lhsIindex+ _lhsIisLast+ _lhsIkind+ _lhsImrules+ _lhsIoptions+ _lhsIprevMaxSimRefs+ _lhsIruledefs+ _lhsIruleuses+ _lhsIuseParallel ->+ (let _stepsOkind :: VisitKind+ _lhsOsem_steps :: PP_Doc+ _stepsOfmtMode :: FormatMode+ _lhsOlazyIntras :: (Set String)+ _lhsOdefs :: (Set String)+ _lhsOerrors :: (Seq Error)+ _lhsOruleKinds :: (Map Identifier (Set VisitKind))+ _lhsOruleUsage :: (Map Identifier Int)+ _lhsOsync_steps :: PP_Doc+ _lhsOuses :: (Map String (Maybe NonLocalAttr))+ _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)+ _lhsOindex :: Int+ _lhsOisLast :: Bool+ _lhsOprevMaxSimRefs :: Int+ _stepsOallFromToStates :: (Map VisitIdentifier (Int,Int))+ _stepsOallInitStates :: (Map NontermIdent Int)+ _stepsOallVisitKinds :: (Map VisitIdentifier VisitKind)+ _stepsOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _stepsOavisitdefs :: (Map VisitIdentifier (Set Identifier))+ _stepsOavisituses :: (Map VisitIdentifier (Set Identifier))+ _stepsOchildTypes :: (Map Identifier Type)+ _stepsOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))+ _stepsOindex :: Int+ _stepsOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))+ _stepsOoptions :: Options+ _stepsOprevMaxSimRefs :: Int+ _stepsOruledefs :: (Map Identifier (Set String))+ _stepsOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))+ _stepsOuseParallel :: Bool+ _stepsIdefs :: (Set String)+ _stepsIerrors :: (Seq Error)+ _stepsIindex :: Int+ _stepsIisLast :: Bool+ _stepsIlazyIntras :: (Set String)+ _stepsIprevMaxSimRefs :: Int+ _stepsIruleKinds :: (Map Identifier (Set VisitKind))+ _stepsIruleUsage :: (Map Identifier Int)+ _stepsIsem_steps :: PP_Doc+ _stepsIsize :: Int+ _stepsIsync_steps :: PP_Doc+ _stepsIuses :: (Map String (Maybe NonLocalAttr))+ _stepsIvisitKinds :: (Map VisitIdentifier VisitKind)+ -- "src-ag/ExecutionPlan2Hs.ag"(line 774, column 3)+ _stepsOkind =+ ({-# LINE 774 "src-ag/ExecutionPlan2Hs.ag" #-}+ VisitPure ordered_+ {-# LINE 7804 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 806, column 16)+ _lhsOsem_steps =+ ({-# LINE 806 "src-ag/ExecutionPlan2Hs.ag" #-}+ case _lhsIfmtMode of+ FormatDo -> "let" >#< _stepsIsem_steps+ _ -> _stepsIsem_steps+ {-# LINE 7812 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 827, column 3)+ _stepsOfmtMode =+ ({-# LINE 827 "src-ag/ExecutionPlan2Hs.ag" #-}+ case _lhsIfmtMode of+ FormatDo -> FormatLetDecl+ mode -> mode+ {-# LINE 7820 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1365, column 3)+ _lhsOlazyIntras =+ ({-# LINE 1365 "src-ag/ExecutionPlan2Hs.ag" #-}+ if ordered_+ then _stepsIlazyIntras+ else _stepsIdefs+ {-# LINE 7828 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1339, column 38)+ _lhsOdefs =+ ({-# LINE 1339 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIdefs+ {-# LINE 7834 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1629, column 132)+ _lhsOerrors =+ ({-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIerrors+ {-# LINE 7840 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1255, column 56)+ _lhsOruleKinds =+ ({-# LINE 1255 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIruleKinds+ {-# LINE 7846 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1243, column 56)+ _lhsOruleUsage =+ ({-# LINE 1243 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIruleUsage+ {-# LINE 7852 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 810, column 44)+ _lhsOsync_steps =+ ({-# LINE 810 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIsync_steps+ {-# LINE 7858 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1340, column 38)+ _lhsOuses =+ ({-# LINE 1340 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIuses+ {-# LINE 7864 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1591, column 68)+ _lhsOvisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIvisitKinds+ {-# LINE 7870 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (up)+ _lhsOindex =+ ({-# LINE 854 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIindex+ {-# LINE 7876 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (up)+ _lhsOisLast =+ ({-# LINE 873 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIisLast+ {-# LINE 7882 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (up)+ _lhsOprevMaxSimRefs =+ ({-# LINE 865 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIprevMaxSimRefs+ {-# LINE 7888 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOallFromToStates =+ ({-# LINE 1547 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallFromToStates+ {-# LINE 7894 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOallInitStates =+ ({-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInitStates+ {-# LINE 7900 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOallVisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallVisitKinds+ {-# LINE 7906 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOallchildvisit =+ ({-# LINE 1189 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallchildvisit+ {-# LINE 7912 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOavisitdefs =+ ({-# LINE 1332 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisitdefs+ {-# LINE 7918 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOavisituses =+ ({-# LINE 1333 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisituses+ {-# LINE 7924 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOchildTypes =+ ({-# LINE 1564 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIchildTypes+ {-# LINE 7930 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOchildintros =+ ({-# LINE 893 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIchildintros+ {-# LINE 7936 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOindex =+ ({-# LINE 854 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIindex+ {-# LINE 7942 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOmrules =+ ({-# LINE 776 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImrules+ {-# LINE 7948 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 7954 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOprevMaxSimRefs =+ ({-# LINE 865 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIprevMaxSimRefs+ {-# LINE 7960 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOruledefs =+ ({-# LINE 1307 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIruledefs+ {-# LINE 7966 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOruleuses =+ ({-# LINE 1308 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIruleuses+ {-# LINE 7972 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOuseParallel =+ ({-# LINE 881 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIuseParallel+ {-# LINE 7978 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _stepsIdefs,_stepsIerrors,_stepsIindex,_stepsIisLast,_stepsIlazyIntras,_stepsIprevMaxSimRefs,_stepsIruleKinds,_stepsIruleUsage,_stepsIsem_steps,_stepsIsize,_stepsIsync_steps,_stepsIuses,_stepsIvisitKinds) =+ steps_ _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfmtMode _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel+ in ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds))))+sem_VisitStep_Sem :: Identifier ->+ T_VisitStep+sem_VisitStep_Sem name_ =+ (T_VisitStep (\ _lhsIallFromToStates+ _lhsIallInitStates+ _lhsIallVisitKinds+ _lhsIallchildvisit+ _lhsIavisitdefs+ _lhsIavisituses+ _lhsIchildTypes+ _lhsIchildintros+ _lhsIfmtMode+ _lhsIindex+ _lhsIisLast+ _lhsIkind+ _lhsImrules+ _lhsIoptions+ _lhsIprevMaxSimRefs+ _lhsIruledefs+ _lhsIruleuses+ _lhsIuseParallel ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOruleUsage :: (Map Identifier Int)+ _lhsOruleKinds :: (Map Identifier (Set VisitKind))+ _lhsOdefs :: (Set String)+ _lhsOuses :: (Map String (Maybe NonLocalAttr))+ _lhsOlazyIntras :: (Set String)+ _lhsOsem_steps :: PP_Doc+ _lhsOsync_steps :: PP_Doc+ _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)+ _lhsOindex :: Int+ _lhsOisLast :: Bool+ _lhsOprevMaxSimRefs :: Int+ -- "src-ag/ExecutionPlan2Hs.ag"(line 779, column 16)+ _ruleItf =+ ({-# LINE 779 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault (error $ "Rule " ++ show name_ ++ " not found") name_ _lhsImrules+ {-# LINE 8020 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 780, column 16)+ (_lhsOerrors,_sem_steps) =+ ({-# LINE 780 "src-ag/ExecutionPlan2Hs.ag" #-}+ case _ruleItf _lhsIkind _lhsIfmtMode of+ Left e -> (Seq.singleton e, empty)+ Right stmt -> (Seq.empty, stmt)+ {-# LINE 8028 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1247, column 32)+ _lhsOruleUsage =+ ({-# LINE 1247 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ 1+ {-# LINE 8034 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1257, column 3)+ _lhsOruleKinds =+ ({-# LINE 1257 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ (Set.singleton _lhsIkind)+ {-# LINE 8040 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1342, column 16)+ _lhsOdefs =+ ({-# LINE 1342 "src-ag/ExecutionPlan2Hs.ag" #-}+ maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruledefs+ {-# LINE 8046 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 1343, column 16)+ _lhsOuses =+ ({-# LINE 1343 "src-ag/ExecutionPlan2Hs.ag" #-}+ maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruleuses+ {-# LINE 8052 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1355, column 57)+ _lhsOlazyIntras =+ ({-# LINE 1355 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.empty+ {-# LINE 8058 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 777, column 43)+ _lhsOsem_steps =+ ({-# LINE 777 "src-ag/ExecutionPlan2Hs.ag" #-}+ _sem_steps+ {-# LINE 8064 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 810, column 44)+ _lhsOsync_steps =+ ({-# LINE 810 "src-ag/ExecutionPlan2Hs.ag" #-}+ empty+ {-# LINE 8070 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1591, column 68)+ _lhsOvisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ mempty+ {-# LINE 8076 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (chain)+ _lhsOindex =+ ({-# LINE 854 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIindex+ {-# LINE 8082 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (chain)+ _lhsOisLast =+ ({-# LINE 873 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIisLast+ {-# LINE 8088 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (chain)+ _lhsOprevMaxSimRefs =+ ({-# LINE 865 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIprevMaxSimRefs+ {-# LINE 8094 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds))))+sem_VisitStep_Sim :: T_VisitSteps ->+ T_VisitStep+sem_VisitStep_Sim (T_VisitSteps steps_) =+ (T_VisitStep (\ _lhsIallFromToStates+ _lhsIallInitStates+ _lhsIallVisitKinds+ _lhsIallchildvisit+ _lhsIavisitdefs+ _lhsIavisituses+ _lhsIchildTypes+ _lhsIchildintros+ _lhsIfmtMode+ _lhsIindex+ _lhsIisLast+ _lhsIkind+ _lhsImrules+ _lhsIoptions+ _lhsIprevMaxSimRefs+ _lhsIruledefs+ _lhsIruleuses+ _lhsIuseParallel ->+ (let _lhsOsem_steps :: PP_Doc+ _stepsOindex :: Int+ _lhsOindex :: Int+ _lhsOprevMaxSimRefs :: Int+ _lhsOdefs :: (Set String)+ _lhsOerrors :: (Seq Error)+ _lhsOlazyIntras :: (Set String)+ _lhsOruleKinds :: (Map Identifier (Set VisitKind))+ _lhsOruleUsage :: (Map Identifier Int)+ _lhsOsync_steps :: PP_Doc+ _lhsOuses :: (Map String (Maybe NonLocalAttr))+ _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)+ _lhsOisLast :: Bool+ _stepsOallFromToStates :: (Map VisitIdentifier (Int,Int))+ _stepsOallInitStates :: (Map NontermIdent Int)+ _stepsOallVisitKinds :: (Map VisitIdentifier VisitKind)+ _stepsOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _stepsOavisitdefs :: (Map VisitIdentifier (Set Identifier))+ _stepsOavisituses :: (Map VisitIdentifier (Set Identifier))+ _stepsOchildTypes :: (Map Identifier Type)+ _stepsOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))+ _stepsOfmtMode :: FormatMode+ _stepsOkind :: VisitKind+ _stepsOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))+ _stepsOoptions :: Options+ _stepsOprevMaxSimRefs :: Int+ _stepsOruledefs :: (Map Identifier (Set String))+ _stepsOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))+ _stepsOuseParallel :: Bool+ _stepsIdefs :: (Set String)+ _stepsIerrors :: (Seq Error)+ _stepsIindex :: Int+ _stepsIisLast :: Bool+ _stepsIlazyIntras :: (Set String)+ _stepsIprevMaxSimRefs :: Int+ _stepsIruleKinds :: (Map Identifier (Set VisitKind))+ _stepsIruleUsage :: (Map Identifier Int)+ _stepsIsem_steps :: PP_Doc+ _stepsIsize :: Int+ _stepsIsync_steps :: PP_Doc+ _stepsIuses :: (Map String (Maybe NonLocalAttr))+ _stepsIvisitKinds :: (Map VisitIdentifier VisitKind)+ -- "src-ag/ExecutionPlan2Hs.ag"(line 805, column 16)+ _lhsOsem_steps =+ ({-# LINE 805 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIsem_steps >-< _stepsIsync_steps+ {-# LINE 8164 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 860, column 22)+ _stepsOindex =+ ({-# LINE 860 "src-ag/ExecutionPlan2Hs.ag" #-}+ 0+ {-# LINE 8170 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 861, column 22)+ _lhsOindex =+ ({-# LINE 861 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIindex+ {-# LINE 8176 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 868, column 3)+ _lhsOprevMaxSimRefs =+ ({-# LINE 868 "src-ag/ExecutionPlan2Hs.ag" #-}+ if _useParallel+ then _lhsIprevMaxSimRefs `max` (_stepsIindex - 1)+ else _lhsIprevMaxSimRefs+ {-# LINE 8184 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 883, column 22)+ _useParallel =+ ({-# LINE 883 "src-ag/ExecutionPlan2Hs.ag" #-}+ parallelInvoke _lhsIoptions && _stepsIsize > 1 && _isMonadic+ {-# LINE 8190 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 884, column 22)+ _isMonadic =+ ({-# LINE 884 "src-ag/ExecutionPlan2Hs.ag" #-}+ case _lhsIkind of+ VisitMonadic -> True+ _ -> False+ {-# LINE 8198 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1339, column 38)+ _lhsOdefs =+ ({-# LINE 1339 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIdefs+ {-# LINE 8204 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1629, column 132)+ _lhsOerrors =+ ({-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIerrors+ {-# LINE 8210 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1355, column 57)+ _lhsOlazyIntras =+ ({-# LINE 1355 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIlazyIntras+ {-# LINE 8216 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1255, column 56)+ _lhsOruleKinds =+ ({-# LINE 1255 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIruleKinds+ {-# LINE 8222 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1243, column 56)+ _lhsOruleUsage =+ ({-# LINE 1243 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIruleUsage+ {-# LINE 8228 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 810, column 44)+ _lhsOsync_steps =+ ({-# LINE 810 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIsync_steps+ {-# LINE 8234 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1340, column 38)+ _lhsOuses =+ ({-# LINE 1340 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIuses+ {-# LINE 8240 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1591, column 68)+ _lhsOvisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIvisitKinds+ {-# LINE 8246 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (up)+ _lhsOisLast =+ ({-# LINE 873 "src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIisLast+ {-# LINE 8252 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOallFromToStates =+ ({-# LINE 1547 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallFromToStates+ {-# LINE 8258 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOallInitStates =+ ({-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInitStates+ {-# LINE 8264 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOallVisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallVisitKinds+ {-# LINE 8270 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOallchildvisit =+ ({-# LINE 1189 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallchildvisit+ {-# LINE 8276 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOavisitdefs =+ ({-# LINE 1332 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisitdefs+ {-# LINE 8282 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOavisituses =+ ({-# LINE 1333 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisituses+ {-# LINE 8288 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOchildTypes =+ ({-# LINE 1564 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIchildTypes+ {-# LINE 8294 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOchildintros =+ ({-# LINE 893 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIchildintros+ {-# LINE 8300 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOfmtMode =+ ({-# LINE 819 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIfmtMode+ {-# LINE 8306 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOkind =+ ({-# LINE 769 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIkind+ {-# LINE 8312 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOmrules =+ ({-# LINE 776 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImrules+ {-# LINE 8318 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 8324 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOprevMaxSimRefs =+ ({-# LINE 865 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIprevMaxSimRefs+ {-# LINE 8330 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOruledefs =+ ({-# LINE 1307 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIruledefs+ {-# LINE 8336 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _stepsOruleuses =+ ({-# LINE 1308 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIruleuses+ {-# LINE 8342 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (from local)+ _stepsOuseParallel =+ ({-# LINE 881 "src-ag/ExecutionPlan2Hs.ag" #-}+ _useParallel+ {-# LINE 8348 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _stepsIdefs,_stepsIerrors,_stepsIindex,_stepsIisLast,_stepsIlazyIntras,_stepsIprevMaxSimRefs,_stepsIruleKinds,_stepsIruleUsage,_stepsIsem_steps,_stepsIsize,_stepsIsync_steps,_stepsIuses,_stepsIvisitKinds) =+ steps_ _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfmtMode _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel+ in ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds))))+-- VisitSteps --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allFromToStates : Map VisitIdentifier (Int,Int)+ allInitStates : Map NontermIdent Int+ allVisitKinds : Map VisitIdentifier VisitKind+ allchildvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ avisitdefs : Map VisitIdentifier (Set Identifier)+ avisituses : Map VisitIdentifier (Set Identifier)+ childTypes : Map Identifier Type+ childintros : Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ fmtMode : FormatMode+ kind : VisitKind+ mrules : Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)+ options : Options+ ruledefs : Map Identifier (Set String)+ ruleuses : Map Identifier (Map String (Maybe NonLocalAttr))+ useParallel : Bool+ chained attributes:+ index : Int+ prevMaxSimRefs : Int+ synthesized attributes:+ defs : Set String+ errors : Seq Error+ isLast : Bool+ lazyIntras : Set String+ ruleKinds : Map Identifier (Set VisitKind)+ ruleUsage : Map Identifier Int+ sem_steps : PP_Doc+ size : Int+ sync_steps : PP_Doc+ uses : Map String (Maybe NonLocalAttr)+ visitKinds : Map VisitIdentifier VisitKind+ alternatives:+ alternative Cons:+ child hd : VisitStep + child tl : VisitSteps + alternative Nil:+-}+-- cata+sem_VisitSteps :: VisitSteps ->+ T_VisitSteps+sem_VisitSteps list =+ (Prelude.foldr sem_VisitSteps_Cons sem_VisitSteps_Nil (Prelude.map sem_VisitStep list))+-- semantic domain+newtype T_VisitSteps = T_VisitSteps ((Map VisitIdentifier (Int,Int)) ->+ (Map NontermIdent Int) ->+ (Map VisitIdentifier VisitKind) ->+ (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ (Map VisitIdentifier (Set Identifier)) ->+ (Map VisitIdentifier (Set Identifier)) ->+ (Map Identifier Type) ->+ (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ FormatMode ->+ Int ->+ VisitKind ->+ (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ Options ->+ Int ->+ (Map Identifier (Set String)) ->+ (Map Identifier (Map String (Maybe NonLocalAttr))) ->+ Bool ->+ ( (Set String),(Seq Error),Int,Bool,(Set String),Int,(Map Identifier (Set VisitKind)),(Map Identifier Int),PP_Doc,Int,PP_Doc,(Map String (Maybe NonLocalAttr)),(Map VisitIdentifier VisitKind)))+data Inh_VisitSteps = Inh_VisitSteps {allFromToStates_Inh_VisitSteps :: (Map VisitIdentifier (Int,Int)),allInitStates_Inh_VisitSteps :: (Map NontermIdent Int),allVisitKinds_Inh_VisitSteps :: (Map VisitIdentifier VisitKind),allchildvisit_Inh_VisitSteps :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),avisitdefs_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)),avisituses_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)),childTypes_Inh_VisitSteps :: (Map Identifier Type),childintros_Inh_VisitSteps :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))),fmtMode_Inh_VisitSteps :: FormatMode,index_Inh_VisitSteps :: Int,kind_Inh_VisitSteps :: VisitKind,mrules_Inh_VisitSteps :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)),options_Inh_VisitSteps :: Options,prevMaxSimRefs_Inh_VisitSteps :: Int,ruledefs_Inh_VisitSteps :: (Map Identifier (Set String)),ruleuses_Inh_VisitSteps :: (Map Identifier (Map String (Maybe NonLocalAttr))),useParallel_Inh_VisitSteps :: Bool}+data Syn_VisitSteps = Syn_VisitSteps {defs_Syn_VisitSteps :: (Set String),errors_Syn_VisitSteps :: (Seq Error),index_Syn_VisitSteps :: Int,isLast_Syn_VisitSteps :: Bool,lazyIntras_Syn_VisitSteps :: (Set String),prevMaxSimRefs_Syn_VisitSteps :: Int,ruleKinds_Syn_VisitSteps :: (Map Identifier (Set VisitKind)),ruleUsage_Syn_VisitSteps :: (Map Identifier Int),sem_steps_Syn_VisitSteps :: PP_Doc,size_Syn_VisitSteps :: Int,sync_steps_Syn_VisitSteps :: PP_Doc,uses_Syn_VisitSteps :: (Map String (Maybe NonLocalAttr)),visitKinds_Syn_VisitSteps :: (Map VisitIdentifier VisitKind)}+wrap_VisitSteps :: T_VisitSteps ->+ Inh_VisitSteps ->+ Syn_VisitSteps+wrap_VisitSteps (T_VisitSteps sem) (Inh_VisitSteps _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) =+ (let ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsize,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds) = sem _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel+ in (Syn_VisitSteps _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOsync_steps _lhsOuses _lhsOvisitKinds))+sem_VisitSteps_Cons :: T_VisitStep ->+ T_VisitSteps ->+ T_VisitSteps+sem_VisitSteps_Cons (T_VisitStep hd_) (T_VisitSteps tl_) =+ (T_VisitSteps (\ _lhsIallFromToStates+ _lhsIallInitStates+ _lhsIallVisitKinds+ _lhsIallchildvisit+ _lhsIavisitdefs+ _lhsIavisituses+ _lhsIchildTypes+ _lhsIchildintros+ _lhsIfmtMode+ _lhsIindex+ _lhsIkind+ _lhsImrules+ _lhsIoptions+ _lhsIprevMaxSimRefs+ _lhsIruledefs+ _lhsIruleuses+ _lhsIuseParallel ->+ (let _lhsOsize :: Int+ _hdOindex :: Int+ _tlOindex :: Int+ _lhsOindex :: Int+ _lhsOisLast :: Bool+ _hdOisLast :: Bool+ _lhsOdefs :: (Set String)+ _lhsOerrors :: (Seq Error)+ _lhsOlazyIntras :: (Set String)+ _lhsOruleKinds :: (Map Identifier (Set VisitKind))+ _lhsOruleUsage :: (Map Identifier Int)+ _lhsOsem_steps :: PP_Doc+ _lhsOsync_steps :: PP_Doc+ _lhsOuses :: (Map String (Maybe NonLocalAttr))+ _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)+ _lhsOprevMaxSimRefs :: Int+ _hdOallFromToStates :: (Map VisitIdentifier (Int,Int))+ _hdOallInitStates :: (Map NontermIdent Int)+ _hdOallVisitKinds :: (Map VisitIdentifier VisitKind)+ _hdOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _hdOavisitdefs :: (Map VisitIdentifier (Set Identifier))+ _hdOavisituses :: (Map VisitIdentifier (Set Identifier))+ _hdOchildTypes :: (Map Identifier Type)+ _hdOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))+ _hdOfmtMode :: FormatMode+ _hdOkind :: VisitKind+ _hdOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))+ _hdOoptions :: Options+ _hdOprevMaxSimRefs :: Int+ _hdOruledefs :: (Map Identifier (Set String))+ _hdOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))+ _hdOuseParallel :: Bool+ _tlOallFromToStates :: (Map VisitIdentifier (Int,Int))+ _tlOallInitStates :: (Map NontermIdent Int)+ _tlOallVisitKinds :: (Map VisitIdentifier VisitKind)+ _tlOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _tlOavisitdefs :: (Map VisitIdentifier (Set Identifier))+ _tlOavisituses :: (Map VisitIdentifier (Set Identifier))+ _tlOchildTypes :: (Map Identifier Type)+ _tlOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))+ _tlOfmtMode :: FormatMode+ _tlOkind :: VisitKind+ _tlOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))+ _tlOoptions :: Options+ _tlOprevMaxSimRefs :: Int+ _tlOruledefs :: (Map Identifier (Set String))+ _tlOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))+ _tlOuseParallel :: Bool+ _hdIdefs :: (Set String)+ _hdIerrors :: (Seq Error)+ _hdIindex :: Int+ _hdIisLast :: Bool+ _hdIlazyIntras :: (Set String)+ _hdIprevMaxSimRefs :: Int+ _hdIruleKinds :: (Map Identifier (Set VisitKind))+ _hdIruleUsage :: (Map Identifier Int)+ _hdIsem_steps :: PP_Doc+ _hdIsync_steps :: PP_Doc+ _hdIuses :: (Map String (Maybe NonLocalAttr))+ _hdIvisitKinds :: (Map VisitIdentifier VisitKind)+ _tlIdefs :: (Set String)+ _tlIerrors :: (Seq Error)+ _tlIindex :: Int+ _tlIisLast :: Bool+ _tlIlazyIntras :: (Set String)+ _tlIprevMaxSimRefs :: Int+ _tlIruleKinds :: (Map Identifier (Set VisitKind))+ _tlIruleUsage :: (Map Identifier Int)+ _tlIsem_steps :: PP_Doc+ _tlIsize :: Int+ _tlIsync_steps :: PP_Doc+ _tlIuses :: (Map String (Maybe NonLocalAttr))+ _tlIvisitKinds :: (Map VisitIdentifier VisitKind)+ -- "src-ag/ExecutionPlan2Hs.ag"(line 851, column 10)+ _lhsOsize =+ ({-# LINE 851 "src-ag/ExecutionPlan2Hs.ag" #-}+ 1 + _tlIsize+ {-# LINE 8523 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 856, column 3)+ _hdOindex =+ ({-# LINE 856 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIindex+ {-# LINE 8529 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 857, column 3)+ _tlOindex =+ ({-# LINE 857 "src-ag/ExecutionPlan2Hs.ag" #-}+ 1 + _lhsIindex+ {-# LINE 8535 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 858, column 3)+ _lhsOindex =+ ({-# LINE 858 "src-ag/ExecutionPlan2Hs.ag" #-}+ _tlIindex+ {-# LINE 8541 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 877, column 11)+ _lhsOisLast =+ ({-# LINE 877 "src-ag/ExecutionPlan2Hs.ag" #-}+ False+ {-# LINE 8547 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 878, column 11)+ _hdOisLast =+ ({-# LINE 878 "src-ag/ExecutionPlan2Hs.ag" #-}+ _tlIisLast+ {-# LINE 8553 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1339, column 38)+ _lhsOdefs =+ ({-# LINE 1339 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIdefs `Set.union` _tlIdefs+ {-# LINE 8559 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1629, column 132)+ _lhsOerrors =+ ({-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 8565 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1355, column 57)+ _lhsOlazyIntras =+ ({-# LINE 1355 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIlazyIntras `Set.union` _tlIlazyIntras+ {-# LINE 8571 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1255, column 56)+ _lhsOruleKinds =+ ({-# LINE 1255 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIruleKinds `unionWithMappend` _tlIruleKinds+ {-# LINE 8577 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1243, column 56)+ _lhsOruleUsage =+ ({-# LINE 1243 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIruleUsage `unionWithSum` _tlIruleUsage+ {-# LINE 8583 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 777, column 43)+ _lhsOsem_steps =+ ({-# LINE 777 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIsem_steps >-< _tlIsem_steps+ {-# LINE 8589 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 810, column 44)+ _lhsOsync_steps =+ ({-# LINE 810 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIsync_steps >-< _tlIsync_steps+ {-# LINE 8595 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1340, column 38)+ _lhsOuses =+ ({-# LINE 1340 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIuses `Map.union` _tlIuses+ {-# LINE 8601 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1591, column 68)+ _lhsOvisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIvisitKinds `mappend` _tlIvisitKinds+ {-# LINE 8607 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (up)+ _lhsOprevMaxSimRefs =+ ({-# LINE 865 "src-ag/ExecutionPlan2Hs.ag" #-}+ _tlIprevMaxSimRefs+ {-# LINE 8613 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallFromToStates =+ ({-# LINE 1547 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallFromToStates+ {-# LINE 8619 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallInitStates =+ ({-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInitStates+ {-# LINE 8625 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallVisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallVisitKinds+ {-# LINE 8631 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallchildvisit =+ ({-# LINE 1189 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallchildvisit+ {-# LINE 8637 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOavisitdefs =+ ({-# LINE 1332 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisitdefs+ {-# LINE 8643 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOavisituses =+ ({-# LINE 1333 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisituses+ {-# LINE 8649 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOchildTypes =+ ({-# LINE 1564 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIchildTypes+ {-# LINE 8655 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOchildintros =+ ({-# LINE 893 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIchildintros+ {-# LINE 8661 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOfmtMode =+ ({-# LINE 819 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIfmtMode+ {-# LINE 8667 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOkind =+ ({-# LINE 769 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIkind+ {-# LINE 8673 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOmrules =+ ({-# LINE 776 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImrules+ {-# LINE 8679 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 8685 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOprevMaxSimRefs =+ ({-# LINE 865 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIprevMaxSimRefs+ {-# LINE 8691 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOruledefs =+ ({-# LINE 1307 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIruledefs+ {-# LINE 8697 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOruleuses =+ ({-# LINE 1308 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIruleuses+ {-# LINE 8703 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOuseParallel =+ ({-# LINE 881 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIuseParallel+ {-# LINE 8709 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallFromToStates =+ ({-# LINE 1547 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallFromToStates+ {-# LINE 8715 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallInitStates =+ ({-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInitStates+ {-# LINE 8721 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallVisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallVisitKinds+ {-# LINE 8727 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallchildvisit =+ ({-# LINE 1189 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallchildvisit+ {-# LINE 8733 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOavisitdefs =+ ({-# LINE 1332 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisitdefs+ {-# LINE 8739 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOavisituses =+ ({-# LINE 1333 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisituses+ {-# LINE 8745 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOchildTypes =+ ({-# LINE 1564 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIchildTypes+ {-# LINE 8751 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOchildintros =+ ({-# LINE 893 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIchildintros+ {-# LINE 8757 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOfmtMode =+ ({-# LINE 819 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIfmtMode+ {-# LINE 8763 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOkind =+ ({-# LINE 769 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIkind+ {-# LINE 8769 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOmrules =+ ({-# LINE 776 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImrules+ {-# LINE 8775 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 8781 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (chain)+ _tlOprevMaxSimRefs =+ ({-# LINE 865 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIprevMaxSimRefs+ {-# LINE 8787 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOruledefs =+ ({-# LINE 1307 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIruledefs+ {-# LINE 8793 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOruleuses =+ ({-# LINE 1308 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIruleuses+ {-# LINE 8799 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOuseParallel =+ ({-# LINE 881 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIuseParallel+ {-# LINE 8805 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _hdIdefs,_hdIerrors,_hdIindex,_hdIisLast,_hdIlazyIntras,_hdIprevMaxSimRefs,_hdIruleKinds,_hdIruleUsage,_hdIsem_steps,_hdIsync_steps,_hdIuses,_hdIvisitKinds) =+ hd_ _hdOallFromToStates _hdOallInitStates _hdOallVisitKinds _hdOallchildvisit _hdOavisitdefs _hdOavisituses _hdOchildTypes _hdOchildintros _hdOfmtMode _hdOindex _hdOisLast _hdOkind _hdOmrules _hdOoptions _hdOprevMaxSimRefs _hdOruledefs _hdOruleuses _hdOuseParallel+ ( _tlIdefs,_tlIerrors,_tlIindex,_tlIisLast,_tlIlazyIntras,_tlIprevMaxSimRefs,_tlIruleKinds,_tlIruleUsage,_tlIsem_steps,_tlIsize,_tlIsync_steps,_tlIuses,_tlIvisitKinds) =+ tl_ _tlOallFromToStates _tlOallInitStates _tlOallVisitKinds _tlOallchildvisit _tlOavisitdefs _tlOavisituses _tlOchildTypes _tlOchildintros _tlOfmtMode _tlOindex _tlOkind _tlOmrules _tlOoptions _tlOprevMaxSimRefs _tlOruledefs _tlOruleuses _tlOuseParallel+ in ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsize,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds))))+sem_VisitSteps_Nil :: T_VisitSteps+sem_VisitSteps_Nil =+ (T_VisitSteps (\ _lhsIallFromToStates+ _lhsIallInitStates+ _lhsIallVisitKinds+ _lhsIallchildvisit+ _lhsIavisitdefs+ _lhsIavisituses+ _lhsIchildTypes+ _lhsIchildintros+ _lhsIfmtMode+ _lhsIindex+ _lhsIkind+ _lhsImrules+ _lhsIoptions+ _lhsIprevMaxSimRefs+ _lhsIruledefs+ _lhsIruleuses+ _lhsIuseParallel ->+ (let _lhsOsize :: Int+ _lhsOisLast :: Bool+ _lhsOdefs :: (Set String)+ _lhsOerrors :: (Seq Error)+ _lhsOlazyIntras :: (Set String)+ _lhsOruleKinds :: (Map Identifier (Set VisitKind))+ _lhsOruleUsage :: (Map Identifier Int)+ _lhsOsem_steps :: PP_Doc+ _lhsOsync_steps :: PP_Doc+ _lhsOuses :: (Map String (Maybe NonLocalAttr))+ _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)+ _lhsOindex :: Int+ _lhsOprevMaxSimRefs :: Int+ -- "src-ag/ExecutionPlan2Hs.ag"(line 850, column 10)+ _lhsOsize =+ ({-# LINE 850 "src-ag/ExecutionPlan2Hs.ag" #-}+ 0+ {-# LINE 8848 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- "src-ag/ExecutionPlan2Hs.ag"(line 876, column 11)+ _lhsOisLast =+ ({-# LINE 876 "src-ag/ExecutionPlan2Hs.ag" #-}+ True+ {-# LINE 8854 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1339, column 38)+ _lhsOdefs =+ ({-# LINE 1339 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.empty+ {-# LINE 8860 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1629, column 132)+ _lhsOerrors =+ ({-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}+ Seq.empty+ {-# LINE 8866 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1355, column 57)+ _lhsOlazyIntras =+ ({-# LINE 1355 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.empty+ {-# LINE 8872 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1255, column 56)+ _lhsOruleKinds =+ ({-# LINE 1255 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 8878 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1243, column 56)+ _lhsOruleUsage =+ ({-# LINE 1243 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 8884 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 777, column 43)+ _lhsOsem_steps =+ ({-# LINE 777 "src-ag/ExecutionPlan2Hs.ag" #-}+ empty+ {-# LINE 8890 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 810, column 44)+ _lhsOsync_steps =+ ({-# LINE 810 "src-ag/ExecutionPlan2Hs.ag" #-}+ empty+ {-# LINE 8896 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1340, column 38)+ _lhsOuses =+ ({-# LINE 1340 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 8902 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1591, column 68)+ _lhsOvisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ mempty+ {-# LINE 8908 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (chain)+ _lhsOindex =+ ({-# LINE 854 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIindex+ {-# LINE 8914 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (chain)+ _lhsOprevMaxSimRefs =+ ({-# LINE 865 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIprevMaxSimRefs+ {-# LINE 8920 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOdefs,_lhsOerrors,_lhsOindex,_lhsOisLast,_lhsOlazyIntras,_lhsOprevMaxSimRefs,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_steps,_lhsOsize,_lhsOsync_steps,_lhsOuses,_lhsOvisitKinds))))+-- Visits ------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allFromToStates : Map VisitIdentifier (Int,Int)+ allInhmap : Map NontermIdent Attributes+ allInitStates : Map NontermIdent Int+ allSynmap : Map NontermIdent Attributes+ allVisitKinds : Map VisitIdentifier VisitKind+ allchildvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ allintramap : Map StateIdentifier (Map String (Maybe NonLocalAttr))+ avisitdefs : Map VisitIdentifier (Set Identifier)+ avisituses : Map VisitIdentifier (Set Identifier)+ childTypes : Map Identifier Type+ childintros : Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ con : ConstructorIdent+ inhmap : Attributes+ mrules : Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)+ nextVisits : Map StateIdentifier StateCtx+ nt : NontermIdent+ options : Options+ params : [Identifier]+ prevVisits : Map StateIdentifier StateCtx+ ruledefs : Map Identifier (Set String)+ ruleuses : Map Identifier (Map String (Maybe NonLocalAttr))+ synmap : Attributes+ terminaldefs : Set String+ synthesized attributes:+ allvisits : [VisitStateState]+ childvisit : Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ errors : Seq Error+ fromToStates : Map VisitIdentifier (Int,Int)+ intramap : Map StateIdentifier (Map String (Maybe NonLocalAttr))+ lazyIntras : Set String+ ruleKinds : Map Identifier (Set VisitKind)+ ruleUsage : Map Identifier Int+ sem_visit : [(StateIdentifier,Bool -> PP_Doc)] + t_visits : PP_Doc+ visitKinds : Map VisitIdentifier VisitKind+ visitdefs : Map VisitIdentifier (Set Identifier)+ visituses : Map VisitIdentifier (Set Identifier)+ alternatives:+ alternative Cons:+ child hd : Visit + child tl : Visits + alternative Nil:+-}+-- cata+sem_Visits :: Visits ->+ T_Visits+sem_Visits list =+ (Prelude.foldr sem_Visits_Cons sem_Visits_Nil (Prelude.map sem_Visit list))+-- semantic domain+newtype T_Visits = T_Visits ((Map VisitIdentifier (Int,Int)) ->+ (Map NontermIdent Attributes) ->+ (Map NontermIdent Int) ->+ (Map NontermIdent Attributes) ->+ (Map VisitIdentifier VisitKind) ->+ (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ (Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->+ (Map VisitIdentifier (Set Identifier)) ->+ (Map VisitIdentifier (Set Identifier)) ->+ (Map Identifier Type) ->+ (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ ConstructorIdent ->+ Attributes ->+ (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ (Map StateIdentifier StateCtx) ->+ NontermIdent ->+ Options ->+ ([Identifier]) ->+ (Map StateIdentifier StateCtx) ->+ (Map Identifier (Set String)) ->+ (Map Identifier (Map String (Maybe NonLocalAttr))) ->+ Attributes ->+ (Set String) ->+ ( ([VisitStateState]),(Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),(Seq Error),(Map VisitIdentifier (Int,Int)),(Map StateIdentifier (Map String (Maybe NonLocalAttr))),(Set String),(Map Identifier (Set VisitKind)),(Map Identifier Int),( [(StateIdentifier,Bool -> PP_Doc)] ),PP_Doc,(Map VisitIdentifier VisitKind),(Map VisitIdentifier (Set Identifier)),(Map VisitIdentifier (Set Identifier))))+data Inh_Visits = Inh_Visits {allFromToStates_Inh_Visits :: (Map VisitIdentifier (Int,Int)),allInhmap_Inh_Visits :: (Map NontermIdent Attributes),allInitStates_Inh_Visits :: (Map NontermIdent Int),allSynmap_Inh_Visits :: (Map NontermIdent Attributes),allVisitKinds_Inh_Visits :: (Map VisitIdentifier VisitKind),allchildvisit_Inh_Visits :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),allintramap_Inh_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))),avisitdefs_Inh_Visits :: (Map VisitIdentifier (Set Identifier)),avisituses_Inh_Visits :: (Map VisitIdentifier (Set Identifier)),childTypes_Inh_Visits :: (Map Identifier Type),childintros_Inh_Visits :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))),con_Inh_Visits :: ConstructorIdent,inhmap_Inh_Visits :: Attributes,mrules_Inh_Visits :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)),nextVisits_Inh_Visits :: (Map StateIdentifier StateCtx),nt_Inh_Visits :: NontermIdent,options_Inh_Visits :: Options,params_Inh_Visits :: ([Identifier]),prevVisits_Inh_Visits :: (Map StateIdentifier StateCtx),ruledefs_Inh_Visits :: (Map Identifier (Set String)),ruleuses_Inh_Visits :: (Map Identifier (Map String (Maybe NonLocalAttr))),synmap_Inh_Visits :: Attributes,terminaldefs_Inh_Visits :: (Set String)}+data Syn_Visits = Syn_Visits {allvisits_Syn_Visits :: ([VisitStateState]),childvisit_Syn_Visits :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))),errors_Syn_Visits :: (Seq Error),fromToStates_Syn_Visits :: (Map VisitIdentifier (Int,Int)),intramap_Syn_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))),lazyIntras_Syn_Visits :: (Set String),ruleKinds_Syn_Visits :: (Map Identifier (Set VisitKind)),ruleUsage_Syn_Visits :: (Map Identifier Int),sem_visit_Syn_Visits :: ( [(StateIdentifier,Bool -> PP_Doc)] ),t_visits_Syn_Visits :: PP_Doc,visitKinds_Syn_Visits :: (Map VisitIdentifier VisitKind),visitdefs_Syn_Visits :: (Map VisitIdentifier (Set Identifier)),visituses_Syn_Visits :: (Map VisitIdentifier (Set Identifier))}+wrap_Visits :: T_Visits ->+ Inh_Visits ->+ Syn_Visits+wrap_Visits (T_Visits sem) (Inh_Visits _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) =+ (let ( _lhsOallvisits,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOintramap,_lhsOlazyIntras,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_visit,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses) = sem _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs+ in (Syn_Visits _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses))+sem_Visits_Cons :: T_Visit ->+ T_Visits ->+ T_Visits+sem_Visits_Cons (T_Visit hd_) (T_Visits tl_) =+ (T_Visits (\ _lhsIallFromToStates+ _lhsIallInhmap+ _lhsIallInitStates+ _lhsIallSynmap+ _lhsIallVisitKinds+ _lhsIallchildvisit+ _lhsIallintramap+ _lhsIavisitdefs+ _lhsIavisituses+ _lhsIchildTypes+ _lhsIchildintros+ _lhsIcon+ _lhsIinhmap+ _lhsImrules+ _lhsInextVisits+ _lhsInt+ _lhsIoptions+ _lhsIparams+ _lhsIprevVisits+ _lhsIruledefs+ _lhsIruleuses+ _lhsIsynmap+ _lhsIterminaldefs ->+ (let _lhsOallvisits :: ([VisitStateState])+ _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _lhsOerrors :: (Seq Error)+ _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))+ _lhsOintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))+ _lhsOlazyIntras :: (Set String)+ _lhsOruleKinds :: (Map Identifier (Set VisitKind))+ _lhsOruleUsage :: (Map Identifier Int)+ _lhsOsem_visit :: ( [(StateIdentifier,Bool -> PP_Doc)] )+ _lhsOt_visits :: PP_Doc+ _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)+ _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))+ _hdOallFromToStates :: (Map VisitIdentifier (Int,Int))+ _hdOallInhmap :: (Map NontermIdent Attributes)+ _hdOallInitStates :: (Map NontermIdent Int)+ _hdOallSynmap :: (Map NontermIdent Attributes)+ _hdOallVisitKinds :: (Map VisitIdentifier VisitKind)+ _hdOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _hdOallintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))+ _hdOavisitdefs :: (Map VisitIdentifier (Set Identifier))+ _hdOavisituses :: (Map VisitIdentifier (Set Identifier))+ _hdOchildTypes :: (Map Identifier Type)+ _hdOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))+ _hdOcon :: ConstructorIdent+ _hdOinhmap :: Attributes+ _hdOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))+ _hdOnextVisits :: (Map StateIdentifier StateCtx)+ _hdOnt :: NontermIdent+ _hdOoptions :: Options+ _hdOparams :: ([Identifier])+ _hdOprevVisits :: (Map StateIdentifier StateCtx)+ _hdOruledefs :: (Map Identifier (Set String))+ _hdOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))+ _hdOsynmap :: Attributes+ _hdOterminaldefs :: (Set String)+ _tlOallFromToStates :: (Map VisitIdentifier (Int,Int))+ _tlOallInhmap :: (Map NontermIdent Attributes)+ _tlOallInitStates :: (Map NontermIdent Int)+ _tlOallSynmap :: (Map NontermIdent Attributes)+ _tlOallVisitKinds :: (Map VisitIdentifier VisitKind)+ _tlOallchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _tlOallintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))+ _tlOavisitdefs :: (Map VisitIdentifier (Set Identifier))+ _tlOavisituses :: (Map VisitIdentifier (Set Identifier))+ _tlOchildTypes :: (Map Identifier Type)+ _tlOchildintros :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))))+ _tlOcon :: ConstructorIdent+ _tlOinhmap :: Attributes+ _tlOmrules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc))+ _tlOnextVisits :: (Map StateIdentifier StateCtx)+ _tlOnt :: NontermIdent+ _tlOoptions :: Options+ _tlOparams :: ([Identifier])+ _tlOprevVisits :: (Map StateIdentifier StateCtx)+ _tlOruledefs :: (Map Identifier (Set String))+ _tlOruleuses :: (Map Identifier (Map String (Maybe NonLocalAttr)))+ _tlOsynmap :: Attributes+ _tlOterminaldefs :: (Set String)+ _hdIallvisits :: ( VisitStateState )+ _hdIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _hdIerrors :: (Seq Error)+ _hdIfromToStates :: (Map VisitIdentifier (Int,Int))+ _hdIintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))+ _hdIlazyIntras :: (Set String)+ _hdIruleKinds :: (Map Identifier (Set VisitKind))+ _hdIruleUsage :: (Map Identifier Int)+ _hdIsem_visit :: ( (StateIdentifier,Bool -> PP_Doc) )+ _hdIt_visits :: PP_Doc+ _hdIvisitKinds :: (Map VisitIdentifier VisitKind)+ _hdIvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _hdIvisituses :: (Map VisitIdentifier (Set Identifier))+ _tlIallvisits :: ([VisitStateState])+ _tlIchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _tlIerrors :: (Seq Error)+ _tlIfromToStates :: (Map VisitIdentifier (Int,Int))+ _tlIintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))+ _tlIlazyIntras :: (Set String)+ _tlIruleKinds :: (Map Identifier (Set VisitKind))+ _tlIruleUsage :: (Map Identifier Int)+ _tlIsem_visit :: ( [(StateIdentifier,Bool -> PP_Doc)] )+ _tlIt_visits :: PP_Doc+ _tlIvisitKinds :: (Map VisitIdentifier VisitKind)+ _tlIvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _tlIvisituses :: (Map VisitIdentifier (Set Identifier))+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 336, column 29)+ _lhsOallvisits =+ ({-# LINE 336 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIallvisits : _tlIallvisits+ {-# LINE 9124 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1187, column 37)+ _lhsOchildvisit =+ ({-# LINE 1187 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIchildvisit `Map.union` _tlIchildvisit+ {-# LINE 9130 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1629, column 132)+ _lhsOerrors =+ ({-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 9136 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1544, column 22)+ _lhsOfromToStates =+ ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIfromToStates `mappend` _tlIfromToStates+ {-# LINE 9142 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1281, column 34)+ _lhsOintramap =+ ({-# LINE 1281 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIintramap `uwMapUnion` _tlIintramap+ {-# LINE 9148 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1355, column 57)+ _lhsOlazyIntras =+ ({-# LINE 1355 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIlazyIntras `Set.union` _tlIlazyIntras+ {-# LINE 9154 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1255, column 56)+ _lhsOruleKinds =+ ({-# LINE 1255 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIruleKinds `unionWithMappend` _tlIruleKinds+ {-# LINE 9160 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1243, column 56)+ _lhsOruleUsage =+ ({-# LINE 1243 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIruleUsage `unionWithSum` _tlIruleUsage+ {-# LINE 9166 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 706, column 29)+ _lhsOsem_visit =+ ({-# LINE 706 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIsem_visit : _tlIsem_visit+ {-# LINE 9172 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 394, column 59)+ _lhsOt_visits =+ ({-# LINE 394 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIt_visits >-< _tlIt_visits+ {-# LINE 9178 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1591, column 68)+ _lhsOvisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIvisitKinds `mappend` _tlIvisitKinds+ {-# LINE 9184 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1322, column 36)+ _lhsOvisitdefs =+ ({-# LINE 1322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIvisitdefs `uwSetUnion` _tlIvisitdefs+ {-# LINE 9190 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1323, column 36)+ _lhsOvisituses =+ ({-# LINE 1323 "src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIvisituses `uwSetUnion` _tlIvisituses+ {-# LINE 9196 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallFromToStates =+ ({-# LINE 1547 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallFromToStates+ {-# LINE 9202 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallInhmap =+ ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInhmap+ {-# LINE 9208 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallInitStates =+ ({-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInitStates+ {-# LINE 9214 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallSynmap =+ ({-# LINE 322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallSynmap+ {-# LINE 9220 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallVisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallVisitKinds+ {-# LINE 9226 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallchildvisit =+ ({-# LINE 1186 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallchildvisit+ {-# LINE 9232 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOallintramap =+ ({-# LINE 1280 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallintramap+ {-# LINE 9238 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOavisitdefs =+ ({-# LINE 1332 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisitdefs+ {-# LINE 9244 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOavisituses =+ ({-# LINE 1333 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisituses+ {-# LINE 9250 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOchildTypes =+ ({-# LINE 1564 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIchildTypes+ {-# LINE 9256 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOchildintros =+ ({-# LINE 893 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIchildintros+ {-# LINE 9262 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOcon =+ ({-# LINE 66 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIcon+ {-# LINE 9268 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOinhmap =+ ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 9274 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOmrules =+ ({-# LINE 776 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImrules+ {-# LINE 9280 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOnextVisits =+ ({-# LINE 1533 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsInextVisits+ {-# LINE 9286 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsInt+ {-# LINE 9292 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 9298 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOparams =+ ({-# LINE 73 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIparams+ {-# LINE 9304 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOprevVisits =+ ({-# LINE 1533 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIprevVisits+ {-# LINE 9310 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOruledefs =+ ({-# LINE 1307 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIruledefs+ {-# LINE 9316 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOruleuses =+ ({-# LINE 1308 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIruleuses+ {-# LINE 9322 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOsynmap =+ ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 9328 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _hdOterminaldefs =+ ({-# LINE 1283 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIterminaldefs+ {-# LINE 9334 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallFromToStates =+ ({-# LINE 1547 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallFromToStates+ {-# LINE 9340 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallInhmap =+ ({-# LINE 321 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInhmap+ {-# LINE 9346 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallInitStates =+ ({-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallInitStates+ {-# LINE 9352 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallSynmap =+ ({-# LINE 322 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallSynmap+ {-# LINE 9358 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallVisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallVisitKinds+ {-# LINE 9364 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallchildvisit =+ ({-# LINE 1186 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallchildvisit+ {-# LINE 9370 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOallintramap =+ ({-# LINE 1280 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIallintramap+ {-# LINE 9376 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOavisitdefs =+ ({-# LINE 1332 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisitdefs+ {-# LINE 9382 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOavisituses =+ ({-# LINE 1333 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIavisituses+ {-# LINE 9388 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOchildTypes =+ ({-# LINE 1564 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIchildTypes+ {-# LINE 9394 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOchildintros =+ ({-# LINE 893 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIchildintros+ {-# LINE 9400 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOcon =+ ({-# LINE 66 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIcon+ {-# LINE 9406 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOinhmap =+ ({-# LINE 319 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 9412 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOmrules =+ ({-# LINE 776 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImrules+ {-# LINE 9418 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOnextVisits =+ ({-# LINE 1533 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsInextVisits+ {-# LINE 9424 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 61 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsInt+ {-# LINE 9430 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 51 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIoptions+ {-# LINE 9436 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOparams =+ ({-# LINE 73 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIparams+ {-# LINE 9442 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOprevVisits =+ ({-# LINE 1533 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIprevVisits+ {-# LINE 9448 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOruledefs =+ ({-# LINE 1307 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIruledefs+ {-# LINE 9454 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOruleuses =+ ({-# LINE 1308 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIruleuses+ {-# LINE 9460 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOsynmap =+ ({-# LINE 320 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 9466 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- copy rule (down)+ _tlOterminaldefs =+ ({-# LINE 1283 "src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIterminaldefs+ {-# LINE 9472 "dist/build/ExecutionPlan2Hs" #-}+ )+ ( _hdIallvisits,_hdIchildvisit,_hdIerrors,_hdIfromToStates,_hdIintramap,_hdIlazyIntras,_hdIruleKinds,_hdIruleUsage,_hdIsem_visit,_hdIt_visits,_hdIvisitKinds,_hdIvisitdefs,_hdIvisituses) =+ hd_ _hdOallFromToStates _hdOallInhmap _hdOallInitStates _hdOallSynmap _hdOallVisitKinds _hdOallchildvisit _hdOallintramap _hdOavisitdefs _hdOavisituses _hdOchildTypes _hdOchildintros _hdOcon _hdOinhmap _hdOmrules _hdOnextVisits _hdOnt _hdOoptions _hdOparams _hdOprevVisits _hdOruledefs _hdOruleuses _hdOsynmap _hdOterminaldefs+ ( _tlIallvisits,_tlIchildvisit,_tlIerrors,_tlIfromToStates,_tlIintramap,_tlIlazyIntras,_tlIruleKinds,_tlIruleUsage,_tlIsem_visit,_tlIt_visits,_tlIvisitKinds,_tlIvisitdefs,_tlIvisituses) =+ tl_ _tlOallFromToStates _tlOallInhmap _tlOallInitStates _tlOallSynmap _tlOallVisitKinds _tlOallchildvisit _tlOallintramap _tlOavisitdefs _tlOavisituses _tlOchildTypes _tlOchildintros _tlOcon _tlOinhmap _tlOmrules _tlOnextVisits _tlOnt _tlOoptions _tlOparams _tlOprevVisits _tlOruledefs _tlOruleuses _tlOsynmap _tlOterminaldefs+ in ( _lhsOallvisits,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOintramap,_lhsOlazyIntras,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_visit,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))))+sem_Visits_Nil :: T_Visits+sem_Visits_Nil =+ (T_Visits (\ _lhsIallFromToStates+ _lhsIallInhmap+ _lhsIallInitStates+ _lhsIallSynmap+ _lhsIallVisitKinds+ _lhsIallchildvisit+ _lhsIallintramap+ _lhsIavisitdefs+ _lhsIavisituses+ _lhsIchildTypes+ _lhsIchildintros+ _lhsIcon+ _lhsIinhmap+ _lhsImrules+ _lhsInextVisits+ _lhsInt+ _lhsIoptions+ _lhsIparams+ _lhsIprevVisits+ _lhsIruledefs+ _lhsIruleuses+ _lhsIsynmap+ _lhsIterminaldefs ->+ (let _lhsOallvisits :: ([VisitStateState])+ _lhsOchildvisit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)))+ _lhsOerrors :: (Seq Error)+ _lhsOfromToStates :: (Map VisitIdentifier (Int,Int))+ _lhsOintramap :: (Map StateIdentifier (Map String (Maybe NonLocalAttr)))+ _lhsOlazyIntras :: (Set String)+ _lhsOruleKinds :: (Map Identifier (Set VisitKind))+ _lhsOruleUsage :: (Map Identifier Int)+ _lhsOsem_visit :: ( [(StateIdentifier,Bool -> PP_Doc)] )+ _lhsOt_visits :: PP_Doc+ _lhsOvisitKinds :: (Map VisitIdentifier VisitKind)+ _lhsOvisitdefs :: (Map VisitIdentifier (Set Identifier))+ _lhsOvisituses :: (Map VisitIdentifier (Set Identifier))+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 336, column 29)+ _lhsOallvisits =+ ({-# LINE 336 "src-ag/ExecutionPlan2Hs.ag" #-}+ []+ {-# LINE 9521 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1187, column 37)+ _lhsOchildvisit =+ ({-# LINE 1187 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 9527 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1629, column 132)+ _lhsOerrors =+ ({-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}+ Seq.empty+ {-# LINE 9533 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1544, column 22)+ _lhsOfromToStates =+ ({-# LINE 1544 "src-ag/ExecutionPlan2Hs.ag" #-}+ mempty+ {-# LINE 9539 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1281, column 34)+ _lhsOintramap =+ ({-# LINE 1281 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 9545 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1355, column 57)+ _lhsOlazyIntras =+ ({-# LINE 1355 "src-ag/ExecutionPlan2Hs.ag" #-}+ Set.empty+ {-# LINE 9551 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1255, column 56)+ _lhsOruleKinds =+ ({-# LINE 1255 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 9557 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1243, column 56)+ _lhsOruleUsage =+ ({-# LINE 1243 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 9563 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 706, column 29)+ _lhsOsem_visit =+ ({-# LINE 706 "src-ag/ExecutionPlan2Hs.ag" #-}+ []+ {-# LINE 9569 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 394, column 59)+ _lhsOt_visits =+ ({-# LINE 394 "src-ag/ExecutionPlan2Hs.ag" #-}+ empty+ {-# LINE 9575 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1591, column 68)+ _lhsOvisitKinds =+ ({-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}+ mempty+ {-# LINE 9581 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1322, column 36)+ _lhsOvisitdefs =+ ({-# LINE 1322 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 9587 "dist/build/ExecutionPlan2Hs" #-}+ )+ -- use rule "src-ag/ExecutionPlan2Hs.ag"(line 1323, column 36)+ _lhsOvisituses =+ ({-# LINE 1323 "src-ag/ExecutionPlan2Hs.ag" #-}+ Map.empty+ {-# LINE 9593 "dist/build/ExecutionPlan2Hs" #-}+ )+ in ( _lhsOallvisits,_lhsOchildvisit,_lhsOerrors,_lhsOfromToStates,_lhsOintramap,_lhsOlazyIntras,_lhsOruleKinds,_lhsOruleUsage,_lhsOsem_visit,_lhsOt_visits,_lhsOvisitKinds,_lhsOvisitdefs,_lhsOvisituses))))
src-derived/Expression.hs view
@@ -1,12 +1,12 @@ --- UUAGC 0.9.39.1.0 (src-ag/Expression.ag)+-- UUAGC 0.9.40.1 (src-ag/Expression.ag) module Expression where {-# LINE 2 "src-ag/Expression.ag" #-} import UU.Scanner.Position(Pos) import HsToken-{-# LINE 10 "dist/build/uuagc/uuagc-tmp/Expression.hs" #-}+{-# LINE 10 "dist/build/Expression.hs" #-} -- Expression -------------------------------------------------- {- alternatives:@@ -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,8124 +1,8044 @@ --- UUAGC 0.9.39.1.0 (src-ag/GenerateCode.ag)-module GenerateCode where-{-# LINE 9 "src-ag/GenerateCode.ag" #-}--import CommonTypes-import SequentialTypes-import Code hiding (Type)-import qualified Code-import Options-import CodeSyntax-import ErrorMessages-import GrammarInfo-import DeclBlocks--import qualified Data.Map as Map-import Data.Map(Map)-import qualified Data.Set as Set-import Data.Set(Set)-import qualified Data.Sequence as Seq-import Data.Sequence(Seq)-import UU.Scanner.Position-import TokenDef-import HsToken-import HsTokenScanner--import Data.List(partition,intersperse,intersect,(\\))-import Data.Maybe(fromJust,isJust)--import Debug.Trace-{-# LINE 33 "dist/build/uuagc/uuagc-tmp/GenerateCode.hs" #-}--{-# LINE 2 "src-ag/CodeSyntax.ag" #-}--import Patterns-import CommonTypes-import Data.Map(Map)-import Data.Set(Set)-{-# LINE 41 "dist/build/uuagc/uuagc-tmp/GenerateCode.hs" #-}--{-# LINE 2 "src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 48 "dist/build/uuagc/uuagc-tmp/GenerateCode.hs" #-}--{-# LINE 2 "src-ag/DeclBlocks.ag" #-}--import Code (Decl,Expr)-{-# LINE 53 "dist/build/uuagc/uuagc-tmp/GenerateCode.hs" #-}-{-# LINE 107 "src-ag/GenerateCode.ag" #-}---- remove possible @v references in the types of a data type.-cleanupArg :: String -> String-cleanupArg s- = case idEvalType (SimpleType s) of- SimpleType s' -> s'-{-# LINE 61 "dist/build/uuagc/uuagc-tmp/GenerateCode.hs" #-}--{-# LINE 122 "src-ag/GenerateCode.ag" #-}--appContext :: ContextMap -> NontermIdent -> Code.Type -> Code.Type-appContext mp nt tp- = maybe tp (\ctx -> CtxApp (map (\(n,ns) -> (getName n, ns)) ctx) tp) $ Map.lookup nt mp--appQuant :: QuantMap -> NontermIdent -> Code.Type -> Code.Type-appQuant mp nt tp- = foldr QuantApp tp $ Map.findWithDefault [] nt mp-{-# LINE 72 "dist/build/uuagc/uuagc-tmp/GenerateCode.hs" #-}--{-# LINE 247 "src-ag/GenerateCode.ag" #-}--mkDecl True lhs rhs _ _ = Bind lhs rhs-mkDecl False lhs rhs s1 s2 = Decl lhs rhs s1 s2--unwrapSem :: Bool -> NontermIdent -> Expr -> Expr-unwrapSem False _ e = e-unwrapSem True nm e = Case e alts- where alts = [CaseAlt left right]- left = Fun (typeName nm 0) [SimpleExpr "x"]- right = SimpleExpr "x"-{-# LINE 85 "dist/build/uuagc/uuagc-tmp/GenerateCode.hs" #-}--{-# LINE 537 "src-ag/GenerateCode.ag" #-}--mkLambdaArg :: String -> Maybe Code.Type -> Expr-mkLambdaArg nm Nothing = SimpleExpr nm-mkLambdaArg nm (Just tp) = TypedExpr (SimpleExpr nm) tp--mkLambda :: Exprs -> Expr -> Expr-mkLambda [] e = e-mkLambda xs e = Lambda xs e--mkSemFun :: Identifier -> Int -> Exprs -> Expr -> Expr-mkSemFun nt nr xs e = SemFun (typeName nt nr) xs e--typeAppStrs nm params = TypeApp (SimpleType nm) (map SimpleType params)--isHigherOrder :: ChildKind -> Bool-isHigherOrder ChildAttr = True-isHigherOrder _ = False--pickOrigType :: (Identifier, Type, ChildKind) -> (Identifier, Type, ChildKind)-pickOrigType (nm, _, virt@(ChildReplace x)) = (nm, x, virt)-pickOrigType x = x-{-# LINE 109 "dist/build/uuagc/uuagc-tmp/GenerateCode.hs" #-}--{-# LINE 633 "src-ag/GenerateCode.ag" #-}--mkPartitionedFunction :: String -> Bool -> [Decl] -> [String] -> DeclBlocks -> ([Decl], Expr)-mkPartitionedFunction prefix optCase nextVisitDecls lastExprVars cpsTree- = let inh = Inh_DeclBlocksRoot { prefix_Inh_DeclBlocksRoot = prefix- , optCase_Inh_DeclBlocksRoot = optCase- , nextVisitDecls_Inh_DeclBlocksRoot = nextVisitDecls- , lastExprVars_Inh_DeclBlocksRoot = lastExprVars- }- sem = sem_DeclBlocksRoot (DeclBlocksRoot cpsTree)- syn = wrap_DeclBlocksRoot sem inh- in (lambdas_Syn_DeclBlocksRoot syn, firstCall_Syn_DeclBlocksRoot syn)-{-# LINE 123 "dist/build/uuagc/uuagc-tmp/GenerateCode.hs" #-}--{-# LINE 683 "src-ag/GenerateCode.ag" #-}--freevars :: [String] -> [Decl] -> [String]-freevars additional decls- = Set.toList (allused `Set.difference` alldefined)- where- allused = Set.unions (Set.fromList additional : map usedvars decls)- alldefined = Set.unions (map definedvars decls)-- usedvars (Decl _ _ _ uses) = uses- usedvars _ = Set.empty-- definedvars (Decl _ _ defs _) = defs- definedvars _ = Set.empty--mkBlockLambda :: Bool -> String -> [String] -> [Decl] -> Expr -> Decl-mkBlockLambda optCase name args decls expr- = Decl lhs rhs Set.empty Set.empty- where- lhs = Fun name (map SimpleExpr args)- rhs = mkLet optCase decls expr-{-# LINE 146 "dist/build/uuagc/uuagc-tmp/GenerateCode.hs" #-}--{-# LINE 761 "src-ag/GenerateCode.ag" #-}--typeToCodeType :: Maybe NontermIdent -> [String] -> Type -> Code.Type-typeToCodeType mbNt params tp- = case tp of- NT nt tps defor -> NontermType (getName nt) tps defor- Haskell t -> SimpleType t--evalType :: (String -> String) -> Code.Type -> Code.Type-evalType replf t- = chase t- where- chase t- = case t of- Arr l r -> Arr (chase l) (chase r)- TypeApp f as -> TypeApp (chase f) (map chase as)- TupleType tps -> TupleType (map chase tps)- UnboxedTupleType tps -> UnboxedTupleType (map chase tps)- Code.List tp -> Code.List (chase tp)- SimpleType txt -> let tks = lexTokens (initPos txt) txt- tks' = map replaceTok tks- txt' = unlines . showTokens . tokensToStrings $ tks'- in SimpleType txt'- TMaybe m -> TMaybe (chase m)- TEither l r -> TEither (chase l) (chase r)- TMap k v -> TMap (chase k) (chase v)- TIntMap v -> TIntMap (chase v)- _ -> t-- replaceTok t- = case t of- AGLocal v p _ -> HsToken (replf $ getName v) p- _ -> t--idEvalType :: Code.Type -> Code.Type-idEvalType = evalType id-{-# LINE 184 "dist/build/uuagc/uuagc-tmp/GenerateCode.hs" #-}--{-# LINE 885 "src-ag/GenerateCode.ag" #-}---- for a virtual child that already existed as a child, returns-isFirstOrder :: ChildKind -> Type -> Maybe Type-isFirstOrder ChildSyntax tp = Just tp-isFirstOrder ChildAttr _ = Nothing-isFirstOrder (ChildReplace tp) _ = Just tp-{-# LINE 193 "dist/build/uuagc/uuagc-tmp/GenerateCode.hs" #-}--{-# LINE 906 "src-ag/GenerateCode.ag" #-}--makeLocalComment :: Int -> String -> Identifier -> Maybe Type -> String-makeLocalComment width what name tp = let x = getName name- y = maybe "_" (\t -> case t of (NT nt tps _) -> getName nt ++ " " ++ unwords tps; Haskell t -> '{':t++"}") tp- in ( what ++ " " ++ x ++ replicate ((width - length x) `max` 0) ' ' ++ " : " ++ y )--{-# LINE 202 "dist/build/uuagc/uuagc-tmp/GenerateCode.hs" #-}--{-# LINE 937 "src-ag/GenerateCode.ag" #-}---- Lets or nested Cases?--- or even a do-expression?--data DeclsType = DeclsLet | DeclsCase | DeclsDo--mkDecls :: DeclsType -> Decls -> Expr -> Expr-mkDecls DeclsLet = mkLet False-mkDecls DeclsCase = mkLet True-mkDecls DeclsDo = \decls -> Do (map toBind decls)- where toBind (Decl lhs rhs _ _) = BindLet lhs rhs- toBind d = d--mkLet :: Bool -> Decls -> Expr -> Expr-mkLet False decls body = Let decls body-mkLet True decls body = foldr oneCase body decls--oneCase :: Decl -> Expr -> Expr-oneCase (Decl left rhs _ _) exp = Case rhs [CaseAlt left exp]-oneCase (Resume _ nt left rhs) exp = ResumeExpr nt rhs left exp-oneCase _ exp = exp---- Gives the name of the visit function-funname field 0 = show field ++ "_"-funname field nr = show field ++ "_" ++ show nr---- Gives the name of a semantic function-seqSemname :: String -> NontermIdent -> ConstructorIdent -> Int -> String-seqSemname pre nt con 0 = semname pre nt con-seqSemname pre nt con nr = semname pre nt con ++ "_" ++ show nr---- Gives the name of a type-typeName :: NontermIdent -> Int -> String-typeName nt 0 = "T_" ++ show nt-typeName nt n = "T_" ++ show nt ++ "_" ++ show n--ntOfVisit :: NontermIdent -> Int -> NontermIdent-ntOfVisit nt 0 = nt-ntOfVisit nt n = Ident (show nt ++ "_" ++ show n) (getPos nt)---- Gives the name of a visit function-visitname :: String -> NontermIdent -> Int -> String-visitname pre nt n = pre ++ getName nt ++ "_" ++ show n-{-# LINE 248 "dist/build/uuagc/uuagc-tmp/GenerateCode.hs" #-}--{-# LINE 1026 "src-ag/GenerateCode.ag" #-}--toNamedType :: Bool -> NontermIdent -> ConstructorIdent -> Identifier -> Code.Type -> Code.NamedType-toNamedType genStrict nt con nm tp- = Code.Named genStrict strNm tp- where strNm = recordFieldname nt con nm-{-# LINE 256 "dist/build/uuagc/uuagc-tmp/GenerateCode.hs" #-}--- CGrammar -----------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attributes:- errors : Seq Error- output : Program- alternatives:- alternative CGrammar:- child typeSyns : {TypeSyns}- child derivings : {Derivings}- child wrappers : {Set NontermIdent}- child nonts : CNonterminals - child pragmas : {PragmaMap}- child paramMap : {ParamMap}- child contextMap : {ContextMap}- child quantMap : {QuantMap}- child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Set Identifier))}- child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))}- child multivisit : {Bool}- visit 0:- local options : _- local aroundMap : _- local mergeMap : _- local unfoldSemDom : _--}--- cata-sem_CGrammar :: CGrammar ->- T_CGrammar -sem_CGrammar (CGrammar _typeSyns _derivings _wrappers _nonts _pragmas _paramMap _contextMap _quantMap _aroundsMap _mergeMap _multivisit ) =- (sem_CGrammar_CGrammar _typeSyns _derivings _wrappers (sem_CNonterminals _nonts ) _pragmas _paramMap _contextMap _quantMap _aroundsMap _mergeMap _multivisit )--- semantic domain-newtype T_CGrammar = T_CGrammar (Options ->- ( (Seq Error),Program))-data Inh_CGrammar = Inh_CGrammar {options_Inh_CGrammar :: !(Options)}-data Syn_CGrammar = Syn_CGrammar {errors_Syn_CGrammar :: !((Seq Error)),output_Syn_CGrammar :: !(Program)}-wrap_CGrammar :: T_CGrammar ->- Inh_CGrammar ->- Syn_CGrammar -wrap_CGrammar (T_CGrammar sem ) (Inh_CGrammar _lhsIoptions ) =- (let ( _lhsOerrors,_lhsOoutput) = sem _lhsIoptions - in (Syn_CGrammar _lhsOerrors _lhsOoutput ))-sem_CGrammar_CGrammar :: TypeSyns ->- Derivings ->- (Set NontermIdent) ->- T_CNonterminals ->- PragmaMap ->- ParamMap ->- ContextMap ->- QuantMap ->- (Map NontermIdent (Map ConstructorIdent (Set Identifier))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->- Bool ->- T_CGrammar -sem_CGrammar_CGrammar typeSyns_ derivings_ wrappers_ (T_CNonterminals nonts_ ) pragmas_ paramMap_ contextMap_ quantMap_ aroundsMap_ mergeMap_ multivisit_ =- (T_CGrammar (\ _lhsIoptions ->- (let _nontsOo_sig :: Bool- _nontsOo_cata :: Bool- _nontsOo_sem :: Bool- _nontsOo_newtypes :: Bool- _nontsOo_unbox :: Bool- _nontsOo_case :: Bool- _nontsOo_pretty :: Bool- _nontsOo_rename :: Bool- _nontsOo_strictwrap :: Bool- _nontsOo_splitsems :: Bool- _nontsOo_data :: (Maybe Bool)- _nontsOprefix :: String- _nontsOo_traces :: Bool- _nontsOo_costcentre :: Bool- _nontsOo_linePragmas :: Bool- _nontsOo_monadic :: Bool- _nontsOallPragmas :: PragmaMap- _nontsOparamMap :: ParamMap- _nontsOcontextMap :: ContextMap- _nontsOquantMap :: QuantMap- _nontsOallNts :: (Set NontermIdent)- _nontsOwith_sig :: Bool- _lhsOerrors :: (Seq Error)- _lhsOoutput :: Program- _nontsOtypeSyns :: TypeSyns- _nontsOderivings :: Derivings- _nontsOwrappers :: (Set NontermIdent)- _nontsOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Set Identifier)))- _nontsOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))))- _nontsOoptions :: Options- _nontsOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _nontsIchunks :: Chunks- _nontsIgathNts :: (Set NontermIdent)- _nontsIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- -- "src-ag/GenerateCode.ag"(line 53, column 17)- _nontsOo_sig =- ({-# LINE 53 "src-ag/GenerateCode.ag" #-}- typeSigs _lhsIoptions- {-# LINE 352 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 53, column 17)- _nontsOo_cata =- ({-# LINE 54 "src-ag/GenerateCode.ag" #-}- folds _lhsIoptions- {-# LINE 358 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 53, column 17)- _nontsOo_sem =- ({-# LINE 55 "src-ag/GenerateCode.ag" #-}- semfuns _lhsIoptions- {-# LINE 364 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 53, column 17)- _nontsOo_newtypes =- ({-# LINE 56 "src-ag/GenerateCode.ag" #-}- newtypes _lhsIoptions- {-# LINE 370 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 53, column 17)- _nontsOo_unbox =- ({-# LINE 57 "src-ag/GenerateCode.ag" #-}- unbox _lhsIoptions- {-# LINE 376 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 53, column 17)- _nontsOo_case =- ({-# LINE 58 "src-ag/GenerateCode.ag" #-}- cases _lhsIoptions- {-# LINE 382 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 53, column 17)- _nontsOo_pretty =- ({-# LINE 59 "src-ag/GenerateCode.ag" #-}- attrInfo _lhsIoptions- {-# LINE 388 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 53, column 17)- _nontsOo_rename =- ({-# LINE 60 "src-ag/GenerateCode.ag" #-}- rename _lhsIoptions- {-# LINE 394 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 53, column 17)- _nontsOo_strictwrap =- ({-# LINE 61 "src-ag/GenerateCode.ag" #-}- strictWrap _lhsIoptions- {-# LINE 400 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 53, column 17)- _nontsOo_splitsems =- ({-# LINE 62 "src-ag/GenerateCode.ag" #-}- splitSems _lhsIoptions- {-# LINE 406 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 53, column 17)- _nontsOo_data =- ({-# LINE 63 "src-ag/GenerateCode.ag" #-}- if dataTypes _lhsIoptions then Just (strictData _lhsIoptions) else Nothing- {-# LINE 412 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 53, column 17)- _nontsOprefix =- ({-# LINE 64 "src-ag/GenerateCode.ag" #-}- prefix _lhsIoptions- {-# LINE 418 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 53, column 17)- _nontsOo_traces =- ({-# LINE 65 "src-ag/GenerateCode.ag" #-}- genTraces _lhsIoptions- {-# LINE 424 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 53, column 17)- _nontsOo_costcentre =- ({-# LINE 66 "src-ag/GenerateCode.ag" #-}- genCostCentres _lhsIoptions- {-# LINE 430 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 53, column 17)- _nontsOo_linePragmas =- ({-# LINE 67 "src-ag/GenerateCode.ag" #-}- genLinePragmas _lhsIoptions- {-# LINE 436 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 53, column 17)- _nontsOo_monadic =- ({-# LINE 68 "src-ag/GenerateCode.ag" #-}- monadic _lhsIoptions- {-# LINE 442 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 71, column 3)- _options =- ({-# LINE 71 "src-ag/GenerateCode.ag" #-}- _lhsIoptions { breadthFirst = breadthFirst _lhsIoptions && visit _lhsIoptions && cases _lhsIoptions && multivisit_ }- {-# LINE 448 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 76, column 15)- _nontsOallPragmas =- ({-# LINE 76 "src-ag/GenerateCode.ag" #-}- pragmas_- {-# LINE 454 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 98, column 14)- _nontsOparamMap =- ({-# LINE 98 "src-ag/GenerateCode.ag" #-}- paramMap_- {-# LINE 460 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 119, column 7)- _nontsOcontextMap =- ({-# LINE 119 "src-ag/GenerateCode.ag" #-}- contextMap_- {-# LINE 466 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 120, column 7)- _nontsOquantMap =- ({-# LINE 120 "src-ag/GenerateCode.ag" #-}- quantMap_- {-# LINE 472 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 136, column 7)- _nontsOallNts =- ({-# LINE 136 "src-ag/GenerateCode.ag" #-}- _nontsIgathNts- {-# LINE 478 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 582, column 34)- _aroundMap =- ({-# LINE 582 "src-ag/GenerateCode.ag" #-}- aroundsMap_- {-# LINE 484 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 598, column 34)- _mergeMap =- ({-# LINE 598 "src-ag/GenerateCode.ag" #-}- mergeMap_- {-# LINE 490 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 754, column 7)- _unfoldSemDom =- ({-# LINE 754 "src-ag/GenerateCode.ag" #-}- \nt nr repl ->- let (params, tp) = Map.findWithDefault (error ("No such semantic domain: " ++ show nt)) (nt, nr) _nontsIsemDomUnfoldGath- replMap = Map.fromList (zip params repl)- replace k = Map.findWithDefault ('@':k) k replMap- in evalType replace tp- {-# LINE 500 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 854, column 14)- _nontsOwith_sig =- ({-# LINE 854 "src-ag/GenerateCode.ag" #-}- typeSigs _lhsIoptions- {-# LINE 506 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 857, column 15)- _lhsOerrors =- ({-# LINE 857 "src-ag/GenerateCode.ag" #-}- Seq.empty- {-# LINE 512 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 923, column 17)- _lhsOoutput =- ({-# LINE 923 "src-ag/GenerateCode.ag" #-}- Program _nontsIchunks multivisit_- {-# LINE 518 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 990, column 14)- _nontsOtypeSyns =- ({-# LINE 990 "src-ag/GenerateCode.ag" #-}- typeSyns_- {-# LINE 524 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 990, column 14)- _nontsOderivings =- ({-# LINE 991 "src-ag/GenerateCode.ag" #-}- derivings_- {-# LINE 530 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 990, column 14)- _nontsOwrappers =- ({-# LINE 992 "src-ag/GenerateCode.ag" #-}- wrappers_- {-# LINE 536 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (from local)- _nontsOaroundMap =- ({-# LINE 575 "src-ag/GenerateCode.ag" #-}- _aroundMap- {-# LINE 542 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (from local)- _nontsOmergeMap =- ({-# LINE 591 "src-ag/GenerateCode.ag" #-}- _mergeMap- {-# LINE 548 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (from local)- _nontsOoptions =- ({-# LINE 50 "src-ag/GenerateCode.ag" #-}- _options- {-# LINE 554 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (from local)- _nontsOunfoldSemDom =- ({-# LINE 750 "src-ag/GenerateCode.ag" #-}- _unfoldSemDom- {-# LINE 560 "src-ag/GenerateCode.hs" #-}- )- ( _nontsIchunks,_nontsIgathNts,_nontsIsemDomUnfoldGath) =- nonts_ _nontsOallNts _nontsOallPragmas _nontsOaroundMap _nontsOcontextMap _nontsOderivings _nontsOmergeMap _nontsOo_case _nontsOo_cata _nontsOo_costcentre _nontsOo_data _nontsOo_linePragmas _nontsOo_monadic _nontsOo_newtypes _nontsOo_pretty _nontsOo_rename _nontsOo_sem _nontsOo_sig _nontsOo_splitsems _nontsOo_strictwrap _nontsOo_traces _nontsOo_unbox _nontsOoptions _nontsOparamMap _nontsOprefix _nontsOquantMap _nontsOtypeSyns _nontsOunfoldSemDom _nontsOwith_sig _nontsOwrappers - in ( _lhsOerrors,_lhsOoutput))) )--- CInterface ---------------------------------------------------{-- visit 0:- inherited attributes:- inh : Attributes- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramMap : ParamMap- prefix : String- syn : Attributes- synthesized attributes:- comments : [String]- semDom : [Decl]- semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)- wrapDecls : Decls- alternatives:- alternative CInterface:- child seg : CSegments --}--- cata-sem_CInterface :: CInterface ->- T_CInterface -sem_CInterface (CInterface _seg ) =- (sem_CInterface_CInterface (sem_CSegments _seg ) )--- semantic domain-newtype T_CInterface = T_CInterface (Attributes ->- NontermIdent ->- Bool ->- Bool ->- Bool ->- (Maybe Bool) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Options ->- ParamMap ->- String ->- Attributes ->- ( ([String]),([Decl]),(Map (NontermIdent, Int) ([String], Code.Type)),Decls))-data Inh_CInterface = Inh_CInterface {inh_Inh_CInterface :: !(Attributes),nt_Inh_CInterface :: !(NontermIdent),o_case_Inh_CInterface :: !(Bool),o_cata_Inh_CInterface :: !(Bool),o_costcentre_Inh_CInterface :: !(Bool),o_data_Inh_CInterface :: !((Maybe Bool)),o_linePragmas_Inh_CInterface :: !(Bool),o_monadic_Inh_CInterface :: !(Bool),o_newtypes_Inh_CInterface :: !(Bool),o_pretty_Inh_CInterface :: !(Bool),o_rename_Inh_CInterface :: !(Bool),o_sem_Inh_CInterface :: !(Bool),o_sig_Inh_CInterface :: !(Bool),o_splitsems_Inh_CInterface :: !(Bool),o_strictwrap_Inh_CInterface :: !(Bool),o_traces_Inh_CInterface :: !(Bool),o_unbox_Inh_CInterface :: !(Bool),options_Inh_CInterface :: !(Options),paramMap_Inh_CInterface :: !(ParamMap),prefix_Inh_CInterface :: !(String),syn_Inh_CInterface :: !(Attributes)}-data Syn_CInterface = Syn_CInterface {comments_Syn_CInterface :: !(([String])),semDom_Syn_CInterface :: !(([Decl])),semDomUnfoldGath_Syn_CInterface :: !((Map (NontermIdent, Int) ([String], Code.Type))),wrapDecls_Syn_CInterface :: !(Decls)}-wrap_CInterface :: T_CInterface ->- Inh_CInterface ->- Syn_CInterface -wrap_CInterface (T_CInterface sem ) (Inh_CInterface _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn ) =- (let ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) = sem _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn - in (Syn_CInterface _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls ))-sem_CInterface_CInterface :: T_CSegments ->- T_CInterface -sem_CInterface_CInterface (T_CSegments seg_ ) =- (T_CInterface (\ _lhsIinh- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_costcentre- _lhsIo_data- _lhsIo_linePragmas- _lhsIo_monadic- _lhsIo_newtypes- _lhsIo_pretty- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_splitsems- _lhsIo_strictwrap- _lhsIo_traces- _lhsIo_unbox- _lhsIoptions- _lhsIparamMap- _lhsIprefix- _lhsIsyn ->- (let _segOnr :: Int- _lhsOsemDom :: ([Decl])- _lhsOcomments :: ([String])- _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _lhsOwrapDecls :: Decls- _segOinh :: Attributes- _segOnt :: NontermIdent- _segOo_case :: Bool- _segOo_cata :: Bool- _segOo_costcentre :: Bool- _segOo_data :: (Maybe Bool)- _segOo_linePragmas :: Bool- _segOo_monadic :: Bool- _segOo_newtypes :: Bool- _segOo_pretty :: Bool- _segOo_rename :: Bool- _segOo_sem :: Bool- _segOo_sig :: Bool- _segOo_splitsems :: Bool- _segOo_strictwrap :: Bool- _segOo_traces :: Bool- _segOo_unbox :: Bool- _segOoptions :: Options- _segOparamMap :: ParamMap- _segOprefix :: String- _segOsyn :: Attributes- _segIcomments :: ([String])- _segIisNil :: Bool- _segIsemDom :: ([Decl])- _segIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _segIwrapDecls :: Decls- -- "src-ag/GenerateCode.ag"(line 284, column 17)- _segOnr =- ({-# LINE 284 "src-ag/GenerateCode.ag" #-}- 0- {-# LINE 694 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 712, column 18)- _lhsOsemDom =- ({-# LINE 712 "src-ag/GenerateCode.ag" #-}- Comment "semantic domain" : _segIsemDom- {-# LINE 700 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)- _lhsOcomments =- ({-# LINE 868 "src-ag/GenerateCode.ag" #-}- _segIcomments- {-# LINE 706 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 744, column 86)- _lhsOsemDomUnfoldGath =- ({-# LINE 744 "src-ag/GenerateCode.ag" #-}- _segIsemDomUnfoldGath- {-# LINE 712 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 829, column 52)- _lhsOwrapDecls =- ({-# LINE 829 "src-ag/GenerateCode.ag" #-}- _segIwrapDecls- {-# LINE 718 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOinh =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIinh- {-# LINE 724 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOnt =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsInt- {-# LINE 730 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOo_case =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 736 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOo_cata =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 742 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOo_costcentre =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 748 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOo_data =- ({-# LINE 48 "src-ag/GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 754 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOo_linePragmas =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 760 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOo_monadic =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 766 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOo_newtypes =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 772 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOo_pretty =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 778 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOo_rename =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 784 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOo_sem =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 790 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOo_sig =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 796 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOo_splitsems =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 802 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOo_strictwrap =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 808 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOo_traces =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 814 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOo_unbox =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 820 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOoptions =- ({-# LINE 50 "src-ag/GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 826 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOparamMap =- ({-# LINE 95 "src-ag/GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 832 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOprefix =- ({-# LINE 49 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 838 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _segOsyn =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 844 "src-ag/GenerateCode.hs" #-}- )- ( _segIcomments,_segIisNil,_segIsemDom,_segIsemDomUnfoldGath,_segIwrapDecls) =- seg_ _segOinh _segOnr _segOnt _segOo_case _segOo_cata _segOo_costcentre _segOo_data _segOo_linePragmas _segOo_monadic _segOo_newtypes _segOo_pretty _segOo_rename _segOo_sem _segOo_sig _segOo_splitsems _segOo_strictwrap _segOo_traces _segOo_unbox _segOoptions _segOparamMap _segOprefix _segOsyn - in ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))) )--- CNonterminal -------------------------------------------------{-- visit 0:- inherited attributes:- allNts : Set NontermIdent- allPragmas : PragmaMap- aroundMap : Map NontermIdent (Map ConstructorIdent (Set Identifier))- contextMap : ContextMap- derivings : Derivings- mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramMap : ParamMap- prefix : String- quantMap : QuantMap- typeSyns : TypeSyns- unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type- with_sig : Bool- wrappers : Set NontermIdent- synthesized attributes:- chunks : Chunks- gathNts : Set NontermIdent- semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)- alternatives:- alternative CNonterminal:- child nt : {NontermIdent}- child params : {[Identifier]}- child inh : {Attributes}- child syn : {Attributes}- child prods : CProductions - child inter : CInterface - visit 0:- local _tup1 : {(Attributes,Attributes,NontermIdent)}- local _tup2 : {(Attributes,Attributes,NontermIdent)}- local aroundMap : _- local mergeMap : _- local semWrapper : _- local comment : _- local dataDef : _- local genCata : _- local cataFun : _--}--- cata-sem_CNonterminal :: CNonterminal ->- T_CNonterminal -sem_CNonterminal (CNonterminal _nt _params _inh _syn _prods _inter ) =- (sem_CNonterminal_CNonterminal _nt _params _inh _syn (sem_CProductions _prods ) (sem_CInterface _inter ) )--- semantic domain-newtype T_CNonterminal = T_CNonterminal ((Set NontermIdent) ->- PragmaMap ->- (Map NontermIdent (Map ConstructorIdent (Set Identifier))) ->- ContextMap ->- Derivings ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) ->- Bool ->- Bool ->- Bool ->- (Maybe Bool) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Options ->- ParamMap ->- String ->- QuantMap ->- TypeSyns ->- (NontermIdent -> Int -> [String] -> Code.Type) ->- Bool ->- (Set NontermIdent) ->- ( Chunks,(Set NontermIdent),(Map (NontermIdent, Int) ([String], Code.Type))))-data Inh_CNonterminal = Inh_CNonterminal {allNts_Inh_CNonterminal :: !((Set NontermIdent)),allPragmas_Inh_CNonterminal :: !(PragmaMap),aroundMap_Inh_CNonterminal :: !((Map NontermIdent (Map ConstructorIdent (Set Identifier)))),contextMap_Inh_CNonterminal :: !(ContextMap),derivings_Inh_CNonterminal :: !(Derivings),mergeMap_Inh_CNonterminal :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))))),o_case_Inh_CNonterminal :: !(Bool),o_cata_Inh_CNonterminal :: !(Bool),o_costcentre_Inh_CNonterminal :: !(Bool),o_data_Inh_CNonterminal :: !((Maybe Bool)),o_linePragmas_Inh_CNonterminal :: !(Bool),o_monadic_Inh_CNonterminal :: !(Bool),o_newtypes_Inh_CNonterminal :: !(Bool),o_pretty_Inh_CNonterminal :: !(Bool),o_rename_Inh_CNonterminal :: !(Bool),o_sem_Inh_CNonterminal :: !(Bool),o_sig_Inh_CNonterminal :: !(Bool),o_splitsems_Inh_CNonterminal :: !(Bool),o_strictwrap_Inh_CNonterminal :: !(Bool),o_traces_Inh_CNonterminal :: !(Bool),o_unbox_Inh_CNonterminal :: !(Bool),options_Inh_CNonterminal :: !(Options),paramMap_Inh_CNonterminal :: !(ParamMap),prefix_Inh_CNonterminal :: !(String),quantMap_Inh_CNonterminal :: !(QuantMap),typeSyns_Inh_CNonterminal :: !(TypeSyns),unfoldSemDom_Inh_CNonterminal :: !((NontermIdent -> Int -> [String] -> Code.Type)),with_sig_Inh_CNonterminal :: !(Bool),wrappers_Inh_CNonterminal :: !((Set NontermIdent))}-data Syn_CNonterminal = Syn_CNonterminal {chunks_Syn_CNonterminal :: !(Chunks),gathNts_Syn_CNonterminal :: !((Set NontermIdent)),semDomUnfoldGath_Syn_CNonterminal :: !((Map (NontermIdent, Int) ([String], Code.Type)))}-wrap_CNonterminal :: T_CNonterminal ->- Inh_CNonterminal ->- Syn_CNonterminal -wrap_CNonterminal (T_CNonterminal sem ) (Inh_CNonterminal _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers ) =- (let ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath) = sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers - in (Syn_CNonterminal _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath ))-sem_CNonterminal_CNonterminal :: NontermIdent ->- ([Identifier]) ->- Attributes ->- Attributes ->- T_CProductions ->- T_CInterface ->- T_CNonterminal -sem_CNonterminal_CNonterminal nt_ params_ inh_ syn_ (T_CProductions prods_ ) (T_CInterface inter_ ) =- (T_CNonterminal (\ _lhsIallNts- _lhsIallPragmas- _lhsIaroundMap- _lhsIcontextMap- _lhsIderivings- _lhsImergeMap- _lhsIo_case- _lhsIo_cata- _lhsIo_costcentre- _lhsIo_data- _lhsIo_linePragmas- _lhsIo_monadic- _lhsIo_newtypes- _lhsIo_pretty- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_splitsems- _lhsIo_strictwrap- _lhsIo_traces- _lhsIo_unbox- _lhsIoptions- _lhsIparamMap- _lhsIprefix- _lhsIquantMap- _lhsItypeSyns- _lhsIunfoldSemDom- _lhsIwith_sig- _lhsIwrappers ->- (let __tup1 :: ((Attributes,Attributes,NontermIdent))- _interOinh :: Attributes- _interOsyn :: Attributes- _interOnt :: NontermIdent- __tup2 :: ((Attributes,Attributes,NontermIdent))- _prodsOinh :: Attributes- _prodsOsyn :: Attributes- _prodsOnt :: NontermIdent- _lhsOgathNts :: (Set NontermIdent)- _lhsOchunks :: Chunks- _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _prodsOallNts :: (Set NontermIdent)- _prodsOallPragmas :: PragmaMap- _prodsOaroundMap :: (Map ConstructorIdent (Set Identifier))- _prodsOcontextMap :: ContextMap- _prodsOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))- _prodsOo_case :: Bool- _prodsOo_cata :: Bool- _prodsOo_costcentre :: Bool- _prodsOo_data :: (Maybe Bool)- _prodsOo_linePragmas :: Bool- _prodsOo_monadic :: Bool- _prodsOo_newtypes :: Bool- _prodsOo_pretty :: Bool- _prodsOo_rename :: Bool- _prodsOo_sem :: Bool- _prodsOo_sig :: Bool- _prodsOo_splitsems :: Bool- _prodsOo_strictwrap :: Bool- _prodsOo_traces :: Bool- _prodsOo_unbox :: Bool- _prodsOoptions :: Options- _prodsOparamMap :: ParamMap- _prodsOprefix :: String- _prodsOquantMap :: QuantMap- _prodsOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _prodsOwith_sig :: Bool- _prodsOwrappers :: (Set NontermIdent)- _interOo_case :: Bool- _interOo_cata :: Bool- _interOo_costcentre :: Bool- _interOo_data :: (Maybe Bool)- _interOo_linePragmas :: Bool- _interOo_monadic :: Bool- _interOo_newtypes :: Bool- _interOo_pretty :: Bool- _interOo_rename :: Bool- _interOo_sem :: Bool- _interOo_sig :: Bool- _interOo_splitsems :: Bool- _interOo_strictwrap :: Bool- _interOo_traces :: Bool- _interOo_unbox :: Bool- _interOoptions :: Options- _interOparamMap :: ParamMap- _interOprefix :: String- _prodsIcataAlts :: Decls- _prodsIcomments :: ([String])- _prodsIdataAlts :: DataAlts- _prodsIdecls :: Decls- _prodsIsemNames :: ([String])- _interIcomments :: ([String])- _interIsemDom :: ([Decl])- _interIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _interIwrapDecls :: Decls- -- "src-ag/GenerateCode.ag"(line 86, column 26)- __tup1 =- ({-# LINE 86 "src-ag/GenerateCode.ag" #-}- (inh_,syn_,nt_)- {-# LINE 1055 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 86, column 26)- (_interOinh,_,_) =- ({-# LINE 86 "src-ag/GenerateCode.ag" #-}- __tup1- {-# LINE 1061 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 86, column 26)- (_,_interOsyn,_) =- ({-# LINE 86 "src-ag/GenerateCode.ag" #-}- __tup1- {-# LINE 1067 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 86, column 26)- (_,_,_interOnt) =- ({-# LINE 86 "src-ag/GenerateCode.ag" #-}- __tup1- {-# LINE 1073 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 87, column 25)- __tup2 =- ({-# LINE 87 "src-ag/GenerateCode.ag" #-}- (inh_,syn_,nt_)- {-# LINE 1079 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 87, column 25)- (_prodsOinh,_,_) =- ({-# LINE 87 "src-ag/GenerateCode.ag" #-}- __tup2- {-# LINE 1085 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 87, column 25)- (_,_prodsOsyn,_) =- ({-# LINE 87 "src-ag/GenerateCode.ag" #-}- __tup2- {-# LINE 1091 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 87, column 25)- (_,_,_prodsOnt) =- ({-# LINE 87 "src-ag/GenerateCode.ag" #-}- __tup2- {-# LINE 1097 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 142, column 7)- _lhsOgathNts =- ({-# LINE 142 "src-ag/GenerateCode.ag" #-}- Set.singleton nt_- {-# LINE 1103 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 583, column 34)- _aroundMap =- ({-# LINE 583 "src-ag/GenerateCode.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIaroundMap- {-# LINE 1109 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 599, column 34)- _mergeMap =- ({-# LINE 599 "src-ag/GenerateCode.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsImergeMap- {-# LINE 1115 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 803, column 18)- _semWrapper =- ({-# LINE 803 "src-ag/GenerateCode.ag" #-}- let params' = map getName params_- inhAttrs = Map.toList inh_- synAttrs = Map.toList syn_- inhVars = [ SimpleExpr (attrname True _LHS a) | (a,_) <- inhAttrs ]- synVars = [ SimpleExpr (attrname False _LHS a) | (a,_) <- synAttrs ]- var = "sem"- wrapNT = "wrap" ++ "_" ++ getName nt_- inhNT = "Inh" ++ "_" ++ getName nt_- synNT = "Syn" ++ "_" ++ getName nt_- varPat = if _lhsIo_newtypes- then App (sdtype nt_) [SimpleExpr var]- else SimpleExpr var- evalTp | null params' = id- | otherwise = idEvalType- appParams nm = TypeApp (SimpleType nm) (map SimpleType params')- typeSig = TSig wrapNT (evalTp $ appParams (sdtype nt_) `Arr` (appParams inhNT `Arr` appParams synNT))- mkstrict = Named _lhsIo_strictwrap- mkdata n attrs = Data n params' [Record n [mkstrict (getName f++"_"++n) $ evalTp $ typeToCodeType (Just nt_) params' $ removeDeforested t | (f,t) <- attrs]] False []- datas = [mkdata inhNT inhAttrs, mkdata synNT synAttrs]- in datas ++ [ typeSig- , Decl (Fun wrapNT [varPat, App inhNT inhVars])- (Let _interIwrapDecls (App synNT synVars))- Set.empty Set.empty- ]- {-# LINE 1144 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 864, column 18)- _comment =- ({-# LINE 864 "src-ag/GenerateCode.ag" #-}- Comment . unlines . map ind $ ( _interIcomments ++ ("alternatives:" : map ind _prodsIcomments) )- {-# LINE 1150 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 926, column 19)- _lhsOchunks =- ({-# LINE 926 "src-ag/GenerateCode.ag" #-}- [ Chunk (getName nt_)- (Comment (getName nt_ ++ " " ++ replicate (60 - length (getName nt_)) '-'))- (if _lhsIo_pretty then [_comment ] else [])- (if isJust _lhsIo_data then [_dataDef ] else [])- (if _lhsIo_cata && _genCata then _cataFun else [])- (if _lhsIo_sig then _interIsemDom else [])- (if nt_ `Set.member` _lhsIwrappers then _semWrapper else [])- (if _lhsIo_sem then _prodsIdecls else [])- (if _lhsIo_sem then _prodsIsemNames else [])- ]- {-# LINE 1165 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 995, column 18)- _dataDef =- ({-# LINE 995 "src-ag/GenerateCode.ag" #-}- let params' = map getName params_- typeSyn tp = let theType =- case tp of- CommonTypes.Maybe t -> TMaybe $ typeToCodeType (Just nt_) params' t- CommonTypes.Either t1 t2 -> TEither (typeToCodeType (Just nt_) params' t1) (typeToCodeType (Just nt_) params' t2)- CommonTypes.Map t1 t2 -> TMap (typeToCodeType (Just nt_) params' t1) (typeToCodeType (Just nt_) params' t2)- CommonTypes.IntMap t -> TIntMap $ typeToCodeType (Just nt_) params' t- CommonTypes.List t -> Code.List $ typeToCodeType (Just nt_) params' t- CommonTypes.Tuple ts -> Code.TupleType [typeToCodeType (Just nt_) params' t- | (_,t) <- ts- ]- in Code.Type (getName nt_) params' (idEvalType theType)- derivings = maybe [] (map getName . Set.toList) (Map.lookup nt_ _lhsIderivings)- dataDef = Data (getName nt_) (map getName params_) _prodsIdataAlts (maybe False id _lhsIo_data) derivings- in maybe dataDef typeSyn $ lookup nt_ _lhsItypeSyns- {-# LINE 1185 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 1038, column 18)- _genCata =- ({-# LINE 1038 "src-ag/GenerateCode.ag" #-}- not (nt_ `Set.member` nocatas _lhsIoptions)- {-# LINE 1191 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 1039, column 18)- _cataFun =- ({-# LINE 1039 "src-ag/GenerateCode.ag" #-}- let appParams nm = TypeApp (SimpleType nm) (map SimpleType (map getName params_))- evalTp | null params_ = id- | otherwise = idEvalType- tSig = TSig (cataname _lhsIprefix nt_)- (appQuant _lhsIquantMap nt_ $ appContext _lhsIcontextMap nt_ $ evalTp $ appParams (getName nt_) `Arr` appParams (sdtype nt_))- special typ = case typ of- CommonTypes.List tp ->- let cons = SimpleExpr (semname _lhsIprefix nt_ (identifier "Cons"))- nil = SimpleExpr (semname _lhsIprefix nt_ (identifier "Nil" ))- arg = SimpleExpr "list"- rarg = case tp of- NT t _ _ -> let t' = maybe t id (deforestedNt t)- in SimpleExpr ("(Prelude.map " ++ (cataname _lhsIprefix t') ++ " list)")- _ -> arg- lhs = Fun (cataname _lhsIprefix nt_) [arg]- rhs = (App "Prelude.foldr" [cons,nil,rarg])- in [Decl lhs rhs Set.empty Set.empty]- CommonTypes.Maybe tp ->- let just = semname _lhsIprefix nt_ (identifier "Just")- nothing = semname _lhsIprefix nt_ (identifier "Nothing" )- arg = SimpleExpr "x"- rarg = case tp of- NT t _ _ -> let t' = maybe t id (deforestedNt t)- in App (cataname _lhsIprefix t') [arg]- _ -> arg- lhs a = Fun (cataname _lhsIprefix nt_) [a]- in [Decl (lhs (App "Prelude.Just" [arg])) (App just [rarg]) Set.empty Set.empty- ,Decl (lhs (SimpleExpr "Prelude.Nothing")) (SimpleExpr nothing) Set.empty Set.empty- ]- CommonTypes.Either tp1 tp2 ->- let left = semname _lhsIprefix nt_ (identifier "Left")- right = semname _lhsIprefix nt_ (identifier "Right" )- arg = SimpleExpr "x"- rarg0 = case tp1 of- NT t _ _ -> let t' = maybe t id (deforestedNt t)- in App (cataname _lhsIprefix t') [arg]- _ -> arg- rarg1 = case tp2 of- NT t _ _ -> let t' = maybe t id (deforestedNt t)- in App (cataname _lhsIprefix t') [arg]- _ -> arg- lhs a = Fun (cataname _lhsIprefix nt_) [a]- in [Decl (lhs (App "Prelude.Left" [arg])) (App left [rarg0]) Set.empty Set.empty- ,Decl (lhs (App "Prelude.Right" [arg])) (App right [rarg1]) Set.empty Set.empty- ]- CommonTypes.Map _ tp ->- let entry = SimpleExpr (semname _lhsIprefix nt_ (identifier "Entry"))- nil = SimpleExpr (semname _lhsIprefix nt_ (identifier "Nil"))- arg = SimpleExpr "m"- rarg = case tp of- NT t _ _ -> let t' = maybe t id (deforestedNt t)- in App "Data.Map.map" [SimpleExpr $ cataname _lhsIprefix t', arg]- _ -> arg- lhs = Fun (cataname _lhsIprefix nt_) [arg]- rhs = App "Data.Map.foldrWithKey" [entry,nil,rarg]- in [Decl lhs rhs Set.empty Set.empty]- CommonTypes.IntMap tp ->- let entry = SimpleExpr (semname _lhsIprefix nt_ (identifier "Entry"))- nil = SimpleExpr (semname _lhsIprefix nt_ (identifier "Nil"))- arg = SimpleExpr "m"- rarg = case tp of- NT t _ _ -> let t' = maybe t id (deforestedNt t)- in App "Data.IntMap.map" [SimpleExpr $ cataname _lhsIprefix t', arg]- _ -> arg- lhs = Fun (cataname _lhsIprefix nt_) [arg]- rhs = App "Data.IntMap.foldWithKey" [entry,nil,rarg]- in [Decl lhs rhs Set.empty Set.empty]- CommonTypes.Tuple tps ->- let con = semname _lhsIprefix nt_ (identifier "Tuple")- tps' = [ (SimpleExpr (getName x),y) | (x,y) <- tps]- rargs = map rarg tps'- rarg (n, tp) = case tp of- NT t _ _ -> let t' = maybe t id (deforestedNt t)- in App (cataname _lhsIprefix t') [n]- _ -> n- lhs = Fun (cataname _lhsIprefix nt_) [TupleExpr (map fst tps')]- rhs = App con rargs- in [Decl lhs rhs Set.empty Set.empty]- in Comment "cata" :- (if _lhsIo_sig then [tSig] else []) ++- maybe _prodsIcataAlts special (lookup nt_ _lhsItypeSyns)- {-# LINE 1277 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 744, column 86)- _lhsOsemDomUnfoldGath =- ({-# LINE 744 "src-ag/GenerateCode.ag" #-}- _interIsemDomUnfoldGath- {-# LINE 1283 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOallNts =- ({-# LINE 132 "src-ag/GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 1289 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOallPragmas =- ({-# LINE 73 "src-ag/GenerateCode.ag" #-}- _lhsIallPragmas- {-# LINE 1295 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (from local)- _prodsOaroundMap =- ({-# LINE 578 "src-ag/GenerateCode.ag" #-}- _aroundMap- {-# LINE 1301 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOcontextMap =- ({-# LINE 115 "src-ag/GenerateCode.ag" #-}- _lhsIcontextMap- {-# LINE 1307 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (from local)- _prodsOmergeMap =- ({-# LINE 594 "src-ag/GenerateCode.ag" #-}- _mergeMap- {-# LINE 1313 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOo_case =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 1319 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOo_cata =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 1325 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOo_costcentre =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 1331 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOo_data =- ({-# LINE 48 "src-ag/GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 1337 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOo_linePragmas =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 1343 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOo_monadic =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 1349 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOo_newtypes =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 1355 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOo_pretty =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 1361 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOo_rename =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 1367 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOo_sem =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 1373 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOo_sig =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 1379 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOo_splitsems =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 1385 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOo_strictwrap =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 1391 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOo_traces =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 1397 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOo_unbox =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 1403 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOoptions =- ({-# LINE 50 "src-ag/GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 1409 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOparamMap =- ({-# LINE 95 "src-ag/GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 1415 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOprefix =- ({-# LINE 49 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 1421 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOquantMap =- ({-# LINE 115 "src-ag/GenerateCode.ag" #-}- _lhsIquantMap- {-# LINE 1427 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOunfoldSemDom =- ({-# LINE 750 "src-ag/GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 1433 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOwith_sig =- ({-# LINE 851 "src-ag/GenerateCode.ag" #-}- _lhsIwith_sig- {-# LINE 1439 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _prodsOwrappers =- ({-# LINE 987 "src-ag/GenerateCode.ag" #-}- _lhsIwrappers- {-# LINE 1445 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOo_case =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 1451 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOo_cata =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 1457 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOo_costcentre =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 1463 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOo_data =- ({-# LINE 48 "src-ag/GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 1469 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOo_linePragmas =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 1475 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOo_monadic =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 1481 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOo_newtypes =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 1487 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOo_pretty =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 1493 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOo_rename =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 1499 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOo_sem =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 1505 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOo_sig =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 1511 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOo_splitsems =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 1517 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOo_strictwrap =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 1523 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOo_traces =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 1529 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOo_unbox =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 1535 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOoptions =- ({-# LINE 50 "src-ag/GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 1541 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOparamMap =- ({-# LINE 95 "src-ag/GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 1547 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _interOprefix =- ({-# LINE 49 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 1553 "src-ag/GenerateCode.hs" #-}- )- ( _prodsIcataAlts,_prodsIcomments,_prodsIdataAlts,_prodsIdecls,_prodsIsemNames) =- prods_ _prodsOallNts _prodsOallPragmas _prodsOaroundMap _prodsOcontextMap _prodsOinh _prodsOmergeMap _prodsOnt _prodsOo_case _prodsOo_cata _prodsOo_costcentre _prodsOo_data _prodsOo_linePragmas _prodsOo_monadic _prodsOo_newtypes _prodsOo_pretty _prodsOo_rename _prodsOo_sem _prodsOo_sig _prodsOo_splitsems _prodsOo_strictwrap _prodsOo_traces _prodsOo_unbox _prodsOoptions _prodsOparamMap _prodsOprefix _prodsOquantMap _prodsOsyn _prodsOunfoldSemDom _prodsOwith_sig _prodsOwrappers - ( _interIcomments,_interIsemDom,_interIsemDomUnfoldGath,_interIwrapDecls) =- inter_ _interOinh _interOnt _interOo_case _interOo_cata _interOo_costcentre _interOo_data _interOo_linePragmas _interOo_monadic _interOo_newtypes _interOo_pretty _interOo_rename _interOo_sem _interOo_sig _interOo_splitsems _interOo_strictwrap _interOo_traces _interOo_unbox _interOoptions _interOparamMap _interOprefix _interOsyn - in ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath))) )--- CNonterminals ------------------------------------------------{-- visit 0:- inherited attributes:- allNts : Set NontermIdent- allPragmas : PragmaMap- aroundMap : Map NontermIdent (Map ConstructorIdent (Set Identifier))- contextMap : ContextMap- derivings : Derivings- mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramMap : ParamMap- prefix : String- quantMap : QuantMap- typeSyns : TypeSyns- unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type- with_sig : Bool- wrappers : Set NontermIdent- synthesized attributes:- chunks : Chunks- gathNts : Set NontermIdent- semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)- alternatives:- alternative Cons:- child hd : CNonterminal - child tl : CNonterminals - alternative Nil:--}--- cata-sem_CNonterminals :: CNonterminals ->- T_CNonterminals -sem_CNonterminals list =- (Prelude.foldr sem_CNonterminals_Cons sem_CNonterminals_Nil (Prelude.map sem_CNonterminal list) )--- semantic domain-newtype T_CNonterminals = T_CNonterminals ((Set NontermIdent) ->- PragmaMap ->- (Map NontermIdent (Map ConstructorIdent (Set Identifier))) ->- ContextMap ->- Derivings ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) ->- Bool ->- Bool ->- Bool ->- (Maybe Bool) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Options ->- ParamMap ->- String ->- QuantMap ->- TypeSyns ->- (NontermIdent -> Int -> [String] -> Code.Type) ->- Bool ->- (Set NontermIdent) ->- ( Chunks,(Set NontermIdent),(Map (NontermIdent, Int) ([String], Code.Type))))-data Inh_CNonterminals = Inh_CNonterminals {allNts_Inh_CNonterminals :: !((Set NontermIdent)),allPragmas_Inh_CNonterminals :: !(PragmaMap),aroundMap_Inh_CNonterminals :: !((Map NontermIdent (Map ConstructorIdent (Set Identifier)))),contextMap_Inh_CNonterminals :: !(ContextMap),derivings_Inh_CNonterminals :: !(Derivings),mergeMap_Inh_CNonterminals :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))))),o_case_Inh_CNonterminals :: !(Bool),o_cata_Inh_CNonterminals :: !(Bool),o_costcentre_Inh_CNonterminals :: !(Bool),o_data_Inh_CNonterminals :: !((Maybe Bool)),o_linePragmas_Inh_CNonterminals :: !(Bool),o_monadic_Inh_CNonterminals :: !(Bool),o_newtypes_Inh_CNonterminals :: !(Bool),o_pretty_Inh_CNonterminals :: !(Bool),o_rename_Inh_CNonterminals :: !(Bool),o_sem_Inh_CNonterminals :: !(Bool),o_sig_Inh_CNonterminals :: !(Bool),o_splitsems_Inh_CNonterminals :: !(Bool),o_strictwrap_Inh_CNonterminals :: !(Bool),o_traces_Inh_CNonterminals :: !(Bool),o_unbox_Inh_CNonterminals :: !(Bool),options_Inh_CNonterminals :: !(Options),paramMap_Inh_CNonterminals :: !(ParamMap),prefix_Inh_CNonterminals :: !(String),quantMap_Inh_CNonterminals :: !(QuantMap),typeSyns_Inh_CNonterminals :: !(TypeSyns),unfoldSemDom_Inh_CNonterminals :: !((NontermIdent -> Int -> [String] -> Code.Type)),with_sig_Inh_CNonterminals :: !(Bool),wrappers_Inh_CNonterminals :: !((Set NontermIdent))}-data Syn_CNonterminals = Syn_CNonterminals {chunks_Syn_CNonterminals :: !(Chunks),gathNts_Syn_CNonterminals :: !((Set NontermIdent)),semDomUnfoldGath_Syn_CNonterminals :: !((Map (NontermIdent, Int) ([String], Code.Type)))}-wrap_CNonterminals :: T_CNonterminals ->- Inh_CNonterminals ->- Syn_CNonterminals -wrap_CNonterminals (T_CNonterminals sem ) (Inh_CNonterminals _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers ) =- (let ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath) = sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers - in (Syn_CNonterminals _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath ))-sem_CNonterminals_Cons :: T_CNonterminal ->- T_CNonterminals ->- T_CNonterminals -sem_CNonterminals_Cons (T_CNonterminal hd_ ) (T_CNonterminals tl_ ) =- (T_CNonterminals (\ _lhsIallNts- _lhsIallPragmas- _lhsIaroundMap- _lhsIcontextMap- _lhsIderivings- _lhsImergeMap- _lhsIo_case- _lhsIo_cata- _lhsIo_costcentre- _lhsIo_data- _lhsIo_linePragmas- _lhsIo_monadic- _lhsIo_newtypes- _lhsIo_pretty- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_splitsems- _lhsIo_strictwrap- _lhsIo_traces- _lhsIo_unbox- _lhsIoptions- _lhsIparamMap- _lhsIprefix- _lhsIquantMap- _lhsItypeSyns- _lhsIunfoldSemDom- _lhsIwith_sig- _lhsIwrappers ->- (let _lhsOchunks :: Chunks- _lhsOgathNts :: (Set NontermIdent)- _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _hdOallNts :: (Set NontermIdent)- _hdOallPragmas :: PragmaMap- _hdOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Set Identifier)))- _hdOcontextMap :: ContextMap- _hdOderivings :: Derivings- _hdOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))))- _hdOo_case :: Bool- _hdOo_cata :: Bool- _hdOo_costcentre :: Bool- _hdOo_data :: (Maybe Bool)- _hdOo_linePragmas :: Bool- _hdOo_monadic :: Bool- _hdOo_newtypes :: Bool- _hdOo_pretty :: Bool- _hdOo_rename :: Bool- _hdOo_sem :: Bool- _hdOo_sig :: Bool- _hdOo_splitsems :: Bool- _hdOo_strictwrap :: Bool- _hdOo_traces :: Bool- _hdOo_unbox :: Bool- _hdOoptions :: Options- _hdOparamMap :: ParamMap- _hdOprefix :: String- _hdOquantMap :: QuantMap- _hdOtypeSyns :: TypeSyns- _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _hdOwith_sig :: Bool- _hdOwrappers :: (Set NontermIdent)- _tlOallNts :: (Set NontermIdent)- _tlOallPragmas :: PragmaMap- _tlOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Set Identifier)))- _tlOcontextMap :: ContextMap- _tlOderivings :: Derivings- _tlOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))))- _tlOo_case :: Bool- _tlOo_cata :: Bool- _tlOo_costcentre :: Bool- _tlOo_data :: (Maybe Bool)- _tlOo_linePragmas :: Bool- _tlOo_monadic :: Bool- _tlOo_newtypes :: Bool- _tlOo_pretty :: Bool- _tlOo_rename :: Bool- _tlOo_sem :: Bool- _tlOo_sig :: Bool- _tlOo_splitsems :: Bool- _tlOo_strictwrap :: Bool- _tlOo_traces :: Bool- _tlOo_unbox :: Bool- _tlOoptions :: Options- _tlOparamMap :: ParamMap- _tlOprefix :: String- _tlOquantMap :: QuantMap- _tlOtypeSyns :: TypeSyns- _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _tlOwith_sig :: Bool- _tlOwrappers :: (Set NontermIdent)- _hdIchunks :: Chunks- _hdIgathNts :: (Set NontermIdent)- _hdIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _tlIchunks :: Chunks- _tlIgathNts :: (Set NontermIdent)- _tlIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- -- use rule "src-ag/GenerateCode.ag"(line 918, column 49)- _lhsOchunks =- ({-# LINE 918 "src-ag/GenerateCode.ag" #-}- _hdIchunks ++ _tlIchunks- {-# LINE 1751 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 138, column 47)- _lhsOgathNts =- ({-# LINE 138 "src-ag/GenerateCode.ag" #-}- _hdIgathNts `Set.union` _tlIgathNts- {-# LINE 1757 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 744, column 86)- _lhsOsemDomUnfoldGath =- ({-# LINE 744 "src-ag/GenerateCode.ag" #-}- _hdIsemDomUnfoldGath `Map.union` _tlIsemDomUnfoldGath- {-# LINE 1763 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOallNts =- ({-# LINE 132 "src-ag/GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 1769 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOallPragmas =- ({-# LINE 73 "src-ag/GenerateCode.ag" #-}- _lhsIallPragmas- {-# LINE 1775 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOaroundMap =- ({-# LINE 575 "src-ag/GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 1781 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOcontextMap =- ({-# LINE 115 "src-ag/GenerateCode.ag" #-}- _lhsIcontextMap- {-# LINE 1787 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOderivings =- ({-# LINE 986 "src-ag/GenerateCode.ag" #-}- _lhsIderivings- {-# LINE 1793 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 591 "src-ag/GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 1799 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_case =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 1805 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_cata =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 1811 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_costcentre =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 1817 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_data =- ({-# LINE 48 "src-ag/GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 1823 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_linePragmas =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 1829 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_monadic =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 1835 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_newtypes =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 1841 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_pretty =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 1847 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_rename =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 1853 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_sem =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 1859 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_sig =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 1865 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_splitsems =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 1871 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_strictwrap =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 1877 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_traces =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 1883 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_unbox =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 1889 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 50 "src-ag/GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 1895 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOparamMap =- ({-# LINE 95 "src-ag/GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 1901 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOprefix =- ({-# LINE 49 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 1907 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOquantMap =- ({-# LINE 115 "src-ag/GenerateCode.ag" #-}- _lhsIquantMap- {-# LINE 1913 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOtypeSyns =- ({-# LINE 986 "src-ag/GenerateCode.ag" #-}- _lhsItypeSyns- {-# LINE 1919 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOunfoldSemDom =- ({-# LINE 750 "src-ag/GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 1925 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOwith_sig =- ({-# LINE 851 "src-ag/GenerateCode.ag" #-}- _lhsIwith_sig- {-# LINE 1931 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOwrappers =- ({-# LINE 987 "src-ag/GenerateCode.ag" #-}- _lhsIwrappers- {-# LINE 1937 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOallNts =- ({-# LINE 132 "src-ag/GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 1943 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOallPragmas =- ({-# LINE 73 "src-ag/GenerateCode.ag" #-}- _lhsIallPragmas- {-# LINE 1949 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOaroundMap =- ({-# LINE 575 "src-ag/GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 1955 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOcontextMap =- ({-# LINE 115 "src-ag/GenerateCode.ag" #-}- _lhsIcontextMap- {-# LINE 1961 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOderivings =- ({-# LINE 986 "src-ag/GenerateCode.ag" #-}- _lhsIderivings- {-# LINE 1967 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 591 "src-ag/GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 1973 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_case =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 1979 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_cata =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 1985 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_costcentre =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 1991 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_data =- ({-# LINE 48 "src-ag/GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 1997 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_linePragmas =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 2003 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_monadic =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 2009 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_newtypes =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 2015 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_pretty =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 2021 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_rename =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 2027 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_sem =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 2033 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_sig =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 2039 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_splitsems =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 2045 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_strictwrap =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 2051 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_traces =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 2057 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_unbox =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 2063 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 50 "src-ag/GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 2069 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOparamMap =- ({-# LINE 95 "src-ag/GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 2075 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOprefix =- ({-# LINE 49 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 2081 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOquantMap =- ({-# LINE 115 "src-ag/GenerateCode.ag" #-}- _lhsIquantMap- {-# LINE 2087 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOtypeSyns =- ({-# LINE 986 "src-ag/GenerateCode.ag" #-}- _lhsItypeSyns- {-# LINE 2093 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOunfoldSemDom =- ({-# LINE 750 "src-ag/GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 2099 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOwith_sig =- ({-# LINE 851 "src-ag/GenerateCode.ag" #-}- _lhsIwith_sig- {-# LINE 2105 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOwrappers =- ({-# LINE 987 "src-ag/GenerateCode.ag" #-}- _lhsIwrappers- {-# LINE 2111 "src-ag/GenerateCode.hs" #-}- )- ( _hdIchunks,_hdIgathNts,_hdIsemDomUnfoldGath) =- hd_ _hdOallNts _hdOallPragmas _hdOaroundMap _hdOcontextMap _hdOderivings _hdOmergeMap _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamMap _hdOprefix _hdOquantMap _hdOtypeSyns _hdOunfoldSemDom _hdOwith_sig _hdOwrappers - ( _tlIchunks,_tlIgathNts,_tlIsemDomUnfoldGath) =- tl_ _tlOallNts _tlOallPragmas _tlOaroundMap _tlOcontextMap _tlOderivings _tlOmergeMap _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamMap _tlOprefix _tlOquantMap _tlOtypeSyns _tlOunfoldSemDom _tlOwith_sig _tlOwrappers - in ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath))) )-sem_CNonterminals_Nil :: T_CNonterminals -sem_CNonterminals_Nil =- (T_CNonterminals (\ _lhsIallNts- _lhsIallPragmas- _lhsIaroundMap- _lhsIcontextMap- _lhsIderivings- _lhsImergeMap- _lhsIo_case- _lhsIo_cata- _lhsIo_costcentre- _lhsIo_data- _lhsIo_linePragmas- _lhsIo_monadic- _lhsIo_newtypes- _lhsIo_pretty- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_splitsems- _lhsIo_strictwrap- _lhsIo_traces- _lhsIo_unbox- _lhsIoptions- _lhsIparamMap- _lhsIprefix- _lhsIquantMap- _lhsItypeSyns- _lhsIunfoldSemDom- _lhsIwith_sig- _lhsIwrappers ->- (let _lhsOchunks :: Chunks- _lhsOgathNts :: (Set NontermIdent)- _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- -- use rule "src-ag/GenerateCode.ag"(line 918, column 49)- _lhsOchunks =- ({-# LINE 918 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 2156 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 138, column 47)- _lhsOgathNts =- ({-# LINE 138 "src-ag/GenerateCode.ag" #-}- Set.empty- {-# LINE 2162 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 744, column 86)- _lhsOsemDomUnfoldGath =- ({-# LINE 744 "src-ag/GenerateCode.ag" #-}- Map.empty- {-# LINE 2168 "src-ag/GenerateCode.hs" #-}- )- in ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath))) )--- CProduction --------------------------------------------------{-- visit 0:- inherited attributes:- allNts : Set NontermIdent- allPragmas : PragmaMap- aroundMap : Map ConstructorIdent (Set Identifier)- contextMap : ContextMap- inh : Attributes- mergeMap : Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramMap : ParamMap- prefix : String- quantMap : QuantMap- syn : Attributes- unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type- with_sig : Bool- wrappers : Set NontermIdent- synthesized attributes:- cataAlt : Decl- comments : [String]- dataAlt : DataAlt- decls : Decls- semNames : [String]- alternatives:- alternative CProduction:- child con : {ConstructorIdent}- child visits : CVisits - child children : {[(Identifier,Type,ChildKind)]}- child terminals : {[Identifier]}- visit 0:- local paramInstMap : _- local aroundMap : _- local mergeMap : _- local firstOrderChildren : _- local params : _--}--- cata-sem_CProduction :: CProduction ->- T_CProduction -sem_CProduction (CProduction _con _visits _children _terminals ) =- (sem_CProduction_CProduction _con (sem_CVisits _visits ) _children _terminals )--- semantic domain-newtype T_CProduction = T_CProduction ((Set NontermIdent) ->- PragmaMap ->- (Map ConstructorIdent (Set Identifier)) ->- ContextMap ->- Attributes ->- (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) ->- NontermIdent ->- Bool ->- Bool ->- Bool ->- (Maybe Bool) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Options ->- ParamMap ->- String ->- QuantMap ->- Attributes ->- (NontermIdent -> Int -> [String] -> Code.Type) ->- Bool ->- (Set NontermIdent) ->- ( Decl,([String]),DataAlt,Decls,([String])))-data Inh_CProduction = Inh_CProduction {allNts_Inh_CProduction :: !((Set NontermIdent)),allPragmas_Inh_CProduction :: !(PragmaMap),aroundMap_Inh_CProduction :: !((Map ConstructorIdent (Set Identifier))),contextMap_Inh_CProduction :: !(ContextMap),inh_Inh_CProduction :: !(Attributes),mergeMap_Inh_CProduction :: !((Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))),nt_Inh_CProduction :: !(NontermIdent),o_case_Inh_CProduction :: !(Bool),o_cata_Inh_CProduction :: !(Bool),o_costcentre_Inh_CProduction :: !(Bool),o_data_Inh_CProduction :: !((Maybe Bool)),o_linePragmas_Inh_CProduction :: !(Bool),o_monadic_Inh_CProduction :: !(Bool),o_newtypes_Inh_CProduction :: !(Bool),o_pretty_Inh_CProduction :: !(Bool),o_rename_Inh_CProduction :: !(Bool),o_sem_Inh_CProduction :: !(Bool),o_sig_Inh_CProduction :: !(Bool),o_splitsems_Inh_CProduction :: !(Bool),o_strictwrap_Inh_CProduction :: !(Bool),o_traces_Inh_CProduction :: !(Bool),o_unbox_Inh_CProduction :: !(Bool),options_Inh_CProduction :: !(Options),paramMap_Inh_CProduction :: !(ParamMap),prefix_Inh_CProduction :: !(String),quantMap_Inh_CProduction :: !(QuantMap),syn_Inh_CProduction :: !(Attributes),unfoldSemDom_Inh_CProduction :: !((NontermIdent -> Int -> [String] -> Code.Type)),with_sig_Inh_CProduction :: !(Bool),wrappers_Inh_CProduction :: !((Set NontermIdent))}-data Syn_CProduction = Syn_CProduction {cataAlt_Syn_CProduction :: !(Decl),comments_Syn_CProduction :: !(([String])),dataAlt_Syn_CProduction :: !(DataAlt),decls_Syn_CProduction :: !(Decls),semNames_Syn_CProduction :: !(([String]))}-wrap_CProduction :: T_CProduction ->- Inh_CProduction ->- Syn_CProduction -wrap_CProduction (T_CProduction sem ) (Inh_CProduction _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers ) =- (let ( _lhsOcataAlt,_lhsOcomments,_lhsOdataAlt,_lhsOdecls,_lhsOsemNames) = sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers - in (Syn_CProduction _lhsOcataAlt _lhsOcomments _lhsOdataAlt _lhsOdecls _lhsOsemNames ))-sem_CProduction_CProduction :: ConstructorIdent ->- T_CVisits ->- ([(Identifier,Type,ChildKind)]) ->- ([Identifier]) ->- T_CProduction -sem_CProduction_CProduction con_ (T_CVisits visits_ ) children_ terminals_ =- (T_CProduction (\ _lhsIallNts- _lhsIallPragmas- _lhsIaroundMap- _lhsIcontextMap- _lhsIinh- _lhsImergeMap- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_costcentre- _lhsIo_data- _lhsIo_linePragmas- _lhsIo_monadic- _lhsIo_newtypes- _lhsIo_pretty- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_splitsems- _lhsIo_strictwrap- _lhsIo_traces- _lhsIo_unbox- _lhsIoptions- _lhsIparamMap- _lhsIprefix- _lhsIquantMap- _lhsIsyn- _lhsIunfoldSemDom- _lhsIwith_sig- _lhsIwrappers ->- (let _visitsOcon :: ConstructorIdent- _visitsOterminals :: ([Identifier])- _visitsOvisitedSet :: (Set Identifier)- _visitsOnr :: Int- _visitsOchildren :: ([(Identifier,Type, ChildKind)])- _visitsOinstVisitNrs :: (Map Identifier Int)- _lhsOcomments :: ([String])- _lhsOdataAlt :: DataAlt- _lhsOcataAlt :: Decl- _lhsOdecls :: Decls- _lhsOsemNames :: ([String])- _visitsOallNts :: (Set NontermIdent)- _visitsOallPragmas :: PragmaMap- _visitsOaroundMap :: (Set Identifier)- _visitsOcontextMap :: ContextMap- _visitsOinh :: Attributes- _visitsOmergeMap :: (Map Identifier (Identifier, [Identifier]))- _visitsOnt :: NontermIdent- _visitsOo_case :: Bool- _visitsOo_cata :: Bool- _visitsOo_costcentre :: Bool- _visitsOo_data :: (Maybe Bool)- _visitsOo_linePragmas :: Bool- _visitsOo_monadic :: Bool- _visitsOo_newtypes :: Bool- _visitsOo_pretty :: Bool- _visitsOo_rename :: Bool- _visitsOo_sem :: Bool- _visitsOo_sig :: Bool- _visitsOo_splitsems :: Bool- _visitsOo_strictwrap :: Bool- _visitsOo_traces :: Bool- _visitsOo_unbox :: Bool- _visitsOoptions :: Options- _visitsOparamInstMap :: (Map Identifier (NontermIdent, [String]))- _visitsOparamMap :: ParamMap- _visitsOprefix :: String- _visitsOquantMap :: QuantMap- _visitsOsyn :: Attributes- _visitsOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _visitsOwith_sig :: Bool- _visitsOwrappers :: (Set NontermIdent)- _visitsIcomments :: ([String])- _visitsIdecls :: Decls- _visitsIgatherInstVisitNrs :: (Map Identifier Int)- _visitsIintra :: Exprs- _visitsIintraVars :: (Set String)- _visitsIisNil :: Bool- _visitsIsemNames :: ([String])- _visitsIvisitedSet :: (Set Identifier)- -- "src-ag/GenerateCode.ag"(line 92, column 19)- _visitsOcon =- ({-# LINE 92 "src-ag/GenerateCode.ag" #-}- con_- {-# LINE 2359 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 93, column 20)- _visitsOterminals =- ({-# LINE 93 "src-ag/GenerateCode.ag" #-}- terminals_- {-# LINE 2365 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 105, column 7)- _paramInstMap =- ({-# LINE 105 "src-ag/GenerateCode.ag" #-}- Map.fromList [(nm, (extractNonterminal tp, tps)) | (nm,tp,_) <- children_, let tps = map cleanupArg $ nontermArgs tp, not (null tps) ]- {-# LINE 2371 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 146, column 32)- _visitsOvisitedSet =- ({-# LINE 146 "src-ag/GenerateCode.ag" #-}- Set.empty- {-# LINE 2377 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 280, column 18)- _visitsOnr =- ({-# LINE 280 "src-ag/GenerateCode.ag" #-}- 0- {-# LINE 2383 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 412, column 18)- _visitsOchildren =- ({-# LINE 412 "src-ag/GenerateCode.ag" #-}- children_- {-# LINE 2389 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 564, column 7)- _visitsOinstVisitNrs =- ({-# LINE 564 "src-ag/GenerateCode.ag" #-}- _visitsIgatherInstVisitNrs- {-# LINE 2395 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 584, column 34)- _aroundMap =- ({-# LINE 584 "src-ag/GenerateCode.ag" #-}- Map.findWithDefault Set.empty con_ _lhsIaroundMap- {-# LINE 2401 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 600, column 34)- _mergeMap =- ({-# LINE 600 "src-ag/GenerateCode.ag" #-}- Map.findWithDefault Map.empty con_ _lhsImergeMap- {-# LINE 2407 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 879, column 18)- _firstOrderChildren =- ({-# LINE 879 "src-ag/GenerateCode.ag" #-}- [ (nm,fromJust mb,virt) | (nm,tp,virt) <- children_, let mb = isFirstOrder virt tp, isJust mb ]- {-# LINE 2413 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 880, column 18)- _lhsOcomments =- ({-# LINE 880 "src-ag/GenerateCode.ag" #-}- ("alternative " ++ getName con_ ++ ":")- : map ind ( map (\(x,y,_) -> makeLocalComment 14 "child" x (Just y)) _firstOrderChildren- ++ _visitsIcomments- )- {-# LINE 2422 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 1019, column 17)- _params =- ({-# LINE 1019 "src-ag/GenerateCode.ag" #-}- map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap- {-# LINE 2428 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 1020, column 17)- _lhsOdataAlt =- ({-# LINE 1020 "src-ag/GenerateCode.ag" #-}- let conNm = conname _lhsIo_rename _lhsInt con_- mkFields f = map (\(nm,t,_) -> f _lhsInt con_ nm (typeToCodeType (Just _lhsInt) _params $ removeDeforested t)) _firstOrderChildren- in if dataRecords _lhsIoptions- then Record conNm $ mkFields $ toNamedType (strictData _lhsIoptions)- else DataAlt conNm $ mkFields $ \_ _ _ t -> t- {-# LINE 2438 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 1131, column 17)- _lhsOcataAlt =- ({-# LINE 1131 "src-ag/GenerateCode.ag" #-}- let lhs = Fun (cataname _lhsIprefix _lhsInt) [lhs_pat]- lhs_pat = App (conname _lhsIo_rename _lhsInt con_)- (map (\(n,_,_) -> SimpleExpr $ locname $ n) _firstOrderChildren )- rhs = App (semname _lhsIprefix _lhsInt con_)- (map argument _firstOrderChildren )- argument (nm,NT tp _ _,_) = App (cataname _lhsIprefix tp)- [SimpleExpr (locname nm)]- argument (nm, _,_) = SimpleExpr (locname nm)- in Decl lhs rhs Set.empty Set.empty- {-# LINE 2452 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 919, column 44)- _lhsOdecls =- ({-# LINE 919 "src-ag/GenerateCode.ag" #-}- _visitsIdecls- {-# LINE 2458 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 1146, column 61)- _lhsOsemNames =- ({-# LINE 1146 "src-ag/GenerateCode.ag" #-}- _visitsIsemNames- {-# LINE 2464 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOallNts =- ({-# LINE 132 "src-ag/GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 2470 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOallPragmas =- ({-# LINE 73 "src-ag/GenerateCode.ag" #-}- _lhsIallPragmas- {-# LINE 2476 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (from local)- _visitsOaroundMap =- ({-# LINE 580 "src-ag/GenerateCode.ag" #-}- _aroundMap- {-# LINE 2482 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOcontextMap =- ({-# LINE 115 "src-ag/GenerateCode.ag" #-}- _lhsIcontextMap- {-# LINE 2488 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOinh =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIinh- {-# LINE 2494 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (from local)- _visitsOmergeMap =- ({-# LINE 596 "src-ag/GenerateCode.ag" #-}- _mergeMap- {-# LINE 2500 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOnt =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsInt- {-# LINE 2506 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOo_case =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 2512 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOo_cata =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 2518 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOo_costcentre =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 2524 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOo_data =- ({-# LINE 48 "src-ag/GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 2530 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOo_linePragmas =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 2536 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOo_monadic =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 2542 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOo_newtypes =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 2548 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOo_pretty =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 2554 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOo_rename =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 2560 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOo_sem =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 2566 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOo_sig =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 2572 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOo_splitsems =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 2578 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOo_strictwrap =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 2584 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOo_traces =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 2590 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOo_unbox =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 2596 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOoptions =- ({-# LINE 50 "src-ag/GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 2602 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (from local)- _visitsOparamInstMap =- ({-# LINE 101 "src-ag/GenerateCode.ag" #-}- _paramInstMap- {-# LINE 2608 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOparamMap =- ({-# LINE 95 "src-ag/GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 2614 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOprefix =- ({-# LINE 49 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 2620 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOquantMap =- ({-# LINE 115 "src-ag/GenerateCode.ag" #-}- _lhsIquantMap- {-# LINE 2626 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOsyn =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 2632 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOunfoldSemDom =- ({-# LINE 750 "src-ag/GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 2638 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOwith_sig =- ({-# LINE 851 "src-ag/GenerateCode.ag" #-}- _lhsIwith_sig- {-# LINE 2644 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _visitsOwrappers =- ({-# LINE 987 "src-ag/GenerateCode.ag" #-}- _lhsIwrappers- {-# LINE 2650 "src-ag/GenerateCode.hs" #-}- )- ( _visitsIcomments,_visitsIdecls,_visitsIgatherInstVisitNrs,_visitsIintra,_visitsIintraVars,_visitsIisNil,_visitsIsemNames,_visitsIvisitedSet) =- visits_ _visitsOallNts _visitsOallPragmas _visitsOaroundMap _visitsOchildren _visitsOcon _visitsOcontextMap _visitsOinh _visitsOinstVisitNrs _visitsOmergeMap _visitsOnr _visitsOnt _visitsOo_case _visitsOo_cata _visitsOo_costcentre _visitsOo_data _visitsOo_linePragmas _visitsOo_monadic _visitsOo_newtypes _visitsOo_pretty _visitsOo_rename _visitsOo_sem _visitsOo_sig _visitsOo_splitsems _visitsOo_strictwrap _visitsOo_traces _visitsOo_unbox _visitsOoptions _visitsOparamInstMap _visitsOparamMap _visitsOprefix _visitsOquantMap _visitsOsyn _visitsOterminals _visitsOunfoldSemDom _visitsOvisitedSet _visitsOwith_sig _visitsOwrappers - in ( _lhsOcataAlt,_lhsOcomments,_lhsOdataAlt,_lhsOdecls,_lhsOsemNames))) )--- CProductions -------------------------------------------------{-- visit 0:- inherited attributes:- allNts : Set NontermIdent- allPragmas : PragmaMap- aroundMap : Map ConstructorIdent (Set Identifier)- contextMap : ContextMap- inh : Attributes- mergeMap : Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramMap : ParamMap- prefix : String- quantMap : QuantMap- syn : Attributes- unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type- with_sig : Bool- wrappers : Set NontermIdent- synthesized attributes:- cataAlts : Decls- comments : [String]- dataAlts : DataAlts- decls : Decls- semNames : [String]- alternatives:- alternative Cons:- child hd : CProduction - child tl : CProductions - alternative Nil:--}--- cata-sem_CProductions :: CProductions ->- T_CProductions -sem_CProductions list =- (Prelude.foldr sem_CProductions_Cons sem_CProductions_Nil (Prelude.map sem_CProduction list) )--- semantic domain-newtype T_CProductions = T_CProductions ((Set NontermIdent) ->- PragmaMap ->- (Map ConstructorIdent (Set Identifier)) ->- ContextMap ->- Attributes ->- (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) ->- NontermIdent ->- Bool ->- Bool ->- Bool ->- (Maybe Bool) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Options ->- ParamMap ->- String ->- QuantMap ->- Attributes ->- (NontermIdent -> Int -> [String] -> Code.Type) ->- Bool ->- (Set NontermIdent) ->- ( Decls,([String]),DataAlts,Decls,([String])))-data Inh_CProductions = Inh_CProductions {allNts_Inh_CProductions :: !((Set NontermIdent)),allPragmas_Inh_CProductions :: !(PragmaMap),aroundMap_Inh_CProductions :: !((Map ConstructorIdent (Set Identifier))),contextMap_Inh_CProductions :: !(ContextMap),inh_Inh_CProductions :: !(Attributes),mergeMap_Inh_CProductions :: !((Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))),nt_Inh_CProductions :: !(NontermIdent),o_case_Inh_CProductions :: !(Bool),o_cata_Inh_CProductions :: !(Bool),o_costcentre_Inh_CProductions :: !(Bool),o_data_Inh_CProductions :: !((Maybe Bool)),o_linePragmas_Inh_CProductions :: !(Bool),o_monadic_Inh_CProductions :: !(Bool),o_newtypes_Inh_CProductions :: !(Bool),o_pretty_Inh_CProductions :: !(Bool),o_rename_Inh_CProductions :: !(Bool),o_sem_Inh_CProductions :: !(Bool),o_sig_Inh_CProductions :: !(Bool),o_splitsems_Inh_CProductions :: !(Bool),o_strictwrap_Inh_CProductions :: !(Bool),o_traces_Inh_CProductions :: !(Bool),o_unbox_Inh_CProductions :: !(Bool),options_Inh_CProductions :: !(Options),paramMap_Inh_CProductions :: !(ParamMap),prefix_Inh_CProductions :: !(String),quantMap_Inh_CProductions :: !(QuantMap),syn_Inh_CProductions :: !(Attributes),unfoldSemDom_Inh_CProductions :: !((NontermIdent -> Int -> [String] -> Code.Type)),with_sig_Inh_CProductions :: !(Bool),wrappers_Inh_CProductions :: !((Set NontermIdent))}-data Syn_CProductions = Syn_CProductions {cataAlts_Syn_CProductions :: !(Decls),comments_Syn_CProductions :: !(([String])),dataAlts_Syn_CProductions :: !(DataAlts),decls_Syn_CProductions :: !(Decls),semNames_Syn_CProductions :: !(([String]))}-wrap_CProductions :: T_CProductions ->- Inh_CProductions ->- Syn_CProductions -wrap_CProductions (T_CProductions sem ) (Inh_CProductions _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers ) =- (let ( _lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOsemNames) = sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers - in (Syn_CProductions _lhsOcataAlts _lhsOcomments _lhsOdataAlts _lhsOdecls _lhsOsemNames ))-sem_CProductions_Cons :: T_CProduction ->- T_CProductions ->- T_CProductions -sem_CProductions_Cons (T_CProduction hd_ ) (T_CProductions tl_ ) =- (T_CProductions (\ _lhsIallNts- _lhsIallPragmas- _lhsIaroundMap- _lhsIcontextMap- _lhsIinh- _lhsImergeMap- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_costcentre- _lhsIo_data- _lhsIo_linePragmas- _lhsIo_monadic- _lhsIo_newtypes- _lhsIo_pretty- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_splitsems- _lhsIo_strictwrap- _lhsIo_traces- _lhsIo_unbox- _lhsIoptions- _lhsIparamMap- _lhsIprefix- _lhsIquantMap- _lhsIsyn- _lhsIunfoldSemDom- _lhsIwith_sig- _lhsIwrappers ->- (let _lhsOdataAlts :: DataAlts- _lhsOcataAlts :: Decls- _lhsOcomments :: ([String])- _lhsOdecls :: Decls- _lhsOsemNames :: ([String])- _hdOallNts :: (Set NontermIdent)- _hdOallPragmas :: PragmaMap- _hdOaroundMap :: (Map ConstructorIdent (Set Identifier))- _hdOcontextMap :: ContextMap- _hdOinh :: Attributes- _hdOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))- _hdOnt :: NontermIdent- _hdOo_case :: Bool- _hdOo_cata :: Bool- _hdOo_costcentre :: Bool- _hdOo_data :: (Maybe Bool)- _hdOo_linePragmas :: Bool- _hdOo_monadic :: Bool- _hdOo_newtypes :: Bool- _hdOo_pretty :: Bool- _hdOo_rename :: Bool- _hdOo_sem :: Bool- _hdOo_sig :: Bool- _hdOo_splitsems :: Bool- _hdOo_strictwrap :: Bool- _hdOo_traces :: Bool- _hdOo_unbox :: Bool- _hdOoptions :: Options- _hdOparamMap :: ParamMap- _hdOprefix :: String- _hdOquantMap :: QuantMap- _hdOsyn :: Attributes- _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _hdOwith_sig :: Bool- _hdOwrappers :: (Set NontermIdent)- _tlOallNts :: (Set NontermIdent)- _tlOallPragmas :: PragmaMap- _tlOaroundMap :: (Map ConstructorIdent (Set Identifier))- _tlOcontextMap :: ContextMap- _tlOinh :: Attributes- _tlOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))- _tlOnt :: NontermIdent- _tlOo_case :: Bool- _tlOo_cata :: Bool- _tlOo_costcentre :: Bool- _tlOo_data :: (Maybe Bool)- _tlOo_linePragmas :: Bool- _tlOo_monadic :: Bool- _tlOo_newtypes :: Bool- _tlOo_pretty :: Bool- _tlOo_rename :: Bool- _tlOo_sem :: Bool- _tlOo_sig :: Bool- _tlOo_splitsems :: Bool- _tlOo_strictwrap :: Bool- _tlOo_traces :: Bool- _tlOo_unbox :: Bool- _tlOoptions :: Options- _tlOparamMap :: ParamMap- _tlOprefix :: String- _tlOquantMap :: QuantMap- _tlOsyn :: Attributes- _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _tlOwith_sig :: Bool- _tlOwrappers :: (Set NontermIdent)- _hdIcataAlt :: Decl- _hdIcomments :: ([String])- _hdIdataAlt :: DataAlt- _hdIdecls :: Decls- _hdIsemNames :: ([String])- _tlIcataAlts :: Decls- _tlIcomments :: ([String])- _tlIdataAlts :: DataAlts- _tlIdecls :: Decls- _tlIsemNames :: ([String])- -- "src-ag/GenerateCode.ag"(line 1015, column 17)- _lhsOdataAlts =- ({-# LINE 1015 "src-ag/GenerateCode.ag" #-}- _hdIdataAlt : _tlIdataAlts- {-# LINE 2859 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 1127, column 10)- _lhsOcataAlts =- ({-# LINE 1127 "src-ag/GenerateCode.ag" #-}- _hdIcataAlt : _tlIcataAlts- {-# LINE 2865 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)- _lhsOcomments =- ({-# LINE 868 "src-ag/GenerateCode.ag" #-}- _hdIcomments ++ _tlIcomments- {-# LINE 2871 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 919, column 44)- _lhsOdecls =- ({-# LINE 919 "src-ag/GenerateCode.ag" #-}- _hdIdecls ++ _tlIdecls- {-# LINE 2877 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 1146, column 61)- _lhsOsemNames =- ({-# LINE 1146 "src-ag/GenerateCode.ag" #-}- _hdIsemNames ++ _tlIsemNames- {-# LINE 2883 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOallNts =- ({-# LINE 132 "src-ag/GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 2889 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOallPragmas =- ({-# LINE 73 "src-ag/GenerateCode.ag" #-}- _lhsIallPragmas- {-# LINE 2895 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOaroundMap =- ({-# LINE 578 "src-ag/GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 2901 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOcontextMap =- ({-# LINE 115 "src-ag/GenerateCode.ag" #-}- _lhsIcontextMap- {-# LINE 2907 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOinh =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIinh- {-# LINE 2913 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 594 "src-ag/GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 2919 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOnt =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsInt- {-# LINE 2925 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_case =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 2931 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_cata =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 2937 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_costcentre =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 2943 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_data =- ({-# LINE 48 "src-ag/GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 2949 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_linePragmas =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 2955 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_monadic =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 2961 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_newtypes =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 2967 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_pretty =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 2973 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_rename =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 2979 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_sem =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 2985 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_sig =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 2991 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_splitsems =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 2997 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_strictwrap =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 3003 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_traces =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 3009 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_unbox =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 3015 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 50 "src-ag/GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 3021 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOparamMap =- ({-# LINE 95 "src-ag/GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 3027 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOprefix =- ({-# LINE 49 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 3033 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOquantMap =- ({-# LINE 115 "src-ag/GenerateCode.ag" #-}- _lhsIquantMap- {-# LINE 3039 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOsyn =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 3045 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOunfoldSemDom =- ({-# LINE 750 "src-ag/GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 3051 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOwith_sig =- ({-# LINE 851 "src-ag/GenerateCode.ag" #-}- _lhsIwith_sig- {-# LINE 3057 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOwrappers =- ({-# LINE 987 "src-ag/GenerateCode.ag" #-}- _lhsIwrappers- {-# LINE 3063 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOallNts =- ({-# LINE 132 "src-ag/GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 3069 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOallPragmas =- ({-# LINE 73 "src-ag/GenerateCode.ag" #-}- _lhsIallPragmas- {-# LINE 3075 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOaroundMap =- ({-# LINE 578 "src-ag/GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 3081 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOcontextMap =- ({-# LINE 115 "src-ag/GenerateCode.ag" #-}- _lhsIcontextMap- {-# LINE 3087 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOinh =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIinh- {-# LINE 3093 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 594 "src-ag/GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 3099 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOnt =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsInt- {-# LINE 3105 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_case =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 3111 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_cata =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 3117 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_costcentre =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 3123 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_data =- ({-# LINE 48 "src-ag/GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 3129 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_linePragmas =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 3135 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_monadic =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 3141 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_newtypes =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 3147 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_pretty =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 3153 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_rename =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 3159 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_sem =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 3165 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_sig =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 3171 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_splitsems =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 3177 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_strictwrap =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 3183 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_traces =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 3189 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_unbox =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 3195 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 50 "src-ag/GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 3201 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOparamMap =- ({-# LINE 95 "src-ag/GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 3207 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOprefix =- ({-# LINE 49 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 3213 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOquantMap =- ({-# LINE 115 "src-ag/GenerateCode.ag" #-}- _lhsIquantMap- {-# LINE 3219 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOsyn =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 3225 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOunfoldSemDom =- ({-# LINE 750 "src-ag/GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 3231 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOwith_sig =- ({-# LINE 851 "src-ag/GenerateCode.ag" #-}- _lhsIwith_sig- {-# LINE 3237 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOwrappers =- ({-# LINE 987 "src-ag/GenerateCode.ag" #-}- _lhsIwrappers- {-# LINE 3243 "src-ag/GenerateCode.hs" #-}- )- ( _hdIcataAlt,_hdIcomments,_hdIdataAlt,_hdIdecls,_hdIsemNames) =- hd_ _hdOallNts _hdOallPragmas _hdOaroundMap _hdOcontextMap _hdOinh _hdOmergeMap _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamMap _hdOprefix _hdOquantMap _hdOsyn _hdOunfoldSemDom _hdOwith_sig _hdOwrappers - ( _tlIcataAlts,_tlIcomments,_tlIdataAlts,_tlIdecls,_tlIsemNames) =- tl_ _tlOallNts _tlOallPragmas _tlOaroundMap _tlOcontextMap _tlOinh _tlOmergeMap _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamMap _tlOprefix _tlOquantMap _tlOsyn _tlOunfoldSemDom _tlOwith_sig _tlOwrappers - in ( _lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOsemNames))) )-sem_CProductions_Nil :: T_CProductions -sem_CProductions_Nil =- (T_CProductions (\ _lhsIallNts- _lhsIallPragmas- _lhsIaroundMap- _lhsIcontextMap- _lhsIinh- _lhsImergeMap- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_costcentre- _lhsIo_data- _lhsIo_linePragmas- _lhsIo_monadic- _lhsIo_newtypes- _lhsIo_pretty- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_splitsems- _lhsIo_strictwrap- _lhsIo_traces- _lhsIo_unbox- _lhsIoptions- _lhsIparamMap- _lhsIprefix- _lhsIquantMap- _lhsIsyn- _lhsIunfoldSemDom- _lhsIwith_sig- _lhsIwrappers ->- (let _lhsOdataAlts :: DataAlts- _lhsOcataAlts :: Decls- _lhsOcomments :: ([String])- _lhsOdecls :: Decls- _lhsOsemNames :: ([String])- -- "src-ag/GenerateCode.ag"(line 1016, column 17)- _lhsOdataAlts =- ({-# LINE 1016 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 3291 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 1128, column 10)- _lhsOcataAlts =- ({-# LINE 1128 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 3297 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)- _lhsOcomments =- ({-# LINE 868 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 3303 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 919, column 44)- _lhsOdecls =- ({-# LINE 919 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 3309 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 1146, column 61)- _lhsOsemNames =- ({-# LINE 1146 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 3315 "src-ag/GenerateCode.hs" #-}- )- in ( _lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOsemNames))) )--- CRule --------------------------------------------------------{-- visit 0:- inherited attributes:- allNts : Set NontermIdent- aroundMap : Set Identifier- children : [(Identifier,Type,ChildKind)]- con : ConstructorIdent- inh : Attributes- instVisitNrs : Map Identifier Int- mergeMap : Map Identifier (Identifier, [Identifier])- nr : Int- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramInstMap : Map Identifier (NontermIdent, [String])- paramMap : ParamMap- prefix : String- syn : Attributes- terminals : [Identifier]- unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type- what : String- chained attributes:- declsAbove : [Decl]- visitedSet : Set Identifier- synthesized attributes:- allTpsFound : Bool- bldBlocksFun : DeclBlocks -> DeclBlocks- comments : [String]- decls : Decls- definedInsts : [Identifier]- exprs : Exprs- tSigs : [Decl]- tps : [Type]- usedVars : Set String- alternatives:- alternative CChildVisit:- child name : {Identifier}- child nt : {NontermIdent}- child nr : {Int}- child inh : {Attributes}- child syn : {Attributes}- child isLast : {Bool}- visit 0:- local visitedSet : _- local costCentreDescr : _- local addCostCentre : _- local decls : _- local isSuperfluousHigherOrderIntra : _- local names : _- local mkTp : _- local definedTps : _- local nextTp : _- local orgParams : _- local instParams : _- local replParamMap : _- local replace : _- local evalTp : _- alternative CRule:- child name : {Identifier}- child isIn : {Bool}- child hasCode : {Bool}- child nt : {NontermIdent}- child con : {ConstructorIdent}- child field : {Identifier}- child childnt : {Maybe NontermIdent}- child tp : {Maybe Type}- child pattern : Pattern - child rhs : {[String]}- child defines : {Map Int (Identifier,Identifier,Maybe Type)}- child owrt : {Bool}- child origin : {String}- child uses : {Set (Identifier, Identifier)}- child explicit : {Bool}- child mbNamed : {Maybe Identifier}- visit 0:- local instTypes : _- local originComment : _- local instDecls : _- local patDescr : _- local traceDescr : _- local addTrace : _- local costCentreDescr : _- local addCostCentre : _- local addLinePragma : _- local decls : _- local definedInsts : _- local rulename : _- local mkTp : _- local orgParams : _- local evalTp : _- local _tup3 : {([Type],Bool)}--}--- cata-sem_CRule :: CRule ->- T_CRule -sem_CRule (CChildVisit _name _nt _nr _inh _syn _isLast ) =- (sem_CRule_CChildVisit _name _nt _nr _inh _syn _isLast )-sem_CRule (CRule _name _isIn _hasCode _nt _con _field _childnt _tp _pattern _rhs _defines _owrt _origin _uses _explicit _mbNamed ) =- (sem_CRule_CRule _name _isIn _hasCode _nt _con _field _childnt _tp (sem_Pattern _pattern ) _rhs _defines _owrt _origin _uses _explicit _mbNamed )--- semantic domain-newtype T_CRule = T_CRule ((Set NontermIdent) ->- (Set Identifier) ->- ([(Identifier,Type,ChildKind)]) ->- ConstructorIdent ->- ([Decl]) ->- Attributes ->- (Map Identifier Int) ->- (Map Identifier (Identifier, [Identifier])) ->- Int ->- NontermIdent ->- Bool ->- Bool ->- Bool ->- (Maybe Bool) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Options ->- (Map Identifier (NontermIdent, [String])) ->- ParamMap ->- String ->- Attributes ->- ([Identifier]) ->- (NontermIdent -> Int -> [String] -> Code.Type) ->- (Set Identifier) ->- String ->- ( Bool,(DeclBlocks -> DeclBlocks),([String]),Decls,([Decl]),([Identifier]),Exprs,([Decl]),([Type]),(Set String),(Set Identifier)))-data Inh_CRule = Inh_CRule {allNts_Inh_CRule :: !((Set NontermIdent)),aroundMap_Inh_CRule :: !((Set Identifier)),children_Inh_CRule :: !(([(Identifier,Type,ChildKind)])),con_Inh_CRule :: !(ConstructorIdent),declsAbove_Inh_CRule :: !(([Decl])),inh_Inh_CRule :: !(Attributes),instVisitNrs_Inh_CRule :: !((Map Identifier Int)),mergeMap_Inh_CRule :: !((Map Identifier (Identifier, [Identifier]))),nr_Inh_CRule :: !(Int),nt_Inh_CRule :: !(NontermIdent),o_case_Inh_CRule :: !(Bool),o_cata_Inh_CRule :: !(Bool),o_costcentre_Inh_CRule :: !(Bool),o_data_Inh_CRule :: !((Maybe Bool)),o_linePragmas_Inh_CRule :: !(Bool),o_monadic_Inh_CRule :: !(Bool),o_newtypes_Inh_CRule :: !(Bool),o_pretty_Inh_CRule :: !(Bool),o_rename_Inh_CRule :: !(Bool),o_sem_Inh_CRule :: !(Bool),o_sig_Inh_CRule :: !(Bool),o_splitsems_Inh_CRule :: !(Bool),o_strictwrap_Inh_CRule :: !(Bool),o_traces_Inh_CRule :: !(Bool),o_unbox_Inh_CRule :: !(Bool),options_Inh_CRule :: !(Options),paramInstMap_Inh_CRule :: !((Map Identifier (NontermIdent, [String]))),paramMap_Inh_CRule :: !(ParamMap),prefix_Inh_CRule :: !(String),syn_Inh_CRule :: !(Attributes),terminals_Inh_CRule :: !(([Identifier])),unfoldSemDom_Inh_CRule :: !((NontermIdent -> Int -> [String] -> Code.Type)),visitedSet_Inh_CRule :: !((Set Identifier)),what_Inh_CRule :: !(String)}-data Syn_CRule = Syn_CRule {allTpsFound_Syn_CRule :: !(Bool),bldBlocksFun_Syn_CRule :: !((DeclBlocks -> DeclBlocks)),comments_Syn_CRule :: !(([String])),decls_Syn_CRule :: !(Decls),declsAbove_Syn_CRule :: !(([Decl])),definedInsts_Syn_CRule :: !(([Identifier])),exprs_Syn_CRule :: !(Exprs),tSigs_Syn_CRule :: !(([Decl])),tps_Syn_CRule :: !(([Type])),usedVars_Syn_CRule :: !((Set String)),visitedSet_Syn_CRule :: !((Set Identifier))}-wrap_CRule :: T_CRule ->- Inh_CRule ->- Syn_CRule -wrap_CRule (T_CRule sem ) (Inh_CRule _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat ) =- (let ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet) = sem _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat - in (Syn_CRule _lhsOallTpsFound _lhsObldBlocksFun _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet ))-sem_CRule_CChildVisit :: Identifier ->- NontermIdent ->- Int ->- Attributes ->- Attributes ->- Bool ->- T_CRule -sem_CRule_CChildVisit name_ nt_ nr_ inh_ syn_ isLast_ =- (T_CRule (\ _lhsIallNts- _lhsIaroundMap- _lhsIchildren- _lhsIcon- _lhsIdeclsAbove- _lhsIinh- _lhsIinstVisitNrs- _lhsImergeMap- _lhsInr- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_costcentre- _lhsIo_data- _lhsIo_linePragmas- _lhsIo_monadic- _lhsIo_newtypes- _lhsIo_pretty- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_splitsems- _lhsIo_strictwrap- _lhsIo_traces- _lhsIo_unbox- _lhsIoptions- _lhsIparamInstMap- _lhsIparamMap- _lhsIprefix- _lhsIsyn- _lhsIterminals- _lhsIunfoldSemDom- _lhsIvisitedSet- _lhsIwhat ->- (let _lhsOexprs :: Exprs- _lhsOusedVars :: (Set String)- _lhsOtSigs :: ([Decl])- _lhsOtps :: ([Type])- _lhsOdeclsAbove :: ([Decl])- _lhsObldBlocksFun :: (DeclBlocks -> DeclBlocks)- _lhsOallTpsFound :: Bool- _lhsOcomments :: ([String])- _lhsOdecls :: Decls- _lhsOdefinedInsts :: ([Identifier])- _lhsOvisitedSet :: (Set Identifier)- -- "src-ag/GenerateCode.ag"(line 147, column 26)- _visitedSet =- ({-# LINE 147 "src-ag/GenerateCode.ag" #-}- Set.insert name_ _lhsIvisitedSet- {-# LINE 3533 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 203, column 18)- _costCentreDescr =- ({-# LINE 203 "src-ag/GenerateCode.ag" #-}- show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show name_ ++ ":" ++ show nt_ ++ ":" ++ show nr_- {-# LINE 3539 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 204, column 18)- _addCostCentre =- ({-# LINE 204 "src-ag/GenerateCode.ag" #-}- \v -> if _lhsIo_costcentre- then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v- else v- {-# LINE 3547 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 207, column 18)- _decls =- ({-# LINE 207 "src-ag/GenerateCode.ag" #-}- let lhsVars = map (attrname True name_) (Map.keys syn_)- ++ if isLast_ then [] else [unwrap ++ funname name_ (nr_+1)]- rhsVars = map (attrname False name_) (Map.keys inh_)- unwrap = if _lhsIo_newtypes then typeName nt_ (nr_ + 1) ++ " " else ""- tuple | isMerging = TupleLhs [locname name_ ++ "_comp"]- | otherwise = mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars- rhs = _addCostCentre $ Code.InvokeExpr (typeName nt_ nr_) (SimpleExpr fun) (map SimpleExpr rhsVars)- isVirtual _ [] = False- isVirtual nm ((n,t,kind) : r)- | nm == n = case kind of- ChildAttr -> True- _ -> False- | otherwise = isVirtual nm r- isMerged = name_ `Map.member` _lhsImergeMap- isMerging = name_ `elem` concatMap (\(_,cs) -> cs) (Map.elems _lhsImergeMap)- merges = [ (c,cs) | (c,(_,cs)) <- Map.assocs _lhsImergeMap, all (`Set.member` _visitedSet ) cs, name_ `elem` (c:cs) ]- baseNm = if nr_ == 0 && isVirtual name_ _lhsIchildren- then Ident (getName name_ ++ "_inst") (getPos name_)- else name_- fun | nr_ == 0 && Set.member name_ _lhsIaroundMap- = locname name_ ++ "_around " ++ funname baseNm 0- | otherwise = funname baseNm nr_- outDecls | isMerged = []- | otherwise =- if isMerging- then [mkDecl _lhsIo_monadic tuple rhs Set.empty Set.empty]- else [Resume _lhsIo_monadic (typeName nt_ nr_) tuple rhs]- outMerged | null merges || nr_ /= 0 = []- | otherwise = let (c,cs) = head merges- tuple' = mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars'- lhsVars' = map (attrname True c) (Map.keys syn_)- ++ if isLast_ then [] else [unwrap ++ funname c (nr_+1)]- rhsVars = [ locname c ++ "_comp" | c <- cs ]- fun = locname c ++ "_merge"- rhs' = App fun (map SimpleExpr rhsVars)- in [Resume _lhsIo_monadic (typeName nt_ nr_) tuple' rhs']- in- (outDecls ++ outMerged)- {-# LINE 3590 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 327, column 7)- _isSuperfluousHigherOrderIntra =- ({-# LINE 327 "src-ag/GenerateCode.ag" #-}- _lhsInr <= Map.findWithDefault (-1) name_ _lhsIinstVisitNrs- {-# LINE 3596 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 341, column 8)- _names =- ({-# LINE 341 "src-ag/GenerateCode.ag" #-}- if _isSuperfluousHigherOrderIntra- then []- else [funname name_ (nr_+1)]- {-# LINE 3604 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 345, column 8)- _lhsOexprs =- ({-# LINE 345 "src-ag/GenerateCode.ag" #-}- let wrap = if _lhsIo_newtypes then \x -> App (typeName nt_ (nr_ + 1)) [x] else id- addType expr | null _instParams = expr- | otherwise = TypedExpr expr (_lhsIunfoldSemDom nt_ (nr_+1) _instParams )- in map (wrap . addType . SimpleExpr) _names- {-# LINE 3613 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 357, column 7)- _lhsOusedVars =- ({-# LINE 357 "src-ag/GenerateCode.ag" #-}- Set.fromList _names- {-# LINE 3619 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 393, column 19)- _mkTp =- ({-# LINE 393 "src-ag/GenerateCode.ag" #-}- _evalTp . typeToCodeType (Just nt_) _orgParams . removeDeforested- {-# LINE 3625 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 394, column 19)- _definedTps =- ({-# LINE 394 "src-ag/GenerateCode.ag" #-}- [ TSig (attrname True name_ a) (_mkTp tp) | (a,tp) <- Map.toList syn_ ]- {-# LINE 3631 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 395, column 19)- _nextTp =- ({-# LINE 395 "src-ag/GenerateCode.ag" #-}- typeName nt_ (nr_+1)- {-# LINE 3637 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 396, column 19)- _lhsOtSigs =- ({-# LINE 396 "src-ag/GenerateCode.ag" #-}- (if isLast_ then id else (TSig (funname name_ (nr_+1)) (TypeApp (SimpleType _nextTp) (map SimpleType _instParams )) :)) _definedTps- {-# LINE 3643 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 398, column 19)- _orgParams =- ({-# LINE 398 "src-ag/GenerateCode.ag" #-}- map getName $ Map.findWithDefault [] nt_ _lhsIparamMap- {-# LINE 3649 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 399, column 19)- _instParams =- ({-# LINE 399 "src-ag/GenerateCode.ag" #-}- snd $ Map.findWithDefault (nt_,[]) name_ _lhsIparamInstMap- {-# LINE 3655 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 400, column 19)- _replParamMap =- ({-# LINE 400 "src-ag/GenerateCode.ag" #-}- Map.fromList (zip _orgParams _instParams )- {-# LINE 3661 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 401, column 19)- _replace =- ({-# LINE 401 "src-ag/GenerateCode.ag" #-}- \k -> Map.findWithDefault k k _replParamMap- {-# LINE 3667 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 402, column 19)- _evalTp =- ({-# LINE 402 "src-ag/GenerateCode.ag" #-}- if null _orgParams then id else evalType _replace- {-# LINE 3673 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 419, column 19)- _lhsOtps =- ({-# LINE 419 "src-ag/GenerateCode.ag" #-}- if _isSuperfluousHigherOrderIntra- then []- else [NT (ntOfVisit nt_ (nr_+1)) _instParams False]- {-# LINE 3681 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 618, column 7)- _lhsOdeclsAbove =- ({-# LINE 618 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 3687 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 631, column 7)- _lhsObldBlocksFun =- ({-# LINE 631 "src-ag/GenerateCode.ag" #-}- DeclBlock _lhsIdeclsAbove (head _decls )- {-# LINE 3693 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 416, column 39)- _lhsOallTpsFound =- ({-# LINE 416 "src-ag/GenerateCode.ag" #-}- True- {-# LINE 3699 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)- _lhsOcomments =- ({-# LINE 868 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 3705 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 155, column 34)- _lhsOdecls =- ({-# LINE 155 "src-ag/GenerateCode.ag" #-}- _decls- {-# LINE 3711 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)- _lhsOdefinedInsts =- ({-# LINE 261 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 3717 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (from local)- _lhsOvisitedSet =- ({-# LINE 145 "src-ag/GenerateCode.ag" #-}- _visitedSet- {-# LINE 3723 "src-ag/GenerateCode.hs" #-}- )- in ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet))) )-sem_CRule_CRule :: Identifier ->- Bool ->- Bool ->- NontermIdent ->- ConstructorIdent ->- Identifier ->- (Maybe NontermIdent) ->- (Maybe Type) ->- T_Pattern ->- ([String]) ->- (Map Int (Identifier,Identifier,Maybe Type)) ->- Bool ->- String ->- (Set (Identifier, Identifier)) ->- Bool ->- (Maybe Identifier) ->- T_CRule -sem_CRule_CRule name_ isIn_ hasCode_ nt_ con_ field_ childnt_ tp_ (T_Pattern pattern_ ) rhs_ defines_ owrt_ origin_ uses_ explicit_ mbNamed_ =- (T_CRule (\ _lhsIallNts- _lhsIaroundMap- _lhsIchildren- _lhsIcon- _lhsIdeclsAbove- _lhsIinh- _lhsIinstVisitNrs- _lhsImergeMap- _lhsInr- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_costcentre- _lhsIo_data- _lhsIo_linePragmas- _lhsIo_monadic- _lhsIo_newtypes- _lhsIo_pretty- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_splitsems- _lhsIo_strictwrap- _lhsIo_traces- _lhsIo_unbox- _lhsIoptions- _lhsIparamInstMap- _lhsIparamMap- _lhsIprefix- _lhsIsyn- _lhsIterminals- _lhsIunfoldSemDom- _lhsIvisitedSet- _lhsIwhat ->- (let _lhsOexprs :: Exprs- _lhsOusedVars :: (Set String)- _lhsOtSigs :: ([Decl])- __tup3 :: (([Type],Bool))- _lhsOtps :: ([Type])- _lhsOallTpsFound :: Bool- _lhsOdeclsAbove :: ([Decl])- _lhsObldBlocksFun :: (DeclBlocks -> DeclBlocks)- _lhsOcomments :: ([String])- _lhsOdecls :: Decls- _lhsOdefinedInsts :: ([Identifier])- _lhsOvisitedSet :: (Set Identifier)- _patternIcopy :: Pattern - _patternIdefinedInsts :: ([Identifier])- _patternIpatternAttributes :: ([(Identifier, Identifier)])- -- "src-ag/GenerateCode.ag"(line 157, column 12)- _instTypes =- ({-# LINE 157 "src-ag/GenerateCode.ag" #-}- [ (n, (t, mb, for)) | (n, NT t _ for, mb) <- _lhsIchildren ]- {-# LINE 3797 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 158, column 12)- _originComment =- ({-# LINE 158 "src-ag/GenerateCode.ag" #-}- if _lhsIo_pretty- then (Comment origin_:)- else id- {-# LINE 3805 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 161, column 12)- _instDecls =- ({-# LINE 161 "src-ag/GenerateCode.ag" #-}- [ mkDecl _lhsIo_monadic (Pattern3 (Alias _INST' inst (Underscore (getPos inst))))- ( let (nm,mb,defor) = fromJust $ inst `lookup` _instTypes- in unwrapSem _lhsIo_newtypes nm- $ case mb of- ChildReplace tp' -> App instLocFieldName [SimpleExpr $ fieldname inst]- _ ->- if defor- then SimpleExpr instLocFieldName- else App (cataname _lhsIprefix nm)- [SimpleExpr instLocFieldName]- )- (Set.singleton instSemFieldName)- (Set.singleton instLocFieldName)- | inst <- _definedInsts- , let instLocFieldName = attrname True _INST inst- instSemFieldName = attrname False _INST' inst- ]- {-# LINE 3827 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 178, column 12)- _patDescr =- ({-# LINE 178 "src-ag/GenerateCode.ag" #-}- if isIn_- then "_"- else concat $ intersperse "," (map (\(f,a) -> show f ++ "." ++ show a) _patternIpatternAttributes)- {-# LINE 3835 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 181, column 12)- _traceDescr =- ({-# LINE 181 "src-ag/GenerateCode.ag" #-}- (maybe "" (\nm -> show nm ++ ":") mbNamed_) ++ show nt_ ++ " :: " ++ show con_ ++ " :: " ++ _patDescr- {-# LINE 3841 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 183, column 12)- _addTrace =- ({-# LINE 183 "src-ag/GenerateCode.ag" #-}- \v -> if _lhsIo_traces- then Trace _traceDescr v- else v- {-# LINE 3849 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 186, column 12)- _costCentreDescr =- ({-# LINE 186 "src-ag/GenerateCode.ag" #-}- show nt_ ++ ":" ++ show con_ ++ ":" ++ _patDescr- {-# LINE 3855 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 187, column 12)- _addCostCentre =- ({-# LINE 187 "src-ag/GenerateCode.ag" #-}- \v -> if _lhsIo_costcentre- then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v- else v- {-# LINE 3863 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 190, column 12)- _addLinePragma =- ({-# LINE 190 "src-ag/GenerateCode.ag" #-}- \v -> let p = getPos name_- hasPos = line p > 0 && column p >= 0 && not (null (file p))- in if _lhsIo_linePragmas && hasPos- then PragmaExpr True True ("LINE " ++ show (line p) ++ " " ++ show (file p))- $ LineExpr- $ v- else v- {-# LINE 3875 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 197, column 12)- _decls =- ({-# LINE 197 "src-ag/GenerateCode.ag" #-}- if hasCode_- then _originComment ( mkDecl (_lhsIo_monadic && explicit_) (Pattern3 _patternIcopy) (_addTrace $ _addCostCentre $ _addLinePragma $ (TextExpr rhs_))- (Set.fromList [attrname False fld nm | (fld,nm,_) <- Map.elems defines_])- (Set.fromList [attrname True fld nm | (fld,nm) <- Set.toList uses_])- : _instDecls )- else _instDecls- {-# LINE 3886 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 266, column 12)- _definedInsts =- ({-# LINE 266 "src-ag/GenerateCode.ag" #-}- if isIn_ then [] else _patternIdefinedInsts- {-# LINE 3892 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 336, column 12)- _rulename =- ({-# LINE 336 "src-ag/GenerateCode.ag" #-}- if field_ == _LOC && name_ `elem` _lhsIterminals- then funname name_ 0- else attrname isIn_ field_ name_- {-# LINE 3900 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 339, column 12)- _lhsOexprs =- ({-# LINE 339 "src-ag/GenerateCode.ag" #-}- [SimpleExpr _rulename ]- {-# LINE 3906 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 355, column 7)- _lhsOusedVars =- ({-# LINE 355 "src-ag/GenerateCode.ag" #-}- Set.singleton _rulename- {-# LINE 3912 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 365, column 19)- _mkTp =- ({-# LINE 365 "src-ag/GenerateCode.ag" #-}- typeToCodeType (Just _lhsInt) _orgParams- {-# LINE 3918 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 366, column 19)- _lhsOtSigs =- ({-# LINE 366 "src-ag/GenerateCode.ag" #-}- [ TSig (attrname False field attr) tp'- | (field,attr,tp) <- Map.elems defines_, isJust tp- , let tp1 = _evalTp field $ _mkTp (fromJust tp)- tp' = case findOrigType attr _lhsIchildren of- Just tp' -> let tp2 = _evalTp field $ _mkTp tp'- in Arr tp2 tp1- Nothing -> tp1- findOrigType nm [] = Nothing- findOrigType nm ((n,_,kind) : r)- | nm == n = case kind of- ChildReplace orig -> Just orig- _ -> Nothing- | otherwise = findOrigType nm r- ]- {-# LINE 3937 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 381, column 19)- _orgParams =- ({-# LINE 381 "src-ag/GenerateCode.ag" #-}- map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap- {-# LINE 3943 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 382, column 19)- _evalTp =- ({-# LINE 382 "src-ag/GenerateCode.ag" #-}- \field tp -> let orgFldParams = map getName $ Map.findWithDefault [] childNt _lhsIparamMap- (childNt,instParams) = Map.findWithDefault (_lhsInt,[]) field _lhsIparamInstMap- replMap = Map.fromList (zip orgFldParams instParams)- replace k = Map.findWithDefault ('@':k) k replMap- in if null instParams- then if null _orgParams- then tp- else idEvalType tp- else evalType replace tp- {-# LINE 3957 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 418, column 23)- __tup3 =- ({-# LINE 418 "src-ag/GenerateCode.ag" #-}- maybe ([],False) (\tp -> ([tp],True)) tp_- {-# LINE 3963 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 418, column 23)- (_lhsOtps,_) =- ({-# LINE 418 "src-ag/GenerateCode.ag" #-}- __tup3- {-# LINE 3969 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 418, column 23)- (_,_lhsOallTpsFound) =- ({-# LINE 418 "src-ag/GenerateCode.ag" #-}- __tup3- {-# LINE 3975 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 616, column 7)- _lhsOdeclsAbove =- ({-# LINE 616 "src-ag/GenerateCode.ag" #-}- _lhsIdeclsAbove ++ _decls- {-# LINE 3981 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 629, column 7)- _lhsObldBlocksFun =- ({-# LINE 629 "src-ag/GenerateCode.ag" #-}- id- {-# LINE 3987 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 903, column 18)- _lhsOcomments =- ({-# LINE 903 "src-ag/GenerateCode.ag" #-}- [ makeLocalComment 11 _lhsIwhat name tp | (field,name,tp) <- Map.elems defines_, field == _LOC ]- ++ [ makeLocalComment 11 "inst " name tp | (field,name,tp) <- Map.elems defines_, field == _INST ]- {-# LINE 3994 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 155, column 34)- _lhsOdecls =- ({-# LINE 155 "src-ag/GenerateCode.ag" #-}- _decls- {-# LINE 4000 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)- _lhsOdefinedInsts =- ({-# LINE 261 "src-ag/GenerateCode.ag" #-}- _definedInsts- {-# LINE 4006 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (chain)- _lhsOvisitedSet =- ({-# LINE 145 "src-ag/GenerateCode.ag" #-}- _lhsIvisitedSet- {-# LINE 4012 "src-ag/GenerateCode.hs" #-}- )- ( _patternIcopy,_patternIdefinedInsts,_patternIpatternAttributes) =- pattern_ - in ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet))) )--- CSegment -----------------------------------------------------{-- visit 0:- inherited attributes:- inh : Attributes- isLast : Bool- nr : Int- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramMap : ParamMap- prefix : String- syn : Attributes- synthesized attributes:- comments : [String]- semDom : [Decl]- semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)- wrapDecls : Decls- alternatives:- alternative CSegment:- child inh : {Attributes}- child syn : {Attributes}- visit 0:- local altSemForm : _- local tp : _- local inhTps : _- local inhTup : _- local synTps : _- local curTypeName : _- local nextTypeName : _- local indexName : _- local dataIndex : _- local indexExpr : _- local indexStr : _- local inhInstance : _- local synInstance : _- local continuation : _- local params : _--}--- cata-sem_CSegment :: CSegment ->- T_CSegment -sem_CSegment (CSegment _inh _syn ) =- (sem_CSegment_CSegment _inh _syn )--- semantic domain-newtype T_CSegment = T_CSegment (Attributes ->- Bool ->- Int ->- NontermIdent ->- Bool ->- Bool ->- Bool ->- (Maybe Bool) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Options ->- ParamMap ->- String ->- Attributes ->- ( ([String]),([Decl]),(Map (NontermIdent, Int) ([String], Code.Type)),Decls))-data Inh_CSegment = Inh_CSegment {inh_Inh_CSegment :: !(Attributes),isLast_Inh_CSegment :: !(Bool),nr_Inh_CSegment :: !(Int),nt_Inh_CSegment :: !(NontermIdent),o_case_Inh_CSegment :: !(Bool),o_cata_Inh_CSegment :: !(Bool),o_costcentre_Inh_CSegment :: !(Bool),o_data_Inh_CSegment :: !((Maybe Bool)),o_linePragmas_Inh_CSegment :: !(Bool),o_monadic_Inh_CSegment :: !(Bool),o_newtypes_Inh_CSegment :: !(Bool),o_pretty_Inh_CSegment :: !(Bool),o_rename_Inh_CSegment :: !(Bool),o_sem_Inh_CSegment :: !(Bool),o_sig_Inh_CSegment :: !(Bool),o_splitsems_Inh_CSegment :: !(Bool),o_strictwrap_Inh_CSegment :: !(Bool),o_traces_Inh_CSegment :: !(Bool),o_unbox_Inh_CSegment :: !(Bool),options_Inh_CSegment :: !(Options),paramMap_Inh_CSegment :: !(ParamMap),prefix_Inh_CSegment :: !(String),syn_Inh_CSegment :: !(Attributes)}-data Syn_CSegment = Syn_CSegment {comments_Syn_CSegment :: !(([String])),semDom_Syn_CSegment :: !(([Decl])),semDomUnfoldGath_Syn_CSegment :: !((Map (NontermIdent, Int) ([String], Code.Type))),wrapDecls_Syn_CSegment :: !(Decls)}-wrap_CSegment :: T_CSegment ->- Inh_CSegment ->- Syn_CSegment -wrap_CSegment (T_CSegment sem ) (Inh_CSegment _lhsIinh _lhsIisLast _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn ) =- (let ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) = sem _lhsIinh _lhsIisLast _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn - in (Syn_CSegment _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls ))-sem_CSegment_CSegment :: Attributes ->- Attributes ->- T_CSegment -sem_CSegment_CSegment inh_ syn_ =- (T_CSegment (\ _lhsIinh- _lhsIisLast- _lhsInr- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_costcentre- _lhsIo_data- _lhsIo_linePragmas- _lhsIo_monadic- _lhsIo_newtypes- _lhsIo_pretty- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_splitsems- _lhsIo_strictwrap- _lhsIo_traces- _lhsIo_unbox- _lhsIoptions- _lhsIparamMap- _lhsIprefix- _lhsIsyn ->- (let _lhsOsemDom :: ([Decl])- _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _lhsOwrapDecls :: Decls- _lhsOcomments :: ([String])- -- "src-ag/GenerateCode.ag"(line 715, column 15)- _altSemForm =- ({-# LINE 715 "src-ag/GenerateCode.ag" #-}- breadthFirst _lhsIoptions- {-# LINE 4143 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 716, column 15)- _tp =- ({-# LINE 716 "src-ag/GenerateCode.ag" #-}- if _altSemForm- then TypeApp (SimpleType "Child") [SimpleType "EvalInfo", _indexExpr ]- else foldr Arr _synTps _inhTps- {-# LINE 4151 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 719, column 15)- _inhTps =- ({-# LINE 719 "src-ag/GenerateCode.ag" #-}- [typeToCodeType (Just _lhsInt) _params tp | tp <- Map.elems inh_]- {-# LINE 4157 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 720, column 15)- _inhTup =- ({-# LINE 720 "src-ag/GenerateCode.ag" #-}- mkTupleType _lhsIo_unbox (null _inhTps ) _inhTps- {-# LINE 4163 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 721, column 15)- _synTps =- ({-# LINE 721 "src-ag/GenerateCode.ag" #-}- mkTupleType _lhsIo_unbox (null _inhTps ) ([typeToCodeType (Just _lhsInt) _params tp | tp <- Map.elems syn_] ++ _continuation )- {-# LINE 4169 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 722, column 15)- _curTypeName =- ({-# LINE 722 "src-ag/GenerateCode.ag" #-}- typeName _lhsInt _lhsInr- {-# LINE 4175 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 723, column 15)- _nextTypeName =- ({-# LINE 723 "src-ag/GenerateCode.ag" #-}- typeName _lhsInt (_lhsInr + 1)- {-# LINE 4181 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 724, column 15)- _indexName =- ({-# LINE 724 "src-ag/GenerateCode.ag" #-}- "I_" ++ _curTypeName- {-# LINE 4187 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 725, column 15)- _dataIndex =- ({-# LINE 725 "src-ag/GenerateCode.ag" #-}- Code.Data _indexName _params [DataAlt _indexName []] False []- {-# LINE 4193 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 726, column 15)- _indexExpr =- ({-# LINE 726 "src-ag/GenerateCode.ag" #-}- TypeApp (SimpleType _indexName ) (map (SimpleType . ('@':)) _params )- {-# LINE 4199 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 727, column 15)- _indexStr =- ({-# LINE 727 "src-ag/GenerateCode.ag" #-}- "(" ++ _indexName ++ concatMap (\p -> " " ++ p) _params ++ ")"- {-# LINE 4205 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 728, column 15)- _inhInstance =- ({-# LINE 728 "src-ag/GenerateCode.ag" #-}- Code.Data "instance Inh" [_indexStr ] [DataAlt (typeName _lhsInt _lhsInr ++ "_Inh") [_inhTup ] ] False []- {-# LINE 4211 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 729, column 15)- _synInstance =- ({-# LINE 729 "src-ag/GenerateCode.ag" #-}- Code.Data "instance Syn" [_indexStr ] [DataAlt (typeName _lhsInt _lhsInr ++ "_Syn") [_synTps ] ] False []- {-# LINE 4217 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 730, column 15)- _continuation =- ({-# LINE 730 "src-ag/GenerateCode.ag" #-}- if _lhsIisLast- then []- else [TypeApp (SimpleType _nextTypeName ) (map (SimpleType . ('@':)) _params )]- {-# LINE 4225 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 733, column 15)- _params =- ({-# LINE 733 "src-ag/GenerateCode.ag" #-}- map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap- {-# LINE 4231 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 734, column 15)- _lhsOsemDom =- ({-# LINE 734 "src-ag/GenerateCode.ag" #-}- let name = typeName _lhsInt _lhsInr- evalTp | null _params = id- | otherwise = idEvalType- in ( if _lhsIo_newtypes- then [ Code.NewType name _params name (evalTp _tp ) ]- else [ Code.Type name _params (evalTp _tp ) ] )- ++ ( if _altSemForm- then [_dataIndex , _inhInstance , _synInstance ]- else [] )- {-# LINE 4245 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 748, column 7)- _lhsOsemDomUnfoldGath =- ({-# LINE 748 "src-ag/GenerateCode.ag" #-}- Map.singleton (_lhsInt, _lhsInr) (_params , _tp )- {-# LINE 4251 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 831, column 15)- _lhsOwrapDecls =- ({-# LINE 831 "src-ag/GenerateCode.ag" #-}- let lhsVars = map (lhsname False) (Map.keys syn_)- ++ if _lhsIisLast then [] else [unwrap ++ sem (_lhsInr+1)]- rhsVars = map (lhsname True) (Map.keys inh_)- rhs = map SimpleExpr rhsVars- unwrap = if _lhsIo_newtypes then typeName _lhsInt (_lhsInr + 1) ++ " " else ""- var = "sem"- sem 0 = var- sem n = var ++ "_" ++ show n- ntt = typeName _lhsInt _lhsInr- in [ EvalDecl ntt (mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars) (InvokeExpr ntt (SimpleExpr $ sem _lhsInr) rhs) ]- {-# LINE 4266 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 873, column 18)- _lhsOcomments =- ({-# LINE 873 "src-ag/GenerateCode.ag" #-}- let body = map ind (showsSegment (CSegment inh_ syn_))- in if null body- then []- else ("visit " ++ show _lhsInr ++ ":") : body- {-# LINE 4275 "src-ag/GenerateCode.hs" #-}- )- in ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))) )--- CSegments ----------------------------------------------------{-- visit 0:- inherited attributes:- inh : Attributes- nr : Int- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramMap : ParamMap- prefix : String- syn : Attributes- synthesized attributes:- comments : [String]- isNil : Bool- semDom : [Decl]- semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)- wrapDecls : Decls- alternatives:- alternative Cons:- child hd : CSegment - child tl : CSegments - alternative Nil:--}--- cata-sem_CSegments :: CSegments ->- T_CSegments -sem_CSegments list =- (Prelude.foldr sem_CSegments_Cons sem_CSegments_Nil (Prelude.map sem_CSegment list) )--- semantic domain-newtype T_CSegments = T_CSegments (Attributes ->- Int ->- NontermIdent ->- Bool ->- Bool ->- Bool ->- (Maybe Bool) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Options ->- ParamMap ->- String ->- Attributes ->- ( ([String]),Bool,([Decl]),(Map (NontermIdent, Int) ([String], Code.Type)),Decls))-data Inh_CSegments = Inh_CSegments {inh_Inh_CSegments :: !(Attributes),nr_Inh_CSegments :: !(Int),nt_Inh_CSegments :: !(NontermIdent),o_case_Inh_CSegments :: !(Bool),o_cata_Inh_CSegments :: !(Bool),o_costcentre_Inh_CSegments :: !(Bool),o_data_Inh_CSegments :: !((Maybe Bool)),o_linePragmas_Inh_CSegments :: !(Bool),o_monadic_Inh_CSegments :: !(Bool),o_newtypes_Inh_CSegments :: !(Bool),o_pretty_Inh_CSegments :: !(Bool),o_rename_Inh_CSegments :: !(Bool),o_sem_Inh_CSegments :: !(Bool),o_sig_Inh_CSegments :: !(Bool),o_splitsems_Inh_CSegments :: !(Bool),o_strictwrap_Inh_CSegments :: !(Bool),o_traces_Inh_CSegments :: !(Bool),o_unbox_Inh_CSegments :: !(Bool),options_Inh_CSegments :: !(Options),paramMap_Inh_CSegments :: !(ParamMap),prefix_Inh_CSegments :: !(String),syn_Inh_CSegments :: !(Attributes)}-data Syn_CSegments = Syn_CSegments {comments_Syn_CSegments :: !(([String])),isNil_Syn_CSegments :: !(Bool),semDom_Syn_CSegments :: !(([Decl])),semDomUnfoldGath_Syn_CSegments :: !((Map (NontermIdent, Int) ([String], Code.Type))),wrapDecls_Syn_CSegments :: !(Decls)}-wrap_CSegments :: T_CSegments ->- Inh_CSegments ->- Syn_CSegments -wrap_CSegments (T_CSegments sem ) (Inh_CSegments _lhsIinh _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn ) =- (let ( _lhsOcomments,_lhsOisNil,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) = sem _lhsIinh _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn - in (Syn_CSegments _lhsOcomments _lhsOisNil _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls ))-sem_CSegments_Cons :: T_CSegment ->- T_CSegments ->- T_CSegments -sem_CSegments_Cons (T_CSegment hd_ ) (T_CSegments tl_ ) =- (T_CSegments (\ _lhsIinh- _lhsInr- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_costcentre- _lhsIo_data- _lhsIo_linePragmas- _lhsIo_monadic- _lhsIo_newtypes- _lhsIo_pretty- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_splitsems- _lhsIo_strictwrap- _lhsIo_traces- _lhsIo_unbox- _lhsIoptions- _lhsIparamMap- _lhsIprefix- _lhsIsyn ->- (let _tlOnr :: Int- _lhsOisNil :: Bool- _hdOisLast :: Bool- _lhsOcomments :: ([String])- _lhsOsemDom :: ([Decl])- _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _lhsOwrapDecls :: Decls- _hdOinh :: Attributes- _hdOnr :: Int- _hdOnt :: NontermIdent- _hdOo_case :: Bool- _hdOo_cata :: Bool- _hdOo_costcentre :: Bool- _hdOo_data :: (Maybe Bool)- _hdOo_linePragmas :: Bool- _hdOo_monadic :: Bool- _hdOo_newtypes :: Bool- _hdOo_pretty :: Bool- _hdOo_rename :: Bool- _hdOo_sem :: Bool- _hdOo_sig :: Bool- _hdOo_splitsems :: Bool- _hdOo_strictwrap :: Bool- _hdOo_traces :: Bool- _hdOo_unbox :: Bool- _hdOoptions :: Options- _hdOparamMap :: ParamMap- _hdOprefix :: String- _hdOsyn :: Attributes- _tlOinh :: Attributes- _tlOnt :: NontermIdent- _tlOo_case :: Bool- _tlOo_cata :: Bool- _tlOo_costcentre :: Bool- _tlOo_data :: (Maybe Bool)- _tlOo_linePragmas :: Bool- _tlOo_monadic :: Bool- _tlOo_newtypes :: Bool- _tlOo_pretty :: Bool- _tlOo_rename :: Bool- _tlOo_sem :: Bool- _tlOo_sig :: Bool- _tlOo_splitsems :: Bool- _tlOo_strictwrap :: Bool- _tlOo_traces :: Bool- _tlOo_unbox :: Bool- _tlOoptions :: Options- _tlOparamMap :: ParamMap- _tlOprefix :: String- _tlOsyn :: Attributes- _hdIcomments :: ([String])- _hdIsemDom :: ([Decl])- _hdIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _hdIwrapDecls :: Decls- _tlIcomments :: ([String])- _tlIisNil :: Bool- _tlIsemDom :: ([Decl])- _tlIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _tlIwrapDecls :: Decls- -- "src-ag/GenerateCode.ag"(line 286, column 11)- _tlOnr =- ({-# LINE 286 "src-ag/GenerateCode.ag" #-}- _lhsInr + 1- {-# LINE 4442 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 299, column 12)- _lhsOisNil =- ({-# LINE 299 "src-ag/GenerateCode.ag" #-}- False- {-# LINE 4448 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 300, column 12)- _hdOisLast =- ({-# LINE 300 "src-ag/GenerateCode.ag" #-}- _tlIisNil- {-# LINE 4454 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)- _lhsOcomments =- ({-# LINE 868 "src-ag/GenerateCode.ag" #-}- _hdIcomments ++ _tlIcomments- {-# LINE 4460 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 710, column 50)- _lhsOsemDom =- ({-# LINE 710 "src-ag/GenerateCode.ag" #-}- _hdIsemDom ++ _tlIsemDom- {-# LINE 4466 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 744, column 86)- _lhsOsemDomUnfoldGath =- ({-# LINE 744 "src-ag/GenerateCode.ag" #-}- _hdIsemDomUnfoldGath `Map.union` _tlIsemDomUnfoldGath- {-# LINE 4472 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 829, column 52)- _lhsOwrapDecls =- ({-# LINE 829 "src-ag/GenerateCode.ag" #-}- _hdIwrapDecls ++ _tlIwrapDecls- {-# LINE 4478 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOinh =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIinh- {-# LINE 4484 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOnr =- ({-# LINE 278 "src-ag/GenerateCode.ag" #-}- _lhsInr- {-# LINE 4490 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOnt =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsInt- {-# LINE 4496 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_case =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 4502 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_cata =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 4508 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_costcentre =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 4514 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_data =- ({-# LINE 48 "src-ag/GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 4520 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_linePragmas =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 4526 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_monadic =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 4532 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_newtypes =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 4538 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_pretty =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 4544 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_rename =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 4550 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_sem =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 4556 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_sig =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 4562 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_splitsems =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 4568 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_strictwrap =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 4574 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_traces =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 4580 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_unbox =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 4586 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 50 "src-ag/GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 4592 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOparamMap =- ({-# LINE 95 "src-ag/GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 4598 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOprefix =- ({-# LINE 49 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 4604 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOsyn =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 4610 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOinh =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIinh- {-# LINE 4616 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOnt =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsInt- {-# LINE 4622 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_case =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 4628 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_cata =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 4634 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_costcentre =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 4640 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_data =- ({-# LINE 48 "src-ag/GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 4646 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_linePragmas =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 4652 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_monadic =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 4658 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_newtypes =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 4664 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_pretty =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 4670 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_rename =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 4676 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_sem =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 4682 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_sig =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 4688 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_splitsems =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 4694 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_strictwrap =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 4700 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_traces =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 4706 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_unbox =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 4712 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 50 "src-ag/GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 4718 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOparamMap =- ({-# LINE 95 "src-ag/GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 4724 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOprefix =- ({-# LINE 49 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 4730 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOsyn =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 4736 "src-ag/GenerateCode.hs" #-}- )- ( _hdIcomments,_hdIsemDom,_hdIsemDomUnfoldGath,_hdIwrapDecls) =- hd_ _hdOinh _hdOisLast _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamMap _hdOprefix _hdOsyn - ( _tlIcomments,_tlIisNil,_tlIsemDom,_tlIsemDomUnfoldGath,_tlIwrapDecls) =- tl_ _tlOinh _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamMap _tlOprefix _tlOsyn - in ( _lhsOcomments,_lhsOisNil,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))) )-sem_CSegments_Nil :: T_CSegments -sem_CSegments_Nil =- (T_CSegments (\ _lhsIinh- _lhsInr- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_costcentre- _lhsIo_data- _lhsIo_linePragmas- _lhsIo_monadic- _lhsIo_newtypes- _lhsIo_pretty- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_splitsems- _lhsIo_strictwrap- _lhsIo_traces- _lhsIo_unbox- _lhsIoptions- _lhsIparamMap- _lhsIprefix- _lhsIsyn ->- (let _lhsOisNil :: Bool- _lhsOcomments :: ([String])- _lhsOsemDom :: ([Decl])- _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _lhsOwrapDecls :: Decls- -- "src-ag/GenerateCode.ag"(line 301, column 10)- _lhsOisNil =- ({-# LINE 301 "src-ag/GenerateCode.ag" #-}- True- {-# LINE 4776 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)- _lhsOcomments =- ({-# LINE 868 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 4782 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 710, column 50)- _lhsOsemDom =- ({-# LINE 710 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 4788 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 744, column 86)- _lhsOsemDomUnfoldGath =- ({-# LINE 744 "src-ag/GenerateCode.ag" #-}- Map.empty- {-# LINE 4794 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 829, column 52)- _lhsOwrapDecls =- ({-# LINE 829 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 4800 "src-ag/GenerateCode.hs" #-}- )- in ( _lhsOcomments,_lhsOisNil,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))) )--- CVisit -------------------------------------------------------{-- visit 0:- inherited attributes:- allNts : Set NontermIdent- allPragmas : PragmaMap- aroundMap : Set Identifier- children : [(Identifier,Type, ChildKind)]- con : ConstructorIdent- contextMap : ContextMap- inh : Attributes- instVisitNrs : Map Identifier Int- isLast : Bool- mergeMap : Map Identifier (Identifier, [Identifier])- nextIntra : Exprs- nextIntraVars : Set String- nr : Int- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramInstMap : Map Identifier (NontermIdent, [String])- paramMap : ParamMap- prefix : String- quantMap : QuantMap- syn : Attributes- terminals : [Identifier]- unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type- with_sig : Bool- wrappers : Set NontermIdent- chained attributes:- decls : Decls- visitedSet : Set Identifier- synthesized attributes:- comments : [String]- gatherInstVisitNrs : Map Identifier Int- intra : Exprs- intraVars : Set String- semNames : [String]- alternatives:- alternative CVisit:- child inh : {Attributes}- child syn : {Attributes}- child vss : Sequence - child intra : Sequence - child ordered : {Bool}- visit 0:- local _tup4 : _- local higherOrderChildren : _- local firstOrderChildren : _- local firstOrderOrig : _- local funcname : _- local nextVisitName : _- local nextVisitDecl : _- local isOneVisit : _- local hasWrappers : _- local refDecls : _- local decls : _- local lastExprVars : _- local _tup5 : _- local blockFunDecls : _- local blockFirstFunCall : _- local costCentreDescr : _- local addCostCentre : _- local params : _- local semFun : _- local tsig : _- local semType : _- local typeSigs : _- local o_do : _- local o_case : _- local declsType : _- local o_splitsems : _--}--- cata-sem_CVisit :: CVisit ->- T_CVisit -sem_CVisit (CVisit _inh _syn _vss _intra _ordered ) =- (sem_CVisit_CVisit _inh _syn (sem_Sequence _vss ) (sem_Sequence _intra ) _ordered )--- semantic domain-newtype T_CVisit = T_CVisit ((Set NontermIdent) ->- PragmaMap ->- (Set Identifier) ->- ([(Identifier,Type, ChildKind)]) ->- ConstructorIdent ->- ContextMap ->- Decls ->- Attributes ->- (Map Identifier Int) ->- Bool ->- (Map Identifier (Identifier, [Identifier])) ->- Exprs ->- (Set String) ->- Int ->- NontermIdent ->- Bool ->- Bool ->- Bool ->- (Maybe Bool) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Options ->- (Map Identifier (NontermIdent, [String])) ->- ParamMap ->- String ->- QuantMap ->- Attributes ->- ([Identifier]) ->- (NontermIdent -> Int -> [String] -> Code.Type) ->- (Set Identifier) ->- Bool ->- (Set NontermIdent) ->- ( ([String]),Decls,(Map Identifier Int),Exprs,(Set String),([String]),(Set Identifier)))-data Inh_CVisit = Inh_CVisit {allNts_Inh_CVisit :: !((Set NontermIdent)),allPragmas_Inh_CVisit :: !(PragmaMap),aroundMap_Inh_CVisit :: !((Set Identifier)),children_Inh_CVisit :: !(([(Identifier,Type, ChildKind)])),con_Inh_CVisit :: !(ConstructorIdent),contextMap_Inh_CVisit :: !(ContextMap),decls_Inh_CVisit :: !(Decls),inh_Inh_CVisit :: !(Attributes),instVisitNrs_Inh_CVisit :: !((Map Identifier Int)),isLast_Inh_CVisit :: !(Bool),mergeMap_Inh_CVisit :: !((Map Identifier (Identifier, [Identifier]))),nextIntra_Inh_CVisit :: !(Exprs),nextIntraVars_Inh_CVisit :: !((Set String)),nr_Inh_CVisit :: !(Int),nt_Inh_CVisit :: !(NontermIdent),o_case_Inh_CVisit :: !(Bool),o_cata_Inh_CVisit :: !(Bool),o_costcentre_Inh_CVisit :: !(Bool),o_data_Inh_CVisit :: !((Maybe Bool)),o_linePragmas_Inh_CVisit :: !(Bool),o_monadic_Inh_CVisit :: !(Bool),o_newtypes_Inh_CVisit :: !(Bool),o_pretty_Inh_CVisit :: !(Bool),o_rename_Inh_CVisit :: !(Bool),o_sem_Inh_CVisit :: !(Bool),o_sig_Inh_CVisit :: !(Bool),o_splitsems_Inh_CVisit :: !(Bool),o_strictwrap_Inh_CVisit :: !(Bool),o_traces_Inh_CVisit :: !(Bool),o_unbox_Inh_CVisit :: !(Bool),options_Inh_CVisit :: !(Options),paramInstMap_Inh_CVisit :: !((Map Identifier (NontermIdent, [String]))),paramMap_Inh_CVisit :: !(ParamMap),prefix_Inh_CVisit :: !(String),quantMap_Inh_CVisit :: !(QuantMap),syn_Inh_CVisit :: !(Attributes),terminals_Inh_CVisit :: !(([Identifier])),unfoldSemDom_Inh_CVisit :: !((NontermIdent -> Int -> [String] -> Code.Type)),visitedSet_Inh_CVisit :: !((Set Identifier)),with_sig_Inh_CVisit :: !(Bool),wrappers_Inh_CVisit :: !((Set NontermIdent))}-data Syn_CVisit = Syn_CVisit {comments_Syn_CVisit :: !(([String])),decls_Syn_CVisit :: !(Decls),gatherInstVisitNrs_Syn_CVisit :: !((Map Identifier Int)),intra_Syn_CVisit :: !(Exprs),intraVars_Syn_CVisit :: !((Set String)),semNames_Syn_CVisit :: !(([String])),visitedSet_Syn_CVisit :: !((Set Identifier))}-wrap_CVisit :: T_CVisit ->- Inh_CVisit ->- Syn_CVisit -wrap_CVisit (T_CVisit sem ) (Inh_CVisit _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIdecls _lhsIinh _lhsIinstVisitNrs _lhsIisLast _lhsImergeMap _lhsInextIntra _lhsInextIntraVars _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers ) =- (let ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOsemNames,_lhsOvisitedSet) = sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIdecls _lhsIinh _lhsIinstVisitNrs _lhsIisLast _lhsImergeMap _lhsInextIntra _lhsInextIntraVars _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers - in (Syn_CVisit _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOsemNames _lhsOvisitedSet ))-sem_CVisit_CVisit :: Attributes ->- Attributes ->- T_Sequence ->- T_Sequence ->- Bool ->- T_CVisit -sem_CVisit_CVisit inh_ syn_ (T_Sequence vss_ ) (T_Sequence intra_ ) ordered_ =- (T_CVisit (\ _lhsIallNts- _lhsIallPragmas- _lhsIaroundMap- _lhsIchildren- _lhsIcon- _lhsIcontextMap- _lhsIdecls- _lhsIinh- _lhsIinstVisitNrs- _lhsIisLast- _lhsImergeMap- _lhsInextIntra- _lhsInextIntraVars- _lhsInr- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_costcentre- _lhsIo_data- _lhsIo_linePragmas- _lhsIo_monadic- _lhsIo_newtypes- _lhsIo_pretty- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_splitsems- _lhsIo_strictwrap- _lhsIo_traces- _lhsIo_unbox- _lhsIoptions- _lhsIparamInstMap- _lhsIparamMap- _lhsIprefix- _lhsIquantMap- _lhsIsyn- _lhsIterminals- _lhsIunfoldSemDom- _lhsIvisitedSet- _lhsIwith_sig- _lhsIwrappers ->- (let _lhsOintra :: Exprs- _lhsOintraVars :: (Set String)- _vssOlastExpr :: Expr- _intraOlastExpr :: Expr- _lhsOdecls :: Decls- _lhsOgatherInstVisitNrs :: (Map Identifier Int)- _vssOdeclsAbove :: ([Decl])- _intraOdeclsAbove :: ([Decl])- _lhsOcomments :: ([String])- _vssOwhat :: String- _intraOwhat :: String- _lhsOsemNames :: ([String])- _lhsOvisitedSet :: (Set Identifier)- _vssOallNts :: (Set NontermIdent)- _vssOaroundMap :: (Set Identifier)- _vssOchildren :: ([(Identifier,Type,ChildKind)])- _vssOcon :: ConstructorIdent- _vssOinh :: Attributes- _vssOinstVisitNrs :: (Map Identifier Int)- _vssOmergeMap :: (Map Identifier (Identifier, [Identifier]))- _vssOnr :: Int- _vssOnt :: NontermIdent- _vssOo_case :: Bool- _vssOo_cata :: Bool- _vssOo_costcentre :: Bool- _vssOo_data :: (Maybe Bool)- _vssOo_linePragmas :: Bool- _vssOo_monadic :: Bool- _vssOo_newtypes :: Bool- _vssOo_pretty :: Bool- _vssOo_rename :: Bool- _vssOo_sem :: Bool- _vssOo_sig :: Bool- _vssOo_splitsems :: Bool- _vssOo_strictwrap :: Bool- _vssOo_traces :: Bool- _vssOo_unbox :: Bool- _vssOoptions :: Options- _vssOparamInstMap :: (Map Identifier (NontermIdent, [String]))- _vssOparamMap :: ParamMap- _vssOprefix :: String- _vssOsyn :: Attributes- _vssOterminals :: ([Identifier])- _vssOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _vssOvisitedSet :: (Set Identifier)- _intraOallNts :: (Set NontermIdent)- _intraOaroundMap :: (Set Identifier)- _intraOchildren :: ([(Identifier,Type,ChildKind)])- _intraOcon :: ConstructorIdent- _intraOinh :: Attributes- _intraOinstVisitNrs :: (Map Identifier Int)- _intraOmergeMap :: (Map Identifier (Identifier, [Identifier]))- _intraOnr :: Int- _intraOnt :: NontermIdent- _intraOo_case :: Bool- _intraOo_cata :: Bool- _intraOo_costcentre :: Bool- _intraOo_data :: (Maybe Bool)- _intraOo_linePragmas :: Bool- _intraOo_monadic :: Bool- _intraOo_newtypes :: Bool- _intraOo_pretty :: Bool- _intraOo_rename :: Bool- _intraOo_sem :: Bool- _intraOo_sig :: Bool- _intraOo_splitsems :: Bool- _intraOo_strictwrap :: Bool- _intraOo_traces :: Bool- _intraOo_unbox :: Bool- _intraOoptions :: Options- _intraOparamInstMap :: (Map Identifier (NontermIdent, [String]))- _intraOparamMap :: ParamMap- _intraOprefix :: String- _intraOsyn :: Attributes- _intraOterminals :: ([Identifier])- _intraOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _intraOvisitedSet :: (Set Identifier)- _vssIallTpsFound :: Bool- _vssIblockDecls :: DeclBlocks - _vssIcomments :: ([String])- _vssIdecls :: Decls- _vssIdeclsAbove :: ([Decl])- _vssIdefinedInsts :: ([Identifier])- _vssIexprs :: Exprs- _vssItSigs :: ([Decl])- _vssItps :: ([Type])- _vssIusedVars :: (Set String)- _vssIvisitedSet :: (Set Identifier)- _intraIallTpsFound :: Bool- _intraIblockDecls :: DeclBlocks - _intraIcomments :: ([String])- _intraIdecls :: Decls- _intraIdeclsAbove :: ([Decl])- _intraIdefinedInsts :: ([Identifier])- _intraIexprs :: Exprs- _intraItSigs :: ([Decl])- _intraItps :: ([Type])- _intraIusedVars :: (Set String)- _intraIvisitedSet :: (Set Identifier)- -- "src-ag/GenerateCode.ag"(line 310, column 13)- _lhsOintra =- ({-# LINE 310 "src-ag/GenerateCode.ag" #-}- _intraIexprs- {-# LINE 5097 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 311, column 13)- _lhsOintraVars =- ({-# LINE 311 "src-ag/GenerateCode.ag" #-}- _intraIusedVars- {-# LINE 5103 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 441, column 13)- __tup4 =- ({-# LINE 441 "src-ag/GenerateCode.ag" #-}- partition (\(_,_,virt) -> isHigherOrder virt) _lhsIchildren- {-# LINE 5109 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 441, column 13)- (_higherOrderChildren,_) =- ({-# LINE 441 "src-ag/GenerateCode.ag" #-}- __tup4- {-# LINE 5115 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 441, column 13)- (_,_firstOrderChildren) =- ({-# LINE 441 "src-ag/GenerateCode.ag" #-}- __tup4- {-# LINE 5121 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 442, column 13)- _firstOrderOrig =- ({-# LINE 442 "src-ag/GenerateCode.ag" #-}- map pickOrigType _firstOrderChildren- {-# LINE 5127 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 443, column 13)- _funcname =- ({-# LINE 443 "src-ag/GenerateCode.ag" #-}- seqSemname _lhsIprefix _lhsInt _lhsIcon _lhsInr- {-# LINE 5133 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 444, column 13)- _nextVisitName =- ({-# LINE 444 "src-ag/GenerateCode.ag" #-}- if _lhsIisLast then [] else [visitname _lhsIprefix _lhsInt (_lhsInr+1)]- {-# LINE 5139 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 445, column 13)- _nextVisitDecl =- ({-# LINE 445 "src-ag/GenerateCode.ag" #-}- let lhs = TupleLhs _nextVisitName- rhs = Let _lhsIdecls (SimpleExpr fun)- fun = seqSemname _lhsIprefix _lhsInt _lhsIcon (_lhsInr+1)- in if _lhsIisLast- then []- else [Decl lhs rhs (Set.fromList _nextVisitName) _lhsInextIntraVars]- {-# LINE 5150 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 452, column 13)- _isOneVisit =- ({-# LINE 452 "src-ag/GenerateCode.ag" #-}- _lhsIisLast && _lhsInr == 0- {-# LINE 5156 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 453, column 13)- _hasWrappers =- ({-# LINE 453 "src-ag/GenerateCode.ag" #-}- _lhsInt `Set.member` _lhsIwrappers- {-# LINE 5162 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 454, column 13)- _refDecls =- ({-# LINE 454 "src-ag/GenerateCode.ag" #-}- if _isOneVisit && _hasWrappers- then let synAttrs = Map.toList syn_- synNT = "Syn" ++ "_" ++ getName _lhsInt- synVars = [ SimpleExpr (attrname False _LHS a) | (a,_) <- synAttrs ]- rhs = App synNT synVars- lhs = Fun "___node" []- in [Decl lhs rhs Set.empty Set.empty]- else []- {-# LINE 5175 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 462, column 13)- _decls =- ({-# LINE 462 "src-ag/GenerateCode.ag" #-}- _typeSigs ++ _vssIdecls ++ _nextVisitDecl ++ _refDecls- {-# LINE 5181 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 463, column 13)- _vssOlastExpr =- ({-# LINE 463 "src-ag/GenerateCode.ag" #-}- mkTupleExpr _lhsIo_unbox (null $ Map.keys inh_) $ map (SimpleExpr . lhsname False) (Map.keys syn_) ++ map SimpleExpr _nextVisitName- {-# LINE 5187 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 464, column 13)- _intraOlastExpr =- ({-# LINE 464 "src-ag/GenerateCode.ag" #-}- error "lastExpr: not used here"- {-# LINE 5193 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 465, column 13)- _lastExprVars =- ({-# LINE 465 "src-ag/GenerateCode.ag" #-}- map (lhsname False) (Map.keys syn_) ++ _nextVisitName- {-# LINE 5199 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 466, column 13)- __tup5 =- ({-# LINE 466 "src-ag/GenerateCode.ag" #-}- mkPartitionedFunction _funcname _o_case _nextVisitDecl _lastExprVars _vssIblockDecls- {-# LINE 5205 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 466, column 13)- (_blockFunDecls,_) =- ({-# LINE 466 "src-ag/GenerateCode.ag" #-}- __tup5- {-# LINE 5211 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 466, column 13)- (_,_blockFirstFunCall) =- ({-# LINE 466 "src-ag/GenerateCode.ag" #-}- __tup5- {-# LINE 5217 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 468, column 13)- _costCentreDescr =- ({-# LINE 468 "src-ag/GenerateCode.ag" #-}- "b" ++ ":" ++ show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show _lhsInr- {-# LINE 5223 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 469, column 13)- _addCostCentre =- ({-# LINE 469 "src-ag/GenerateCode.ag" #-}- \v -> if _lhsIo_costcentre- then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v- else v- {-# LINE 5231 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 473, column 13)- _params =- ({-# LINE 473 "src-ag/GenerateCode.ag" #-}- map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap- {-# LINE 5237 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 474, column 13)- _semFun =- ({-# LINE 474 "src-ag/GenerateCode.ag" #-}- let lhs = Fun _funcname lhs_args- lhs_args = if _lhsInr == 0 then map field _firstOrderOrig else []- field (name,NT tp tps _,_) = let unwrap | _lhsIo_newtypes = \x -> App (sdtype tp) [x]- | otherwise = id- addType expr | null tps = expr- | otherwise = TypedExpr expr (_lhsIunfoldSemDom tp 0 tps)- in unwrap $ addType $ SimpleExpr $ funname name 0- field (name,tp,_) = let expr = SimpleExpr (funname name 0)- in if null _params- then expr- else TypedExpr expr (idEvalType $ typeToCodeType (Just _lhsInt) _params $ removeDeforested tp)- mbEvalTp | null _params = const Nothing- | otherwise = Just . idEvalType- rhs = wrap- . mkSemFun _lhsInt _lhsInr [mkLambdaArg (lhsname True nm) (mbEvalTp $ typeToCodeType (Just _lhsInt) _params $ removeDeforested tp) | (nm,tp) <- Map.assocs inh_]- $ _addCostCentre- $ if ordered_ && _o_splitsems- then _blockFirstFunCall- else mkDecls _declsType _decls- . ResultExpr (typeName _lhsInt _lhsInr)- . mkTupleExpr _lhsIo_unbox (null $ Map.keys inh_)- $ map (SimpleExpr . lhsname False) (Map.keys syn_) ++ map SimpleExpr _nextVisitName- wrap = if _lhsIo_newtypes- then \x -> App (typeName _lhsInt _lhsInr) [x]- else id- in Decl lhs rhs Set.empty Set.empty- {-# LINE 5268 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 505, column 13)- _tsig =- ({-# LINE 505 "src-ag/GenerateCode.ag" #-}- TSig _funcname _semType- {-# LINE 5274 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 506, column 13)- _semType =- ({-# LINE 506 "src-ag/GenerateCode.ag" #-}- let argType (NT tp tps _) r | tp /= _SELF = typeAppStrs (sdtype tp) tps `Arr` r- | tp == _SELF = error "GenerateCode: found an intra-type with type SELF, which should have been prevented by CRule.tps"- argType (Haskell tp) r = SimpleType tp `Arr` r- evalTp | null _params = id- | otherwise = idEvalType- in appQuant _lhsIquantMap _lhsInt $ appContext _lhsIcontextMap _lhsInt $ evalTp $- if _lhsInr == 0- then foldr argType (typeAppStrs (sdtype _lhsInt ) _params ) (map (\(_,t,_) -> t) _firstOrderOrig )- else foldr argType (typeAppStrs (typeName _lhsInt _lhsInr) _params ) []- {-# LINE 5288 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 517, column 13)- _lhsOdecls =- ({-# LINE 517 "src-ag/GenerateCode.ag" #-}- ( if _lhsIwith_sig- then [_tsig, _semFun]- else [_semFun]- ) ++- ( if ordered_ && _o_splitsems- then _blockFunDecls- else []- )- {-# LINE 5301 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 525, column 13)- _typeSigs =- ({-# LINE 525 "src-ag/GenerateCode.ag" #-}- if _lhsIo_sig && not _o_case- then _vssItSigs- else []- {-# LINE 5309 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 528, column 13)- _o_do =- ({-# LINE 528 "src-ag/GenerateCode.ag" #-}- ordered_ && _lhsIo_monadic- {-# LINE 5315 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 529, column 13)- _o_case =- ({-# LINE 529 "src-ag/GenerateCode.ag" #-}- not _o_do && _lhsIo_case && ordered_ && not (hasPragma _lhsIallPragmas _lhsInt _lhsIcon _NOCASE)- {-# LINE 5321 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 530, column 13)- _declsType =- ({-# LINE 530 "src-ag/GenerateCode.ag" #-}- if _o_do- then DeclsDo- else if _o_case- then DeclsCase- else DeclsLet- {-# LINE 5331 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 535, column 13)- _o_splitsems =- ({-# LINE 535 "src-ag/GenerateCode.ag" #-}- ordered_ && _lhsIo_splitsems- {-# LINE 5337 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 568, column 7)- _lhsOgatherInstVisitNrs =- ({-# LINE 568 "src-ag/GenerateCode.ag" #-}- Map.fromList [(i,_lhsInr) | i <- _vssIdefinedInsts]- {-# LINE 5343 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 611, column 7)- _vssOdeclsAbove =- ({-# LINE 611 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 5349 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 612, column 7)- _intraOdeclsAbove =- ({-# LINE 612 "src-ag/GenerateCode.ag" #-}- error "declsAbove: not used here"- {-# LINE 5355 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 894, column 18)- _lhsOcomments =- ({-# LINE 894 "src-ag/GenerateCode.ag" #-}- let body = map ind (_vssIcomments ++ _intraIcomments)- in if null body- then []- else ("visit " ++ show _lhsInr ++ ":") : body- {-# LINE 5364 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 898, column 18)- _vssOwhat =- ({-# LINE 898 "src-ag/GenerateCode.ag" #-}- "local"- {-# LINE 5370 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 899, column 18)- _intraOwhat =- ({-# LINE 899 "src-ag/GenerateCode.ag" #-}- "intra"- {-# LINE 5376 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 1156, column 7)- _lhsOsemNames =- ({-# LINE 1156 "src-ag/GenerateCode.ag" #-}- [_funcname ]- {-# LINE 5382 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (up)- _lhsOvisitedSet =- ({-# LINE 145 "src-ag/GenerateCode.ag" #-}- _intraIvisitedSet- {-# LINE 5388 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOallNts =- ({-# LINE 132 "src-ag/GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 5394 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOaroundMap =- ({-# LINE 580 "src-ag/GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 5400 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOchildren =- ({-# LINE 259 "src-ag/GenerateCode.ag" #-}- _lhsIchildren- {-# LINE 5406 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOcon =- ({-# LINE 89 "src-ag/GenerateCode.ag" #-}- _lhsIcon- {-# LINE 5412 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOinh =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIinh- {-# LINE 5418 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOinstVisitNrs =- ({-# LINE 560 "src-ag/GenerateCode.ag" #-}- _lhsIinstVisitNrs- {-# LINE 5424 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOmergeMap =- ({-# LINE 596 "src-ag/GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 5430 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOnr =- ({-# LINE 278 "src-ag/GenerateCode.ag" #-}- _lhsInr- {-# LINE 5436 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOnt =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsInt- {-# LINE 5442 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (from local)- _vssOo_case =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _o_case- {-# LINE 5448 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOo_cata =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 5454 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOo_costcentre =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 5460 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOo_data =- ({-# LINE 48 "src-ag/GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 5466 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOo_linePragmas =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 5472 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOo_monadic =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 5478 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOo_newtypes =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 5484 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOo_pretty =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 5490 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOo_rename =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 5496 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOo_sem =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 5502 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOo_sig =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 5508 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (from local)- _vssOo_splitsems =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _o_splitsems- {-# LINE 5514 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOo_strictwrap =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 5520 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOo_traces =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 5526 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOo_unbox =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 5532 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOoptions =- ({-# LINE 50 "src-ag/GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 5538 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOparamInstMap =- ({-# LINE 101 "src-ag/GenerateCode.ag" #-}- _lhsIparamInstMap- {-# LINE 5544 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOparamMap =- ({-# LINE 95 "src-ag/GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 5550 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOprefix =- ({-# LINE 49 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 5556 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOsyn =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 5562 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOterminals =- ({-# LINE 90 "src-ag/GenerateCode.ag" #-}- _lhsIterminals- {-# LINE 5568 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOunfoldSemDom =- ({-# LINE 750 "src-ag/GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 5574 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _vssOvisitedSet =- ({-# LINE 145 "src-ag/GenerateCode.ag" #-}- _lhsIvisitedSet- {-# LINE 5580 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOallNts =- ({-# LINE 132 "src-ag/GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 5586 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOaroundMap =- ({-# LINE 580 "src-ag/GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 5592 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOchildren =- ({-# LINE 259 "src-ag/GenerateCode.ag" #-}- _lhsIchildren- {-# LINE 5598 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOcon =- ({-# LINE 89 "src-ag/GenerateCode.ag" #-}- _lhsIcon- {-# LINE 5604 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOinh =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIinh- {-# LINE 5610 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOinstVisitNrs =- ({-# LINE 560 "src-ag/GenerateCode.ag" #-}- _lhsIinstVisitNrs- {-# LINE 5616 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOmergeMap =- ({-# LINE 596 "src-ag/GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 5622 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOnr =- ({-# LINE 278 "src-ag/GenerateCode.ag" #-}- _lhsInr- {-# LINE 5628 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOnt =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsInt- {-# LINE 5634 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (from local)- _intraOo_case =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _o_case- {-# LINE 5640 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOo_cata =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 5646 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOo_costcentre =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 5652 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOo_data =- ({-# LINE 48 "src-ag/GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 5658 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOo_linePragmas =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 5664 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOo_monadic =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 5670 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOo_newtypes =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 5676 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOo_pretty =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 5682 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOo_rename =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 5688 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOo_sem =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 5694 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOo_sig =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 5700 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (from local)- _intraOo_splitsems =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _o_splitsems- {-# LINE 5706 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOo_strictwrap =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 5712 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOo_traces =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 5718 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOo_unbox =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 5724 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOoptions =- ({-# LINE 50 "src-ag/GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 5730 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOparamInstMap =- ({-# LINE 101 "src-ag/GenerateCode.ag" #-}- _lhsIparamInstMap- {-# LINE 5736 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOparamMap =- ({-# LINE 95 "src-ag/GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 5742 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOprefix =- ({-# LINE 49 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 5748 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOsyn =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 5754 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOterminals =- ({-# LINE 90 "src-ag/GenerateCode.ag" #-}- _lhsIterminals- {-# LINE 5760 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _intraOunfoldSemDom =- ({-# LINE 750 "src-ag/GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 5766 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (chain)- _intraOvisitedSet =- ({-# LINE 145 "src-ag/GenerateCode.ag" #-}- _vssIvisitedSet- {-# LINE 5772 "src-ag/GenerateCode.hs" #-}- )- ( _vssIallTpsFound,_vssIblockDecls,_vssIcomments,_vssIdecls,_vssIdeclsAbove,_vssIdefinedInsts,_vssIexprs,_vssItSigs,_vssItps,_vssIusedVars,_vssIvisitedSet) =- vss_ _vssOallNts _vssOaroundMap _vssOchildren _vssOcon _vssOdeclsAbove _vssOinh _vssOinstVisitNrs _vssOlastExpr _vssOmergeMap _vssOnr _vssOnt _vssOo_case _vssOo_cata _vssOo_costcentre _vssOo_data _vssOo_linePragmas _vssOo_monadic _vssOo_newtypes _vssOo_pretty _vssOo_rename _vssOo_sem _vssOo_sig _vssOo_splitsems _vssOo_strictwrap _vssOo_traces _vssOo_unbox _vssOoptions _vssOparamInstMap _vssOparamMap _vssOprefix _vssOsyn _vssOterminals _vssOunfoldSemDom _vssOvisitedSet _vssOwhat - ( _intraIallTpsFound,_intraIblockDecls,_intraIcomments,_intraIdecls,_intraIdeclsAbove,_intraIdefinedInsts,_intraIexprs,_intraItSigs,_intraItps,_intraIusedVars,_intraIvisitedSet) =- intra_ _intraOallNts _intraOaroundMap _intraOchildren _intraOcon _intraOdeclsAbove _intraOinh _intraOinstVisitNrs _intraOlastExpr _intraOmergeMap _intraOnr _intraOnt _intraOo_case _intraOo_cata _intraOo_costcentre _intraOo_data _intraOo_linePragmas _intraOo_monadic _intraOo_newtypes _intraOo_pretty _intraOo_rename _intraOo_sem _intraOo_sig _intraOo_splitsems _intraOo_strictwrap _intraOo_traces _intraOo_unbox _intraOoptions _intraOparamInstMap _intraOparamMap _intraOprefix _intraOsyn _intraOterminals _intraOunfoldSemDom _intraOvisitedSet _intraOwhat - in ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOsemNames,_lhsOvisitedSet))) )--- CVisits ------------------------------------------------------{-- visit 0:- inherited attributes:- allNts : Set NontermIdent- allPragmas : PragmaMap- aroundMap : Set Identifier- children : [(Identifier,Type, ChildKind)]- con : ConstructorIdent- contextMap : ContextMap- inh : Attributes- instVisitNrs : Map Identifier Int- mergeMap : Map Identifier (Identifier, [Identifier])- nr : Int- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramInstMap : Map Identifier (NontermIdent, [String])- paramMap : ParamMap- prefix : String- quantMap : QuantMap- syn : Attributes- terminals : [Identifier]- unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type- with_sig : Bool- wrappers : Set NontermIdent- chained attribute:- visitedSet : Set Identifier- synthesized attributes:- comments : [String]- decls : Decls- gatherInstVisitNrs : Map Identifier Int- intra : Exprs- intraVars : Set String- isNil : Bool- semNames : [String]- alternatives:- alternative Cons:- child hd : CVisit - child tl : CVisits - alternative Nil:--}--- cata-sem_CVisits :: CVisits ->- T_CVisits -sem_CVisits list =- (Prelude.foldr sem_CVisits_Cons sem_CVisits_Nil (Prelude.map sem_CVisit list) )--- semantic domain-newtype T_CVisits = T_CVisits ((Set NontermIdent) ->- PragmaMap ->- (Set Identifier) ->- ([(Identifier,Type, ChildKind)]) ->- ConstructorIdent ->- ContextMap ->- Attributes ->- (Map Identifier Int) ->- (Map Identifier (Identifier, [Identifier])) ->- Int ->- NontermIdent ->- Bool ->- Bool ->- Bool ->- (Maybe Bool) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Options ->- (Map Identifier (NontermIdent, [String])) ->- ParamMap ->- String ->- QuantMap ->- Attributes ->- ([Identifier]) ->- (NontermIdent -> Int -> [String] -> Code.Type) ->- (Set Identifier) ->- Bool ->- (Set NontermIdent) ->- ( ([String]),Decls,(Map Identifier Int),Exprs,(Set String),Bool,([String]),(Set Identifier)))-data Inh_CVisits = Inh_CVisits {allNts_Inh_CVisits :: !((Set NontermIdent)),allPragmas_Inh_CVisits :: !(PragmaMap),aroundMap_Inh_CVisits :: !((Set Identifier)),children_Inh_CVisits :: !(([(Identifier,Type, ChildKind)])),con_Inh_CVisits :: !(ConstructorIdent),contextMap_Inh_CVisits :: !(ContextMap),inh_Inh_CVisits :: !(Attributes),instVisitNrs_Inh_CVisits :: !((Map Identifier Int)),mergeMap_Inh_CVisits :: !((Map Identifier (Identifier, [Identifier]))),nr_Inh_CVisits :: !(Int),nt_Inh_CVisits :: !(NontermIdent),o_case_Inh_CVisits :: !(Bool),o_cata_Inh_CVisits :: !(Bool),o_costcentre_Inh_CVisits :: !(Bool),o_data_Inh_CVisits :: !((Maybe Bool)),o_linePragmas_Inh_CVisits :: !(Bool),o_monadic_Inh_CVisits :: !(Bool),o_newtypes_Inh_CVisits :: !(Bool),o_pretty_Inh_CVisits :: !(Bool),o_rename_Inh_CVisits :: !(Bool),o_sem_Inh_CVisits :: !(Bool),o_sig_Inh_CVisits :: !(Bool),o_splitsems_Inh_CVisits :: !(Bool),o_strictwrap_Inh_CVisits :: !(Bool),o_traces_Inh_CVisits :: !(Bool),o_unbox_Inh_CVisits :: !(Bool),options_Inh_CVisits :: !(Options),paramInstMap_Inh_CVisits :: !((Map Identifier (NontermIdent, [String]))),paramMap_Inh_CVisits :: !(ParamMap),prefix_Inh_CVisits :: !(String),quantMap_Inh_CVisits :: !(QuantMap),syn_Inh_CVisits :: !(Attributes),terminals_Inh_CVisits :: !(([Identifier])),unfoldSemDom_Inh_CVisits :: !((NontermIdent -> Int -> [String] -> Code.Type)),visitedSet_Inh_CVisits :: !((Set Identifier)),with_sig_Inh_CVisits :: !(Bool),wrappers_Inh_CVisits :: !((Set NontermIdent))}-data Syn_CVisits = Syn_CVisits {comments_Syn_CVisits :: !(([String])),decls_Syn_CVisits :: !(Decls),gatherInstVisitNrs_Syn_CVisits :: !((Map Identifier Int)),intra_Syn_CVisits :: !(Exprs),intraVars_Syn_CVisits :: !((Set String)),isNil_Syn_CVisits :: !(Bool),semNames_Syn_CVisits :: !(([String])),visitedSet_Syn_CVisits :: !((Set Identifier))}-wrap_CVisits :: T_CVisits ->- Inh_CVisits ->- Syn_CVisits -wrap_CVisits (T_CVisits sem ) (Inh_CVisits _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers ) =- (let ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames,_lhsOvisitedSet) = sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers - in (Syn_CVisits _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOisNil _lhsOsemNames _lhsOvisitedSet ))-sem_CVisits_Cons :: T_CVisit ->- T_CVisits ->- T_CVisits -sem_CVisits_Cons (T_CVisit hd_ ) (T_CVisits tl_ ) =- (T_CVisits (\ _lhsIallNts- _lhsIallPragmas- _lhsIaroundMap- _lhsIchildren- _lhsIcon- _lhsIcontextMap- _lhsIinh- _lhsIinstVisitNrs- _lhsImergeMap- _lhsInr- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_costcentre- _lhsIo_data- _lhsIo_linePragmas- _lhsIo_monadic- _lhsIo_newtypes- _lhsIo_pretty- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_splitsems- _lhsIo_strictwrap- _lhsIo_traces- _lhsIo_unbox- _lhsIoptions- _lhsIparamInstMap- _lhsIparamMap- _lhsIprefix- _lhsIquantMap- _lhsIsyn- _lhsIterminals- _lhsIunfoldSemDom- _lhsIvisitedSet- _lhsIwith_sig- _lhsIwrappers ->- (let _tlOnr :: Int- _lhsOisNil :: Bool- _hdOisLast :: Bool- _hdOnextIntra :: Exprs- _hdOnextIntraVars :: (Set String)- _lhsOintra :: Exprs- _lhsOintraVars :: (Set String)- _lhsOdecls :: Decls- _hdOdecls :: Decls- _lhsOcomments :: ([String])- _lhsOgatherInstVisitNrs :: (Map Identifier Int)- _lhsOsemNames :: ([String])- _lhsOvisitedSet :: (Set Identifier)- _hdOallNts :: (Set NontermIdent)- _hdOallPragmas :: PragmaMap- _hdOaroundMap :: (Set Identifier)- _hdOchildren :: ([(Identifier,Type, ChildKind)])- _hdOcon :: ConstructorIdent- _hdOcontextMap :: ContextMap- _hdOinh :: Attributes- _hdOinstVisitNrs :: (Map Identifier Int)- _hdOmergeMap :: (Map Identifier (Identifier, [Identifier]))- _hdOnr :: Int- _hdOnt :: NontermIdent- _hdOo_case :: Bool- _hdOo_cata :: Bool- _hdOo_costcentre :: Bool- _hdOo_data :: (Maybe Bool)- _hdOo_linePragmas :: Bool- _hdOo_monadic :: Bool- _hdOo_newtypes :: Bool- _hdOo_pretty :: Bool- _hdOo_rename :: Bool- _hdOo_sem :: Bool- _hdOo_sig :: Bool- _hdOo_splitsems :: Bool- _hdOo_strictwrap :: Bool- _hdOo_traces :: Bool- _hdOo_unbox :: Bool- _hdOoptions :: Options- _hdOparamInstMap :: (Map Identifier (NontermIdent, [String]))- _hdOparamMap :: ParamMap- _hdOprefix :: String- _hdOquantMap :: QuantMap- _hdOsyn :: Attributes- _hdOterminals :: ([Identifier])- _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _hdOvisitedSet :: (Set Identifier)- _hdOwith_sig :: Bool- _hdOwrappers :: (Set NontermIdent)- _tlOallNts :: (Set NontermIdent)- _tlOallPragmas :: PragmaMap- _tlOaroundMap :: (Set Identifier)- _tlOchildren :: ([(Identifier,Type, ChildKind)])- _tlOcon :: ConstructorIdent- _tlOcontextMap :: ContextMap- _tlOinh :: Attributes- _tlOinstVisitNrs :: (Map Identifier Int)- _tlOmergeMap :: (Map Identifier (Identifier, [Identifier]))- _tlOnt :: NontermIdent- _tlOo_case :: Bool- _tlOo_cata :: Bool- _tlOo_costcentre :: Bool- _tlOo_data :: (Maybe Bool)- _tlOo_linePragmas :: Bool- _tlOo_monadic :: Bool- _tlOo_newtypes :: Bool- _tlOo_pretty :: Bool- _tlOo_rename :: Bool- _tlOo_sem :: Bool- _tlOo_sig :: Bool- _tlOo_splitsems :: Bool- _tlOo_strictwrap :: Bool- _tlOo_traces :: Bool- _tlOo_unbox :: Bool- _tlOoptions :: Options- _tlOparamInstMap :: (Map Identifier (NontermIdent, [String]))- _tlOparamMap :: ParamMap- _tlOprefix :: String- _tlOquantMap :: QuantMap- _tlOsyn :: Attributes- _tlOterminals :: ([Identifier])- _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _tlOvisitedSet :: (Set Identifier)- _tlOwith_sig :: Bool- _tlOwrappers :: (Set NontermIdent)- _hdIcomments :: ([String])- _hdIdecls :: Decls- _hdIgatherInstVisitNrs :: (Map Identifier Int)- _hdIintra :: Exprs- _hdIintraVars :: (Set String)- _hdIsemNames :: ([String])- _hdIvisitedSet :: (Set Identifier)- _tlIcomments :: ([String])- _tlIdecls :: Decls- _tlIgatherInstVisitNrs :: (Map Identifier Int)- _tlIintra :: Exprs- _tlIintraVars :: (Set String)- _tlIisNil :: Bool- _tlIsemNames :: ([String])- _tlIvisitedSet :: (Set Identifier)- -- "src-ag/GenerateCode.ag"(line 282, column 11)- _tlOnr =- ({-# LINE 282 "src-ag/GenerateCode.ag" #-}- _lhsInr + 1- {-# LINE 6033 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 295, column 12)- _lhsOisNil =- ({-# LINE 295 "src-ag/GenerateCode.ag" #-}- False- {-# LINE 6039 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 296, column 12)- _hdOisLast =- ({-# LINE 296 "src-ag/GenerateCode.ag" #-}- _tlIisNil- {-# LINE 6045 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 313, column 12)- _hdOnextIntra =- ({-# LINE 313 "src-ag/GenerateCode.ag" #-}- _tlIintra- {-# LINE 6051 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 314, column 12)- _hdOnextIntraVars =- ({-# LINE 314 "src-ag/GenerateCode.ag" #-}- _tlIintraVars- {-# LINE 6057 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 315, column 12)- _lhsOintra =- ({-# LINE 315 "src-ag/GenerateCode.ag" #-}- _hdIintra- {-# LINE 6063 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 316, column 12)- _lhsOintraVars =- ({-# LINE 316 "src-ag/GenerateCode.ag" #-}- _hdIintraVars- {-# LINE 6069 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 431, column 11)- _lhsOdecls =- ({-# LINE 431 "src-ag/GenerateCode.ag" #-}- _hdIdecls- {-# LINE 6075 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 432, column 11)- _hdOdecls =- ({-# LINE 432 "src-ag/GenerateCode.ag" #-}- _tlIdecls- {-# LINE 6081 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)- _lhsOcomments =- ({-# LINE 868 "src-ag/GenerateCode.ag" #-}- _hdIcomments ++ _tlIcomments- {-# LINE 6087 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 561, column 44)- _lhsOgatherInstVisitNrs =- ({-# LINE 561 "src-ag/GenerateCode.ag" #-}- _hdIgatherInstVisitNrs `Map.union` _tlIgatherInstVisitNrs- {-# LINE 6093 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 1146, column 61)- _lhsOsemNames =- ({-# LINE 1146 "src-ag/GenerateCode.ag" #-}- _hdIsemNames ++ _tlIsemNames- {-# LINE 6099 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (up)- _lhsOvisitedSet =- ({-# LINE 145 "src-ag/GenerateCode.ag" #-}- _tlIvisitedSet- {-# LINE 6105 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOallNts =- ({-# LINE 132 "src-ag/GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 6111 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOallPragmas =- ({-# LINE 73 "src-ag/GenerateCode.ag" #-}- _lhsIallPragmas- {-# LINE 6117 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOaroundMap =- ({-# LINE 580 "src-ag/GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 6123 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOchildren =- ({-# LINE 410 "src-ag/GenerateCode.ag" #-}- _lhsIchildren- {-# LINE 6129 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOcon =- ({-# LINE 89 "src-ag/GenerateCode.ag" #-}- _lhsIcon- {-# LINE 6135 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOcontextMap =- ({-# LINE 115 "src-ag/GenerateCode.ag" #-}- _lhsIcontextMap- {-# LINE 6141 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOinh =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIinh- {-# LINE 6147 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOinstVisitNrs =- ({-# LINE 560 "src-ag/GenerateCode.ag" #-}- _lhsIinstVisitNrs- {-# LINE 6153 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 596 "src-ag/GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 6159 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOnr =- ({-# LINE 278 "src-ag/GenerateCode.ag" #-}- _lhsInr- {-# LINE 6165 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOnt =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsInt- {-# LINE 6171 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_case =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 6177 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_cata =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 6183 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_costcentre =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 6189 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_data =- ({-# LINE 48 "src-ag/GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 6195 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_linePragmas =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 6201 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_monadic =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 6207 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_newtypes =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 6213 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_pretty =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 6219 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_rename =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 6225 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_sem =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 6231 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_sig =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 6237 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_splitsems =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 6243 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_strictwrap =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 6249 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_traces =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 6255 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_unbox =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 6261 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 50 "src-ag/GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 6267 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOparamInstMap =- ({-# LINE 101 "src-ag/GenerateCode.ag" #-}- _lhsIparamInstMap- {-# LINE 6273 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOparamMap =- ({-# LINE 95 "src-ag/GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 6279 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOprefix =- ({-# LINE 49 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 6285 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOquantMap =- ({-# LINE 115 "src-ag/GenerateCode.ag" #-}- _lhsIquantMap- {-# LINE 6291 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOsyn =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 6297 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOterminals =- ({-# LINE 90 "src-ag/GenerateCode.ag" #-}- _lhsIterminals- {-# LINE 6303 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOunfoldSemDom =- ({-# LINE 750 "src-ag/GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 6309 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOvisitedSet =- ({-# LINE 145 "src-ag/GenerateCode.ag" #-}- _lhsIvisitedSet- {-# LINE 6315 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOwith_sig =- ({-# LINE 851 "src-ag/GenerateCode.ag" #-}- _lhsIwith_sig- {-# LINE 6321 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOwrappers =- ({-# LINE 987 "src-ag/GenerateCode.ag" #-}- _lhsIwrappers- {-# LINE 6327 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOallNts =- ({-# LINE 132 "src-ag/GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 6333 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOallPragmas =- ({-# LINE 73 "src-ag/GenerateCode.ag" #-}- _lhsIallPragmas- {-# LINE 6339 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOaroundMap =- ({-# LINE 580 "src-ag/GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 6345 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOchildren =- ({-# LINE 410 "src-ag/GenerateCode.ag" #-}- _lhsIchildren- {-# LINE 6351 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOcon =- ({-# LINE 89 "src-ag/GenerateCode.ag" #-}- _lhsIcon- {-# LINE 6357 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOcontextMap =- ({-# LINE 115 "src-ag/GenerateCode.ag" #-}- _lhsIcontextMap- {-# LINE 6363 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOinh =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIinh- {-# LINE 6369 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOinstVisitNrs =- ({-# LINE 560 "src-ag/GenerateCode.ag" #-}- _lhsIinstVisitNrs- {-# LINE 6375 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 596 "src-ag/GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 6381 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOnt =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsInt- {-# LINE 6387 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_case =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 6393 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_cata =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 6399 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_costcentre =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 6405 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_data =- ({-# LINE 48 "src-ag/GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 6411 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_linePragmas =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 6417 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_monadic =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 6423 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_newtypes =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 6429 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_pretty =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 6435 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_rename =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 6441 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_sem =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 6447 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_sig =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 6453 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_splitsems =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 6459 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_strictwrap =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 6465 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_traces =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 6471 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_unbox =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 6477 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 50 "src-ag/GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 6483 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOparamInstMap =- ({-# LINE 101 "src-ag/GenerateCode.ag" #-}- _lhsIparamInstMap- {-# LINE 6489 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOparamMap =- ({-# LINE 95 "src-ag/GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 6495 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOprefix =- ({-# LINE 49 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 6501 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOquantMap =- ({-# LINE 115 "src-ag/GenerateCode.ag" #-}- _lhsIquantMap- {-# LINE 6507 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOsyn =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 6513 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOterminals =- ({-# LINE 90 "src-ag/GenerateCode.ag" #-}- _lhsIterminals- {-# LINE 6519 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOunfoldSemDom =- ({-# LINE 750 "src-ag/GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 6525 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (chain)- _tlOvisitedSet =- ({-# LINE 145 "src-ag/GenerateCode.ag" #-}- _hdIvisitedSet- {-# LINE 6531 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOwith_sig =- ({-# LINE 851 "src-ag/GenerateCode.ag" #-}- _lhsIwith_sig- {-# LINE 6537 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOwrappers =- ({-# LINE 987 "src-ag/GenerateCode.ag" #-}- _lhsIwrappers- {-# LINE 6543 "src-ag/GenerateCode.hs" #-}- )- ( _hdIcomments,_hdIdecls,_hdIgatherInstVisitNrs,_hdIintra,_hdIintraVars,_hdIsemNames,_hdIvisitedSet) =- hd_ _hdOallNts _hdOallPragmas _hdOaroundMap _hdOchildren _hdOcon _hdOcontextMap _hdOdecls _hdOinh _hdOinstVisitNrs _hdOisLast _hdOmergeMap _hdOnextIntra _hdOnextIntraVars _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamInstMap _hdOparamMap _hdOprefix _hdOquantMap _hdOsyn _hdOterminals _hdOunfoldSemDom _hdOvisitedSet _hdOwith_sig _hdOwrappers - ( _tlIcomments,_tlIdecls,_tlIgatherInstVisitNrs,_tlIintra,_tlIintraVars,_tlIisNil,_tlIsemNames,_tlIvisitedSet) =- tl_ _tlOallNts _tlOallPragmas _tlOaroundMap _tlOchildren _tlOcon _tlOcontextMap _tlOinh _tlOinstVisitNrs _tlOmergeMap _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamInstMap _tlOparamMap _tlOprefix _tlOquantMap _tlOsyn _tlOterminals _tlOunfoldSemDom _tlOvisitedSet _tlOwith_sig _tlOwrappers - in ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames,_lhsOvisitedSet))) )-sem_CVisits_Nil :: T_CVisits -sem_CVisits_Nil =- (T_CVisits (\ _lhsIallNts- _lhsIallPragmas- _lhsIaroundMap- _lhsIchildren- _lhsIcon- _lhsIcontextMap- _lhsIinh- _lhsIinstVisitNrs- _lhsImergeMap- _lhsInr- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_costcentre- _lhsIo_data- _lhsIo_linePragmas- _lhsIo_monadic- _lhsIo_newtypes- _lhsIo_pretty- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_splitsems- _lhsIo_strictwrap- _lhsIo_traces- _lhsIo_unbox- _lhsIoptions- _lhsIparamInstMap- _lhsIparamMap- _lhsIprefix- _lhsIquantMap- _lhsIsyn- _lhsIterminals- _lhsIunfoldSemDom- _lhsIvisitedSet- _lhsIwith_sig- _lhsIwrappers ->- (let _lhsOisNil :: Bool- _lhsOintra :: Exprs- _lhsOintraVars :: (Set String)- _lhsOdecls :: Decls- _lhsOcomments :: ([String])- _lhsOgatherInstVisitNrs :: (Map Identifier Int)- _lhsOsemNames :: ([String])- _lhsOvisitedSet :: (Set Identifier)- -- "src-ag/GenerateCode.ag"(line 297, column 10)- _lhsOisNil =- ({-# LINE 297 "src-ag/GenerateCode.ag" #-}- True- {-# LINE 6601 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 317, column 10)- _lhsOintra =- ({-# LINE 317 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 6607 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 318, column 10)- _lhsOintraVars =- ({-# LINE 318 "src-ag/GenerateCode.ag" #-}- Set.empty- {-# LINE 6613 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 430, column 11)- _lhsOdecls =- ({-# LINE 430 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 6619 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)- _lhsOcomments =- ({-# LINE 868 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 6625 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 561, column 44)- _lhsOgatherInstVisitNrs =- ({-# LINE 561 "src-ag/GenerateCode.ag" #-}- Map.empty- {-# LINE 6631 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 1146, column 61)- _lhsOsemNames =- ({-# LINE 1146 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 6637 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (chain)- _lhsOvisitedSet =- ({-# LINE 145 "src-ag/GenerateCode.ag" #-}- _lhsIvisitedSet- {-# LINE 6643 "src-ag/GenerateCode.hs" #-}- )- in ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames,_lhsOvisitedSet))) )--- DeclBlocks ---------------------------------------------------{-- visit 0:- inherited attributes:- blockNr : Int- lastExprVars : [String]- nextVisitDecls : [Decl]- optCase : Bool- prefix : String- synthesized attributes:- callExpr : Expr- decls : [Decl]- freeVars : [String]- alternatives:- alternative DeclBlock:- child defs : {[Decl]}- child visit : {Decl}- child next : DeclBlocks - visit 0:- local lambdaName : _- local pragmaDecl : _- local freeVars : _- local decl : _- alternative DeclTerminator:- child defs : {[Decl]}- child result : {Expr}- visit 0:- local lambdaName : _- local pragmaDecl : _- local freeVars : _--}--- cata-sem_DeclBlocks :: DeclBlocks ->- T_DeclBlocks -sem_DeclBlocks (DeclBlock _defs _visit _next ) =- (sem_DeclBlocks_DeclBlock _defs _visit (sem_DeclBlocks _next ) )-sem_DeclBlocks (DeclTerminator _defs _result ) =- (sem_DeclBlocks_DeclTerminator _defs _result )--- semantic domain-newtype T_DeclBlocks = T_DeclBlocks (Int ->- ([String]) ->- ([Decl]) ->- Bool ->- String ->- ( Expr,([Decl]),([String])))-data Inh_DeclBlocks = Inh_DeclBlocks {blockNr_Inh_DeclBlocks :: !(Int),lastExprVars_Inh_DeclBlocks :: !(([String])),nextVisitDecls_Inh_DeclBlocks :: !(([Decl])),optCase_Inh_DeclBlocks :: !(Bool),prefix_Inh_DeclBlocks :: !(String)}-data Syn_DeclBlocks = Syn_DeclBlocks {callExpr_Syn_DeclBlocks :: !(Expr),decls_Syn_DeclBlocks :: !(([Decl])),freeVars_Syn_DeclBlocks :: !(([String]))}-wrap_DeclBlocks :: T_DeclBlocks ->- Inh_DeclBlocks ->- Syn_DeclBlocks -wrap_DeclBlocks (T_DeclBlocks sem ) (Inh_DeclBlocks _lhsIblockNr _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix ) =- (let ( _lhsOcallExpr,_lhsOdecls,_lhsOfreeVars) = sem _lhsIblockNr _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix - in (Syn_DeclBlocks _lhsOcallExpr _lhsOdecls _lhsOfreeVars ))-sem_DeclBlocks_DeclBlock :: ([Decl]) ->- Decl ->- T_DeclBlocks ->- T_DeclBlocks -sem_DeclBlocks_DeclBlock defs_ visit_ (T_DeclBlocks next_ ) =- (T_DeclBlocks (\ _lhsIblockNr- _lhsIlastExprVars- _lhsInextVisitDecls- _lhsIoptCase- _lhsIprefix ->- (let _nextOblockNr :: Int- _lhsOcallExpr :: Expr- _lhsOdecls :: ([Decl])- _lhsOfreeVars :: ([String])- _nextOlastExprVars :: ([String])- _nextOnextVisitDecls :: ([Decl])- _nextOoptCase :: Bool- _nextOprefix :: String- _nextIcallExpr :: Expr- _nextIdecls :: ([Decl])- _nextIfreeVars :: ([String])- -- "src-ag/GenerateCode.ag"(line 662, column 7)- _nextOblockNr =- ({-# LINE 662 "src-ag/GenerateCode.ag" #-}- _lhsIblockNr + 1- {-# LINE 6724 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 667, column 7)- _lambdaName =- ({-# LINE 667 "src-ag/GenerateCode.ag" #-}- _lhsIprefix ++ "_block" ++ show _lhsIblockNr- {-# LINE 6730 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 668, column 7)- _pragmaDecl =- ({-# LINE 668 "src-ag/GenerateCode.ag" #-}- PragmaDecl ("NOINLINE " ++ _lambdaName )- {-# LINE 6736 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 669, column 7)- _lhsOcallExpr =- ({-# LINE 669 "src-ag/GenerateCode.ag" #-}- App _lambdaName (map SimpleExpr _freeVars )- {-# LINE 6742 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 673, column 7)- _freeVars =- ({-# LINE 673 "src-ag/GenerateCode.ag" #-}- freevars _nextIfreeVars (visit_ : defs_)- {-# LINE 6748 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 680, column 7)- _decl =- ({-# LINE 680 "src-ag/GenerateCode.ag" #-}- mkBlockLambda _lhsIoptCase _lambdaName _freeVars (defs_ ++ [visit_]) _nextIcallExpr- {-# LINE 6754 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 681, column 7)- _lhsOdecls =- ({-# LINE 681 "src-ag/GenerateCode.ag" #-}- (if _lhsIblockNr > 1 then [_pragmaDecl ] else []) ++ [_decl ] ++ _nextIdecls- {-# LINE 6760 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (from local)- _lhsOfreeVars =- ({-# LINE 664 "src-ag/GenerateCode.ag" #-}- _freeVars- {-# LINE 6766 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _nextOlastExprVars =- ({-# LINE 648 "src-ag/GenerateCode.ag" #-}- _lhsIlastExprVars- {-# LINE 6772 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _nextOnextVisitDecls =- ({-# LINE 648 "src-ag/GenerateCode.ag" #-}- _lhsInextVisitDecls- {-# LINE 6778 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _nextOoptCase =- ({-# LINE 648 "src-ag/GenerateCode.ag" #-}- _lhsIoptCase- {-# LINE 6784 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _nextOprefix =- ({-# LINE 648 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 6790 "src-ag/GenerateCode.hs" #-}- )- ( _nextIcallExpr,_nextIdecls,_nextIfreeVars) =- next_ _nextOblockNr _nextOlastExprVars _nextOnextVisitDecls _nextOoptCase _nextOprefix - in ( _lhsOcallExpr,_lhsOdecls,_lhsOfreeVars))) )-sem_DeclBlocks_DeclTerminator :: ([Decl]) ->- Expr ->- T_DeclBlocks -sem_DeclBlocks_DeclTerminator defs_ result_ =- (T_DeclBlocks (\ _lhsIblockNr- _lhsIlastExprVars- _lhsInextVisitDecls- _lhsIoptCase- _lhsIprefix ->- (let _lhsOcallExpr :: Expr- _lhsOdecls :: ([Decl])- _lhsOfreeVars :: ([String])- -- "src-ag/GenerateCode.ag"(line 667, column 7)- _lambdaName =- ({-# LINE 667 "src-ag/GenerateCode.ag" #-}- _lhsIprefix ++ "_block" ++ show _lhsIblockNr- {-# LINE 6811 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 668, column 7)- _pragmaDecl =- ({-# LINE 668 "src-ag/GenerateCode.ag" #-}- PragmaDecl ("NOINLINE " ++ _lambdaName )- {-# LINE 6817 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 669, column 7)- _lhsOcallExpr =- ({-# LINE 669 "src-ag/GenerateCode.ag" #-}- App _lambdaName (map SimpleExpr _freeVars )- {-# LINE 6823 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 671, column 7)- _freeVars =- ({-# LINE 671 "src-ag/GenerateCode.ag" #-}- freevars _lhsIlastExprVars (defs_ ++ _lhsInextVisitDecls)- {-# LINE 6829 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 678, column 7)- _lhsOdecls =- ({-# LINE 678 "src-ag/GenerateCode.ag" #-}- [ mkBlockLambda _lhsIoptCase _lambdaName _freeVars (defs_ ++ _lhsInextVisitDecls) result_ ]- {-# LINE 6835 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (from local)- _lhsOfreeVars =- ({-# LINE 664 "src-ag/GenerateCode.ag" #-}- _freeVars- {-# LINE 6841 "src-ag/GenerateCode.hs" #-}- )- in ( _lhsOcallExpr,_lhsOdecls,_lhsOfreeVars))) )--- DeclBlocksRoot -----------------------------------------------{-- visit 0:- inherited attributes:- lastExprVars : [String]- nextVisitDecls : [Decl]- optCase : Bool- prefix : String- synthesized attributes:- firstCall : Expr- lambdas : [Decl]- alternatives:- alternative DeclBlocksRoot:- child blocks : DeclBlocks --}--- cata-sem_DeclBlocksRoot :: DeclBlocksRoot ->- T_DeclBlocksRoot -sem_DeclBlocksRoot (DeclBlocksRoot _blocks ) =- (sem_DeclBlocksRoot_DeclBlocksRoot (sem_DeclBlocks _blocks ) )--- semantic domain-newtype T_DeclBlocksRoot = T_DeclBlocksRoot (([String]) ->- ([Decl]) ->- Bool ->- String ->- ( Expr,([Decl])))-data Inh_DeclBlocksRoot = Inh_DeclBlocksRoot {lastExprVars_Inh_DeclBlocksRoot :: !(([String])),nextVisitDecls_Inh_DeclBlocksRoot :: !(([Decl])),optCase_Inh_DeclBlocksRoot :: !(Bool),prefix_Inh_DeclBlocksRoot :: !(String)}-data Syn_DeclBlocksRoot = Syn_DeclBlocksRoot {firstCall_Syn_DeclBlocksRoot :: !(Expr),lambdas_Syn_DeclBlocksRoot :: !(([Decl]))}-wrap_DeclBlocksRoot :: T_DeclBlocksRoot ->- Inh_DeclBlocksRoot ->- Syn_DeclBlocksRoot -wrap_DeclBlocksRoot (T_DeclBlocksRoot sem ) (Inh_DeclBlocksRoot _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix ) =- (let ( _lhsOfirstCall,_lhsOlambdas) = sem _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix - in (Syn_DeclBlocksRoot _lhsOfirstCall _lhsOlambdas ))-sem_DeclBlocksRoot_DeclBlocksRoot :: T_DeclBlocks ->- T_DeclBlocksRoot -sem_DeclBlocksRoot_DeclBlocksRoot (T_DeclBlocks blocks_ ) =- (T_DeclBlocksRoot (\ _lhsIlastExprVars- _lhsInextVisitDecls- _lhsIoptCase- _lhsIprefix ->- (let _lhsOlambdas :: ([Decl])- _lhsOfirstCall :: Expr- _blocksOblockNr :: Int- _blocksOlastExprVars :: ([String])- _blocksOnextVisitDecls :: ([Decl])- _blocksOoptCase :: Bool- _blocksOprefix :: String- _blocksIcallExpr :: Expr- _blocksIdecls :: ([Decl])- _blocksIfreeVars :: ([String])- -- "src-ag/GenerateCode.ag"(line 653, column 7)- _lhsOlambdas =- ({-# LINE 653 "src-ag/GenerateCode.ag" #-}- _blocksIdecls- {-# LINE 6899 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 654, column 7)- _lhsOfirstCall =- ({-# LINE 654 "src-ag/GenerateCode.ag" #-}- _blocksIcallExpr- {-# LINE 6905 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 659, column 7)- _blocksOblockNr =- ({-# LINE 659 "src-ag/GenerateCode.ag" #-}- 1- {-# LINE 6911 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _blocksOlastExprVars =- ({-# LINE 648 "src-ag/GenerateCode.ag" #-}- _lhsIlastExprVars- {-# LINE 6917 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _blocksOnextVisitDecls =- ({-# LINE 648 "src-ag/GenerateCode.ag" #-}- _lhsInextVisitDecls- {-# LINE 6923 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _blocksOoptCase =- ({-# LINE 648 "src-ag/GenerateCode.ag" #-}- _lhsIoptCase- {-# LINE 6929 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _blocksOprefix =- ({-# LINE 648 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 6935 "src-ag/GenerateCode.hs" #-}- )- ( _blocksIcallExpr,_blocksIdecls,_blocksIfreeVars) =- blocks_ _blocksOblockNr _blocksOlastExprVars _blocksOnextVisitDecls _blocksOoptCase _blocksOprefix - in ( _lhsOfirstCall,_lhsOlambdas))) )--- Pattern ------------------------------------------------------{-- visit 0:- synthesized attributes:- copy : SELF - definedInsts : [Identifier]- patternAttributes : [(Identifier, Identifier)]- alternatives:- alternative Alias:- child field : {Identifier}- child attr : {Identifier}- child pat : Pattern - 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 ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) )-sem_Pattern (Constr _name _pats ) =- (sem_Pattern_Constr _name (sem_Patterns _pats ) )-sem_Pattern (Irrefutable _pat ) =- (sem_Pattern_Irrefutable (sem_Pattern _pat ) )-sem_Pattern (Product _pos _pats ) =- (sem_Pattern_Product _pos (sem_Patterns _pats ) )-sem_Pattern (Underscore _pos ) =- (sem_Pattern_Underscore _pos )--- semantic domain-newtype T_Pattern = T_Pattern (( Pattern ,([Identifier]),([(Identifier, Identifier)])))-data Inh_Pattern = Inh_Pattern {}-data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: !(Pattern ),definedInsts_Syn_Pattern :: !(([Identifier])),patternAttributes_Syn_Pattern :: !(([(Identifier, Identifier)]))}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern (T_Pattern sem ) (Inh_Pattern ) =- (let ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes) = sem - in (Syn_Pattern _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes ))-sem_Pattern_Alias :: Identifier ->- Identifier ->- T_Pattern ->- T_Pattern -sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) =- (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])- _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Pattern - _patIcopy :: Pattern - _patIdefinedInsts :: ([Identifier])- _patIpatternAttributes :: ([(Identifier, Identifier)])- -- "src-ag/GenerateCode.ag"(line 263, column 11)- _lhsOdefinedInsts =- ({-# LINE 263 "src-ag/GenerateCode.ag" #-}- (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts- {-# LINE 7011 "src-ag/GenerateCode.hs" #-}- )- -- "src-ag/GenerateCode.ag"(line 271, column 7)- _lhsOpatternAttributes =- ({-# LINE 271 "src-ag/GenerateCode.ag" #-}- (field_,attr_) : _patIpatternAttributes- {-# LINE 7017 "src-ag/GenerateCode.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Alias field_ attr_ _patIcopy- {-# LINE 7023 "src-ag/GenerateCode.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 7029 "src-ag/GenerateCode.hs" #-}- )- ( _patIcopy,_patIdefinedInsts,_patIpatternAttributes) =- pat_ - in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )-sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr name_ (T_Patterns pats_ ) =- (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])- _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Pattern - _patsIcopy :: Patterns - _patsIdefinedInsts :: ([Identifier])- _patsIpatternAttributes :: ([(Identifier, Identifier)])- -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)- _lhsOdefinedInsts =- ({-# LINE 261 "src-ag/GenerateCode.ag" #-}- _patsIdefinedInsts- {-# LINE 7048 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 268, column 47)- _lhsOpatternAttributes =- ({-# LINE 268 "src-ag/GenerateCode.ag" #-}- _patsIpatternAttributes- {-# LINE 7054 "src-ag/GenerateCode.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 7060 "src-ag/GenerateCode.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 7066 "src-ag/GenerateCode.hs" #-}- )- ( _patsIcopy,_patsIdefinedInsts,_patsIpatternAttributes) =- pats_ - in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable (T_Pattern pat_ ) =- (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])- _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Pattern - _patIcopy :: Pattern - _patIdefinedInsts :: ([Identifier])- _patIpatternAttributes :: ([(Identifier, Identifier)])- -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)- _lhsOdefinedInsts =- ({-# LINE 261 "src-ag/GenerateCode.ag" #-}- _patIdefinedInsts- {-# LINE 7084 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 268, column 47)- _lhsOpatternAttributes =- ({-# LINE 268 "src-ag/GenerateCode.ag" #-}- _patIpatternAttributes- {-# LINE 7090 "src-ag/GenerateCode.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 7096 "src-ag/GenerateCode.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 7102 "src-ag/GenerateCode.hs" #-}- )- ( _patIcopy,_patIdefinedInsts,_patIpatternAttributes) =- pat_ - in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )-sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product pos_ (T_Patterns pats_ ) =- (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])- _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Pattern - _patsIcopy :: Patterns - _patsIdefinedInsts :: ([Identifier])- _patsIpatternAttributes :: ([(Identifier, Identifier)])- -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)- _lhsOdefinedInsts =- ({-# LINE 261 "src-ag/GenerateCode.ag" #-}- _patsIdefinedInsts- {-# LINE 7121 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 268, column 47)- _lhsOpatternAttributes =- ({-# LINE 268 "src-ag/GenerateCode.ag" #-}- _patsIpatternAttributes- {-# LINE 7127 "src-ag/GenerateCode.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 7133 "src-ag/GenerateCode.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 7139 "src-ag/GenerateCode.hs" #-}- )- ( _patsIcopy,_patsIdefinedInsts,_patsIpatternAttributes) =- pats_ - in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )-sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore pos_ =- (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])- _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Pattern - -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)- _lhsOdefinedInsts =- ({-# LINE 261 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 7154 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 268, column 47)- _lhsOpatternAttributes =- ({-# LINE 268 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 7160 "src-ag/GenerateCode.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Underscore pos_- {-# LINE 7166 "src-ag/GenerateCode.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 7172 "src-ag/GenerateCode.hs" #-}- )- in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )--- Patterns -----------------------------------------------------{-- visit 0:- synthesized attributes:- copy : SELF - definedInsts : [Identifier]- patternAttributes : [(Identifier, Identifier)]- alternatives:- alternative Cons:- child hd : Pattern - child tl : Patterns - visit 0:- local copy : _- alternative Nil:- visit 0:- local copy : _--}--- cata-sem_Patterns :: Patterns ->- T_Patterns -sem_Patterns list =- (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list) )--- semantic domain-newtype T_Patterns = T_Patterns (( Patterns ,([Identifier]),([(Identifier, Identifier)])))-data Inh_Patterns = Inh_Patterns {}-data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: !(Patterns ),definedInsts_Syn_Patterns :: !(([Identifier])),patternAttributes_Syn_Patterns :: !(([(Identifier, Identifier)]))}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns (T_Patterns sem ) (Inh_Patterns ) =- (let ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes) = sem - in (Syn_Patterns _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) =- (T_Patterns (let _lhsOdefinedInsts :: ([Identifier])- _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Patterns - _hdIcopy :: Pattern - _hdIdefinedInsts :: ([Identifier])- _hdIpatternAttributes :: ([(Identifier, Identifier)])- _tlIcopy :: Patterns - _tlIdefinedInsts :: ([Identifier])- _tlIpatternAttributes :: ([(Identifier, Identifier)])- -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)- _lhsOdefinedInsts =- ({-# LINE 261 "src-ag/GenerateCode.ag" #-}- _hdIdefinedInsts ++ _tlIdefinedInsts- {-# LINE 7224 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 268, column 47)- _lhsOpatternAttributes =- ({-# LINE 268 "src-ag/GenerateCode.ag" #-}- _hdIpatternAttributes ++ _tlIpatternAttributes- {-# LINE 7230 "src-ag/GenerateCode.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 7236 "src-ag/GenerateCode.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 7242 "src-ag/GenerateCode.hs" #-}- )- ( _hdIcopy,_hdIdefinedInsts,_hdIpatternAttributes) =- hd_ - ( _tlIcopy,_tlIdefinedInsts,_tlIpatternAttributes) =- tl_ - in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =- (T_Patterns (let _lhsOdefinedInsts :: ([Identifier])- _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Patterns - -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)- _lhsOdefinedInsts =- ({-# LINE 261 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 7258 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 268, column 47)- _lhsOpatternAttributes =- ({-# LINE 268 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 7264 "src-ag/GenerateCode.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- []- {-# LINE 7270 "src-ag/GenerateCode.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 7276 "src-ag/GenerateCode.hs" #-}- )- in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )--- Sequence -----------------------------------------------------{-- visit 0:- inherited attributes:- allNts : Set NontermIdent- aroundMap : Set Identifier- children : [(Identifier,Type,ChildKind)]- con : ConstructorIdent- inh : Attributes- instVisitNrs : Map Identifier Int- lastExpr : Expr- mergeMap : Map Identifier (Identifier, [Identifier])- nr : Int- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramInstMap : Map Identifier (NontermIdent, [String])- paramMap : ParamMap- prefix : String- syn : Attributes- terminals : [Identifier]- unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type- what : String- chained attributes:- declsAbove : [Decl]- visitedSet : Set Identifier- synthesized attributes:- allTpsFound : Bool- blockDecls : DeclBlocks - comments : [String]- decls : Decls- definedInsts : [Identifier]- exprs : Exprs- tSigs : [Decl]- tps : [Type]- usedVars : Set String- alternatives:- alternative Cons:- child hd : CRule - child tl : Sequence - alternative Nil:--}--- cata-sem_Sequence :: Sequence ->- T_Sequence -sem_Sequence list =- (Prelude.foldr sem_Sequence_Cons sem_Sequence_Nil (Prelude.map sem_CRule list) )--- semantic domain-newtype T_Sequence = T_Sequence ((Set NontermIdent) ->- (Set Identifier) ->- ([(Identifier,Type,ChildKind)]) ->- ConstructorIdent ->- ([Decl]) ->- Attributes ->- (Map Identifier Int) ->- Expr ->- (Map Identifier (Identifier, [Identifier])) ->- Int ->- NontermIdent ->- Bool ->- Bool ->- Bool ->- (Maybe Bool) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Options ->- (Map Identifier (NontermIdent, [String])) ->- ParamMap ->- String ->- Attributes ->- ([Identifier]) ->- (NontermIdent -> Int -> [String] -> Code.Type) ->- (Set Identifier) ->- String ->- ( Bool,DeclBlocks ,([String]),Decls,([Decl]),([Identifier]),Exprs,([Decl]),([Type]),(Set String),(Set Identifier)))-data Inh_Sequence = Inh_Sequence {allNts_Inh_Sequence :: !((Set NontermIdent)),aroundMap_Inh_Sequence :: !((Set Identifier)),children_Inh_Sequence :: !(([(Identifier,Type,ChildKind)])),con_Inh_Sequence :: !(ConstructorIdent),declsAbove_Inh_Sequence :: !(([Decl])),inh_Inh_Sequence :: !(Attributes),instVisitNrs_Inh_Sequence :: !((Map Identifier Int)),lastExpr_Inh_Sequence :: !(Expr),mergeMap_Inh_Sequence :: !((Map Identifier (Identifier, [Identifier]))),nr_Inh_Sequence :: !(Int),nt_Inh_Sequence :: !(NontermIdent),o_case_Inh_Sequence :: !(Bool),o_cata_Inh_Sequence :: !(Bool),o_costcentre_Inh_Sequence :: !(Bool),o_data_Inh_Sequence :: !((Maybe Bool)),o_linePragmas_Inh_Sequence :: !(Bool),o_monadic_Inh_Sequence :: !(Bool),o_newtypes_Inh_Sequence :: !(Bool),o_pretty_Inh_Sequence :: !(Bool),o_rename_Inh_Sequence :: !(Bool),o_sem_Inh_Sequence :: !(Bool),o_sig_Inh_Sequence :: !(Bool),o_splitsems_Inh_Sequence :: !(Bool),o_strictwrap_Inh_Sequence :: !(Bool),o_traces_Inh_Sequence :: !(Bool),o_unbox_Inh_Sequence :: !(Bool),options_Inh_Sequence :: !(Options),paramInstMap_Inh_Sequence :: !((Map Identifier (NontermIdent, [String]))),paramMap_Inh_Sequence :: !(ParamMap),prefix_Inh_Sequence :: !(String),syn_Inh_Sequence :: !(Attributes),terminals_Inh_Sequence :: !(([Identifier])),unfoldSemDom_Inh_Sequence :: !((NontermIdent -> Int -> [String] -> Code.Type)),visitedSet_Inh_Sequence :: !((Set Identifier)),what_Inh_Sequence :: !(String)}-data Syn_Sequence = Syn_Sequence {allTpsFound_Syn_Sequence :: !(Bool),blockDecls_Syn_Sequence :: !(DeclBlocks ),comments_Syn_Sequence :: !(([String])),decls_Syn_Sequence :: !(Decls),declsAbove_Syn_Sequence :: !(([Decl])),definedInsts_Syn_Sequence :: !(([Identifier])),exprs_Syn_Sequence :: !(Exprs),tSigs_Syn_Sequence :: !(([Decl])),tps_Syn_Sequence :: !(([Type])),usedVars_Syn_Sequence :: !((Set String)),visitedSet_Syn_Sequence :: !((Set Identifier))}-wrap_Sequence :: T_Sequence ->- Inh_Sequence ->- Syn_Sequence -wrap_Sequence (T_Sequence sem ) (Inh_Sequence _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsIlastExpr _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat ) =- (let ( _lhsOallTpsFound,_lhsOblockDecls,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet) = sem _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsIlastExpr _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat - in (Syn_Sequence _lhsOallTpsFound _lhsOblockDecls _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet ))-sem_Sequence_Cons :: T_CRule ->- T_Sequence ->- T_Sequence -sem_Sequence_Cons (T_CRule hd_ ) (T_Sequence tl_ ) =- (T_Sequence (\ _lhsIallNts- _lhsIaroundMap- _lhsIchildren- _lhsIcon- _lhsIdeclsAbove- _lhsIinh- _lhsIinstVisitNrs- _lhsIlastExpr- _lhsImergeMap- _lhsInr- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_costcentre- _lhsIo_data- _lhsIo_linePragmas- _lhsIo_monadic- _lhsIo_newtypes- _lhsIo_pretty- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_splitsems- _lhsIo_strictwrap- _lhsIo_traces- _lhsIo_unbox- _lhsIoptions- _lhsIparamInstMap- _lhsIparamMap- _lhsIprefix- _lhsIsyn- _lhsIterminals- _lhsIunfoldSemDom- _lhsIvisitedSet- _lhsIwhat ->- (let _lhsOblockDecls :: DeclBlocks - _lhsOallTpsFound :: Bool- _lhsOcomments :: ([String])- _lhsOdecls :: Decls- _lhsOdefinedInsts :: ([Identifier])- _lhsOexprs :: Exprs- _lhsOtSigs :: ([Decl])- _lhsOtps :: ([Type])- _lhsOusedVars :: (Set String)- _lhsOdeclsAbove :: ([Decl])- _lhsOvisitedSet :: (Set Identifier)- _hdOallNts :: (Set NontermIdent)- _hdOaroundMap :: (Set Identifier)- _hdOchildren :: ([(Identifier,Type,ChildKind)])- _hdOcon :: ConstructorIdent- _hdOdeclsAbove :: ([Decl])- _hdOinh :: Attributes- _hdOinstVisitNrs :: (Map Identifier Int)- _hdOmergeMap :: (Map Identifier (Identifier, [Identifier]))- _hdOnr :: Int- _hdOnt :: NontermIdent- _hdOo_case :: Bool- _hdOo_cata :: Bool- _hdOo_costcentre :: Bool- _hdOo_data :: (Maybe Bool)- _hdOo_linePragmas :: Bool- _hdOo_monadic :: Bool- _hdOo_newtypes :: Bool- _hdOo_pretty :: Bool- _hdOo_rename :: Bool- _hdOo_sem :: Bool- _hdOo_sig :: Bool- _hdOo_splitsems :: Bool- _hdOo_strictwrap :: Bool- _hdOo_traces :: Bool- _hdOo_unbox :: Bool- _hdOoptions :: Options- _hdOparamInstMap :: (Map Identifier (NontermIdent, [String]))- _hdOparamMap :: ParamMap- _hdOprefix :: String- _hdOsyn :: Attributes- _hdOterminals :: ([Identifier])- _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _hdOvisitedSet :: (Set Identifier)- _hdOwhat :: String- _tlOallNts :: (Set NontermIdent)- _tlOaroundMap :: (Set Identifier)- _tlOchildren :: ([(Identifier,Type,ChildKind)])- _tlOcon :: ConstructorIdent- _tlOdeclsAbove :: ([Decl])- _tlOinh :: Attributes- _tlOinstVisitNrs :: (Map Identifier Int)- _tlOlastExpr :: Expr- _tlOmergeMap :: (Map Identifier (Identifier, [Identifier]))- _tlOnr :: Int- _tlOnt :: NontermIdent- _tlOo_case :: Bool- _tlOo_cata :: Bool- _tlOo_costcentre :: Bool- _tlOo_data :: (Maybe Bool)- _tlOo_linePragmas :: Bool- _tlOo_monadic :: Bool- _tlOo_newtypes :: Bool- _tlOo_pretty :: Bool- _tlOo_rename :: Bool- _tlOo_sem :: Bool- _tlOo_sig :: Bool- _tlOo_splitsems :: Bool- _tlOo_strictwrap :: Bool- _tlOo_traces :: Bool- _tlOo_unbox :: Bool- _tlOoptions :: Options- _tlOparamInstMap :: (Map Identifier (NontermIdent, [String]))- _tlOparamMap :: ParamMap- _tlOprefix :: String- _tlOsyn :: Attributes- _tlOterminals :: ([Identifier])- _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _tlOvisitedSet :: (Set Identifier)- _tlOwhat :: String- _hdIallTpsFound :: Bool- _hdIbldBlocksFun :: (DeclBlocks -> DeclBlocks)- _hdIcomments :: ([String])- _hdIdecls :: Decls- _hdIdeclsAbove :: ([Decl])- _hdIdefinedInsts :: ([Identifier])- _hdIexprs :: Exprs- _hdItSigs :: ([Decl])- _hdItps :: ([Type])- _hdIusedVars :: (Set String)- _hdIvisitedSet :: (Set Identifier)- _tlIallTpsFound :: Bool- _tlIblockDecls :: DeclBlocks - _tlIcomments :: ([String])- _tlIdecls :: Decls- _tlIdeclsAbove :: ([Decl])- _tlIdefinedInsts :: ([Identifier])- _tlIexprs :: Exprs- _tlItSigs :: ([Decl])- _tlItps :: ([Type])- _tlIusedVars :: (Set String)- _tlIvisitedSet :: (Set Identifier)- -- "src-ag/GenerateCode.ag"(line 622, column 7)- _lhsOblockDecls =- ({-# LINE 622 "src-ag/GenerateCode.ag" #-}- _hdIbldBlocksFun _tlIblockDecls- {-# LINE 7530 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 416, column 39)- _lhsOallTpsFound =- ({-# LINE 416 "src-ag/GenerateCode.ag" #-}- _hdIallTpsFound && _tlIallTpsFound- {-# LINE 7536 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)- _lhsOcomments =- ({-# LINE 868 "src-ag/GenerateCode.ag" #-}- _hdIcomments ++ _tlIcomments- {-# LINE 7542 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 155, column 34)- _lhsOdecls =- ({-# LINE 155 "src-ag/GenerateCode.ag" #-}- _hdIdecls ++ _tlIdecls- {-# LINE 7548 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)- _lhsOdefinedInsts =- ({-# LINE 261 "src-ag/GenerateCode.ag" #-}- _hdIdefinedInsts ++ _tlIdefinedInsts- {-# LINE 7554 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 334, column 34)- _lhsOexprs =- ({-# LINE 334 "src-ag/GenerateCode.ag" #-}- _hdIexprs ++ _tlIexprs- {-# LINE 7560 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 363, column 33)- _lhsOtSigs =- ({-# LINE 363 "src-ag/GenerateCode.ag" #-}- _hdItSigs ++ _tlItSigs- {-# LINE 7566 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 415, column 31)- _lhsOtps =- ({-# LINE 415 "src-ag/GenerateCode.ag" #-}- _hdItps ++ _tlItps- {-# LINE 7572 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 352, column 37)- _lhsOusedVars =- ({-# LINE 352 "src-ag/GenerateCode.ag" #-}- _hdIusedVars `Set.union` _tlIusedVars- {-# LINE 7578 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (up)- _lhsOdeclsAbove =- ({-# LINE 608 "src-ag/GenerateCode.ag" #-}- _tlIdeclsAbove- {-# LINE 7584 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (up)- _lhsOvisitedSet =- ({-# LINE 145 "src-ag/GenerateCode.ag" #-}- _tlIvisitedSet- {-# LINE 7590 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOallNts =- ({-# LINE 132 "src-ag/GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 7596 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOaroundMap =- ({-# LINE 580 "src-ag/GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 7602 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOchildren =- ({-# LINE 259 "src-ag/GenerateCode.ag" #-}- _lhsIchildren- {-# LINE 7608 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOcon =- ({-# LINE 89 "src-ag/GenerateCode.ag" #-}- _lhsIcon- {-# LINE 7614 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOdeclsAbove =- ({-# LINE 608 "src-ag/GenerateCode.ag" #-}- _lhsIdeclsAbove- {-# LINE 7620 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOinh =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIinh- {-# LINE 7626 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOinstVisitNrs =- ({-# LINE 560 "src-ag/GenerateCode.ag" #-}- _lhsIinstVisitNrs- {-# LINE 7632 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 596 "src-ag/GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 7638 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOnr =- ({-# LINE 278 "src-ag/GenerateCode.ag" #-}- _lhsInr- {-# LINE 7644 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOnt =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsInt- {-# LINE 7650 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_case =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 7656 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_cata =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 7662 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_costcentre =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 7668 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_data =- ({-# LINE 48 "src-ag/GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 7674 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_linePragmas =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 7680 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_monadic =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 7686 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_newtypes =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 7692 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_pretty =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 7698 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_rename =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 7704 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_sem =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 7710 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_sig =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 7716 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_splitsems =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 7722 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_strictwrap =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 7728 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_traces =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 7734 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOo_unbox =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 7740 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 50 "src-ag/GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 7746 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOparamInstMap =- ({-# LINE 101 "src-ag/GenerateCode.ag" #-}- _lhsIparamInstMap- {-# LINE 7752 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOparamMap =- ({-# LINE 95 "src-ag/GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 7758 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOprefix =- ({-# LINE 49 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 7764 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOsyn =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 7770 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOterminals =- ({-# LINE 90 "src-ag/GenerateCode.ag" #-}- _lhsIterminals- {-# LINE 7776 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOunfoldSemDom =- ({-# LINE 750 "src-ag/GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 7782 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOvisitedSet =- ({-# LINE 145 "src-ag/GenerateCode.ag" #-}- _lhsIvisitedSet- {-# LINE 7788 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _hdOwhat =- ({-# LINE 870 "src-ag/GenerateCode.ag" #-}- _lhsIwhat- {-# LINE 7794 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOallNts =- ({-# LINE 132 "src-ag/GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 7800 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOaroundMap =- ({-# LINE 580 "src-ag/GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 7806 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOchildren =- ({-# LINE 259 "src-ag/GenerateCode.ag" #-}- _lhsIchildren- {-# LINE 7812 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOcon =- ({-# LINE 89 "src-ag/GenerateCode.ag" #-}- _lhsIcon- {-# LINE 7818 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (chain)- _tlOdeclsAbove =- ({-# LINE 608 "src-ag/GenerateCode.ag" #-}- _hdIdeclsAbove- {-# LINE 7824 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOinh =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIinh- {-# LINE 7830 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOinstVisitNrs =- ({-# LINE 560 "src-ag/GenerateCode.ag" #-}- _lhsIinstVisitNrs- {-# LINE 7836 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOlastExpr =- ({-# LINE 606 "src-ag/GenerateCode.ag" #-}- _lhsIlastExpr- {-# LINE 7842 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 596 "src-ag/GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 7848 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOnr =- ({-# LINE 278 "src-ag/GenerateCode.ag" #-}- _lhsInr- {-# LINE 7854 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOnt =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsInt- {-# LINE 7860 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_case =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 7866 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_cata =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 7872 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_costcentre =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 7878 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_data =- ({-# LINE 48 "src-ag/GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 7884 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_linePragmas =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 7890 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_monadic =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 7896 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_newtypes =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 7902 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_pretty =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 7908 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_rename =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 7914 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_sem =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 7920 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_sig =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 7926 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_splitsems =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 7932 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_strictwrap =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 7938 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_traces =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 7944 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOo_unbox =- ({-# LINE 47 "src-ag/GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 7950 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 50 "src-ag/GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 7956 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOparamInstMap =- ({-# LINE 101 "src-ag/GenerateCode.ag" #-}- _lhsIparamInstMap- {-# LINE 7962 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOparamMap =- ({-# LINE 95 "src-ag/GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 7968 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOprefix =- ({-# LINE 49 "src-ag/GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 7974 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOsyn =- ({-# LINE 84 "src-ag/GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 7980 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOterminals =- ({-# LINE 90 "src-ag/GenerateCode.ag" #-}- _lhsIterminals- {-# LINE 7986 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOunfoldSemDom =- ({-# LINE 750 "src-ag/GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 7992 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (chain)- _tlOvisitedSet =- ({-# LINE 145 "src-ag/GenerateCode.ag" #-}- _hdIvisitedSet- {-# LINE 7998 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (down)- _tlOwhat =- ({-# LINE 870 "src-ag/GenerateCode.ag" #-}- _lhsIwhat- {-# LINE 8004 "src-ag/GenerateCode.hs" #-}- )- ( _hdIallTpsFound,_hdIbldBlocksFun,_hdIcomments,_hdIdecls,_hdIdeclsAbove,_hdIdefinedInsts,_hdIexprs,_hdItSigs,_hdItps,_hdIusedVars,_hdIvisitedSet) =- hd_ _hdOallNts _hdOaroundMap _hdOchildren _hdOcon _hdOdeclsAbove _hdOinh _hdOinstVisitNrs _hdOmergeMap _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamInstMap _hdOparamMap _hdOprefix _hdOsyn _hdOterminals _hdOunfoldSemDom _hdOvisitedSet _hdOwhat - ( _tlIallTpsFound,_tlIblockDecls,_tlIcomments,_tlIdecls,_tlIdeclsAbove,_tlIdefinedInsts,_tlIexprs,_tlItSigs,_tlItps,_tlIusedVars,_tlIvisitedSet) =- tl_ _tlOallNts _tlOaroundMap _tlOchildren _tlOcon _tlOdeclsAbove _tlOinh _tlOinstVisitNrs _tlOlastExpr _tlOmergeMap _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamInstMap _tlOparamMap _tlOprefix _tlOsyn _tlOterminals _tlOunfoldSemDom _tlOvisitedSet _tlOwhat - in ( _lhsOallTpsFound,_lhsOblockDecls,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet))) )-sem_Sequence_Nil :: T_Sequence -sem_Sequence_Nil =- (T_Sequence (\ _lhsIallNts- _lhsIaroundMap- _lhsIchildren- _lhsIcon- _lhsIdeclsAbove- _lhsIinh- _lhsIinstVisitNrs- _lhsIlastExpr- _lhsImergeMap- _lhsInr- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_costcentre- _lhsIo_data- _lhsIo_linePragmas- _lhsIo_monadic- _lhsIo_newtypes- _lhsIo_pretty- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_splitsems- _lhsIo_strictwrap- _lhsIo_traces- _lhsIo_unbox- _lhsIoptions- _lhsIparamInstMap- _lhsIparamMap- _lhsIprefix- _lhsIsyn- _lhsIterminals- _lhsIunfoldSemDom- _lhsIvisitedSet- _lhsIwhat ->- (let _lhsOblockDecls :: DeclBlocks - _lhsOallTpsFound :: Bool- _lhsOcomments :: ([String])- _lhsOdecls :: Decls- _lhsOdefinedInsts :: ([Identifier])- _lhsOexprs :: Exprs- _lhsOtSigs :: ([Decl])- _lhsOtps :: ([Type])- _lhsOusedVars :: (Set String)- _lhsOdeclsAbove :: ([Decl])- _lhsOvisitedSet :: (Set Identifier)- -- "src-ag/GenerateCode.ag"(line 624, column 7)- _lhsOblockDecls =- ({-# LINE 624 "src-ag/GenerateCode.ag" #-}- DeclTerminator _lhsIdeclsAbove _lhsIlastExpr- {-# LINE 8063 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 416, column 39)- _lhsOallTpsFound =- ({-# LINE 416 "src-ag/GenerateCode.ag" #-}- True- {-# LINE 8069 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)- _lhsOcomments =- ({-# LINE 868 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 8075 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 155, column 34)- _lhsOdecls =- ({-# LINE 155 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 8081 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)- _lhsOdefinedInsts =- ({-# LINE 261 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 8087 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 334, column 34)- _lhsOexprs =- ({-# LINE 334 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 8093 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 363, column 33)- _lhsOtSigs =- ({-# LINE 363 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 8099 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 415, column 31)- _lhsOtps =- ({-# LINE 415 "src-ag/GenerateCode.ag" #-}- []- {-# LINE 8105 "src-ag/GenerateCode.hs" #-}- )- -- use rule "src-ag/GenerateCode.ag"(line 352, column 37)- _lhsOusedVars =- ({-# LINE 352 "src-ag/GenerateCode.ag" #-}- Set.empty- {-# LINE 8111 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (chain)- _lhsOdeclsAbove =- ({-# LINE 608 "src-ag/GenerateCode.ag" #-}- _lhsIdeclsAbove- {-# LINE 8117 "src-ag/GenerateCode.hs" #-}- )- -- copy rule (chain)- _lhsOvisitedSet =- ({-# LINE 145 "src-ag/GenerateCode.ag" #-}- _lhsIvisitedSet- {-# LINE 8123 "src-ag/GenerateCode.hs" #-}- )- in ( _lhsOallTpsFound,_lhsOblockDecls,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet))) )+-- UUAGC 0.9.40.1 (src-ag/GenerateCode.ag)+module GenerateCode where+{-# LINE 9 "src-ag/GenerateCode.ag" #-}++import CommonTypes+import SequentialTypes+import Code hiding (Type)+import qualified Code+import Options+import CodeSyntax+import ErrorMessages+import GrammarInfo+import DeclBlocks++import qualified Data.Map as Map+import Data.Map(Map)+import qualified Data.Set as Set+import Data.Set(Set)+import qualified Data.Sequence as Seq+import Data.Sequence(Seq)+import UU.Scanner.Position+import TokenDef+import HsToken+import HsTokenScanner++import Data.List(partition,intersperse,intersect,(\\))+import Data.Maybe(fromJust,isJust)++import Debug.Trace+{-# LINE 33 "dist/build/GenerateCode.hs" #-}++{-# LINE 2 "src-ag/CodeSyntax.ag" #-}++import Patterns+import CommonTypes+import Data.Map(Map)+import Data.Set(Set)+{-# LINE 41 "dist/build/GenerateCode.hs" #-}++{-# LINE 2 "src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 48 "dist/build/GenerateCode.hs" #-}++{-# LINE 2 "src-ag/DeclBlocks.ag" #-}++import Code (Decl,Expr)+{-# LINE 53 "dist/build/GenerateCode.hs" #-}+{-# LINE 107 "src-ag/GenerateCode.ag" #-}++-- remove possible @v references in the types of a data type.+cleanupArg :: String -> String+cleanupArg s+ = case idEvalType (SimpleType s) of+ SimpleType s' -> s'+{-# LINE 61 "dist/build/GenerateCode.hs" #-}++{-# LINE 122 "src-ag/GenerateCode.ag" #-}++appContext :: ContextMap -> NontermIdent -> Code.Type -> Code.Type+appContext mp nt tp+ = maybe tp (\ctx -> CtxApp (map (\(n,ns) -> (getName n, ns)) ctx) tp) $ Map.lookup nt mp++appQuant :: QuantMap -> NontermIdent -> Code.Type -> Code.Type+appQuant mp nt tp+ = foldr QuantApp tp $ Map.findWithDefault [] nt mp+{-# LINE 72 "dist/build/GenerateCode.hs" #-}++{-# LINE 247 "src-ag/GenerateCode.ag" #-}++mkDecl True lhs rhs _ _ = Bind lhs rhs+mkDecl False lhs rhs s1 s2 = Decl lhs rhs s1 s2++unwrapSem :: Bool -> NontermIdent -> Expr -> Expr+unwrapSem False _ e = e+unwrapSem True nm e = Case e alts+ where alts = [CaseAlt left right]+ left = Fun (typeName nm 0) [SimpleExpr "x"]+ right = SimpleExpr "x"+{-# LINE 85 "dist/build/GenerateCode.hs" #-}++{-# LINE 537 "src-ag/GenerateCode.ag" #-}++mkLambdaArg :: String -> Maybe Code.Type -> Expr+mkLambdaArg nm Nothing = SimpleExpr nm+mkLambdaArg nm (Just tp) = TypedExpr (SimpleExpr nm) tp++mkLambda :: Exprs -> Expr -> Expr+mkLambda [] e = e+mkLambda xs e = Lambda xs e++mkSemFun :: Identifier -> Int -> Exprs -> Expr -> Expr+mkSemFun nt nr xs e = SemFun (typeName nt nr) xs e++typeAppStrs nm params = TypeApp (SimpleType nm) (map SimpleType params)++isHigherOrder :: ChildKind -> Bool+isHigherOrder ChildAttr = True+isHigherOrder _ = False++pickOrigType :: (Identifier, Type, ChildKind) -> (Identifier, Type, ChildKind)+pickOrigType (nm, _, virt@(ChildReplace x)) = (nm, x, virt)+pickOrigType x = x+{-# LINE 109 "dist/build/GenerateCode.hs" #-}++{-# LINE 633 "src-ag/GenerateCode.ag" #-}++mkPartitionedFunction :: String -> Bool -> [Decl] -> [String] -> DeclBlocks -> ([Decl], Expr)+mkPartitionedFunction prefix optCase nextVisitDecls lastExprVars cpsTree+ = let inh = Inh_DeclBlocksRoot { prefix_Inh_DeclBlocksRoot = prefix+ , optCase_Inh_DeclBlocksRoot = optCase+ , nextVisitDecls_Inh_DeclBlocksRoot = nextVisitDecls+ , lastExprVars_Inh_DeclBlocksRoot = lastExprVars+ }+ sem = sem_DeclBlocksRoot (DeclBlocksRoot cpsTree)+ syn = wrap_DeclBlocksRoot sem inh+ in (lambdas_Syn_DeclBlocksRoot syn, firstCall_Syn_DeclBlocksRoot syn)+{-# LINE 123 "dist/build/GenerateCode.hs" #-}++{-# LINE 683 "src-ag/GenerateCode.ag" #-}++freevars :: [String] -> [Decl] -> [String]+freevars additional decls+ = Set.toList (allused `Set.difference` alldefined)+ where+ allused = Set.unions (Set.fromList additional : map usedvars decls)+ alldefined = Set.unions (map definedvars decls)++ usedvars (Decl _ _ _ uses) = uses+ usedvars _ = Set.empty++ definedvars (Decl _ _ defs _) = defs+ definedvars _ = Set.empty++mkBlockLambda :: Bool -> String -> [String] -> [Decl] -> Expr -> Decl+mkBlockLambda optCase name args decls expr+ = Decl lhs rhs Set.empty Set.empty+ where+ lhs = Fun name (map SimpleExpr args)+ rhs = mkLet optCase decls expr+{-# LINE 146 "dist/build/GenerateCode.hs" #-}++{-# LINE 761 "src-ag/GenerateCode.ag" #-}++typeToCodeType :: Maybe NontermIdent -> [String] -> Type -> Code.Type+typeToCodeType mbNt params tp+ = case tp of+ NT nt tps defor -> NontermType (getName nt) tps defor+ Haskell t -> SimpleType t++evalType :: (String -> String) -> Code.Type -> Code.Type+evalType replf t+ = chase t+ where+ chase t+ = case t of+ Arr l r -> Arr (chase l) (chase r)+ TypeApp f as -> TypeApp (chase f) (map chase as)+ TupleType tps -> TupleType (map chase tps)+ UnboxedTupleType tps -> UnboxedTupleType (map chase tps)+ Code.List tp -> Code.List (chase tp)+ SimpleType txt -> let tks = lexTokens (initPos txt) txt+ tks' = map replaceTok tks+ txt' = unlines . showTokens . tokensToStrings $ tks'+ in SimpleType txt'+ TMaybe m -> TMaybe (chase m)+ TEither l r -> TEither (chase l) (chase r)+ TMap k v -> TMap (chase k) (chase v)+ TIntMap v -> TIntMap (chase v)+ _ -> t++ replaceTok t+ = case t of+ AGLocal v p _ -> HsToken (replf $ getName v) p+ _ -> t++idEvalType :: Code.Type -> Code.Type+idEvalType = evalType id+{-# LINE 184 "dist/build/GenerateCode.hs" #-}++{-# LINE 885 "src-ag/GenerateCode.ag" #-}++-- for a virtual child that already existed as a child, returns+isFirstOrder :: ChildKind -> Type -> Maybe Type+isFirstOrder ChildSyntax tp = Just tp+isFirstOrder ChildAttr _ = Nothing+isFirstOrder (ChildReplace tp) _ = Just tp+{-# LINE 193 "dist/build/GenerateCode.hs" #-}++{-# LINE 906 "src-ag/GenerateCode.ag" #-}++makeLocalComment :: Int -> String -> Identifier -> Maybe Type -> String+makeLocalComment width what name tp = let x = getName name+ y = maybe "_" (\t -> case t of (NT nt tps _) -> getName nt ++ " " ++ unwords tps; Haskell t -> '{':t++"}") tp+ in ( what ++ " " ++ x ++ replicate ((width - length x) `max` 0) ' ' ++ " : " ++ y )++{-# LINE 202 "dist/build/GenerateCode.hs" #-}++{-# LINE 937 "src-ag/GenerateCode.ag" #-}++-- Lets or nested Cases?+-- or even a do-expression?++data DeclsType = DeclsLet | DeclsCase | DeclsDo++mkDecls :: DeclsType -> Decls -> Expr -> Expr+mkDecls DeclsLet = mkLet False+mkDecls DeclsCase = mkLet True+mkDecls DeclsDo = \decls -> Do (map toBind decls)+ where toBind (Decl lhs rhs _ _) = BindLet lhs rhs+ toBind d = d++mkLet :: Bool -> Decls -> Expr -> Expr+mkLet False decls body = Let decls body+mkLet True decls body = foldr oneCase body decls++oneCase :: Decl -> Expr -> Expr+oneCase (Decl left rhs _ _) exp = Case rhs [CaseAlt left exp]+oneCase (Resume _ nt left rhs) exp = ResumeExpr nt rhs left exp+oneCase _ exp = exp++-- Gives the name of the visit function+funname field 0 = show field ++ "_"+funname field nr = show field ++ "_" ++ show nr++-- Gives the name of a semantic function+seqSemname :: String -> NontermIdent -> ConstructorIdent -> Int -> String+seqSemname pre nt con 0 = semname pre nt con+seqSemname pre nt con nr = semname pre nt con ++ "_" ++ show nr++-- Gives the name of a type+typeName :: NontermIdent -> Int -> String+typeName nt 0 = "T_" ++ show nt+typeName nt n = "T_" ++ show nt ++ "_" ++ show n++ntOfVisit :: NontermIdent -> Int -> NontermIdent+ntOfVisit nt 0 = nt+ntOfVisit nt n = Ident (show nt ++ "_" ++ show n) (getPos nt)++-- Gives the name of a visit function+visitname :: String -> NontermIdent -> Int -> String+visitname pre nt n = pre ++ getName nt ++ "_" ++ show n+{-# LINE 248 "dist/build/GenerateCode.hs" #-}++{-# LINE 1026 "src-ag/GenerateCode.ag" #-}++toNamedType :: Bool -> NontermIdent -> ConstructorIdent -> Identifier -> Code.Type -> Code.NamedType+toNamedType genStrict nt con nm tp+ = Code.Named genStrict strNm tp+ where strNm = recordFieldname nt con nm+{-# LINE 256 "dist/build/GenerateCode.hs" #-}+-- CGrammar ----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attributes:+ errors : Seq Error+ output : Program+ alternatives:+ alternative CGrammar:+ child typeSyns : {TypeSyns}+ child derivings : {Derivings}+ child wrappers : {Set NontermIdent}+ child nonts : CNonterminals + child pragmas : {PragmaMap}+ child paramMap : {ParamMap}+ child contextMap : {ContextMap}+ child quantMap : {QuantMap}+ child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Set Identifier))}+ child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))}+ child multivisit : {Bool}+ visit 0:+ local options : _+ local aroundMap : _+ local mergeMap : _+ local unfoldSemDom : _+-}+-- cata+sem_CGrammar :: CGrammar ->+ T_CGrammar+sem_CGrammar (CGrammar _typeSyns _derivings _wrappers _nonts _pragmas _paramMap _contextMap _quantMap _aroundsMap _mergeMap _multivisit) =+ (sem_CGrammar_CGrammar _typeSyns _derivings _wrappers (sem_CNonterminals _nonts) _pragmas _paramMap _contextMap _quantMap _aroundsMap _mergeMap _multivisit)+-- semantic domain+newtype T_CGrammar = T_CGrammar (Options ->+ ( (Seq Error),Program))+data Inh_CGrammar = Inh_CGrammar {options_Inh_CGrammar :: !(Options)}+data Syn_CGrammar = Syn_CGrammar {errors_Syn_CGrammar :: !((Seq Error)),output_Syn_CGrammar :: !(Program)}+wrap_CGrammar :: T_CGrammar ->+ Inh_CGrammar ->+ Syn_CGrammar+wrap_CGrammar (T_CGrammar sem) (Inh_CGrammar _lhsIoptions) =+ (let ( _lhsOerrors,_lhsOoutput) = sem _lhsIoptions+ in (Syn_CGrammar _lhsOerrors _lhsOoutput))+sem_CGrammar_CGrammar :: TypeSyns ->+ Derivings ->+ (Set NontermIdent) ->+ T_CNonterminals ->+ PragmaMap ->+ ParamMap ->+ ContextMap ->+ QuantMap ->+ (Map NontermIdent (Map ConstructorIdent (Set Identifier))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->+ Bool ->+ T_CGrammar+sem_CGrammar_CGrammar typeSyns_ derivings_ wrappers_ (T_CNonterminals nonts_) pragmas_ paramMap_ contextMap_ quantMap_ aroundsMap_ mergeMap_ multivisit_ =+ (T_CGrammar (\ _lhsIoptions ->+ (let _nontsOo_sig :: Bool+ _nontsOo_cata :: Bool+ _nontsOo_sem :: Bool+ _nontsOo_newtypes :: Bool+ _nontsOo_unbox :: Bool+ _nontsOo_case :: Bool+ _nontsOo_pretty :: Bool+ _nontsOo_rename :: Bool+ _nontsOo_strictwrap :: Bool+ _nontsOo_splitsems :: Bool+ _nontsOo_data :: (Maybe Bool)+ _nontsOprefix :: String+ _nontsOo_traces :: Bool+ _nontsOo_costcentre :: Bool+ _nontsOo_linePragmas :: Bool+ _nontsOo_monadic :: Bool+ _nontsOallPragmas :: PragmaMap+ _nontsOparamMap :: ParamMap+ _nontsOcontextMap :: ContextMap+ _nontsOquantMap :: QuantMap+ _nontsOallNts :: (Set NontermIdent)+ _nontsOwith_sig :: Bool+ _lhsOerrors :: (Seq Error)+ _lhsOoutput :: Program+ _nontsOtypeSyns :: TypeSyns+ _nontsOderivings :: Derivings+ _nontsOwrappers :: (Set NontermIdent)+ _nontsOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Set Identifier)))+ _nontsOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))))+ _nontsOoptions :: Options+ _nontsOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _nontsIchunks :: Chunks+ _nontsIgathNts :: (Set NontermIdent)+ _nontsIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ -- "src-ag/GenerateCode.ag"(line 53, column 17)+ _nontsOo_sig =+ ({-# LINE 53 "src-ag/GenerateCode.ag" #-}+ typeSigs _lhsIoptions+ {-# LINE 352 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 53, column 17)+ _nontsOo_cata =+ ({-# LINE 54 "src-ag/GenerateCode.ag" #-}+ folds _lhsIoptions+ {-# LINE 358 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 53, column 17)+ _nontsOo_sem =+ ({-# LINE 55 "src-ag/GenerateCode.ag" #-}+ semfuns _lhsIoptions+ {-# LINE 364 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 53, column 17)+ _nontsOo_newtypes =+ ({-# LINE 56 "src-ag/GenerateCode.ag" #-}+ newtypes _lhsIoptions+ {-# LINE 370 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 53, column 17)+ _nontsOo_unbox =+ ({-# LINE 57 "src-ag/GenerateCode.ag" #-}+ unbox _lhsIoptions+ {-# LINE 376 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 53, column 17)+ _nontsOo_case =+ ({-# LINE 58 "src-ag/GenerateCode.ag" #-}+ cases _lhsIoptions+ {-# LINE 382 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 53, column 17)+ _nontsOo_pretty =+ ({-# LINE 59 "src-ag/GenerateCode.ag" #-}+ attrInfo _lhsIoptions+ {-# LINE 388 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 53, column 17)+ _nontsOo_rename =+ ({-# LINE 60 "src-ag/GenerateCode.ag" #-}+ rename _lhsIoptions+ {-# LINE 394 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 53, column 17)+ _nontsOo_strictwrap =+ ({-# LINE 61 "src-ag/GenerateCode.ag" #-}+ strictWrap _lhsIoptions+ {-# LINE 400 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 53, column 17)+ _nontsOo_splitsems =+ ({-# LINE 62 "src-ag/GenerateCode.ag" #-}+ splitSems _lhsIoptions+ {-# LINE 406 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 53, column 17)+ _nontsOo_data =+ ({-# LINE 63 "src-ag/GenerateCode.ag" #-}+ if dataTypes _lhsIoptions then Just (strictData _lhsIoptions) else Nothing+ {-# LINE 412 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 53, column 17)+ _nontsOprefix =+ ({-# LINE 64 "src-ag/GenerateCode.ag" #-}+ prefix _lhsIoptions+ {-# LINE 418 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 53, column 17)+ _nontsOo_traces =+ ({-# LINE 65 "src-ag/GenerateCode.ag" #-}+ genTraces _lhsIoptions+ {-# LINE 424 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 53, column 17)+ _nontsOo_costcentre =+ ({-# LINE 66 "src-ag/GenerateCode.ag" #-}+ genCostCentres _lhsIoptions+ {-# LINE 430 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 53, column 17)+ _nontsOo_linePragmas =+ ({-# LINE 67 "src-ag/GenerateCode.ag" #-}+ genLinePragmas _lhsIoptions+ {-# LINE 436 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 53, column 17)+ _nontsOo_monadic =+ ({-# LINE 68 "src-ag/GenerateCode.ag" #-}+ monadic _lhsIoptions+ {-# LINE 442 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 71, column 3)+ _options =+ ({-# LINE 71 "src-ag/GenerateCode.ag" #-}+ _lhsIoptions { breadthFirst = breadthFirst _lhsIoptions && visit _lhsIoptions && cases _lhsIoptions && multivisit_ }+ {-# LINE 448 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 76, column 15)+ _nontsOallPragmas =+ ({-# LINE 76 "src-ag/GenerateCode.ag" #-}+ pragmas_+ {-# LINE 454 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 98, column 14)+ _nontsOparamMap =+ ({-# LINE 98 "src-ag/GenerateCode.ag" #-}+ paramMap_+ {-# LINE 460 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 119, column 7)+ _nontsOcontextMap =+ ({-# LINE 119 "src-ag/GenerateCode.ag" #-}+ contextMap_+ {-# LINE 466 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 120, column 7)+ _nontsOquantMap =+ ({-# LINE 120 "src-ag/GenerateCode.ag" #-}+ quantMap_+ {-# LINE 472 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 136, column 7)+ _nontsOallNts =+ ({-# LINE 136 "src-ag/GenerateCode.ag" #-}+ _nontsIgathNts+ {-# LINE 478 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 582, column 34)+ _aroundMap =+ ({-# LINE 582 "src-ag/GenerateCode.ag" #-}+ aroundsMap_+ {-# LINE 484 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 598, column 34)+ _mergeMap =+ ({-# LINE 598 "src-ag/GenerateCode.ag" #-}+ mergeMap_+ {-# LINE 490 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 754, column 7)+ _unfoldSemDom =+ ({-# LINE 754 "src-ag/GenerateCode.ag" #-}+ \nt nr repl ->+ let (params, tp) = Map.findWithDefault (error ("No such semantic domain: " ++ show nt)) (nt, nr) _nontsIsemDomUnfoldGath+ replMap = Map.fromList (zip params repl)+ replace k = Map.findWithDefault ('@':k) k replMap+ in evalType replace tp+ {-# LINE 500 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 854, column 14)+ _nontsOwith_sig =+ ({-# LINE 854 "src-ag/GenerateCode.ag" #-}+ typeSigs _lhsIoptions+ {-# LINE 506 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 857, column 15)+ _lhsOerrors =+ ({-# LINE 857 "src-ag/GenerateCode.ag" #-}+ Seq.empty+ {-# LINE 512 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 923, column 17)+ _lhsOoutput =+ ({-# LINE 923 "src-ag/GenerateCode.ag" #-}+ Program _nontsIchunks multivisit_+ {-# LINE 518 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 990, column 14)+ _nontsOtypeSyns =+ ({-# LINE 990 "src-ag/GenerateCode.ag" #-}+ typeSyns_+ {-# LINE 524 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 990, column 14)+ _nontsOderivings =+ ({-# LINE 991 "src-ag/GenerateCode.ag" #-}+ derivings_+ {-# LINE 530 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 990, column 14)+ _nontsOwrappers =+ ({-# LINE 992 "src-ag/GenerateCode.ag" #-}+ wrappers_+ {-# LINE 536 "dist/build/GenerateCode" #-}+ )+ -- copy rule (from local)+ _nontsOaroundMap =+ ({-# LINE 575 "src-ag/GenerateCode.ag" #-}+ _aroundMap+ {-# LINE 542 "dist/build/GenerateCode" #-}+ )+ -- copy rule (from local)+ _nontsOmergeMap =+ ({-# LINE 591 "src-ag/GenerateCode.ag" #-}+ _mergeMap+ {-# LINE 548 "dist/build/GenerateCode" #-}+ )+ -- copy rule (from local)+ _nontsOoptions =+ ({-# LINE 50 "src-ag/GenerateCode.ag" #-}+ _options+ {-# LINE 554 "dist/build/GenerateCode" #-}+ )+ -- copy rule (from local)+ _nontsOunfoldSemDom =+ ({-# LINE 750 "src-ag/GenerateCode.ag" #-}+ _unfoldSemDom+ {-# LINE 560 "dist/build/GenerateCode" #-}+ )+ ( _nontsIchunks,_nontsIgathNts,_nontsIsemDomUnfoldGath) =+ nonts_ _nontsOallNts _nontsOallPragmas _nontsOaroundMap _nontsOcontextMap _nontsOderivings _nontsOmergeMap _nontsOo_case _nontsOo_cata _nontsOo_costcentre _nontsOo_data _nontsOo_linePragmas _nontsOo_monadic _nontsOo_newtypes _nontsOo_pretty _nontsOo_rename _nontsOo_sem _nontsOo_sig _nontsOo_splitsems _nontsOo_strictwrap _nontsOo_traces _nontsOo_unbox _nontsOoptions _nontsOparamMap _nontsOprefix _nontsOquantMap _nontsOtypeSyns _nontsOunfoldSemDom _nontsOwith_sig _nontsOwrappers+ in ( _lhsOerrors,_lhsOoutput))))+-- CInterface --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ inh : Attributes+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramMap : ParamMap+ prefix : String+ syn : Attributes+ synthesized attributes:+ comments : [String]+ semDom : [Decl]+ semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)+ wrapDecls : Decls+ alternatives:+ alternative CInterface:+ child seg : CSegments +-}+-- cata+sem_CInterface :: CInterface ->+ T_CInterface+sem_CInterface (CInterface _seg) =+ (sem_CInterface_CInterface (sem_CSegments _seg))+-- semantic domain+newtype T_CInterface = T_CInterface (Attributes ->+ NontermIdent ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Bool) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Options ->+ ParamMap ->+ String ->+ Attributes ->+ ( ([String]),([Decl]),(Map (NontermIdent, Int) ([String], Code.Type)),Decls))+data Inh_CInterface = Inh_CInterface {inh_Inh_CInterface :: !(Attributes),nt_Inh_CInterface :: !(NontermIdent),o_case_Inh_CInterface :: !(Bool),o_cata_Inh_CInterface :: !(Bool),o_costcentre_Inh_CInterface :: !(Bool),o_data_Inh_CInterface :: !((Maybe Bool)),o_linePragmas_Inh_CInterface :: !(Bool),o_monadic_Inh_CInterface :: !(Bool),o_newtypes_Inh_CInterface :: !(Bool),o_pretty_Inh_CInterface :: !(Bool),o_rename_Inh_CInterface :: !(Bool),o_sem_Inh_CInterface :: !(Bool),o_sig_Inh_CInterface :: !(Bool),o_splitsems_Inh_CInterface :: !(Bool),o_strictwrap_Inh_CInterface :: !(Bool),o_traces_Inh_CInterface :: !(Bool),o_unbox_Inh_CInterface :: !(Bool),options_Inh_CInterface :: !(Options),paramMap_Inh_CInterface :: !(ParamMap),prefix_Inh_CInterface :: !(String),syn_Inh_CInterface :: !(Attributes)}+data Syn_CInterface = Syn_CInterface {comments_Syn_CInterface :: !(([String])),semDom_Syn_CInterface :: !(([Decl])),semDomUnfoldGath_Syn_CInterface :: !((Map (NontermIdent, Int) ([String], Code.Type))),wrapDecls_Syn_CInterface :: !(Decls)}+wrap_CInterface :: T_CInterface ->+ Inh_CInterface ->+ Syn_CInterface+wrap_CInterface (T_CInterface sem) (Inh_CInterface _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn) =+ (let ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) = sem _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn+ in (Syn_CInterface _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls))+sem_CInterface_CInterface :: T_CSegments ->+ T_CInterface+sem_CInterface_CInterface (T_CSegments seg_) =+ (T_CInterface (\ _lhsIinh+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_costcentre+ _lhsIo_data+ _lhsIo_linePragmas+ _lhsIo_monadic+ _lhsIo_newtypes+ _lhsIo_pretty+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_splitsems+ _lhsIo_strictwrap+ _lhsIo_traces+ _lhsIo_unbox+ _lhsIoptions+ _lhsIparamMap+ _lhsIprefix+ _lhsIsyn ->+ (let _segOnr :: Int+ _lhsOsemDom :: ([Decl])+ _lhsOcomments :: ([String])+ _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _lhsOwrapDecls :: Decls+ _segOinh :: Attributes+ _segOnt :: NontermIdent+ _segOo_case :: Bool+ _segOo_cata :: Bool+ _segOo_costcentre :: Bool+ _segOo_data :: (Maybe Bool)+ _segOo_linePragmas :: Bool+ _segOo_monadic :: Bool+ _segOo_newtypes :: Bool+ _segOo_pretty :: Bool+ _segOo_rename :: Bool+ _segOo_sem :: Bool+ _segOo_sig :: Bool+ _segOo_splitsems :: Bool+ _segOo_strictwrap :: Bool+ _segOo_traces :: Bool+ _segOo_unbox :: Bool+ _segOoptions :: Options+ _segOparamMap :: ParamMap+ _segOprefix :: String+ _segOsyn :: Attributes+ _segIcomments :: ([String])+ _segIisNil :: Bool+ _segIsemDom :: ([Decl])+ _segIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _segIwrapDecls :: Decls+ -- "src-ag/GenerateCode.ag"(line 284, column 17)+ _segOnr =+ ({-# LINE 284 "src-ag/GenerateCode.ag" #-}+ 0+ {-# LINE 694 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 712, column 18)+ _lhsOsemDom =+ ({-# LINE 712 "src-ag/GenerateCode.ag" #-}+ Comment "semantic domain" : _segIsemDom+ {-# LINE 700 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)+ _lhsOcomments =+ ({-# LINE 868 "src-ag/GenerateCode.ag" #-}+ _segIcomments+ {-# LINE 706 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 744, column 86)+ _lhsOsemDomUnfoldGath =+ ({-# LINE 744 "src-ag/GenerateCode.ag" #-}+ _segIsemDomUnfoldGath+ {-# LINE 712 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 829, column 52)+ _lhsOwrapDecls =+ ({-# LINE 829 "src-ag/GenerateCode.ag" #-}+ _segIwrapDecls+ {-# LINE 718 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOinh =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 724 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOnt =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 730 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOo_case =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 736 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOo_cata =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 742 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOo_costcentre =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 748 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOo_data =+ ({-# LINE 48 "src-ag/GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 754 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOo_linePragmas =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 760 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOo_monadic =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 766 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOo_newtypes =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 772 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOo_pretty =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 778 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOo_rename =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 784 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOo_sem =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 790 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOo_sig =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 796 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOo_splitsems =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 802 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOo_strictwrap =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 808 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOo_traces =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 814 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOo_unbox =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 820 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOoptions =+ ({-# LINE 50 "src-ag/GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 826 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOparamMap =+ ({-# LINE 95 "src-ag/GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 832 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOprefix =+ ({-# LINE 49 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 838 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _segOsyn =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 844 "dist/build/GenerateCode" #-}+ )+ ( _segIcomments,_segIisNil,_segIsemDom,_segIsemDomUnfoldGath,_segIwrapDecls) =+ seg_ _segOinh _segOnr _segOnt _segOo_case _segOo_cata _segOo_costcentre _segOo_data _segOo_linePragmas _segOo_monadic _segOo_newtypes _segOo_pretty _segOo_rename _segOo_sem _segOo_sig _segOo_splitsems _segOo_strictwrap _segOo_traces _segOo_unbox _segOoptions _segOparamMap _segOprefix _segOsyn+ in ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))))+-- CNonterminal ------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allNts : Set NontermIdent+ allPragmas : PragmaMap+ aroundMap : Map NontermIdent (Map ConstructorIdent (Set Identifier))+ contextMap : ContextMap+ derivings : Derivings+ mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramMap : ParamMap+ prefix : String+ quantMap : QuantMap+ typeSyns : TypeSyns+ unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type+ with_sig : Bool+ wrappers : Set NontermIdent+ synthesized attributes:+ chunks : Chunks+ gathNts : Set NontermIdent+ semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)+ alternatives:+ alternative CNonterminal:+ child nt : {NontermIdent}+ child params : {[Identifier]}+ child inh : {Attributes}+ child syn : {Attributes}+ child prods : CProductions + child inter : CInterface + visit 0:+ local aroundMap : _+ local mergeMap : _+ local semWrapper : _+ local comment : _+ local dataDef : _+ local genCata : _+ local cataFun : _+-}+-- cata+sem_CNonterminal :: CNonterminal ->+ T_CNonterminal+sem_CNonterminal (CNonterminal _nt _params _inh _syn _prods _inter) =+ (sem_CNonterminal_CNonterminal _nt _params _inh _syn (sem_CProductions _prods) (sem_CInterface _inter))+-- semantic domain+newtype T_CNonterminal = T_CNonterminal ((Set NontermIdent) ->+ PragmaMap ->+ (Map NontermIdent (Map ConstructorIdent (Set Identifier))) ->+ ContextMap ->+ Derivings ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Bool) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Options ->+ ParamMap ->+ String ->+ QuantMap ->+ TypeSyns ->+ (NontermIdent -> Int -> [String] -> Code.Type) ->+ Bool ->+ (Set NontermIdent) ->+ ( Chunks,(Set NontermIdent),(Map (NontermIdent, Int) ([String], Code.Type))))+data Inh_CNonterminal = Inh_CNonterminal {allNts_Inh_CNonterminal :: !((Set NontermIdent)),allPragmas_Inh_CNonterminal :: !(PragmaMap),aroundMap_Inh_CNonterminal :: !((Map NontermIdent (Map ConstructorIdent (Set Identifier)))),contextMap_Inh_CNonterminal :: !(ContextMap),derivings_Inh_CNonterminal :: !(Derivings),mergeMap_Inh_CNonterminal :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))))),o_case_Inh_CNonterminal :: !(Bool),o_cata_Inh_CNonterminal :: !(Bool),o_costcentre_Inh_CNonterminal :: !(Bool),o_data_Inh_CNonterminal :: !((Maybe Bool)),o_linePragmas_Inh_CNonterminal :: !(Bool),o_monadic_Inh_CNonterminal :: !(Bool),o_newtypes_Inh_CNonterminal :: !(Bool),o_pretty_Inh_CNonterminal :: !(Bool),o_rename_Inh_CNonterminal :: !(Bool),o_sem_Inh_CNonterminal :: !(Bool),o_sig_Inh_CNonterminal :: !(Bool),o_splitsems_Inh_CNonterminal :: !(Bool),o_strictwrap_Inh_CNonterminal :: !(Bool),o_traces_Inh_CNonterminal :: !(Bool),o_unbox_Inh_CNonterminal :: !(Bool),options_Inh_CNonterminal :: !(Options),paramMap_Inh_CNonterminal :: !(ParamMap),prefix_Inh_CNonterminal :: !(String),quantMap_Inh_CNonterminal :: !(QuantMap),typeSyns_Inh_CNonterminal :: !(TypeSyns),unfoldSemDom_Inh_CNonterminal :: !((NontermIdent -> Int -> [String] -> Code.Type)),with_sig_Inh_CNonterminal :: !(Bool),wrappers_Inh_CNonterminal :: !((Set NontermIdent))}+data Syn_CNonterminal = Syn_CNonterminal {chunks_Syn_CNonterminal :: !(Chunks),gathNts_Syn_CNonterminal :: !((Set NontermIdent)),semDomUnfoldGath_Syn_CNonterminal :: !((Map (NontermIdent, Int) ([String], Code.Type)))}+wrap_CNonterminal :: T_CNonterminal ->+ Inh_CNonterminal ->+ Syn_CNonterminal+wrap_CNonterminal (T_CNonterminal sem) (Inh_CNonterminal _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) =+ (let ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath) = sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers+ in (Syn_CNonterminal _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath))+sem_CNonterminal_CNonterminal :: NontermIdent ->+ ([Identifier]) ->+ Attributes ->+ Attributes ->+ T_CProductions ->+ T_CInterface ->+ T_CNonterminal+sem_CNonterminal_CNonterminal nt_ params_ inh_ syn_ (T_CProductions prods_) (T_CInterface inter_) =+ (T_CNonterminal (\ _lhsIallNts+ _lhsIallPragmas+ _lhsIaroundMap+ _lhsIcontextMap+ _lhsIderivings+ _lhsImergeMap+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_costcentre+ _lhsIo_data+ _lhsIo_linePragmas+ _lhsIo_monadic+ _lhsIo_newtypes+ _lhsIo_pretty+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_splitsems+ _lhsIo_strictwrap+ _lhsIo_traces+ _lhsIo_unbox+ _lhsIoptions+ _lhsIparamMap+ _lhsIprefix+ _lhsIquantMap+ _lhsItypeSyns+ _lhsIunfoldSemDom+ _lhsIwith_sig+ _lhsIwrappers ->+ (let _interOinh :: Attributes+ _interOsyn :: Attributes+ _interOnt :: NontermIdent+ _prodsOinh :: Attributes+ _prodsOsyn :: Attributes+ _prodsOnt :: NontermIdent+ _lhsOgathNts :: (Set NontermIdent)+ _lhsOchunks :: Chunks+ _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _prodsOallNts :: (Set NontermIdent)+ _prodsOallPragmas :: PragmaMap+ _prodsOaroundMap :: (Map ConstructorIdent (Set Identifier))+ _prodsOcontextMap :: ContextMap+ _prodsOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))+ _prodsOo_case :: Bool+ _prodsOo_cata :: Bool+ _prodsOo_costcentre :: Bool+ _prodsOo_data :: (Maybe Bool)+ _prodsOo_linePragmas :: Bool+ _prodsOo_monadic :: Bool+ _prodsOo_newtypes :: Bool+ _prodsOo_pretty :: Bool+ _prodsOo_rename :: Bool+ _prodsOo_sem :: Bool+ _prodsOo_sig :: Bool+ _prodsOo_splitsems :: Bool+ _prodsOo_strictwrap :: Bool+ _prodsOo_traces :: Bool+ _prodsOo_unbox :: Bool+ _prodsOoptions :: Options+ _prodsOparamMap :: ParamMap+ _prodsOprefix :: String+ _prodsOquantMap :: QuantMap+ _prodsOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _prodsOwith_sig :: Bool+ _prodsOwrappers :: (Set NontermIdent)+ _interOo_case :: Bool+ _interOo_cata :: Bool+ _interOo_costcentre :: Bool+ _interOo_data :: (Maybe Bool)+ _interOo_linePragmas :: Bool+ _interOo_monadic :: Bool+ _interOo_newtypes :: Bool+ _interOo_pretty :: Bool+ _interOo_rename :: Bool+ _interOo_sem :: Bool+ _interOo_sig :: Bool+ _interOo_splitsems :: Bool+ _interOo_strictwrap :: Bool+ _interOo_traces :: Bool+ _interOo_unbox :: Bool+ _interOoptions :: Options+ _interOparamMap :: ParamMap+ _interOprefix :: String+ _prodsIcataAlts :: Decls+ _prodsIcomments :: ([String])+ _prodsIdataAlts :: DataAlts+ _prodsIdecls :: Decls+ _prodsIsemNames :: ([String])+ _interIcomments :: ([String])+ _interIsemDom :: ([Decl])+ _interIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _interIwrapDecls :: Decls+ -- "src-ag/GenerateCode.ag"(line 86, column 26)+ (_interOinh,_interOsyn,_interOnt) =+ ({-# LINE 86 "src-ag/GenerateCode.ag" #-}+ (inh_,syn_,nt_)+ {-# LINE 1051 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 87, column 25)+ (_prodsOinh,_prodsOsyn,_prodsOnt) =+ ({-# LINE 87 "src-ag/GenerateCode.ag" #-}+ (inh_,syn_,nt_)+ {-# LINE 1057 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 142, column 7)+ _lhsOgathNts =+ ({-# LINE 142 "src-ag/GenerateCode.ag" #-}+ Set.singleton nt_+ {-# LINE 1063 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 583, column 34)+ _aroundMap =+ ({-# LINE 583 "src-ag/GenerateCode.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIaroundMap+ {-# LINE 1069 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 599, column 34)+ _mergeMap =+ ({-# LINE 599 "src-ag/GenerateCode.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsImergeMap+ {-# LINE 1075 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 803, column 18)+ _semWrapper =+ ({-# LINE 803 "src-ag/GenerateCode.ag" #-}+ let params' = map getName params_+ inhAttrs = Map.toList inh_+ synAttrs = Map.toList syn_+ inhVars = [ SimpleExpr (attrname True _LHS a) | (a,_) <- inhAttrs ]+ synVars = [ SimpleExpr (attrname False _LHS a) | (a,_) <- synAttrs ]+ var = "sem"+ wrapNT = "wrap" ++ "_" ++ getName nt_+ inhNT = "Inh" ++ "_" ++ getName nt_+ synNT = "Syn" ++ "_" ++ getName nt_+ varPat = if _lhsIo_newtypes+ then App (sdtype nt_) [SimpleExpr var]+ else SimpleExpr var+ evalTp | null params' = id+ | otherwise = idEvalType+ appParams nm = TypeApp (SimpleType nm) (map SimpleType params')+ typeSig = TSig wrapNT (evalTp $ appParams (sdtype nt_) `Arr` (appParams inhNT `Arr` appParams synNT))+ mkstrict = Named _lhsIo_strictwrap+ mkdata n attrs = Data n params' [Record n [mkstrict (getName f++"_"++n) $ evalTp $ typeToCodeType (Just nt_) params' $ removeDeforested t | (f,t) <- attrs]] False []+ datas = [mkdata inhNT inhAttrs, mkdata synNT synAttrs]+ in datas ++ [ typeSig+ , Decl (Fun wrapNT [varPat, App inhNT inhVars])+ (Let _interIwrapDecls (App synNT synVars))+ Set.empty Set.empty+ ]+ {-# LINE 1104 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 864, column 18)+ _comment =+ ({-# LINE 864 "src-ag/GenerateCode.ag" #-}+ Comment . unlines . map ind $ ( _interIcomments ++ ("alternatives:" : map ind _prodsIcomments) )+ {-# LINE 1110 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 926, column 19)+ _lhsOchunks =+ ({-# LINE 926 "src-ag/GenerateCode.ag" #-}+ [ Chunk (getName nt_)+ (Comment (getName nt_ ++ " " ++ replicate (60 - length (getName nt_)) '-'))+ (if _lhsIo_pretty then [_comment ] else [])+ (if isJust _lhsIo_data then [_dataDef ] else [])+ (if _lhsIo_cata && _genCata then _cataFun else [])+ (if _lhsIo_sig then _interIsemDom else [])+ (if nt_ `Set.member` _lhsIwrappers then _semWrapper else [])+ (if _lhsIo_sem then _prodsIdecls else [])+ (if _lhsIo_sem then _prodsIsemNames else [])+ ]+ {-# LINE 1125 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 995, column 18)+ _dataDef =+ ({-# LINE 995 "src-ag/GenerateCode.ag" #-}+ let params' = map getName params_+ typeSyn tp = let theType =+ case tp of+ CommonTypes.Maybe t -> TMaybe $ typeToCodeType (Just nt_) params' t+ CommonTypes.Either t1 t2 -> TEither (typeToCodeType (Just nt_) params' t1) (typeToCodeType (Just nt_) params' t2)+ CommonTypes.Map t1 t2 -> TMap (typeToCodeType (Just nt_) params' t1) (typeToCodeType (Just nt_) params' t2)+ CommonTypes.IntMap t -> TIntMap $ typeToCodeType (Just nt_) params' t+ CommonTypes.List t -> Code.List $ typeToCodeType (Just nt_) params' t+ CommonTypes.Tuple ts -> Code.TupleType [typeToCodeType (Just nt_) params' t+ | (_,t) <- ts+ ]+ in Code.Type (getName nt_) params' (idEvalType theType)+ derivings = maybe [] (map getName . Set.toList) (Map.lookup nt_ _lhsIderivings)+ dataDef = Data (getName nt_) (map getName params_) _prodsIdataAlts (maybe False id _lhsIo_data) derivings+ in maybe dataDef typeSyn $ lookup nt_ _lhsItypeSyns+ {-# LINE 1145 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 1038, column 18)+ _genCata =+ ({-# LINE 1038 "src-ag/GenerateCode.ag" #-}+ not (nt_ `Set.member` nocatas _lhsIoptions)+ {-# LINE 1151 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 1039, column 18)+ _cataFun =+ ({-# LINE 1039 "src-ag/GenerateCode.ag" #-}+ let appParams nm = TypeApp (SimpleType nm) (map SimpleType (map getName params_))+ evalTp | null params_ = id+ | otherwise = idEvalType+ tSig = TSig (cataname _lhsIprefix nt_)+ (appQuant _lhsIquantMap nt_ $ appContext _lhsIcontextMap nt_ $ evalTp $ appParams (getName nt_) `Arr` appParams (sdtype nt_))+ special typ = case typ of+ CommonTypes.List tp ->+ let cons = SimpleExpr (semname _lhsIprefix nt_ (identifier "Cons"))+ nil = SimpleExpr (semname _lhsIprefix nt_ (identifier "Nil" ))+ arg = SimpleExpr "list"+ rarg = case tp of+ NT t _ _ -> let t' = maybe t id (deforestedNt t)+ in SimpleExpr ("(Prelude.map " ++ (cataname _lhsIprefix t') ++ " list)")+ _ -> arg+ lhs = Fun (cataname _lhsIprefix nt_) [arg]+ rhs = (App "Prelude.foldr" [cons,nil,rarg])+ in [Decl lhs rhs Set.empty Set.empty]+ CommonTypes.Maybe tp ->+ let just = semname _lhsIprefix nt_ (identifier "Just")+ nothing = semname _lhsIprefix nt_ (identifier "Nothing" )+ arg = SimpleExpr "x"+ rarg = case tp of+ NT t _ _ -> let t' = maybe t id (deforestedNt t)+ in App (cataname _lhsIprefix t') [arg]+ _ -> arg+ lhs a = Fun (cataname _lhsIprefix nt_) [a]+ in [Decl (lhs (App "Prelude.Just" [arg])) (App just [rarg]) Set.empty Set.empty+ ,Decl (lhs (SimpleExpr "Prelude.Nothing")) (SimpleExpr nothing) Set.empty Set.empty+ ]+ CommonTypes.Either tp1 tp2 ->+ let left = semname _lhsIprefix nt_ (identifier "Left")+ right = semname _lhsIprefix nt_ (identifier "Right" )+ arg = SimpleExpr "x"+ rarg0 = case tp1 of+ NT t _ _ -> let t' = maybe t id (deforestedNt t)+ in App (cataname _lhsIprefix t') [arg]+ _ -> arg+ rarg1 = case tp2 of+ NT t _ _ -> let t' = maybe t id (deforestedNt t)+ in App (cataname _lhsIprefix t') [arg]+ _ -> arg+ lhs a = Fun (cataname _lhsIprefix nt_) [a]+ in [Decl (lhs (App "Prelude.Left" [arg])) (App left [rarg0]) Set.empty Set.empty+ ,Decl (lhs (App "Prelude.Right" [arg])) (App right [rarg1]) Set.empty Set.empty+ ]+ CommonTypes.Map _ tp ->+ let entry = SimpleExpr (semname _lhsIprefix nt_ (identifier "Entry"))+ nil = SimpleExpr (semname _lhsIprefix nt_ (identifier "Nil"))+ arg = SimpleExpr "m"+ rarg = case tp of+ NT t _ _ -> let t' = maybe t id (deforestedNt t)+ in App "Data.Map.map" [SimpleExpr $ cataname _lhsIprefix t', arg]+ _ -> arg+ lhs = Fun (cataname _lhsIprefix nt_) [arg]+ rhs = App "Data.Map.foldrWithKey" [entry,nil,rarg]+ in [Decl lhs rhs Set.empty Set.empty]+ CommonTypes.IntMap tp ->+ let entry = SimpleExpr (semname _lhsIprefix nt_ (identifier "Entry"))+ nil = SimpleExpr (semname _lhsIprefix nt_ (identifier "Nil"))+ arg = SimpleExpr "m"+ rarg = case tp of+ NT t _ _ -> let t' = maybe t id (deforestedNt t)+ in App "Data.IntMap.map" [SimpleExpr $ cataname _lhsIprefix t', arg]+ _ -> arg+ lhs = Fun (cataname _lhsIprefix nt_) [arg]+ rhs = App "Data.IntMap.foldWithKey" [entry,nil,rarg]+ in [Decl lhs rhs Set.empty Set.empty]+ CommonTypes.Tuple tps ->+ let con = semname _lhsIprefix nt_ (identifier "Tuple")+ tps' = [ (SimpleExpr (getName x),y) | (x,y) <- tps]+ rargs = map rarg tps'+ rarg (n, tp) = case tp of+ NT t _ _ -> let t' = maybe t id (deforestedNt t)+ in App (cataname _lhsIprefix t') [n]+ _ -> n+ lhs = Fun (cataname _lhsIprefix nt_) [TupleExpr (map fst tps')]+ rhs = App con rargs+ in [Decl lhs rhs Set.empty Set.empty]+ in Comment "cata" :+ (if _lhsIo_sig then [tSig] else []) +++ maybe _prodsIcataAlts special (lookup nt_ _lhsItypeSyns)+ {-# LINE 1237 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 744, column 86)+ _lhsOsemDomUnfoldGath =+ ({-# LINE 744 "src-ag/GenerateCode.ag" #-}+ _interIsemDomUnfoldGath+ {-# LINE 1243 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOallNts =+ ({-# LINE 132 "src-ag/GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 1249 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOallPragmas =+ ({-# LINE 73 "src-ag/GenerateCode.ag" #-}+ _lhsIallPragmas+ {-# LINE 1255 "dist/build/GenerateCode" #-}+ )+ -- copy rule (from local)+ _prodsOaroundMap =+ ({-# LINE 578 "src-ag/GenerateCode.ag" #-}+ _aroundMap+ {-# LINE 1261 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOcontextMap =+ ({-# LINE 115 "src-ag/GenerateCode.ag" #-}+ _lhsIcontextMap+ {-# LINE 1267 "dist/build/GenerateCode" #-}+ )+ -- copy rule (from local)+ _prodsOmergeMap =+ ({-# LINE 594 "src-ag/GenerateCode.ag" #-}+ _mergeMap+ {-# LINE 1273 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOo_case =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 1279 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOo_cata =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 1285 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOo_costcentre =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 1291 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOo_data =+ ({-# LINE 48 "src-ag/GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 1297 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOo_linePragmas =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 1303 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOo_monadic =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 1309 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOo_newtypes =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 1315 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOo_pretty =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 1321 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOo_rename =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 1327 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOo_sem =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 1333 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOo_sig =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 1339 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOo_splitsems =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 1345 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOo_strictwrap =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 1351 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOo_traces =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 1357 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOo_unbox =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 1363 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOoptions =+ ({-# LINE 50 "src-ag/GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 1369 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOparamMap =+ ({-# LINE 95 "src-ag/GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 1375 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOprefix =+ ({-# LINE 49 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 1381 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOquantMap =+ ({-# LINE 115 "src-ag/GenerateCode.ag" #-}+ _lhsIquantMap+ {-# LINE 1387 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOunfoldSemDom =+ ({-# LINE 750 "src-ag/GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 1393 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOwith_sig =+ ({-# LINE 851 "src-ag/GenerateCode.ag" #-}+ _lhsIwith_sig+ {-# LINE 1399 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _prodsOwrappers =+ ({-# LINE 987 "src-ag/GenerateCode.ag" #-}+ _lhsIwrappers+ {-# LINE 1405 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOo_case =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 1411 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOo_cata =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 1417 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOo_costcentre =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 1423 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOo_data =+ ({-# LINE 48 "src-ag/GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 1429 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOo_linePragmas =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 1435 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOo_monadic =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 1441 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOo_newtypes =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 1447 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOo_pretty =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 1453 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOo_rename =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 1459 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOo_sem =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 1465 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOo_sig =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 1471 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOo_splitsems =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 1477 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOo_strictwrap =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 1483 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOo_traces =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 1489 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOo_unbox =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 1495 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOoptions =+ ({-# LINE 50 "src-ag/GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 1501 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOparamMap =+ ({-# LINE 95 "src-ag/GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 1507 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _interOprefix =+ ({-# LINE 49 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 1513 "dist/build/GenerateCode" #-}+ )+ ( _prodsIcataAlts,_prodsIcomments,_prodsIdataAlts,_prodsIdecls,_prodsIsemNames) =+ prods_ _prodsOallNts _prodsOallPragmas _prodsOaroundMap _prodsOcontextMap _prodsOinh _prodsOmergeMap _prodsOnt _prodsOo_case _prodsOo_cata _prodsOo_costcentre _prodsOo_data _prodsOo_linePragmas _prodsOo_monadic _prodsOo_newtypes _prodsOo_pretty _prodsOo_rename _prodsOo_sem _prodsOo_sig _prodsOo_splitsems _prodsOo_strictwrap _prodsOo_traces _prodsOo_unbox _prodsOoptions _prodsOparamMap _prodsOprefix _prodsOquantMap _prodsOsyn _prodsOunfoldSemDom _prodsOwith_sig _prodsOwrappers+ ( _interIcomments,_interIsemDom,_interIsemDomUnfoldGath,_interIwrapDecls) =+ inter_ _interOinh _interOnt _interOo_case _interOo_cata _interOo_costcentre _interOo_data _interOo_linePragmas _interOo_monadic _interOo_newtypes _interOo_pretty _interOo_rename _interOo_sem _interOo_sig _interOo_splitsems _interOo_strictwrap _interOo_traces _interOo_unbox _interOoptions _interOparamMap _interOprefix _interOsyn+ in ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath))))+-- CNonterminals -----------------------------------------------+{-+ visit 0:+ inherited attributes:+ allNts : Set NontermIdent+ allPragmas : PragmaMap+ aroundMap : Map NontermIdent (Map ConstructorIdent (Set Identifier))+ contextMap : ContextMap+ derivings : Derivings+ mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramMap : ParamMap+ prefix : String+ quantMap : QuantMap+ typeSyns : TypeSyns+ unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type+ with_sig : Bool+ wrappers : Set NontermIdent+ synthesized attributes:+ chunks : Chunks+ gathNts : Set NontermIdent+ semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)+ alternatives:+ alternative Cons:+ child hd : CNonterminal + child tl : CNonterminals + alternative Nil:+-}+-- cata+sem_CNonterminals :: CNonterminals ->+ T_CNonterminals+sem_CNonterminals list =+ (Prelude.foldr sem_CNonterminals_Cons sem_CNonterminals_Nil (Prelude.map sem_CNonterminal list))+-- semantic domain+newtype T_CNonterminals = T_CNonterminals ((Set NontermIdent) ->+ PragmaMap ->+ (Map NontermIdent (Map ConstructorIdent (Set Identifier))) ->+ ContextMap ->+ Derivings ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Bool) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Options ->+ ParamMap ->+ String ->+ QuantMap ->+ TypeSyns ->+ (NontermIdent -> Int -> [String] -> Code.Type) ->+ Bool ->+ (Set NontermIdent) ->+ ( Chunks,(Set NontermIdent),(Map (NontermIdent, Int) ([String], Code.Type))))+data Inh_CNonterminals = Inh_CNonterminals {allNts_Inh_CNonterminals :: !((Set NontermIdent)),allPragmas_Inh_CNonterminals :: !(PragmaMap),aroundMap_Inh_CNonterminals :: !((Map NontermIdent (Map ConstructorIdent (Set Identifier)))),contextMap_Inh_CNonterminals :: !(ContextMap),derivings_Inh_CNonterminals :: !(Derivings),mergeMap_Inh_CNonterminals :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))))),o_case_Inh_CNonterminals :: !(Bool),o_cata_Inh_CNonterminals :: !(Bool),o_costcentre_Inh_CNonterminals :: !(Bool),o_data_Inh_CNonterminals :: !((Maybe Bool)),o_linePragmas_Inh_CNonterminals :: !(Bool),o_monadic_Inh_CNonterminals :: !(Bool),o_newtypes_Inh_CNonterminals :: !(Bool),o_pretty_Inh_CNonterminals :: !(Bool),o_rename_Inh_CNonterminals :: !(Bool),o_sem_Inh_CNonterminals :: !(Bool),o_sig_Inh_CNonterminals :: !(Bool),o_splitsems_Inh_CNonterminals :: !(Bool),o_strictwrap_Inh_CNonterminals :: !(Bool),o_traces_Inh_CNonterminals :: !(Bool),o_unbox_Inh_CNonterminals :: !(Bool),options_Inh_CNonterminals :: !(Options),paramMap_Inh_CNonterminals :: !(ParamMap),prefix_Inh_CNonterminals :: !(String),quantMap_Inh_CNonterminals :: !(QuantMap),typeSyns_Inh_CNonterminals :: !(TypeSyns),unfoldSemDom_Inh_CNonterminals :: !((NontermIdent -> Int -> [String] -> Code.Type)),with_sig_Inh_CNonterminals :: !(Bool),wrappers_Inh_CNonterminals :: !((Set NontermIdent))}+data Syn_CNonterminals = Syn_CNonterminals {chunks_Syn_CNonterminals :: !(Chunks),gathNts_Syn_CNonterminals :: !((Set NontermIdent)),semDomUnfoldGath_Syn_CNonterminals :: !((Map (NontermIdent, Int) ([String], Code.Type)))}+wrap_CNonterminals :: T_CNonterminals ->+ Inh_CNonterminals ->+ Syn_CNonterminals+wrap_CNonterminals (T_CNonterminals sem) (Inh_CNonterminals _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) =+ (let ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath) = sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers+ in (Syn_CNonterminals _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath))+sem_CNonterminals_Cons :: T_CNonterminal ->+ T_CNonterminals ->+ T_CNonterminals+sem_CNonterminals_Cons (T_CNonterminal hd_) (T_CNonterminals tl_) =+ (T_CNonterminals (\ _lhsIallNts+ _lhsIallPragmas+ _lhsIaroundMap+ _lhsIcontextMap+ _lhsIderivings+ _lhsImergeMap+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_costcentre+ _lhsIo_data+ _lhsIo_linePragmas+ _lhsIo_monadic+ _lhsIo_newtypes+ _lhsIo_pretty+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_splitsems+ _lhsIo_strictwrap+ _lhsIo_traces+ _lhsIo_unbox+ _lhsIoptions+ _lhsIparamMap+ _lhsIprefix+ _lhsIquantMap+ _lhsItypeSyns+ _lhsIunfoldSemDom+ _lhsIwith_sig+ _lhsIwrappers ->+ (let _lhsOchunks :: Chunks+ _lhsOgathNts :: (Set NontermIdent)+ _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _hdOallNts :: (Set NontermIdent)+ _hdOallPragmas :: PragmaMap+ _hdOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Set Identifier)))+ _hdOcontextMap :: ContextMap+ _hdOderivings :: Derivings+ _hdOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))))+ _hdOo_case :: Bool+ _hdOo_cata :: Bool+ _hdOo_costcentre :: Bool+ _hdOo_data :: (Maybe Bool)+ _hdOo_linePragmas :: Bool+ _hdOo_monadic :: Bool+ _hdOo_newtypes :: Bool+ _hdOo_pretty :: Bool+ _hdOo_rename :: Bool+ _hdOo_sem :: Bool+ _hdOo_sig :: Bool+ _hdOo_splitsems :: Bool+ _hdOo_strictwrap :: Bool+ _hdOo_traces :: Bool+ _hdOo_unbox :: Bool+ _hdOoptions :: Options+ _hdOparamMap :: ParamMap+ _hdOprefix :: String+ _hdOquantMap :: QuantMap+ _hdOtypeSyns :: TypeSyns+ _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _hdOwith_sig :: Bool+ _hdOwrappers :: (Set NontermIdent)+ _tlOallNts :: (Set NontermIdent)+ _tlOallPragmas :: PragmaMap+ _tlOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Set Identifier)))+ _tlOcontextMap :: ContextMap+ _tlOderivings :: Derivings+ _tlOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))))+ _tlOo_case :: Bool+ _tlOo_cata :: Bool+ _tlOo_costcentre :: Bool+ _tlOo_data :: (Maybe Bool)+ _tlOo_linePragmas :: Bool+ _tlOo_monadic :: Bool+ _tlOo_newtypes :: Bool+ _tlOo_pretty :: Bool+ _tlOo_rename :: Bool+ _tlOo_sem :: Bool+ _tlOo_sig :: Bool+ _tlOo_splitsems :: Bool+ _tlOo_strictwrap :: Bool+ _tlOo_traces :: Bool+ _tlOo_unbox :: Bool+ _tlOoptions :: Options+ _tlOparamMap :: ParamMap+ _tlOprefix :: String+ _tlOquantMap :: QuantMap+ _tlOtypeSyns :: TypeSyns+ _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _tlOwith_sig :: Bool+ _tlOwrappers :: (Set NontermIdent)+ _hdIchunks :: Chunks+ _hdIgathNts :: (Set NontermIdent)+ _hdIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _tlIchunks :: Chunks+ _tlIgathNts :: (Set NontermIdent)+ _tlIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ -- use rule "src-ag/GenerateCode.ag"(line 918, column 49)+ _lhsOchunks =+ ({-# LINE 918 "src-ag/GenerateCode.ag" #-}+ _hdIchunks ++ _tlIchunks+ {-# LINE 1711 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 138, column 47)+ _lhsOgathNts =+ ({-# LINE 138 "src-ag/GenerateCode.ag" #-}+ _hdIgathNts `Set.union` _tlIgathNts+ {-# LINE 1717 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 744, column 86)+ _lhsOsemDomUnfoldGath =+ ({-# LINE 744 "src-ag/GenerateCode.ag" #-}+ _hdIsemDomUnfoldGath `Map.union` _tlIsemDomUnfoldGath+ {-# LINE 1723 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOallNts =+ ({-# LINE 132 "src-ag/GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 1729 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOallPragmas =+ ({-# LINE 73 "src-ag/GenerateCode.ag" #-}+ _lhsIallPragmas+ {-# LINE 1735 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOaroundMap =+ ({-# LINE 575 "src-ag/GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 1741 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOcontextMap =+ ({-# LINE 115 "src-ag/GenerateCode.ag" #-}+ _lhsIcontextMap+ {-# LINE 1747 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOderivings =+ ({-# LINE 986 "src-ag/GenerateCode.ag" #-}+ _lhsIderivings+ {-# LINE 1753 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 591 "src-ag/GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 1759 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_case =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 1765 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_cata =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 1771 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_costcentre =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 1777 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_data =+ ({-# LINE 48 "src-ag/GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 1783 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_linePragmas =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 1789 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_monadic =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 1795 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_newtypes =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 1801 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_pretty =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 1807 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 1813 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_sem =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 1819 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_sig =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 1825 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_splitsems =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 1831 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_strictwrap =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 1837 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_traces =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 1843 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_unbox =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 1849 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 50 "src-ag/GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 1855 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOparamMap =+ ({-# LINE 95 "src-ag/GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 1861 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOprefix =+ ({-# LINE 49 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 1867 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOquantMap =+ ({-# LINE 115 "src-ag/GenerateCode.ag" #-}+ _lhsIquantMap+ {-# LINE 1873 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOtypeSyns =+ ({-# LINE 986 "src-ag/GenerateCode.ag" #-}+ _lhsItypeSyns+ {-# LINE 1879 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOunfoldSemDom =+ ({-# LINE 750 "src-ag/GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 1885 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOwith_sig =+ ({-# LINE 851 "src-ag/GenerateCode.ag" #-}+ _lhsIwith_sig+ {-# LINE 1891 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOwrappers =+ ({-# LINE 987 "src-ag/GenerateCode.ag" #-}+ _lhsIwrappers+ {-# LINE 1897 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOallNts =+ ({-# LINE 132 "src-ag/GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 1903 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOallPragmas =+ ({-# LINE 73 "src-ag/GenerateCode.ag" #-}+ _lhsIallPragmas+ {-# LINE 1909 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOaroundMap =+ ({-# LINE 575 "src-ag/GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 1915 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOcontextMap =+ ({-# LINE 115 "src-ag/GenerateCode.ag" #-}+ _lhsIcontextMap+ {-# LINE 1921 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOderivings =+ ({-# LINE 986 "src-ag/GenerateCode.ag" #-}+ _lhsIderivings+ {-# LINE 1927 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 591 "src-ag/GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 1933 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_case =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 1939 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_cata =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 1945 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_costcentre =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 1951 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_data =+ ({-# LINE 48 "src-ag/GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 1957 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_linePragmas =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 1963 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_monadic =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 1969 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_newtypes =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 1975 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_pretty =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 1981 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 1987 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_sem =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 1993 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_sig =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 1999 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_splitsems =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 2005 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_strictwrap =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 2011 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_traces =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 2017 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_unbox =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 2023 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 50 "src-ag/GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 2029 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOparamMap =+ ({-# LINE 95 "src-ag/GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 2035 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOprefix =+ ({-# LINE 49 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 2041 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOquantMap =+ ({-# LINE 115 "src-ag/GenerateCode.ag" #-}+ _lhsIquantMap+ {-# LINE 2047 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOtypeSyns =+ ({-# LINE 986 "src-ag/GenerateCode.ag" #-}+ _lhsItypeSyns+ {-# LINE 2053 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOunfoldSemDom =+ ({-# LINE 750 "src-ag/GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 2059 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOwith_sig =+ ({-# LINE 851 "src-ag/GenerateCode.ag" #-}+ _lhsIwith_sig+ {-# LINE 2065 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOwrappers =+ ({-# LINE 987 "src-ag/GenerateCode.ag" #-}+ _lhsIwrappers+ {-# LINE 2071 "dist/build/GenerateCode" #-}+ )+ ( _hdIchunks,_hdIgathNts,_hdIsemDomUnfoldGath) =+ hd_ _hdOallNts _hdOallPragmas _hdOaroundMap _hdOcontextMap _hdOderivings _hdOmergeMap _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamMap _hdOprefix _hdOquantMap _hdOtypeSyns _hdOunfoldSemDom _hdOwith_sig _hdOwrappers+ ( _tlIchunks,_tlIgathNts,_tlIsemDomUnfoldGath) =+ tl_ _tlOallNts _tlOallPragmas _tlOaroundMap _tlOcontextMap _tlOderivings _tlOmergeMap _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamMap _tlOprefix _tlOquantMap _tlOtypeSyns _tlOunfoldSemDom _tlOwith_sig _tlOwrappers+ in ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath))))+sem_CNonterminals_Nil :: T_CNonterminals+sem_CNonterminals_Nil =+ (T_CNonterminals (\ _lhsIallNts+ _lhsIallPragmas+ _lhsIaroundMap+ _lhsIcontextMap+ _lhsIderivings+ _lhsImergeMap+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_costcentre+ _lhsIo_data+ _lhsIo_linePragmas+ _lhsIo_monadic+ _lhsIo_newtypes+ _lhsIo_pretty+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_splitsems+ _lhsIo_strictwrap+ _lhsIo_traces+ _lhsIo_unbox+ _lhsIoptions+ _lhsIparamMap+ _lhsIprefix+ _lhsIquantMap+ _lhsItypeSyns+ _lhsIunfoldSemDom+ _lhsIwith_sig+ _lhsIwrappers ->+ (let _lhsOchunks :: Chunks+ _lhsOgathNts :: (Set NontermIdent)+ _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ -- use rule "src-ag/GenerateCode.ag"(line 918, column 49)+ _lhsOchunks =+ ({-# LINE 918 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 2116 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 138, column 47)+ _lhsOgathNts =+ ({-# LINE 138 "src-ag/GenerateCode.ag" #-}+ Set.empty+ {-# LINE 2122 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 744, column 86)+ _lhsOsemDomUnfoldGath =+ ({-# LINE 744 "src-ag/GenerateCode.ag" #-}+ Map.empty+ {-# LINE 2128 "dist/build/GenerateCode" #-}+ )+ in ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath))))+-- CProduction -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allNts : Set NontermIdent+ allPragmas : PragmaMap+ aroundMap : Map ConstructorIdent (Set Identifier)+ contextMap : ContextMap+ inh : Attributes+ mergeMap : Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramMap : ParamMap+ prefix : String+ quantMap : QuantMap+ syn : Attributes+ unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type+ with_sig : Bool+ wrappers : Set NontermIdent+ synthesized attributes:+ cataAlt : Decl+ comments : [String]+ dataAlt : DataAlt+ decls : Decls+ semNames : [String]+ alternatives:+ alternative CProduction:+ child con : {ConstructorIdent}+ child visits : CVisits + child children : {[(Identifier,Type,ChildKind)]}+ child terminals : {[Identifier]}+ visit 0:+ local paramInstMap : _+ local aroundMap : _+ local mergeMap : _+ local firstOrderChildren : _+ local params : _+-}+-- cata+sem_CProduction :: CProduction ->+ T_CProduction+sem_CProduction (CProduction _con _visits _children _terminals) =+ (sem_CProduction_CProduction _con (sem_CVisits _visits) _children _terminals)+-- semantic domain+newtype T_CProduction = T_CProduction ((Set NontermIdent) ->+ PragmaMap ->+ (Map ConstructorIdent (Set Identifier)) ->+ ContextMap ->+ Attributes ->+ (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) ->+ NontermIdent ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Bool) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Options ->+ ParamMap ->+ String ->+ QuantMap ->+ Attributes ->+ (NontermIdent -> Int -> [String] -> Code.Type) ->+ Bool ->+ (Set NontermIdent) ->+ ( Decl,([String]),DataAlt,Decls,([String])))+data Inh_CProduction = Inh_CProduction {allNts_Inh_CProduction :: !((Set NontermIdent)),allPragmas_Inh_CProduction :: !(PragmaMap),aroundMap_Inh_CProduction :: !((Map ConstructorIdent (Set Identifier))),contextMap_Inh_CProduction :: !(ContextMap),inh_Inh_CProduction :: !(Attributes),mergeMap_Inh_CProduction :: !((Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))),nt_Inh_CProduction :: !(NontermIdent),o_case_Inh_CProduction :: !(Bool),o_cata_Inh_CProduction :: !(Bool),o_costcentre_Inh_CProduction :: !(Bool),o_data_Inh_CProduction :: !((Maybe Bool)),o_linePragmas_Inh_CProduction :: !(Bool),o_monadic_Inh_CProduction :: !(Bool),o_newtypes_Inh_CProduction :: !(Bool),o_pretty_Inh_CProduction :: !(Bool),o_rename_Inh_CProduction :: !(Bool),o_sem_Inh_CProduction :: !(Bool),o_sig_Inh_CProduction :: !(Bool),o_splitsems_Inh_CProduction :: !(Bool),o_strictwrap_Inh_CProduction :: !(Bool),o_traces_Inh_CProduction :: !(Bool),o_unbox_Inh_CProduction :: !(Bool),options_Inh_CProduction :: !(Options),paramMap_Inh_CProduction :: !(ParamMap),prefix_Inh_CProduction :: !(String),quantMap_Inh_CProduction :: !(QuantMap),syn_Inh_CProduction :: !(Attributes),unfoldSemDom_Inh_CProduction :: !((NontermIdent -> Int -> [String] -> Code.Type)),with_sig_Inh_CProduction :: !(Bool),wrappers_Inh_CProduction :: !((Set NontermIdent))}+data Syn_CProduction = Syn_CProduction {cataAlt_Syn_CProduction :: !(Decl),comments_Syn_CProduction :: !(([String])),dataAlt_Syn_CProduction :: !(DataAlt),decls_Syn_CProduction :: !(Decls),semNames_Syn_CProduction :: !(([String]))}+wrap_CProduction :: T_CProduction ->+ Inh_CProduction ->+ Syn_CProduction+wrap_CProduction (T_CProduction sem) (Inh_CProduction _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) =+ (let ( _lhsOcataAlt,_lhsOcomments,_lhsOdataAlt,_lhsOdecls,_lhsOsemNames) = sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers+ in (Syn_CProduction _lhsOcataAlt _lhsOcomments _lhsOdataAlt _lhsOdecls _lhsOsemNames))+sem_CProduction_CProduction :: ConstructorIdent ->+ T_CVisits ->+ ([(Identifier,Type,ChildKind)]) ->+ ([Identifier]) ->+ T_CProduction+sem_CProduction_CProduction con_ (T_CVisits visits_) children_ terminals_ =+ (T_CProduction (\ _lhsIallNts+ _lhsIallPragmas+ _lhsIaroundMap+ _lhsIcontextMap+ _lhsIinh+ _lhsImergeMap+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_costcentre+ _lhsIo_data+ _lhsIo_linePragmas+ _lhsIo_monadic+ _lhsIo_newtypes+ _lhsIo_pretty+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_splitsems+ _lhsIo_strictwrap+ _lhsIo_traces+ _lhsIo_unbox+ _lhsIoptions+ _lhsIparamMap+ _lhsIprefix+ _lhsIquantMap+ _lhsIsyn+ _lhsIunfoldSemDom+ _lhsIwith_sig+ _lhsIwrappers ->+ (let _visitsOcon :: ConstructorIdent+ _visitsOterminals :: ([Identifier])+ _visitsOvisitedSet :: (Set Identifier)+ _visitsOnr :: Int+ _visitsOchildren :: ([(Identifier,Type, ChildKind)])+ _visitsOinstVisitNrs :: (Map Identifier Int)+ _lhsOcomments :: ([String])+ _lhsOdataAlt :: DataAlt+ _lhsOcataAlt :: Decl+ _lhsOdecls :: Decls+ _lhsOsemNames :: ([String])+ _visitsOallNts :: (Set NontermIdent)+ _visitsOallPragmas :: PragmaMap+ _visitsOaroundMap :: (Set Identifier)+ _visitsOcontextMap :: ContextMap+ _visitsOinh :: Attributes+ _visitsOmergeMap :: (Map Identifier (Identifier, [Identifier]))+ _visitsOnt :: NontermIdent+ _visitsOo_case :: Bool+ _visitsOo_cata :: Bool+ _visitsOo_costcentre :: Bool+ _visitsOo_data :: (Maybe Bool)+ _visitsOo_linePragmas :: Bool+ _visitsOo_monadic :: Bool+ _visitsOo_newtypes :: Bool+ _visitsOo_pretty :: Bool+ _visitsOo_rename :: Bool+ _visitsOo_sem :: Bool+ _visitsOo_sig :: Bool+ _visitsOo_splitsems :: Bool+ _visitsOo_strictwrap :: Bool+ _visitsOo_traces :: Bool+ _visitsOo_unbox :: Bool+ _visitsOoptions :: Options+ _visitsOparamInstMap :: (Map Identifier (NontermIdent, [String]))+ _visitsOparamMap :: ParamMap+ _visitsOprefix :: String+ _visitsOquantMap :: QuantMap+ _visitsOsyn :: Attributes+ _visitsOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _visitsOwith_sig :: Bool+ _visitsOwrappers :: (Set NontermIdent)+ _visitsIcomments :: ([String])+ _visitsIdecls :: Decls+ _visitsIgatherInstVisitNrs :: (Map Identifier Int)+ _visitsIintra :: Exprs+ _visitsIintraVars :: (Set String)+ _visitsIisNil :: Bool+ _visitsIsemNames :: ([String])+ _visitsIvisitedSet :: (Set Identifier)+ -- "src-ag/GenerateCode.ag"(line 92, column 19)+ _visitsOcon =+ ({-# LINE 92 "src-ag/GenerateCode.ag" #-}+ con_+ {-# LINE 2319 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 93, column 20)+ _visitsOterminals =+ ({-# LINE 93 "src-ag/GenerateCode.ag" #-}+ terminals_+ {-# LINE 2325 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 105, column 7)+ _paramInstMap =+ ({-# LINE 105 "src-ag/GenerateCode.ag" #-}+ Map.fromList [(nm, (extractNonterminal tp, tps)) | (nm,tp,_) <- children_, let tps = map cleanupArg $ nontermArgs tp, not (null tps) ]+ {-# LINE 2331 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 146, column 32)+ _visitsOvisitedSet =+ ({-# LINE 146 "src-ag/GenerateCode.ag" #-}+ Set.empty+ {-# LINE 2337 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 280, column 18)+ _visitsOnr =+ ({-# LINE 280 "src-ag/GenerateCode.ag" #-}+ 0+ {-# LINE 2343 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 412, column 18)+ _visitsOchildren =+ ({-# LINE 412 "src-ag/GenerateCode.ag" #-}+ children_+ {-# LINE 2349 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 564, column 7)+ _visitsOinstVisitNrs =+ ({-# LINE 564 "src-ag/GenerateCode.ag" #-}+ _visitsIgatherInstVisitNrs+ {-# LINE 2355 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 584, column 34)+ _aroundMap =+ ({-# LINE 584 "src-ag/GenerateCode.ag" #-}+ Map.findWithDefault Set.empty con_ _lhsIaroundMap+ {-# LINE 2361 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 600, column 34)+ _mergeMap =+ ({-# LINE 600 "src-ag/GenerateCode.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsImergeMap+ {-# LINE 2367 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 879, column 18)+ _firstOrderChildren =+ ({-# LINE 879 "src-ag/GenerateCode.ag" #-}+ [ (nm,fromJust mb,virt) | (nm,tp,virt) <- children_, let mb = isFirstOrder virt tp, isJust mb ]+ {-# LINE 2373 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 880, column 18)+ _lhsOcomments =+ ({-# LINE 880 "src-ag/GenerateCode.ag" #-}+ ("alternative " ++ getName con_ ++ ":")+ : map ind ( map (\(x,y,_) -> makeLocalComment 14 "child" x (Just y)) _firstOrderChildren+ ++ _visitsIcomments+ )+ {-# LINE 2382 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 1019, column 17)+ _params =+ ({-# LINE 1019 "src-ag/GenerateCode.ag" #-}+ map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap+ {-# LINE 2388 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 1020, column 17)+ _lhsOdataAlt =+ ({-# LINE 1020 "src-ag/GenerateCode.ag" #-}+ let conNm = conname _lhsIo_rename _lhsInt con_+ mkFields f = map (\(nm,t,_) -> f _lhsInt con_ nm (typeToCodeType (Just _lhsInt) _params $ removeDeforested t)) _firstOrderChildren+ in if dataRecords _lhsIoptions+ then Record conNm $ mkFields $ toNamedType (strictData _lhsIoptions)+ else DataAlt conNm $ mkFields $ \_ _ _ t -> t+ {-# LINE 2398 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 1131, column 17)+ _lhsOcataAlt =+ ({-# LINE 1131 "src-ag/GenerateCode.ag" #-}+ let lhs = Fun (cataname _lhsIprefix _lhsInt) [lhs_pat]+ lhs_pat = App (conname _lhsIo_rename _lhsInt con_)+ (map (\(n,_,_) -> SimpleExpr $ locname $ n) _firstOrderChildren )+ rhs = App (semname _lhsIprefix _lhsInt con_)+ (map argument _firstOrderChildren )+ argument (nm,NT tp _ _,_) = App (cataname _lhsIprefix tp)+ [SimpleExpr (locname nm)]+ argument (nm, _,_) = SimpleExpr (locname nm)+ in Decl lhs rhs Set.empty Set.empty+ {-# LINE 2412 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 919, column 44)+ _lhsOdecls =+ ({-# LINE 919 "src-ag/GenerateCode.ag" #-}+ _visitsIdecls+ {-# LINE 2418 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 1146, column 61)+ _lhsOsemNames =+ ({-# LINE 1146 "src-ag/GenerateCode.ag" #-}+ _visitsIsemNames+ {-# LINE 2424 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOallNts =+ ({-# LINE 132 "src-ag/GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 2430 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOallPragmas =+ ({-# LINE 73 "src-ag/GenerateCode.ag" #-}+ _lhsIallPragmas+ {-# LINE 2436 "dist/build/GenerateCode" #-}+ )+ -- copy rule (from local)+ _visitsOaroundMap =+ ({-# LINE 580 "src-ag/GenerateCode.ag" #-}+ _aroundMap+ {-# LINE 2442 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOcontextMap =+ ({-# LINE 115 "src-ag/GenerateCode.ag" #-}+ _lhsIcontextMap+ {-# LINE 2448 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOinh =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 2454 "dist/build/GenerateCode" #-}+ )+ -- copy rule (from local)+ _visitsOmergeMap =+ ({-# LINE 596 "src-ag/GenerateCode.ag" #-}+ _mergeMap+ {-# LINE 2460 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOnt =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 2466 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOo_case =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 2472 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOo_cata =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 2478 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOo_costcentre =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 2484 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOo_data =+ ({-# LINE 48 "src-ag/GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 2490 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOo_linePragmas =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 2496 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOo_monadic =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 2502 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOo_newtypes =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 2508 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOo_pretty =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 2514 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOo_rename =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 2520 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOo_sem =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 2526 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOo_sig =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 2532 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOo_splitsems =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 2538 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOo_strictwrap =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 2544 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOo_traces =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 2550 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOo_unbox =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 2556 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOoptions =+ ({-# LINE 50 "src-ag/GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 2562 "dist/build/GenerateCode" #-}+ )+ -- copy rule (from local)+ _visitsOparamInstMap =+ ({-# LINE 101 "src-ag/GenerateCode.ag" #-}+ _paramInstMap+ {-# LINE 2568 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOparamMap =+ ({-# LINE 95 "src-ag/GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 2574 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOprefix =+ ({-# LINE 49 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 2580 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOquantMap =+ ({-# LINE 115 "src-ag/GenerateCode.ag" #-}+ _lhsIquantMap+ {-# LINE 2586 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOsyn =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 2592 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOunfoldSemDom =+ ({-# LINE 750 "src-ag/GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 2598 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOwith_sig =+ ({-# LINE 851 "src-ag/GenerateCode.ag" #-}+ _lhsIwith_sig+ {-# LINE 2604 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _visitsOwrappers =+ ({-# LINE 987 "src-ag/GenerateCode.ag" #-}+ _lhsIwrappers+ {-# LINE 2610 "dist/build/GenerateCode" #-}+ )+ ( _visitsIcomments,_visitsIdecls,_visitsIgatherInstVisitNrs,_visitsIintra,_visitsIintraVars,_visitsIisNil,_visitsIsemNames,_visitsIvisitedSet) =+ visits_ _visitsOallNts _visitsOallPragmas _visitsOaroundMap _visitsOchildren _visitsOcon _visitsOcontextMap _visitsOinh _visitsOinstVisitNrs _visitsOmergeMap _visitsOnr _visitsOnt _visitsOo_case _visitsOo_cata _visitsOo_costcentre _visitsOo_data _visitsOo_linePragmas _visitsOo_monadic _visitsOo_newtypes _visitsOo_pretty _visitsOo_rename _visitsOo_sem _visitsOo_sig _visitsOo_splitsems _visitsOo_strictwrap _visitsOo_traces _visitsOo_unbox _visitsOoptions _visitsOparamInstMap _visitsOparamMap _visitsOprefix _visitsOquantMap _visitsOsyn _visitsOterminals _visitsOunfoldSemDom _visitsOvisitedSet _visitsOwith_sig _visitsOwrappers+ in ( _lhsOcataAlt,_lhsOcomments,_lhsOdataAlt,_lhsOdecls,_lhsOsemNames))))+-- CProductions ------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allNts : Set NontermIdent+ allPragmas : PragmaMap+ aroundMap : Map ConstructorIdent (Set Identifier)+ contextMap : ContextMap+ inh : Attributes+ mergeMap : Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramMap : ParamMap+ prefix : String+ quantMap : QuantMap+ syn : Attributes+ unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type+ with_sig : Bool+ wrappers : Set NontermIdent+ synthesized attributes:+ cataAlts : Decls+ comments : [String]+ dataAlts : DataAlts+ decls : Decls+ semNames : [String]+ alternatives:+ alternative Cons:+ child hd : CProduction + child tl : CProductions + alternative Nil:+-}+-- cata+sem_CProductions :: CProductions ->+ T_CProductions+sem_CProductions list =+ (Prelude.foldr sem_CProductions_Cons sem_CProductions_Nil (Prelude.map sem_CProduction list))+-- semantic domain+newtype T_CProductions = T_CProductions ((Set NontermIdent) ->+ PragmaMap ->+ (Map ConstructorIdent (Set Identifier)) ->+ ContextMap ->+ Attributes ->+ (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) ->+ NontermIdent ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Bool) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Options ->+ ParamMap ->+ String ->+ QuantMap ->+ Attributes ->+ (NontermIdent -> Int -> [String] -> Code.Type) ->+ Bool ->+ (Set NontermIdent) ->+ ( Decls,([String]),DataAlts,Decls,([String])))+data Inh_CProductions = Inh_CProductions {allNts_Inh_CProductions :: !((Set NontermIdent)),allPragmas_Inh_CProductions :: !(PragmaMap),aroundMap_Inh_CProductions :: !((Map ConstructorIdent (Set Identifier))),contextMap_Inh_CProductions :: !(ContextMap),inh_Inh_CProductions :: !(Attributes),mergeMap_Inh_CProductions :: !((Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))),nt_Inh_CProductions :: !(NontermIdent),o_case_Inh_CProductions :: !(Bool),o_cata_Inh_CProductions :: !(Bool),o_costcentre_Inh_CProductions :: !(Bool),o_data_Inh_CProductions :: !((Maybe Bool)),o_linePragmas_Inh_CProductions :: !(Bool),o_monadic_Inh_CProductions :: !(Bool),o_newtypes_Inh_CProductions :: !(Bool),o_pretty_Inh_CProductions :: !(Bool),o_rename_Inh_CProductions :: !(Bool),o_sem_Inh_CProductions :: !(Bool),o_sig_Inh_CProductions :: !(Bool),o_splitsems_Inh_CProductions :: !(Bool),o_strictwrap_Inh_CProductions :: !(Bool),o_traces_Inh_CProductions :: !(Bool),o_unbox_Inh_CProductions :: !(Bool),options_Inh_CProductions :: !(Options),paramMap_Inh_CProductions :: !(ParamMap),prefix_Inh_CProductions :: !(String),quantMap_Inh_CProductions :: !(QuantMap),syn_Inh_CProductions :: !(Attributes),unfoldSemDom_Inh_CProductions :: !((NontermIdent -> Int -> [String] -> Code.Type)),with_sig_Inh_CProductions :: !(Bool),wrappers_Inh_CProductions :: !((Set NontermIdent))}+data Syn_CProductions = Syn_CProductions {cataAlts_Syn_CProductions :: !(Decls),comments_Syn_CProductions :: !(([String])),dataAlts_Syn_CProductions :: !(DataAlts),decls_Syn_CProductions :: !(Decls),semNames_Syn_CProductions :: !(([String]))}+wrap_CProductions :: T_CProductions ->+ Inh_CProductions ->+ Syn_CProductions+wrap_CProductions (T_CProductions sem) (Inh_CProductions _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) =+ (let ( _lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOsemNames) = sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers+ in (Syn_CProductions _lhsOcataAlts _lhsOcomments _lhsOdataAlts _lhsOdecls _lhsOsemNames))+sem_CProductions_Cons :: T_CProduction ->+ T_CProductions ->+ T_CProductions+sem_CProductions_Cons (T_CProduction hd_) (T_CProductions tl_) =+ (T_CProductions (\ _lhsIallNts+ _lhsIallPragmas+ _lhsIaroundMap+ _lhsIcontextMap+ _lhsIinh+ _lhsImergeMap+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_costcentre+ _lhsIo_data+ _lhsIo_linePragmas+ _lhsIo_monadic+ _lhsIo_newtypes+ _lhsIo_pretty+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_splitsems+ _lhsIo_strictwrap+ _lhsIo_traces+ _lhsIo_unbox+ _lhsIoptions+ _lhsIparamMap+ _lhsIprefix+ _lhsIquantMap+ _lhsIsyn+ _lhsIunfoldSemDom+ _lhsIwith_sig+ _lhsIwrappers ->+ (let _lhsOdataAlts :: DataAlts+ _lhsOcataAlts :: Decls+ _lhsOcomments :: ([String])+ _lhsOdecls :: Decls+ _lhsOsemNames :: ([String])+ _hdOallNts :: (Set NontermIdent)+ _hdOallPragmas :: PragmaMap+ _hdOaroundMap :: (Map ConstructorIdent (Set Identifier))+ _hdOcontextMap :: ContextMap+ _hdOinh :: Attributes+ _hdOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))+ _hdOnt :: NontermIdent+ _hdOo_case :: Bool+ _hdOo_cata :: Bool+ _hdOo_costcentre :: Bool+ _hdOo_data :: (Maybe Bool)+ _hdOo_linePragmas :: Bool+ _hdOo_monadic :: Bool+ _hdOo_newtypes :: Bool+ _hdOo_pretty :: Bool+ _hdOo_rename :: Bool+ _hdOo_sem :: Bool+ _hdOo_sig :: Bool+ _hdOo_splitsems :: Bool+ _hdOo_strictwrap :: Bool+ _hdOo_traces :: Bool+ _hdOo_unbox :: Bool+ _hdOoptions :: Options+ _hdOparamMap :: ParamMap+ _hdOprefix :: String+ _hdOquantMap :: QuantMap+ _hdOsyn :: Attributes+ _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _hdOwith_sig :: Bool+ _hdOwrappers :: (Set NontermIdent)+ _tlOallNts :: (Set NontermIdent)+ _tlOallPragmas :: PragmaMap+ _tlOaroundMap :: (Map ConstructorIdent (Set Identifier))+ _tlOcontextMap :: ContextMap+ _tlOinh :: Attributes+ _tlOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))+ _tlOnt :: NontermIdent+ _tlOo_case :: Bool+ _tlOo_cata :: Bool+ _tlOo_costcentre :: Bool+ _tlOo_data :: (Maybe Bool)+ _tlOo_linePragmas :: Bool+ _tlOo_monadic :: Bool+ _tlOo_newtypes :: Bool+ _tlOo_pretty :: Bool+ _tlOo_rename :: Bool+ _tlOo_sem :: Bool+ _tlOo_sig :: Bool+ _tlOo_splitsems :: Bool+ _tlOo_strictwrap :: Bool+ _tlOo_traces :: Bool+ _tlOo_unbox :: Bool+ _tlOoptions :: Options+ _tlOparamMap :: ParamMap+ _tlOprefix :: String+ _tlOquantMap :: QuantMap+ _tlOsyn :: Attributes+ _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _tlOwith_sig :: Bool+ _tlOwrappers :: (Set NontermIdent)+ _hdIcataAlt :: Decl+ _hdIcomments :: ([String])+ _hdIdataAlt :: DataAlt+ _hdIdecls :: Decls+ _hdIsemNames :: ([String])+ _tlIcataAlts :: Decls+ _tlIcomments :: ([String])+ _tlIdataAlts :: DataAlts+ _tlIdecls :: Decls+ _tlIsemNames :: ([String])+ -- "src-ag/GenerateCode.ag"(line 1015, column 17)+ _lhsOdataAlts =+ ({-# LINE 1015 "src-ag/GenerateCode.ag" #-}+ _hdIdataAlt : _tlIdataAlts+ {-# LINE 2819 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 1127, column 10)+ _lhsOcataAlts =+ ({-# LINE 1127 "src-ag/GenerateCode.ag" #-}+ _hdIcataAlt : _tlIcataAlts+ {-# LINE 2825 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)+ _lhsOcomments =+ ({-# LINE 868 "src-ag/GenerateCode.ag" #-}+ _hdIcomments ++ _tlIcomments+ {-# LINE 2831 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 919, column 44)+ _lhsOdecls =+ ({-# LINE 919 "src-ag/GenerateCode.ag" #-}+ _hdIdecls ++ _tlIdecls+ {-# LINE 2837 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 1146, column 61)+ _lhsOsemNames =+ ({-# LINE 1146 "src-ag/GenerateCode.ag" #-}+ _hdIsemNames ++ _tlIsemNames+ {-# LINE 2843 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOallNts =+ ({-# LINE 132 "src-ag/GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 2849 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOallPragmas =+ ({-# LINE 73 "src-ag/GenerateCode.ag" #-}+ _lhsIallPragmas+ {-# LINE 2855 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOaroundMap =+ ({-# LINE 578 "src-ag/GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 2861 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOcontextMap =+ ({-# LINE 115 "src-ag/GenerateCode.ag" #-}+ _lhsIcontextMap+ {-# LINE 2867 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 2873 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 594 "src-ag/GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 2879 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 2885 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_case =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 2891 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_cata =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 2897 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_costcentre =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 2903 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_data =+ ({-# LINE 48 "src-ag/GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 2909 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_linePragmas =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 2915 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_monadic =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 2921 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_newtypes =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 2927 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_pretty =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 2933 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 2939 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_sem =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 2945 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_sig =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 2951 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_splitsems =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 2957 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_strictwrap =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 2963 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_traces =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 2969 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_unbox =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 2975 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 50 "src-ag/GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 2981 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOparamMap =+ ({-# LINE 95 "src-ag/GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 2987 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOprefix =+ ({-# LINE 49 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 2993 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOquantMap =+ ({-# LINE 115 "src-ag/GenerateCode.ag" #-}+ _lhsIquantMap+ {-# LINE 2999 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 3005 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOunfoldSemDom =+ ({-# LINE 750 "src-ag/GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 3011 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOwith_sig =+ ({-# LINE 851 "src-ag/GenerateCode.ag" #-}+ _lhsIwith_sig+ {-# LINE 3017 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOwrappers =+ ({-# LINE 987 "src-ag/GenerateCode.ag" #-}+ _lhsIwrappers+ {-# LINE 3023 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOallNts =+ ({-# LINE 132 "src-ag/GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 3029 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOallPragmas =+ ({-# LINE 73 "src-ag/GenerateCode.ag" #-}+ _lhsIallPragmas+ {-# LINE 3035 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOaroundMap =+ ({-# LINE 578 "src-ag/GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 3041 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOcontextMap =+ ({-# LINE 115 "src-ag/GenerateCode.ag" #-}+ _lhsIcontextMap+ {-# LINE 3047 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 3053 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 594 "src-ag/GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 3059 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 3065 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_case =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 3071 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_cata =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 3077 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_costcentre =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 3083 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_data =+ ({-# LINE 48 "src-ag/GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 3089 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_linePragmas =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 3095 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_monadic =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 3101 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_newtypes =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 3107 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_pretty =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 3113 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 3119 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_sem =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 3125 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_sig =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 3131 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_splitsems =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 3137 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_strictwrap =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 3143 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_traces =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 3149 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_unbox =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 3155 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 50 "src-ag/GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 3161 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOparamMap =+ ({-# LINE 95 "src-ag/GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 3167 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOprefix =+ ({-# LINE 49 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 3173 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOquantMap =+ ({-# LINE 115 "src-ag/GenerateCode.ag" #-}+ _lhsIquantMap+ {-# LINE 3179 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 3185 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOunfoldSemDom =+ ({-# LINE 750 "src-ag/GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 3191 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOwith_sig =+ ({-# LINE 851 "src-ag/GenerateCode.ag" #-}+ _lhsIwith_sig+ {-# LINE 3197 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOwrappers =+ ({-# LINE 987 "src-ag/GenerateCode.ag" #-}+ _lhsIwrappers+ {-# LINE 3203 "dist/build/GenerateCode" #-}+ )+ ( _hdIcataAlt,_hdIcomments,_hdIdataAlt,_hdIdecls,_hdIsemNames) =+ hd_ _hdOallNts _hdOallPragmas _hdOaroundMap _hdOcontextMap _hdOinh _hdOmergeMap _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamMap _hdOprefix _hdOquantMap _hdOsyn _hdOunfoldSemDom _hdOwith_sig _hdOwrappers+ ( _tlIcataAlts,_tlIcomments,_tlIdataAlts,_tlIdecls,_tlIsemNames) =+ tl_ _tlOallNts _tlOallPragmas _tlOaroundMap _tlOcontextMap _tlOinh _tlOmergeMap _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamMap _tlOprefix _tlOquantMap _tlOsyn _tlOunfoldSemDom _tlOwith_sig _tlOwrappers+ in ( _lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOsemNames))))+sem_CProductions_Nil :: T_CProductions+sem_CProductions_Nil =+ (T_CProductions (\ _lhsIallNts+ _lhsIallPragmas+ _lhsIaroundMap+ _lhsIcontextMap+ _lhsIinh+ _lhsImergeMap+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_costcentre+ _lhsIo_data+ _lhsIo_linePragmas+ _lhsIo_monadic+ _lhsIo_newtypes+ _lhsIo_pretty+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_splitsems+ _lhsIo_strictwrap+ _lhsIo_traces+ _lhsIo_unbox+ _lhsIoptions+ _lhsIparamMap+ _lhsIprefix+ _lhsIquantMap+ _lhsIsyn+ _lhsIunfoldSemDom+ _lhsIwith_sig+ _lhsIwrappers ->+ (let _lhsOdataAlts :: DataAlts+ _lhsOcataAlts :: Decls+ _lhsOcomments :: ([String])+ _lhsOdecls :: Decls+ _lhsOsemNames :: ([String])+ -- "src-ag/GenerateCode.ag"(line 1016, column 17)+ _lhsOdataAlts =+ ({-# LINE 1016 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 3251 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 1128, column 10)+ _lhsOcataAlts =+ ({-# LINE 1128 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 3257 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)+ _lhsOcomments =+ ({-# LINE 868 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 3263 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 919, column 44)+ _lhsOdecls =+ ({-# LINE 919 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 3269 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 1146, column 61)+ _lhsOsemNames =+ ({-# LINE 1146 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 3275 "dist/build/GenerateCode" #-}+ )+ in ( _lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOsemNames))))+-- CRule -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allNts : Set NontermIdent+ aroundMap : Set Identifier+ children : [(Identifier,Type,ChildKind)]+ con : ConstructorIdent+ inh : Attributes+ instVisitNrs : Map Identifier Int+ mergeMap : Map Identifier (Identifier, [Identifier])+ nr : Int+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramInstMap : Map Identifier (NontermIdent, [String])+ paramMap : ParamMap+ prefix : String+ syn : Attributes+ terminals : [Identifier]+ unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type+ what : String+ chained attributes:+ declsAbove : [Decl]+ visitedSet : Set Identifier+ synthesized attributes:+ allTpsFound : Bool+ bldBlocksFun : DeclBlocks -> DeclBlocks+ comments : [String]+ decls : Decls+ definedInsts : [Identifier]+ exprs : Exprs+ tSigs : [Decl]+ tps : [Type]+ usedVars : Set String+ alternatives:+ alternative CChildVisit:+ child name : {Identifier}+ child nt : {NontermIdent}+ child nr : {Int}+ child inh : {Attributes}+ child syn : {Attributes}+ child isLast : {Bool}+ visit 0:+ local visitedSet : _+ local costCentreDescr : _+ local addCostCentre : _+ local decls : _+ local isSuperfluousHigherOrderIntra : _+ local names : _+ local mkTp : _+ local definedTps : _+ local nextTp : _+ local orgParams : _+ local instParams : _+ local replParamMap : _+ local replace : _+ local evalTp : _+ alternative CRule:+ child name : {Identifier}+ child isIn : {Bool}+ child hasCode : {Bool}+ child nt : {NontermIdent}+ child con : {ConstructorIdent}+ child field : {Identifier}+ child childnt : {Maybe NontermIdent}+ child tp : {Maybe Type}+ child pattern : Pattern + child rhs : {[String]}+ child defines : {Map Int (Identifier,Identifier,Maybe Type)}+ child owrt : {Bool}+ child origin : {String}+ child uses : {Set (Identifier, Identifier)}+ child explicit : {Bool}+ child mbNamed : {Maybe Identifier}+ visit 0:+ local instTypes : _+ local originComment : _+ local instDecls : _+ local patDescr : _+ local traceDescr : _+ local addTrace : _+ local costCentreDescr : _+ local addCostCentre : _+ local addLinePragma : _+ local decls : _+ local definedInsts : _+ local rulename : _+ local mkTp : _+ local orgParams : _+ local evalTp : _+-}+-- cata+sem_CRule :: CRule ->+ T_CRule+sem_CRule (CChildVisit _name _nt _nr _inh _syn _isLast) =+ (sem_CRule_CChildVisit _name _nt _nr _inh _syn _isLast)+sem_CRule (CRule _name _isIn _hasCode _nt _con _field _childnt _tp _pattern _rhs _defines _owrt _origin _uses _explicit _mbNamed) =+ (sem_CRule_CRule _name _isIn _hasCode _nt _con _field _childnt _tp (sem_Pattern _pattern) _rhs _defines _owrt _origin _uses _explicit _mbNamed)+-- semantic domain+newtype T_CRule = T_CRule ((Set NontermIdent) ->+ (Set Identifier) ->+ ([(Identifier,Type,ChildKind)]) ->+ ConstructorIdent ->+ ([Decl]) ->+ Attributes ->+ (Map Identifier Int) ->+ (Map Identifier (Identifier, [Identifier])) ->+ Int ->+ NontermIdent ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Bool) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Options ->+ (Map Identifier (NontermIdent, [String])) ->+ ParamMap ->+ String ->+ Attributes ->+ ([Identifier]) ->+ (NontermIdent -> Int -> [String] -> Code.Type) ->+ (Set Identifier) ->+ String ->+ ( Bool,(DeclBlocks -> DeclBlocks),([String]),Decls,([Decl]),([Identifier]),Exprs,([Decl]),([Type]),(Set String),(Set Identifier)))+data Inh_CRule = Inh_CRule {allNts_Inh_CRule :: !((Set NontermIdent)),aroundMap_Inh_CRule :: !((Set Identifier)),children_Inh_CRule :: !(([(Identifier,Type,ChildKind)])),con_Inh_CRule :: !(ConstructorIdent),declsAbove_Inh_CRule :: !(([Decl])),inh_Inh_CRule :: !(Attributes),instVisitNrs_Inh_CRule :: !((Map Identifier Int)),mergeMap_Inh_CRule :: !((Map Identifier (Identifier, [Identifier]))),nr_Inh_CRule :: !(Int),nt_Inh_CRule :: !(NontermIdent),o_case_Inh_CRule :: !(Bool),o_cata_Inh_CRule :: !(Bool),o_costcentre_Inh_CRule :: !(Bool),o_data_Inh_CRule :: !((Maybe Bool)),o_linePragmas_Inh_CRule :: !(Bool),o_monadic_Inh_CRule :: !(Bool),o_newtypes_Inh_CRule :: !(Bool),o_pretty_Inh_CRule :: !(Bool),o_rename_Inh_CRule :: !(Bool),o_sem_Inh_CRule :: !(Bool),o_sig_Inh_CRule :: !(Bool),o_splitsems_Inh_CRule :: !(Bool),o_strictwrap_Inh_CRule :: !(Bool),o_traces_Inh_CRule :: !(Bool),o_unbox_Inh_CRule :: !(Bool),options_Inh_CRule :: !(Options),paramInstMap_Inh_CRule :: !((Map Identifier (NontermIdent, [String]))),paramMap_Inh_CRule :: !(ParamMap),prefix_Inh_CRule :: !(String),syn_Inh_CRule :: !(Attributes),terminals_Inh_CRule :: !(([Identifier])),unfoldSemDom_Inh_CRule :: !((NontermIdent -> Int -> [String] -> Code.Type)),visitedSet_Inh_CRule :: !((Set Identifier)),what_Inh_CRule :: !(String)}+data Syn_CRule = Syn_CRule {allTpsFound_Syn_CRule :: !(Bool),bldBlocksFun_Syn_CRule :: !((DeclBlocks -> DeclBlocks)),comments_Syn_CRule :: !(([String])),decls_Syn_CRule :: !(Decls),declsAbove_Syn_CRule :: !(([Decl])),definedInsts_Syn_CRule :: !(([Identifier])),exprs_Syn_CRule :: !(Exprs),tSigs_Syn_CRule :: !(([Decl])),tps_Syn_CRule :: !(([Type])),usedVars_Syn_CRule :: !((Set String)),visitedSet_Syn_CRule :: !((Set Identifier))}+wrap_CRule :: T_CRule ->+ Inh_CRule ->+ Syn_CRule+wrap_CRule (T_CRule sem) (Inh_CRule _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat) =+ (let ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet) = sem _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat+ in (Syn_CRule _lhsOallTpsFound _lhsObldBlocksFun _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet))+sem_CRule_CChildVisit :: Identifier ->+ NontermIdent ->+ Int ->+ Attributes ->+ Attributes ->+ Bool ->+ T_CRule+sem_CRule_CChildVisit name_ nt_ nr_ inh_ syn_ isLast_ =+ (T_CRule (\ _lhsIallNts+ _lhsIaroundMap+ _lhsIchildren+ _lhsIcon+ _lhsIdeclsAbove+ _lhsIinh+ _lhsIinstVisitNrs+ _lhsImergeMap+ _lhsInr+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_costcentre+ _lhsIo_data+ _lhsIo_linePragmas+ _lhsIo_monadic+ _lhsIo_newtypes+ _lhsIo_pretty+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_splitsems+ _lhsIo_strictwrap+ _lhsIo_traces+ _lhsIo_unbox+ _lhsIoptions+ _lhsIparamInstMap+ _lhsIparamMap+ _lhsIprefix+ _lhsIsyn+ _lhsIterminals+ _lhsIunfoldSemDom+ _lhsIvisitedSet+ _lhsIwhat ->+ (let _lhsOexprs :: Exprs+ _lhsOusedVars :: (Set String)+ _lhsOtSigs :: ([Decl])+ _lhsOtps :: ([Type])+ _lhsOdeclsAbove :: ([Decl])+ _lhsObldBlocksFun :: (DeclBlocks -> DeclBlocks)+ _lhsOallTpsFound :: Bool+ _lhsOcomments :: ([String])+ _lhsOdecls :: Decls+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOvisitedSet :: (Set Identifier)+ -- "src-ag/GenerateCode.ag"(line 147, column 26)+ _visitedSet =+ ({-# LINE 147 "src-ag/GenerateCode.ag" #-}+ Set.insert name_ _lhsIvisitedSet+ {-# LINE 3492 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 203, column 18)+ _costCentreDescr =+ ({-# LINE 203 "src-ag/GenerateCode.ag" #-}+ show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show name_ ++ ":" ++ show nt_ ++ ":" ++ show nr_+ {-# LINE 3498 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 204, column 18)+ _addCostCentre =+ ({-# LINE 204 "src-ag/GenerateCode.ag" #-}+ \v -> if _lhsIo_costcentre+ then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v+ else v+ {-# LINE 3506 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 207, column 18)+ _decls =+ ({-# LINE 207 "src-ag/GenerateCode.ag" #-}+ let lhsVars = map (attrname True name_) (Map.keys syn_)+ ++ if isLast_ then [] else [unwrap ++ funname name_ (nr_+1)]+ rhsVars = map (attrname False name_) (Map.keys inh_)+ unwrap = if _lhsIo_newtypes then typeName nt_ (nr_ + 1) ++ " " else ""+ tuple | isMerging = TupleLhs [locname name_ ++ "_comp"]+ | otherwise = mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars+ rhs = _addCostCentre $ Code.InvokeExpr (typeName nt_ nr_) (SimpleExpr fun) (map SimpleExpr rhsVars)+ isVirtual _ [] = False+ isVirtual nm ((n,t,kind) : r)+ | nm == n = case kind of+ ChildAttr -> True+ _ -> False+ | otherwise = isVirtual nm r+ isMerged = name_ `Map.member` _lhsImergeMap+ isMerging = name_ `elem` concatMap (\(_,cs) -> cs) (Map.elems _lhsImergeMap)+ merges = [ (c,cs) | (c,(_,cs)) <- Map.assocs _lhsImergeMap, all (`Set.member` _visitedSet ) cs, name_ `elem` (c:cs) ]+ baseNm = if nr_ == 0 && isVirtual name_ _lhsIchildren+ then Ident (getName name_ ++ "_inst") (getPos name_)+ else name_+ fun | nr_ == 0 && Set.member name_ _lhsIaroundMap+ = locname name_ ++ "_around " ++ funname baseNm 0+ | otherwise = funname baseNm nr_+ outDecls | isMerged = []+ | otherwise =+ if isMerging+ then [mkDecl _lhsIo_monadic tuple rhs Set.empty Set.empty]+ else [Resume _lhsIo_monadic (typeName nt_ nr_) tuple rhs]+ outMerged | null merges || nr_ /= 0 = []+ | otherwise = let (c,cs) = head merges+ tuple' = mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars'+ lhsVars' = map (attrname True c) (Map.keys syn_)+ ++ if isLast_ then [] else [unwrap ++ funname c (nr_+1)]+ rhsVars = [ locname c ++ "_comp" | c <- cs ]+ fun = locname c ++ "_merge"+ rhs' = App fun (map SimpleExpr rhsVars)+ in [Resume _lhsIo_monadic (typeName nt_ nr_) tuple' rhs']+ in+ (outDecls ++ outMerged)+ {-# LINE 3549 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 327, column 7)+ _isSuperfluousHigherOrderIntra =+ ({-# LINE 327 "src-ag/GenerateCode.ag" #-}+ _lhsInr <= Map.findWithDefault (-1) name_ _lhsIinstVisitNrs+ {-# LINE 3555 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 341, column 8)+ _names =+ ({-# LINE 341 "src-ag/GenerateCode.ag" #-}+ if _isSuperfluousHigherOrderIntra+ then []+ else [funname name_ (nr_+1)]+ {-# LINE 3563 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 345, column 8)+ _lhsOexprs =+ ({-# LINE 345 "src-ag/GenerateCode.ag" #-}+ let wrap = if _lhsIo_newtypes then \x -> App (typeName nt_ (nr_ + 1)) [x] else id+ addType expr | null _instParams = expr+ | otherwise = TypedExpr expr (_lhsIunfoldSemDom nt_ (nr_+1) _instParams )+ in map (wrap . addType . SimpleExpr) _names+ {-# LINE 3572 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 357, column 7)+ _lhsOusedVars =+ ({-# LINE 357 "src-ag/GenerateCode.ag" #-}+ Set.fromList _names+ {-# LINE 3578 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 393, column 19)+ _mkTp =+ ({-# LINE 393 "src-ag/GenerateCode.ag" #-}+ _evalTp . typeToCodeType (Just nt_) _orgParams . removeDeforested+ {-# LINE 3584 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 394, column 19)+ _definedTps =+ ({-# LINE 394 "src-ag/GenerateCode.ag" #-}+ [ TSig (attrname True name_ a) (_mkTp tp) | (a,tp) <- Map.toList syn_ ]+ {-# LINE 3590 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 395, column 19)+ _nextTp =+ ({-# LINE 395 "src-ag/GenerateCode.ag" #-}+ typeName nt_ (nr_+1)+ {-# LINE 3596 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 396, column 19)+ _lhsOtSigs =+ ({-# LINE 396 "src-ag/GenerateCode.ag" #-}+ (if isLast_ then id else (TSig (funname name_ (nr_+1)) (TypeApp (SimpleType _nextTp) (map SimpleType _instParams )) :)) _definedTps+ {-# LINE 3602 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 398, column 19)+ _orgParams =+ ({-# LINE 398 "src-ag/GenerateCode.ag" #-}+ map getName $ Map.findWithDefault [] nt_ _lhsIparamMap+ {-# LINE 3608 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 399, column 19)+ _instParams =+ ({-# LINE 399 "src-ag/GenerateCode.ag" #-}+ snd $ Map.findWithDefault (nt_,[]) name_ _lhsIparamInstMap+ {-# LINE 3614 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 400, column 19)+ _replParamMap =+ ({-# LINE 400 "src-ag/GenerateCode.ag" #-}+ Map.fromList (zip _orgParams _instParams )+ {-# LINE 3620 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 401, column 19)+ _replace =+ ({-# LINE 401 "src-ag/GenerateCode.ag" #-}+ \k -> Map.findWithDefault k k _replParamMap+ {-# LINE 3626 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 402, column 19)+ _evalTp =+ ({-# LINE 402 "src-ag/GenerateCode.ag" #-}+ if null _orgParams then id else evalType _replace+ {-# LINE 3632 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 419, column 19)+ _lhsOtps =+ ({-# LINE 419 "src-ag/GenerateCode.ag" #-}+ if _isSuperfluousHigherOrderIntra+ then []+ else [NT (ntOfVisit nt_ (nr_+1)) _instParams False]+ {-# LINE 3640 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 618, column 7)+ _lhsOdeclsAbove =+ ({-# LINE 618 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 3646 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 631, column 7)+ _lhsObldBlocksFun =+ ({-# LINE 631 "src-ag/GenerateCode.ag" #-}+ DeclBlock _lhsIdeclsAbove (head _decls )+ {-# LINE 3652 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 416, column 39)+ _lhsOallTpsFound =+ ({-# LINE 416 "src-ag/GenerateCode.ag" #-}+ True+ {-# LINE 3658 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)+ _lhsOcomments =+ ({-# LINE 868 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 3664 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 155, column 34)+ _lhsOdecls =+ ({-# LINE 155 "src-ag/GenerateCode.ag" #-}+ _decls+ {-# LINE 3670 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 261 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 3676 "dist/build/GenerateCode" #-}+ )+ -- copy rule (from local)+ _lhsOvisitedSet =+ ({-# LINE 145 "src-ag/GenerateCode.ag" #-}+ _visitedSet+ {-# LINE 3682 "dist/build/GenerateCode" #-}+ )+ in ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet))))+sem_CRule_CRule :: Identifier ->+ Bool ->+ Bool ->+ NontermIdent ->+ ConstructorIdent ->+ Identifier ->+ (Maybe NontermIdent) ->+ (Maybe Type) ->+ T_Pattern ->+ ([String]) ->+ (Map Int (Identifier,Identifier,Maybe Type)) ->+ Bool ->+ String ->+ (Set (Identifier, Identifier)) ->+ Bool ->+ (Maybe Identifier) ->+ T_CRule+sem_CRule_CRule name_ isIn_ hasCode_ nt_ con_ field_ childnt_ tp_ (T_Pattern pattern_) rhs_ defines_ owrt_ origin_ uses_ explicit_ mbNamed_ =+ (T_CRule (\ _lhsIallNts+ _lhsIaroundMap+ _lhsIchildren+ _lhsIcon+ _lhsIdeclsAbove+ _lhsIinh+ _lhsIinstVisitNrs+ _lhsImergeMap+ _lhsInr+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_costcentre+ _lhsIo_data+ _lhsIo_linePragmas+ _lhsIo_monadic+ _lhsIo_newtypes+ _lhsIo_pretty+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_splitsems+ _lhsIo_strictwrap+ _lhsIo_traces+ _lhsIo_unbox+ _lhsIoptions+ _lhsIparamInstMap+ _lhsIparamMap+ _lhsIprefix+ _lhsIsyn+ _lhsIterminals+ _lhsIunfoldSemDom+ _lhsIvisitedSet+ _lhsIwhat ->+ (let _lhsOexprs :: Exprs+ _lhsOusedVars :: (Set String)+ _lhsOtSigs :: ([Decl])+ _lhsOtps :: ([Type])+ _lhsOallTpsFound :: Bool+ _lhsOdeclsAbove :: ([Decl])+ _lhsObldBlocksFun :: (DeclBlocks -> DeclBlocks)+ _lhsOcomments :: ([String])+ _lhsOdecls :: Decls+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOvisitedSet :: (Set Identifier)+ _patternIcopy :: Pattern+ _patternIdefinedInsts :: ([Identifier])+ _patternIpatternAttributes :: ([(Identifier, Identifier)])+ -- "src-ag/GenerateCode.ag"(line 157, column 12)+ _instTypes =+ ({-# LINE 157 "src-ag/GenerateCode.ag" #-}+ [ (n, (t, mb, for)) | (n, NT t _ for, mb) <- _lhsIchildren ]+ {-# LINE 3755 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 158, column 12)+ _originComment =+ ({-# LINE 158 "src-ag/GenerateCode.ag" #-}+ if _lhsIo_pretty+ then (Comment origin_:)+ else id+ {-# LINE 3763 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 161, column 12)+ _instDecls =+ ({-# LINE 161 "src-ag/GenerateCode.ag" #-}+ [ mkDecl _lhsIo_monadic (Pattern3 (Alias _INST' inst (Underscore (getPos inst))))+ ( let (nm,mb,defor) = fromJust $ inst `lookup` _instTypes+ in unwrapSem _lhsIo_newtypes nm+ $ case mb of+ ChildReplace tp' -> App instLocFieldName [SimpleExpr $ fieldname inst]+ _ ->+ if defor+ then SimpleExpr instLocFieldName+ else App (cataname _lhsIprefix nm)+ [SimpleExpr instLocFieldName]+ )+ (Set.singleton instSemFieldName)+ (Set.singleton instLocFieldName)+ | inst <- _definedInsts+ , let instLocFieldName = attrname True _INST inst+ instSemFieldName = attrname False _INST' inst+ ]+ {-# LINE 3785 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 178, column 12)+ _patDescr =+ ({-# LINE 178 "src-ag/GenerateCode.ag" #-}+ if isIn_+ then "_"+ else concat $ intersperse "," (map (\(f,a) -> show f ++ "." ++ show a) _patternIpatternAttributes)+ {-# LINE 3793 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 181, column 12)+ _traceDescr =+ ({-# LINE 181 "src-ag/GenerateCode.ag" #-}+ (maybe "" (\nm -> show nm ++ ":") mbNamed_) ++ show nt_ ++ " :: " ++ show con_ ++ " :: " ++ _patDescr+ {-# LINE 3799 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 183, column 12)+ _addTrace =+ ({-# LINE 183 "src-ag/GenerateCode.ag" #-}+ \v -> if _lhsIo_traces+ then Trace _traceDescr v+ else v+ {-# LINE 3807 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 186, column 12)+ _costCentreDescr =+ ({-# LINE 186 "src-ag/GenerateCode.ag" #-}+ show nt_ ++ ":" ++ show con_ ++ ":" ++ _patDescr+ {-# LINE 3813 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 187, column 12)+ _addCostCentre =+ ({-# LINE 187 "src-ag/GenerateCode.ag" #-}+ \v -> if _lhsIo_costcentre+ then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v+ else v+ {-# LINE 3821 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 190, column 12)+ _addLinePragma =+ ({-# LINE 190 "src-ag/GenerateCode.ag" #-}+ \v -> let p = getPos name_+ hasPos = line p > 0 && column p >= 0 && not (null (file p))+ in if _lhsIo_linePragmas && hasPos+ then PragmaExpr True True ("LINE " ++ show (line p) ++ " " ++ show (file p))+ $ LineExpr+ $ v+ else v+ {-# LINE 3833 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 197, column 12)+ _decls =+ ({-# LINE 197 "src-ag/GenerateCode.ag" #-}+ if hasCode_+ then _originComment ( mkDecl (_lhsIo_monadic && explicit_) (Pattern3 _patternIcopy) (_addTrace $ _addCostCentre $ _addLinePragma $ (TextExpr rhs_))+ (Set.fromList [attrname False fld nm | (fld,nm,_) <- Map.elems defines_])+ (Set.fromList [attrname True fld nm | (fld,nm) <- Set.toList uses_])+ : _instDecls )+ else _instDecls+ {-# LINE 3844 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 266, column 12)+ _definedInsts =+ ({-# LINE 266 "src-ag/GenerateCode.ag" #-}+ if isIn_ then [] else _patternIdefinedInsts+ {-# LINE 3850 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 336, column 12)+ _rulename =+ ({-# LINE 336 "src-ag/GenerateCode.ag" #-}+ if field_ == _LOC && name_ `elem` _lhsIterminals+ then funname name_ 0+ else attrname isIn_ field_ name_+ {-# LINE 3858 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 339, column 12)+ _lhsOexprs =+ ({-# LINE 339 "src-ag/GenerateCode.ag" #-}+ [SimpleExpr _rulename ]+ {-# LINE 3864 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 355, column 7)+ _lhsOusedVars =+ ({-# LINE 355 "src-ag/GenerateCode.ag" #-}+ Set.singleton _rulename+ {-# LINE 3870 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 365, column 19)+ _mkTp =+ ({-# LINE 365 "src-ag/GenerateCode.ag" #-}+ typeToCodeType (Just _lhsInt) _orgParams+ {-# LINE 3876 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 366, column 19)+ _lhsOtSigs =+ ({-# LINE 366 "src-ag/GenerateCode.ag" #-}+ [ TSig (attrname False field attr) tp'+ | (field,attr,tp) <- Map.elems defines_, isJust tp+ , let tp1 = _evalTp field $ _mkTp (fromJust tp)+ tp' = case findOrigType attr _lhsIchildren of+ Just tp' -> let tp2 = _evalTp field $ _mkTp tp'+ in Arr tp2 tp1+ Nothing -> tp1+ findOrigType nm [] = Nothing+ findOrigType nm ((n,_,kind) : r)+ | nm == n = case kind of+ ChildReplace orig -> Just orig+ _ -> Nothing+ | otherwise = findOrigType nm r+ ]+ {-# LINE 3895 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 381, column 19)+ _orgParams =+ ({-# LINE 381 "src-ag/GenerateCode.ag" #-}+ map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap+ {-# LINE 3901 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 382, column 19)+ _evalTp =+ ({-# LINE 382 "src-ag/GenerateCode.ag" #-}+ \field tp -> let orgFldParams = map getName $ Map.findWithDefault [] childNt _lhsIparamMap+ (childNt,instParams) = Map.findWithDefault (_lhsInt,[]) field _lhsIparamInstMap+ replMap = Map.fromList (zip orgFldParams instParams)+ replace k = Map.findWithDefault ('@':k) k replMap+ in if null instParams+ then if null _orgParams+ then tp+ else idEvalType tp+ else evalType replace tp+ {-# LINE 3915 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 418, column 23)+ (_lhsOtps,_lhsOallTpsFound) =+ ({-# LINE 418 "src-ag/GenerateCode.ag" #-}+ maybe ([],False) (\tp -> ([tp],True)) tp_+ {-# LINE 3921 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 616, column 7)+ _lhsOdeclsAbove =+ ({-# LINE 616 "src-ag/GenerateCode.ag" #-}+ _lhsIdeclsAbove ++ _decls+ {-# LINE 3927 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 629, column 7)+ _lhsObldBlocksFun =+ ({-# LINE 629 "src-ag/GenerateCode.ag" #-}+ id+ {-# LINE 3933 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 903, column 18)+ _lhsOcomments =+ ({-# LINE 903 "src-ag/GenerateCode.ag" #-}+ [ makeLocalComment 11 _lhsIwhat name tp | (field,name,tp) <- Map.elems defines_, field == _LOC ]+ ++ [ makeLocalComment 11 "inst " name tp | (field,name,tp) <- Map.elems defines_, field == _INST ]+ {-# LINE 3940 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 155, column 34)+ _lhsOdecls =+ ({-# LINE 155 "src-ag/GenerateCode.ag" #-}+ _decls+ {-# LINE 3946 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 261 "src-ag/GenerateCode.ag" #-}+ _definedInsts+ {-# LINE 3952 "dist/build/GenerateCode" #-}+ )+ -- copy rule (chain)+ _lhsOvisitedSet =+ ({-# LINE 145 "src-ag/GenerateCode.ag" #-}+ _lhsIvisitedSet+ {-# LINE 3958 "dist/build/GenerateCode" #-}+ )+ ( _patternIcopy,_patternIdefinedInsts,_patternIpatternAttributes) =+ pattern_+ in ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet))))+-- CSegment ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ inh : Attributes+ isLast : Bool+ nr : Int+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramMap : ParamMap+ prefix : String+ syn : Attributes+ synthesized attributes:+ comments : [String]+ semDom : [Decl]+ semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)+ wrapDecls : Decls+ alternatives:+ alternative CSegment:+ child inh : {Attributes}+ child syn : {Attributes}+ visit 0:+ local altSemForm : _+ local tp : _+ local inhTps : _+ local inhTup : _+ local synTps : _+ local curTypeName : _+ local nextTypeName : _+ local indexName : _+ local dataIndex : _+ local indexExpr : _+ local indexStr : _+ local inhInstance : _+ local synInstance : _+ local continuation : _+ local params : _+-}+-- cata+sem_CSegment :: CSegment ->+ T_CSegment+sem_CSegment (CSegment _inh _syn) =+ (sem_CSegment_CSegment _inh _syn)+-- semantic domain+newtype T_CSegment = T_CSegment (Attributes ->+ Bool ->+ Int ->+ NontermIdent ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Bool) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Options ->+ ParamMap ->+ String ->+ Attributes ->+ ( ([String]),([Decl]),(Map (NontermIdent, Int) ([String], Code.Type)),Decls))+data Inh_CSegment = Inh_CSegment {inh_Inh_CSegment :: !(Attributes),isLast_Inh_CSegment :: !(Bool),nr_Inh_CSegment :: !(Int),nt_Inh_CSegment :: !(NontermIdent),o_case_Inh_CSegment :: !(Bool),o_cata_Inh_CSegment :: !(Bool),o_costcentre_Inh_CSegment :: !(Bool),o_data_Inh_CSegment :: !((Maybe Bool)),o_linePragmas_Inh_CSegment :: !(Bool),o_monadic_Inh_CSegment :: !(Bool),o_newtypes_Inh_CSegment :: !(Bool),o_pretty_Inh_CSegment :: !(Bool),o_rename_Inh_CSegment :: !(Bool),o_sem_Inh_CSegment :: !(Bool),o_sig_Inh_CSegment :: !(Bool),o_splitsems_Inh_CSegment :: !(Bool),o_strictwrap_Inh_CSegment :: !(Bool),o_traces_Inh_CSegment :: !(Bool),o_unbox_Inh_CSegment :: !(Bool),options_Inh_CSegment :: !(Options),paramMap_Inh_CSegment :: !(ParamMap),prefix_Inh_CSegment :: !(String),syn_Inh_CSegment :: !(Attributes)}+data Syn_CSegment = Syn_CSegment {comments_Syn_CSegment :: !(([String])),semDom_Syn_CSegment :: !(([Decl])),semDomUnfoldGath_Syn_CSegment :: !((Map (NontermIdent, Int) ([String], Code.Type))),wrapDecls_Syn_CSegment :: !(Decls)}+wrap_CSegment :: T_CSegment ->+ Inh_CSegment ->+ Syn_CSegment+wrap_CSegment (T_CSegment sem) (Inh_CSegment _lhsIinh _lhsIisLast _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn) =+ (let ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) = sem _lhsIinh _lhsIisLast _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn+ in (Syn_CSegment _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls))+sem_CSegment_CSegment :: Attributes ->+ Attributes ->+ T_CSegment+sem_CSegment_CSegment inh_ syn_ =+ (T_CSegment (\ _lhsIinh+ _lhsIisLast+ _lhsInr+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_costcentre+ _lhsIo_data+ _lhsIo_linePragmas+ _lhsIo_monadic+ _lhsIo_newtypes+ _lhsIo_pretty+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_splitsems+ _lhsIo_strictwrap+ _lhsIo_traces+ _lhsIo_unbox+ _lhsIoptions+ _lhsIparamMap+ _lhsIprefix+ _lhsIsyn ->+ (let _lhsOsemDom :: ([Decl])+ _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _lhsOwrapDecls :: Decls+ _lhsOcomments :: ([String])+ -- "src-ag/GenerateCode.ag"(line 715, column 15)+ _altSemForm =+ ({-# LINE 715 "src-ag/GenerateCode.ag" #-}+ breadthFirst _lhsIoptions+ {-# LINE 4089 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 716, column 15)+ _tp =+ ({-# LINE 716 "src-ag/GenerateCode.ag" #-}+ if _altSemForm+ then TypeApp (SimpleType "Child") [SimpleType "EvalInfo", _indexExpr ]+ else foldr Arr _synTps _inhTps+ {-# LINE 4097 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 719, column 15)+ _inhTps =+ ({-# LINE 719 "src-ag/GenerateCode.ag" #-}+ [typeToCodeType (Just _lhsInt) _params tp | tp <- Map.elems inh_]+ {-# LINE 4103 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 720, column 15)+ _inhTup =+ ({-# LINE 720 "src-ag/GenerateCode.ag" #-}+ mkTupleType _lhsIo_unbox (null _inhTps ) _inhTps+ {-# LINE 4109 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 721, column 15)+ _synTps =+ ({-# LINE 721 "src-ag/GenerateCode.ag" #-}+ mkTupleType _lhsIo_unbox (null _inhTps ) ([typeToCodeType (Just _lhsInt) _params tp | tp <- Map.elems syn_] ++ _continuation )+ {-# LINE 4115 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 722, column 15)+ _curTypeName =+ ({-# LINE 722 "src-ag/GenerateCode.ag" #-}+ typeName _lhsInt _lhsInr+ {-# LINE 4121 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 723, column 15)+ _nextTypeName =+ ({-# LINE 723 "src-ag/GenerateCode.ag" #-}+ typeName _lhsInt (_lhsInr + 1)+ {-# LINE 4127 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 724, column 15)+ _indexName =+ ({-# LINE 724 "src-ag/GenerateCode.ag" #-}+ "I_" ++ _curTypeName+ {-# LINE 4133 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 725, column 15)+ _dataIndex =+ ({-# LINE 725 "src-ag/GenerateCode.ag" #-}+ Code.Data _indexName _params [DataAlt _indexName []] False []+ {-# LINE 4139 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 726, column 15)+ _indexExpr =+ ({-# LINE 726 "src-ag/GenerateCode.ag" #-}+ TypeApp (SimpleType _indexName ) (map (SimpleType . ('@':)) _params )+ {-# LINE 4145 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 727, column 15)+ _indexStr =+ ({-# LINE 727 "src-ag/GenerateCode.ag" #-}+ "(" ++ _indexName ++ concatMap (\p -> " " ++ p) _params ++ ")"+ {-# LINE 4151 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 728, column 15)+ _inhInstance =+ ({-# LINE 728 "src-ag/GenerateCode.ag" #-}+ Code.Data "instance Inh" [_indexStr ] [DataAlt (typeName _lhsInt _lhsInr ++ "_Inh") [_inhTup ] ] False []+ {-# LINE 4157 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 729, column 15)+ _synInstance =+ ({-# LINE 729 "src-ag/GenerateCode.ag" #-}+ Code.Data "instance Syn" [_indexStr ] [DataAlt (typeName _lhsInt _lhsInr ++ "_Syn") [_synTps ] ] False []+ {-# LINE 4163 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 730, column 15)+ _continuation =+ ({-# LINE 730 "src-ag/GenerateCode.ag" #-}+ if _lhsIisLast+ then []+ else [TypeApp (SimpleType _nextTypeName ) (map (SimpleType . ('@':)) _params )]+ {-# LINE 4171 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 733, column 15)+ _params =+ ({-# LINE 733 "src-ag/GenerateCode.ag" #-}+ map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap+ {-# LINE 4177 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 734, column 15)+ _lhsOsemDom =+ ({-# LINE 734 "src-ag/GenerateCode.ag" #-}+ let name = typeName _lhsInt _lhsInr+ evalTp | null _params = id+ | otherwise = idEvalType+ in ( if _lhsIo_newtypes+ then [ Code.NewType name _params name (evalTp _tp ) ]+ else [ Code.Type name _params (evalTp _tp ) ] )+ ++ ( if _altSemForm+ then [_dataIndex , _inhInstance , _synInstance ]+ else [] )+ {-# LINE 4191 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 748, column 7)+ _lhsOsemDomUnfoldGath =+ ({-# LINE 748 "src-ag/GenerateCode.ag" #-}+ Map.singleton (_lhsInt, _lhsInr) (_params , _tp )+ {-# LINE 4197 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 831, column 15)+ _lhsOwrapDecls =+ ({-# LINE 831 "src-ag/GenerateCode.ag" #-}+ let lhsVars = map (lhsname False) (Map.keys syn_)+ ++ if _lhsIisLast then [] else [unwrap ++ sem (_lhsInr+1)]+ rhsVars = map (lhsname True) (Map.keys inh_)+ rhs = map SimpleExpr rhsVars+ unwrap = if _lhsIo_newtypes then typeName _lhsInt (_lhsInr + 1) ++ " " else ""+ var = "sem"+ sem 0 = var+ sem n = var ++ "_" ++ show n+ ntt = typeName _lhsInt _lhsInr+ in [ EvalDecl ntt (mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars) (InvokeExpr ntt (SimpleExpr $ sem _lhsInr) rhs) ]+ {-# LINE 4212 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 873, column 18)+ _lhsOcomments =+ ({-# LINE 873 "src-ag/GenerateCode.ag" #-}+ let body = map ind (showsSegment (CSegment inh_ syn_))+ in if null body+ then []+ else ("visit " ++ show _lhsInr ++ ":") : body+ {-# LINE 4221 "dist/build/GenerateCode" #-}+ )+ in ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))))+-- CSegments ---------------------------------------------------+{-+ visit 0:+ inherited attributes:+ inh : Attributes+ nr : Int+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramMap : ParamMap+ prefix : String+ syn : Attributes+ synthesized attributes:+ comments : [String]+ isNil : Bool+ semDom : [Decl]+ semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)+ wrapDecls : Decls+ alternatives:+ alternative Cons:+ child hd : CSegment + child tl : CSegments + alternative Nil:+-}+-- cata+sem_CSegments :: CSegments ->+ T_CSegments+sem_CSegments list =+ (Prelude.foldr sem_CSegments_Cons sem_CSegments_Nil (Prelude.map sem_CSegment list))+-- semantic domain+newtype T_CSegments = T_CSegments (Attributes ->+ Int ->+ NontermIdent ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Bool) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Options ->+ ParamMap ->+ String ->+ Attributes ->+ ( ([String]),Bool,([Decl]),(Map (NontermIdent, Int) ([String], Code.Type)),Decls))+data Inh_CSegments = Inh_CSegments {inh_Inh_CSegments :: !(Attributes),nr_Inh_CSegments :: !(Int),nt_Inh_CSegments :: !(NontermIdent),o_case_Inh_CSegments :: !(Bool),o_cata_Inh_CSegments :: !(Bool),o_costcentre_Inh_CSegments :: !(Bool),o_data_Inh_CSegments :: !((Maybe Bool)),o_linePragmas_Inh_CSegments :: !(Bool),o_monadic_Inh_CSegments :: !(Bool),o_newtypes_Inh_CSegments :: !(Bool),o_pretty_Inh_CSegments :: !(Bool),o_rename_Inh_CSegments :: !(Bool),o_sem_Inh_CSegments :: !(Bool),o_sig_Inh_CSegments :: !(Bool),o_splitsems_Inh_CSegments :: !(Bool),o_strictwrap_Inh_CSegments :: !(Bool),o_traces_Inh_CSegments :: !(Bool),o_unbox_Inh_CSegments :: !(Bool),options_Inh_CSegments :: !(Options),paramMap_Inh_CSegments :: !(ParamMap),prefix_Inh_CSegments :: !(String),syn_Inh_CSegments :: !(Attributes)}+data Syn_CSegments = Syn_CSegments {comments_Syn_CSegments :: !(([String])),isNil_Syn_CSegments :: !(Bool),semDom_Syn_CSegments :: !(([Decl])),semDomUnfoldGath_Syn_CSegments :: !((Map (NontermIdent, Int) ([String], Code.Type))),wrapDecls_Syn_CSegments :: !(Decls)}+wrap_CSegments :: T_CSegments ->+ Inh_CSegments ->+ Syn_CSegments+wrap_CSegments (T_CSegments sem) (Inh_CSegments _lhsIinh _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn) =+ (let ( _lhsOcomments,_lhsOisNil,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) = sem _lhsIinh _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn+ in (Syn_CSegments _lhsOcomments _lhsOisNil _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls))+sem_CSegments_Cons :: T_CSegment ->+ T_CSegments ->+ T_CSegments+sem_CSegments_Cons (T_CSegment hd_) (T_CSegments tl_) =+ (T_CSegments (\ _lhsIinh+ _lhsInr+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_costcentre+ _lhsIo_data+ _lhsIo_linePragmas+ _lhsIo_monadic+ _lhsIo_newtypes+ _lhsIo_pretty+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_splitsems+ _lhsIo_strictwrap+ _lhsIo_traces+ _lhsIo_unbox+ _lhsIoptions+ _lhsIparamMap+ _lhsIprefix+ _lhsIsyn ->+ (let _tlOnr :: Int+ _lhsOisNil :: Bool+ _hdOisLast :: Bool+ _lhsOcomments :: ([String])+ _lhsOsemDom :: ([Decl])+ _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _lhsOwrapDecls :: Decls+ _hdOinh :: Attributes+ _hdOnr :: Int+ _hdOnt :: NontermIdent+ _hdOo_case :: Bool+ _hdOo_cata :: Bool+ _hdOo_costcentre :: Bool+ _hdOo_data :: (Maybe Bool)+ _hdOo_linePragmas :: Bool+ _hdOo_monadic :: Bool+ _hdOo_newtypes :: Bool+ _hdOo_pretty :: Bool+ _hdOo_rename :: Bool+ _hdOo_sem :: Bool+ _hdOo_sig :: Bool+ _hdOo_splitsems :: Bool+ _hdOo_strictwrap :: Bool+ _hdOo_traces :: Bool+ _hdOo_unbox :: Bool+ _hdOoptions :: Options+ _hdOparamMap :: ParamMap+ _hdOprefix :: String+ _hdOsyn :: Attributes+ _tlOinh :: Attributes+ _tlOnt :: NontermIdent+ _tlOo_case :: Bool+ _tlOo_cata :: Bool+ _tlOo_costcentre :: Bool+ _tlOo_data :: (Maybe Bool)+ _tlOo_linePragmas :: Bool+ _tlOo_monadic :: Bool+ _tlOo_newtypes :: Bool+ _tlOo_pretty :: Bool+ _tlOo_rename :: Bool+ _tlOo_sem :: Bool+ _tlOo_sig :: Bool+ _tlOo_splitsems :: Bool+ _tlOo_strictwrap :: Bool+ _tlOo_traces :: Bool+ _tlOo_unbox :: Bool+ _tlOoptions :: Options+ _tlOparamMap :: ParamMap+ _tlOprefix :: String+ _tlOsyn :: Attributes+ _hdIcomments :: ([String])+ _hdIsemDom :: ([Decl])+ _hdIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _hdIwrapDecls :: Decls+ _tlIcomments :: ([String])+ _tlIisNil :: Bool+ _tlIsemDom :: ([Decl])+ _tlIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _tlIwrapDecls :: Decls+ -- "src-ag/GenerateCode.ag"(line 286, column 11)+ _tlOnr =+ ({-# LINE 286 "src-ag/GenerateCode.ag" #-}+ _lhsInr + 1+ {-# LINE 4388 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 299, column 12)+ _lhsOisNil =+ ({-# LINE 299 "src-ag/GenerateCode.ag" #-}+ False+ {-# LINE 4394 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 300, column 12)+ _hdOisLast =+ ({-# LINE 300 "src-ag/GenerateCode.ag" #-}+ _tlIisNil+ {-# LINE 4400 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)+ _lhsOcomments =+ ({-# LINE 868 "src-ag/GenerateCode.ag" #-}+ _hdIcomments ++ _tlIcomments+ {-# LINE 4406 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 710, column 50)+ _lhsOsemDom =+ ({-# LINE 710 "src-ag/GenerateCode.ag" #-}+ _hdIsemDom ++ _tlIsemDom+ {-# LINE 4412 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 744, column 86)+ _lhsOsemDomUnfoldGath =+ ({-# LINE 744 "src-ag/GenerateCode.ag" #-}+ _hdIsemDomUnfoldGath `Map.union` _tlIsemDomUnfoldGath+ {-# LINE 4418 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 829, column 52)+ _lhsOwrapDecls =+ ({-# LINE 829 "src-ag/GenerateCode.ag" #-}+ _hdIwrapDecls ++ _tlIwrapDecls+ {-# LINE 4424 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 4430 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOnr =+ ({-# LINE 278 "src-ag/GenerateCode.ag" #-}+ _lhsInr+ {-# LINE 4436 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 4442 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_case =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 4448 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_cata =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 4454 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_costcentre =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 4460 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_data =+ ({-# LINE 48 "src-ag/GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 4466 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_linePragmas =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 4472 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_monadic =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 4478 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_newtypes =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 4484 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_pretty =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 4490 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 4496 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_sem =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 4502 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_sig =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 4508 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_splitsems =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 4514 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_strictwrap =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 4520 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_traces =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 4526 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_unbox =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 4532 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 50 "src-ag/GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 4538 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOparamMap =+ ({-# LINE 95 "src-ag/GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 4544 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOprefix =+ ({-# LINE 49 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 4550 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 4556 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 4562 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 4568 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_case =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 4574 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_cata =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 4580 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_costcentre =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 4586 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_data =+ ({-# LINE 48 "src-ag/GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 4592 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_linePragmas =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 4598 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_monadic =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 4604 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_newtypes =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 4610 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_pretty =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 4616 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 4622 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_sem =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 4628 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_sig =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 4634 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_splitsems =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 4640 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_strictwrap =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 4646 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_traces =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 4652 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_unbox =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 4658 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 50 "src-ag/GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 4664 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOparamMap =+ ({-# LINE 95 "src-ag/GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 4670 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOprefix =+ ({-# LINE 49 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 4676 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 4682 "dist/build/GenerateCode" #-}+ )+ ( _hdIcomments,_hdIsemDom,_hdIsemDomUnfoldGath,_hdIwrapDecls) =+ hd_ _hdOinh _hdOisLast _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamMap _hdOprefix _hdOsyn+ ( _tlIcomments,_tlIisNil,_tlIsemDom,_tlIsemDomUnfoldGath,_tlIwrapDecls) =+ tl_ _tlOinh _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamMap _tlOprefix _tlOsyn+ in ( _lhsOcomments,_lhsOisNil,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))))+sem_CSegments_Nil :: T_CSegments+sem_CSegments_Nil =+ (T_CSegments (\ _lhsIinh+ _lhsInr+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_costcentre+ _lhsIo_data+ _lhsIo_linePragmas+ _lhsIo_monadic+ _lhsIo_newtypes+ _lhsIo_pretty+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_splitsems+ _lhsIo_strictwrap+ _lhsIo_traces+ _lhsIo_unbox+ _lhsIoptions+ _lhsIparamMap+ _lhsIprefix+ _lhsIsyn ->+ (let _lhsOisNil :: Bool+ _lhsOcomments :: ([String])+ _lhsOsemDom :: ([Decl])+ _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _lhsOwrapDecls :: Decls+ -- "src-ag/GenerateCode.ag"(line 301, column 10)+ _lhsOisNil =+ ({-# LINE 301 "src-ag/GenerateCode.ag" #-}+ True+ {-# LINE 4722 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)+ _lhsOcomments =+ ({-# LINE 868 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 4728 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 710, column 50)+ _lhsOsemDom =+ ({-# LINE 710 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 4734 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 744, column 86)+ _lhsOsemDomUnfoldGath =+ ({-# LINE 744 "src-ag/GenerateCode.ag" #-}+ Map.empty+ {-# LINE 4740 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 829, column 52)+ _lhsOwrapDecls =+ ({-# LINE 829 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 4746 "dist/build/GenerateCode" #-}+ )+ in ( _lhsOcomments,_lhsOisNil,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))))+-- CVisit ------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allNts : Set NontermIdent+ allPragmas : PragmaMap+ aroundMap : Set Identifier+ children : [(Identifier,Type, ChildKind)]+ con : ConstructorIdent+ contextMap : ContextMap+ inh : Attributes+ instVisitNrs : Map Identifier Int+ isLast : Bool+ mergeMap : Map Identifier (Identifier, [Identifier])+ nextIntra : Exprs+ nextIntraVars : Set String+ nr : Int+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramInstMap : Map Identifier (NontermIdent, [String])+ paramMap : ParamMap+ prefix : String+ quantMap : QuantMap+ syn : Attributes+ terminals : [Identifier]+ unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type+ with_sig : Bool+ wrappers : Set NontermIdent+ chained attributes:+ decls : Decls+ visitedSet : Set Identifier+ synthesized attributes:+ comments : [String]+ gatherInstVisitNrs : Map Identifier Int+ intra : Exprs+ intraVars : Set String+ semNames : [String]+ alternatives:+ alternative CVisit:+ child inh : {Attributes}+ child syn : {Attributes}+ child vss : Sequence + child intra : Sequence + child ordered : {Bool}+ visit 0:+ local higherOrderChildren : _+ local firstOrderChildren : _+ local firstOrderOrig : _+ local funcname : _+ local nextVisitName : _+ local nextVisitDecl : _+ local isOneVisit : _+ local hasWrappers : _+ local refDecls : _+ local decls : _+ local lastExprVars : _+ local blockFunDecls : _+ local blockFirstFunCall : _+ local costCentreDescr : _+ local addCostCentre : _+ local params : _+ local semFun : _+ local tsig : _+ local semType : _+ local typeSigs : _+ local o_do : _+ local o_case : _+ local declsType : _+ local o_splitsems : _+-}+-- cata+sem_CVisit :: CVisit ->+ T_CVisit+sem_CVisit (CVisit _inh _syn _vss _intra _ordered) =+ (sem_CVisit_CVisit _inh _syn (sem_Sequence _vss) (sem_Sequence _intra) _ordered)+-- semantic domain+newtype T_CVisit = T_CVisit ((Set NontermIdent) ->+ PragmaMap ->+ (Set Identifier) ->+ ([(Identifier,Type, ChildKind)]) ->+ ConstructorIdent ->+ ContextMap ->+ Decls ->+ Attributes ->+ (Map Identifier Int) ->+ Bool ->+ (Map Identifier (Identifier, [Identifier])) ->+ Exprs ->+ (Set String) ->+ Int ->+ NontermIdent ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Bool) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Options ->+ (Map Identifier (NontermIdent, [String])) ->+ ParamMap ->+ String ->+ QuantMap ->+ Attributes ->+ ([Identifier]) ->+ (NontermIdent -> Int -> [String] -> Code.Type) ->+ (Set Identifier) ->+ Bool ->+ (Set NontermIdent) ->+ ( ([String]),Decls,(Map Identifier Int),Exprs,(Set String),([String]),(Set Identifier)))+data Inh_CVisit = Inh_CVisit {allNts_Inh_CVisit :: !((Set NontermIdent)),allPragmas_Inh_CVisit :: !(PragmaMap),aroundMap_Inh_CVisit :: !((Set Identifier)),children_Inh_CVisit :: !(([(Identifier,Type, ChildKind)])),con_Inh_CVisit :: !(ConstructorIdent),contextMap_Inh_CVisit :: !(ContextMap),decls_Inh_CVisit :: !(Decls),inh_Inh_CVisit :: !(Attributes),instVisitNrs_Inh_CVisit :: !((Map Identifier Int)),isLast_Inh_CVisit :: !(Bool),mergeMap_Inh_CVisit :: !((Map Identifier (Identifier, [Identifier]))),nextIntra_Inh_CVisit :: !(Exprs),nextIntraVars_Inh_CVisit :: !((Set String)),nr_Inh_CVisit :: !(Int),nt_Inh_CVisit :: !(NontermIdent),o_case_Inh_CVisit :: !(Bool),o_cata_Inh_CVisit :: !(Bool),o_costcentre_Inh_CVisit :: !(Bool),o_data_Inh_CVisit :: !((Maybe Bool)),o_linePragmas_Inh_CVisit :: !(Bool),o_monadic_Inh_CVisit :: !(Bool),o_newtypes_Inh_CVisit :: !(Bool),o_pretty_Inh_CVisit :: !(Bool),o_rename_Inh_CVisit :: !(Bool),o_sem_Inh_CVisit :: !(Bool),o_sig_Inh_CVisit :: !(Bool),o_splitsems_Inh_CVisit :: !(Bool),o_strictwrap_Inh_CVisit :: !(Bool),o_traces_Inh_CVisit :: !(Bool),o_unbox_Inh_CVisit :: !(Bool),options_Inh_CVisit :: !(Options),paramInstMap_Inh_CVisit :: !((Map Identifier (NontermIdent, [String]))),paramMap_Inh_CVisit :: !(ParamMap),prefix_Inh_CVisit :: !(String),quantMap_Inh_CVisit :: !(QuantMap),syn_Inh_CVisit :: !(Attributes),terminals_Inh_CVisit :: !(([Identifier])),unfoldSemDom_Inh_CVisit :: !((NontermIdent -> Int -> [String] -> Code.Type)),visitedSet_Inh_CVisit :: !((Set Identifier)),with_sig_Inh_CVisit :: !(Bool),wrappers_Inh_CVisit :: !((Set NontermIdent))}+data Syn_CVisit = Syn_CVisit {comments_Syn_CVisit :: !(([String])),decls_Syn_CVisit :: !(Decls),gatherInstVisitNrs_Syn_CVisit :: !((Map Identifier Int)),intra_Syn_CVisit :: !(Exprs),intraVars_Syn_CVisit :: !((Set String)),semNames_Syn_CVisit :: !(([String])),visitedSet_Syn_CVisit :: !((Set Identifier))}+wrap_CVisit :: T_CVisit ->+ Inh_CVisit ->+ Syn_CVisit+wrap_CVisit (T_CVisit sem) (Inh_CVisit _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIdecls _lhsIinh _lhsIinstVisitNrs _lhsIisLast _lhsImergeMap _lhsInextIntra _lhsInextIntraVars _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers) =+ (let ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOsemNames,_lhsOvisitedSet) = sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIdecls _lhsIinh _lhsIinstVisitNrs _lhsIisLast _lhsImergeMap _lhsInextIntra _lhsInextIntraVars _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers+ in (Syn_CVisit _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOsemNames _lhsOvisitedSet))+sem_CVisit_CVisit :: Attributes ->+ Attributes ->+ T_Sequence ->+ T_Sequence ->+ Bool ->+ T_CVisit+sem_CVisit_CVisit inh_ syn_ (T_Sequence vss_) (T_Sequence intra_) ordered_ =+ (T_CVisit (\ _lhsIallNts+ _lhsIallPragmas+ _lhsIaroundMap+ _lhsIchildren+ _lhsIcon+ _lhsIcontextMap+ _lhsIdecls+ _lhsIinh+ _lhsIinstVisitNrs+ _lhsIisLast+ _lhsImergeMap+ _lhsInextIntra+ _lhsInextIntraVars+ _lhsInr+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_costcentre+ _lhsIo_data+ _lhsIo_linePragmas+ _lhsIo_monadic+ _lhsIo_newtypes+ _lhsIo_pretty+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_splitsems+ _lhsIo_strictwrap+ _lhsIo_traces+ _lhsIo_unbox+ _lhsIoptions+ _lhsIparamInstMap+ _lhsIparamMap+ _lhsIprefix+ _lhsIquantMap+ _lhsIsyn+ _lhsIterminals+ _lhsIunfoldSemDom+ _lhsIvisitedSet+ _lhsIwith_sig+ _lhsIwrappers ->+ (let _lhsOintra :: Exprs+ _lhsOintraVars :: (Set String)+ _vssOlastExpr :: Expr+ _intraOlastExpr :: Expr+ _lhsOdecls :: Decls+ _lhsOgatherInstVisitNrs :: (Map Identifier Int)+ _vssOdeclsAbove :: ([Decl])+ _intraOdeclsAbove :: ([Decl])+ _lhsOcomments :: ([String])+ _vssOwhat :: String+ _intraOwhat :: String+ _lhsOsemNames :: ([String])+ _lhsOvisitedSet :: (Set Identifier)+ _vssOallNts :: (Set NontermIdent)+ _vssOaroundMap :: (Set Identifier)+ _vssOchildren :: ([(Identifier,Type,ChildKind)])+ _vssOcon :: ConstructorIdent+ _vssOinh :: Attributes+ _vssOinstVisitNrs :: (Map Identifier Int)+ _vssOmergeMap :: (Map Identifier (Identifier, [Identifier]))+ _vssOnr :: Int+ _vssOnt :: NontermIdent+ _vssOo_case :: Bool+ _vssOo_cata :: Bool+ _vssOo_costcentre :: Bool+ _vssOo_data :: (Maybe Bool)+ _vssOo_linePragmas :: Bool+ _vssOo_monadic :: Bool+ _vssOo_newtypes :: Bool+ _vssOo_pretty :: Bool+ _vssOo_rename :: Bool+ _vssOo_sem :: Bool+ _vssOo_sig :: Bool+ _vssOo_splitsems :: Bool+ _vssOo_strictwrap :: Bool+ _vssOo_traces :: Bool+ _vssOo_unbox :: Bool+ _vssOoptions :: Options+ _vssOparamInstMap :: (Map Identifier (NontermIdent, [String]))+ _vssOparamMap :: ParamMap+ _vssOprefix :: String+ _vssOsyn :: Attributes+ _vssOterminals :: ([Identifier])+ _vssOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _vssOvisitedSet :: (Set Identifier)+ _intraOallNts :: (Set NontermIdent)+ _intraOaroundMap :: (Set Identifier)+ _intraOchildren :: ([(Identifier,Type,ChildKind)])+ _intraOcon :: ConstructorIdent+ _intraOinh :: Attributes+ _intraOinstVisitNrs :: (Map Identifier Int)+ _intraOmergeMap :: (Map Identifier (Identifier, [Identifier]))+ _intraOnr :: Int+ _intraOnt :: NontermIdent+ _intraOo_case :: Bool+ _intraOo_cata :: Bool+ _intraOo_costcentre :: Bool+ _intraOo_data :: (Maybe Bool)+ _intraOo_linePragmas :: Bool+ _intraOo_monadic :: Bool+ _intraOo_newtypes :: Bool+ _intraOo_pretty :: Bool+ _intraOo_rename :: Bool+ _intraOo_sem :: Bool+ _intraOo_sig :: Bool+ _intraOo_splitsems :: Bool+ _intraOo_strictwrap :: Bool+ _intraOo_traces :: Bool+ _intraOo_unbox :: Bool+ _intraOoptions :: Options+ _intraOparamInstMap :: (Map Identifier (NontermIdent, [String]))+ _intraOparamMap :: ParamMap+ _intraOprefix :: String+ _intraOsyn :: Attributes+ _intraOterminals :: ([Identifier])+ _intraOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _intraOvisitedSet :: (Set Identifier)+ _vssIallTpsFound :: Bool+ _vssIblockDecls :: DeclBlocks+ _vssIcomments :: ([String])+ _vssIdecls :: Decls+ _vssIdeclsAbove :: ([Decl])+ _vssIdefinedInsts :: ([Identifier])+ _vssIexprs :: Exprs+ _vssItSigs :: ([Decl])+ _vssItps :: ([Type])+ _vssIusedVars :: (Set String)+ _vssIvisitedSet :: (Set Identifier)+ _intraIallTpsFound :: Bool+ _intraIblockDecls :: DeclBlocks+ _intraIcomments :: ([String])+ _intraIdecls :: Decls+ _intraIdeclsAbove :: ([Decl])+ _intraIdefinedInsts :: ([Identifier])+ _intraIexprs :: Exprs+ _intraItSigs :: ([Decl])+ _intraItps :: ([Type])+ _intraIusedVars :: (Set String)+ _intraIvisitedSet :: (Set Identifier)+ -- "src-ag/GenerateCode.ag"(line 310, column 13)+ _lhsOintra =+ ({-# LINE 310 "src-ag/GenerateCode.ag" #-}+ _intraIexprs+ {-# LINE 5041 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 311, column 13)+ _lhsOintraVars =+ ({-# LINE 311 "src-ag/GenerateCode.ag" #-}+ _intraIusedVars+ {-# LINE 5047 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 441, column 13)+ (_higherOrderChildren,_firstOrderChildren) =+ ({-# LINE 441 "src-ag/GenerateCode.ag" #-}+ partition (\(_,_,virt) -> isHigherOrder virt) _lhsIchildren+ {-# LINE 5053 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 442, column 13)+ _firstOrderOrig =+ ({-# LINE 442 "src-ag/GenerateCode.ag" #-}+ map pickOrigType _firstOrderChildren+ {-# LINE 5059 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 443, column 13)+ _funcname =+ ({-# LINE 443 "src-ag/GenerateCode.ag" #-}+ seqSemname _lhsIprefix _lhsInt _lhsIcon _lhsInr+ {-# LINE 5065 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 444, column 13)+ _nextVisitName =+ ({-# LINE 444 "src-ag/GenerateCode.ag" #-}+ if _lhsIisLast then [] else [visitname _lhsIprefix _lhsInt (_lhsInr+1)]+ {-# LINE 5071 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 445, column 13)+ _nextVisitDecl =+ ({-# LINE 445 "src-ag/GenerateCode.ag" #-}+ let lhs = TupleLhs _nextVisitName+ rhs = Let _lhsIdecls (SimpleExpr fun)+ fun = seqSemname _lhsIprefix _lhsInt _lhsIcon (_lhsInr+1)+ in if _lhsIisLast+ then []+ else [Decl lhs rhs (Set.fromList _nextVisitName) _lhsInextIntraVars]+ {-# LINE 5082 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 452, column 13)+ _isOneVisit =+ ({-# LINE 452 "src-ag/GenerateCode.ag" #-}+ _lhsIisLast && _lhsInr == 0+ {-# LINE 5088 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 453, column 13)+ _hasWrappers =+ ({-# LINE 453 "src-ag/GenerateCode.ag" #-}+ _lhsInt `Set.member` _lhsIwrappers+ {-# LINE 5094 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 454, column 13)+ _refDecls =+ ({-# LINE 454 "src-ag/GenerateCode.ag" #-}+ if _isOneVisit && _hasWrappers && reference _lhsIoptions+ then let synAttrs = Map.toList syn_+ synNT = "Syn" ++ "_" ++ getName _lhsInt+ synVars = [ SimpleExpr (attrname False _LHS a) | (a,_) <- synAttrs ]+ rhs = App synNT synVars+ lhs = Fun "___node" []+ in [Decl lhs rhs Set.empty Set.empty]+ else []+ {-# LINE 5107 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 462, column 13)+ _decls =+ ({-# LINE 462 "src-ag/GenerateCode.ag" #-}+ _typeSigs ++ _vssIdecls ++ _nextVisitDecl ++ _refDecls+ {-# LINE 5113 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 463, column 13)+ _vssOlastExpr =+ ({-# LINE 463 "src-ag/GenerateCode.ag" #-}+ mkTupleExpr _lhsIo_unbox (null $ Map.keys inh_) $ map (SimpleExpr . lhsname False) (Map.keys syn_) ++ map SimpleExpr _nextVisitName+ {-# LINE 5119 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 464, column 13)+ _intraOlastExpr =+ ({-# LINE 464 "src-ag/GenerateCode.ag" #-}+ error "lastExpr: not used here"+ {-# LINE 5125 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 465, column 13)+ _lastExprVars =+ ({-# LINE 465 "src-ag/GenerateCode.ag" #-}+ map (lhsname False) (Map.keys syn_) ++ _nextVisitName+ {-# LINE 5131 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 466, column 13)+ (_blockFunDecls,_blockFirstFunCall) =+ ({-# LINE 466 "src-ag/GenerateCode.ag" #-}+ mkPartitionedFunction _funcname _o_case _nextVisitDecl _lastExprVars _vssIblockDecls+ {-# LINE 5137 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 468, column 13)+ _costCentreDescr =+ ({-# LINE 468 "src-ag/GenerateCode.ag" #-}+ "b" ++ ":" ++ show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show _lhsInr+ {-# LINE 5143 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 469, column 13)+ _addCostCentre =+ ({-# LINE 469 "src-ag/GenerateCode.ag" #-}+ \v -> if _lhsIo_costcentre+ then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v+ else v+ {-# LINE 5151 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 473, column 13)+ _params =+ ({-# LINE 473 "src-ag/GenerateCode.ag" #-}+ map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap+ {-# LINE 5157 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 474, column 13)+ _semFun =+ ({-# LINE 474 "src-ag/GenerateCode.ag" #-}+ let lhs = Fun _funcname lhs_args+ lhs_args = if _lhsInr == 0 then map field _firstOrderOrig else []+ field (name,NT tp tps _,_) = let unwrap | _lhsIo_newtypes = \x -> App (sdtype tp) [x]+ | otherwise = id+ addType expr | null tps = expr+ | otherwise = TypedExpr expr (_lhsIunfoldSemDom tp 0 tps)+ in unwrap $ addType $ SimpleExpr $ funname name 0+ field (name,tp,_) = let expr = SimpleExpr (funname name 0)+ in if null _params+ then expr+ else TypedExpr expr (idEvalType $ typeToCodeType (Just _lhsInt) _params $ removeDeforested tp)+ mbEvalTp | null _params = const Nothing+ | otherwise = Just . idEvalType+ rhs = wrap+ . mkSemFun _lhsInt _lhsInr [mkLambdaArg (lhsname True nm) (mbEvalTp $ typeToCodeType (Just _lhsInt) _params $ removeDeforested tp) | (nm,tp) <- Map.assocs inh_]+ $ _addCostCentre+ $ if ordered_ && _o_splitsems+ then _blockFirstFunCall+ else mkDecls _declsType _decls+ . ResultExpr (typeName _lhsInt _lhsInr)+ . mkTupleExpr _lhsIo_unbox (null $ Map.keys inh_)+ $ map (SimpleExpr . lhsname False) (Map.keys syn_) ++ map SimpleExpr _nextVisitName+ wrap = if _lhsIo_newtypes+ then \x -> App (typeName _lhsInt _lhsInr) [x]+ else id+ in Decl lhs rhs Set.empty Set.empty+ {-# LINE 5188 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 505, column 13)+ _tsig =+ ({-# LINE 505 "src-ag/GenerateCode.ag" #-}+ TSig _funcname _semType+ {-# LINE 5194 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 506, column 13)+ _semType =+ ({-# LINE 506 "src-ag/GenerateCode.ag" #-}+ let argType (NT tp tps _) r | tp /= _SELF = typeAppStrs (sdtype tp) tps `Arr` r+ | tp == _SELF = error "GenerateCode: found an intra-type with type SELF, which should have been prevented by CRule.tps"+ argType (Haskell tp) r = SimpleType tp `Arr` r+ evalTp | null _params = id+ | otherwise = idEvalType+ in appQuant _lhsIquantMap _lhsInt $ appContext _lhsIcontextMap _lhsInt $ evalTp $+ if _lhsInr == 0+ then foldr argType (typeAppStrs (sdtype _lhsInt ) _params ) (map (\(_,t,_) -> t) _firstOrderOrig )+ else foldr argType (typeAppStrs (typeName _lhsInt _lhsInr) _params ) []+ {-# LINE 5208 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 517, column 13)+ _lhsOdecls =+ ({-# LINE 517 "src-ag/GenerateCode.ag" #-}+ ( if _lhsIwith_sig+ then [_tsig, _semFun]+ else [_semFun]+ ) +++ ( if ordered_ && _o_splitsems+ then _blockFunDecls+ else []+ )+ {-# LINE 5221 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 525, column 13)+ _typeSigs =+ ({-# LINE 525 "src-ag/GenerateCode.ag" #-}+ if _lhsIo_sig && not _o_case+ then _vssItSigs+ else []+ {-# LINE 5229 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 528, column 13)+ _o_do =+ ({-# LINE 528 "src-ag/GenerateCode.ag" #-}+ ordered_ && _lhsIo_monadic+ {-# LINE 5235 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 529, column 13)+ _o_case =+ ({-# LINE 529 "src-ag/GenerateCode.ag" #-}+ not _o_do && _lhsIo_case && ordered_ && not (hasPragma _lhsIallPragmas _lhsInt _lhsIcon _NOCASE)+ {-# LINE 5241 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 530, column 13)+ _declsType =+ ({-# LINE 530 "src-ag/GenerateCode.ag" #-}+ if _o_do+ then DeclsDo+ else if _o_case+ then DeclsCase+ else DeclsLet+ {-# LINE 5251 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 535, column 13)+ _o_splitsems =+ ({-# LINE 535 "src-ag/GenerateCode.ag" #-}+ ordered_ && _lhsIo_splitsems+ {-# LINE 5257 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 568, column 7)+ _lhsOgatherInstVisitNrs =+ ({-# LINE 568 "src-ag/GenerateCode.ag" #-}+ Map.fromList [(i,_lhsInr) | i <- _vssIdefinedInsts]+ {-# LINE 5263 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 611, column 7)+ _vssOdeclsAbove =+ ({-# LINE 611 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 5269 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 612, column 7)+ _intraOdeclsAbove =+ ({-# LINE 612 "src-ag/GenerateCode.ag" #-}+ error "declsAbove: not used here"+ {-# LINE 5275 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 894, column 18)+ _lhsOcomments =+ ({-# LINE 894 "src-ag/GenerateCode.ag" #-}+ let body = map ind (_vssIcomments ++ _intraIcomments)+ in if null body+ then []+ else ("visit " ++ show _lhsInr ++ ":") : body+ {-# LINE 5284 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 898, column 18)+ _vssOwhat =+ ({-# LINE 898 "src-ag/GenerateCode.ag" #-}+ "local"+ {-# LINE 5290 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 899, column 18)+ _intraOwhat =+ ({-# LINE 899 "src-ag/GenerateCode.ag" #-}+ "intra"+ {-# LINE 5296 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 1156, column 7)+ _lhsOsemNames =+ ({-# LINE 1156 "src-ag/GenerateCode.ag" #-}+ [_funcname ]+ {-# LINE 5302 "dist/build/GenerateCode" #-}+ )+ -- copy rule (up)+ _lhsOvisitedSet =+ ({-# LINE 145 "src-ag/GenerateCode.ag" #-}+ _intraIvisitedSet+ {-# LINE 5308 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOallNts =+ ({-# LINE 132 "src-ag/GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 5314 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOaroundMap =+ ({-# LINE 580 "src-ag/GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 5320 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOchildren =+ ({-# LINE 259 "src-ag/GenerateCode.ag" #-}+ _lhsIchildren+ {-# LINE 5326 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOcon =+ ({-# LINE 89 "src-ag/GenerateCode.ag" #-}+ _lhsIcon+ {-# LINE 5332 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOinh =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 5338 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOinstVisitNrs =+ ({-# LINE 560 "src-ag/GenerateCode.ag" #-}+ _lhsIinstVisitNrs+ {-# LINE 5344 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOmergeMap =+ ({-# LINE 596 "src-ag/GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 5350 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOnr =+ ({-# LINE 278 "src-ag/GenerateCode.ag" #-}+ _lhsInr+ {-# LINE 5356 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOnt =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 5362 "dist/build/GenerateCode" #-}+ )+ -- copy rule (from local)+ _vssOo_case =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _o_case+ {-# LINE 5368 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOo_cata =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 5374 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOo_costcentre =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 5380 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOo_data =+ ({-# LINE 48 "src-ag/GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 5386 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOo_linePragmas =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 5392 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOo_monadic =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 5398 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOo_newtypes =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 5404 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOo_pretty =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 5410 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOo_rename =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 5416 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOo_sem =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 5422 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOo_sig =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 5428 "dist/build/GenerateCode" #-}+ )+ -- copy rule (from local)+ _vssOo_splitsems =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _o_splitsems+ {-# LINE 5434 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOo_strictwrap =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 5440 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOo_traces =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 5446 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOo_unbox =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 5452 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOoptions =+ ({-# LINE 50 "src-ag/GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 5458 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOparamInstMap =+ ({-# LINE 101 "src-ag/GenerateCode.ag" #-}+ _lhsIparamInstMap+ {-# LINE 5464 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOparamMap =+ ({-# LINE 95 "src-ag/GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 5470 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOprefix =+ ({-# LINE 49 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 5476 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOsyn =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 5482 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOterminals =+ ({-# LINE 90 "src-ag/GenerateCode.ag" #-}+ _lhsIterminals+ {-# LINE 5488 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOunfoldSemDom =+ ({-# LINE 750 "src-ag/GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 5494 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _vssOvisitedSet =+ ({-# LINE 145 "src-ag/GenerateCode.ag" #-}+ _lhsIvisitedSet+ {-# LINE 5500 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOallNts =+ ({-# LINE 132 "src-ag/GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 5506 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOaroundMap =+ ({-# LINE 580 "src-ag/GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 5512 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOchildren =+ ({-# LINE 259 "src-ag/GenerateCode.ag" #-}+ _lhsIchildren+ {-# LINE 5518 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOcon =+ ({-# LINE 89 "src-ag/GenerateCode.ag" #-}+ _lhsIcon+ {-# LINE 5524 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOinh =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 5530 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOinstVisitNrs =+ ({-# LINE 560 "src-ag/GenerateCode.ag" #-}+ _lhsIinstVisitNrs+ {-# LINE 5536 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOmergeMap =+ ({-# LINE 596 "src-ag/GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 5542 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOnr =+ ({-# LINE 278 "src-ag/GenerateCode.ag" #-}+ _lhsInr+ {-# LINE 5548 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOnt =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 5554 "dist/build/GenerateCode" #-}+ )+ -- copy rule (from local)+ _intraOo_case =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _o_case+ {-# LINE 5560 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOo_cata =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 5566 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOo_costcentre =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 5572 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOo_data =+ ({-# LINE 48 "src-ag/GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 5578 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOo_linePragmas =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 5584 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOo_monadic =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 5590 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOo_newtypes =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 5596 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOo_pretty =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 5602 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOo_rename =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 5608 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOo_sem =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 5614 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOo_sig =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 5620 "dist/build/GenerateCode" #-}+ )+ -- copy rule (from local)+ _intraOo_splitsems =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _o_splitsems+ {-# LINE 5626 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOo_strictwrap =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 5632 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOo_traces =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 5638 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOo_unbox =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 5644 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOoptions =+ ({-# LINE 50 "src-ag/GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 5650 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOparamInstMap =+ ({-# LINE 101 "src-ag/GenerateCode.ag" #-}+ _lhsIparamInstMap+ {-# LINE 5656 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOparamMap =+ ({-# LINE 95 "src-ag/GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 5662 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOprefix =+ ({-# LINE 49 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 5668 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOsyn =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 5674 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOterminals =+ ({-# LINE 90 "src-ag/GenerateCode.ag" #-}+ _lhsIterminals+ {-# LINE 5680 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _intraOunfoldSemDom =+ ({-# LINE 750 "src-ag/GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 5686 "dist/build/GenerateCode" #-}+ )+ -- copy rule (chain)+ _intraOvisitedSet =+ ({-# LINE 145 "src-ag/GenerateCode.ag" #-}+ _vssIvisitedSet+ {-# LINE 5692 "dist/build/GenerateCode" #-}+ )+ ( _vssIallTpsFound,_vssIblockDecls,_vssIcomments,_vssIdecls,_vssIdeclsAbove,_vssIdefinedInsts,_vssIexprs,_vssItSigs,_vssItps,_vssIusedVars,_vssIvisitedSet) =+ vss_ _vssOallNts _vssOaroundMap _vssOchildren _vssOcon _vssOdeclsAbove _vssOinh _vssOinstVisitNrs _vssOlastExpr _vssOmergeMap _vssOnr _vssOnt _vssOo_case _vssOo_cata _vssOo_costcentre _vssOo_data _vssOo_linePragmas _vssOo_monadic _vssOo_newtypes _vssOo_pretty _vssOo_rename _vssOo_sem _vssOo_sig _vssOo_splitsems _vssOo_strictwrap _vssOo_traces _vssOo_unbox _vssOoptions _vssOparamInstMap _vssOparamMap _vssOprefix _vssOsyn _vssOterminals _vssOunfoldSemDom _vssOvisitedSet _vssOwhat+ ( _intraIallTpsFound,_intraIblockDecls,_intraIcomments,_intraIdecls,_intraIdeclsAbove,_intraIdefinedInsts,_intraIexprs,_intraItSigs,_intraItps,_intraIusedVars,_intraIvisitedSet) =+ intra_ _intraOallNts _intraOaroundMap _intraOchildren _intraOcon _intraOdeclsAbove _intraOinh _intraOinstVisitNrs _intraOlastExpr _intraOmergeMap _intraOnr _intraOnt _intraOo_case _intraOo_cata _intraOo_costcentre _intraOo_data _intraOo_linePragmas _intraOo_monadic _intraOo_newtypes _intraOo_pretty _intraOo_rename _intraOo_sem _intraOo_sig _intraOo_splitsems _intraOo_strictwrap _intraOo_traces _intraOo_unbox _intraOoptions _intraOparamInstMap _intraOparamMap _intraOprefix _intraOsyn _intraOterminals _intraOunfoldSemDom _intraOvisitedSet _intraOwhat+ in ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOsemNames,_lhsOvisitedSet))))+-- CVisits -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allNts : Set NontermIdent+ allPragmas : PragmaMap+ aroundMap : Set Identifier+ children : [(Identifier,Type, ChildKind)]+ con : ConstructorIdent+ contextMap : ContextMap+ inh : Attributes+ instVisitNrs : Map Identifier Int+ mergeMap : Map Identifier (Identifier, [Identifier])+ nr : Int+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramInstMap : Map Identifier (NontermIdent, [String])+ paramMap : ParamMap+ prefix : String+ quantMap : QuantMap+ syn : Attributes+ terminals : [Identifier]+ unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type+ with_sig : Bool+ wrappers : Set NontermIdent+ chained attribute:+ visitedSet : Set Identifier+ synthesized attributes:+ comments : [String]+ decls : Decls+ gatherInstVisitNrs : Map Identifier Int+ intra : Exprs+ intraVars : Set String+ isNil : Bool+ semNames : [String]+ alternatives:+ alternative Cons:+ child hd : CVisit + child tl : CVisits + alternative Nil:+-}+-- cata+sem_CVisits :: CVisits ->+ T_CVisits+sem_CVisits list =+ (Prelude.foldr sem_CVisits_Cons sem_CVisits_Nil (Prelude.map sem_CVisit list))+-- semantic domain+newtype T_CVisits = T_CVisits ((Set NontermIdent) ->+ PragmaMap ->+ (Set Identifier) ->+ ([(Identifier,Type, ChildKind)]) ->+ ConstructorIdent ->+ ContextMap ->+ Attributes ->+ (Map Identifier Int) ->+ (Map Identifier (Identifier, [Identifier])) ->+ Int ->+ NontermIdent ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Bool) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Options ->+ (Map Identifier (NontermIdent, [String])) ->+ ParamMap ->+ String ->+ QuantMap ->+ Attributes ->+ ([Identifier]) ->+ (NontermIdent -> Int -> [String] -> Code.Type) ->+ (Set Identifier) ->+ Bool ->+ (Set NontermIdent) ->+ ( ([String]),Decls,(Map Identifier Int),Exprs,(Set String),Bool,([String]),(Set Identifier)))+data Inh_CVisits = Inh_CVisits {allNts_Inh_CVisits :: !((Set NontermIdent)),allPragmas_Inh_CVisits :: !(PragmaMap),aroundMap_Inh_CVisits :: !((Set Identifier)),children_Inh_CVisits :: !(([(Identifier,Type, ChildKind)])),con_Inh_CVisits :: !(ConstructorIdent),contextMap_Inh_CVisits :: !(ContextMap),inh_Inh_CVisits :: !(Attributes),instVisitNrs_Inh_CVisits :: !((Map Identifier Int)),mergeMap_Inh_CVisits :: !((Map Identifier (Identifier, [Identifier]))),nr_Inh_CVisits :: !(Int),nt_Inh_CVisits :: !(NontermIdent),o_case_Inh_CVisits :: !(Bool),o_cata_Inh_CVisits :: !(Bool),o_costcentre_Inh_CVisits :: !(Bool),o_data_Inh_CVisits :: !((Maybe Bool)),o_linePragmas_Inh_CVisits :: !(Bool),o_monadic_Inh_CVisits :: !(Bool),o_newtypes_Inh_CVisits :: !(Bool),o_pretty_Inh_CVisits :: !(Bool),o_rename_Inh_CVisits :: !(Bool),o_sem_Inh_CVisits :: !(Bool),o_sig_Inh_CVisits :: !(Bool),o_splitsems_Inh_CVisits :: !(Bool),o_strictwrap_Inh_CVisits :: !(Bool),o_traces_Inh_CVisits :: !(Bool),o_unbox_Inh_CVisits :: !(Bool),options_Inh_CVisits :: !(Options),paramInstMap_Inh_CVisits :: !((Map Identifier (NontermIdent, [String]))),paramMap_Inh_CVisits :: !(ParamMap),prefix_Inh_CVisits :: !(String),quantMap_Inh_CVisits :: !(QuantMap),syn_Inh_CVisits :: !(Attributes),terminals_Inh_CVisits :: !(([Identifier])),unfoldSemDom_Inh_CVisits :: !((NontermIdent -> Int -> [String] -> Code.Type)),visitedSet_Inh_CVisits :: !((Set Identifier)),with_sig_Inh_CVisits :: !(Bool),wrappers_Inh_CVisits :: !((Set NontermIdent))}+data Syn_CVisits = Syn_CVisits {comments_Syn_CVisits :: !(([String])),decls_Syn_CVisits :: !(Decls),gatherInstVisitNrs_Syn_CVisits :: !((Map Identifier Int)),intra_Syn_CVisits :: !(Exprs),intraVars_Syn_CVisits :: !((Set String)),isNil_Syn_CVisits :: !(Bool),semNames_Syn_CVisits :: !(([String])),visitedSet_Syn_CVisits :: !((Set Identifier))}+wrap_CVisits :: T_CVisits ->+ Inh_CVisits ->+ Syn_CVisits+wrap_CVisits (T_CVisits sem) (Inh_CVisits _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers) =+ (let ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames,_lhsOvisitedSet) = sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers+ in (Syn_CVisits _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOisNil _lhsOsemNames _lhsOvisitedSet))+sem_CVisits_Cons :: T_CVisit ->+ T_CVisits ->+ T_CVisits+sem_CVisits_Cons (T_CVisit hd_) (T_CVisits tl_) =+ (T_CVisits (\ _lhsIallNts+ _lhsIallPragmas+ _lhsIaroundMap+ _lhsIchildren+ _lhsIcon+ _lhsIcontextMap+ _lhsIinh+ _lhsIinstVisitNrs+ _lhsImergeMap+ _lhsInr+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_costcentre+ _lhsIo_data+ _lhsIo_linePragmas+ _lhsIo_monadic+ _lhsIo_newtypes+ _lhsIo_pretty+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_splitsems+ _lhsIo_strictwrap+ _lhsIo_traces+ _lhsIo_unbox+ _lhsIoptions+ _lhsIparamInstMap+ _lhsIparamMap+ _lhsIprefix+ _lhsIquantMap+ _lhsIsyn+ _lhsIterminals+ _lhsIunfoldSemDom+ _lhsIvisitedSet+ _lhsIwith_sig+ _lhsIwrappers ->+ (let _tlOnr :: Int+ _lhsOisNil :: Bool+ _hdOisLast :: Bool+ _hdOnextIntra :: Exprs+ _hdOnextIntraVars :: (Set String)+ _lhsOintra :: Exprs+ _lhsOintraVars :: (Set String)+ _lhsOdecls :: Decls+ _hdOdecls :: Decls+ _lhsOcomments :: ([String])+ _lhsOgatherInstVisitNrs :: (Map Identifier Int)+ _lhsOsemNames :: ([String])+ _lhsOvisitedSet :: (Set Identifier)+ _hdOallNts :: (Set NontermIdent)+ _hdOallPragmas :: PragmaMap+ _hdOaroundMap :: (Set Identifier)+ _hdOchildren :: ([(Identifier,Type, ChildKind)])+ _hdOcon :: ConstructorIdent+ _hdOcontextMap :: ContextMap+ _hdOinh :: Attributes+ _hdOinstVisitNrs :: (Map Identifier Int)+ _hdOmergeMap :: (Map Identifier (Identifier, [Identifier]))+ _hdOnr :: Int+ _hdOnt :: NontermIdent+ _hdOo_case :: Bool+ _hdOo_cata :: Bool+ _hdOo_costcentre :: Bool+ _hdOo_data :: (Maybe Bool)+ _hdOo_linePragmas :: Bool+ _hdOo_monadic :: Bool+ _hdOo_newtypes :: Bool+ _hdOo_pretty :: Bool+ _hdOo_rename :: Bool+ _hdOo_sem :: Bool+ _hdOo_sig :: Bool+ _hdOo_splitsems :: Bool+ _hdOo_strictwrap :: Bool+ _hdOo_traces :: Bool+ _hdOo_unbox :: Bool+ _hdOoptions :: Options+ _hdOparamInstMap :: (Map Identifier (NontermIdent, [String]))+ _hdOparamMap :: ParamMap+ _hdOprefix :: String+ _hdOquantMap :: QuantMap+ _hdOsyn :: Attributes+ _hdOterminals :: ([Identifier])+ _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _hdOvisitedSet :: (Set Identifier)+ _hdOwith_sig :: Bool+ _hdOwrappers :: (Set NontermIdent)+ _tlOallNts :: (Set NontermIdent)+ _tlOallPragmas :: PragmaMap+ _tlOaroundMap :: (Set Identifier)+ _tlOchildren :: ([(Identifier,Type, ChildKind)])+ _tlOcon :: ConstructorIdent+ _tlOcontextMap :: ContextMap+ _tlOinh :: Attributes+ _tlOinstVisitNrs :: (Map Identifier Int)+ _tlOmergeMap :: (Map Identifier (Identifier, [Identifier]))+ _tlOnt :: NontermIdent+ _tlOo_case :: Bool+ _tlOo_cata :: Bool+ _tlOo_costcentre :: Bool+ _tlOo_data :: (Maybe Bool)+ _tlOo_linePragmas :: Bool+ _tlOo_monadic :: Bool+ _tlOo_newtypes :: Bool+ _tlOo_pretty :: Bool+ _tlOo_rename :: Bool+ _tlOo_sem :: Bool+ _tlOo_sig :: Bool+ _tlOo_splitsems :: Bool+ _tlOo_strictwrap :: Bool+ _tlOo_traces :: Bool+ _tlOo_unbox :: Bool+ _tlOoptions :: Options+ _tlOparamInstMap :: (Map Identifier (NontermIdent, [String]))+ _tlOparamMap :: ParamMap+ _tlOprefix :: String+ _tlOquantMap :: QuantMap+ _tlOsyn :: Attributes+ _tlOterminals :: ([Identifier])+ _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _tlOvisitedSet :: (Set Identifier)+ _tlOwith_sig :: Bool+ _tlOwrappers :: (Set NontermIdent)+ _hdIcomments :: ([String])+ _hdIdecls :: Decls+ _hdIgatherInstVisitNrs :: (Map Identifier Int)+ _hdIintra :: Exprs+ _hdIintraVars :: (Set String)+ _hdIsemNames :: ([String])+ _hdIvisitedSet :: (Set Identifier)+ _tlIcomments :: ([String])+ _tlIdecls :: Decls+ _tlIgatherInstVisitNrs :: (Map Identifier Int)+ _tlIintra :: Exprs+ _tlIintraVars :: (Set String)+ _tlIisNil :: Bool+ _tlIsemNames :: ([String])+ _tlIvisitedSet :: (Set Identifier)+ -- "src-ag/GenerateCode.ag"(line 282, column 11)+ _tlOnr =+ ({-# LINE 282 "src-ag/GenerateCode.ag" #-}+ _lhsInr + 1+ {-# LINE 5953 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 295, column 12)+ _lhsOisNil =+ ({-# LINE 295 "src-ag/GenerateCode.ag" #-}+ False+ {-# LINE 5959 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 296, column 12)+ _hdOisLast =+ ({-# LINE 296 "src-ag/GenerateCode.ag" #-}+ _tlIisNil+ {-# LINE 5965 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 313, column 12)+ _hdOnextIntra =+ ({-# LINE 313 "src-ag/GenerateCode.ag" #-}+ _tlIintra+ {-# LINE 5971 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 314, column 12)+ _hdOnextIntraVars =+ ({-# LINE 314 "src-ag/GenerateCode.ag" #-}+ _tlIintraVars+ {-# LINE 5977 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 315, column 12)+ _lhsOintra =+ ({-# LINE 315 "src-ag/GenerateCode.ag" #-}+ _hdIintra+ {-# LINE 5983 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 316, column 12)+ _lhsOintraVars =+ ({-# LINE 316 "src-ag/GenerateCode.ag" #-}+ _hdIintraVars+ {-# LINE 5989 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 431, column 11)+ _lhsOdecls =+ ({-# LINE 431 "src-ag/GenerateCode.ag" #-}+ _hdIdecls+ {-# LINE 5995 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 432, column 11)+ _hdOdecls =+ ({-# LINE 432 "src-ag/GenerateCode.ag" #-}+ _tlIdecls+ {-# LINE 6001 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)+ _lhsOcomments =+ ({-# LINE 868 "src-ag/GenerateCode.ag" #-}+ _hdIcomments ++ _tlIcomments+ {-# LINE 6007 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 561, column 44)+ _lhsOgatherInstVisitNrs =+ ({-# LINE 561 "src-ag/GenerateCode.ag" #-}+ _hdIgatherInstVisitNrs `Map.union` _tlIgatherInstVisitNrs+ {-# LINE 6013 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 1146, column 61)+ _lhsOsemNames =+ ({-# LINE 1146 "src-ag/GenerateCode.ag" #-}+ _hdIsemNames ++ _tlIsemNames+ {-# LINE 6019 "dist/build/GenerateCode" #-}+ )+ -- copy rule (up)+ _lhsOvisitedSet =+ ({-# LINE 145 "src-ag/GenerateCode.ag" #-}+ _tlIvisitedSet+ {-# LINE 6025 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOallNts =+ ({-# LINE 132 "src-ag/GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 6031 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOallPragmas =+ ({-# LINE 73 "src-ag/GenerateCode.ag" #-}+ _lhsIallPragmas+ {-# LINE 6037 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOaroundMap =+ ({-# LINE 580 "src-ag/GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 6043 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOchildren =+ ({-# LINE 410 "src-ag/GenerateCode.ag" #-}+ _lhsIchildren+ {-# LINE 6049 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOcon =+ ({-# LINE 89 "src-ag/GenerateCode.ag" #-}+ _lhsIcon+ {-# LINE 6055 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOcontextMap =+ ({-# LINE 115 "src-ag/GenerateCode.ag" #-}+ _lhsIcontextMap+ {-# LINE 6061 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 6067 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOinstVisitNrs =+ ({-# LINE 560 "src-ag/GenerateCode.ag" #-}+ _lhsIinstVisitNrs+ {-# LINE 6073 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 596 "src-ag/GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 6079 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOnr =+ ({-# LINE 278 "src-ag/GenerateCode.ag" #-}+ _lhsInr+ {-# LINE 6085 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 6091 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_case =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 6097 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_cata =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 6103 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_costcentre =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 6109 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_data =+ ({-# LINE 48 "src-ag/GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 6115 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_linePragmas =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 6121 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_monadic =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 6127 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_newtypes =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 6133 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_pretty =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 6139 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 6145 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_sem =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 6151 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_sig =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 6157 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_splitsems =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 6163 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_strictwrap =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 6169 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_traces =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 6175 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_unbox =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 6181 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 50 "src-ag/GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 6187 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOparamInstMap =+ ({-# LINE 101 "src-ag/GenerateCode.ag" #-}+ _lhsIparamInstMap+ {-# LINE 6193 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOparamMap =+ ({-# LINE 95 "src-ag/GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 6199 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOprefix =+ ({-# LINE 49 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 6205 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOquantMap =+ ({-# LINE 115 "src-ag/GenerateCode.ag" #-}+ _lhsIquantMap+ {-# LINE 6211 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 6217 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOterminals =+ ({-# LINE 90 "src-ag/GenerateCode.ag" #-}+ _lhsIterminals+ {-# LINE 6223 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOunfoldSemDom =+ ({-# LINE 750 "src-ag/GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 6229 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOvisitedSet =+ ({-# LINE 145 "src-ag/GenerateCode.ag" #-}+ _lhsIvisitedSet+ {-# LINE 6235 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOwith_sig =+ ({-# LINE 851 "src-ag/GenerateCode.ag" #-}+ _lhsIwith_sig+ {-# LINE 6241 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOwrappers =+ ({-# LINE 987 "src-ag/GenerateCode.ag" #-}+ _lhsIwrappers+ {-# LINE 6247 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOallNts =+ ({-# LINE 132 "src-ag/GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 6253 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOallPragmas =+ ({-# LINE 73 "src-ag/GenerateCode.ag" #-}+ _lhsIallPragmas+ {-# LINE 6259 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOaroundMap =+ ({-# LINE 580 "src-ag/GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 6265 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOchildren =+ ({-# LINE 410 "src-ag/GenerateCode.ag" #-}+ _lhsIchildren+ {-# LINE 6271 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOcon =+ ({-# LINE 89 "src-ag/GenerateCode.ag" #-}+ _lhsIcon+ {-# LINE 6277 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOcontextMap =+ ({-# LINE 115 "src-ag/GenerateCode.ag" #-}+ _lhsIcontextMap+ {-# LINE 6283 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 6289 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOinstVisitNrs =+ ({-# LINE 560 "src-ag/GenerateCode.ag" #-}+ _lhsIinstVisitNrs+ {-# LINE 6295 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 596 "src-ag/GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 6301 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 6307 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_case =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 6313 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_cata =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 6319 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_costcentre =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 6325 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_data =+ ({-# LINE 48 "src-ag/GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 6331 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_linePragmas =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 6337 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_monadic =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 6343 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_newtypes =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 6349 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_pretty =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 6355 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 6361 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_sem =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 6367 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_sig =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 6373 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_splitsems =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 6379 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_strictwrap =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 6385 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_traces =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 6391 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_unbox =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 6397 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 50 "src-ag/GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 6403 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOparamInstMap =+ ({-# LINE 101 "src-ag/GenerateCode.ag" #-}+ _lhsIparamInstMap+ {-# LINE 6409 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOparamMap =+ ({-# LINE 95 "src-ag/GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 6415 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOprefix =+ ({-# LINE 49 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 6421 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOquantMap =+ ({-# LINE 115 "src-ag/GenerateCode.ag" #-}+ _lhsIquantMap+ {-# LINE 6427 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 6433 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOterminals =+ ({-# LINE 90 "src-ag/GenerateCode.ag" #-}+ _lhsIterminals+ {-# LINE 6439 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOunfoldSemDom =+ ({-# LINE 750 "src-ag/GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 6445 "dist/build/GenerateCode" #-}+ )+ -- copy rule (chain)+ _tlOvisitedSet =+ ({-# LINE 145 "src-ag/GenerateCode.ag" #-}+ _hdIvisitedSet+ {-# LINE 6451 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOwith_sig =+ ({-# LINE 851 "src-ag/GenerateCode.ag" #-}+ _lhsIwith_sig+ {-# LINE 6457 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOwrappers =+ ({-# LINE 987 "src-ag/GenerateCode.ag" #-}+ _lhsIwrappers+ {-# LINE 6463 "dist/build/GenerateCode" #-}+ )+ ( _hdIcomments,_hdIdecls,_hdIgatherInstVisitNrs,_hdIintra,_hdIintraVars,_hdIsemNames,_hdIvisitedSet) =+ hd_ _hdOallNts _hdOallPragmas _hdOaroundMap _hdOchildren _hdOcon _hdOcontextMap _hdOdecls _hdOinh _hdOinstVisitNrs _hdOisLast _hdOmergeMap _hdOnextIntra _hdOnextIntraVars _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamInstMap _hdOparamMap _hdOprefix _hdOquantMap _hdOsyn _hdOterminals _hdOunfoldSemDom _hdOvisitedSet _hdOwith_sig _hdOwrappers+ ( _tlIcomments,_tlIdecls,_tlIgatherInstVisitNrs,_tlIintra,_tlIintraVars,_tlIisNil,_tlIsemNames,_tlIvisitedSet) =+ tl_ _tlOallNts _tlOallPragmas _tlOaroundMap _tlOchildren _tlOcon _tlOcontextMap _tlOinh _tlOinstVisitNrs _tlOmergeMap _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamInstMap _tlOparamMap _tlOprefix _tlOquantMap _tlOsyn _tlOterminals _tlOunfoldSemDom _tlOvisitedSet _tlOwith_sig _tlOwrappers+ in ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames,_lhsOvisitedSet))))+sem_CVisits_Nil :: T_CVisits+sem_CVisits_Nil =+ (T_CVisits (\ _lhsIallNts+ _lhsIallPragmas+ _lhsIaroundMap+ _lhsIchildren+ _lhsIcon+ _lhsIcontextMap+ _lhsIinh+ _lhsIinstVisitNrs+ _lhsImergeMap+ _lhsInr+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_costcentre+ _lhsIo_data+ _lhsIo_linePragmas+ _lhsIo_monadic+ _lhsIo_newtypes+ _lhsIo_pretty+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_splitsems+ _lhsIo_strictwrap+ _lhsIo_traces+ _lhsIo_unbox+ _lhsIoptions+ _lhsIparamInstMap+ _lhsIparamMap+ _lhsIprefix+ _lhsIquantMap+ _lhsIsyn+ _lhsIterminals+ _lhsIunfoldSemDom+ _lhsIvisitedSet+ _lhsIwith_sig+ _lhsIwrappers ->+ (let _lhsOisNil :: Bool+ _lhsOintra :: Exprs+ _lhsOintraVars :: (Set String)+ _lhsOdecls :: Decls+ _lhsOcomments :: ([String])+ _lhsOgatherInstVisitNrs :: (Map Identifier Int)+ _lhsOsemNames :: ([String])+ _lhsOvisitedSet :: (Set Identifier)+ -- "src-ag/GenerateCode.ag"(line 297, column 10)+ _lhsOisNil =+ ({-# LINE 297 "src-ag/GenerateCode.ag" #-}+ True+ {-# LINE 6521 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 317, column 10)+ _lhsOintra =+ ({-# LINE 317 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 6527 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 318, column 10)+ _lhsOintraVars =+ ({-# LINE 318 "src-ag/GenerateCode.ag" #-}+ Set.empty+ {-# LINE 6533 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 430, column 11)+ _lhsOdecls =+ ({-# LINE 430 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 6539 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)+ _lhsOcomments =+ ({-# LINE 868 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 6545 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 561, column 44)+ _lhsOgatherInstVisitNrs =+ ({-# LINE 561 "src-ag/GenerateCode.ag" #-}+ Map.empty+ {-# LINE 6551 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 1146, column 61)+ _lhsOsemNames =+ ({-# LINE 1146 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 6557 "dist/build/GenerateCode" #-}+ )+ -- copy rule (chain)+ _lhsOvisitedSet =+ ({-# LINE 145 "src-ag/GenerateCode.ag" #-}+ _lhsIvisitedSet+ {-# LINE 6563 "dist/build/GenerateCode" #-}+ )+ in ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames,_lhsOvisitedSet))))+-- DeclBlocks --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ blockNr : Int+ lastExprVars : [String]+ nextVisitDecls : [Decl]+ optCase : Bool+ prefix : String+ synthesized attributes:+ callExpr : Expr+ decls : [Decl]+ freeVars : [String]+ alternatives:+ alternative DeclBlock:+ child defs : {[Decl]}+ child visit : {Decl}+ child next : DeclBlocks + visit 0:+ local lambdaName : _+ local pragmaDecl : _+ local freeVars : _+ local decl : _+ alternative DeclTerminator:+ child defs : {[Decl]}+ child result : {Expr}+ visit 0:+ local lambdaName : _+ local pragmaDecl : _+ local freeVars : _+-}+-- cata+sem_DeclBlocks :: DeclBlocks ->+ T_DeclBlocks+sem_DeclBlocks (DeclBlock _defs _visit _next) =+ (sem_DeclBlocks_DeclBlock _defs _visit (sem_DeclBlocks _next))+sem_DeclBlocks (DeclTerminator _defs _result) =+ (sem_DeclBlocks_DeclTerminator _defs _result)+-- semantic domain+newtype T_DeclBlocks = T_DeclBlocks (Int ->+ ([String]) ->+ ([Decl]) ->+ Bool ->+ String ->+ ( Expr,([Decl]),([String])))+data Inh_DeclBlocks = Inh_DeclBlocks {blockNr_Inh_DeclBlocks :: !(Int),lastExprVars_Inh_DeclBlocks :: !(([String])),nextVisitDecls_Inh_DeclBlocks :: !(([Decl])),optCase_Inh_DeclBlocks :: !(Bool),prefix_Inh_DeclBlocks :: !(String)}+data Syn_DeclBlocks = Syn_DeclBlocks {callExpr_Syn_DeclBlocks :: !(Expr),decls_Syn_DeclBlocks :: !(([Decl])),freeVars_Syn_DeclBlocks :: !(([String]))}+wrap_DeclBlocks :: T_DeclBlocks ->+ Inh_DeclBlocks ->+ Syn_DeclBlocks+wrap_DeclBlocks (T_DeclBlocks sem) (Inh_DeclBlocks _lhsIblockNr _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix) =+ (let ( _lhsOcallExpr,_lhsOdecls,_lhsOfreeVars) = sem _lhsIblockNr _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix+ in (Syn_DeclBlocks _lhsOcallExpr _lhsOdecls _lhsOfreeVars))+sem_DeclBlocks_DeclBlock :: ([Decl]) ->+ Decl ->+ T_DeclBlocks ->+ T_DeclBlocks+sem_DeclBlocks_DeclBlock defs_ visit_ (T_DeclBlocks next_) =+ (T_DeclBlocks (\ _lhsIblockNr+ _lhsIlastExprVars+ _lhsInextVisitDecls+ _lhsIoptCase+ _lhsIprefix ->+ (let _nextOblockNr :: Int+ _lhsOcallExpr :: Expr+ _lhsOdecls :: ([Decl])+ _lhsOfreeVars :: ([String])+ _nextOlastExprVars :: ([String])+ _nextOnextVisitDecls :: ([Decl])+ _nextOoptCase :: Bool+ _nextOprefix :: String+ _nextIcallExpr :: Expr+ _nextIdecls :: ([Decl])+ _nextIfreeVars :: ([String])+ -- "src-ag/GenerateCode.ag"(line 662, column 7)+ _nextOblockNr =+ ({-# LINE 662 "src-ag/GenerateCode.ag" #-}+ _lhsIblockNr + 1+ {-# LINE 6644 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 667, column 7)+ _lambdaName =+ ({-# LINE 667 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix ++ "_block" ++ show _lhsIblockNr+ {-# LINE 6650 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 668, column 7)+ _pragmaDecl =+ ({-# LINE 668 "src-ag/GenerateCode.ag" #-}+ PragmaDecl ("NOINLINE " ++ _lambdaName )+ {-# LINE 6656 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 669, column 7)+ _lhsOcallExpr =+ ({-# LINE 669 "src-ag/GenerateCode.ag" #-}+ App _lambdaName (map SimpleExpr _freeVars )+ {-# LINE 6662 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 673, column 7)+ _freeVars =+ ({-# LINE 673 "src-ag/GenerateCode.ag" #-}+ freevars _nextIfreeVars (visit_ : defs_)+ {-# LINE 6668 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 680, column 7)+ _decl =+ ({-# LINE 680 "src-ag/GenerateCode.ag" #-}+ mkBlockLambda _lhsIoptCase _lambdaName _freeVars (defs_ ++ [visit_]) _nextIcallExpr+ {-# LINE 6674 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 681, column 7)+ _lhsOdecls =+ ({-# LINE 681 "src-ag/GenerateCode.ag" #-}+ (if _lhsIblockNr > 1 then [_pragmaDecl ] else []) ++ [_decl ] ++ _nextIdecls+ {-# LINE 6680 "dist/build/GenerateCode" #-}+ )+ -- copy rule (from local)+ _lhsOfreeVars =+ ({-# LINE 664 "src-ag/GenerateCode.ag" #-}+ _freeVars+ {-# LINE 6686 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _nextOlastExprVars =+ ({-# LINE 648 "src-ag/GenerateCode.ag" #-}+ _lhsIlastExprVars+ {-# LINE 6692 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _nextOnextVisitDecls =+ ({-# LINE 648 "src-ag/GenerateCode.ag" #-}+ _lhsInextVisitDecls+ {-# LINE 6698 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _nextOoptCase =+ ({-# LINE 648 "src-ag/GenerateCode.ag" #-}+ _lhsIoptCase+ {-# LINE 6704 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _nextOprefix =+ ({-# LINE 648 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 6710 "dist/build/GenerateCode" #-}+ )+ ( _nextIcallExpr,_nextIdecls,_nextIfreeVars) =+ next_ _nextOblockNr _nextOlastExprVars _nextOnextVisitDecls _nextOoptCase _nextOprefix+ in ( _lhsOcallExpr,_lhsOdecls,_lhsOfreeVars))))+sem_DeclBlocks_DeclTerminator :: ([Decl]) ->+ Expr ->+ T_DeclBlocks+sem_DeclBlocks_DeclTerminator defs_ result_ =+ (T_DeclBlocks (\ _lhsIblockNr+ _lhsIlastExprVars+ _lhsInextVisitDecls+ _lhsIoptCase+ _lhsIprefix ->+ (let _lhsOcallExpr :: Expr+ _lhsOdecls :: ([Decl])+ _lhsOfreeVars :: ([String])+ -- "src-ag/GenerateCode.ag"(line 667, column 7)+ _lambdaName =+ ({-# LINE 667 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix ++ "_block" ++ show _lhsIblockNr+ {-# LINE 6731 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 668, column 7)+ _pragmaDecl =+ ({-# LINE 668 "src-ag/GenerateCode.ag" #-}+ PragmaDecl ("NOINLINE " ++ _lambdaName )+ {-# LINE 6737 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 669, column 7)+ _lhsOcallExpr =+ ({-# LINE 669 "src-ag/GenerateCode.ag" #-}+ App _lambdaName (map SimpleExpr _freeVars )+ {-# LINE 6743 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 671, column 7)+ _freeVars =+ ({-# LINE 671 "src-ag/GenerateCode.ag" #-}+ freevars _lhsIlastExprVars (defs_ ++ _lhsInextVisitDecls)+ {-# LINE 6749 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 678, column 7)+ _lhsOdecls =+ ({-# LINE 678 "src-ag/GenerateCode.ag" #-}+ [ mkBlockLambda _lhsIoptCase _lambdaName _freeVars (defs_ ++ _lhsInextVisitDecls) result_ ]+ {-# LINE 6755 "dist/build/GenerateCode" #-}+ )+ -- copy rule (from local)+ _lhsOfreeVars =+ ({-# LINE 664 "src-ag/GenerateCode.ag" #-}+ _freeVars+ {-# LINE 6761 "dist/build/GenerateCode" #-}+ )+ in ( _lhsOcallExpr,_lhsOdecls,_lhsOfreeVars))))+-- DeclBlocksRoot ----------------------------------------------+{-+ visit 0:+ inherited attributes:+ lastExprVars : [String]+ nextVisitDecls : [Decl]+ optCase : Bool+ prefix : String+ synthesized attributes:+ firstCall : Expr+ lambdas : [Decl]+ alternatives:+ alternative DeclBlocksRoot:+ child blocks : DeclBlocks +-}+-- cata+sem_DeclBlocksRoot :: DeclBlocksRoot ->+ T_DeclBlocksRoot+sem_DeclBlocksRoot (DeclBlocksRoot _blocks) =+ (sem_DeclBlocksRoot_DeclBlocksRoot (sem_DeclBlocks _blocks))+-- semantic domain+newtype T_DeclBlocksRoot = T_DeclBlocksRoot (([String]) ->+ ([Decl]) ->+ Bool ->+ String ->+ ( Expr,([Decl])))+data Inh_DeclBlocksRoot = Inh_DeclBlocksRoot {lastExprVars_Inh_DeclBlocksRoot :: !(([String])),nextVisitDecls_Inh_DeclBlocksRoot :: !(([Decl])),optCase_Inh_DeclBlocksRoot :: !(Bool),prefix_Inh_DeclBlocksRoot :: !(String)}+data Syn_DeclBlocksRoot = Syn_DeclBlocksRoot {firstCall_Syn_DeclBlocksRoot :: !(Expr),lambdas_Syn_DeclBlocksRoot :: !(([Decl]))}+wrap_DeclBlocksRoot :: T_DeclBlocksRoot ->+ Inh_DeclBlocksRoot ->+ Syn_DeclBlocksRoot+wrap_DeclBlocksRoot (T_DeclBlocksRoot sem) (Inh_DeclBlocksRoot _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix) =+ (let ( _lhsOfirstCall,_lhsOlambdas) = sem _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix+ in (Syn_DeclBlocksRoot _lhsOfirstCall _lhsOlambdas))+sem_DeclBlocksRoot_DeclBlocksRoot :: T_DeclBlocks ->+ T_DeclBlocksRoot+sem_DeclBlocksRoot_DeclBlocksRoot (T_DeclBlocks blocks_) =+ (T_DeclBlocksRoot (\ _lhsIlastExprVars+ _lhsInextVisitDecls+ _lhsIoptCase+ _lhsIprefix ->+ (let _lhsOlambdas :: ([Decl])+ _lhsOfirstCall :: Expr+ _blocksOblockNr :: Int+ _blocksOlastExprVars :: ([String])+ _blocksOnextVisitDecls :: ([Decl])+ _blocksOoptCase :: Bool+ _blocksOprefix :: String+ _blocksIcallExpr :: Expr+ _blocksIdecls :: ([Decl])+ _blocksIfreeVars :: ([String])+ -- "src-ag/GenerateCode.ag"(line 653, column 7)+ _lhsOlambdas =+ ({-# LINE 653 "src-ag/GenerateCode.ag" #-}+ _blocksIdecls+ {-# LINE 6819 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 654, column 7)+ _lhsOfirstCall =+ ({-# LINE 654 "src-ag/GenerateCode.ag" #-}+ _blocksIcallExpr+ {-# LINE 6825 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 659, column 7)+ _blocksOblockNr =+ ({-# LINE 659 "src-ag/GenerateCode.ag" #-}+ 1+ {-# LINE 6831 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _blocksOlastExprVars =+ ({-# LINE 648 "src-ag/GenerateCode.ag" #-}+ _lhsIlastExprVars+ {-# LINE 6837 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _blocksOnextVisitDecls =+ ({-# LINE 648 "src-ag/GenerateCode.ag" #-}+ _lhsInextVisitDecls+ {-# LINE 6843 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _blocksOoptCase =+ ({-# LINE 648 "src-ag/GenerateCode.ag" #-}+ _lhsIoptCase+ {-# LINE 6849 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _blocksOprefix =+ ({-# LINE 648 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 6855 "dist/build/GenerateCode" #-}+ )+ ( _blocksIcallExpr,_blocksIdecls,_blocksIfreeVars) =+ blocks_ _blocksOblockNr _blocksOlastExprVars _blocksOnextVisitDecls _blocksOoptCase _blocksOprefix+ in ( _lhsOfirstCall,_lhsOlambdas))))+-- Pattern -----------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ copy : Pattern + definedInsts : [Identifier]+ patternAttributes : [(Identifier, Identifier)]+ alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + 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) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat))+sem_Pattern (Constr _name _pats) =+ (sem_Pattern_Constr _name (sem_Patterns _pats))+sem_Pattern (Irrefutable _pat) =+ (sem_Pattern_Irrefutable (sem_Pattern _pat))+sem_Pattern (Product _pos _pats) =+ (sem_Pattern_Product _pos (sem_Patterns _pats))+sem_Pattern (Underscore _pos) =+ (sem_Pattern_Underscore _pos)+-- semantic domain+newtype T_Pattern = T_Pattern (( Pattern,([Identifier]),([(Identifier, Identifier)])))+data Inh_Pattern = Inh_Pattern {}+data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: !(Pattern),definedInsts_Syn_Pattern :: !(([Identifier])),patternAttributes_Syn_Pattern :: !(([(Identifier, Identifier)]))}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern+wrap_Pattern (T_Pattern sem) (Inh_Pattern) =+ (let ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes) = sem+ in (Syn_Pattern _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes))+sem_Pattern_Alias :: Identifier ->+ Identifier ->+ T_Pattern ->+ T_Pattern+sem_Pattern_Alias field_ attr_ (T_Pattern pat_) =+ (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])+ _lhsOpatternAttributes :: ([(Identifier, Identifier)])+ _lhsOcopy :: Pattern+ _patIcopy :: Pattern+ _patIdefinedInsts :: ([Identifier])+ _patIpatternAttributes :: ([(Identifier, Identifier)])+ -- "src-ag/GenerateCode.ag"(line 263, column 11)+ _lhsOdefinedInsts =+ ({-# LINE 263 "src-ag/GenerateCode.ag" #-}+ (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts+ {-# LINE 6931 "dist/build/GenerateCode" #-}+ )+ -- "src-ag/GenerateCode.ag"(line 271, column 7)+ _lhsOpatternAttributes =+ ({-# LINE 271 "src-ag/GenerateCode.ag" #-}+ (field_,attr_) : _patIpatternAttributes+ {-# LINE 6937 "dist/build/GenerateCode" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Alias field_ attr_ _patIcopy+ {-# LINE 6943 "dist/build/GenerateCode" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 6949 "dist/build/GenerateCode" #-}+ )+ ( _patIcopy,_patIdefinedInsts,_patIpatternAttributes) =+ pat_+ in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)))+sem_Pattern_Constr :: ConstructorIdent ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Constr name_ (T_Patterns pats_) =+ (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])+ _lhsOpatternAttributes :: ([(Identifier, Identifier)])+ _lhsOcopy :: Pattern+ _patsIcopy :: Patterns+ _patsIdefinedInsts :: ([Identifier])+ _patsIpatternAttributes :: ([(Identifier, Identifier)])+ -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 261 "src-ag/GenerateCode.ag" #-}+ _patsIdefinedInsts+ {-# LINE 6968 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 268, column 47)+ _lhsOpatternAttributes =+ ({-# LINE 268 "src-ag/GenerateCode.ag" #-}+ _patsIpatternAttributes+ {-# LINE 6974 "dist/build/GenerateCode" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 6980 "dist/build/GenerateCode" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 6986 "dist/build/GenerateCode" #-}+ )+ ( _patsIcopy,_patsIdefinedInsts,_patsIpatternAttributes) =+ pats_+ in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)))+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern+sem_Pattern_Irrefutable (T_Pattern pat_) =+ (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])+ _lhsOpatternAttributes :: ([(Identifier, Identifier)])+ _lhsOcopy :: Pattern+ _patIcopy :: Pattern+ _patIdefinedInsts :: ([Identifier])+ _patIpatternAttributes :: ([(Identifier, Identifier)])+ -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 261 "src-ag/GenerateCode.ag" #-}+ _patIdefinedInsts+ {-# LINE 7004 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 268, column 47)+ _lhsOpatternAttributes =+ ({-# LINE 268 "src-ag/GenerateCode.ag" #-}+ _patIpatternAttributes+ {-# LINE 7010 "dist/build/GenerateCode" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 7016 "dist/build/GenerateCode" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 7022 "dist/build/GenerateCode" #-}+ )+ ( _patIcopy,_patIdefinedInsts,_patIpatternAttributes) =+ pat_+ in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)))+sem_Pattern_Product :: Pos ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Product pos_ (T_Patterns pats_) =+ (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])+ _lhsOpatternAttributes :: ([(Identifier, Identifier)])+ _lhsOcopy :: Pattern+ _patsIcopy :: Patterns+ _patsIdefinedInsts :: ([Identifier])+ _patsIpatternAttributes :: ([(Identifier, Identifier)])+ -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 261 "src-ag/GenerateCode.ag" #-}+ _patsIdefinedInsts+ {-# LINE 7041 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 268, column 47)+ _lhsOpatternAttributes =+ ({-# LINE 268 "src-ag/GenerateCode.ag" #-}+ _patsIpatternAttributes+ {-# LINE 7047 "dist/build/GenerateCode" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 7053 "dist/build/GenerateCode" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 7059 "dist/build/GenerateCode" #-}+ )+ ( _patsIcopy,_patsIdefinedInsts,_patsIpatternAttributes) =+ pats_+ in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)))+sem_Pattern_Underscore :: Pos ->+ T_Pattern+sem_Pattern_Underscore pos_ =+ (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])+ _lhsOpatternAttributes :: ([(Identifier, Identifier)])+ _lhsOcopy :: Pattern+ -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 261 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 7074 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 268, column 47)+ _lhsOpatternAttributes =+ ({-# LINE 268 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 7080 "dist/build/GenerateCode" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Underscore pos_+ {-# LINE 7086 "dist/build/GenerateCode" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 7092 "dist/build/GenerateCode" #-}+ )+ in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)))+-- Patterns ----------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ copy : Patterns + definedInsts : [Identifier]+ patternAttributes : [(Identifier, Identifier)]+ alternatives:+ alternative Cons:+ child hd : Pattern + child tl : Patterns + visit 0:+ local copy : _+ alternative Nil:+ visit 0:+ local copy : _+-}+-- cata+sem_Patterns :: Patterns ->+ T_Patterns+sem_Patterns list =+ (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list))+-- semantic domain+newtype T_Patterns = T_Patterns (( Patterns,([Identifier]),([(Identifier, Identifier)])))+data Inh_Patterns = Inh_Patterns {}+data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: !(Patterns),definedInsts_Syn_Patterns :: !(([Identifier])),patternAttributes_Syn_Patterns :: !(([(Identifier, Identifier)]))}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns+wrap_Patterns (T_Patterns sem) (Inh_Patterns) =+ (let ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes) = sem+ in (Syn_Patterns _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns+sem_Patterns_Cons (T_Pattern hd_) (T_Patterns tl_) =+ (T_Patterns (let _lhsOdefinedInsts :: ([Identifier])+ _lhsOpatternAttributes :: ([(Identifier, Identifier)])+ _lhsOcopy :: Patterns+ _hdIcopy :: Pattern+ _hdIdefinedInsts :: ([Identifier])+ _hdIpatternAttributes :: ([(Identifier, Identifier)])+ _tlIcopy :: Patterns+ _tlIdefinedInsts :: ([Identifier])+ _tlIpatternAttributes :: ([(Identifier, Identifier)])+ -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 261 "src-ag/GenerateCode.ag" #-}+ _hdIdefinedInsts ++ _tlIdefinedInsts+ {-# LINE 7144 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 268, column 47)+ _lhsOpatternAttributes =+ ({-# LINE 268 "src-ag/GenerateCode.ag" #-}+ _hdIpatternAttributes ++ _tlIpatternAttributes+ {-# LINE 7150 "dist/build/GenerateCode" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 7156 "dist/build/GenerateCode" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 7162 "dist/build/GenerateCode" #-}+ )+ ( _hdIcopy,_hdIdefinedInsts,_hdIpatternAttributes) =+ hd_+ ( _tlIcopy,_tlIdefinedInsts,_tlIpatternAttributes) =+ tl_+ in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)))+sem_Patterns_Nil :: T_Patterns+sem_Patterns_Nil =+ (T_Patterns (let _lhsOdefinedInsts :: ([Identifier])+ _lhsOpatternAttributes :: ([(Identifier, Identifier)])+ _lhsOcopy :: Patterns+ -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 261 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 7178 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 268, column 47)+ _lhsOpatternAttributes =+ ({-# LINE 268 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 7184 "dist/build/GenerateCode" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ []+ {-# LINE 7190 "dist/build/GenerateCode" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 7196 "dist/build/GenerateCode" #-}+ )+ in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)))+-- Sequence ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allNts : Set NontermIdent+ aroundMap : Set Identifier+ children : [(Identifier,Type,ChildKind)]+ con : ConstructorIdent+ inh : Attributes+ instVisitNrs : Map Identifier Int+ lastExpr : Expr+ mergeMap : Map Identifier (Identifier, [Identifier])+ nr : Int+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramInstMap : Map Identifier (NontermIdent, [String])+ paramMap : ParamMap+ prefix : String+ syn : Attributes+ terminals : [Identifier]+ unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type+ what : String+ chained attributes:+ declsAbove : [Decl]+ visitedSet : Set Identifier+ synthesized attributes:+ allTpsFound : Bool+ blockDecls : DeclBlocks + comments : [String]+ decls : Decls+ definedInsts : [Identifier]+ exprs : Exprs+ tSigs : [Decl]+ tps : [Type]+ usedVars : Set String+ alternatives:+ alternative Cons:+ child hd : CRule + child tl : Sequence + alternative Nil:+-}+-- cata+sem_Sequence :: Sequence ->+ T_Sequence+sem_Sequence list =+ (Prelude.foldr sem_Sequence_Cons sem_Sequence_Nil (Prelude.map sem_CRule list))+-- semantic domain+newtype T_Sequence = T_Sequence ((Set NontermIdent) ->+ (Set Identifier) ->+ ([(Identifier,Type,ChildKind)]) ->+ ConstructorIdent ->+ ([Decl]) ->+ Attributes ->+ (Map Identifier Int) ->+ Expr ->+ (Map Identifier (Identifier, [Identifier])) ->+ Int ->+ NontermIdent ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Bool) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Options ->+ (Map Identifier (NontermIdent, [String])) ->+ ParamMap ->+ String ->+ Attributes ->+ ([Identifier]) ->+ (NontermIdent -> Int -> [String] -> Code.Type) ->+ (Set Identifier) ->+ String ->+ ( Bool,DeclBlocks,([String]),Decls,([Decl]),([Identifier]),Exprs,([Decl]),([Type]),(Set String),(Set Identifier)))+data Inh_Sequence = Inh_Sequence {allNts_Inh_Sequence :: !((Set NontermIdent)),aroundMap_Inh_Sequence :: !((Set Identifier)),children_Inh_Sequence :: !(([(Identifier,Type,ChildKind)])),con_Inh_Sequence :: !(ConstructorIdent),declsAbove_Inh_Sequence :: !(([Decl])),inh_Inh_Sequence :: !(Attributes),instVisitNrs_Inh_Sequence :: !((Map Identifier Int)),lastExpr_Inh_Sequence :: !(Expr),mergeMap_Inh_Sequence :: !((Map Identifier (Identifier, [Identifier]))),nr_Inh_Sequence :: !(Int),nt_Inh_Sequence :: !(NontermIdent),o_case_Inh_Sequence :: !(Bool),o_cata_Inh_Sequence :: !(Bool),o_costcentre_Inh_Sequence :: !(Bool),o_data_Inh_Sequence :: !((Maybe Bool)),o_linePragmas_Inh_Sequence :: !(Bool),o_monadic_Inh_Sequence :: !(Bool),o_newtypes_Inh_Sequence :: !(Bool),o_pretty_Inh_Sequence :: !(Bool),o_rename_Inh_Sequence :: !(Bool),o_sem_Inh_Sequence :: !(Bool),o_sig_Inh_Sequence :: !(Bool),o_splitsems_Inh_Sequence :: !(Bool),o_strictwrap_Inh_Sequence :: !(Bool),o_traces_Inh_Sequence :: !(Bool),o_unbox_Inh_Sequence :: !(Bool),options_Inh_Sequence :: !(Options),paramInstMap_Inh_Sequence :: !((Map Identifier (NontermIdent, [String]))),paramMap_Inh_Sequence :: !(ParamMap),prefix_Inh_Sequence :: !(String),syn_Inh_Sequence :: !(Attributes),terminals_Inh_Sequence :: !(([Identifier])),unfoldSemDom_Inh_Sequence :: !((NontermIdent -> Int -> [String] -> Code.Type)),visitedSet_Inh_Sequence :: !((Set Identifier)),what_Inh_Sequence :: !(String)}+data Syn_Sequence = Syn_Sequence {allTpsFound_Syn_Sequence :: !(Bool),blockDecls_Syn_Sequence :: !(DeclBlocks),comments_Syn_Sequence :: !(([String])),decls_Syn_Sequence :: !(Decls),declsAbove_Syn_Sequence :: !(([Decl])),definedInsts_Syn_Sequence :: !(([Identifier])),exprs_Syn_Sequence :: !(Exprs),tSigs_Syn_Sequence :: !(([Decl])),tps_Syn_Sequence :: !(([Type])),usedVars_Syn_Sequence :: !((Set String)),visitedSet_Syn_Sequence :: !((Set Identifier))}+wrap_Sequence :: T_Sequence ->+ Inh_Sequence ->+ Syn_Sequence+wrap_Sequence (T_Sequence sem) (Inh_Sequence _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsIlastExpr _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat) =+ (let ( _lhsOallTpsFound,_lhsOblockDecls,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet) = sem _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsIlastExpr _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat+ in (Syn_Sequence _lhsOallTpsFound _lhsOblockDecls _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet))+sem_Sequence_Cons :: T_CRule ->+ T_Sequence ->+ T_Sequence+sem_Sequence_Cons (T_CRule hd_) (T_Sequence tl_) =+ (T_Sequence (\ _lhsIallNts+ _lhsIaroundMap+ _lhsIchildren+ _lhsIcon+ _lhsIdeclsAbove+ _lhsIinh+ _lhsIinstVisitNrs+ _lhsIlastExpr+ _lhsImergeMap+ _lhsInr+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_costcentre+ _lhsIo_data+ _lhsIo_linePragmas+ _lhsIo_monadic+ _lhsIo_newtypes+ _lhsIo_pretty+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_splitsems+ _lhsIo_strictwrap+ _lhsIo_traces+ _lhsIo_unbox+ _lhsIoptions+ _lhsIparamInstMap+ _lhsIparamMap+ _lhsIprefix+ _lhsIsyn+ _lhsIterminals+ _lhsIunfoldSemDom+ _lhsIvisitedSet+ _lhsIwhat ->+ (let _lhsOblockDecls :: DeclBlocks+ _lhsOallTpsFound :: Bool+ _lhsOcomments :: ([String])+ _lhsOdecls :: Decls+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOexprs :: Exprs+ _lhsOtSigs :: ([Decl])+ _lhsOtps :: ([Type])+ _lhsOusedVars :: (Set String)+ _lhsOdeclsAbove :: ([Decl])+ _lhsOvisitedSet :: (Set Identifier)+ _hdOallNts :: (Set NontermIdent)+ _hdOaroundMap :: (Set Identifier)+ _hdOchildren :: ([(Identifier,Type,ChildKind)])+ _hdOcon :: ConstructorIdent+ _hdOdeclsAbove :: ([Decl])+ _hdOinh :: Attributes+ _hdOinstVisitNrs :: (Map Identifier Int)+ _hdOmergeMap :: (Map Identifier (Identifier, [Identifier]))+ _hdOnr :: Int+ _hdOnt :: NontermIdent+ _hdOo_case :: Bool+ _hdOo_cata :: Bool+ _hdOo_costcentre :: Bool+ _hdOo_data :: (Maybe Bool)+ _hdOo_linePragmas :: Bool+ _hdOo_monadic :: Bool+ _hdOo_newtypes :: Bool+ _hdOo_pretty :: Bool+ _hdOo_rename :: Bool+ _hdOo_sem :: Bool+ _hdOo_sig :: Bool+ _hdOo_splitsems :: Bool+ _hdOo_strictwrap :: Bool+ _hdOo_traces :: Bool+ _hdOo_unbox :: Bool+ _hdOoptions :: Options+ _hdOparamInstMap :: (Map Identifier (NontermIdent, [String]))+ _hdOparamMap :: ParamMap+ _hdOprefix :: String+ _hdOsyn :: Attributes+ _hdOterminals :: ([Identifier])+ _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _hdOvisitedSet :: (Set Identifier)+ _hdOwhat :: String+ _tlOallNts :: (Set NontermIdent)+ _tlOaroundMap :: (Set Identifier)+ _tlOchildren :: ([(Identifier,Type,ChildKind)])+ _tlOcon :: ConstructorIdent+ _tlOdeclsAbove :: ([Decl])+ _tlOinh :: Attributes+ _tlOinstVisitNrs :: (Map Identifier Int)+ _tlOlastExpr :: Expr+ _tlOmergeMap :: (Map Identifier (Identifier, [Identifier]))+ _tlOnr :: Int+ _tlOnt :: NontermIdent+ _tlOo_case :: Bool+ _tlOo_cata :: Bool+ _tlOo_costcentre :: Bool+ _tlOo_data :: (Maybe Bool)+ _tlOo_linePragmas :: Bool+ _tlOo_monadic :: Bool+ _tlOo_newtypes :: Bool+ _tlOo_pretty :: Bool+ _tlOo_rename :: Bool+ _tlOo_sem :: Bool+ _tlOo_sig :: Bool+ _tlOo_splitsems :: Bool+ _tlOo_strictwrap :: Bool+ _tlOo_traces :: Bool+ _tlOo_unbox :: Bool+ _tlOoptions :: Options+ _tlOparamInstMap :: (Map Identifier (NontermIdent, [String]))+ _tlOparamMap :: ParamMap+ _tlOprefix :: String+ _tlOsyn :: Attributes+ _tlOterminals :: ([Identifier])+ _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _tlOvisitedSet :: (Set Identifier)+ _tlOwhat :: String+ _hdIallTpsFound :: Bool+ _hdIbldBlocksFun :: (DeclBlocks -> DeclBlocks)+ _hdIcomments :: ([String])+ _hdIdecls :: Decls+ _hdIdeclsAbove :: ([Decl])+ _hdIdefinedInsts :: ([Identifier])+ _hdIexprs :: Exprs+ _hdItSigs :: ([Decl])+ _hdItps :: ([Type])+ _hdIusedVars :: (Set String)+ _hdIvisitedSet :: (Set Identifier)+ _tlIallTpsFound :: Bool+ _tlIblockDecls :: DeclBlocks+ _tlIcomments :: ([String])+ _tlIdecls :: Decls+ _tlIdeclsAbove :: ([Decl])+ _tlIdefinedInsts :: ([Identifier])+ _tlIexprs :: Exprs+ _tlItSigs :: ([Decl])+ _tlItps :: ([Type])+ _tlIusedVars :: (Set String)+ _tlIvisitedSet :: (Set Identifier)+ -- "src-ag/GenerateCode.ag"(line 622, column 7)+ _lhsOblockDecls =+ ({-# LINE 622 "src-ag/GenerateCode.ag" #-}+ _hdIbldBlocksFun _tlIblockDecls+ {-# LINE 7450 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 416, column 39)+ _lhsOallTpsFound =+ ({-# LINE 416 "src-ag/GenerateCode.ag" #-}+ _hdIallTpsFound && _tlIallTpsFound+ {-# LINE 7456 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)+ _lhsOcomments =+ ({-# LINE 868 "src-ag/GenerateCode.ag" #-}+ _hdIcomments ++ _tlIcomments+ {-# LINE 7462 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 155, column 34)+ _lhsOdecls =+ ({-# LINE 155 "src-ag/GenerateCode.ag" #-}+ _hdIdecls ++ _tlIdecls+ {-# LINE 7468 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 261 "src-ag/GenerateCode.ag" #-}+ _hdIdefinedInsts ++ _tlIdefinedInsts+ {-# LINE 7474 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 334, column 34)+ _lhsOexprs =+ ({-# LINE 334 "src-ag/GenerateCode.ag" #-}+ _hdIexprs ++ _tlIexprs+ {-# LINE 7480 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 363, column 33)+ _lhsOtSigs =+ ({-# LINE 363 "src-ag/GenerateCode.ag" #-}+ _hdItSigs ++ _tlItSigs+ {-# LINE 7486 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 415, column 31)+ _lhsOtps =+ ({-# LINE 415 "src-ag/GenerateCode.ag" #-}+ _hdItps ++ _tlItps+ {-# LINE 7492 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 352, column 37)+ _lhsOusedVars =+ ({-# LINE 352 "src-ag/GenerateCode.ag" #-}+ _hdIusedVars `Set.union` _tlIusedVars+ {-# LINE 7498 "dist/build/GenerateCode" #-}+ )+ -- copy rule (up)+ _lhsOdeclsAbove =+ ({-# LINE 608 "src-ag/GenerateCode.ag" #-}+ _tlIdeclsAbove+ {-# LINE 7504 "dist/build/GenerateCode" #-}+ )+ -- copy rule (up)+ _lhsOvisitedSet =+ ({-# LINE 145 "src-ag/GenerateCode.ag" #-}+ _tlIvisitedSet+ {-# LINE 7510 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOallNts =+ ({-# LINE 132 "src-ag/GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 7516 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOaroundMap =+ ({-# LINE 580 "src-ag/GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 7522 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOchildren =+ ({-# LINE 259 "src-ag/GenerateCode.ag" #-}+ _lhsIchildren+ {-# LINE 7528 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOcon =+ ({-# LINE 89 "src-ag/GenerateCode.ag" #-}+ _lhsIcon+ {-# LINE 7534 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOdeclsAbove =+ ({-# LINE 608 "src-ag/GenerateCode.ag" #-}+ _lhsIdeclsAbove+ {-# LINE 7540 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 7546 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOinstVisitNrs =+ ({-# LINE 560 "src-ag/GenerateCode.ag" #-}+ _lhsIinstVisitNrs+ {-# LINE 7552 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 596 "src-ag/GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 7558 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOnr =+ ({-# LINE 278 "src-ag/GenerateCode.ag" #-}+ _lhsInr+ {-# LINE 7564 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 7570 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_case =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 7576 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_cata =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 7582 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_costcentre =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 7588 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_data =+ ({-# LINE 48 "src-ag/GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 7594 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_linePragmas =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 7600 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_monadic =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 7606 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_newtypes =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 7612 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_pretty =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 7618 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 7624 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_sem =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 7630 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_sig =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 7636 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_splitsems =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 7642 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_strictwrap =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 7648 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_traces =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 7654 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOo_unbox =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 7660 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 50 "src-ag/GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 7666 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOparamInstMap =+ ({-# LINE 101 "src-ag/GenerateCode.ag" #-}+ _lhsIparamInstMap+ {-# LINE 7672 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOparamMap =+ ({-# LINE 95 "src-ag/GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 7678 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOprefix =+ ({-# LINE 49 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 7684 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 7690 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOterminals =+ ({-# LINE 90 "src-ag/GenerateCode.ag" #-}+ _lhsIterminals+ {-# LINE 7696 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOunfoldSemDom =+ ({-# LINE 750 "src-ag/GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 7702 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOvisitedSet =+ ({-# LINE 145 "src-ag/GenerateCode.ag" #-}+ _lhsIvisitedSet+ {-# LINE 7708 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _hdOwhat =+ ({-# LINE 870 "src-ag/GenerateCode.ag" #-}+ _lhsIwhat+ {-# LINE 7714 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOallNts =+ ({-# LINE 132 "src-ag/GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 7720 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOaroundMap =+ ({-# LINE 580 "src-ag/GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 7726 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOchildren =+ ({-# LINE 259 "src-ag/GenerateCode.ag" #-}+ _lhsIchildren+ {-# LINE 7732 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOcon =+ ({-# LINE 89 "src-ag/GenerateCode.ag" #-}+ _lhsIcon+ {-# LINE 7738 "dist/build/GenerateCode" #-}+ )+ -- copy rule (chain)+ _tlOdeclsAbove =+ ({-# LINE 608 "src-ag/GenerateCode.ag" #-}+ _hdIdeclsAbove+ {-# LINE 7744 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 7750 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOinstVisitNrs =+ ({-# LINE 560 "src-ag/GenerateCode.ag" #-}+ _lhsIinstVisitNrs+ {-# LINE 7756 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOlastExpr =+ ({-# LINE 606 "src-ag/GenerateCode.ag" #-}+ _lhsIlastExpr+ {-# LINE 7762 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 596 "src-ag/GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 7768 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOnr =+ ({-# LINE 278 "src-ag/GenerateCode.ag" #-}+ _lhsInr+ {-# LINE 7774 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 7780 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_case =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 7786 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_cata =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 7792 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_costcentre =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 7798 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_data =+ ({-# LINE 48 "src-ag/GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 7804 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_linePragmas =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 7810 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_monadic =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 7816 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_newtypes =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 7822 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_pretty =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 7828 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 7834 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_sem =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 7840 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_sig =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 7846 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_splitsems =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 7852 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_strictwrap =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 7858 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_traces =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 7864 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOo_unbox =+ ({-# LINE 47 "src-ag/GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 7870 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 50 "src-ag/GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 7876 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOparamInstMap =+ ({-# LINE 101 "src-ag/GenerateCode.ag" #-}+ _lhsIparamInstMap+ {-# LINE 7882 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOparamMap =+ ({-# LINE 95 "src-ag/GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 7888 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOprefix =+ ({-# LINE 49 "src-ag/GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 7894 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 84 "src-ag/GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 7900 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOterminals =+ ({-# LINE 90 "src-ag/GenerateCode.ag" #-}+ _lhsIterminals+ {-# LINE 7906 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOunfoldSemDom =+ ({-# LINE 750 "src-ag/GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 7912 "dist/build/GenerateCode" #-}+ )+ -- copy rule (chain)+ _tlOvisitedSet =+ ({-# LINE 145 "src-ag/GenerateCode.ag" #-}+ _hdIvisitedSet+ {-# LINE 7918 "dist/build/GenerateCode" #-}+ )+ -- copy rule (down)+ _tlOwhat =+ ({-# LINE 870 "src-ag/GenerateCode.ag" #-}+ _lhsIwhat+ {-# LINE 7924 "dist/build/GenerateCode" #-}+ )+ ( _hdIallTpsFound,_hdIbldBlocksFun,_hdIcomments,_hdIdecls,_hdIdeclsAbove,_hdIdefinedInsts,_hdIexprs,_hdItSigs,_hdItps,_hdIusedVars,_hdIvisitedSet) =+ hd_ _hdOallNts _hdOaroundMap _hdOchildren _hdOcon _hdOdeclsAbove _hdOinh _hdOinstVisitNrs _hdOmergeMap _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamInstMap _hdOparamMap _hdOprefix _hdOsyn _hdOterminals _hdOunfoldSemDom _hdOvisitedSet _hdOwhat+ ( _tlIallTpsFound,_tlIblockDecls,_tlIcomments,_tlIdecls,_tlIdeclsAbove,_tlIdefinedInsts,_tlIexprs,_tlItSigs,_tlItps,_tlIusedVars,_tlIvisitedSet) =+ tl_ _tlOallNts _tlOaroundMap _tlOchildren _tlOcon _tlOdeclsAbove _tlOinh _tlOinstVisitNrs _tlOlastExpr _tlOmergeMap _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamInstMap _tlOparamMap _tlOprefix _tlOsyn _tlOterminals _tlOunfoldSemDom _tlOvisitedSet _tlOwhat+ in ( _lhsOallTpsFound,_lhsOblockDecls,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet))))+sem_Sequence_Nil :: T_Sequence+sem_Sequence_Nil =+ (T_Sequence (\ _lhsIallNts+ _lhsIaroundMap+ _lhsIchildren+ _lhsIcon+ _lhsIdeclsAbove+ _lhsIinh+ _lhsIinstVisitNrs+ _lhsIlastExpr+ _lhsImergeMap+ _lhsInr+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_costcentre+ _lhsIo_data+ _lhsIo_linePragmas+ _lhsIo_monadic+ _lhsIo_newtypes+ _lhsIo_pretty+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_splitsems+ _lhsIo_strictwrap+ _lhsIo_traces+ _lhsIo_unbox+ _lhsIoptions+ _lhsIparamInstMap+ _lhsIparamMap+ _lhsIprefix+ _lhsIsyn+ _lhsIterminals+ _lhsIunfoldSemDom+ _lhsIvisitedSet+ _lhsIwhat ->+ (let _lhsOblockDecls :: DeclBlocks+ _lhsOallTpsFound :: Bool+ _lhsOcomments :: ([String])+ _lhsOdecls :: Decls+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOexprs :: Exprs+ _lhsOtSigs :: ([Decl])+ _lhsOtps :: ([Type])+ _lhsOusedVars :: (Set String)+ _lhsOdeclsAbove :: ([Decl])+ _lhsOvisitedSet :: (Set Identifier)+ -- "src-ag/GenerateCode.ag"(line 624, column 7)+ _lhsOblockDecls =+ ({-# LINE 624 "src-ag/GenerateCode.ag" #-}+ DeclTerminator _lhsIdeclsAbove _lhsIlastExpr+ {-# LINE 7983 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 416, column 39)+ _lhsOallTpsFound =+ ({-# LINE 416 "src-ag/GenerateCode.ag" #-}+ True+ {-# LINE 7989 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 868, column 52)+ _lhsOcomments =+ ({-# LINE 868 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 7995 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 155, column 34)+ _lhsOdecls =+ ({-# LINE 155 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 8001 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 261, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 261 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 8007 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 334, column 34)+ _lhsOexprs =+ ({-# LINE 334 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 8013 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 363, column 33)+ _lhsOtSigs =+ ({-# LINE 363 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 8019 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 415, column 31)+ _lhsOtps =+ ({-# LINE 415 "src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 8025 "dist/build/GenerateCode" #-}+ )+ -- use rule "src-ag/GenerateCode.ag"(line 352, column 37)+ _lhsOusedVars =+ ({-# LINE 352 "src-ag/GenerateCode.ag" #-}+ Set.empty+ {-# LINE 8031 "dist/build/GenerateCode" #-}+ )+ -- copy rule (chain)+ _lhsOdeclsAbove =+ ({-# LINE 608 "src-ag/GenerateCode.ag" #-}+ _lhsIdeclsAbove+ {-# LINE 8037 "dist/build/GenerateCode" #-}+ )+ -- copy rule (chain)+ _lhsOvisitedSet =+ ({-# LINE 145 "src-ag/GenerateCode.ag" #-}+ _lhsIvisitedSet+ {-# LINE 8043 "dist/build/GenerateCode" #-}+ )+ in ( _lhsOallTpsFound,_lhsOblockDecls,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet))))
src-derived/HsToken.hs view
@@ -1,12 +1,12 @@ --- UUAGC 0.9.39.1.0 (src-ag/HsToken.ag)+-- UUAGC 0.9.40.1 (src-ag/HsToken.ag) module HsToken where {-# LINE 2 "src-ag/HsToken.ag" #-} import CommonTypes import UU.Scanner.Position(Pos)-{-# LINE 10 "dist/build/uuagc/uuagc-tmp/HsToken.hs" #-}+{-# LINE 10 "dist/build/HsToken.hs" #-} -- HsToken ----------------------------------------------------- {- alternatives:@@ -32,13 +32,13 @@ child value : {String} child pos : {Pos} -}-data HsToken = AGField (Identifier) (Identifier) (Pos) ((Maybe String)) - | AGLocal (Identifier) (Pos) ((Maybe String)) - | CharToken (String) (Pos) - | Err (String) (Pos) - | HsToken (String) (Pos) - | StrToken (String) (Pos) - deriving ( Show)+data HsToken = AGField (Identifier) (Identifier) (Pos) ((Maybe String))+ | AGLocal (Identifier) (Pos) ((Maybe String))+ | CharToken (String) (Pos)+ | Err (String) (Pos)+ | HsToken (String) (Pos)+ | StrToken (String) (Pos)+ deriving ( Show) -- HsTokens ---------------------------------------------------- {- alternatives:@@ -47,11 +47,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,19 +1,19 @@ --- UUAGC 0.9.39.1.0 (src-ag/Interfaces.ag)+-- UUAGC 0.9.40.1 (src-ag/Interfaces.ag) module Interfaces where {-# LINE 2 "src-ag/Interfaces.ag" #-} import CommonTypes import SequentialTypes-{-# LINE 10 "dist/build/uuagc/uuagc-tmp/Interfaces.hs" #-}+{-# LINE 10 "dist/build/Interfaces.hs" #-} -- IRoot ------------------------------------------------------- {- alternatives: 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,6 +1,6 @@ {-# OPTIONS_GHC -XBangPatterns #-} --- UUAGC 0.9.39.1.0 (src-ag/InterfacesRules.lag)+-- UUAGC 0.9.40.1 (src-ag/InterfacesRules.lag) module InterfacesRules where {-# LINE 10 "src-ag/InterfacesRules.lag" #-} @@ -23,24 +23,24 @@ import Data.Foldable(toList) import Debug.Trace(trace)-{-# LINE 27 "dist/build/uuagc/uuagc-tmp/InterfacesRules.hs" #-}+{-# LINE 27 "dist/build/InterfacesRules.hs" #-} {-# LINE 2 "src-ag/Interfaces.ag" #-} import CommonTypes import SequentialTypes-{-# LINE 33 "dist/build/uuagc/uuagc-tmp/InterfacesRules.hs" #-}+{-# LINE 33 "dist/build/InterfacesRules.hs" #-} {-# LINE 58 "src-ag/InterfacesRules.lag" #-} type VisitSS = [Vertex]-{-# LINE 37 "dist/build/uuagc/uuagc-tmp/InterfacesRules.hs" #-}+{-# LINE 37 "dist/build/InterfacesRules.hs" #-} {-# LINE 93 "src-ag/InterfacesRules.lag" #-} gather :: Info -> [Vertex] -> [[Vertex]] gather info = eqClasses comp where comp a b = isEqualField (ruleTable info ! a) (ruleTable info ! b)-{-# LINE 44 "dist/build/uuagc/uuagc-tmp/InterfacesRules.hs" #-}+{-# LINE 44 "dist/build/InterfacesRules.hs" #-} {-# LINE 134 "src-ag/InterfacesRules.lag" #-} @@ -51,12 +51,12 @@ rnt = fromJust (getRhsNt (look (head syn))) d = ChildVisit fld rnt n inh syn in (v,d)-{-# LINE 55 "dist/build/uuagc/uuagc-tmp/InterfacesRules.hs" #-}+{-# LINE 55 "dist/build/InterfacesRules.hs" #-} {-# LINE 157 "src-ag/InterfacesRules.lag" #-} ed v (inh,syn) = map (\i -> (i,v)) inh ++ map (\s -> (v,s)) syn-{-# LINE 60 "dist/build/uuagc/uuagc-tmp/InterfacesRules.hs" #-}+{-# LINE 60 "dist/build/InterfacesRules.hs" #-} {-# LINE 244 "src-ag/InterfacesRules.lag" #-} @@ -64,17 +64,17 @@ postorderF = concatMap postorder postOrd g = postorderF . dfs g topSort' g = postOrd g-{-# LINE 68 "dist/build/uuagc/uuagc-tmp/InterfacesRules.hs" #-}+{-# LINE 68 "dist/build/InterfacesRules.hs" #-} {-# LINE 323 "src-ag/InterfacesRules.lag" #-} type IntraVisit = [Vertex]-{-# LINE 73 "dist/build/uuagc/uuagc-tmp/InterfacesRules.hs" #-}+{-# LINE 73 "dist/build/InterfacesRules.hs" #-} {-# LINE 345 "src-ag/InterfacesRules.lag" #-} swap (a,b) = (b,a)-{-# LINE 78 "dist/build/uuagc/uuagc-tmp/InterfacesRules.hs" #-}+{-# LINE 78 "dist/build/InterfacesRules.hs" #-} {-# LINE 419 "src-ag/InterfacesRules.lag" #-} @@ -85,7 +85,7 @@ (seg:remain) = drop n segs CSegment inh syn = seg last = null remain-{-# LINE 89 "dist/build/uuagc/uuagc-tmp/InterfacesRules.hs" #-}+{-# LINE 89 "dist/build/InterfacesRules.hs" #-} -- IRoot ------------------------------------------------------- {- visit 0:@@ -106,104 +106,104 @@ local descr : _ -} -- cata-sem_IRoot :: IRoot ->- T_IRoot -sem_IRoot !(IRoot _inters ) =- (sem_IRoot_IRoot (sem_Interfaces _inters ) )+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_ ) =+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 "src-ag/InterfacesRules.lag" #-} _lhsIinfo- {-# LINE 135 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 135 "dist/build/InterfacesRules" #-} )) of { !_intersOinfo -> (case (({-# LINE 85 "src-ag/InterfacesRules.lag" #-} snd (bounds _lhsItdp) + 1- {-# LINE 140 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 140 "dist/build/InterfacesRules" #-} )) of { !_intersOv ->- (case (inters_ _intersOinfo _intersOv ) of+ (case (inters_ _intersOinfo _intersOv) of { ( !_intersIdescr,!_intersIfirstvisitvertices,!_intersInewedges,!_intersIv,!T_Interfaces_1 inters_1) -> (case (({-# LINE 260 "src-ag/InterfacesRules.lag" #-} let terminals = [ v | (v,cr) <- assocs (ruleTable _lhsIinfo), not (getHasCode cr), isLocal cr ] in _intersIfirstvisitvertices ++ terminals- {-# LINE 148 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 148 "dist/build/InterfacesRules" #-} )) of { !_intersOprev -> (case (({-# LINE 71 "src-ag/InterfacesRules.lag" #-} toList _intersInewedges- {-# LINE 153 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 153 "dist/build/InterfacesRules" #-} )) of { !_newedges -> (case (({-# LINE 72 "src-ag/InterfacesRules.lag" #-} let graph = buildG (0,_intersIv-1) es es = _newedges ++ edges _lhsItdp in transposeG graph- {-# LINE 160 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 160 "dist/build/InterfacesRules" #-} )) of { !_visitssGraph -> (case (({-# LINE 218 "src-ag/InterfacesRules.lag" #-} _visitssGraph- {-# LINE 165 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 165 "dist/build/InterfacesRules" #-} )) of { !_intersOvssGraph -> (case (({-# LINE 147 "src-ag/InterfacesRules.lag" #-} toList _intersIdescr- {-# LINE 170 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 170 "dist/build/InterfacesRules" #-} )) of { !_descr -> (case (({-# LINE 127 "src-ag/InterfacesRules.lag" #-} Map.fromList _descr- {-# LINE 175 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 175 "dist/build/InterfacesRules" #-} )) of { !_intersOvisitDescr ->- (case (inters_1 _intersOprev _intersOvisitDescr _intersOvssGraph ) of+ (case (inters_1 _intersOprev _intersOvisitDescr _intersOvssGraph) of { ( !_intersIinters,!T_Interfaces_2 inters_2) -> (case (({-# LINE 380 "src-ag/InterfacesRules.lag" #-} _intersIinters- {-# LINE 182 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 182 "dist/build/InterfacesRules" #-} )) of { !_intersOallInters -> (case (({-# LINE 343 "src-ag/InterfacesRules.lag" #-} buildG (0,_intersIv-1) (map swap (_lhsIdpr ++ _newedges))- {-# LINE 187 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 187 "dist/build/InterfacesRules" #-} )) of { !_intersOddp ->- (case (inters_2 _intersOallInters _intersOddp ) of+ (case (inters_2 _intersOallInters _intersOddp) of { ( !_intersIedp,!_intersIvisits) -> (case (({-# LINE 442 "src-ag/InterfacesRules.lag" #-} toList _intersIedp- {-# LINE 194 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 194 "dist/build/InterfacesRules" #-} )) of { !_lhsOedp -> (case (({-# LINE 382 "src-ag/InterfacesRules.lag" #-} _intersIinters- {-# LINE 199 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 199 "dist/build/InterfacesRules" #-} )) of { !_lhsOinters -> (case (({-# LINE 383 "src-ag/InterfacesRules.lag" #-} _intersIvisits- {-# LINE 204 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 204 "dist/build/InterfacesRules" #-} )) of { !_lhsOvisits ->- ( _lhsOedp,_lhsOinters,_lhsOvisits) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ ( _lhsOedp,_lhsOinters,_lhsOvisits) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }))) -- Interface --------------------------------------------------- {- visit 0:@@ -243,180 +243,180 @@ local newedges : _ -} -- cata-sem_Interface :: Interface ->- T_Interface -sem_Interface !(Interface _nt _cons _seg ) =- (sem_Interface_Interface _nt _cons (sem_Segments _seg ) )+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 ))+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_Segments ->+ T_Interface+sem_Interface_Interface !nt_ !cons_ !(T_Segments seg_) = (T_Interface (\ (!_lhsIinfo) (!_lhsIv) -> (case (({-# LINE 83 "src-ag/InterfacesRules.lag" #-} _lhsIinfo- {-# LINE 281 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 281 "dist/build/InterfacesRules" #-} )) of { !_segOinfo -> (case (({-# LINE 205 "src-ag/InterfacesRules.lag" #-} 0- {-# LINE 286 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 286 "dist/build/InterfacesRules" #-} )) of { !_segOn -> (case (({-# LINE 195 "src-ag/InterfacesRules.lag" #-} \a -> ruleTable _lhsIinfo ! a- {-# LINE 291 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 291 "dist/build/InterfacesRules" #-} )) of { !_look -> (case (({-# LINE 187 "src-ag/InterfacesRules.lag" #-} _lhsIv- {-# LINE 296 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 296 "dist/build/InterfacesRules" #-} )) of { !_segOv ->- (case (seg_ _segOinfo _segOn _segOv ) of+ (case (seg_ _segOinfo _segOn _segOv) of { ( !_segIdescr,!_segIgroups,!_segInewedges,!_segInewvertices,!_segIv,!T_Segments_1 seg_1) -> (case (({-# LINE 188 "src-ag/InterfacesRules.lag" #-} _segIv + length _segInewvertices- {-# LINE 303 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 303 "dist/build/InterfacesRules" #-} )) of { !_v -> (case (({-# LINE 190 "src-ag/InterfacesRules.lag" #-} [_segIv .. _v-1]- {-# LINE 308 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 308 "dist/build/InterfacesRules" #-} )) of { !_firstvisitvertices -> (case (({-# LINE 196 "src-ag/InterfacesRules.lag" #-} zipWith (cv _look (-1)) _firstvisitvertices _segIgroups- {-# LINE 313 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 313 "dist/build/InterfacesRules" #-} )) of { !_descr -> (case (({-# LINE 197 "src-ag/InterfacesRules.lag" #-} _segIdescr Seq.>< Seq.fromList _descr- {-# LINE 318 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 318 "dist/build/InterfacesRules" #-} )) of { !_lhsOdescr -> (case (({-# LINE 258 "src-ag/InterfacesRules.lag" #-} _firstvisitvertices- {-# LINE 323 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 323 "dist/build/InterfacesRules" #-} )) of { !_lhsOfirstvisitvertices -> (case (({-# LINE 191 "src-ag/InterfacesRules.lag" #-} zip _firstvisitvertices _segInewvertices- {-# LINE 328 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 328 "dist/build/InterfacesRules" #-} )) of { !_newedges -> (case (({-# LINE 192 "src-ag/InterfacesRules.lag" #-} _segInewedges Seq.>< Seq.fromList _newedges- {-# LINE 333 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 333 "dist/build/InterfacesRules" #-} )) of { !_lhsOnewedges -> (case (({-# LINE 189 "src-ag/InterfacesRules.lag" #-} _v- {-# LINE 338 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 338 "dist/build/InterfacesRules" #-} )) of { !_lhsOv ->- (case ((let sem_Interface_Interface_1 :: T_Interface_1 - sem_Interface_Interface_1 =+ (case ((let sem_Interface_Interface_1 :: T_Interface_1+ sem_Interface_Interface_1 = (T_Interface_1 (\ (!_lhsIprev) (!_lhsIvisitDescr) (!_lhsIvssGraph) -> (case (({-# LINE 216 "src-ag/InterfacesRules.lag" #-} _lhsIvssGraph- {-# LINE 348 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 348 "dist/build/InterfacesRules" #-} )) of { !_segOvssGraph -> (case (({-# LINE 125 "src-ag/InterfacesRules.lag" #-} _lhsIvisitDescr- {-# LINE 353 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 353 "dist/build/InterfacesRules" #-} )) of { !_segOvisitDescr -> (case (({-# LINE 263 "src-ag/InterfacesRules.lag" #-} _lhsIprev- {-# LINE 358 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 358 "dist/build/InterfacesRules" #-} )) of { !_segOprev -> (case (({-# LINE 237 "src-ag/InterfacesRules.lag" #-} cons_- {-# LINE 363 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 363 "dist/build/InterfacesRules" #-} )) of { !_segOcons ->- (case (seg_1 _segOcons _segOprev _segOvisitDescr _segOvssGraph ) of+ (case (seg_1 _segOcons _segOprev _segOvisitDescr _segOvssGraph) of { ( !_segIsegs,!T_Segments_2 seg_2) -> (case (({-# LINE 395 "src-ag/InterfacesRules.lag" #-} CInterface _segIsegs- {-# LINE 370 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 370 "dist/build/InterfacesRules" #-} )) of { !_lhsOinter -> (case (({-# LINE 391 "src-ag/InterfacesRules.lag" #-} nt_- {-# LINE 375 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 375 "dist/build/InterfacesRules" #-} )) of { !_lhsOnt ->- (case ((let sem_Interface_Interface_2 :: T_Interface_2 - sem_Interface_Interface_2 =+ (case ((let sem_Interface_Interface_2 :: T_Interface_2+ sem_Interface_Interface_2 = (T_Interface_2 (\ (!_lhsIallInters) (!_lhsIddp) -> (case (({-# LINE 341 "src-ag/InterfacesRules.lag" #-} _lhsIddp- {-# LINE 384 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 384 "dist/build/InterfacesRules" #-} )) of { !_segOddp -> (case (({-# LINE 378 "src-ag/InterfacesRules.lag" #-} _lhsIallInters- {-# LINE 389 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 389 "dist/build/InterfacesRules" #-} )) of { !_segOallInters -> (case (({-# LINE 351 "src-ag/InterfacesRules.lag" #-} _lhsIprev- {-# LINE 394 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 394 "dist/build/InterfacesRules" #-} )) of { !_segOfromLhs -> (case (({-# LINE 314 "src-ag/InterfacesRules.lag" #-} True- {-# LINE 399 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 399 "dist/build/InterfacesRules" #-} )) of { !_segOisFirst ->- (case (seg_2 _segOallInters _segOddp _segOfromLhs _segOisFirst ) of+ (case (seg_2 _segOallInters _segOddp _segOfromLhs _segOisFirst) of { ( !_segIcvisits,!_segIedp,!_segIfirstInh,!_segIhdIntravisits,!_segIprev) -> (case (({-# LINE 437 "src-ag/InterfacesRules.lag" #-} _segIedp- {-# LINE 406 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 406 "dist/build/InterfacesRules" #-} )) of { !_lhsOedp -> (case (({-# LINE 396 "src-ag/InterfacesRules.lag" #-} Map.fromList (zip cons_ (transpose _segIcvisits))- {-# LINE 411 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 411 "dist/build/InterfacesRules" #-} )) of { !_lhsOvisits ->- ( _lhsOedp,_lhsOvisits) }) }) }) }) }) }) })) )+ ( _lhsOedp,_lhsOvisits) }) }) }) }) }) }) }))) in sem_Interface_Interface_2)) of { ( !sem_Interface_2) ->- ( _lhsOinter,_lhsOnt,sem_Interface_2) }) }) }) }) }) }) }) })) )+ ( _lhsOinter,_lhsOnt,sem_Interface_2) }) }) }) }) }) }) }) }))) in sem_Interface_Interface_1)) of { ( !sem_Interface_1) ->- ( _lhsOdescr,_lhsOfirstvisitvertices,_lhsOnewedges,_lhsOv,sem_Interface_1) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ ( _lhsOdescr,_lhsOfirstvisitvertices,_lhsOnewedges,_lhsOv,sem_Interface_1) }) }) }) }) }) }) }) }) }) }) }) }) }) }))) -- Interfaces -------------------------------------------------- {- visit 0:@@ -449,225 +449,225 @@ alternative Nil: -} -- cata-sem_Interfaces :: Interfaces ->- T_Interfaces -sem_Interfaces !list =- (Prelude.foldr sem_Interfaces_Cons sem_Interfaces_Nil (Prelude.map sem_Interface list) )+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_ ) =+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 "src-ag/InterfacesRules.lag" #-} _lhsIv- {-# LINE 486 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 486 "dist/build/InterfacesRules" #-} )) of { !_hdOv -> (case (({-# LINE 83 "src-ag/InterfacesRules.lag" #-} _lhsIinfo- {-# LINE 491 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 491 "dist/build/InterfacesRules" #-} )) of { !_hdOinfo ->- (case (hd_ _hdOinfo _hdOv ) of+ (case (hd_ _hdOinfo _hdOv) of { ( !_hdIdescr,!_hdIfirstvisitvertices,!_hdInewedges,!_hdIv,!T_Interface_1 hd_1) -> (case (({-# LINE 82 "src-ag/InterfacesRules.lag" #-} _hdIv- {-# LINE 498 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 498 "dist/build/InterfacesRules" #-} )) of { !_tlOv -> (case (({-# LINE 83 "src-ag/InterfacesRules.lag" #-} _lhsIinfo- {-# LINE 503 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 503 "dist/build/InterfacesRules" #-} )) of { !_tlOinfo ->- (case (tl_ _tlOinfo _tlOv ) of+ (case (tl_ _tlOinfo _tlOv) of { ( !_tlIdescr,!_tlIfirstvisitvertices,!_tlInewedges,!_tlIv,!T_Interfaces_1 tl_1) -> (case (({-# LINE 130 "src-ag/InterfacesRules.lag" #-} _hdIdescr Seq.>< _tlIdescr- {-# LINE 510 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 510 "dist/build/InterfacesRules" #-} )) of { !_lhsOdescr -> (case (({-# LINE 258 "src-ag/InterfacesRules.lag" #-} _hdIfirstvisitvertices ++ _tlIfirstvisitvertices- {-# LINE 515 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 515 "dist/build/InterfacesRules" #-} )) of { !_lhsOfirstvisitvertices -> (case (({-# LINE 129 "src-ag/InterfacesRules.lag" #-} _hdInewedges Seq.>< _tlInewedges- {-# LINE 520 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 520 "dist/build/InterfacesRules" #-} )) of { !_lhsOnewedges -> (case (({-# LINE 82 "src-ag/InterfacesRules.lag" #-} _tlIv- {-# LINE 525 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 525 "dist/build/InterfacesRules" #-} )) of { !_lhsOv ->- (case ((let sem_Interfaces_Cons_1 :: T_Interfaces_1 - sem_Interfaces_Cons_1 =+ (case ((let sem_Interfaces_Cons_1 :: T_Interfaces_1+ sem_Interfaces_Cons_1 = (T_Interfaces_1 (\ (!_lhsIprev) (!_lhsIvisitDescr) (!_lhsIvssGraph) -> (case (({-# LINE 216 "src-ag/InterfacesRules.lag" #-} _lhsIvssGraph- {-# LINE 535 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 535 "dist/build/InterfacesRules" #-} )) of { !_tlOvssGraph -> (case (({-# LINE 125 "src-ag/InterfacesRules.lag" #-} _lhsIvisitDescr- {-# LINE 540 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 540 "dist/build/InterfacesRules" #-} )) of { !_tlOvisitDescr -> (case (({-# LINE 258 "src-ag/InterfacesRules.lag" #-} _lhsIprev- {-# LINE 545 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 545 "dist/build/InterfacesRules" #-} )) of { !_tlOprev -> (case (({-# LINE 216 "src-ag/InterfacesRules.lag" #-} _lhsIvssGraph- {-# LINE 550 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 550 "dist/build/InterfacesRules" #-} )) of { !_hdOvssGraph -> (case (({-# LINE 125 "src-ag/InterfacesRules.lag" #-} _lhsIvisitDescr- {-# LINE 555 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 555 "dist/build/InterfacesRules" #-} )) of { !_hdOvisitDescr -> (case (({-# LINE 258 "src-ag/InterfacesRules.lag" #-} _lhsIprev- {-# LINE 560 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 560 "dist/build/InterfacesRules" #-} )) of { !_hdOprev ->- (case (tl_1 _tlOprev _tlOvisitDescr _tlOvssGraph ) of+ (case (tl_1 _tlOprev _tlOvisitDescr _tlOvssGraph) of { ( !_tlIinters,!T_Interfaces_2 tl_2) ->- (case (hd_1 _hdOprev _hdOvisitDescr _hdOvssGraph ) of+ (case (hd_1 _hdOprev _hdOvisitDescr _hdOvssGraph) of { ( !_hdIinter,!_hdInt,!T_Interface_2 hd_2) -> (case (({-# LINE 385 "src-ag/InterfacesRules.lag" #-} Map.insert _hdInt _hdIinter _tlIinters- {-# LINE 569 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 569 "dist/build/InterfacesRules" #-} )) of { !_lhsOinters ->- (case ((let sem_Interfaces_Cons_2 :: T_Interfaces_2 - sem_Interfaces_Cons_2 =+ (case ((let sem_Interfaces_Cons_2 :: T_Interfaces_2+ sem_Interfaces_Cons_2 = (T_Interfaces_2 (\ (!_lhsIallInters) (!_lhsIddp) -> (case (({-# LINE 341 "src-ag/InterfacesRules.lag" #-} _lhsIddp- {-# LINE 578 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 578 "dist/build/InterfacesRules" #-} )) of { !_tlOddp -> (case (({-# LINE 378 "src-ag/InterfacesRules.lag" #-} _lhsIallInters- {-# LINE 583 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 583 "dist/build/InterfacesRules" #-} )) of { !_tlOallInters ->- (case (tl_2 _tlOallInters _tlOddp ) of+ (case (tl_2 _tlOallInters _tlOddp) of { ( !_tlIedp,!_tlIvisits) -> (case (({-# LINE 341 "src-ag/InterfacesRules.lag" #-} _lhsIddp- {-# LINE 590 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 590 "dist/build/InterfacesRules" #-} )) of { !_hdOddp -> (case (({-# LINE 378 "src-ag/InterfacesRules.lag" #-} _lhsIallInters- {-# LINE 595 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 595 "dist/build/InterfacesRules" #-} )) of { !_hdOallInters ->- (case (hd_2 _hdOallInters _hdOddp ) of+ (case (hd_2 _hdOallInters _hdOddp) of { ( !_hdIedp,!_hdIvisits) -> (case (({-# LINE 437 "src-ag/InterfacesRules.lag" #-} _hdIedp Seq.>< _tlIedp- {-# LINE 602 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 602 "dist/build/InterfacesRules" #-} )) of { !_lhsOedp -> (case (({-# LINE 386 "src-ag/InterfacesRules.lag" #-} Map.insert _hdInt _hdIvisits _tlIvisits- {-# LINE 607 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 607 "dist/build/InterfacesRules" #-} )) of { !_lhsOvisits ->- ( _lhsOedp,_lhsOvisits) }) }) }) }) }) }) }) })) )+ ( _lhsOedp,_lhsOvisits) }) }) }) }) }) }) }) }))) in sem_Interfaces_Cons_2)) of { ( !sem_Interfaces_2) ->- ( _lhsOinters,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 =+ ( _lhsOdescr,_lhsOfirstvisitvertices,_lhsOnewedges,_lhsOv,sem_Interfaces_1) }) }) }) }) }) }) }) }) }) }) })))+sem_Interfaces_Nil :: T_Interfaces+sem_Interfaces_Nil = (T_Interfaces (\ (!_lhsIinfo) (!_lhsIv) -> (case (({-# LINE 130 "src-ag/InterfacesRules.lag" #-} Seq.empty- {-# LINE 623 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 623 "dist/build/InterfacesRules" #-} )) of { !_lhsOdescr -> (case (({-# LINE 258 "src-ag/InterfacesRules.lag" #-} []- {-# LINE 628 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 628 "dist/build/InterfacesRules" #-} )) of { !_lhsOfirstvisitvertices -> (case (({-# LINE 129 "src-ag/InterfacesRules.lag" #-} Seq.empty- {-# LINE 633 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 633 "dist/build/InterfacesRules" #-} )) of { !_lhsOnewedges -> (case (({-# LINE 82 "src-ag/InterfacesRules.lag" #-} _lhsIv- {-# LINE 638 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 638 "dist/build/InterfacesRules" #-} )) of { !_lhsOv ->- (case ((let sem_Interfaces_Nil_1 :: T_Interfaces_1 - sem_Interfaces_Nil_1 =+ (case ((let sem_Interfaces_Nil_1 :: T_Interfaces_1+ sem_Interfaces_Nil_1 = (T_Interfaces_1 (\ (!_lhsIprev) (!_lhsIvisitDescr) (!_lhsIvssGraph) -> (case (({-# LINE 387 "src-ag/InterfacesRules.lag" #-} Map.empty- {-# LINE 648 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 648 "dist/build/InterfacesRules" #-} )) of { !_lhsOinters ->- (case ((let sem_Interfaces_Nil_2 :: T_Interfaces_2 - sem_Interfaces_Nil_2 =+ (case ((let sem_Interfaces_Nil_2 :: T_Interfaces_2+ sem_Interfaces_Nil_2 = (T_Interfaces_2 (\ (!_lhsIallInters) (!_lhsIddp) -> (case (({-# LINE 437 "src-ag/InterfacesRules.lag" #-} Seq.empty- {-# LINE 657 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 657 "dist/build/InterfacesRules" #-} )) of { !_lhsOedp -> (case (({-# LINE 388 "src-ag/InterfacesRules.lag" #-} Map.empty- {-# LINE 662 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 662 "dist/build/InterfacesRules" #-} )) of { !_lhsOvisits ->- ( _lhsOedp,_lhsOvisits) }) })) )+ ( _lhsOedp,_lhsOvisits) }) }))) in sem_Interfaces_Nil_2)) of { ( !sem_Interfaces_2) ->- ( _lhsOinters,sem_Interfaces_2) }) })) )+ ( _lhsOinters,sem_Interfaces_2) }) }))) in sem_Interfaces_Nil_1)) of { ( !sem_Interfaces_1) ->- ( _lhsOdescr,_lhsOfirstvisitvertices,_lhsOnewedges,_lhsOv,sem_Interfaces_1) }) }) }) }) })) )+ ( _lhsOdescr,_lhsOfirstvisitvertices,_lhsOnewedges,_lhsOv,sem_Interfaces_1) }) }) }) }) }))) -- Segment ----------------------------------------------------- {- visit 0:@@ -730,7 +730,7 @@ local visitss' : _ local visitss : {[[Vertex]]} local defined : _- local _tup1 : {(Map Identifier Type,Map Identifier Type)}+ local _tup1 : _ local synmap : {Map Identifier Type} local inhmap : {Map Identifier Type} intra occurAs : {(CRule -> Bool) -> [Vertex] -> [Vertex]}@@ -745,122 +745,122 @@ intra inhmap : {Map Identifier Type} -} -- cata-sem_Segment :: Segment ->- T_Segment -sem_Segment !(Segment _inh _syn ) =- (sem_Segment_Segment _inh _syn )+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 ))+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+sem_Segment_Segment !inh_ !syn_ = (T_Segment (\ (!_lhsIinfo) (!_lhsIv) -> (case (({-# LINE 106 "src-ag/InterfacesRules.lag" #-} \a -> ruleTable _lhsIinfo ! a- {-# LINE 791 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 791 "dist/build/InterfacesRules" #-} )) of { !_look -> (case (({-# LINE 109 "src-ag/InterfacesRules.lag" #-} \p us -> [ a | u <- us , a <- tdsToTdp _lhsIinfo ! u , p (_look a)]- {-# LINE 798 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 798 "dist/build/InterfacesRules" #-} )) of { !_occurAs -> (case (({-# LINE 113 "src-ag/InterfacesRules.lag" #-} let group as = gather _lhsIinfo (_occurAs isRhs as) in map (partition (isInh . _look)) (group (inh_ ++ syn_))- {-# LINE 804 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 804 "dist/build/InterfacesRules" #-} )) of { !_groups -> (case (({-# LINE 116 "src-ag/InterfacesRules.lag" #-} _lhsIv + length _groups- {-# LINE 809 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 809 "dist/build/InterfacesRules" #-} )) of { !_v -> (case (({-# LINE 82 "src-ag/InterfacesRules.lag" #-} _v- {-# LINE 814 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 814 "dist/build/InterfacesRules" #-} )) of { !_lhsOv ->- (case ((let sem_Segment_Segment_1 :: T_Segment_1 - sem_Segment_Segment_1 =+ (case ((let sem_Segment_Segment_1 :: T_Segment_1+ sem_Segment_Segment_1 = (T_Segment_1 (\ (!_lhsIn) (!_lhsInextNewvertices) -> (case (({-# LINE 117 "src-ag/InterfacesRules.lag" #-} [_lhsIv .. _v -1]- {-# LINE 823 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 823 "dist/build/InterfacesRules" #-} )) of { !_newvertices -> (case (({-# LINE 132 "src-ag/InterfacesRules.lag" #-} Seq.fromList $ zipWith (cv _look _lhsIn) _newvertices _groups- {-# LINE 828 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 828 "dist/build/InterfacesRules" #-} )) of { !_lhsOdescr -> (case (({-# LINE 182 "src-ag/InterfacesRules.lag" #-} _groups- {-# LINE 833 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 833 "dist/build/InterfacesRules" #-} )) of { !_lhsOgroups -> (case (({-# LINE 174 "src-ag/InterfacesRules.lag" #-} zip _newvertices _lhsInextNewvertices- {-# LINE 838 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 838 "dist/build/InterfacesRules" #-} )) of { !_visitedges -> (case (({-# LINE 155 "src-ag/InterfacesRules.lag" #-} concat (zipWith ed _newvertices _groups)- {-# LINE 843 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 843 "dist/build/InterfacesRules" #-} )) of { !_attredges -> (case (({-# LINE 175 "src-ag/InterfacesRules.lag" #-} Seq.fromList _attredges Seq.>< Seq.fromList _visitedges- {-# LINE 848 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 848 "dist/build/InterfacesRules" #-} )) of { !_lhsOnewedges -> (case (({-# LINE 166 "src-ag/InterfacesRules.lag" #-} _newvertices- {-# LINE 853 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 853 "dist/build/InterfacesRules" #-} )) of { !_lhsOnewvertices ->- (case ((let sem_Segment_Segment_2 :: T_Segment_2 - sem_Segment_Segment_2 =+ (case ((let sem_Segment_Segment_2 :: T_Segment_2+ sem_Segment_Segment_2 = (T_Segment_2 (\ (!_lhsIcons) (!_lhsIprev) (!_lhsIvisitDescr) (!_lhsIvssGraph) -> (case (({-# LINE 229 "src-ag/InterfacesRules.lag" #-} gather _lhsIinfo (_occurAs isLhs syn_)- {-# LINE 864 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 864 "dist/build/InterfacesRules" #-} )) of { !_synOccur -> (case (({-# LINE 230 "src-ag/InterfacesRules.lag" #-}@@ -869,12 +869,12 @@ in if null syn_ then replicate (length _lhsIcons) [] else map (filter hasCode . topSort' _lhsIvssGraph) _synOccur- {-# LINE 873 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 873 "dist/build/InterfacesRules" #-} )) of { !_vss -> (case (({-# LINE 270 "src-ag/InterfacesRules.lag" #-} map (\\ _lhsIprev) _vss- {-# LINE 878 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 878 "dist/build/InterfacesRules" #-} )) of { !_visitss' -> (case (({-# LINE 284 "src-ag/InterfacesRules.lag" #-}@@ -894,7 +894,7 @@ | otherwise = v:rem prev vs table = ruleTable _lhsIinfo in map (rem []) _visitss'- {-# LINE 898 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 898 "dist/build/InterfacesRules" #-} )) of { !_visitss -> (case (({-# LINE 271 "src-ag/InterfacesRules.lag" #-}@@ -902,38 +902,38 @@ Nothing -> [v] Just (ChildVisit _ _ _ inh _) -> v:inh in concatMap (concatMap defines) _visitss- {-# LINE 906 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 906 "dist/build/InterfacesRules" #-} )) of { !_defined -> (case (({-# LINE 275 "src-ag/InterfacesRules.lag" #-} _lhsIprev ++ _defined- {-# LINE 911 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 911 "dist/build/InterfacesRules" #-} )) of { !_lhsOprev -> (case (({-# LINE 409 "src-ag/InterfacesRules.lag" #-} let makemap = Map.fromList . map findType findType v = getNtaNameType (attrTable _lhsIinfo ! v) in (makemap inh_,makemap syn_)- {-# LINE 918 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 918 "dist/build/InterfacesRules" #-} )) of { !__tup1 -> (case (({-# LINE 409 "src-ag/InterfacesRules.lag" #-} __tup1- {-# LINE 923 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 923 "dist/build/InterfacesRules" #-} )) of { !(_,!_synmap) -> (case (({-# LINE 409 "src-ag/InterfacesRules.lag" #-} __tup1- {-# LINE 928 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 928 "dist/build/InterfacesRules" #-} )) of { !(!_inhmap,_) -> (case (({-# LINE 405 "src-ag/InterfacesRules.lag" #-} if False then undefined _lhsIvssGraph _lhsIvisitDescr _lhsIprev else CSegment _inhmap _synmap- {-# LINE 933 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 933 "dist/build/InterfacesRules" #-} )) of { !_lhsOseg ->- (case ((let sem_Segment_Segment_3 :: T_Segment_3 - sem_Segment_Segment_3 =+ (case ((let sem_Segment_Segment_3 :: T_Segment_3+ sem_Segment_Segment_3 = (T_Segment_3 (\ (!_lhsIallInters) (!_lhsIddp) (!_lhsIfromLhs)@@ -945,24 +945,24 @@ Nothing -> Map.keys (getDefines (ruleTable _lhsIinfo ! v)) Just (ChildVisit _ _ _ _ syn) -> v:syn in concatMap (concatMap computes) _visitss- {-# LINE 949 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 949 "dist/build/InterfacesRules" #-} )) of { !_computed -> (case (({-# LINE 356 "src-ag/InterfacesRules.lag" #-} _occurAs isLhs inh_ ++ _lhsIfromLhs- {-# LINE 954 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 954 "dist/build/InterfacesRules" #-} )) of { !_fromLhs -> (case (({-# LINE 362 "src-ag/InterfacesRules.lag" #-} \vs next -> let needed = concatMap (_lhsIddp !) vs in nub (needed ++ next) \\ (_fromLhs ++ _computed)- {-# LINE 961 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 961 "dist/build/InterfacesRules" #-} )) of { !_iv -> (case (({-# LINE 361 "src-ag/InterfacesRules.lag" #-} zipWith _iv _visitss _lhsInextIntravisits- {-# LINE 966 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 966 "dist/build/InterfacesRules" #-} )) of { !_intravisits -> (case (({-# LINE 412 "src-ag/InterfacesRules.lag" #-}@@ -972,40 +972,40 @@ Nothing -> ruleTable _lhsIinfo ! v Just (ChildVisit name nt n _ _) -> ccv name nt n _lhsIallInters in zipWith mkVisit _visitss _intravisits- {-# LINE 976 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 976 "dist/build/InterfacesRules" #-} )) of { !_lhsOcvisits -> (case (({-# LINE 439 "src-ag/InterfacesRules.lag" #-} Seq.fromList [(i,s) | i <- inh_, s <- syn_] Seq.>< Seq.fromList [(s,i) | s <- syn_, i <- _lhsInextInh ]- {-# LINE 982 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 982 "dist/build/InterfacesRules" #-} )) of { !_lhsOedp -> (case (({-# LINE 444 "src-ag/InterfacesRules.lag" #-} inh_- {-# LINE 987 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 987 "dist/build/InterfacesRules" #-} )) of { !_lhsOinh -> (case (({-# LINE 327 "src-ag/InterfacesRules.lag" #-} _intravisits- {-# LINE 992 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 992 "dist/build/InterfacesRules" #-} )) of { !_lhsOintravisits -> (case (({-# LINE 269 "src-ag/InterfacesRules.lag" #-} _visitss- {-# LINE 997 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 997 "dist/build/InterfacesRules" #-} )) of { !_lhsOvisitss ->- ( _lhsOcvisits,_lhsOedp,_lhsOinh,_lhsOintravisits,_lhsOvisitss) }) }) }) }) }) }) }) }) })) )+ ( _lhsOcvisits,_lhsOedp,_lhsOinh,_lhsOintravisits,_lhsOvisitss) }) }) }) }) }) }) }) }) }))) in sem_Segment_Segment_3)) of { ( !sem_Segment_3) ->- ( _lhsOprev,_lhsOseg,sem_Segment_3) }) }) }) }) }) }) }) }) }) }) })) )+ ( _lhsOprev,_lhsOseg,sem_Segment_3) }) }) }) }) }) }) }) }) }) }) }))) in sem_Segment_Segment_2)) of { ( !sem_Segment_2) ->- ( _lhsOdescr,_lhsOgroups,_lhsOnewedges,_lhsOnewvertices,sem_Segment_2) }) }) }) }) }) }) }) })) )+ ( _lhsOdescr,_lhsOgroups,_lhsOnewedges,_lhsOnewvertices,sem_Segment_2) }) }) }) }) }) }) }) }))) in sem_Segment_Segment_1)) of { ( !sem_Segment_1) ->- ( _lhsOv,sem_Segment_1) }) }) }) }) }) })) )+ ( _lhsOv,sem_Segment_1) }) }) }) }) }) }))) -- Segments ---------------------------------------------------- {- visit 0:@@ -1046,331 +1046,331 @@ alternative Nil: -} -- cata-sem_Segments :: Segments ->- T_Segments -sem_Segments !list =- (Prelude.foldr sem_Segments_Cons sem_Segments_Nil (Prelude.map sem_Segment list) )+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_ ) =+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 "src-ag/InterfacesRules.lag" #-} _lhsIv- {-# LINE 1088 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1088 "dist/build/InterfacesRules" #-} )) of { !_hdOv -> (case (({-# LINE 83 "src-ag/InterfacesRules.lag" #-} _lhsIinfo- {-# LINE 1093 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1093 "dist/build/InterfacesRules" #-} )) of { !_hdOinfo ->- (case (hd_ _hdOinfo _hdOv ) of+ (case (hd_ _hdOinfo _hdOv) of { ( !_hdIv,!T_Segment_1 hd_1) -> (case (({-# LINE 82 "src-ag/InterfacesRules.lag" #-} _hdIv- {-# LINE 1100 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1100 "dist/build/InterfacesRules" #-} )) of { !_tlOv -> (case (({-# LINE 83 "src-ag/InterfacesRules.lag" #-} _lhsIinfo- {-# LINE 1105 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1105 "dist/build/InterfacesRules" #-} )) of { !_tlOinfo -> (case (({-# LINE 203 "src-ag/InterfacesRules.lag" #-} _lhsIn- {-# LINE 1110 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1110 "dist/build/InterfacesRules" #-} )) of { !_hdOn -> (case (({-# LINE 207 "src-ag/InterfacesRules.lag" #-} _lhsIn + 1- {-# LINE 1115 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1115 "dist/build/InterfacesRules" #-} )) of { !_tlOn ->- (case (tl_ _tlOinfo _tlOn _tlOv ) of+ (case (tl_ _tlOinfo _tlOn _tlOv) of { ( !_tlIdescr,!_tlIgroups,!_tlInewedges,!_tlInewvertices,!_tlIv,!T_Segments_1 tl_1) -> (case (({-# LINE 169 "src-ag/InterfacesRules.lag" #-} _tlInewvertices- {-# LINE 1122 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1122 "dist/build/InterfacesRules" #-} )) of { !_hdOnextNewvertices ->- (case (hd_1 _hdOn _hdOnextNewvertices ) of+ (case (hd_1 _hdOn _hdOnextNewvertices) of { ( !_hdIdescr,!_hdIgroups,!_hdInewedges,!_hdInewvertices,!T_Segment_2 hd_2) -> (case (({-# LINE 130 "src-ag/InterfacesRules.lag" #-} _hdIdescr Seq.>< _tlIdescr- {-# LINE 1129 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1129 "dist/build/InterfacesRules" #-} )) of { !_lhsOdescr -> (case (({-# LINE 184 "src-ag/InterfacesRules.lag" #-} _hdIgroups- {-# LINE 1134 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1134 "dist/build/InterfacesRules" #-} )) of { !_lhsOgroups -> (case (({-# LINE 129 "src-ag/InterfacesRules.lag" #-} _hdInewedges Seq.>< _tlInewedges- {-# LINE 1139 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1139 "dist/build/InterfacesRules" #-} )) of { !_lhsOnewedges -> (case (({-# LINE 170 "src-ag/InterfacesRules.lag" #-} _hdInewvertices- {-# LINE 1144 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1144 "dist/build/InterfacesRules" #-} )) of { !_lhsOnewvertices -> (case (({-# LINE 82 "src-ag/InterfacesRules.lag" #-} _tlIv- {-# LINE 1149 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1149 "dist/build/InterfacesRules" #-} )) of { !_lhsOv ->- (case ((let sem_Segments_Cons_1 :: T_Segments_1 - sem_Segments_Cons_1 =+ (case ((let sem_Segments_Cons_1 :: T_Segments_1+ sem_Segments_Cons_1 = (T_Segments_1 (\ (!_lhsIcons) (!_lhsIprev) (!_lhsIvisitDescr) (!_lhsIvssGraph) -> (case (({-# LINE 216 "src-ag/InterfacesRules.lag" #-} _lhsIvssGraph- {-# LINE 1160 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1160 "dist/build/InterfacesRules" #-} )) of { !_tlOvssGraph -> (case (({-# LINE 125 "src-ag/InterfacesRules.lag" #-} _lhsIvisitDescr- {-# LINE 1165 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1165 "dist/build/InterfacesRules" #-} )) of { !_tlOvisitDescr -> (case (({-# LINE 216 "src-ag/InterfacesRules.lag" #-} _lhsIvssGraph- {-# LINE 1170 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1170 "dist/build/InterfacesRules" #-} )) of { !_hdOvssGraph -> (case (({-# LINE 125 "src-ag/InterfacesRules.lag" #-} _lhsIvisitDescr- {-# LINE 1175 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1175 "dist/build/InterfacesRules" #-} )) of { !_hdOvisitDescr -> (case (({-# LINE 263 "src-ag/InterfacesRules.lag" #-} _lhsIprev- {-# LINE 1180 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1180 "dist/build/InterfacesRules" #-} )) of { !_hdOprev -> (case (({-# LINE 235 "src-ag/InterfacesRules.lag" #-} _lhsIcons- {-# LINE 1185 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1185 "dist/build/InterfacesRules" #-} )) of { !_hdOcons ->- (case (hd_2 _hdOcons _hdOprev _hdOvisitDescr _hdOvssGraph ) of+ (case (hd_2 _hdOcons _hdOprev _hdOvisitDescr _hdOvssGraph) of { ( !_hdIprev,!_hdIseg,!T_Segment_3 hd_3) -> (case (({-# LINE 263 "src-ag/InterfacesRules.lag" #-} _hdIprev- {-# LINE 1192 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1192 "dist/build/InterfacesRules" #-} )) of { !_tlOprev -> (case (({-# LINE 235 "src-ag/InterfacesRules.lag" #-} _lhsIcons- {-# LINE 1197 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1197 "dist/build/InterfacesRules" #-} )) of { !_tlOcons ->- (case (tl_1 _tlOcons _tlOprev _tlOvisitDescr _tlOvssGraph ) of+ (case (tl_1 _tlOcons _tlOprev _tlOvisitDescr _tlOvssGraph) of { ( !_tlIsegs,!T_Segments_2 tl_2) -> (case (({-# LINE 400 "src-ag/InterfacesRules.lag" #-} _hdIseg : _tlIsegs- {-# LINE 1204 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1204 "dist/build/InterfacesRules" #-} )) of { !_lhsOsegs ->- (case ((let sem_Segments_Cons_2 :: T_Segments_2 - sem_Segments_Cons_2 =+ (case ((let sem_Segments_Cons_2 :: T_Segments_2+ sem_Segments_Cons_2 = (T_Segments_2 (\ (!_lhsIallInters) (!_lhsIddp) (!_lhsIfromLhs) (!_lhsIisFirst) -> (case (({-# LINE 341 "src-ag/InterfacesRules.lag" #-} _lhsIddp- {-# LINE 1215 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1215 "dist/build/InterfacesRules" #-} )) of { !_tlOddp -> (case (({-# LINE 378 "src-ag/InterfacesRules.lag" #-} _lhsIallInters- {-# LINE 1220 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1220 "dist/build/InterfacesRules" #-} )) of { !_tlOallInters -> (case (({-# LINE 341 "src-ag/InterfacesRules.lag" #-} _lhsIddp- {-# LINE 1225 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1225 "dist/build/InterfacesRules" #-} )) of { !_hdOddp -> (case (({-# LINE 378 "src-ag/InterfacesRules.lag" #-} _lhsIallInters- {-# LINE 1230 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1230 "dist/build/InterfacesRules" #-} )) of { !_hdOallInters -> (case (({-# LINE 354 "src-ag/InterfacesRules.lag" #-} []- {-# LINE 1235 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1235 "dist/build/InterfacesRules" #-} )) of { !_tlOfromLhs -> (case (({-# LINE 353 "src-ag/InterfacesRules.lag" #-} _lhsIfromLhs- {-# LINE 1240 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1240 "dist/build/InterfacesRules" #-} )) of { !_hdOfromLhs -> (case (({-# LINE 316 "src-ag/InterfacesRules.lag" #-} False- {-# LINE 1245 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1245 "dist/build/InterfacesRules" #-} )) of { !_tlOisFirst ->- (case (tl_2 _tlOallInters _tlOddp _tlOfromLhs _tlOisFirst ) of+ (case (tl_2 _tlOallInters _tlOddp _tlOfromLhs _tlOisFirst) of { ( !_tlIcvisits,!_tlIedp,!_tlIfirstInh,!_tlIhdIntravisits,!_tlIprev) -> (case (({-# LINE 329 "src-ag/InterfacesRules.lag" #-} _tlIhdIntravisits- {-# LINE 1252 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1252 "dist/build/InterfacesRules" #-} )) of { !_hdOnextIntravisits -> (case (({-# LINE 312 "src-ag/InterfacesRules.lag" #-} _lhsIisFirst- {-# LINE 1257 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1257 "dist/build/InterfacesRules" #-} )) of { !_hdOisFirst -> (case (({-# LINE 446 "src-ag/InterfacesRules.lag" #-} _tlIfirstInh- {-# LINE 1262 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1262 "dist/build/InterfacesRules" #-} )) of { !_hdOnextInh ->- (case (hd_3 _hdOallInters _hdOddp _hdOfromLhs _hdOisFirst _hdOnextInh _hdOnextIntravisits ) of+ (case (hd_3 _hdOallInters _hdOddp _hdOfromLhs _hdOisFirst _hdOnextInh _hdOnextIntravisits) of { ( !_hdIcvisits,!_hdIedp,!_hdIinh,!_hdIintravisits,!_hdIvisitss) -> (case (({-# LINE 399 "src-ag/InterfacesRules.lag" #-} _hdIcvisits : _tlIcvisits- {-# LINE 1269 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1269 "dist/build/InterfacesRules" #-} )) of { !_lhsOcvisits -> (case (({-# LINE 437 "src-ag/InterfacesRules.lag" #-} _hdIedp Seq.>< _tlIedp- {-# LINE 1274 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1274 "dist/build/InterfacesRules" #-} )) of { !_lhsOedp -> (case (({-# LINE 447 "src-ag/InterfacesRules.lag" #-} _hdIinh- {-# LINE 1279 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1279 "dist/build/InterfacesRules" #-} )) of { !_lhsOfirstInh -> (case (({-# LINE 330 "src-ag/InterfacesRules.lag" #-} _hdIintravisits- {-# LINE 1284 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1284 "dist/build/InterfacesRules" #-} )) of { !_lhsOhdIntravisits -> (case (({-# LINE 263 "src-ag/InterfacesRules.lag" #-} _tlIprev- {-# LINE 1289 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1289 "dist/build/InterfacesRules" #-} )) of { !_lhsOprev ->- ( _lhsOcvisits,_lhsOedp,_lhsOfirstInh,_lhsOhdIntravisits,_lhsOprev) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ ( _lhsOcvisits,_lhsOedp,_lhsOfirstInh,_lhsOhdIntravisits,_lhsOprev) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }))) in sem_Segments_Cons_2)) of { ( !sem_Segments_2) ->- ( _lhsOsegs,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 =+ ( _lhsOdescr,_lhsOgroups,_lhsOnewedges,_lhsOnewvertices,_lhsOv,sem_Segments_1) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+sem_Segments_Nil :: T_Segments+sem_Segments_Nil = (T_Segments (\ (!_lhsIinfo) (!_lhsIn) (!_lhsIv) -> (case (({-# LINE 130 "src-ag/InterfacesRules.lag" #-} Seq.empty- {-# LINE 1306 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1306 "dist/build/InterfacesRules" #-} )) of { !_lhsOdescr -> (case (({-# LINE 185 "src-ag/InterfacesRules.lag" #-} []- {-# LINE 1311 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1311 "dist/build/InterfacesRules" #-} )) of { !_lhsOgroups -> (case (({-# LINE 129 "src-ag/InterfacesRules.lag" #-} Seq.empty- {-# LINE 1316 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1316 "dist/build/InterfacesRules" #-} )) of { !_lhsOnewedges -> (case (({-# LINE 171 "src-ag/InterfacesRules.lag" #-} []- {-# LINE 1321 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1321 "dist/build/InterfacesRules" #-} )) of { !_lhsOnewvertices -> (case (({-# LINE 82 "src-ag/InterfacesRules.lag" #-} _lhsIv- {-# LINE 1326 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1326 "dist/build/InterfacesRules" #-} )) of { !_lhsOv ->- (case ((let sem_Segments_Nil_1 :: T_Segments_1 - sem_Segments_Nil_1 =+ (case ((let sem_Segments_Nil_1 :: T_Segments_1+ sem_Segments_Nil_1 = (T_Segments_1 (\ (!_lhsIcons) (!_lhsIprev) (!_lhsIvisitDescr) (!_lhsIvssGraph) -> (case (({-# LINE 401 "src-ag/InterfacesRules.lag" #-} []- {-# LINE 1337 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1337 "dist/build/InterfacesRules" #-} )) of { !_lhsOsegs ->- (case ((let sem_Segments_Nil_2 :: T_Segments_2 - sem_Segments_Nil_2 =+ (case ((let sem_Segments_Nil_2 :: T_Segments_2+ sem_Segments_Nil_2 = (T_Segments_2 (\ (!_lhsIallInters) (!_lhsIddp) (!_lhsIfromLhs) (!_lhsIisFirst) -> (case (({-# LINE 399 "src-ag/InterfacesRules.lag" #-} []- {-# LINE 1348 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1348 "dist/build/InterfacesRules" #-} )) of { !_lhsOcvisits -> (case (({-# LINE 437 "src-ag/InterfacesRules.lag" #-} Seq.empty- {-# LINE 1353 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1353 "dist/build/InterfacesRules" #-} )) of { !_lhsOedp -> (case (({-# LINE 448 "src-ag/InterfacesRules.lag" #-} []- {-# LINE 1358 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1358 "dist/build/InterfacesRules" #-} )) of { !_lhsOfirstInh -> (case (({-# LINE 331 "src-ag/InterfacesRules.lag" #-} repeat []- {-# LINE 1363 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1363 "dist/build/InterfacesRules" #-} )) of { !_lhsOhdIntravisits -> (case (({-# LINE 263 "src-ag/InterfacesRules.lag" #-} _lhsIprev- {-# LINE 1368 "src-ag/InterfacesRules.hs" #-}+ {-# LINE 1368 "dist/build/InterfacesRules" #-} )) of { !_lhsOprev ->- ( _lhsOcvisits,_lhsOedp,_lhsOfirstInh,_lhsOhdIntravisits,_lhsOprev) }) }) }) }) })) )+ ( _lhsOcvisits,_lhsOedp,_lhsOfirstInh,_lhsOhdIntravisits,_lhsOprev) }) }) }) }) }))) in sem_Segments_Nil_2)) of { ( !sem_Segments_2) ->- ( _lhsOsegs,sem_Segments_2) }) })) )+ ( _lhsOsegs,sem_Segments_2) }) }))) in sem_Segments_Nil_1)) of { ( !sem_Segments_1) ->- ( _lhsOdescr,_lhsOgroups,_lhsOnewedges,_lhsOnewvertices,_lhsOv,sem_Segments_1) }) }) }) }) }) })) )+ ( _lhsOdescr,_lhsOgroups,_lhsOnewedges,_lhsOnewvertices,_lhsOv,sem_Segments_1) }) }) }) }) }) })))
src-derived/KWOrder.hs view
@@ -1,2838 +1,2812 @@ --- UUAGC 0.9.39.1.0 (src-ag/KWOrder.ag)-module KWOrder where-{-# LINE 7 "src-ag/KWOrder.ag" #-}--import AbstractSyntax-import HsToken-import Expression-import Patterns-import Options-import PPUtil-import Pretty-import Knuth1-import KennedyWarren-import ExecutionPlan-import Data.Maybe-import Debug.Trace-import Data.Set(Set)-import Data.Map(Map)-import Data.Sequence(Seq)-import qualified Data.Set as Set-import qualified Data.Map as Map-import qualified Data.Sequence as Seq-import Data.Monoid(mappend,mempty)-{-# LINE 27 "dist/build/uuagc/uuagc-tmp/KWOrder.hs" #-}--{-# LINE 2 "src-ag/AbstractSyntax.ag" #-}---- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import Macro --marcos-import CommonTypes-import ErrorMessages-{-# LINE 39 "dist/build/uuagc/uuagc-tmp/KWOrder.hs" #-}--{-# LINE 2 "src-ag/HsToken.ag" #-}--import CommonTypes-import UU.Scanner.Position(Pos)-{-# LINE 45 "dist/build/uuagc/uuagc-tmp/KWOrder.hs" #-}--{-# LINE 2 "src-ag/Expression.ag" #-}--import UU.Scanner.Position(Pos)-import HsToken-{-# LINE 51 "dist/build/uuagc/uuagc-tmp/KWOrder.hs" #-}--{-# LINE 2 "src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 58 "dist/build/uuagc/uuagc-tmp/KWOrder.hs" #-}-{-# LINE 274 "src-ag/KWOrder.ag" #-}---- a depends on b, thus a is a successor of b-depToEdge :: Dependency -> Edge-depToEdge (Dependency a b) = (occToVertex False b, occToVertex True a)--occToVertex :: Bool -> Occurrence -> Vertex-occToVertex _ (OccRule nm) = VRule nm-occToVertex isDependency (OccAttr c a)- | c == _LOC = VAttr Syn c a -- local attributes are treated as synthesized attrs of 'loc'- | c == _INST = VChild a -- higher-order attributes are treated as children- | otherwise = VAttr kind c a where- kind | isDependency && c == _LHS = Inh -- these dependencies have the property that- | isDependency && c /= _LHS = Syn -- they can all be faked by writing a 'const' rule- | not isDependency && c == _LHS = Syn -- Perhaps we should also allow other forms of dependencies- | not isDependency && c /= _LHS = Inh -- as well, such as two inherited attributes, which would- -- force them in different visits-{-# LINE 76 "dist/build/uuagc/uuagc-tmp/KWOrder.hs" #-}--- Child --------------------------------------------------------{-- visit 0:- inherited attributes:- aroundMap : Map Identifier [Expression]- inhMap : Map Identifier Attributes- mergeMap : Map Identifier (Identifier, [Identifier], Expression)- mergedChildren : Set Identifier- options : Options- synMap : Map Identifier Attributes- synthesized attributes:- echilds : EChild- edges : Set.Set Edge- nontnames : [(Identifier, Identifier)]- refHoNts : Set NontermIdent- refNts : Set NontermIdent- vertices : Set.Set Vertex- alternatives:- alternative Child:- child name : {Identifier}- child tp : {Type}- child kind : {ChildKind}- visit 0:- local refNts : _- local refHoNts : _- local isHigherOrder : _- local hasArounds : _- local merges : _- local isMerged : _- local vertex : _- local synvertices : _- local inhvertices : _- local childIsDeforested : _- local higherOrderEdges : _- local aroundEdges : _- local edgesout : _- local edgesin : _- local chnt : _- local inh : _- local syn : _--}--- cata-sem_Child :: Child ->- T_Child -sem_Child (Child _name _tp _kind ) =- (sem_Child_Child _name _tp _kind )--- semantic domain-newtype T_Child = T_Child ((Map Identifier [Expression]) ->- (Map Identifier Attributes) ->- (Map Identifier (Identifier, [Identifier], Expression)) ->- (Set Identifier) ->- Options ->- (Map Identifier Attributes) ->- ( EChild,(Set.Set Edge),([(Identifier, Identifier)]),(Set NontermIdent),(Set NontermIdent),(Set.Set Vertex)))-data Inh_Child = Inh_Child {aroundMap_Inh_Child :: (Map Identifier [Expression]),inhMap_Inh_Child :: (Map Identifier Attributes),mergeMap_Inh_Child :: (Map Identifier (Identifier, [Identifier], Expression)),mergedChildren_Inh_Child :: (Set Identifier),options_Inh_Child :: Options,synMap_Inh_Child :: (Map Identifier Attributes)}-data Syn_Child = Syn_Child {echilds_Syn_Child :: EChild,edges_Syn_Child :: (Set.Set Edge),nontnames_Syn_Child :: ([(Identifier, Identifier)]),refHoNts_Syn_Child :: (Set NontermIdent),refNts_Syn_Child :: (Set NontermIdent),vertices_Syn_Child :: (Set.Set Vertex)}-wrap_Child :: T_Child ->- Inh_Child ->- Syn_Child -wrap_Child (T_Child sem ) (Inh_Child _lhsIaroundMap _lhsIinhMap _lhsImergeMap _lhsImergedChildren _lhsIoptions _lhsIsynMap ) =- (let ( _lhsOechilds,_lhsOedges,_lhsOnontnames,_lhsOrefHoNts,_lhsOrefNts,_lhsOvertices) = sem _lhsIaroundMap _lhsIinhMap _lhsImergeMap _lhsImergedChildren _lhsIoptions _lhsIsynMap - in (Syn_Child _lhsOechilds _lhsOedges _lhsOnontnames _lhsOrefHoNts _lhsOrefNts _lhsOvertices ))-sem_Child_Child :: Identifier ->- Type ->- ChildKind ->- T_Child -sem_Child_Child name_ tp_ kind_ =- (T_Child (\ _lhsIaroundMap- _lhsIinhMap- _lhsImergeMap- _lhsImergedChildren- _lhsIoptions- _lhsIsynMap ->- (let _lhsOechilds :: EChild- _lhsOvertices :: (Set.Set Vertex)- _lhsOedges :: (Set.Set Edge)- _lhsOnontnames :: ([(Identifier, Identifier)])- _lhsOrefHoNts :: (Set NontermIdent)- _lhsOrefNts :: (Set NontermIdent)- -- "src-ag/KWOrder.ag"(line 73, column 3)- _refNts =- ({-# LINE 73 "src-ag/KWOrder.ag" #-}- case tp_ of- NT nt _ _ -> Set.singleton nt- _ -> mempty- {-# LINE 162 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 76, column 3)- _refHoNts =- ({-# LINE 76 "src-ag/KWOrder.ag" #-}- if _isHigherOrder then _refNts else mempty- {-# LINE 168 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 77, column 3)- _isHigherOrder =- ({-# LINE 77 "src-ag/KWOrder.ag" #-}- case kind_ of- ChildSyntax -> False- _ -> True- {-# LINE 176 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 107, column 3)- _hasArounds =- ({-# LINE 107 "src-ag/KWOrder.ag" #-}- case Map.lookup name_ _lhsIaroundMap of- Nothing -> False- Just as -> not (null as)- {-# LINE 184 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 135, column 3)- _merges =- ({-# LINE 135 "src-ag/KWOrder.ag" #-}- maybe Nothing (\(_,ms,_) -> Just ms) $ Map.lookup name_ _lhsImergeMap- {-# LINE 190 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 136, column 3)- _isMerged =- ({-# LINE 136 "src-ag/KWOrder.ag" #-}- name_ `Set.member` _lhsImergedChildren- {-# LINE 196 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 177, column 11)- _lhsOechilds =- ({-# LINE 177 "src-ag/KWOrder.ag" #-}- case tp_ of- NT _ _ _ -> EChild name_ tp_ kind_ _hasArounds _merges _isMerged- _ -> ETerm name_ tp_- {-# LINE 204 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 214, column 12)- _vertex =- ({-# LINE 214 "src-ag/KWOrder.ag" #-}- VChild name_- {-# LINE 210 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 215, column 12)- _synvertices =- ({-# LINE 215 "src-ag/KWOrder.ag" #-}- map (VAttr Syn name_) . Map.keys $ _syn- {-# LINE 216 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 216, column 12)- _inhvertices =- ({-# LINE 216 "src-ag/KWOrder.ag" #-}- map (VAttr Inh name_) . Map.keys $ _inh- {-# LINE 222 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 217, column 12)- _lhsOvertices =- ({-# LINE 217 "src-ag/KWOrder.ag" #-}- case tp_ of- NT _ _ _ -> Set.insert _vertex $ Set.fromList (_synvertices ++ _inhvertices )- _ -> Set.empty- {-# LINE 230 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 247, column 3)- _childIsDeforested =- ({-# LINE 247 "src-ag/KWOrder.ag" #-}- case tp_ of- NT _ _ defor -> defor- _ -> False- {-# LINE 238 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 250, column 3)- _higherOrderEdges =- ({-# LINE 250 "src-ag/KWOrder.ag" #-}- case kind_ of- ChildAttr | lateHigherOrderBinding _lhsIoptions && not _childIsDeforested- -> [(_vertex , VAttr Inh _LHS idLateBindingAttr)]- _ -> []- {-# LINE 247 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 254, column 3)- _aroundEdges =- ({-# LINE 254 "src-ag/KWOrder.ag" #-}- if _hasArounds- then [(_vertex , VAttr Syn _LOC (Ident (getName name_ ++ "_around") (getPos name_)))]- else []- {-# LINE 255 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 260, column 12)- _edgesout =- ({-# LINE 260 "src-ag/KWOrder.ag" #-}- _higherOrderEdges- {-# LINE 261 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 261, column 12)- _edgesin =- ({-# LINE 261 "src-ag/KWOrder.ag" #-}- map (flip (,) _vertex ) _synvertices- {-# LINE 267 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 262, column 12)- _lhsOedges =- ({-# LINE 262 "src-ag/KWOrder.ag" #-}- Set.fromList (_edgesout ++ _edgesin )- {-# LINE 273 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 300, column 12)- _lhsOnontnames =- ({-# LINE 300 "src-ag/KWOrder.ag" #-}- case tp_ of- NT nont _ _ -> [(name_, nont)]- _ -> []- {-# LINE 281 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 19, column 11)- _chnt =- ({-# LINE 19 "src-ag/DistChildAttr.ag" #-}- case tp_ of- NT nt _ _ -> nt- Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")- Haskell t -> identifier t- {-# LINE 290 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 23, column 11)- _inh =- ({-# LINE 23 "src-ag/DistChildAttr.ag" #-}- Map.findWithDefault Map.empty _chnt _lhsIinhMap- {-# LINE 296 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 24, column 11)- _syn =- ({-# LINE 24 "src-ag/DistChildAttr.ag" #-}- Map.findWithDefault Map.empty _chnt _lhsIsynMap- {-# LINE 302 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 55, column 67)- _lhsOrefHoNts =- ({-# LINE 55 "src-ag/KWOrder.ag" #-}- _refHoNts- {-# LINE 308 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 55, column 67)- _lhsOrefNts =- ({-# LINE 55 "src-ag/KWOrder.ag" #-}- _refNts- {-# LINE 314 "src-ag/KWOrder.hs" #-}- )- in ( _lhsOechilds,_lhsOedges,_lhsOnontnames,_lhsOrefHoNts,_lhsOrefNts,_lhsOvertices))) )--- Children -----------------------------------------------------{-- visit 0:- inherited attributes:- aroundMap : Map Identifier [Expression]- inhMap : Map Identifier Attributes- mergeMap : Map Identifier (Identifier, [Identifier], Expression)- mergedChildren : Set Identifier- options : Options- synMap : Map Identifier Attributes- synthesized attributes:- echilds : EChildren- edges : Set.Set Edge- nontnames : [(Identifier, Identifier)]- refHoNts : Set NontermIdent- refNts : Set NontermIdent- vertices : Set.Set Vertex- alternatives:- alternative Cons:- child hd : Child - child tl : Children - alternative Nil:--}--- cata-sem_Children :: Children ->- T_Children -sem_Children list =- (Prelude.foldr sem_Children_Cons sem_Children_Nil (Prelude.map sem_Child list) )--- semantic domain-newtype T_Children = T_Children ((Map Identifier [Expression]) ->- (Map Identifier Attributes) ->- (Map Identifier (Identifier, [Identifier], Expression)) ->- (Set Identifier) ->- Options ->- (Map Identifier Attributes) ->- ( EChildren,(Set.Set Edge),([(Identifier, Identifier)]),(Set NontermIdent),(Set NontermIdent),(Set.Set Vertex)))-data Inh_Children = Inh_Children {aroundMap_Inh_Children :: (Map Identifier [Expression]),inhMap_Inh_Children :: (Map Identifier Attributes),mergeMap_Inh_Children :: (Map Identifier (Identifier, [Identifier], Expression)),mergedChildren_Inh_Children :: (Set Identifier),options_Inh_Children :: Options,synMap_Inh_Children :: (Map Identifier Attributes)}-data Syn_Children = Syn_Children {echilds_Syn_Children :: EChildren,edges_Syn_Children :: (Set.Set Edge),nontnames_Syn_Children :: ([(Identifier, Identifier)]),refHoNts_Syn_Children :: (Set NontermIdent),refNts_Syn_Children :: (Set NontermIdent),vertices_Syn_Children :: (Set.Set Vertex)}-wrap_Children :: T_Children ->- Inh_Children ->- Syn_Children -wrap_Children (T_Children sem ) (Inh_Children _lhsIaroundMap _lhsIinhMap _lhsImergeMap _lhsImergedChildren _lhsIoptions _lhsIsynMap ) =- (let ( _lhsOechilds,_lhsOedges,_lhsOnontnames,_lhsOrefHoNts,_lhsOrefNts,_lhsOvertices) = sem _lhsIaroundMap _lhsIinhMap _lhsImergeMap _lhsImergedChildren _lhsIoptions _lhsIsynMap - in (Syn_Children _lhsOechilds _lhsOedges _lhsOnontnames _lhsOrefHoNts _lhsOrefNts _lhsOvertices ))-sem_Children_Cons :: T_Child ->- T_Children ->- T_Children -sem_Children_Cons (T_Child hd_ ) (T_Children tl_ ) =- (T_Children (\ _lhsIaroundMap- _lhsIinhMap- _lhsImergeMap- _lhsImergedChildren- _lhsIoptions- _lhsIsynMap ->- (let _lhsOechilds :: EChildren- _lhsOedges :: (Set.Set Edge)- _lhsOnontnames :: ([(Identifier, Identifier)])- _lhsOrefHoNts :: (Set NontermIdent)- _lhsOrefNts :: (Set NontermIdent)- _lhsOvertices :: (Set.Set Vertex)- _hdOaroundMap :: (Map Identifier [Expression])- _hdOinhMap :: (Map Identifier Attributes)- _hdOmergeMap :: (Map Identifier (Identifier, [Identifier], Expression))- _hdOmergedChildren :: (Set Identifier)- _hdOoptions :: Options- _hdOsynMap :: (Map Identifier Attributes)- _tlOaroundMap :: (Map Identifier [Expression])- _tlOinhMap :: (Map Identifier Attributes)- _tlOmergeMap :: (Map Identifier (Identifier, [Identifier], Expression))- _tlOmergedChildren :: (Set Identifier)- _tlOoptions :: Options- _tlOsynMap :: (Map Identifier Attributes)- _hdIechilds :: EChild- _hdIedges :: (Set.Set Edge)- _hdInontnames :: ([(Identifier, Identifier)])- _hdIrefHoNts :: (Set NontermIdent)- _hdIrefNts :: (Set NontermIdent)- _hdIvertices :: (Set.Set Vertex)- _tlIechilds :: EChildren- _tlIedges :: (Set.Set Edge)- _tlInontnames :: ([(Identifier, Identifier)])- _tlIrefHoNts :: (Set NontermIdent)- _tlIrefNts :: (Set NontermIdent)- _tlIvertices :: (Set.Set Vertex)- -- use rule "src-ag/KWOrder.ag"(line 174, column 29)- _lhsOechilds =- ({-# LINE 174 "src-ag/KWOrder.ag" #-}- _hdIechilds : _tlIechilds- {-# LINE 405 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 232, column 33)- _lhsOedges =- ({-# LINE 232 "src-ag/KWOrder.ag" #-}- _hdIedges `Set.union` _tlIedges- {-# LINE 411 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 297, column 37)- _lhsOnontnames =- ({-# LINE 297 "src-ag/KWOrder.ag" #-}- _hdInontnames ++ _tlInontnames- {-# LINE 417 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 55, column 67)- _lhsOrefHoNts =- ({-# LINE 55 "src-ag/KWOrder.ag" #-}- _hdIrefHoNts `mappend` _tlIrefHoNts- {-# LINE 423 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 55, column 67)- _lhsOrefNts =- ({-# LINE 55 "src-ag/KWOrder.ag" #-}- _hdIrefNts `mappend` _tlIrefNts- {-# LINE 429 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 188, column 36)- _lhsOvertices =- ({-# LINE 188 "src-ag/KWOrder.ag" #-}- _hdIvertices `Set.union` _tlIvertices- {-# LINE 435 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOaroundMap =- ({-# LINE 98 "src-ag/KWOrder.ag" #-}- _lhsIaroundMap- {-# LINE 441 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 447 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 123 "src-ag/KWOrder.ag" #-}- _lhsImergeMap- {-# LINE 453 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOmergedChildren =- ({-# LINE 123 "src-ag/KWOrder.ag" #-}- _lhsImergedChildren- {-# LINE 459 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 33 "src-ag/KWOrder.ag" #-}- _lhsIoptions- {-# LINE 465 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 471 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOaroundMap =- ({-# LINE 98 "src-ag/KWOrder.ag" #-}- _lhsIaroundMap- {-# LINE 477 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 483 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 123 "src-ag/KWOrder.ag" #-}- _lhsImergeMap- {-# LINE 489 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOmergedChildren =- ({-# LINE 123 "src-ag/KWOrder.ag" #-}- _lhsImergedChildren- {-# LINE 495 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 33 "src-ag/KWOrder.ag" #-}- _lhsIoptions- {-# LINE 501 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 507 "src-ag/KWOrder.hs" #-}- )- ( _hdIechilds,_hdIedges,_hdInontnames,_hdIrefHoNts,_hdIrefNts,_hdIvertices) =- hd_ _hdOaroundMap _hdOinhMap _hdOmergeMap _hdOmergedChildren _hdOoptions _hdOsynMap - ( _tlIechilds,_tlIedges,_tlInontnames,_tlIrefHoNts,_tlIrefNts,_tlIvertices) =- tl_ _tlOaroundMap _tlOinhMap _tlOmergeMap _tlOmergedChildren _tlOoptions _tlOsynMap - in ( _lhsOechilds,_lhsOedges,_lhsOnontnames,_lhsOrefHoNts,_lhsOrefNts,_lhsOvertices))) )-sem_Children_Nil :: T_Children -sem_Children_Nil =- (T_Children (\ _lhsIaroundMap- _lhsIinhMap- _lhsImergeMap- _lhsImergedChildren- _lhsIoptions- _lhsIsynMap ->- (let _lhsOechilds :: EChildren- _lhsOedges :: (Set.Set Edge)- _lhsOnontnames :: ([(Identifier, Identifier)])- _lhsOrefHoNts :: (Set NontermIdent)- _lhsOrefNts :: (Set NontermIdent)- _lhsOvertices :: (Set.Set Vertex)- -- use rule "src-ag/KWOrder.ag"(line 174, column 29)- _lhsOechilds =- ({-# LINE 174 "src-ag/KWOrder.ag" #-}- []- {-# LINE 532 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 232, column 33)- _lhsOedges =- ({-# LINE 232 "src-ag/KWOrder.ag" #-}- Set.empty- {-# LINE 538 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 297, column 37)- _lhsOnontnames =- ({-# LINE 297 "src-ag/KWOrder.ag" #-}- []- {-# LINE 544 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 55, column 67)- _lhsOrefHoNts =- ({-# LINE 55 "src-ag/KWOrder.ag" #-}- mempty- {-# LINE 550 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 55, column 67)- _lhsOrefNts =- ({-# LINE 55 "src-ag/KWOrder.ag" #-}- mempty- {-# LINE 556 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 188, column 36)- _lhsOvertices =- ({-# LINE 188 "src-ag/KWOrder.ag" #-}- Set.empty- {-# LINE 562 "src-ag/KWOrder.hs" #-}- )- in ( _lhsOechilds,_lhsOedges,_lhsOnontnames,_lhsOrefHoNts,_lhsOrefNts,_lhsOvertices))) )--- Expression ---------------------------------------------------{-- visit 0:- synthesized attributes:- copy : SELF - vertices : Set.Set Vertex- alternatives:- alternative Expression:- child pos : {Pos}- child tks : {[HsToken]}- visit 0:- local copy : _--}--- cata-sem_Expression :: Expression ->- T_Expression -sem_Expression (Expression _pos _tks ) =- (sem_Expression_Expression _pos _tks )--- semantic domain-newtype T_Expression = T_Expression (( Expression ,(Set.Set Vertex)))-data Inh_Expression = Inh_Expression {}-data Syn_Expression = Syn_Expression {copy_Syn_Expression :: Expression ,vertices_Syn_Expression :: (Set.Set Vertex)}-wrap_Expression :: T_Expression ->- Inh_Expression ->- Syn_Expression -wrap_Expression (T_Expression sem ) (Inh_Expression ) =- (let ( _lhsOcopy,_lhsOvertices) = sem - in (Syn_Expression _lhsOcopy _lhsOvertices ))-sem_Expression_Expression :: Pos ->- ([HsToken]) ->- T_Expression -sem_Expression_Expression pos_ tks_ =- (T_Expression (let _lhsOvertices :: (Set.Set Vertex)- _lhsOcopy :: Expression - -- "src-ag/KWOrder.ag"(line 199, column 17)- _lhsOvertices =- ({-# LINE 199 "src-ag/KWOrder.ag" #-}- Set.unions $ map (\tok -> vertices_Syn_HsToken- (wrap_HsToken (sem_HsToken tok) Inh_HsToken)) tks_- {-# LINE 604 "src-ag/KWOrder.hs" #-}- )- -- self rule- _copy =- ({-# LINE 153 "src-ag/KWOrder.ag" #-}- Expression pos_ tks_- {-# LINE 610 "src-ag/KWOrder.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 153 "src-ag/KWOrder.ag" #-}- _copy- {-# LINE 616 "src-ag/KWOrder.hs" #-}- )- in ( _lhsOcopy,_lhsOvertices)) )--- Grammar ------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attributes:- depgraphs : PP_Doc- errors : Seq Error- inhmap : Map.Map NontermIdent Attributes- localSigMap : Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))- output : ExecutionPlan- synmap : Map.Map NontermIdent Attributes- visitgraph : PP_Doc- 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 quantMap : {QuantMap}- child uniqueMap : {UniqueMap}- child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}- visit 0:- local closedNtDeps : _- local closedHoNtDeps : _- local closedHoNtRevDeps : _- local _tup1 : {(ExecutionPlan,PP_Doc,PP_Doc,Seq Error)}--}--- cata-sem_Grammar :: Grammar ->- T_Grammar -sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap ) =- (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap )--- semantic domain-newtype T_Grammar = T_Grammar (Options ->- ( PP_Doc,(Seq Error),(Map.Map NontermIdent Attributes),(Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))),ExecutionPlan,(Map.Map NontermIdent Attributes),PP_Doc))-data Inh_Grammar = Inh_Grammar {options_Inh_Grammar :: Options}-data Syn_Grammar = Syn_Grammar {depgraphs_Syn_Grammar :: PP_Doc,errors_Syn_Grammar :: (Seq Error),inhmap_Syn_Grammar :: (Map.Map NontermIdent Attributes),localSigMap_Syn_Grammar :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))),output_Syn_Grammar :: ExecutionPlan,synmap_Syn_Grammar :: (Map.Map NontermIdent Attributes),visitgraph_Syn_Grammar :: PP_Doc}-wrap_Grammar :: T_Grammar ->- Inh_Grammar ->- Syn_Grammar -wrap_Grammar (T_Grammar sem ) (Inh_Grammar _lhsIoptions ) =- (let ( _lhsOdepgraphs,_lhsOerrors,_lhsOinhmap,_lhsOlocalSigMap,_lhsOoutput,_lhsOsynmap,_lhsOvisitgraph) = sem _lhsIoptions - in (Syn_Grammar _lhsOdepgraphs _lhsOerrors _lhsOinhmap _lhsOlocalSigMap _lhsOoutput _lhsOsynmap _lhsOvisitgraph ))-sem_Grammar_Grammar :: TypeSyns ->- UseMap ->- Derivings ->- (Set NontermIdent) ->- T_Nonterminals ->- PragmaMap ->- AttrOrderMap ->- ParamMap ->- ContextMap ->- QuantMap ->- UniqueMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->- T_Grammar -sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_ =- (T_Grammar (\ _lhsIoptions ->- (let _nontsOrulenumber :: Int- _nontsOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))- _nontsOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))))- _nontsOclassContexts :: ContextMap- _nontsOmanualDeps :: AttrOrderMap- __tup1 :: ((ExecutionPlan,PP_Doc,PP_Doc,Seq Error))- _lhsOoutput :: ExecutionPlan- _lhsOdepgraphs :: PP_Doc- _lhsOvisitgraph :: PP_Doc- _lhsOerrors :: (Seq Error)- _nontsOinhMap :: (Map Identifier Attributes)- _nontsOsynMap :: (Map Identifier Attributes)- _lhsOinhmap :: (Map.Map NontermIdent Attributes)- _lhsOlocalSigMap :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type)))- _lhsOsynmap :: (Map.Map NontermIdent Attributes)- _nontsOclosedHoNtDeps :: (Map NontermIdent (Set NontermIdent))- _nontsOclosedHoNtRevDeps :: (Map NontermIdent (Set NontermIdent))- _nontsOclosedNtDeps :: (Map NontermIdent (Set NontermIdent))- _nontsOoptions :: Options- _nontsIdepinfo :: ([NontDependencyInformation])- _nontsIinhMap' :: (Map Identifier Attributes)- _nontsIinhmap :: (Map.Map NontermIdent Attributes)- _nontsIlocalSigMap :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type)))- _nontsIntDeps :: (Map NontermIdent (Set NontermIdent))- _nontsIntHoDeps :: (Map NontermIdent (Set NontermIdent))- _nontsIrulenumber :: Int- _nontsIsynMap' :: (Map Identifier Attributes)- _nontsIsynmap :: (Map.Map NontermIdent Attributes)- -- "src-ag/KWOrder.ag"(line 43, column 14)- _nontsOrulenumber =- ({-# LINE 43 "src-ag/KWOrder.ag" #-}- 0- {-# LINE 719 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 82, column 3)- _closedNtDeps =- ({-# LINE 82 "src-ag/KWOrder.ag" #-}- closeMap _nontsIntDeps- {-# LINE 725 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 83, column 3)- _closedHoNtDeps =- ({-# LINE 83 "src-ag/KWOrder.ag" #-}- closeMap _nontsIntHoDeps- {-# LINE 731 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 84, column 3)- _closedHoNtRevDeps =- ({-# LINE 84 "src-ag/KWOrder.ag" #-}- revDeps _closedHoNtDeps- {-# LINE 737 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 104, column 3)- _nontsOaroundMap =- ({-# LINE 104 "src-ag/KWOrder.ag" #-}- aroundsMap_- {-# LINE 743 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 129, column 3)- _nontsOmergeMap =- ({-# LINE 129 "src-ag/KWOrder.ag" #-}- mergeMap_- {-# LINE 749 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 145, column 3)- _nontsOclassContexts =- ({-# LINE 145 "src-ag/KWOrder.ag" #-}- contextMap_- {-# LINE 755 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 268, column 31)- _nontsOmanualDeps =- ({-# LINE 268 "src-ag/KWOrder.ag" #-}- manualAttrOrderMap_- {-# LINE 761 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 358, column 15)- __tup1 =- ({-# LINE 358 "src-ag/KWOrder.ag" #-}- let lazyPlan = kennedyWarrenLazy _lhsIoptions wrappers_ _nontsIdepinfo typeSyns_ derivings_- in if visit _lhsIoptions- then case kennedyWarrenOrder _lhsIoptions wrappers_ _nontsIdepinfo typeSyns_ derivings_ of- Left e -> (lazyPlan,empty,empty,Seq.singleton e)- Right (o,d,v) -> (o,d,v,Seq.empty)- else (lazyPlan,empty,empty,Seq.empty)- {-# LINE 772 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 358, column 15)- (_lhsOoutput,_,_,_) =- ({-# LINE 358 "src-ag/KWOrder.ag" #-}- __tup1- {-# LINE 778 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 358, column 15)- (_,_lhsOdepgraphs,_,_) =- ({-# LINE 358 "src-ag/KWOrder.ag" #-}- __tup1- {-# LINE 784 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 358, column 15)- (_,_,_lhsOvisitgraph,_) =- ({-# LINE 358 "src-ag/KWOrder.ag" #-}- __tup1- {-# LINE 790 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 358, column 15)- (_,_,_,_lhsOerrors) =- ({-# LINE 358 "src-ag/KWOrder.ag" #-}- __tup1- {-# LINE 796 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 15, column 13)- _nontsOinhMap =- ({-# LINE 15 "src-ag/DistChildAttr.ag" #-}- _nontsIinhMap'- {-# LINE 802 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 16, column 13)- _nontsOsynMap =- ({-# LINE 16 "src-ag/DistChildAttr.ag" #-}- _nontsIsynMap'- {-# LINE 808 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 370, column 33)- _lhsOinhmap =- ({-# LINE 370 "src-ag/KWOrder.ag" #-}- _nontsIinhmap- {-# LINE 814 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 382, column 57)- _lhsOlocalSigMap =- ({-# LINE 382 "src-ag/KWOrder.ag" #-}- _nontsIlocalSigMap- {-# LINE 820 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 371, column 33)- _lhsOsynmap =- ({-# LINE 371 "src-ag/KWOrder.ag" #-}- _nontsIsynmap- {-# LINE 826 "src-ag/KWOrder.hs" #-}- )- -- copy rule (from local)- _nontsOclosedHoNtDeps =- ({-# LINE 54 "src-ag/KWOrder.ag" #-}- _closedHoNtDeps- {-# LINE 832 "src-ag/KWOrder.hs" #-}- )- -- copy rule (from local)- _nontsOclosedHoNtRevDeps =- ({-# LINE 54 "src-ag/KWOrder.ag" #-}- _closedHoNtRevDeps- {-# LINE 838 "src-ag/KWOrder.hs" #-}- )- -- copy rule (from local)- _nontsOclosedNtDeps =- ({-# LINE 54 "src-ag/KWOrder.ag" #-}- _closedNtDeps- {-# LINE 844 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _nontsOoptions =- ({-# LINE 33 "src-ag/KWOrder.ag" #-}- _lhsIoptions- {-# LINE 850 "src-ag/KWOrder.hs" #-}- )- ( _nontsIdepinfo,_nontsIinhMap',_nontsIinhmap,_nontsIlocalSigMap,_nontsIntDeps,_nontsIntHoDeps,_nontsIrulenumber,_nontsIsynMap',_nontsIsynmap) =- nonts_ _nontsOaroundMap _nontsOclassContexts _nontsOclosedHoNtDeps _nontsOclosedHoNtRevDeps _nontsOclosedNtDeps _nontsOinhMap _nontsOmanualDeps _nontsOmergeMap _nontsOoptions _nontsOrulenumber _nontsOsynMap - in ( _lhsOdepgraphs,_lhsOerrors,_lhsOinhmap,_lhsOlocalSigMap,_lhsOoutput,_lhsOsynmap,_lhsOvisitgraph))) )--- HsToken ------------------------------------------------------{-- visit 0:- synthesized attribute:- vertices : Set.Set Vertex- alternatives:- alternative AGField:- child field : {Identifier}- child attr : {Identifier}- child pos : {Pos}- child rdesc : {Maybe String}- alternative AGLocal:- child var : {Identifier}- child pos : {Pos}- child rdesc : {Maybe String}- alternative CharToken:- child value : {String}- child pos : {Pos}- alternative Err:- child mesg : {String}- child pos : {Pos}- alternative HsToken:- child value : {String}- child pos : {Pos}- alternative StrToken:- child value : {String}- child pos : {Pos}--}--- 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 (( (Set.Set Vertex)))-data Inh_HsToken = Inh_HsToken {}-data Syn_HsToken = Syn_HsToken {vertices_Syn_HsToken :: (Set.Set Vertex)}-wrap_HsToken :: T_HsToken ->- Inh_HsToken ->- Syn_HsToken -wrap_HsToken (T_HsToken sem ) (Inh_HsToken ) =- (let ( _lhsOvertices) = sem - in (Syn_HsToken _lhsOvertices ))-sem_HsToken_AGField :: Identifier ->- Identifier ->- Pos ->- (Maybe String) ->- T_HsToken -sem_HsToken_AGField field_ attr_ pos_ rdesc_ =- (T_HsToken (let _lhsOvertices :: (Set.Set Vertex)- -- "src-ag/KWOrder.ag"(line 193, column 14)- _lhsOvertices =- ({-# LINE 193 "src-ag/KWOrder.ag" #-}- Set.singleton $ VAttr (if field_ == _LHS then Inh- else if field_ == _LOC then Loc- else Syn) field_ attr_- {-# LINE 921 "src-ag/KWOrder.hs" #-}- )- in ( _lhsOvertices)) )-sem_HsToken_AGLocal :: Identifier ->- Pos ->- (Maybe String) ->- T_HsToken -sem_HsToken_AGLocal var_ pos_ rdesc_ =- (T_HsToken (let _lhsOvertices :: (Set.Set Vertex)- -- "src-ag/KWOrder.ag"(line 192, column 14)- _lhsOvertices =- ({-# LINE 192 "src-ag/KWOrder.ag" #-}- Set.singleton $ VAttr Loc _LOC var_- {-# LINE 934 "src-ag/KWOrder.hs" #-}- )- in ( _lhsOvertices)) )-sem_HsToken_CharToken :: String ->- Pos ->- T_HsToken -sem_HsToken_CharToken value_ pos_ =- (T_HsToken (let _lhsOvertices :: (Set.Set Vertex)- -- use rule "src-ag/KWOrder.ag"(line 188, column 36)- _lhsOvertices =- ({-# LINE 188 "src-ag/KWOrder.ag" #-}- Set.empty- {-# LINE 946 "src-ag/KWOrder.hs" #-}- )- in ( _lhsOvertices)) )-sem_HsToken_Err :: String ->- Pos ->- T_HsToken -sem_HsToken_Err mesg_ pos_ =- (T_HsToken (let _lhsOvertices :: (Set.Set Vertex)- -- use rule "src-ag/KWOrder.ag"(line 188, column 36)- _lhsOvertices =- ({-# LINE 188 "src-ag/KWOrder.ag" #-}- Set.empty- {-# LINE 958 "src-ag/KWOrder.hs" #-}- )- in ( _lhsOvertices)) )-sem_HsToken_HsToken :: String ->- Pos ->- T_HsToken -sem_HsToken_HsToken value_ pos_ =- (T_HsToken (let _lhsOvertices :: (Set.Set Vertex)- -- use rule "src-ag/KWOrder.ag"(line 188, column 36)- _lhsOvertices =- ({-# LINE 188 "src-ag/KWOrder.ag" #-}- Set.empty- {-# LINE 970 "src-ag/KWOrder.hs" #-}- )- in ( _lhsOvertices)) )-sem_HsToken_StrToken :: String ->- Pos ->- T_HsToken -sem_HsToken_StrToken value_ pos_ =- (T_HsToken (let _lhsOvertices :: (Set.Set Vertex)- -- use rule "src-ag/KWOrder.ag"(line 188, column 36)- _lhsOvertices =- ({-# LINE 188 "src-ag/KWOrder.ag" #-}- Set.empty- {-# LINE 982 "src-ag/KWOrder.hs" #-}- )- in ( _lhsOvertices)) )--- HsTokens -----------------------------------------------------{-- alternatives:- alternative Cons:- child hd : HsToken - child tl : HsTokens - alternative Nil:--}--- 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 (( ))-data Inh_HsTokens = Inh_HsTokens {}-data Syn_HsTokens = Syn_HsTokens {}-wrap_HsTokens :: T_HsTokens ->- Inh_HsTokens ->- Syn_HsTokens -wrap_HsTokens (T_HsTokens sem ) (Inh_HsTokens ) =- (let ( ) = sem - in (Syn_HsTokens ))-sem_HsTokens_Cons :: T_HsToken ->- T_HsTokens ->- T_HsTokens -sem_HsTokens_Cons (T_HsToken hd_ ) (T_HsTokens tl_ ) =- (T_HsTokens (let _hdIvertices :: (Set.Set Vertex)- ( _hdIvertices) =- hd_ - in ( )) )-sem_HsTokens_Nil :: T_HsTokens -sem_HsTokens_Nil =- (T_HsTokens (let - in ( )) )--- HsTokensRoot -------------------------------------------------{-- 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 (( ))-data Inh_HsTokensRoot = Inh_HsTokensRoot {}-data Syn_HsTokensRoot = Syn_HsTokensRoot {}-wrap_HsTokensRoot :: T_HsTokensRoot ->- Inh_HsTokensRoot ->- Syn_HsTokensRoot -wrap_HsTokensRoot (T_HsTokensRoot sem ) (Inh_HsTokensRoot ) =- (let ( ) = sem - in (Syn_HsTokensRoot ))-sem_HsTokensRoot_HsTokensRoot :: T_HsTokens ->- T_HsTokensRoot -sem_HsTokensRoot_HsTokensRoot (T_HsTokens tokens_ ) =- (T_HsTokensRoot (let - in ( )) )--- Nonterminal --------------------------------------------------{-- visit 0:- inherited attributes:- aroundMap : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- classContexts : ContextMap- closedHoNtDeps : Map NontermIdent (Set NontermIdent)- closedHoNtRevDeps : Map NontermIdent (Set NontermIdent)- closedNtDeps : Map NontermIdent (Set NontermIdent)- inhMap : Map Identifier Attributes- manualDeps : AttrOrderMap- mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))- options : Options- synMap : Map Identifier Attributes- chained attribute:- rulenumber : Int- synthesized attributes:- depinfo : NontDependencyInformation- inhMap' : Map Identifier Attributes- inhmap : Map.Map NontermIdent Attributes- localSigMap : Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))- ntDeps : Map NontermIdent (Set NontermIdent)- ntHoDeps : Map NontermIdent (Set NontermIdent)- synMap' : Map Identifier Attributes- synmap : Map.Map NontermIdent Attributes- alternatives:- alternative Nonterminal:- child nt : {NontermIdent}- child params : {[Identifier]}- child inh : {Attributes}- child syn : {Attributes}- child prods : Productions - visit 0:- local closedNtDeps : _- local closedHoNtDeps : _- local closedHoNtRevDeps : _- local recursive : _- local nontrivAcyc : _- local hoInfo : _- local aroundMap : _- local mergeMap : _- local classContexts : _- local synvertices : _- local inhvertices : _- local vertices : _- local nontgraph : _--}--- 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]))) ->- ContextMap ->- (Map NontermIdent (Set NontermIdent)) ->- (Map NontermIdent (Set NontermIdent)) ->- (Map NontermIdent (Set NontermIdent)) ->- (Map Identifier Attributes) ->- AttrOrderMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->- Options ->- Int ->- (Map Identifier Attributes) ->- ( NontDependencyInformation,(Map Identifier Attributes),(Map.Map NontermIdent Attributes),(Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))),(Map NontermIdent (Set NontermIdent)),(Map NontermIdent (Set NontermIdent)),Int,(Map Identifier Attributes),(Map.Map NontermIdent Attributes)))-data Inh_Nonterminal = Inh_Nonterminal {aroundMap_Inh_Nonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))),classContexts_Inh_Nonterminal :: ContextMap,closedHoNtDeps_Inh_Nonterminal :: (Map NontermIdent (Set NontermIdent)),closedHoNtRevDeps_Inh_Nonterminal :: (Map NontermIdent (Set NontermIdent)),closedNtDeps_Inh_Nonterminal :: (Map NontermIdent (Set NontermIdent)),inhMap_Inh_Nonterminal :: (Map Identifier Attributes),manualDeps_Inh_Nonterminal :: AttrOrderMap,mergeMap_Inh_Nonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))),options_Inh_Nonterminal :: Options,rulenumber_Inh_Nonterminal :: Int,synMap_Inh_Nonterminal :: (Map Identifier Attributes)}-data Syn_Nonterminal = Syn_Nonterminal {depinfo_Syn_Nonterminal :: NontDependencyInformation,inhMap'_Syn_Nonterminal :: (Map Identifier Attributes),inhmap_Syn_Nonterminal :: (Map.Map NontermIdent Attributes),localSigMap_Syn_Nonterminal :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))),ntDeps_Syn_Nonterminal :: (Map NontermIdent (Set NontermIdent)),ntHoDeps_Syn_Nonterminal :: (Map NontermIdent (Set NontermIdent)),rulenumber_Syn_Nonterminal :: Int,synMap'_Syn_Nonterminal :: (Map Identifier Attributes),synmap_Syn_Nonterminal :: (Map.Map NontermIdent Attributes)}-wrap_Nonterminal :: T_Nonterminal ->- Inh_Nonterminal ->- Syn_Nonterminal -wrap_Nonterminal (T_Nonterminal sem ) (Inh_Nonterminal _lhsIaroundMap _lhsIclassContexts _lhsIclosedHoNtDeps _lhsIclosedHoNtRevDeps _lhsIclosedNtDeps _lhsIinhMap _lhsImanualDeps _lhsImergeMap _lhsIoptions _lhsIrulenumber _lhsIsynMap ) =- (let ( _lhsOdepinfo,_lhsOinhMap',_lhsOinhmap,_lhsOlocalSigMap,_lhsOntDeps,_lhsOntHoDeps,_lhsOrulenumber,_lhsOsynMap',_lhsOsynmap) = sem _lhsIaroundMap _lhsIclassContexts _lhsIclosedHoNtDeps _lhsIclosedHoNtRevDeps _lhsIclosedNtDeps _lhsIinhMap _lhsImanualDeps _lhsImergeMap _lhsIoptions _lhsIrulenumber _lhsIsynMap - in (Syn_Nonterminal _lhsOdepinfo _lhsOinhMap' _lhsOinhmap _lhsOlocalSigMap _lhsOntDeps _lhsOntHoDeps _lhsOrulenumber _lhsOsynMap' _lhsOsynmap ))-sem_Nonterminal_Nonterminal :: NontermIdent ->- ([Identifier]) ->- Attributes ->- Attributes ->- T_Productions ->- T_Nonterminal -sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ (T_Productions prods_ ) =- (T_Nonterminal (\ _lhsIaroundMap- _lhsIclassContexts- _lhsIclosedHoNtDeps- _lhsIclosedHoNtRevDeps- _lhsIclosedNtDeps- _lhsIinhMap- _lhsImanualDeps- _lhsImergeMap- _lhsIoptions- _lhsIrulenumber- _lhsIsynMap ->- (let _lhsOntDeps :: (Map NontermIdent (Set NontermIdent))- _lhsOntHoDeps :: (Map NontermIdent (Set NontermIdent))- _prodsOmanualDeps :: (Map ConstructorIdent (Set Dependency))- _lhsOdepinfo :: NontDependencyInformation- _lhsOinhmap :: (Map.Map NontermIdent Attributes)- _lhsOsynmap :: (Map.Map NontermIdent Attributes)- _lhsOlocalSigMap :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type)))- _lhsOinhMap' :: (Map Identifier Attributes)- _lhsOsynMap' :: (Map Identifier Attributes)- _lhsOrulenumber :: Int- _prodsOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))- _prodsOinhMap :: (Map Identifier Attributes)- _prodsOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))- _prodsOoptions :: Options- _prodsOrulenumber :: Int- _prodsOsynMap :: (Map Identifier Attributes)- _prodsIdepgraph :: ([ProdDependencyGraph])- _prodsIlocalSigMap :: (Map.Map ConstructorIdent (Map.Map Identifier Type))- _prodsIrefHoNts :: (Set NontermIdent)- _prodsIrefNts :: (Set NontermIdent)- _prodsIrulenumber :: Int- -- "src-ag/KWOrder.ag"(line 58, column 3)- _lhsOntDeps =- ({-# LINE 58 "src-ag/KWOrder.ag" #-}- Map.singleton nt_ _prodsIrefNts- {-# LINE 1162 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 59, column 3)- _lhsOntHoDeps =- ({-# LINE 59 "src-ag/KWOrder.ag" #-}- Map.singleton nt_ _prodsIrefHoNts- {-# LINE 1168 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 61, column 3)- _closedNtDeps =- ({-# LINE 61 "src-ag/KWOrder.ag" #-}- Map.findWithDefault Set.empty nt_ _lhsIclosedNtDeps- {-# LINE 1174 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 62, column 3)- _closedHoNtDeps =- ({-# LINE 62 "src-ag/KWOrder.ag" #-}- Map.findWithDefault Set.empty nt_ _lhsIclosedHoNtDeps- {-# LINE 1180 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 63, column 3)- _closedHoNtRevDeps =- ({-# LINE 63 "src-ag/KWOrder.ag" #-}- Map.findWithDefault Set.empty nt_ _lhsIclosedHoNtRevDeps- {-# LINE 1186 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 65, column 3)- _recursive =- ({-# LINE 65 "src-ag/KWOrder.ag" #-}- nt_ `Set.member` _closedNtDeps- {-# LINE 1192 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 66, column 3)- _nontrivAcyc =- ({-# LINE 66 "src-ag/KWOrder.ag" #-}- nt_ `Set.member` _closedHoNtDeps- {-# LINE 1198 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 67, column 3)- _hoInfo =- ({-# LINE 67 "src-ag/KWOrder.ag" #-}- HigherOrderInfo { hoNtDeps = _closedHoNtDeps- , hoNtRevDeps = _closedHoNtRevDeps- , hoAcyclic = _nontrivAcyc- }- {-# LINE 1207 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 100, column 32)- _aroundMap =- ({-# LINE 100 "src-ag/KWOrder.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIaroundMap- {-# LINE 1213 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 125, column 32)- _mergeMap =- ({-# LINE 125 "src-ag/KWOrder.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsImergeMap- {-# LINE 1219 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 148, column 3)- _classContexts =- ({-# LINE 148 "src-ag/KWOrder.ag" #-}- Map.findWithDefault [] nt_ _lhsIclassContexts- {-# LINE 1225 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 269, column 31)- _prodsOmanualDeps =- ({-# LINE 269 "src-ag/KWOrder.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsImanualDeps- {-# LINE 1231 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 324, column 18)- _synvertices =- ({-# LINE 324 "src-ag/KWOrder.ag" #-}- map (VAttr Syn nt_) . Map.keys $ syn_- {-# LINE 1237 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 325, column 18)- _inhvertices =- ({-# LINE 325 "src-ag/KWOrder.ag" #-}- map (VAttr Inh nt_) . Map.keys $ inh_- {-# LINE 1243 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 326, column 18)- _vertices =- ({-# LINE 326 "src-ag/KWOrder.ag" #-}- _synvertices ++ _inhvertices- {-# LINE 1249 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 330, column 18)- _nontgraph =- ({-# LINE 330 "src-ag/KWOrder.ag" #-}- NontDependencyGraph { ndgVertices = _vertices- , ndgEdges = [] }- {-# LINE 1256 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 338, column 18)- _lhsOdepinfo =- ({-# LINE 338 "src-ag/KWOrder.ag" #-}- NontDependencyInformation { ndiNonterminal = nt_- , ndiParams = params_- , ndiInh = Map.keys inh_- , ndiSyn = Map.keys syn_- , ndiDepGraph = _nontgraph- , ndiProds = _prodsIdepgraph- , ndiRecursive = _recursive- , ndiHoInfo = _hoInfo- , ndiClassCtxs = _classContexts- }- {-# LINE 1271 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 376, column 17)- _lhsOinhmap =- ({-# LINE 376 "src-ag/KWOrder.ag" #-}- Map.singleton nt_ inh_- {-# LINE 1277 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 377, column 17)- _lhsOsynmap =- ({-# LINE 377 "src-ag/KWOrder.ag" #-}- Map.singleton nt_ syn_- {-# LINE 1283 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 386, column 32)- _lhsOlocalSigMap =- ({-# LINE 386 "src-ag/KWOrder.ag" #-}- Map.singleton nt_ _prodsIlocalSigMap- {-# LINE 1289 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 7, column 18)- _lhsOinhMap' =- ({-# LINE 7 "src-ag/DistChildAttr.ag" #-}- Map.singleton nt_ inh_- {-# LINE 1295 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 8, column 18)- _lhsOsynMap' =- ({-# LINE 8 "src-ag/DistChildAttr.ag" #-}- Map.singleton nt_ syn_- {-# LINE 1301 "src-ag/KWOrder.hs" #-}- )- -- copy rule (up)- _lhsOrulenumber =- ({-# LINE 40 "src-ag/KWOrder.ag" #-}- _prodsIrulenumber- {-# LINE 1307 "src-ag/KWOrder.hs" #-}- )- -- copy rule (from local)- _prodsOaroundMap =- ({-# LINE 95 "src-ag/KWOrder.ag" #-}- _aroundMap- {-# LINE 1313 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _prodsOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 1319 "src-ag/KWOrder.hs" #-}- )- -- copy rule (from local)- _prodsOmergeMap =- ({-# LINE 120 "src-ag/KWOrder.ag" #-}- _mergeMap- {-# LINE 1325 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _prodsOoptions =- ({-# LINE 33 "src-ag/KWOrder.ag" #-}- _lhsIoptions- {-# LINE 1331 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _prodsOrulenumber =- ({-# LINE 40 "src-ag/KWOrder.ag" #-}- _lhsIrulenumber- {-# LINE 1337 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _prodsOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 1343 "src-ag/KWOrder.hs" #-}- )- ( _prodsIdepgraph,_prodsIlocalSigMap,_prodsIrefHoNts,_prodsIrefNts,_prodsIrulenumber) =- prods_ _prodsOaroundMap _prodsOinhMap _prodsOmanualDeps _prodsOmergeMap _prodsOoptions _prodsOrulenumber _prodsOsynMap - in ( _lhsOdepinfo,_lhsOinhMap',_lhsOinhmap,_lhsOlocalSigMap,_lhsOntDeps,_lhsOntHoDeps,_lhsOrulenumber,_lhsOsynMap',_lhsOsynmap))) )--- Nonterminals -------------------------------------------------{-- visit 0:- inherited attributes:- aroundMap : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- classContexts : ContextMap- closedHoNtDeps : Map NontermIdent (Set NontermIdent)- closedHoNtRevDeps : Map NontermIdent (Set NontermIdent)- closedNtDeps : Map NontermIdent (Set NontermIdent)- inhMap : Map Identifier Attributes- manualDeps : AttrOrderMap- mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))- options : Options- synMap : Map Identifier Attributes- chained attribute:- rulenumber : Int- synthesized attributes:- depinfo : [NontDependencyInformation]- inhMap' : Map Identifier Attributes- inhmap : Map.Map NontermIdent Attributes- localSigMap : Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))- ntDeps : Map NontermIdent (Set NontermIdent)- ntHoDeps : Map NontermIdent (Set NontermIdent)- synMap' : Map Identifier Attributes- synmap : Map.Map NontermIdent Attributes- alternatives:- alternative Cons:- child hd : Nonterminal - child tl : Nonterminals - alternative Nil:--}--- cata-sem_Nonterminals :: Nonterminals ->- T_Nonterminals -sem_Nonterminals list =- (Prelude.foldr sem_Nonterminals_Cons sem_Nonterminals_Nil (Prelude.map sem_Nonterminal list) )--- semantic domain-newtype T_Nonterminals = T_Nonterminals ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- ContextMap ->- (Map NontermIdent (Set NontermIdent)) ->- (Map NontermIdent (Set NontermIdent)) ->- (Map NontermIdent (Set NontermIdent)) ->- (Map Identifier Attributes) ->- AttrOrderMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->- Options ->- Int ->- (Map Identifier Attributes) ->- ( ([NontDependencyInformation]),(Map Identifier Attributes),(Map.Map NontermIdent Attributes),(Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))),(Map NontermIdent (Set NontermIdent)),(Map NontermIdent (Set NontermIdent)),Int,(Map Identifier Attributes),(Map.Map NontermIdent Attributes)))-data Inh_Nonterminals = Inh_Nonterminals {aroundMap_Inh_Nonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))),classContexts_Inh_Nonterminals :: ContextMap,closedHoNtDeps_Inh_Nonterminals :: (Map NontermIdent (Set NontermIdent)),closedHoNtRevDeps_Inh_Nonterminals :: (Map NontermIdent (Set NontermIdent)),closedNtDeps_Inh_Nonterminals :: (Map NontermIdent (Set NontermIdent)),inhMap_Inh_Nonterminals :: (Map Identifier Attributes),manualDeps_Inh_Nonterminals :: AttrOrderMap,mergeMap_Inh_Nonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))),options_Inh_Nonterminals :: Options,rulenumber_Inh_Nonterminals :: Int,synMap_Inh_Nonterminals :: (Map Identifier Attributes)}-data Syn_Nonterminals = Syn_Nonterminals {depinfo_Syn_Nonterminals :: ([NontDependencyInformation]),inhMap'_Syn_Nonterminals :: (Map Identifier Attributes),inhmap_Syn_Nonterminals :: (Map.Map NontermIdent Attributes),localSigMap_Syn_Nonterminals :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))),ntDeps_Syn_Nonterminals :: (Map NontermIdent (Set NontermIdent)),ntHoDeps_Syn_Nonterminals :: (Map NontermIdent (Set NontermIdent)),rulenumber_Syn_Nonterminals :: Int,synMap'_Syn_Nonterminals :: (Map Identifier Attributes),synmap_Syn_Nonterminals :: (Map.Map NontermIdent Attributes)}-wrap_Nonterminals :: T_Nonterminals ->- Inh_Nonterminals ->- Syn_Nonterminals -wrap_Nonterminals (T_Nonterminals sem ) (Inh_Nonterminals _lhsIaroundMap _lhsIclassContexts _lhsIclosedHoNtDeps _lhsIclosedHoNtRevDeps _lhsIclosedNtDeps _lhsIinhMap _lhsImanualDeps _lhsImergeMap _lhsIoptions _lhsIrulenumber _lhsIsynMap ) =- (let ( _lhsOdepinfo,_lhsOinhMap',_lhsOinhmap,_lhsOlocalSigMap,_lhsOntDeps,_lhsOntHoDeps,_lhsOrulenumber,_lhsOsynMap',_lhsOsynmap) = sem _lhsIaroundMap _lhsIclassContexts _lhsIclosedHoNtDeps _lhsIclosedHoNtRevDeps _lhsIclosedNtDeps _lhsIinhMap _lhsImanualDeps _lhsImergeMap _lhsIoptions _lhsIrulenumber _lhsIsynMap - in (Syn_Nonterminals _lhsOdepinfo _lhsOinhMap' _lhsOinhmap _lhsOlocalSigMap _lhsOntDeps _lhsOntHoDeps _lhsOrulenumber _lhsOsynMap' _lhsOsynmap ))-sem_Nonterminals_Cons :: T_Nonterminal ->- T_Nonterminals ->- T_Nonterminals -sem_Nonterminals_Cons (T_Nonterminal hd_ ) (T_Nonterminals tl_ ) =- (T_Nonterminals (\ _lhsIaroundMap- _lhsIclassContexts- _lhsIclosedHoNtDeps- _lhsIclosedHoNtRevDeps- _lhsIclosedNtDeps- _lhsIinhMap- _lhsImanualDeps- _lhsImergeMap- _lhsIoptions- _lhsIrulenumber- _lhsIsynMap ->- (let _lhsOdepinfo :: ([NontDependencyInformation])- _lhsOinhMap' :: (Map Identifier Attributes)- _lhsOinhmap :: (Map.Map NontermIdent Attributes)- _lhsOlocalSigMap :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type)))- _lhsOntDeps :: (Map NontermIdent (Set NontermIdent))- _lhsOntHoDeps :: (Map NontermIdent (Set NontermIdent))- _lhsOsynMap' :: (Map Identifier Attributes)- _lhsOsynmap :: (Map.Map NontermIdent Attributes)- _lhsOrulenumber :: Int- _hdOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))- _hdOclassContexts :: ContextMap- _hdOclosedHoNtDeps :: (Map NontermIdent (Set NontermIdent))- _hdOclosedHoNtRevDeps :: (Map NontermIdent (Set NontermIdent))- _hdOclosedNtDeps :: (Map NontermIdent (Set NontermIdent))- _hdOinhMap :: (Map Identifier Attributes)- _hdOmanualDeps :: AttrOrderMap- _hdOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))))- _hdOoptions :: Options- _hdOrulenumber :: Int- _hdOsynMap :: (Map Identifier Attributes)- _tlOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))- _tlOclassContexts :: ContextMap- _tlOclosedHoNtDeps :: (Map NontermIdent (Set NontermIdent))- _tlOclosedHoNtRevDeps :: (Map NontermIdent (Set NontermIdent))- _tlOclosedNtDeps :: (Map NontermIdent (Set NontermIdent))- _tlOinhMap :: (Map Identifier Attributes)- _tlOmanualDeps :: AttrOrderMap- _tlOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))))- _tlOoptions :: Options- _tlOrulenumber :: Int- _tlOsynMap :: (Map Identifier Attributes)- _hdIdepinfo :: NontDependencyInformation- _hdIinhMap' :: (Map Identifier Attributes)- _hdIinhmap :: (Map.Map NontermIdent Attributes)- _hdIlocalSigMap :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type)))- _hdIntDeps :: (Map NontermIdent (Set NontermIdent))- _hdIntHoDeps :: (Map NontermIdent (Set NontermIdent))- _hdIrulenumber :: Int- _hdIsynMap' :: (Map Identifier Attributes)- _hdIsynmap :: (Map.Map NontermIdent Attributes)- _tlIdepinfo :: ([NontDependencyInformation])- _tlIinhMap' :: (Map Identifier Attributes)- _tlIinhmap :: (Map.Map NontermIdent Attributes)- _tlIlocalSigMap :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type)))- _tlIntDeps :: (Map NontermIdent (Set NontermIdent))- _tlIntHoDeps :: (Map NontermIdent (Set NontermIdent))- _tlIrulenumber :: Int- _tlIsynMap' :: (Map Identifier Attributes)- _tlIsynmap :: (Map.Map NontermIdent Attributes)- -- use rule "src-ag/KWOrder.ag"(line 335, column 33)- _lhsOdepinfo =- ({-# LINE 335 "src-ag/KWOrder.ag" #-}- _hdIdepinfo : _tlIdepinfo- {-# LINE 1473 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)- _lhsOinhMap' =- ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- _hdIinhMap' `Map.union` _tlIinhMap'- {-# LINE 1479 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 370, column 33)- _lhsOinhmap =- ({-# LINE 370 "src-ag/KWOrder.ag" #-}- _hdIinhmap `Map.union` _tlIinhmap- {-# LINE 1485 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 382, column 57)- _lhsOlocalSigMap =- ({-# LINE 382 "src-ag/KWOrder.ag" #-}- _hdIlocalSigMap `Map.union` _tlIlocalSigMap- {-# LINE 1491 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 53, column 54)- _lhsOntDeps =- ({-# LINE 53 "src-ag/KWOrder.ag" #-}- _hdIntDeps `mappend` _tlIntDeps- {-# LINE 1497 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 53, column 54)- _lhsOntHoDeps =- ({-# LINE 53 "src-ag/KWOrder.ag" #-}- _hdIntHoDeps `mappend` _tlIntHoDeps- {-# LINE 1503 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)- _lhsOsynMap' =- ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- _hdIsynMap' `Map.union` _tlIsynMap'- {-# LINE 1509 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 371, column 33)- _lhsOsynmap =- ({-# LINE 371 "src-ag/KWOrder.ag" #-}- _hdIsynmap `Map.union` _tlIsynmap- {-# LINE 1515 "src-ag/KWOrder.hs" #-}- )- -- copy rule (up)- _lhsOrulenumber =- ({-# LINE 40 "src-ag/KWOrder.ag" #-}- _tlIrulenumber- {-# LINE 1521 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOaroundMap =- ({-# LINE 92 "src-ag/KWOrder.ag" #-}- _lhsIaroundMap- {-# LINE 1527 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOclassContexts =- ({-# LINE 142 "src-ag/KWOrder.ag" #-}- _lhsIclassContexts- {-# LINE 1533 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOclosedHoNtDeps =- ({-# LINE 54 "src-ag/KWOrder.ag" #-}- _lhsIclosedHoNtDeps- {-# LINE 1539 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOclosedHoNtRevDeps =- ({-# LINE 54 "src-ag/KWOrder.ag" #-}- _lhsIclosedHoNtRevDeps- {-# LINE 1545 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOclosedNtDeps =- ({-# LINE 54 "src-ag/KWOrder.ag" #-}- _lhsIclosedNtDeps- {-# LINE 1551 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 1557 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOmanualDeps =- ({-# LINE 265 "src-ag/KWOrder.ag" #-}- _lhsImanualDeps- {-# LINE 1563 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 117 "src-ag/KWOrder.ag" #-}- _lhsImergeMap- {-# LINE 1569 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 33 "src-ag/KWOrder.ag" #-}- _lhsIoptions- {-# LINE 1575 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOrulenumber =- ({-# LINE 40 "src-ag/KWOrder.ag" #-}- _lhsIrulenumber- {-# LINE 1581 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 1587 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOaroundMap =- ({-# LINE 92 "src-ag/KWOrder.ag" #-}- _lhsIaroundMap- {-# LINE 1593 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOclassContexts =- ({-# LINE 142 "src-ag/KWOrder.ag" #-}- _lhsIclassContexts- {-# LINE 1599 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOclosedHoNtDeps =- ({-# LINE 54 "src-ag/KWOrder.ag" #-}- _lhsIclosedHoNtDeps- {-# LINE 1605 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOclosedHoNtRevDeps =- ({-# LINE 54 "src-ag/KWOrder.ag" #-}- _lhsIclosedHoNtRevDeps- {-# LINE 1611 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOclosedNtDeps =- ({-# LINE 54 "src-ag/KWOrder.ag" #-}- _lhsIclosedNtDeps- {-# LINE 1617 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 1623 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOmanualDeps =- ({-# LINE 265 "src-ag/KWOrder.ag" #-}- _lhsImanualDeps- {-# LINE 1629 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 117 "src-ag/KWOrder.ag" #-}- _lhsImergeMap- {-# LINE 1635 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 33 "src-ag/KWOrder.ag" #-}- _lhsIoptions- {-# LINE 1641 "src-ag/KWOrder.hs" #-}- )- -- copy rule (chain)- _tlOrulenumber =- ({-# LINE 40 "src-ag/KWOrder.ag" #-}- _hdIrulenumber- {-# LINE 1647 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 1653 "src-ag/KWOrder.hs" #-}- )- ( _hdIdepinfo,_hdIinhMap',_hdIinhmap,_hdIlocalSigMap,_hdIntDeps,_hdIntHoDeps,_hdIrulenumber,_hdIsynMap',_hdIsynmap) =- hd_ _hdOaroundMap _hdOclassContexts _hdOclosedHoNtDeps _hdOclosedHoNtRevDeps _hdOclosedNtDeps _hdOinhMap _hdOmanualDeps _hdOmergeMap _hdOoptions _hdOrulenumber _hdOsynMap - ( _tlIdepinfo,_tlIinhMap',_tlIinhmap,_tlIlocalSigMap,_tlIntDeps,_tlIntHoDeps,_tlIrulenumber,_tlIsynMap',_tlIsynmap) =- tl_ _tlOaroundMap _tlOclassContexts _tlOclosedHoNtDeps _tlOclosedHoNtRevDeps _tlOclosedNtDeps _tlOinhMap _tlOmanualDeps _tlOmergeMap _tlOoptions _tlOrulenumber _tlOsynMap - in ( _lhsOdepinfo,_lhsOinhMap',_lhsOinhmap,_lhsOlocalSigMap,_lhsOntDeps,_lhsOntHoDeps,_lhsOrulenumber,_lhsOsynMap',_lhsOsynmap))) )-sem_Nonterminals_Nil :: T_Nonterminals -sem_Nonterminals_Nil =- (T_Nonterminals (\ _lhsIaroundMap- _lhsIclassContexts- _lhsIclosedHoNtDeps- _lhsIclosedHoNtRevDeps- _lhsIclosedNtDeps- _lhsIinhMap- _lhsImanualDeps- _lhsImergeMap- _lhsIoptions- _lhsIrulenumber- _lhsIsynMap ->- (let _lhsOdepinfo :: ([NontDependencyInformation])- _lhsOinhMap' :: (Map Identifier Attributes)- _lhsOinhmap :: (Map.Map NontermIdent Attributes)- _lhsOlocalSigMap :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type)))- _lhsOntDeps :: (Map NontermIdent (Set NontermIdent))- _lhsOntHoDeps :: (Map NontermIdent (Set NontermIdent))- _lhsOsynMap' :: (Map Identifier Attributes)- _lhsOsynmap :: (Map.Map NontermIdent Attributes)- _lhsOrulenumber :: Int- -- use rule "src-ag/KWOrder.ag"(line 335, column 33)- _lhsOdepinfo =- ({-# LINE 335 "src-ag/KWOrder.ag" #-}- []- {-# LINE 1686 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)- _lhsOinhMap' =- ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- Map.empty- {-# LINE 1692 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 370, column 33)- _lhsOinhmap =- ({-# LINE 370 "src-ag/KWOrder.ag" #-}- Map.empty- {-# LINE 1698 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 382, column 57)- _lhsOlocalSigMap =- ({-# LINE 382 "src-ag/KWOrder.ag" #-}- Map.empty- {-# LINE 1704 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 53, column 54)- _lhsOntDeps =- ({-# LINE 53 "src-ag/KWOrder.ag" #-}- mempty- {-# LINE 1710 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 53, column 54)- _lhsOntHoDeps =- ({-# LINE 53 "src-ag/KWOrder.ag" #-}- mempty- {-# LINE 1716 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)- _lhsOsynMap' =- ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- Map.empty- {-# LINE 1722 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 371, column 33)- _lhsOsynmap =- ({-# LINE 371 "src-ag/KWOrder.ag" #-}- Map.empty- {-# LINE 1728 "src-ag/KWOrder.hs" #-}- )- -- copy rule (chain)- _lhsOrulenumber =- ({-# LINE 40 "src-ag/KWOrder.ag" #-}- _lhsIrulenumber- {-# LINE 1734 "src-ag/KWOrder.hs" #-}- )- in ( _lhsOdepinfo,_lhsOinhMap',_lhsOinhmap,_lhsOlocalSigMap,_lhsOntDeps,_lhsOntHoDeps,_lhsOrulenumber,_lhsOsynMap',_lhsOsynmap))) )--- Pattern ------------------------------------------------------{-- visit 0:- synthesized attributes:- copy : SELF - vertices : Set.Set Vertex- alternatives:- alternative Alias:- child field : {Identifier}- child attr : {Identifier}- child pat : Pattern - visit 0:- local vertex : _- 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 ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) )-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 ,(Set.Set Vertex)))-data Inh_Pattern = Inh_Pattern {}-data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: Pattern ,vertices_Syn_Pattern :: (Set.Set Vertex)}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern (T_Pattern sem ) (Inh_Pattern ) =- (let ( _lhsOcopy,_lhsOvertices) = sem - in (Syn_Pattern _lhsOcopy _lhsOvertices ))-sem_Pattern_Alias :: Identifier ->- Identifier ->- T_Pattern ->- T_Pattern -sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) =- (T_Pattern (let _lhsOvertices :: (Set.Set Vertex)- _lhsOcopy :: Pattern - _patIcopy :: Pattern - _patIvertices :: (Set.Set Vertex)- -- "src-ag/KWOrder.ag"(line 204, column 12)- _vertex =- ({-# LINE 204 "src-ag/KWOrder.ag" #-}- if field_ == _INST then VChild attr_- else VAttr (if field_ == _LHS then Syn- else if field_ == _LOC then Loc- else Inh) field_ attr_- {-# LINE 1809 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 208, column 12)- _lhsOvertices =- ({-# LINE 208 "src-ag/KWOrder.ag" #-}- Set.insert _vertex _patIvertices- {-# LINE 1815 "src-ag/KWOrder.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Alias field_ attr_ _patIcopy- {-# LINE 1821 "src-ag/KWOrder.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1827 "src-ag/KWOrder.hs" #-}- )- ( _patIcopy,_patIvertices) =- pat_ - in ( _lhsOcopy,_lhsOvertices)) )-sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr name_ (T_Patterns pats_ ) =- (T_Pattern (let _lhsOvertices :: (Set.Set Vertex)- _lhsOcopy :: Pattern - _patsIcopy :: Patterns - _patsIvertices :: (Set.Set Vertex)- -- use rule "src-ag/KWOrder.ag"(line 188, column 36)- _lhsOvertices =- ({-# LINE 188 "src-ag/KWOrder.ag" #-}- _patsIvertices- {-# LINE 1844 "src-ag/KWOrder.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 1850 "src-ag/KWOrder.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1856 "src-ag/KWOrder.hs" #-}- )- ( _patsIcopy,_patsIvertices) =- pats_ - in ( _lhsOcopy,_lhsOvertices)) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable (T_Pattern pat_ ) =- (T_Pattern (let _lhsOvertices :: (Set.Set Vertex)- _lhsOcopy :: Pattern - _patIcopy :: Pattern - _patIvertices :: (Set.Set Vertex)- -- use rule "src-ag/KWOrder.ag"(line 188, column 36)- _lhsOvertices =- ({-# LINE 188 "src-ag/KWOrder.ag" #-}- _patIvertices- {-# LINE 1872 "src-ag/KWOrder.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 1878 "src-ag/KWOrder.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1884 "src-ag/KWOrder.hs" #-}- )- ( _patIcopy,_patIvertices) =- pat_ - in ( _lhsOcopy,_lhsOvertices)) )-sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product pos_ (T_Patterns pats_ ) =- (T_Pattern (let _lhsOvertices :: (Set.Set Vertex)- _lhsOcopy :: Pattern - _patsIcopy :: Patterns - _patsIvertices :: (Set.Set Vertex)- -- use rule "src-ag/KWOrder.ag"(line 188, column 36)- _lhsOvertices =- ({-# LINE 188 "src-ag/KWOrder.ag" #-}- _patsIvertices- {-# LINE 1901 "src-ag/KWOrder.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 1907 "src-ag/KWOrder.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1913 "src-ag/KWOrder.hs" #-}- )- ( _patsIcopy,_patsIvertices) =- pats_ - in ( _lhsOcopy,_lhsOvertices)) )-sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore pos_ =- (T_Pattern (let _lhsOvertices :: (Set.Set Vertex)- _lhsOcopy :: Pattern - -- use rule "src-ag/KWOrder.ag"(line 188, column 36)- _lhsOvertices =- ({-# LINE 188 "src-ag/KWOrder.ag" #-}- Set.empty- {-# LINE 1927 "src-ag/KWOrder.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Underscore pos_- {-# LINE 1933 "src-ag/KWOrder.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1939 "src-ag/KWOrder.hs" #-}- )- in ( _lhsOcopy,_lhsOvertices)) )--- Patterns -----------------------------------------------------{-- visit 0:- synthesized attributes:- copy : SELF - vertices : Set.Set Vertex- 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 ,(Set.Set Vertex)))-data Inh_Patterns = Inh_Patterns {}-data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: Patterns ,vertices_Syn_Patterns :: (Set.Set Vertex)}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns (T_Patterns sem ) (Inh_Patterns ) =- (let ( _lhsOcopy,_lhsOvertices) = sem - in (Syn_Patterns _lhsOcopy _lhsOvertices ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) =- (T_Patterns (let _lhsOvertices :: (Set.Set Vertex)- _lhsOcopy :: Patterns - _hdIcopy :: Pattern - _hdIvertices :: (Set.Set Vertex)- _tlIcopy :: Patterns - _tlIvertices :: (Set.Set Vertex)- -- use rule "src-ag/KWOrder.ag"(line 188, column 36)- _lhsOvertices =- ({-# LINE 188 "src-ag/KWOrder.ag" #-}- _hdIvertices `Set.union` _tlIvertices- {-# LINE 1987 "src-ag/KWOrder.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 1993 "src-ag/KWOrder.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1999 "src-ag/KWOrder.hs" #-}- )- ( _hdIcopy,_hdIvertices) =- hd_ - ( _tlIcopy,_tlIvertices) =- tl_ - in ( _lhsOcopy,_lhsOvertices)) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =- (T_Patterns (let _lhsOvertices :: (Set.Set Vertex)- _lhsOcopy :: Patterns - -- use rule "src-ag/KWOrder.ag"(line 188, column 36)- _lhsOvertices =- ({-# LINE 188 "src-ag/KWOrder.ag" #-}- Set.empty- {-# LINE 2014 "src-ag/KWOrder.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- []- {-# LINE 2020 "src-ag/KWOrder.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 2026 "src-ag/KWOrder.hs" #-}- )- in ( _lhsOcopy,_lhsOvertices)) )--- Production ---------------------------------------------------{-- visit 0:- inherited attributes:- aroundMap : Map ConstructorIdent (Map Identifier [Expression])- inhMap : Map Identifier Attributes- manualDeps : Map ConstructorIdent (Set Dependency)- mergeMap : Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))- options : Options- synMap : Map Identifier Attributes- chained attribute:- rulenumber : Int- synthesized attributes:- depgraph : ProdDependencyGraph- localSigMap : Map.Map ConstructorIdent (Map.Map Identifier Type)- refHoNts : Set NontermIdent- refNts : Set NontermIdent- alternatives:- alternative Production:- child con : {ConstructorIdent}- child params : {[Identifier]}- child constraints : {[Type]}- child children : Children - child rules : Rules - child typeSigs : TypeSigs - child macro : {MaybeMacro}- visit 0:- local aroundMap : _- local mergeMap : _- local mergedChildren : _- local vertices : _- local manualDeps : _- local manualEdges : _- local edges : _--}--- cata-sem_Production :: Production ->- T_Production -sem_Production (Production _con _params _constraints _children _rules _typeSigs _macro ) =- (sem_Production_Production _con _params _constraints (sem_Children _children ) (sem_Rules _rules ) (sem_TypeSigs _typeSigs ) _macro )--- semantic domain-newtype T_Production = T_Production ((Map ConstructorIdent (Map Identifier [Expression])) ->- (Map Identifier Attributes) ->- (Map ConstructorIdent (Set Dependency)) ->- (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))) ->- Options ->- Int ->- (Map Identifier Attributes) ->- ( ProdDependencyGraph,(Map.Map ConstructorIdent (Map.Map Identifier Type)),(Set NontermIdent),(Set NontermIdent),Int))-data Inh_Production = Inh_Production {aroundMap_Inh_Production :: (Map ConstructorIdent (Map Identifier [Expression])),inhMap_Inh_Production :: (Map Identifier Attributes),manualDeps_Inh_Production :: (Map ConstructorIdent (Set Dependency)),mergeMap_Inh_Production :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))),options_Inh_Production :: Options,rulenumber_Inh_Production :: Int,synMap_Inh_Production :: (Map Identifier Attributes)}-data Syn_Production = Syn_Production {depgraph_Syn_Production :: ProdDependencyGraph,localSigMap_Syn_Production :: (Map.Map ConstructorIdent (Map.Map Identifier Type)),refHoNts_Syn_Production :: (Set NontermIdent),refNts_Syn_Production :: (Set NontermIdent),rulenumber_Syn_Production :: Int}-wrap_Production :: T_Production ->- Inh_Production ->- Syn_Production -wrap_Production (T_Production sem ) (Inh_Production _lhsIaroundMap _lhsIinhMap _lhsImanualDeps _lhsImergeMap _lhsIoptions _lhsIrulenumber _lhsIsynMap ) =- (let ( _lhsOdepgraph,_lhsOlocalSigMap,_lhsOrefHoNts,_lhsOrefNts,_lhsOrulenumber) = sem _lhsIaroundMap _lhsIinhMap _lhsImanualDeps _lhsImergeMap _lhsIoptions _lhsIrulenumber _lhsIsynMap - in (Syn_Production _lhsOdepgraph _lhsOlocalSigMap _lhsOrefHoNts _lhsOrefNts _lhsOrulenumber ))-sem_Production_Production :: ConstructorIdent ->- ([Identifier]) ->- ([Type]) ->- T_Children ->- T_Rules ->- T_TypeSigs ->- MaybeMacro ->- T_Production -sem_Production_Production con_ params_ constraints_ (T_Children children_ ) (T_Rules rules_ ) (T_TypeSigs typeSigs_ ) macro_ =- (T_Production (\ _lhsIaroundMap- _lhsIinhMap- _lhsImanualDeps- _lhsImergeMap- _lhsIoptions- _lhsIrulenumber- _lhsIsynMap ->- (let _lhsOdepgraph :: ProdDependencyGraph- _lhsOlocalSigMap :: (Map.Map ConstructorIdent (Map.Map Identifier Type))- _lhsOrefHoNts :: (Set NontermIdent)- _lhsOrefNts :: (Set NontermIdent)- _lhsOrulenumber :: Int- _childrenOaroundMap :: (Map Identifier [Expression])- _childrenOinhMap :: (Map Identifier Attributes)- _childrenOmergeMap :: (Map Identifier (Identifier, [Identifier], Expression))- _childrenOmergedChildren :: (Set Identifier)- _childrenOoptions :: Options- _childrenOsynMap :: (Map Identifier Attributes)- _rulesOrulenumber :: Int- _childrenIechilds :: EChildren- _childrenIedges :: (Set.Set Edge)- _childrenInontnames :: ([(Identifier, Identifier)])- _childrenIrefHoNts :: (Set NontermIdent)- _childrenIrefNts :: (Set NontermIdent)- _childrenIvertices :: (Set.Set Vertex)- _rulesIedges :: (Set.Set Edge)- _rulesIerules :: ERules- _rulesIrulenumber :: Int- _rulesIvertices :: (Set.Set Vertex)- _typeSigsIlocalSigMap :: (Map Identifier Type)- -- "src-ag/KWOrder.ag"(line 101, column 32)- _aroundMap =- ({-# LINE 101 "src-ag/KWOrder.ag" #-}- Map.findWithDefault Map.empty con_ _lhsIaroundMap- {-# LINE 2129 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 126, column 32)- _mergeMap =- ({-# LINE 126 "src-ag/KWOrder.ag" #-}- Map.findWithDefault Map.empty con_ _lhsImergeMap- {-# LINE 2135 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 132, column 3)- _mergedChildren =- ({-# LINE 132 "src-ag/KWOrder.ag" #-}- Set.unions [ Set.fromList ms | (_,ms,_) <- Map.elems _mergeMap ]- {-# LINE 2141 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 228, column 17)- _vertices =- ({-# LINE 228 "src-ag/KWOrder.ag" #-}- _rulesIvertices `Set.union` _childrenIvertices- {-# LINE 2147 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 271, column 3)- _manualDeps =- ({-# LINE 271 "src-ag/KWOrder.ag" #-}- Map.findWithDefault Set.empty con_ _lhsImanualDeps- {-# LINE 2153 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 272, column 3)- _manualEdges =- ({-# LINE 272 "src-ag/KWOrder.ag" #-}- Set.map depToEdge _manualDeps- {-# LINE 2159 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 294, column 17)- _edges =- ({-# LINE 294 "src-ag/KWOrder.ag" #-}- _rulesIedges `Set.union` _childrenIedges- {-# LINE 2165 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 309, column 17)- _lhsOdepgraph =- ({-# LINE 309 "src-ag/KWOrder.ag" #-}- ProdDependencyGraph { pdgVertices = Set.toList _vertices- , pdgEdges = Set.toList _edges- , pdgRules = _rulesIerules- , pdgChilds = _childrenIechilds- , pdgProduction = con_- , pdgChildMap = _childrenInontnames- , pdgConstraints = constraints_- , pdgParams = params_ }- {-# LINE 2178 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 387, column 32)- _lhsOlocalSigMap =- ({-# LINE 387 "src-ag/KWOrder.ag" #-}- Map.singleton con_ _typeSigsIlocalSigMap- {-# LINE 2184 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 55, column 67)- _lhsOrefHoNts =- ({-# LINE 55 "src-ag/KWOrder.ag" #-}- _childrenIrefHoNts- {-# LINE 2190 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 55, column 67)- _lhsOrefNts =- ({-# LINE 55 "src-ag/KWOrder.ag" #-}- _childrenIrefNts- {-# LINE 2196 "src-ag/KWOrder.hs" #-}- )- -- copy rule (up)- _lhsOrulenumber =- ({-# LINE 40 "src-ag/KWOrder.ag" #-}- _rulesIrulenumber- {-# LINE 2202 "src-ag/KWOrder.hs" #-}- )- -- copy rule (from local)- _childrenOaroundMap =- ({-# LINE 98 "src-ag/KWOrder.ag" #-}- _aroundMap- {-# LINE 2208 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _childrenOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 2214 "src-ag/KWOrder.hs" #-}- )- -- copy rule (from local)- _childrenOmergeMap =- ({-# LINE 123 "src-ag/KWOrder.ag" #-}- _mergeMap- {-# LINE 2220 "src-ag/KWOrder.hs" #-}- )- -- copy rule (from local)- _childrenOmergedChildren =- ({-# LINE 123 "src-ag/KWOrder.ag" #-}- _mergedChildren- {-# LINE 2226 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _childrenOoptions =- ({-# LINE 33 "src-ag/KWOrder.ag" #-}- _lhsIoptions- {-# LINE 2232 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _childrenOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 2238 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _rulesOrulenumber =- ({-# LINE 40 "src-ag/KWOrder.ag" #-}- _lhsIrulenumber- {-# LINE 2244 "src-ag/KWOrder.hs" #-}- )- ( _childrenIechilds,_childrenIedges,_childrenInontnames,_childrenIrefHoNts,_childrenIrefNts,_childrenIvertices) =- children_ _childrenOaroundMap _childrenOinhMap _childrenOmergeMap _childrenOmergedChildren _childrenOoptions _childrenOsynMap - ( _rulesIedges,_rulesIerules,_rulesIrulenumber,_rulesIvertices) =- rules_ _rulesOrulenumber - ( _typeSigsIlocalSigMap) =- typeSigs_ - in ( _lhsOdepgraph,_lhsOlocalSigMap,_lhsOrefHoNts,_lhsOrefNts,_lhsOrulenumber))) )--- Productions --------------------------------------------------{-- visit 0:- inherited attributes:- aroundMap : Map ConstructorIdent (Map Identifier [Expression])- inhMap : Map Identifier Attributes- manualDeps : Map ConstructorIdent (Set Dependency)- mergeMap : Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))- options : Options- synMap : Map Identifier Attributes- chained attribute:- rulenumber : Int- synthesized attributes:- depgraph : [ProdDependencyGraph]- localSigMap : Map.Map ConstructorIdent (Map.Map Identifier Type)- refHoNts : Set NontermIdent- refNts : Set NontermIdent- alternatives:- alternative Cons:- child hd : Production - child tl : Productions - alternative Nil:--}--- cata-sem_Productions :: Productions ->- T_Productions -sem_Productions list =- (Prelude.foldr sem_Productions_Cons sem_Productions_Nil (Prelude.map sem_Production list) )--- semantic domain-newtype T_Productions = T_Productions ((Map ConstructorIdent (Map Identifier [Expression])) ->- (Map Identifier Attributes) ->- (Map ConstructorIdent (Set Dependency)) ->- (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))) ->- Options ->- Int ->- (Map Identifier Attributes) ->- ( ([ProdDependencyGraph]),(Map.Map ConstructorIdent (Map.Map Identifier Type)),(Set NontermIdent),(Set NontermIdent),Int))-data Inh_Productions = Inh_Productions {aroundMap_Inh_Productions :: (Map ConstructorIdent (Map Identifier [Expression])),inhMap_Inh_Productions :: (Map Identifier Attributes),manualDeps_Inh_Productions :: (Map ConstructorIdent (Set Dependency)),mergeMap_Inh_Productions :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))),options_Inh_Productions :: Options,rulenumber_Inh_Productions :: Int,synMap_Inh_Productions :: (Map Identifier Attributes)}-data Syn_Productions = Syn_Productions {depgraph_Syn_Productions :: ([ProdDependencyGraph]),localSigMap_Syn_Productions :: (Map.Map ConstructorIdent (Map.Map Identifier Type)),refHoNts_Syn_Productions :: (Set NontermIdent),refNts_Syn_Productions :: (Set NontermIdent),rulenumber_Syn_Productions :: Int}-wrap_Productions :: T_Productions ->- Inh_Productions ->- Syn_Productions -wrap_Productions (T_Productions sem ) (Inh_Productions _lhsIaroundMap _lhsIinhMap _lhsImanualDeps _lhsImergeMap _lhsIoptions _lhsIrulenumber _lhsIsynMap ) =- (let ( _lhsOdepgraph,_lhsOlocalSigMap,_lhsOrefHoNts,_lhsOrefNts,_lhsOrulenumber) = sem _lhsIaroundMap _lhsIinhMap _lhsImanualDeps _lhsImergeMap _lhsIoptions _lhsIrulenumber _lhsIsynMap - in (Syn_Productions _lhsOdepgraph _lhsOlocalSigMap _lhsOrefHoNts _lhsOrefNts _lhsOrulenumber ))-sem_Productions_Cons :: T_Production ->- T_Productions ->- T_Productions -sem_Productions_Cons (T_Production hd_ ) (T_Productions tl_ ) =- (T_Productions (\ _lhsIaroundMap- _lhsIinhMap- _lhsImanualDeps- _lhsImergeMap- _lhsIoptions- _lhsIrulenumber- _lhsIsynMap ->- (let _lhsOdepgraph :: ([ProdDependencyGraph])- _lhsOlocalSigMap :: (Map.Map ConstructorIdent (Map.Map Identifier Type))- _lhsOrefHoNts :: (Set NontermIdent)- _lhsOrefNts :: (Set NontermIdent)- _lhsOrulenumber :: Int- _hdOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))- _hdOinhMap :: (Map Identifier Attributes)- _hdOmanualDeps :: (Map ConstructorIdent (Set Dependency))- _hdOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))- _hdOoptions :: Options- _hdOrulenumber :: Int- _hdOsynMap :: (Map Identifier Attributes)- _tlOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))- _tlOinhMap :: (Map Identifier Attributes)- _tlOmanualDeps :: (Map ConstructorIdent (Set Dependency))- _tlOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))- _tlOoptions :: Options- _tlOrulenumber :: Int- _tlOsynMap :: (Map Identifier Attributes)- _hdIdepgraph :: ProdDependencyGraph- _hdIlocalSigMap :: (Map.Map ConstructorIdent (Map.Map Identifier Type))- _hdIrefHoNts :: (Set NontermIdent)- _hdIrefNts :: (Set NontermIdent)- _hdIrulenumber :: Int- _tlIdepgraph :: ([ProdDependencyGraph])- _tlIlocalSigMap :: (Map.Map ConstructorIdent (Map.Map Identifier Type))- _tlIrefHoNts :: (Set NontermIdent)- _tlIrefNts :: (Set NontermIdent)- _tlIrulenumber :: Int- -- use rule "src-ag/KWOrder.ag"(line 306, column 33)- _lhsOdepgraph =- ({-# LINE 306 "src-ag/KWOrder.ag" #-}- _hdIdepgraph : _tlIdepgraph- {-# LINE 2342 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 383, column 57)- _lhsOlocalSigMap =- ({-# LINE 383 "src-ag/KWOrder.ag" #-}- _hdIlocalSigMap `Map.union` _tlIlocalSigMap- {-# LINE 2348 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 55, column 67)- _lhsOrefHoNts =- ({-# LINE 55 "src-ag/KWOrder.ag" #-}- _hdIrefHoNts `mappend` _tlIrefHoNts- {-# LINE 2354 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 55, column 67)- _lhsOrefNts =- ({-# LINE 55 "src-ag/KWOrder.ag" #-}- _hdIrefNts `mappend` _tlIrefNts- {-# LINE 2360 "src-ag/KWOrder.hs" #-}- )- -- copy rule (up)- _lhsOrulenumber =- ({-# LINE 40 "src-ag/KWOrder.ag" #-}- _tlIrulenumber- {-# LINE 2366 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOaroundMap =- ({-# LINE 95 "src-ag/KWOrder.ag" #-}- _lhsIaroundMap- {-# LINE 2372 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 2378 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOmanualDeps =- ({-# LINE 266 "src-ag/KWOrder.ag" #-}- _lhsImanualDeps- {-# LINE 2384 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 120 "src-ag/KWOrder.ag" #-}- _lhsImergeMap- {-# LINE 2390 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 33 "src-ag/KWOrder.ag" #-}- _lhsIoptions- {-# LINE 2396 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOrulenumber =- ({-# LINE 40 "src-ag/KWOrder.ag" #-}- _lhsIrulenumber- {-# LINE 2402 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 2408 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOaroundMap =- ({-# LINE 95 "src-ag/KWOrder.ag" #-}- _lhsIaroundMap- {-# LINE 2414 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 2420 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOmanualDeps =- ({-# LINE 266 "src-ag/KWOrder.ag" #-}- _lhsImanualDeps- {-# LINE 2426 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 120 "src-ag/KWOrder.ag" #-}- _lhsImergeMap- {-# LINE 2432 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 33 "src-ag/KWOrder.ag" #-}- _lhsIoptions- {-# LINE 2438 "src-ag/KWOrder.hs" #-}- )- -- copy rule (chain)- _tlOrulenumber =- ({-# LINE 40 "src-ag/KWOrder.ag" #-}- _hdIrulenumber- {-# LINE 2444 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _tlOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 2450 "src-ag/KWOrder.hs" #-}- )- ( _hdIdepgraph,_hdIlocalSigMap,_hdIrefHoNts,_hdIrefNts,_hdIrulenumber) =- hd_ _hdOaroundMap _hdOinhMap _hdOmanualDeps _hdOmergeMap _hdOoptions _hdOrulenumber _hdOsynMap - ( _tlIdepgraph,_tlIlocalSigMap,_tlIrefHoNts,_tlIrefNts,_tlIrulenumber) =- tl_ _tlOaroundMap _tlOinhMap _tlOmanualDeps _tlOmergeMap _tlOoptions _tlOrulenumber _tlOsynMap - in ( _lhsOdepgraph,_lhsOlocalSigMap,_lhsOrefHoNts,_lhsOrefNts,_lhsOrulenumber))) )-sem_Productions_Nil :: T_Productions -sem_Productions_Nil =- (T_Productions (\ _lhsIaroundMap- _lhsIinhMap- _lhsImanualDeps- _lhsImergeMap- _lhsIoptions- _lhsIrulenumber- _lhsIsynMap ->- (let _lhsOdepgraph :: ([ProdDependencyGraph])- _lhsOlocalSigMap :: (Map.Map ConstructorIdent (Map.Map Identifier Type))- _lhsOrefHoNts :: (Set NontermIdent)- _lhsOrefNts :: (Set NontermIdent)- _lhsOrulenumber :: Int- -- use rule "src-ag/KWOrder.ag"(line 306, column 33)- _lhsOdepgraph =- ({-# LINE 306 "src-ag/KWOrder.ag" #-}- []- {-# LINE 2475 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 383, column 57)- _lhsOlocalSigMap =- ({-# LINE 383 "src-ag/KWOrder.ag" #-}- Map.empty- {-# LINE 2481 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 55, column 67)- _lhsOrefHoNts =- ({-# LINE 55 "src-ag/KWOrder.ag" #-}- mempty- {-# LINE 2487 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 55, column 67)- _lhsOrefNts =- ({-# LINE 55 "src-ag/KWOrder.ag" #-}- mempty- {-# LINE 2493 "src-ag/KWOrder.hs" #-}- )- -- copy rule (chain)- _lhsOrulenumber =- ({-# LINE 40 "src-ag/KWOrder.ag" #-}- _lhsIrulenumber- {-# LINE 2499 "src-ag/KWOrder.hs" #-}- )- in ( _lhsOdepgraph,_lhsOlocalSigMap,_lhsOrefHoNts,_lhsOrefNts,_lhsOrulenumber))) )--- Rule ---------------------------------------------------------{-- visit 0:- chained attribute:- rulenumber : Int- synthesized attributes:- edges : Set.Set Edge- erules : ERule- vertices : Set.Set Vertex- alternatives:- alternative Rule:- child mbName : {Maybe Identifier}- child pattern : Pattern - child rhs : Expression - child owrt : {Bool}- child origin : {String}- child explicit : {Bool}- child pure : {Bool}- child identity : {Bool}- child mbError : {Maybe Error}- child eager : {Bool}- visit 0:- local rulename : _- local vertex : _- local edgesout : _- local edgesin : _--}--- cata-sem_Rule :: Rule ->- T_Rule -sem_Rule (Rule _mbName _pattern _rhs _owrt _origin _explicit _pure _identity _mbError _eager ) =- (sem_Rule_Rule _mbName (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin _explicit _pure _identity _mbError _eager )--- semantic domain-newtype T_Rule = T_Rule (Int ->- ( (Set.Set Edge),ERule,Int,(Set.Set Vertex)))-data Inh_Rule = Inh_Rule {rulenumber_Inh_Rule :: Int}-data Syn_Rule = Syn_Rule {edges_Syn_Rule :: (Set.Set Edge),erules_Syn_Rule :: ERule,rulenumber_Syn_Rule :: Int,vertices_Syn_Rule :: (Set.Set Vertex)}-wrap_Rule :: T_Rule ->- Inh_Rule ->- Syn_Rule -wrap_Rule (T_Rule sem ) (Inh_Rule _lhsIrulenumber ) =- (let ( _lhsOedges,_lhsOerules,_lhsOrulenumber,_lhsOvertices) = sem _lhsIrulenumber - in (Syn_Rule _lhsOedges _lhsOerules _lhsOrulenumber _lhsOvertices ))-sem_Rule_Rule :: (Maybe Identifier) ->- T_Pattern ->- T_Expression ->- Bool ->- String ->- Bool ->- Bool ->- Bool ->- (Maybe Error) ->- Bool ->- T_Rule -sem_Rule_Rule mbName_ (T_Pattern pattern_ ) (T_Expression rhs_ ) owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_ =- (T_Rule (\ _lhsIrulenumber ->- (let _lhsOrulenumber :: Int- _lhsOerules :: ERule- _lhsOvertices :: (Set.Set Vertex)- _lhsOedges :: (Set.Set Edge)- _patternIcopy :: Pattern - _patternIvertices :: (Set.Set Vertex)- _rhsIcopy :: Expression - _rhsIvertices :: (Set.Set Vertex)- -- "src-ag/KWOrder.ag"(line 46, column 11)- _lhsOrulenumber =- ({-# LINE 46 "src-ag/KWOrder.ag" #-}- _lhsIrulenumber + 1- {-# LINE 2570 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 47, column 11)- _rulename =- ({-# LINE 47 "src-ag/KWOrder.ag" #-}- maybe (identifier $ "rule" ++ show _lhsIrulenumber) id mbName_- {-# LINE 2576 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 159, column 10)- _lhsOerules =- ({-# LINE 159 "src-ag/KWOrder.ag" #-}- ERule _rulename- _patternIcopy- _rhsIcopy- owrt_- origin_- explicit_- pure_- mbError_- {-# LINE 2589 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 223, column 11)- _vertex =- ({-# LINE 223 "src-ag/KWOrder.ag" #-}- VRule _rulename- {-# LINE 2595 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 224, column 11)- _lhsOvertices =- ({-# LINE 224 "src-ag/KWOrder.ag" #-}- Set.insert _vertex $ _patternIvertices `Set.union` _rhsIvertices- {-# LINE 2601 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 236, column 11)- _edgesout =- ({-# LINE 236 "src-ag/KWOrder.ag" #-}- map ((,) _vertex ) (Set.toList _rhsIvertices)- {-# LINE 2607 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 237, column 11)- _edgesin =- ({-# LINE 237 "src-ag/KWOrder.ag" #-}- map (flip (,) _vertex ) (Set.toList _patternIvertices)- {-# LINE 2613 "src-ag/KWOrder.hs" #-}- )- -- "src-ag/KWOrder.ag"(line 238, column 11)- _lhsOedges =- ({-# LINE 238 "src-ag/KWOrder.ag" #-}- Set.fromList $ _edgesout ++ _edgesin- {-# LINE 2619 "src-ag/KWOrder.hs" #-}- )- ( _patternIcopy,_patternIvertices) =- pattern_ - ( _rhsIcopy,_rhsIvertices) =- rhs_ - in ( _lhsOedges,_lhsOerules,_lhsOrulenumber,_lhsOvertices))) )--- Rules --------------------------------------------------------{-- visit 0:- chained attribute:- rulenumber : Int- synthesized attributes:- edges : Set.Set Edge- erules : ERules- vertices : Set.Set Vertex- alternatives:- alternative Cons:- child hd : Rule - child tl : Rules - alternative Nil:--}--- cata-sem_Rules :: Rules ->- T_Rules -sem_Rules list =- (Prelude.foldr sem_Rules_Cons sem_Rules_Nil (Prelude.map sem_Rule list) )--- semantic domain-newtype T_Rules = T_Rules (Int ->- ( (Set.Set Edge),ERules,Int,(Set.Set Vertex)))-data Inh_Rules = Inh_Rules {rulenumber_Inh_Rules :: Int}-data Syn_Rules = Syn_Rules {edges_Syn_Rules :: (Set.Set Edge),erules_Syn_Rules :: ERules,rulenumber_Syn_Rules :: Int,vertices_Syn_Rules :: (Set.Set Vertex)}-wrap_Rules :: T_Rules ->- Inh_Rules ->- Syn_Rules -wrap_Rules (T_Rules sem ) (Inh_Rules _lhsIrulenumber ) =- (let ( _lhsOedges,_lhsOerules,_lhsOrulenumber,_lhsOvertices) = sem _lhsIrulenumber - in (Syn_Rules _lhsOedges _lhsOerules _lhsOrulenumber _lhsOvertices ))-sem_Rules_Cons :: T_Rule ->- T_Rules ->- T_Rules -sem_Rules_Cons (T_Rule hd_ ) (T_Rules tl_ ) =- (T_Rules (\ _lhsIrulenumber ->- (let _lhsOedges :: (Set.Set Edge)- _lhsOerules :: ERules- _lhsOvertices :: (Set.Set Vertex)- _lhsOrulenumber :: Int- _hdOrulenumber :: Int- _tlOrulenumber :: Int- _hdIedges :: (Set.Set Edge)- _hdIerules :: ERule- _hdIrulenumber :: Int- _hdIvertices :: (Set.Set Vertex)- _tlIedges :: (Set.Set Edge)- _tlIerules :: ERules- _tlIrulenumber :: Int- _tlIvertices :: (Set.Set Vertex)- -- use rule "src-ag/KWOrder.ag"(line 232, column 33)- _lhsOedges =- ({-# LINE 232 "src-ag/KWOrder.ag" #-}- _hdIedges `Set.union` _tlIedges- {-# LINE 2680 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 156, column 25)- _lhsOerules =- ({-# LINE 156 "src-ag/KWOrder.ag" #-}- _hdIerules : _tlIerules- {-# LINE 2686 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 188, column 36)- _lhsOvertices =- ({-# LINE 188 "src-ag/KWOrder.ag" #-}- _hdIvertices `Set.union` _tlIvertices- {-# LINE 2692 "src-ag/KWOrder.hs" #-}- )- -- copy rule (up)- _lhsOrulenumber =- ({-# LINE 40 "src-ag/KWOrder.ag" #-}- _tlIrulenumber- {-# LINE 2698 "src-ag/KWOrder.hs" #-}- )- -- copy rule (down)- _hdOrulenumber =- ({-# LINE 40 "src-ag/KWOrder.ag" #-}- _lhsIrulenumber- {-# LINE 2704 "src-ag/KWOrder.hs" #-}- )- -- copy rule (chain)- _tlOrulenumber =- ({-# LINE 40 "src-ag/KWOrder.ag" #-}- _hdIrulenumber- {-# LINE 2710 "src-ag/KWOrder.hs" #-}- )- ( _hdIedges,_hdIerules,_hdIrulenumber,_hdIvertices) =- hd_ _hdOrulenumber - ( _tlIedges,_tlIerules,_tlIrulenumber,_tlIvertices) =- tl_ _tlOrulenumber - in ( _lhsOedges,_lhsOerules,_lhsOrulenumber,_lhsOvertices))) )-sem_Rules_Nil :: T_Rules -sem_Rules_Nil =- (T_Rules (\ _lhsIrulenumber ->- (let _lhsOedges :: (Set.Set Edge)- _lhsOerules :: ERules- _lhsOvertices :: (Set.Set Vertex)- _lhsOrulenumber :: Int- -- use rule "src-ag/KWOrder.ag"(line 232, column 33)- _lhsOedges =- ({-# LINE 232 "src-ag/KWOrder.ag" #-}- Set.empty- {-# LINE 2728 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 156, column 25)- _lhsOerules =- ({-# LINE 156 "src-ag/KWOrder.ag" #-}- []- {-# LINE 2734 "src-ag/KWOrder.hs" #-}- )- -- use rule "src-ag/KWOrder.ag"(line 188, column 36)- _lhsOvertices =- ({-# LINE 188 "src-ag/KWOrder.ag" #-}- Set.empty- {-# LINE 2740 "src-ag/KWOrder.hs" #-}- )- -- copy rule (chain)- _lhsOrulenumber =- ({-# LINE 40 "src-ag/KWOrder.ag" #-}- _lhsIrulenumber- {-# LINE 2746 "src-ag/KWOrder.hs" #-}- )- in ( _lhsOedges,_lhsOerules,_lhsOrulenumber,_lhsOvertices))) )--- TypeSig ------------------------------------------------------{-- visit 0:- synthesized attribute:- localSigMap : Map Identifier Type- alternatives:- alternative TypeSig:- child name : {Identifier}- child tp : {Type}--}--- cata-sem_TypeSig :: TypeSig ->- T_TypeSig -sem_TypeSig (TypeSig _name _tp ) =- (sem_TypeSig_TypeSig _name _tp )--- semantic domain-newtype T_TypeSig = T_TypeSig (( (Map Identifier Type)))-data Inh_TypeSig = Inh_TypeSig {}-data Syn_TypeSig = Syn_TypeSig {localSigMap_Syn_TypeSig :: (Map Identifier Type)}-wrap_TypeSig :: T_TypeSig ->- Inh_TypeSig ->- Syn_TypeSig -wrap_TypeSig (T_TypeSig sem ) (Inh_TypeSig ) =- (let ( _lhsOlocalSigMap) = sem - in (Syn_TypeSig _lhsOlocalSigMap ))-sem_TypeSig_TypeSig :: Identifier ->- Type ->- T_TypeSig -sem_TypeSig_TypeSig name_ tp_ =- (T_TypeSig (let _lhsOlocalSigMap :: (Map Identifier Type)- -- "src-ag/KWOrder.ag"(line 388, column 32)- _lhsOlocalSigMap =- ({-# LINE 388 "src-ag/KWOrder.ag" #-}- Map.singleton name_ tp_- {-# LINE 2783 "src-ag/KWOrder.hs" #-}- )- in ( _lhsOlocalSigMap)) )--- TypeSigs -----------------------------------------------------{-- visit 0:- synthesized attribute:- localSigMap : Map Identifier Type- alternatives:- alternative Cons:- child hd : TypeSig - child tl : TypeSigs - alternative Nil:--}--- cata-sem_TypeSigs :: TypeSigs ->- T_TypeSigs -sem_TypeSigs list =- (Prelude.foldr sem_TypeSigs_Cons sem_TypeSigs_Nil (Prelude.map sem_TypeSig list) )--- semantic domain-newtype T_TypeSigs = T_TypeSigs (( (Map Identifier Type)))-data Inh_TypeSigs = Inh_TypeSigs {}-data Syn_TypeSigs = Syn_TypeSigs {localSigMap_Syn_TypeSigs :: (Map Identifier Type)}-wrap_TypeSigs :: T_TypeSigs ->- Inh_TypeSigs ->- Syn_TypeSigs -wrap_TypeSigs (T_TypeSigs sem ) (Inh_TypeSigs ) =- (let ( _lhsOlocalSigMap) = sem - in (Syn_TypeSigs _lhsOlocalSigMap ))-sem_TypeSigs_Cons :: T_TypeSig ->- T_TypeSigs ->- T_TypeSigs -sem_TypeSigs_Cons (T_TypeSig hd_ ) (T_TypeSigs tl_ ) =- (T_TypeSigs (let _lhsOlocalSigMap :: (Map Identifier Type)- _hdIlocalSigMap :: (Map Identifier Type)- _tlIlocalSigMap :: (Map Identifier Type)- -- use rule "src-ag/KWOrder.ag"(line 384, column 57)- _lhsOlocalSigMap =- ({-# LINE 384 "src-ag/KWOrder.ag" #-}- _hdIlocalSigMap `Map.union` _tlIlocalSigMap- {-# LINE 2823 "src-ag/KWOrder.hs" #-}- )- ( _hdIlocalSigMap) =- hd_ - ( _tlIlocalSigMap) =- tl_ - in ( _lhsOlocalSigMap)) )-sem_TypeSigs_Nil :: T_TypeSigs -sem_TypeSigs_Nil =- (T_TypeSigs (let _lhsOlocalSigMap :: (Map Identifier Type)- -- use rule "src-ag/KWOrder.ag"(line 384, column 57)- _lhsOlocalSigMap =- ({-# LINE 384 "src-ag/KWOrder.ag" #-}- Map.empty- {-# LINE 2837 "src-ag/KWOrder.hs" #-}- )- in ( _lhsOlocalSigMap)) )+-- UUAGC 0.9.40.1 (src-ag/KWOrder.ag)+module KWOrder where+{-# LINE 8 "src-ag/KWOrder.ag" #-}++import AbstractSyntax+import HsToken+import Expression+import Patterns+import Options+import PPUtil+import Pretty+import Knuth1+import KennedyWarren+import ExecutionPlan+import Data.Maybe+import Debug.Trace+import Data.Set(Set)+import Data.Map(Map)+import Data.Sequence(Seq)+import qualified Data.Set as Set+import qualified Data.Map as Map+import qualified Data.Sequence as Seq+import Data.Monoid(mappend,mempty)+{-# LINE 27 "dist/build/KWOrder.hs" #-}++{-# LINE 2 "src-ag/AbstractSyntax.ag" #-}++-- AbstractSyntax.ag imports+import Data.Set(Set)+import Data.Map(Map)+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import Macro --marcos+import CommonTypes+import ErrorMessages+{-# LINE 39 "dist/build/KWOrder.hs" #-}++{-# LINE 2 "src-ag/HsToken.ag" #-}++import CommonTypes+import UU.Scanner.Position(Pos)+{-# LINE 45 "dist/build/KWOrder.hs" #-}++{-# LINE 2 "src-ag/Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken+{-# LINE 51 "dist/build/KWOrder.hs" #-}++{-# LINE 2 "src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 58 "dist/build/KWOrder.hs" #-}+{-# LINE 275 "src-ag/KWOrder.ag" #-}++-- a depends on b, thus a is a successor of b+depToEdge :: Dependency -> Edge+depToEdge (Dependency a b) = (occToVertex False b, occToVertex True a)++occToVertex :: Bool -> Occurrence -> Vertex+occToVertex _ (OccRule nm) = VRule nm+occToVertex isDependency (OccAttr c a)+ | c == _LOC = VAttr Syn c a -- local attributes are treated as synthesized attrs of 'loc'+ | c == _INST = VChild a -- higher-order attributes are treated as children+ | otherwise = VAttr kind c a where+ kind | isDependency && c == _LHS = Inh -- these dependencies have the property that+ | isDependency && c /= _LHS = Syn -- they can all be faked by writing a 'const' rule+ | not isDependency && c == _LHS = Syn -- Perhaps we should also allow other forms of dependencies+ | not isDependency && c /= _LHS = Inh -- as well, such as two inherited attributes, which would+ -- force them in different visits+{-# LINE 76 "dist/build/KWOrder.hs" #-}+-- Child -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ aroundMap : Map Identifier [Expression]+ inhMap : Map Identifier Attributes+ mergeMap : Map Identifier (Identifier, [Identifier], Expression)+ mergedChildren : Set Identifier+ options : Options+ synMap : Map Identifier Attributes+ synthesized attributes:+ echilds : EChild+ edges : Set.Set Edge+ nontnames : [(Identifier, Identifier)]+ refHoNts : Set NontermIdent+ refNts : Set NontermIdent+ vertices : Set.Set Vertex+ alternatives:+ alternative Child:+ child name : {Identifier}+ child tp : {Type}+ child kind : {ChildKind}+ visit 0:+ local refNts : _+ local refHoNts : _+ local isHigherOrder : _+ local hasArounds : _+ local merges : _+ local isMerged : _+ local vertex : _+ local synvertices : _+ local inhvertices : _+ local childIsDeforested : _+ local higherOrderEdges : _+ local aroundEdges : _+ local edgesout : _+ local edgesin : _+ local chnt : _+ local inh : _+ local syn : _+-}+-- cata+sem_Child :: Child ->+ T_Child+sem_Child (Child _name _tp _kind) =+ (sem_Child_Child _name _tp _kind)+-- semantic domain+newtype T_Child = T_Child ((Map Identifier [Expression]) ->+ (Map Identifier Attributes) ->+ (Map Identifier (Identifier, [Identifier], Expression)) ->+ (Set Identifier) ->+ Options ->+ (Map Identifier Attributes) ->+ ( EChild,(Set.Set Edge),([(Identifier, Identifier)]),(Set NontermIdent),(Set NontermIdent),(Set.Set Vertex)))+data Inh_Child = Inh_Child {aroundMap_Inh_Child :: (Map Identifier [Expression]),inhMap_Inh_Child :: (Map Identifier Attributes),mergeMap_Inh_Child :: (Map Identifier (Identifier, [Identifier], Expression)),mergedChildren_Inh_Child :: (Set Identifier),options_Inh_Child :: Options,synMap_Inh_Child :: (Map Identifier Attributes)}+data Syn_Child = Syn_Child {echilds_Syn_Child :: EChild,edges_Syn_Child :: (Set.Set Edge),nontnames_Syn_Child :: ([(Identifier, Identifier)]),refHoNts_Syn_Child :: (Set NontermIdent),refNts_Syn_Child :: (Set NontermIdent),vertices_Syn_Child :: (Set.Set Vertex)}+wrap_Child :: T_Child ->+ Inh_Child ->+ Syn_Child+wrap_Child (T_Child sem) (Inh_Child _lhsIaroundMap _lhsIinhMap _lhsImergeMap _lhsImergedChildren _lhsIoptions _lhsIsynMap) =+ (let ( _lhsOechilds,_lhsOedges,_lhsOnontnames,_lhsOrefHoNts,_lhsOrefNts,_lhsOvertices) = sem _lhsIaroundMap _lhsIinhMap _lhsImergeMap _lhsImergedChildren _lhsIoptions _lhsIsynMap+ in (Syn_Child _lhsOechilds _lhsOedges _lhsOnontnames _lhsOrefHoNts _lhsOrefNts _lhsOvertices))+sem_Child_Child :: Identifier ->+ Type ->+ ChildKind ->+ T_Child+sem_Child_Child name_ tp_ kind_ =+ (T_Child (\ _lhsIaroundMap+ _lhsIinhMap+ _lhsImergeMap+ _lhsImergedChildren+ _lhsIoptions+ _lhsIsynMap ->+ (let _lhsOechilds :: EChild+ _lhsOvertices :: (Set.Set Vertex)+ _lhsOedges :: (Set.Set Edge)+ _lhsOnontnames :: ([(Identifier, Identifier)])+ _lhsOrefHoNts :: (Set NontermIdent)+ _lhsOrefNts :: (Set NontermIdent)+ -- "src-ag/KWOrder.ag"(line 74, column 3)+ _refNts =+ ({-# LINE 74 "src-ag/KWOrder.ag" #-}+ case tp_ of+ NT nt _ _ -> Set.singleton nt+ _ -> mempty+ {-# LINE 162 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 77, column 3)+ _refHoNts =+ ({-# LINE 77 "src-ag/KWOrder.ag" #-}+ if _isHigherOrder then _refNts else mempty+ {-# LINE 168 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 78, column 3)+ _isHigherOrder =+ ({-# LINE 78 "src-ag/KWOrder.ag" #-}+ case kind_ of+ ChildSyntax -> False+ _ -> True+ {-# LINE 176 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 108, column 3)+ _hasArounds =+ ({-# LINE 108 "src-ag/KWOrder.ag" #-}+ case Map.lookup name_ _lhsIaroundMap of+ Nothing -> False+ Just as -> not (null as)+ {-# LINE 184 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 136, column 3)+ _merges =+ ({-# LINE 136 "src-ag/KWOrder.ag" #-}+ maybe Nothing (\(_,ms,_) -> Just ms) $ Map.lookup name_ _lhsImergeMap+ {-# LINE 190 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 137, column 3)+ _isMerged =+ ({-# LINE 137 "src-ag/KWOrder.ag" #-}+ name_ `Set.member` _lhsImergedChildren+ {-# LINE 196 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 178, column 11)+ _lhsOechilds =+ ({-# LINE 178 "src-ag/KWOrder.ag" #-}+ case tp_ of+ NT _ _ _ -> EChild name_ tp_ kind_ _hasArounds _merges _isMerged+ _ -> ETerm name_ tp_+ {-# LINE 204 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 215, column 12)+ _vertex =+ ({-# LINE 215 "src-ag/KWOrder.ag" #-}+ VChild name_+ {-# LINE 210 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 216, column 12)+ _synvertices =+ ({-# LINE 216 "src-ag/KWOrder.ag" #-}+ map (VAttr Syn name_) . Map.keys $ _syn+ {-# LINE 216 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 217, column 12)+ _inhvertices =+ ({-# LINE 217 "src-ag/KWOrder.ag" #-}+ map (VAttr Inh name_) . Map.keys $ _inh+ {-# LINE 222 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 218, column 12)+ _lhsOvertices =+ ({-# LINE 218 "src-ag/KWOrder.ag" #-}+ case tp_ of+ NT _ _ _ -> Set.insert _vertex $ Set.fromList (_synvertices ++ _inhvertices )+ _ -> Set.empty+ {-# LINE 230 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 248, column 3)+ _childIsDeforested =+ ({-# LINE 248 "src-ag/KWOrder.ag" #-}+ case tp_ of+ NT _ _ defor -> defor+ _ -> False+ {-# LINE 238 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 251, column 3)+ _higherOrderEdges =+ ({-# LINE 251 "src-ag/KWOrder.ag" #-}+ case kind_ of+ ChildAttr | lateHigherOrderBinding _lhsIoptions && not _childIsDeforested+ -> [(_vertex , VAttr Inh _LHS idLateBindingAttr)]+ _ -> []+ {-# LINE 247 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 255, column 3)+ _aroundEdges =+ ({-# LINE 255 "src-ag/KWOrder.ag" #-}+ if _hasArounds+ then [(_vertex , VAttr Syn _LOC (Ident (getName name_ ++ "_around") (getPos name_)))]+ else []+ {-# LINE 255 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 261, column 12)+ _edgesout =+ ({-# LINE 261 "src-ag/KWOrder.ag" #-}+ _higherOrderEdges+ {-# LINE 261 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 262, column 12)+ _edgesin =+ ({-# LINE 262 "src-ag/KWOrder.ag" #-}+ map (flip (,) _vertex ) _synvertices+ {-# LINE 267 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 263, column 12)+ _lhsOedges =+ ({-# LINE 263 "src-ag/KWOrder.ag" #-}+ Set.fromList (_edgesout ++ _edgesin )+ {-# LINE 273 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 301, column 12)+ _lhsOnontnames =+ ({-# LINE 301 "src-ag/KWOrder.ag" #-}+ case tp_ of+ NT nont _ _ -> [(name_, nont)]+ _ -> []+ {-# LINE 281 "dist/build/KWOrder" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 19, column 11)+ _chnt =+ ({-# LINE 19 "src-ag/DistChildAttr.ag" #-}+ case tp_ of+ NT nt _ _ -> nt+ Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")+ Haskell t -> identifier ""+ {-# LINE 290 "dist/build/KWOrder" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 23, column 11)+ _inh =+ ({-# LINE 23 "src-ag/DistChildAttr.ag" #-}+ Map.findWithDefault Map.empty _chnt _lhsIinhMap+ {-# LINE 296 "dist/build/KWOrder" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 24, column 11)+ _syn =+ ({-# LINE 24 "src-ag/DistChildAttr.ag" #-}+ Map.findWithDefault Map.empty _chnt _lhsIsynMap+ {-# LINE 302 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 56, column 67)+ _lhsOrefHoNts =+ ({-# LINE 56 "src-ag/KWOrder.ag" #-}+ _refHoNts+ {-# LINE 308 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 56, column 67)+ _lhsOrefNts =+ ({-# LINE 56 "src-ag/KWOrder.ag" #-}+ _refNts+ {-# LINE 314 "dist/build/KWOrder" #-}+ )+ in ( _lhsOechilds,_lhsOedges,_lhsOnontnames,_lhsOrefHoNts,_lhsOrefNts,_lhsOvertices))))+-- Children ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ aroundMap : Map Identifier [Expression]+ inhMap : Map Identifier Attributes+ mergeMap : Map Identifier (Identifier, [Identifier], Expression)+ mergedChildren : Set Identifier+ options : Options+ synMap : Map Identifier Attributes+ synthesized attributes:+ echilds : EChildren+ edges : Set.Set Edge+ nontnames : [(Identifier, Identifier)]+ refHoNts : Set NontermIdent+ refNts : Set NontermIdent+ vertices : Set.Set Vertex+ alternatives:+ alternative Cons:+ child hd : Child + child tl : Children + alternative Nil:+-}+-- cata+sem_Children :: Children ->+ T_Children+sem_Children list =+ (Prelude.foldr sem_Children_Cons sem_Children_Nil (Prelude.map sem_Child list))+-- semantic domain+newtype T_Children = T_Children ((Map Identifier [Expression]) ->+ (Map Identifier Attributes) ->+ (Map Identifier (Identifier, [Identifier], Expression)) ->+ (Set Identifier) ->+ Options ->+ (Map Identifier Attributes) ->+ ( EChildren,(Set.Set Edge),([(Identifier, Identifier)]),(Set NontermIdent),(Set NontermIdent),(Set.Set Vertex)))+data Inh_Children = Inh_Children {aroundMap_Inh_Children :: (Map Identifier [Expression]),inhMap_Inh_Children :: (Map Identifier Attributes),mergeMap_Inh_Children :: (Map Identifier (Identifier, [Identifier], Expression)),mergedChildren_Inh_Children :: (Set Identifier),options_Inh_Children :: Options,synMap_Inh_Children :: (Map Identifier Attributes)}+data Syn_Children = Syn_Children {echilds_Syn_Children :: EChildren,edges_Syn_Children :: (Set.Set Edge),nontnames_Syn_Children :: ([(Identifier, Identifier)]),refHoNts_Syn_Children :: (Set NontermIdent),refNts_Syn_Children :: (Set NontermIdent),vertices_Syn_Children :: (Set.Set Vertex)}+wrap_Children :: T_Children ->+ Inh_Children ->+ Syn_Children+wrap_Children (T_Children sem) (Inh_Children _lhsIaroundMap _lhsIinhMap _lhsImergeMap _lhsImergedChildren _lhsIoptions _lhsIsynMap) =+ (let ( _lhsOechilds,_lhsOedges,_lhsOnontnames,_lhsOrefHoNts,_lhsOrefNts,_lhsOvertices) = sem _lhsIaroundMap _lhsIinhMap _lhsImergeMap _lhsImergedChildren _lhsIoptions _lhsIsynMap+ in (Syn_Children _lhsOechilds _lhsOedges _lhsOnontnames _lhsOrefHoNts _lhsOrefNts _lhsOvertices))+sem_Children_Cons :: T_Child ->+ T_Children ->+ T_Children+sem_Children_Cons (T_Child hd_) (T_Children tl_) =+ (T_Children (\ _lhsIaroundMap+ _lhsIinhMap+ _lhsImergeMap+ _lhsImergedChildren+ _lhsIoptions+ _lhsIsynMap ->+ (let _lhsOechilds :: EChildren+ _lhsOedges :: (Set.Set Edge)+ _lhsOnontnames :: ([(Identifier, Identifier)])+ _lhsOrefHoNts :: (Set NontermIdent)+ _lhsOrefNts :: (Set NontermIdent)+ _lhsOvertices :: (Set.Set Vertex)+ _hdOaroundMap :: (Map Identifier [Expression])+ _hdOinhMap :: (Map Identifier Attributes)+ _hdOmergeMap :: (Map Identifier (Identifier, [Identifier], Expression))+ _hdOmergedChildren :: (Set Identifier)+ _hdOoptions :: Options+ _hdOsynMap :: (Map Identifier Attributes)+ _tlOaroundMap :: (Map Identifier [Expression])+ _tlOinhMap :: (Map Identifier Attributes)+ _tlOmergeMap :: (Map Identifier (Identifier, [Identifier], Expression))+ _tlOmergedChildren :: (Set Identifier)+ _tlOoptions :: Options+ _tlOsynMap :: (Map Identifier Attributes)+ _hdIechilds :: EChild+ _hdIedges :: (Set.Set Edge)+ _hdInontnames :: ([(Identifier, Identifier)])+ _hdIrefHoNts :: (Set NontermIdent)+ _hdIrefNts :: (Set NontermIdent)+ _hdIvertices :: (Set.Set Vertex)+ _tlIechilds :: EChildren+ _tlIedges :: (Set.Set Edge)+ _tlInontnames :: ([(Identifier, Identifier)])+ _tlIrefHoNts :: (Set NontermIdent)+ _tlIrefNts :: (Set NontermIdent)+ _tlIvertices :: (Set.Set Vertex)+ -- use rule "src-ag/KWOrder.ag"(line 175, column 29)+ _lhsOechilds =+ ({-# LINE 175 "src-ag/KWOrder.ag" #-}+ _hdIechilds : _tlIechilds+ {-# LINE 405 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 233, column 33)+ _lhsOedges =+ ({-# LINE 233 "src-ag/KWOrder.ag" #-}+ _hdIedges `Set.union` _tlIedges+ {-# LINE 411 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 298, column 37)+ _lhsOnontnames =+ ({-# LINE 298 "src-ag/KWOrder.ag" #-}+ _hdInontnames ++ _tlInontnames+ {-# LINE 417 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 56, column 67)+ _lhsOrefHoNts =+ ({-# LINE 56 "src-ag/KWOrder.ag" #-}+ _hdIrefHoNts `mappend` _tlIrefHoNts+ {-# LINE 423 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 56, column 67)+ _lhsOrefNts =+ ({-# LINE 56 "src-ag/KWOrder.ag" #-}+ _hdIrefNts `mappend` _tlIrefNts+ {-# LINE 429 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 189, column 36)+ _lhsOvertices =+ ({-# LINE 189 "src-ag/KWOrder.ag" #-}+ _hdIvertices `Set.union` _tlIvertices+ {-# LINE 435 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOaroundMap =+ ({-# LINE 99 "src-ag/KWOrder.ag" #-}+ _lhsIaroundMap+ {-# LINE 441 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 447 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 124 "src-ag/KWOrder.ag" #-}+ _lhsImergeMap+ {-# LINE 453 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOmergedChildren =+ ({-# LINE 124 "src-ag/KWOrder.ag" #-}+ _lhsImergedChildren+ {-# LINE 459 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 34 "src-ag/KWOrder.ag" #-}+ _lhsIoptions+ {-# LINE 465 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 471 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOaroundMap =+ ({-# LINE 99 "src-ag/KWOrder.ag" #-}+ _lhsIaroundMap+ {-# LINE 477 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 483 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 124 "src-ag/KWOrder.ag" #-}+ _lhsImergeMap+ {-# LINE 489 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOmergedChildren =+ ({-# LINE 124 "src-ag/KWOrder.ag" #-}+ _lhsImergedChildren+ {-# LINE 495 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 34 "src-ag/KWOrder.ag" #-}+ _lhsIoptions+ {-# LINE 501 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 507 "dist/build/KWOrder" #-}+ )+ ( _hdIechilds,_hdIedges,_hdInontnames,_hdIrefHoNts,_hdIrefNts,_hdIvertices) =+ hd_ _hdOaroundMap _hdOinhMap _hdOmergeMap _hdOmergedChildren _hdOoptions _hdOsynMap+ ( _tlIechilds,_tlIedges,_tlInontnames,_tlIrefHoNts,_tlIrefNts,_tlIvertices) =+ tl_ _tlOaroundMap _tlOinhMap _tlOmergeMap _tlOmergedChildren _tlOoptions _tlOsynMap+ in ( _lhsOechilds,_lhsOedges,_lhsOnontnames,_lhsOrefHoNts,_lhsOrefNts,_lhsOvertices))))+sem_Children_Nil :: T_Children+sem_Children_Nil =+ (T_Children (\ _lhsIaroundMap+ _lhsIinhMap+ _lhsImergeMap+ _lhsImergedChildren+ _lhsIoptions+ _lhsIsynMap ->+ (let _lhsOechilds :: EChildren+ _lhsOedges :: (Set.Set Edge)+ _lhsOnontnames :: ([(Identifier, Identifier)])+ _lhsOrefHoNts :: (Set NontermIdent)+ _lhsOrefNts :: (Set NontermIdent)+ _lhsOvertices :: (Set.Set Vertex)+ -- use rule "src-ag/KWOrder.ag"(line 175, column 29)+ _lhsOechilds =+ ({-# LINE 175 "src-ag/KWOrder.ag" #-}+ []+ {-# LINE 532 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 233, column 33)+ _lhsOedges =+ ({-# LINE 233 "src-ag/KWOrder.ag" #-}+ Set.empty+ {-# LINE 538 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 298, column 37)+ _lhsOnontnames =+ ({-# LINE 298 "src-ag/KWOrder.ag" #-}+ []+ {-# LINE 544 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 56, column 67)+ _lhsOrefHoNts =+ ({-# LINE 56 "src-ag/KWOrder.ag" #-}+ mempty+ {-# LINE 550 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 56, column 67)+ _lhsOrefNts =+ ({-# LINE 56 "src-ag/KWOrder.ag" #-}+ mempty+ {-# LINE 556 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 189, column 36)+ _lhsOvertices =+ ({-# LINE 189 "src-ag/KWOrder.ag" #-}+ Set.empty+ {-# LINE 562 "dist/build/KWOrder" #-}+ )+ in ( _lhsOechilds,_lhsOedges,_lhsOnontnames,_lhsOrefHoNts,_lhsOrefNts,_lhsOvertices))))+-- Expression --------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ copy : Expression + vertices : Set.Set Vertex+ alternatives:+ alternative Expression:+ child pos : {Pos}+ child tks : {[HsToken]}+ visit 0:+ local copy : _+-}+-- cata+sem_Expression :: Expression ->+ T_Expression+sem_Expression (Expression _pos _tks) =+ (sem_Expression_Expression _pos _tks)+-- semantic domain+newtype T_Expression = T_Expression (( Expression,(Set.Set Vertex)))+data Inh_Expression = Inh_Expression {}+data Syn_Expression = Syn_Expression {copy_Syn_Expression :: Expression,vertices_Syn_Expression :: (Set.Set Vertex)}+wrap_Expression :: T_Expression ->+ Inh_Expression ->+ Syn_Expression+wrap_Expression (T_Expression sem) (Inh_Expression) =+ (let ( _lhsOcopy,_lhsOvertices) = sem+ in (Syn_Expression _lhsOcopy _lhsOvertices))+sem_Expression_Expression :: Pos ->+ ([HsToken]) ->+ T_Expression+sem_Expression_Expression pos_ tks_ =+ (T_Expression (let _lhsOvertices :: (Set.Set Vertex)+ _lhsOcopy :: Expression+ -- "src-ag/KWOrder.ag"(line 200, column 17)+ _lhsOvertices =+ ({-# LINE 200 "src-ag/KWOrder.ag" #-}+ Set.unions $ map (\tok -> vertices_Syn_HsToken+ (wrap_HsToken (sem_HsToken tok) Inh_HsToken)) tks_+ {-# LINE 604 "dist/build/KWOrder" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 154 "src-ag/KWOrder.ag" #-}+ Expression pos_ tks_+ {-# LINE 610 "dist/build/KWOrder" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 154 "src-ag/KWOrder.ag" #-}+ _copy+ {-# LINE 616 "dist/build/KWOrder" #-}+ )+ in ( _lhsOcopy,_lhsOvertices)))+-- Grammar -----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attributes:+ depgraphs : PP_Doc+ errors : Seq Error+ inhmap : Map.Map NontermIdent Attributes+ localSigMap : Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))+ output : ExecutionPlan+ synmap : Map.Map NontermIdent Attributes+ visitgraph : PP_Doc+ 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 quantMap : {QuantMap}+ child uniqueMap : {UniqueMap}+ child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}+ visit 0:+ local closedNtDeps : _+ local closedHoNtDeps : _+ local closedHoNtRevDeps : _+-}+-- cata+sem_Grammar :: Grammar ->+ T_Grammar+sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap) =+ (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts) _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap)+-- semantic domain+newtype T_Grammar = T_Grammar (Options ->+ ( PP_Doc,(Seq Error),(Map.Map NontermIdent Attributes),(Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))),ExecutionPlan,(Map.Map NontermIdent Attributes),PP_Doc))+data Inh_Grammar = Inh_Grammar {options_Inh_Grammar :: Options}+data Syn_Grammar = Syn_Grammar {depgraphs_Syn_Grammar :: PP_Doc,errors_Syn_Grammar :: (Seq Error),inhmap_Syn_Grammar :: (Map.Map NontermIdent Attributes),localSigMap_Syn_Grammar :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))),output_Syn_Grammar :: ExecutionPlan,synmap_Syn_Grammar :: (Map.Map NontermIdent Attributes),visitgraph_Syn_Grammar :: PP_Doc}+wrap_Grammar :: T_Grammar ->+ Inh_Grammar ->+ Syn_Grammar+wrap_Grammar (T_Grammar sem) (Inh_Grammar _lhsIoptions) =+ (let ( _lhsOdepgraphs,_lhsOerrors,_lhsOinhmap,_lhsOlocalSigMap,_lhsOoutput,_lhsOsynmap,_lhsOvisitgraph) = sem _lhsIoptions+ in (Syn_Grammar _lhsOdepgraphs _lhsOerrors _lhsOinhmap _lhsOlocalSigMap _lhsOoutput _lhsOsynmap _lhsOvisitgraph))+sem_Grammar_Grammar :: TypeSyns ->+ UseMap ->+ Derivings ->+ (Set NontermIdent) ->+ T_Nonterminals ->+ PragmaMap ->+ AttrOrderMap ->+ ParamMap ->+ ContextMap ->+ QuantMap ->+ UniqueMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->+ T_Grammar+sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_ =+ (T_Grammar (\ _lhsIoptions ->+ (let _nontsOrulenumber :: Int+ _nontsOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))+ _nontsOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))))+ _nontsOclassContexts :: ContextMap+ _nontsOmanualDeps :: AttrOrderMap+ _lhsOoutput :: ExecutionPlan+ _lhsOdepgraphs :: PP_Doc+ _lhsOvisitgraph :: PP_Doc+ _lhsOerrors :: (Seq Error)+ _nontsOinhMap :: (Map Identifier Attributes)+ _nontsOsynMap :: (Map Identifier Attributes)+ _lhsOinhmap :: (Map.Map NontermIdent Attributes)+ _lhsOlocalSigMap :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type)))+ _lhsOsynmap :: (Map.Map NontermIdent Attributes)+ _nontsOclosedHoNtDeps :: (Map NontermIdent (Set NontermIdent))+ _nontsOclosedHoNtRevDeps :: (Map NontermIdent (Set NontermIdent))+ _nontsOclosedNtDeps :: (Map NontermIdent (Set NontermIdent))+ _nontsOoptions :: Options+ _nontsIdepinfo :: ([NontDependencyInformation])+ _nontsIinhMap' :: (Map Identifier Attributes)+ _nontsIinhmap :: (Map.Map NontermIdent Attributes)+ _nontsIlocalSigMap :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type)))+ _nontsIntDeps :: (Map NontermIdent (Set NontermIdent))+ _nontsIntHoDeps :: (Map NontermIdent (Set NontermIdent))+ _nontsIrulenumber :: Int+ _nontsIsynMap' :: (Map Identifier Attributes)+ _nontsIsynmap :: (Map.Map NontermIdent Attributes)+ -- "src-ag/KWOrder.ag"(line 44, column 14)+ _nontsOrulenumber =+ ({-# LINE 44 "src-ag/KWOrder.ag" #-}+ 0+ {-# LINE 717 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 83, column 3)+ _closedNtDeps =+ ({-# LINE 83 "src-ag/KWOrder.ag" #-}+ closeMap _nontsIntDeps+ {-# LINE 723 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 84, column 3)+ _closedHoNtDeps =+ ({-# LINE 84 "src-ag/KWOrder.ag" #-}+ closeMap _nontsIntHoDeps+ {-# LINE 729 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 85, column 3)+ _closedHoNtRevDeps =+ ({-# LINE 85 "src-ag/KWOrder.ag" #-}+ revDeps _closedHoNtDeps+ {-# LINE 735 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 105, column 3)+ _nontsOaroundMap =+ ({-# LINE 105 "src-ag/KWOrder.ag" #-}+ aroundsMap_+ {-# LINE 741 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 130, column 3)+ _nontsOmergeMap =+ ({-# LINE 130 "src-ag/KWOrder.ag" #-}+ mergeMap_+ {-# LINE 747 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 146, column 3)+ _nontsOclassContexts =+ ({-# LINE 146 "src-ag/KWOrder.ag" #-}+ contextMap_+ {-# LINE 753 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 269, column 31)+ _nontsOmanualDeps =+ ({-# LINE 269 "src-ag/KWOrder.ag" #-}+ manualAttrOrderMap_+ {-# LINE 759 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 359, column 15)+ (_lhsOoutput,_lhsOdepgraphs,_lhsOvisitgraph,_lhsOerrors) =+ ({-# LINE 359 "src-ag/KWOrder.ag" #-}+ let lazyPlan = kennedyWarrenLazy _lhsIoptions wrappers_ _nontsIdepinfo typeSyns_ derivings_+ in if visit _lhsIoptions && withCycle _lhsIoptions+ then case kennedyWarrenOrder _lhsIoptions wrappers_ _nontsIdepinfo typeSyns_ derivings_ of+ Left e -> (lazyPlan,empty,empty,Seq.singleton e)+ Right (o,d,v) -> (o,d,v,Seq.empty)+ else (lazyPlan,empty,empty,Seq.empty)+ {-# LINE 770 "dist/build/KWOrder" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 15, column 13)+ _nontsOinhMap =+ ({-# LINE 15 "src-ag/DistChildAttr.ag" #-}+ _nontsIinhMap'+ {-# LINE 776 "dist/build/KWOrder" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 16, column 13)+ _nontsOsynMap =+ ({-# LINE 16 "src-ag/DistChildAttr.ag" #-}+ _nontsIsynMap'+ {-# LINE 782 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 371, column 33)+ _lhsOinhmap =+ ({-# LINE 371 "src-ag/KWOrder.ag" #-}+ _nontsIinhmap+ {-# LINE 788 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 383, column 57)+ _lhsOlocalSigMap =+ ({-# LINE 383 "src-ag/KWOrder.ag" #-}+ _nontsIlocalSigMap+ {-# LINE 794 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 372, column 33)+ _lhsOsynmap =+ ({-# LINE 372 "src-ag/KWOrder.ag" #-}+ _nontsIsynmap+ {-# LINE 800 "dist/build/KWOrder" #-}+ )+ -- copy rule (from local)+ _nontsOclosedHoNtDeps =+ ({-# LINE 55 "src-ag/KWOrder.ag" #-}+ _closedHoNtDeps+ {-# LINE 806 "dist/build/KWOrder" #-}+ )+ -- copy rule (from local)+ _nontsOclosedHoNtRevDeps =+ ({-# LINE 55 "src-ag/KWOrder.ag" #-}+ _closedHoNtRevDeps+ {-# LINE 812 "dist/build/KWOrder" #-}+ )+ -- copy rule (from local)+ _nontsOclosedNtDeps =+ ({-# LINE 55 "src-ag/KWOrder.ag" #-}+ _closedNtDeps+ {-# LINE 818 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _nontsOoptions =+ ({-# LINE 34 "src-ag/KWOrder.ag" #-}+ _lhsIoptions+ {-# LINE 824 "dist/build/KWOrder" #-}+ )+ ( _nontsIdepinfo,_nontsIinhMap',_nontsIinhmap,_nontsIlocalSigMap,_nontsIntDeps,_nontsIntHoDeps,_nontsIrulenumber,_nontsIsynMap',_nontsIsynmap) =+ nonts_ _nontsOaroundMap _nontsOclassContexts _nontsOclosedHoNtDeps _nontsOclosedHoNtRevDeps _nontsOclosedNtDeps _nontsOinhMap _nontsOmanualDeps _nontsOmergeMap _nontsOoptions _nontsOrulenumber _nontsOsynMap+ in ( _lhsOdepgraphs,_lhsOerrors,_lhsOinhmap,_lhsOlocalSigMap,_lhsOoutput,_lhsOsynmap,_lhsOvisitgraph))))+-- HsToken -----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ vertices : Set.Set Vertex+ alternatives:+ alternative AGField:+ child field : {Identifier}+ child attr : {Identifier}+ child pos : {Pos}+ child rdesc : {Maybe String}+ alternative AGLocal:+ child var : {Identifier}+ child pos : {Pos}+ child rdesc : {Maybe String}+ alternative CharToken:+ child value : {String}+ child pos : {Pos}+ alternative Err:+ child mesg : {String}+ child pos : {Pos}+ alternative HsToken:+ child value : {String}+ child pos : {Pos}+ alternative StrToken:+ child value : {String}+ child pos : {Pos}+-}+-- 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 (( (Set.Set Vertex)))+data Inh_HsToken = Inh_HsToken {}+data Syn_HsToken = Syn_HsToken {vertices_Syn_HsToken :: (Set.Set Vertex)}+wrap_HsToken :: T_HsToken ->+ Inh_HsToken ->+ Syn_HsToken+wrap_HsToken (T_HsToken sem) (Inh_HsToken) =+ (let ( _lhsOvertices) = sem+ in (Syn_HsToken _lhsOvertices))+sem_HsToken_AGField :: Identifier ->+ Identifier ->+ Pos ->+ (Maybe String) ->+ T_HsToken+sem_HsToken_AGField field_ attr_ pos_ rdesc_ =+ (T_HsToken (let _lhsOvertices :: (Set.Set Vertex)+ -- "src-ag/KWOrder.ag"(line 194, column 14)+ _lhsOvertices =+ ({-# LINE 194 "src-ag/KWOrder.ag" #-}+ Set.singleton $ VAttr (if field_ == _LHS then Inh+ else if field_ == _LOC then Loc+ else Syn) field_ attr_+ {-# LINE 895 "dist/build/KWOrder" #-}+ )+ in ( _lhsOvertices)))+sem_HsToken_AGLocal :: Identifier ->+ Pos ->+ (Maybe String) ->+ T_HsToken+sem_HsToken_AGLocal var_ pos_ rdesc_ =+ (T_HsToken (let _lhsOvertices :: (Set.Set Vertex)+ -- "src-ag/KWOrder.ag"(line 193, column 14)+ _lhsOvertices =+ ({-# LINE 193 "src-ag/KWOrder.ag" #-}+ Set.singleton $ VChild var_+ {-# LINE 908 "dist/build/KWOrder" #-}+ )+ in ( _lhsOvertices)))+sem_HsToken_CharToken :: String ->+ Pos ->+ T_HsToken+sem_HsToken_CharToken value_ pos_ =+ (T_HsToken (let _lhsOvertices :: (Set.Set Vertex)+ -- use rule "src-ag/KWOrder.ag"(line 189, column 36)+ _lhsOvertices =+ ({-# LINE 189 "src-ag/KWOrder.ag" #-}+ Set.empty+ {-# LINE 920 "dist/build/KWOrder" #-}+ )+ in ( _lhsOvertices)))+sem_HsToken_Err :: String ->+ Pos ->+ T_HsToken+sem_HsToken_Err mesg_ pos_ =+ (T_HsToken (let _lhsOvertices :: (Set.Set Vertex)+ -- use rule "src-ag/KWOrder.ag"(line 189, column 36)+ _lhsOvertices =+ ({-# LINE 189 "src-ag/KWOrder.ag" #-}+ Set.empty+ {-# LINE 932 "dist/build/KWOrder" #-}+ )+ in ( _lhsOvertices)))+sem_HsToken_HsToken :: String ->+ Pos ->+ T_HsToken+sem_HsToken_HsToken value_ pos_ =+ (T_HsToken (let _lhsOvertices :: (Set.Set Vertex)+ -- use rule "src-ag/KWOrder.ag"(line 189, column 36)+ _lhsOvertices =+ ({-# LINE 189 "src-ag/KWOrder.ag" #-}+ Set.empty+ {-# LINE 944 "dist/build/KWOrder" #-}+ )+ in ( _lhsOvertices)))+sem_HsToken_StrToken :: String ->+ Pos ->+ T_HsToken+sem_HsToken_StrToken value_ pos_ =+ (T_HsToken (let _lhsOvertices :: (Set.Set Vertex)+ -- use rule "src-ag/KWOrder.ag"(line 189, column 36)+ _lhsOvertices =+ ({-# LINE 189 "src-ag/KWOrder.ag" #-}+ Set.empty+ {-# LINE 956 "dist/build/KWOrder" #-}+ )+ in ( _lhsOvertices)))+-- HsTokens ----------------------------------------------------+{-+ alternatives:+ alternative Cons:+ child hd : HsToken + child tl : HsTokens + alternative Nil:+-}+-- 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 (( ))+data Inh_HsTokens = Inh_HsTokens {}+data Syn_HsTokens = Syn_HsTokens {}+wrap_HsTokens :: T_HsTokens ->+ Inh_HsTokens ->+ Syn_HsTokens+wrap_HsTokens (T_HsTokens sem) (Inh_HsTokens) =+ (let ( ) = sem+ in (Syn_HsTokens))+sem_HsTokens_Cons :: T_HsToken ->+ T_HsTokens ->+ T_HsTokens+sem_HsTokens_Cons (T_HsToken hd_) (T_HsTokens tl_) =+ (T_HsTokens (let _hdIvertices :: (Set.Set Vertex)+ ( _hdIvertices) =+ hd_+ in ( )))+sem_HsTokens_Nil :: T_HsTokens+sem_HsTokens_Nil =+ (T_HsTokens (let+ in ( )))+-- HsTokensRoot ------------------------------------------------+{-+ 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 (( ))+data Inh_HsTokensRoot = Inh_HsTokensRoot {}+data Syn_HsTokensRoot = Syn_HsTokensRoot {}+wrap_HsTokensRoot :: T_HsTokensRoot ->+ Inh_HsTokensRoot ->+ Syn_HsTokensRoot+wrap_HsTokensRoot (T_HsTokensRoot sem) (Inh_HsTokensRoot) =+ (let ( ) = sem+ in (Syn_HsTokensRoot))+sem_HsTokensRoot_HsTokensRoot :: T_HsTokens ->+ T_HsTokensRoot+sem_HsTokensRoot_HsTokensRoot (T_HsTokens tokens_) =+ (T_HsTokensRoot (let+ in ( )))+-- Nonterminal -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ aroundMap : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ classContexts : ContextMap+ closedHoNtDeps : Map NontermIdent (Set NontermIdent)+ closedHoNtRevDeps : Map NontermIdent (Set NontermIdent)+ closedNtDeps : Map NontermIdent (Set NontermIdent)+ inhMap : Map Identifier Attributes+ manualDeps : AttrOrderMap+ mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))+ options : Options+ synMap : Map Identifier Attributes+ chained attribute:+ rulenumber : Int+ synthesized attributes:+ depinfo : NontDependencyInformation+ inhMap' : Map Identifier Attributes+ inhmap : Map.Map NontermIdent Attributes+ localSigMap : Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))+ ntDeps : Map NontermIdent (Set NontermIdent)+ ntHoDeps : Map NontermIdent (Set NontermIdent)+ synMap' : Map Identifier Attributes+ synmap : Map.Map NontermIdent Attributes+ alternatives:+ alternative Nonterminal:+ child nt : {NontermIdent}+ child params : {[Identifier]}+ child inh : {Attributes}+ child syn : {Attributes}+ child prods : Productions + visit 0:+ local closedNtDeps : _+ local closedHoNtDeps : _+ local closedHoNtRevDeps : _+ local recursive : _+ local nontrivAcyc : _+ local hoInfo : _+ local aroundMap : _+ local mergeMap : _+ local classContexts : _+ local synvertices : _+ local inhvertices : _+ local vertices : _+ local nontgraph : _+-}+-- 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]))) ->+ ContextMap ->+ (Map NontermIdent (Set NontermIdent)) ->+ (Map NontermIdent (Set NontermIdent)) ->+ (Map NontermIdent (Set NontermIdent)) ->+ (Map Identifier Attributes) ->+ AttrOrderMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->+ Options ->+ Int ->+ (Map Identifier Attributes) ->+ ( NontDependencyInformation,(Map Identifier Attributes),(Map.Map NontermIdent Attributes),(Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))),(Map NontermIdent (Set NontermIdent)),(Map NontermIdent (Set NontermIdent)),Int,(Map Identifier Attributes),(Map.Map NontermIdent Attributes)))+data Inh_Nonterminal = Inh_Nonterminal {aroundMap_Inh_Nonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))),classContexts_Inh_Nonterminal :: ContextMap,closedHoNtDeps_Inh_Nonterminal :: (Map NontermIdent (Set NontermIdent)),closedHoNtRevDeps_Inh_Nonterminal :: (Map NontermIdent (Set NontermIdent)),closedNtDeps_Inh_Nonterminal :: (Map NontermIdent (Set NontermIdent)),inhMap_Inh_Nonterminal :: (Map Identifier Attributes),manualDeps_Inh_Nonterminal :: AttrOrderMap,mergeMap_Inh_Nonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))),options_Inh_Nonterminal :: Options,rulenumber_Inh_Nonterminal :: Int,synMap_Inh_Nonterminal :: (Map Identifier Attributes)}+data Syn_Nonterminal = Syn_Nonterminal {depinfo_Syn_Nonterminal :: NontDependencyInformation,inhMap'_Syn_Nonterminal :: (Map Identifier Attributes),inhmap_Syn_Nonterminal :: (Map.Map NontermIdent Attributes),localSigMap_Syn_Nonterminal :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))),ntDeps_Syn_Nonterminal :: (Map NontermIdent (Set NontermIdent)),ntHoDeps_Syn_Nonterminal :: (Map NontermIdent (Set NontermIdent)),rulenumber_Syn_Nonterminal :: Int,synMap'_Syn_Nonterminal :: (Map Identifier Attributes),synmap_Syn_Nonterminal :: (Map.Map NontermIdent Attributes)}+wrap_Nonterminal :: T_Nonterminal ->+ Inh_Nonterminal ->+ Syn_Nonterminal+wrap_Nonterminal (T_Nonterminal sem) (Inh_Nonterminal _lhsIaroundMap _lhsIclassContexts _lhsIclosedHoNtDeps _lhsIclosedHoNtRevDeps _lhsIclosedNtDeps _lhsIinhMap _lhsImanualDeps _lhsImergeMap _lhsIoptions _lhsIrulenumber _lhsIsynMap) =+ (let ( _lhsOdepinfo,_lhsOinhMap',_lhsOinhmap,_lhsOlocalSigMap,_lhsOntDeps,_lhsOntHoDeps,_lhsOrulenumber,_lhsOsynMap',_lhsOsynmap) = sem _lhsIaroundMap _lhsIclassContexts _lhsIclosedHoNtDeps _lhsIclosedHoNtRevDeps _lhsIclosedNtDeps _lhsIinhMap _lhsImanualDeps _lhsImergeMap _lhsIoptions _lhsIrulenumber _lhsIsynMap+ in (Syn_Nonterminal _lhsOdepinfo _lhsOinhMap' _lhsOinhmap _lhsOlocalSigMap _lhsOntDeps _lhsOntHoDeps _lhsOrulenumber _lhsOsynMap' _lhsOsynmap))+sem_Nonterminal_Nonterminal :: NontermIdent ->+ ([Identifier]) ->+ Attributes ->+ Attributes ->+ T_Productions ->+ T_Nonterminal+sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ (T_Productions prods_) =+ (T_Nonterminal (\ _lhsIaroundMap+ _lhsIclassContexts+ _lhsIclosedHoNtDeps+ _lhsIclosedHoNtRevDeps+ _lhsIclosedNtDeps+ _lhsIinhMap+ _lhsImanualDeps+ _lhsImergeMap+ _lhsIoptions+ _lhsIrulenumber+ _lhsIsynMap ->+ (let _lhsOntDeps :: (Map NontermIdent (Set NontermIdent))+ _lhsOntHoDeps :: (Map NontermIdent (Set NontermIdent))+ _prodsOmanualDeps :: (Map ConstructorIdent (Set Dependency))+ _lhsOdepinfo :: NontDependencyInformation+ _lhsOinhmap :: (Map.Map NontermIdent Attributes)+ _lhsOsynmap :: (Map.Map NontermIdent Attributes)+ _lhsOlocalSigMap :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type)))+ _lhsOinhMap' :: (Map Identifier Attributes)+ _lhsOsynMap' :: (Map Identifier Attributes)+ _lhsOrulenumber :: Int+ _prodsOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))+ _prodsOinhMap :: (Map Identifier Attributes)+ _prodsOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))+ _prodsOoptions :: Options+ _prodsOrulenumber :: Int+ _prodsOsynMap :: (Map Identifier Attributes)+ _prodsIdepgraph :: ([ProdDependencyGraph])+ _prodsIlocalSigMap :: (Map.Map ConstructorIdent (Map.Map Identifier Type))+ _prodsIrefHoNts :: (Set NontermIdent)+ _prodsIrefNts :: (Set NontermIdent)+ _prodsIrulenumber :: Int+ -- "src-ag/KWOrder.ag"(line 59, column 3)+ _lhsOntDeps =+ ({-# LINE 59 "src-ag/KWOrder.ag" #-}+ Map.singleton nt_ _prodsIrefNts+ {-# LINE 1136 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 60, column 3)+ _lhsOntHoDeps =+ ({-# LINE 60 "src-ag/KWOrder.ag" #-}+ Map.singleton nt_ _prodsIrefHoNts+ {-# LINE 1142 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 62, column 3)+ _closedNtDeps =+ ({-# LINE 62 "src-ag/KWOrder.ag" #-}+ Map.findWithDefault Set.empty nt_ _lhsIclosedNtDeps+ {-# LINE 1148 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 63, column 3)+ _closedHoNtDeps =+ ({-# LINE 63 "src-ag/KWOrder.ag" #-}+ Map.findWithDefault Set.empty nt_ _lhsIclosedHoNtDeps+ {-# LINE 1154 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 64, column 3)+ _closedHoNtRevDeps =+ ({-# LINE 64 "src-ag/KWOrder.ag" #-}+ Map.findWithDefault Set.empty nt_ _lhsIclosedHoNtRevDeps+ {-# LINE 1160 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 66, column 3)+ _recursive =+ ({-# LINE 66 "src-ag/KWOrder.ag" #-}+ nt_ `Set.member` _closedNtDeps+ {-# LINE 1166 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 67, column 3)+ _nontrivAcyc =+ ({-# LINE 67 "src-ag/KWOrder.ag" #-}+ nt_ `Set.member` _closedHoNtDeps+ {-# LINE 1172 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 68, column 3)+ _hoInfo =+ ({-# LINE 68 "src-ag/KWOrder.ag" #-}+ HigherOrderInfo { hoNtDeps = _closedHoNtDeps+ , hoNtRevDeps = _closedHoNtRevDeps+ , hoAcyclic = _nontrivAcyc+ }+ {-# LINE 1181 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 101, column 32)+ _aroundMap =+ ({-# LINE 101 "src-ag/KWOrder.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIaroundMap+ {-# LINE 1187 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 126, column 32)+ _mergeMap =+ ({-# LINE 126 "src-ag/KWOrder.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsImergeMap+ {-# LINE 1193 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 149, column 3)+ _classContexts =+ ({-# LINE 149 "src-ag/KWOrder.ag" #-}+ Map.findWithDefault [] nt_ _lhsIclassContexts+ {-# LINE 1199 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 270, column 31)+ _prodsOmanualDeps =+ ({-# LINE 270 "src-ag/KWOrder.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsImanualDeps+ {-# LINE 1205 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 325, column 18)+ _synvertices =+ ({-# LINE 325 "src-ag/KWOrder.ag" #-}+ map (VAttr Syn nt_) . Map.keys $ syn_+ {-# LINE 1211 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 326, column 18)+ _inhvertices =+ ({-# LINE 326 "src-ag/KWOrder.ag" #-}+ map (VAttr Inh nt_) . Map.keys $ inh_+ {-# LINE 1217 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 327, column 18)+ _vertices =+ ({-# LINE 327 "src-ag/KWOrder.ag" #-}+ _synvertices ++ _inhvertices+ {-# LINE 1223 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 331, column 18)+ _nontgraph =+ ({-# LINE 331 "src-ag/KWOrder.ag" #-}+ NontDependencyGraph { ndgVertices = _vertices+ , ndgEdges = [] }+ {-# LINE 1230 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 339, column 18)+ _lhsOdepinfo =+ ({-# LINE 339 "src-ag/KWOrder.ag" #-}+ NontDependencyInformation { ndiNonterminal = nt_+ , ndiParams = params_+ , ndiInh = Map.keys inh_+ , ndiSyn = Map.keys syn_+ , ndiDepGraph = _nontgraph+ , ndiProds = _prodsIdepgraph+ , ndiRecursive = _recursive+ , ndiHoInfo = _hoInfo+ , ndiClassCtxs = _classContexts+ }+ {-# LINE 1245 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 377, column 17)+ _lhsOinhmap =+ ({-# LINE 377 "src-ag/KWOrder.ag" #-}+ Map.singleton nt_ inh_+ {-# LINE 1251 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 378, column 17)+ _lhsOsynmap =+ ({-# LINE 378 "src-ag/KWOrder.ag" #-}+ Map.singleton nt_ syn_+ {-# LINE 1257 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 387, column 32)+ _lhsOlocalSigMap =+ ({-# LINE 387 "src-ag/KWOrder.ag" #-}+ Map.singleton nt_ _prodsIlocalSigMap+ {-# LINE 1263 "dist/build/KWOrder" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 7, column 18)+ _lhsOinhMap' =+ ({-# LINE 7 "src-ag/DistChildAttr.ag" #-}+ Map.singleton nt_ inh_+ {-# LINE 1269 "dist/build/KWOrder" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 8, column 18)+ _lhsOsynMap' =+ ({-# LINE 8 "src-ag/DistChildAttr.ag" #-}+ Map.singleton nt_ syn_+ {-# LINE 1275 "dist/build/KWOrder" #-}+ )+ -- copy rule (up)+ _lhsOrulenumber =+ ({-# LINE 41 "src-ag/KWOrder.ag" #-}+ _prodsIrulenumber+ {-# LINE 1281 "dist/build/KWOrder" #-}+ )+ -- copy rule (from local)+ _prodsOaroundMap =+ ({-# LINE 96 "src-ag/KWOrder.ag" #-}+ _aroundMap+ {-# LINE 1287 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _prodsOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 1293 "dist/build/KWOrder" #-}+ )+ -- copy rule (from local)+ _prodsOmergeMap =+ ({-# LINE 121 "src-ag/KWOrder.ag" #-}+ _mergeMap+ {-# LINE 1299 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _prodsOoptions =+ ({-# LINE 34 "src-ag/KWOrder.ag" #-}+ _lhsIoptions+ {-# LINE 1305 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _prodsOrulenumber =+ ({-# LINE 41 "src-ag/KWOrder.ag" #-}+ _lhsIrulenumber+ {-# LINE 1311 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _prodsOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 1317 "dist/build/KWOrder" #-}+ )+ ( _prodsIdepgraph,_prodsIlocalSigMap,_prodsIrefHoNts,_prodsIrefNts,_prodsIrulenumber) =+ prods_ _prodsOaroundMap _prodsOinhMap _prodsOmanualDeps _prodsOmergeMap _prodsOoptions _prodsOrulenumber _prodsOsynMap+ in ( _lhsOdepinfo,_lhsOinhMap',_lhsOinhmap,_lhsOlocalSigMap,_lhsOntDeps,_lhsOntHoDeps,_lhsOrulenumber,_lhsOsynMap',_lhsOsynmap))))+-- Nonterminals ------------------------------------------------+{-+ visit 0:+ inherited attributes:+ aroundMap : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ classContexts : ContextMap+ closedHoNtDeps : Map NontermIdent (Set NontermIdent)+ closedHoNtRevDeps : Map NontermIdent (Set NontermIdent)+ closedNtDeps : Map NontermIdent (Set NontermIdent)+ inhMap : Map Identifier Attributes+ manualDeps : AttrOrderMap+ mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))+ options : Options+ synMap : Map Identifier Attributes+ chained attribute:+ rulenumber : Int+ synthesized attributes:+ depinfo : [NontDependencyInformation]+ inhMap' : Map Identifier Attributes+ inhmap : Map.Map NontermIdent Attributes+ localSigMap : Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))+ ntDeps : Map NontermIdent (Set NontermIdent)+ ntHoDeps : Map NontermIdent (Set NontermIdent)+ synMap' : Map Identifier Attributes+ synmap : Map.Map NontermIdent Attributes+ alternatives:+ alternative Cons:+ child hd : Nonterminal + child tl : Nonterminals + alternative Nil:+-}+-- cata+sem_Nonterminals :: Nonterminals ->+ T_Nonterminals+sem_Nonterminals list =+ (Prelude.foldr sem_Nonterminals_Cons sem_Nonterminals_Nil (Prelude.map sem_Nonterminal list))+-- semantic domain+newtype T_Nonterminals = T_Nonterminals ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ ContextMap ->+ (Map NontermIdent (Set NontermIdent)) ->+ (Map NontermIdent (Set NontermIdent)) ->+ (Map NontermIdent (Set NontermIdent)) ->+ (Map Identifier Attributes) ->+ AttrOrderMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->+ Options ->+ Int ->+ (Map Identifier Attributes) ->+ ( ([NontDependencyInformation]),(Map Identifier Attributes),(Map.Map NontermIdent Attributes),(Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))),(Map NontermIdent (Set NontermIdent)),(Map NontermIdent (Set NontermIdent)),Int,(Map Identifier Attributes),(Map.Map NontermIdent Attributes)))+data Inh_Nonterminals = Inh_Nonterminals {aroundMap_Inh_Nonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))),classContexts_Inh_Nonterminals :: ContextMap,closedHoNtDeps_Inh_Nonterminals :: (Map NontermIdent (Set NontermIdent)),closedHoNtRevDeps_Inh_Nonterminals :: (Map NontermIdent (Set NontermIdent)),closedNtDeps_Inh_Nonterminals :: (Map NontermIdent (Set NontermIdent)),inhMap_Inh_Nonterminals :: (Map Identifier Attributes),manualDeps_Inh_Nonterminals :: AttrOrderMap,mergeMap_Inh_Nonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))),options_Inh_Nonterminals :: Options,rulenumber_Inh_Nonterminals :: Int,synMap_Inh_Nonterminals :: (Map Identifier Attributes)}+data Syn_Nonterminals = Syn_Nonterminals {depinfo_Syn_Nonterminals :: ([NontDependencyInformation]),inhMap'_Syn_Nonterminals :: (Map Identifier Attributes),inhmap_Syn_Nonterminals :: (Map.Map NontermIdent Attributes),localSigMap_Syn_Nonterminals :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))),ntDeps_Syn_Nonterminals :: (Map NontermIdent (Set NontermIdent)),ntHoDeps_Syn_Nonterminals :: (Map NontermIdent (Set NontermIdent)),rulenumber_Syn_Nonterminals :: Int,synMap'_Syn_Nonterminals :: (Map Identifier Attributes),synmap_Syn_Nonterminals :: (Map.Map NontermIdent Attributes)}+wrap_Nonterminals :: T_Nonterminals ->+ Inh_Nonterminals ->+ Syn_Nonterminals+wrap_Nonterminals (T_Nonterminals sem) (Inh_Nonterminals _lhsIaroundMap _lhsIclassContexts _lhsIclosedHoNtDeps _lhsIclosedHoNtRevDeps _lhsIclosedNtDeps _lhsIinhMap _lhsImanualDeps _lhsImergeMap _lhsIoptions _lhsIrulenumber _lhsIsynMap) =+ (let ( _lhsOdepinfo,_lhsOinhMap',_lhsOinhmap,_lhsOlocalSigMap,_lhsOntDeps,_lhsOntHoDeps,_lhsOrulenumber,_lhsOsynMap',_lhsOsynmap) = sem _lhsIaroundMap _lhsIclassContexts _lhsIclosedHoNtDeps _lhsIclosedHoNtRevDeps _lhsIclosedNtDeps _lhsIinhMap _lhsImanualDeps _lhsImergeMap _lhsIoptions _lhsIrulenumber _lhsIsynMap+ in (Syn_Nonterminals _lhsOdepinfo _lhsOinhMap' _lhsOinhmap _lhsOlocalSigMap _lhsOntDeps _lhsOntHoDeps _lhsOrulenumber _lhsOsynMap' _lhsOsynmap))+sem_Nonterminals_Cons :: T_Nonterminal ->+ T_Nonterminals ->+ T_Nonterminals+sem_Nonterminals_Cons (T_Nonterminal hd_) (T_Nonterminals tl_) =+ (T_Nonterminals (\ _lhsIaroundMap+ _lhsIclassContexts+ _lhsIclosedHoNtDeps+ _lhsIclosedHoNtRevDeps+ _lhsIclosedNtDeps+ _lhsIinhMap+ _lhsImanualDeps+ _lhsImergeMap+ _lhsIoptions+ _lhsIrulenumber+ _lhsIsynMap ->+ (let _lhsOdepinfo :: ([NontDependencyInformation])+ _lhsOinhMap' :: (Map Identifier Attributes)+ _lhsOinhmap :: (Map.Map NontermIdent Attributes)+ _lhsOlocalSigMap :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type)))+ _lhsOntDeps :: (Map NontermIdent (Set NontermIdent))+ _lhsOntHoDeps :: (Map NontermIdent (Set NontermIdent))+ _lhsOsynMap' :: (Map Identifier Attributes)+ _lhsOsynmap :: (Map.Map NontermIdent Attributes)+ _lhsOrulenumber :: Int+ _hdOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))+ _hdOclassContexts :: ContextMap+ _hdOclosedHoNtDeps :: (Map NontermIdent (Set NontermIdent))+ _hdOclosedHoNtRevDeps :: (Map NontermIdent (Set NontermIdent))+ _hdOclosedNtDeps :: (Map NontermIdent (Set NontermIdent))+ _hdOinhMap :: (Map Identifier Attributes)+ _hdOmanualDeps :: AttrOrderMap+ _hdOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))))+ _hdOoptions :: Options+ _hdOrulenumber :: Int+ _hdOsynMap :: (Map Identifier Attributes)+ _tlOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))+ _tlOclassContexts :: ContextMap+ _tlOclosedHoNtDeps :: (Map NontermIdent (Set NontermIdent))+ _tlOclosedHoNtRevDeps :: (Map NontermIdent (Set NontermIdent))+ _tlOclosedNtDeps :: (Map NontermIdent (Set NontermIdent))+ _tlOinhMap :: (Map Identifier Attributes)+ _tlOmanualDeps :: AttrOrderMap+ _tlOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))))+ _tlOoptions :: Options+ _tlOrulenumber :: Int+ _tlOsynMap :: (Map Identifier Attributes)+ _hdIdepinfo :: NontDependencyInformation+ _hdIinhMap' :: (Map Identifier Attributes)+ _hdIinhmap :: (Map.Map NontermIdent Attributes)+ _hdIlocalSigMap :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type)))+ _hdIntDeps :: (Map NontermIdent (Set NontermIdent))+ _hdIntHoDeps :: (Map NontermIdent (Set NontermIdent))+ _hdIrulenumber :: Int+ _hdIsynMap' :: (Map Identifier Attributes)+ _hdIsynmap :: (Map.Map NontermIdent Attributes)+ _tlIdepinfo :: ([NontDependencyInformation])+ _tlIinhMap' :: (Map Identifier Attributes)+ _tlIinhmap :: (Map.Map NontermIdent Attributes)+ _tlIlocalSigMap :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type)))+ _tlIntDeps :: (Map NontermIdent (Set NontermIdent))+ _tlIntHoDeps :: (Map NontermIdent (Set NontermIdent))+ _tlIrulenumber :: Int+ _tlIsynMap' :: (Map Identifier Attributes)+ _tlIsynmap :: (Map.Map NontermIdent Attributes)+ -- use rule "src-ag/KWOrder.ag"(line 336, column 33)+ _lhsOdepinfo =+ ({-# LINE 336 "src-ag/KWOrder.ag" #-}+ _hdIdepinfo : _tlIdepinfo+ {-# LINE 1447 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)+ _lhsOinhMap' =+ ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ _hdIinhMap' `Map.union` _tlIinhMap'+ {-# LINE 1453 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 371, column 33)+ _lhsOinhmap =+ ({-# LINE 371 "src-ag/KWOrder.ag" #-}+ _hdIinhmap `Map.union` _tlIinhmap+ {-# LINE 1459 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 383, column 57)+ _lhsOlocalSigMap =+ ({-# LINE 383 "src-ag/KWOrder.ag" #-}+ _hdIlocalSigMap `Map.union` _tlIlocalSigMap+ {-# LINE 1465 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 54, column 54)+ _lhsOntDeps =+ ({-# LINE 54 "src-ag/KWOrder.ag" #-}+ _hdIntDeps `mappend` _tlIntDeps+ {-# LINE 1471 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 54, column 54)+ _lhsOntHoDeps =+ ({-# LINE 54 "src-ag/KWOrder.ag" #-}+ _hdIntHoDeps `mappend` _tlIntHoDeps+ {-# LINE 1477 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)+ _lhsOsynMap' =+ ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ _hdIsynMap' `Map.union` _tlIsynMap'+ {-# LINE 1483 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 372, column 33)+ _lhsOsynmap =+ ({-# LINE 372 "src-ag/KWOrder.ag" #-}+ _hdIsynmap `Map.union` _tlIsynmap+ {-# LINE 1489 "dist/build/KWOrder" #-}+ )+ -- copy rule (up)+ _lhsOrulenumber =+ ({-# LINE 41 "src-ag/KWOrder.ag" #-}+ _tlIrulenumber+ {-# LINE 1495 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOaroundMap =+ ({-# LINE 93 "src-ag/KWOrder.ag" #-}+ _lhsIaroundMap+ {-# LINE 1501 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOclassContexts =+ ({-# LINE 143 "src-ag/KWOrder.ag" #-}+ _lhsIclassContexts+ {-# LINE 1507 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOclosedHoNtDeps =+ ({-# LINE 55 "src-ag/KWOrder.ag" #-}+ _lhsIclosedHoNtDeps+ {-# LINE 1513 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOclosedHoNtRevDeps =+ ({-# LINE 55 "src-ag/KWOrder.ag" #-}+ _lhsIclosedHoNtRevDeps+ {-# LINE 1519 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOclosedNtDeps =+ ({-# LINE 55 "src-ag/KWOrder.ag" #-}+ _lhsIclosedNtDeps+ {-# LINE 1525 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 1531 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOmanualDeps =+ ({-# LINE 266 "src-ag/KWOrder.ag" #-}+ _lhsImanualDeps+ {-# LINE 1537 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 118 "src-ag/KWOrder.ag" #-}+ _lhsImergeMap+ {-# LINE 1543 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 34 "src-ag/KWOrder.ag" #-}+ _lhsIoptions+ {-# LINE 1549 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOrulenumber =+ ({-# LINE 41 "src-ag/KWOrder.ag" #-}+ _lhsIrulenumber+ {-# LINE 1555 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 1561 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOaroundMap =+ ({-# LINE 93 "src-ag/KWOrder.ag" #-}+ _lhsIaroundMap+ {-# LINE 1567 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOclassContexts =+ ({-# LINE 143 "src-ag/KWOrder.ag" #-}+ _lhsIclassContexts+ {-# LINE 1573 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOclosedHoNtDeps =+ ({-# LINE 55 "src-ag/KWOrder.ag" #-}+ _lhsIclosedHoNtDeps+ {-# LINE 1579 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOclosedHoNtRevDeps =+ ({-# LINE 55 "src-ag/KWOrder.ag" #-}+ _lhsIclosedHoNtRevDeps+ {-# LINE 1585 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOclosedNtDeps =+ ({-# LINE 55 "src-ag/KWOrder.ag" #-}+ _lhsIclosedNtDeps+ {-# LINE 1591 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 1597 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOmanualDeps =+ ({-# LINE 266 "src-ag/KWOrder.ag" #-}+ _lhsImanualDeps+ {-# LINE 1603 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 118 "src-ag/KWOrder.ag" #-}+ _lhsImergeMap+ {-# LINE 1609 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 34 "src-ag/KWOrder.ag" #-}+ _lhsIoptions+ {-# LINE 1615 "dist/build/KWOrder" #-}+ )+ -- copy rule (chain)+ _tlOrulenumber =+ ({-# LINE 41 "src-ag/KWOrder.ag" #-}+ _hdIrulenumber+ {-# LINE 1621 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 1627 "dist/build/KWOrder" #-}+ )+ ( _hdIdepinfo,_hdIinhMap',_hdIinhmap,_hdIlocalSigMap,_hdIntDeps,_hdIntHoDeps,_hdIrulenumber,_hdIsynMap',_hdIsynmap) =+ hd_ _hdOaroundMap _hdOclassContexts _hdOclosedHoNtDeps _hdOclosedHoNtRevDeps _hdOclosedNtDeps _hdOinhMap _hdOmanualDeps _hdOmergeMap _hdOoptions _hdOrulenumber _hdOsynMap+ ( _tlIdepinfo,_tlIinhMap',_tlIinhmap,_tlIlocalSigMap,_tlIntDeps,_tlIntHoDeps,_tlIrulenumber,_tlIsynMap',_tlIsynmap) =+ tl_ _tlOaroundMap _tlOclassContexts _tlOclosedHoNtDeps _tlOclosedHoNtRevDeps _tlOclosedNtDeps _tlOinhMap _tlOmanualDeps _tlOmergeMap _tlOoptions _tlOrulenumber _tlOsynMap+ in ( _lhsOdepinfo,_lhsOinhMap',_lhsOinhmap,_lhsOlocalSigMap,_lhsOntDeps,_lhsOntHoDeps,_lhsOrulenumber,_lhsOsynMap',_lhsOsynmap))))+sem_Nonterminals_Nil :: T_Nonterminals+sem_Nonterminals_Nil =+ (T_Nonterminals (\ _lhsIaroundMap+ _lhsIclassContexts+ _lhsIclosedHoNtDeps+ _lhsIclosedHoNtRevDeps+ _lhsIclosedNtDeps+ _lhsIinhMap+ _lhsImanualDeps+ _lhsImergeMap+ _lhsIoptions+ _lhsIrulenumber+ _lhsIsynMap ->+ (let _lhsOdepinfo :: ([NontDependencyInformation])+ _lhsOinhMap' :: (Map Identifier Attributes)+ _lhsOinhmap :: (Map.Map NontermIdent Attributes)+ _lhsOlocalSigMap :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type)))+ _lhsOntDeps :: (Map NontermIdent (Set NontermIdent))+ _lhsOntHoDeps :: (Map NontermIdent (Set NontermIdent))+ _lhsOsynMap' :: (Map Identifier Attributes)+ _lhsOsynmap :: (Map.Map NontermIdent Attributes)+ _lhsOrulenumber :: Int+ -- use rule "src-ag/KWOrder.ag"(line 336, column 33)+ _lhsOdepinfo =+ ({-# LINE 336 "src-ag/KWOrder.ag" #-}+ []+ {-# LINE 1660 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)+ _lhsOinhMap' =+ ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ Map.empty+ {-# LINE 1666 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 371, column 33)+ _lhsOinhmap =+ ({-# LINE 371 "src-ag/KWOrder.ag" #-}+ Map.empty+ {-# LINE 1672 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 383, column 57)+ _lhsOlocalSigMap =+ ({-# LINE 383 "src-ag/KWOrder.ag" #-}+ Map.empty+ {-# LINE 1678 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 54, column 54)+ _lhsOntDeps =+ ({-# LINE 54 "src-ag/KWOrder.ag" #-}+ mempty+ {-# LINE 1684 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 54, column 54)+ _lhsOntHoDeps =+ ({-# LINE 54 "src-ag/KWOrder.ag" #-}+ mempty+ {-# LINE 1690 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)+ _lhsOsynMap' =+ ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ Map.empty+ {-# LINE 1696 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 372, column 33)+ _lhsOsynmap =+ ({-# LINE 372 "src-ag/KWOrder.ag" #-}+ Map.empty+ {-# LINE 1702 "dist/build/KWOrder" #-}+ )+ -- copy rule (chain)+ _lhsOrulenumber =+ ({-# LINE 41 "src-ag/KWOrder.ag" #-}+ _lhsIrulenumber+ {-# LINE 1708 "dist/build/KWOrder" #-}+ )+ in ( _lhsOdepinfo,_lhsOinhMap',_lhsOinhmap,_lhsOlocalSigMap,_lhsOntDeps,_lhsOntHoDeps,_lhsOrulenumber,_lhsOsynMap',_lhsOsynmap))))+-- Pattern -----------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ copy : Pattern + vertices : Set.Set Vertex+ alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + visit 0:+ local vertex : _+ 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) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat))+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,(Set.Set Vertex)))+data Inh_Pattern = Inh_Pattern {}+data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: Pattern,vertices_Syn_Pattern :: (Set.Set Vertex)}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern+wrap_Pattern (T_Pattern sem) (Inh_Pattern) =+ (let ( _lhsOcopy,_lhsOvertices) = sem+ in (Syn_Pattern _lhsOcopy _lhsOvertices))+sem_Pattern_Alias :: Identifier ->+ Identifier ->+ T_Pattern ->+ T_Pattern+sem_Pattern_Alias field_ attr_ (T_Pattern pat_) =+ (T_Pattern (let _lhsOvertices :: (Set.Set Vertex)+ _lhsOcopy :: Pattern+ _patIcopy :: Pattern+ _patIvertices :: (Set.Set Vertex)+ -- "src-ag/KWOrder.ag"(line 205, column 12)+ _vertex =+ ({-# LINE 205 "src-ag/KWOrder.ag" #-}+ if field_ == _INST then VChild attr_+ else VAttr (if field_ == _LHS then Syn+ else if field_ == _LOC then Loc+ else Inh) field_ attr_+ {-# LINE 1783 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 209, column 12)+ _lhsOvertices =+ ({-# LINE 209 "src-ag/KWOrder.ag" #-}+ Set.insert _vertex _patIvertices+ {-# LINE 1789 "dist/build/KWOrder" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Alias field_ attr_ _patIcopy+ {-# LINE 1795 "dist/build/KWOrder" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1801 "dist/build/KWOrder" #-}+ )+ ( _patIcopy,_patIvertices) =+ pat_+ in ( _lhsOcopy,_lhsOvertices)))+sem_Pattern_Constr :: ConstructorIdent ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Constr name_ (T_Patterns pats_) =+ (T_Pattern (let _lhsOvertices :: (Set.Set Vertex)+ _lhsOcopy :: Pattern+ _patsIcopy :: Patterns+ _patsIvertices :: (Set.Set Vertex)+ -- use rule "src-ag/KWOrder.ag"(line 189, column 36)+ _lhsOvertices =+ ({-# LINE 189 "src-ag/KWOrder.ag" #-}+ _patsIvertices+ {-# LINE 1818 "dist/build/KWOrder" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 1824 "dist/build/KWOrder" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1830 "dist/build/KWOrder" #-}+ )+ ( _patsIcopy,_patsIvertices) =+ pats_+ in ( _lhsOcopy,_lhsOvertices)))+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern+sem_Pattern_Irrefutable (T_Pattern pat_) =+ (T_Pattern (let _lhsOvertices :: (Set.Set Vertex)+ _lhsOcopy :: Pattern+ _patIcopy :: Pattern+ _patIvertices :: (Set.Set Vertex)+ -- use rule "src-ag/KWOrder.ag"(line 189, column 36)+ _lhsOvertices =+ ({-# LINE 189 "src-ag/KWOrder.ag" #-}+ _patIvertices+ {-# LINE 1846 "dist/build/KWOrder" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 1852 "dist/build/KWOrder" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1858 "dist/build/KWOrder" #-}+ )+ ( _patIcopy,_patIvertices) =+ pat_+ in ( _lhsOcopy,_lhsOvertices)))+sem_Pattern_Product :: Pos ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Product pos_ (T_Patterns pats_) =+ (T_Pattern (let _lhsOvertices :: (Set.Set Vertex)+ _lhsOcopy :: Pattern+ _patsIcopy :: Patterns+ _patsIvertices :: (Set.Set Vertex)+ -- use rule "src-ag/KWOrder.ag"(line 189, column 36)+ _lhsOvertices =+ ({-# LINE 189 "src-ag/KWOrder.ag" #-}+ _patsIvertices+ {-# LINE 1875 "dist/build/KWOrder" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 1881 "dist/build/KWOrder" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1887 "dist/build/KWOrder" #-}+ )+ ( _patsIcopy,_patsIvertices) =+ pats_+ in ( _lhsOcopy,_lhsOvertices)))+sem_Pattern_Underscore :: Pos ->+ T_Pattern+sem_Pattern_Underscore pos_ =+ (T_Pattern (let _lhsOvertices :: (Set.Set Vertex)+ _lhsOcopy :: Pattern+ -- use rule "src-ag/KWOrder.ag"(line 189, column 36)+ _lhsOvertices =+ ({-# LINE 189 "src-ag/KWOrder.ag" #-}+ Set.empty+ {-# LINE 1901 "dist/build/KWOrder" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Underscore pos_+ {-# LINE 1907 "dist/build/KWOrder" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1913 "dist/build/KWOrder" #-}+ )+ in ( _lhsOcopy,_lhsOvertices)))+-- Patterns ----------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ copy : Patterns + vertices : Set.Set Vertex+ 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,(Set.Set Vertex)))+data Inh_Patterns = Inh_Patterns {}+data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: Patterns,vertices_Syn_Patterns :: (Set.Set Vertex)}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns+wrap_Patterns (T_Patterns sem) (Inh_Patterns) =+ (let ( _lhsOcopy,_lhsOvertices) = sem+ in (Syn_Patterns _lhsOcopy _lhsOvertices))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns+sem_Patterns_Cons (T_Pattern hd_) (T_Patterns tl_) =+ (T_Patterns (let _lhsOvertices :: (Set.Set Vertex)+ _lhsOcopy :: Patterns+ _hdIcopy :: Pattern+ _hdIvertices :: (Set.Set Vertex)+ _tlIcopy :: Patterns+ _tlIvertices :: (Set.Set Vertex)+ -- use rule "src-ag/KWOrder.ag"(line 189, column 36)+ _lhsOvertices =+ ({-# LINE 189 "src-ag/KWOrder.ag" #-}+ _hdIvertices `Set.union` _tlIvertices+ {-# LINE 1961 "dist/build/KWOrder" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 1967 "dist/build/KWOrder" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1973 "dist/build/KWOrder" #-}+ )+ ( _hdIcopy,_hdIvertices) =+ hd_+ ( _tlIcopy,_tlIvertices) =+ tl_+ in ( _lhsOcopy,_lhsOvertices)))+sem_Patterns_Nil :: T_Patterns+sem_Patterns_Nil =+ (T_Patterns (let _lhsOvertices :: (Set.Set Vertex)+ _lhsOcopy :: Patterns+ -- use rule "src-ag/KWOrder.ag"(line 189, column 36)+ _lhsOvertices =+ ({-# LINE 189 "src-ag/KWOrder.ag" #-}+ Set.empty+ {-# LINE 1988 "dist/build/KWOrder" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ []+ {-# LINE 1994 "dist/build/KWOrder" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 2000 "dist/build/KWOrder" #-}+ )+ in ( _lhsOcopy,_lhsOvertices)))+-- Production --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ aroundMap : Map ConstructorIdent (Map Identifier [Expression])+ inhMap : Map Identifier Attributes+ manualDeps : Map ConstructorIdent (Set Dependency)+ mergeMap : Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))+ options : Options+ synMap : Map Identifier Attributes+ chained attribute:+ rulenumber : Int+ synthesized attributes:+ depgraph : ProdDependencyGraph+ localSigMap : Map.Map ConstructorIdent (Map.Map Identifier Type)+ refHoNts : Set NontermIdent+ refNts : Set NontermIdent+ alternatives:+ alternative Production:+ child con : {ConstructorIdent}+ child params : {[Identifier]}+ child constraints : {[Type]}+ child children : Children + child rules : Rules + child typeSigs : TypeSigs + child macro : {MaybeMacro}+ visit 0:+ local aroundMap : _+ local mergeMap : _+ local mergedChildren : _+ local vertices : _+ local manualDeps : _+ local manualEdges : _+ local edges : _+-}+-- cata+sem_Production :: Production ->+ T_Production+sem_Production (Production _con _params _constraints _children _rules _typeSigs _macro) =+ (sem_Production_Production _con _params _constraints (sem_Children _children) (sem_Rules _rules) (sem_TypeSigs _typeSigs) _macro)+-- semantic domain+newtype T_Production = T_Production ((Map ConstructorIdent (Map Identifier [Expression])) ->+ (Map Identifier Attributes) ->+ (Map ConstructorIdent (Set Dependency)) ->+ (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))) ->+ Options ->+ Int ->+ (Map Identifier Attributes) ->+ ( ProdDependencyGraph,(Map.Map ConstructorIdent (Map.Map Identifier Type)),(Set NontermIdent),(Set NontermIdent),Int))+data Inh_Production = Inh_Production {aroundMap_Inh_Production :: (Map ConstructorIdent (Map Identifier [Expression])),inhMap_Inh_Production :: (Map Identifier Attributes),manualDeps_Inh_Production :: (Map ConstructorIdent (Set Dependency)),mergeMap_Inh_Production :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))),options_Inh_Production :: Options,rulenumber_Inh_Production :: Int,synMap_Inh_Production :: (Map Identifier Attributes)}+data Syn_Production = Syn_Production {depgraph_Syn_Production :: ProdDependencyGraph,localSigMap_Syn_Production :: (Map.Map ConstructorIdent (Map.Map Identifier Type)),refHoNts_Syn_Production :: (Set NontermIdent),refNts_Syn_Production :: (Set NontermIdent),rulenumber_Syn_Production :: Int}+wrap_Production :: T_Production ->+ Inh_Production ->+ Syn_Production+wrap_Production (T_Production sem) (Inh_Production _lhsIaroundMap _lhsIinhMap _lhsImanualDeps _lhsImergeMap _lhsIoptions _lhsIrulenumber _lhsIsynMap) =+ (let ( _lhsOdepgraph,_lhsOlocalSigMap,_lhsOrefHoNts,_lhsOrefNts,_lhsOrulenumber) = sem _lhsIaroundMap _lhsIinhMap _lhsImanualDeps _lhsImergeMap _lhsIoptions _lhsIrulenumber _lhsIsynMap+ in (Syn_Production _lhsOdepgraph _lhsOlocalSigMap _lhsOrefHoNts _lhsOrefNts _lhsOrulenumber))+sem_Production_Production :: ConstructorIdent ->+ ([Identifier]) ->+ ([Type]) ->+ T_Children ->+ T_Rules ->+ T_TypeSigs ->+ MaybeMacro ->+ T_Production+sem_Production_Production con_ params_ constraints_ (T_Children children_) (T_Rules rules_) (T_TypeSigs typeSigs_) macro_ =+ (T_Production (\ _lhsIaroundMap+ _lhsIinhMap+ _lhsImanualDeps+ _lhsImergeMap+ _lhsIoptions+ _lhsIrulenumber+ _lhsIsynMap ->+ (let _lhsOdepgraph :: ProdDependencyGraph+ _lhsOlocalSigMap :: (Map.Map ConstructorIdent (Map.Map Identifier Type))+ _lhsOrefHoNts :: (Set NontermIdent)+ _lhsOrefNts :: (Set NontermIdent)+ _lhsOrulenumber :: Int+ _childrenOaroundMap :: (Map Identifier [Expression])+ _childrenOinhMap :: (Map Identifier Attributes)+ _childrenOmergeMap :: (Map Identifier (Identifier, [Identifier], Expression))+ _childrenOmergedChildren :: (Set Identifier)+ _childrenOoptions :: Options+ _childrenOsynMap :: (Map Identifier Attributes)+ _rulesOrulenumber :: Int+ _childrenIechilds :: EChildren+ _childrenIedges :: (Set.Set Edge)+ _childrenInontnames :: ([(Identifier, Identifier)])+ _childrenIrefHoNts :: (Set NontermIdent)+ _childrenIrefNts :: (Set NontermIdent)+ _childrenIvertices :: (Set.Set Vertex)+ _rulesIedges :: (Set.Set Edge)+ _rulesIerules :: ERules+ _rulesIrulenumber :: Int+ _rulesIvertices :: (Set.Set Vertex)+ _typeSigsIlocalSigMap :: (Map Identifier Type)+ -- "src-ag/KWOrder.ag"(line 102, column 32)+ _aroundMap =+ ({-# LINE 102 "src-ag/KWOrder.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsIaroundMap+ {-# LINE 2103 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 127, column 32)+ _mergeMap =+ ({-# LINE 127 "src-ag/KWOrder.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsImergeMap+ {-# LINE 2109 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 133, column 3)+ _mergedChildren =+ ({-# LINE 133 "src-ag/KWOrder.ag" #-}+ Set.unions [ Set.fromList ms | (_,ms,_) <- Map.elems _mergeMap ]+ {-# LINE 2115 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 229, column 17)+ _vertices =+ ({-# LINE 229 "src-ag/KWOrder.ag" #-}+ _rulesIvertices `Set.union` _childrenIvertices+ {-# LINE 2121 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 272, column 3)+ _manualDeps =+ ({-# LINE 272 "src-ag/KWOrder.ag" #-}+ Map.findWithDefault Set.empty con_ _lhsImanualDeps+ {-# LINE 2127 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 273, column 3)+ _manualEdges =+ ({-# LINE 273 "src-ag/KWOrder.ag" #-}+ Set.map depToEdge _manualDeps+ {-# LINE 2133 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 295, column 17)+ _edges =+ ({-# LINE 295 "src-ag/KWOrder.ag" #-}+ _rulesIedges `Set.union` _childrenIedges+ {-# LINE 2139 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 310, column 17)+ _lhsOdepgraph =+ ({-# LINE 310 "src-ag/KWOrder.ag" #-}+ ProdDependencyGraph { pdgVertices = Set.toList _vertices+ , pdgEdges = Set.toList _edges+ , pdgRules = _rulesIerules+ , pdgChilds = _childrenIechilds+ , pdgProduction = con_+ , pdgChildMap = _childrenInontnames+ , pdgConstraints = constraints_+ , pdgParams = params_ }+ {-# LINE 2152 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 388, column 32)+ _lhsOlocalSigMap =+ ({-# LINE 388 "src-ag/KWOrder.ag" #-}+ Map.singleton con_ _typeSigsIlocalSigMap+ {-# LINE 2158 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 56, column 67)+ _lhsOrefHoNts =+ ({-# LINE 56 "src-ag/KWOrder.ag" #-}+ _childrenIrefHoNts+ {-# LINE 2164 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 56, column 67)+ _lhsOrefNts =+ ({-# LINE 56 "src-ag/KWOrder.ag" #-}+ _childrenIrefNts+ {-# LINE 2170 "dist/build/KWOrder" #-}+ )+ -- copy rule (up)+ _lhsOrulenumber =+ ({-# LINE 41 "src-ag/KWOrder.ag" #-}+ _rulesIrulenumber+ {-# LINE 2176 "dist/build/KWOrder" #-}+ )+ -- copy rule (from local)+ _childrenOaroundMap =+ ({-# LINE 99 "src-ag/KWOrder.ag" #-}+ _aroundMap+ {-# LINE 2182 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _childrenOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 2188 "dist/build/KWOrder" #-}+ )+ -- copy rule (from local)+ _childrenOmergeMap =+ ({-# LINE 124 "src-ag/KWOrder.ag" #-}+ _mergeMap+ {-# LINE 2194 "dist/build/KWOrder" #-}+ )+ -- copy rule (from local)+ _childrenOmergedChildren =+ ({-# LINE 124 "src-ag/KWOrder.ag" #-}+ _mergedChildren+ {-# LINE 2200 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _childrenOoptions =+ ({-# LINE 34 "src-ag/KWOrder.ag" #-}+ _lhsIoptions+ {-# LINE 2206 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _childrenOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 2212 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _rulesOrulenumber =+ ({-# LINE 41 "src-ag/KWOrder.ag" #-}+ _lhsIrulenumber+ {-# LINE 2218 "dist/build/KWOrder" #-}+ )+ ( _childrenIechilds,_childrenIedges,_childrenInontnames,_childrenIrefHoNts,_childrenIrefNts,_childrenIvertices) =+ children_ _childrenOaroundMap _childrenOinhMap _childrenOmergeMap _childrenOmergedChildren _childrenOoptions _childrenOsynMap+ ( _rulesIedges,_rulesIerules,_rulesIrulenumber,_rulesIvertices) =+ rules_ _rulesOrulenumber+ ( _typeSigsIlocalSigMap) =+ typeSigs_+ in ( _lhsOdepgraph,_lhsOlocalSigMap,_lhsOrefHoNts,_lhsOrefNts,_lhsOrulenumber))))+-- Productions -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ aroundMap : Map ConstructorIdent (Map Identifier [Expression])+ inhMap : Map Identifier Attributes+ manualDeps : Map ConstructorIdent (Set Dependency)+ mergeMap : Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))+ options : Options+ synMap : Map Identifier Attributes+ chained attribute:+ rulenumber : Int+ synthesized attributes:+ depgraph : [ProdDependencyGraph]+ localSigMap : Map.Map ConstructorIdent (Map.Map Identifier Type)+ refHoNts : Set NontermIdent+ refNts : Set NontermIdent+ alternatives:+ alternative Cons:+ child hd : Production + child tl : Productions + alternative Nil:+-}+-- cata+sem_Productions :: Productions ->+ T_Productions+sem_Productions list =+ (Prelude.foldr sem_Productions_Cons sem_Productions_Nil (Prelude.map sem_Production list))+-- semantic domain+newtype T_Productions = T_Productions ((Map ConstructorIdent (Map Identifier [Expression])) ->+ (Map Identifier Attributes) ->+ (Map ConstructorIdent (Set Dependency)) ->+ (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))) ->+ Options ->+ Int ->+ (Map Identifier Attributes) ->+ ( ([ProdDependencyGraph]),(Map.Map ConstructorIdent (Map.Map Identifier Type)),(Set NontermIdent),(Set NontermIdent),Int))+data Inh_Productions = Inh_Productions {aroundMap_Inh_Productions :: (Map ConstructorIdent (Map Identifier [Expression])),inhMap_Inh_Productions :: (Map Identifier Attributes),manualDeps_Inh_Productions :: (Map ConstructorIdent (Set Dependency)),mergeMap_Inh_Productions :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))),options_Inh_Productions :: Options,rulenumber_Inh_Productions :: Int,synMap_Inh_Productions :: (Map Identifier Attributes)}+data Syn_Productions = Syn_Productions {depgraph_Syn_Productions :: ([ProdDependencyGraph]),localSigMap_Syn_Productions :: (Map.Map ConstructorIdent (Map.Map Identifier Type)),refHoNts_Syn_Productions :: (Set NontermIdent),refNts_Syn_Productions :: (Set NontermIdent),rulenumber_Syn_Productions :: Int}+wrap_Productions :: T_Productions ->+ Inh_Productions ->+ Syn_Productions+wrap_Productions (T_Productions sem) (Inh_Productions _lhsIaroundMap _lhsIinhMap _lhsImanualDeps _lhsImergeMap _lhsIoptions _lhsIrulenumber _lhsIsynMap) =+ (let ( _lhsOdepgraph,_lhsOlocalSigMap,_lhsOrefHoNts,_lhsOrefNts,_lhsOrulenumber) = sem _lhsIaroundMap _lhsIinhMap _lhsImanualDeps _lhsImergeMap _lhsIoptions _lhsIrulenumber _lhsIsynMap+ in (Syn_Productions _lhsOdepgraph _lhsOlocalSigMap _lhsOrefHoNts _lhsOrefNts _lhsOrulenumber))+sem_Productions_Cons :: T_Production ->+ T_Productions ->+ T_Productions+sem_Productions_Cons (T_Production hd_) (T_Productions tl_) =+ (T_Productions (\ _lhsIaroundMap+ _lhsIinhMap+ _lhsImanualDeps+ _lhsImergeMap+ _lhsIoptions+ _lhsIrulenumber+ _lhsIsynMap ->+ (let _lhsOdepgraph :: ([ProdDependencyGraph])+ _lhsOlocalSigMap :: (Map.Map ConstructorIdent (Map.Map Identifier Type))+ _lhsOrefHoNts :: (Set NontermIdent)+ _lhsOrefNts :: (Set NontermIdent)+ _lhsOrulenumber :: Int+ _hdOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))+ _hdOinhMap :: (Map Identifier Attributes)+ _hdOmanualDeps :: (Map ConstructorIdent (Set Dependency))+ _hdOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))+ _hdOoptions :: Options+ _hdOrulenumber :: Int+ _hdOsynMap :: (Map Identifier Attributes)+ _tlOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))+ _tlOinhMap :: (Map Identifier Attributes)+ _tlOmanualDeps :: (Map ConstructorIdent (Set Dependency))+ _tlOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))+ _tlOoptions :: Options+ _tlOrulenumber :: Int+ _tlOsynMap :: (Map Identifier Attributes)+ _hdIdepgraph :: ProdDependencyGraph+ _hdIlocalSigMap :: (Map.Map ConstructorIdent (Map.Map Identifier Type))+ _hdIrefHoNts :: (Set NontermIdent)+ _hdIrefNts :: (Set NontermIdent)+ _hdIrulenumber :: Int+ _tlIdepgraph :: ([ProdDependencyGraph])+ _tlIlocalSigMap :: (Map.Map ConstructorIdent (Map.Map Identifier Type))+ _tlIrefHoNts :: (Set NontermIdent)+ _tlIrefNts :: (Set NontermIdent)+ _tlIrulenumber :: Int+ -- use rule "src-ag/KWOrder.ag"(line 307, column 33)+ _lhsOdepgraph =+ ({-# LINE 307 "src-ag/KWOrder.ag" #-}+ _hdIdepgraph : _tlIdepgraph+ {-# LINE 2316 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 384, column 57)+ _lhsOlocalSigMap =+ ({-# LINE 384 "src-ag/KWOrder.ag" #-}+ _hdIlocalSigMap `Map.union` _tlIlocalSigMap+ {-# LINE 2322 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 56, column 67)+ _lhsOrefHoNts =+ ({-# LINE 56 "src-ag/KWOrder.ag" #-}+ _hdIrefHoNts `mappend` _tlIrefHoNts+ {-# LINE 2328 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 56, column 67)+ _lhsOrefNts =+ ({-# LINE 56 "src-ag/KWOrder.ag" #-}+ _hdIrefNts `mappend` _tlIrefNts+ {-# LINE 2334 "dist/build/KWOrder" #-}+ )+ -- copy rule (up)+ _lhsOrulenumber =+ ({-# LINE 41 "src-ag/KWOrder.ag" #-}+ _tlIrulenumber+ {-# LINE 2340 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOaroundMap =+ ({-# LINE 96 "src-ag/KWOrder.ag" #-}+ _lhsIaroundMap+ {-# LINE 2346 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 2352 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOmanualDeps =+ ({-# LINE 267 "src-ag/KWOrder.ag" #-}+ _lhsImanualDeps+ {-# LINE 2358 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 121 "src-ag/KWOrder.ag" #-}+ _lhsImergeMap+ {-# LINE 2364 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 34 "src-ag/KWOrder.ag" #-}+ _lhsIoptions+ {-# LINE 2370 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOrulenumber =+ ({-# LINE 41 "src-ag/KWOrder.ag" #-}+ _lhsIrulenumber+ {-# LINE 2376 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 2382 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOaroundMap =+ ({-# LINE 96 "src-ag/KWOrder.ag" #-}+ _lhsIaroundMap+ {-# LINE 2388 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 2394 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOmanualDeps =+ ({-# LINE 267 "src-ag/KWOrder.ag" #-}+ _lhsImanualDeps+ {-# LINE 2400 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 121 "src-ag/KWOrder.ag" #-}+ _lhsImergeMap+ {-# LINE 2406 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 34 "src-ag/KWOrder.ag" #-}+ _lhsIoptions+ {-# LINE 2412 "dist/build/KWOrder" #-}+ )+ -- copy rule (chain)+ _tlOrulenumber =+ ({-# LINE 41 "src-ag/KWOrder.ag" #-}+ _hdIrulenumber+ {-# LINE 2418 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _tlOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 2424 "dist/build/KWOrder" #-}+ )+ ( _hdIdepgraph,_hdIlocalSigMap,_hdIrefHoNts,_hdIrefNts,_hdIrulenumber) =+ hd_ _hdOaroundMap _hdOinhMap _hdOmanualDeps _hdOmergeMap _hdOoptions _hdOrulenumber _hdOsynMap+ ( _tlIdepgraph,_tlIlocalSigMap,_tlIrefHoNts,_tlIrefNts,_tlIrulenumber) =+ tl_ _tlOaroundMap _tlOinhMap _tlOmanualDeps _tlOmergeMap _tlOoptions _tlOrulenumber _tlOsynMap+ in ( _lhsOdepgraph,_lhsOlocalSigMap,_lhsOrefHoNts,_lhsOrefNts,_lhsOrulenumber))))+sem_Productions_Nil :: T_Productions+sem_Productions_Nil =+ (T_Productions (\ _lhsIaroundMap+ _lhsIinhMap+ _lhsImanualDeps+ _lhsImergeMap+ _lhsIoptions+ _lhsIrulenumber+ _lhsIsynMap ->+ (let _lhsOdepgraph :: ([ProdDependencyGraph])+ _lhsOlocalSigMap :: (Map.Map ConstructorIdent (Map.Map Identifier Type))+ _lhsOrefHoNts :: (Set NontermIdent)+ _lhsOrefNts :: (Set NontermIdent)+ _lhsOrulenumber :: Int+ -- use rule "src-ag/KWOrder.ag"(line 307, column 33)+ _lhsOdepgraph =+ ({-# LINE 307 "src-ag/KWOrder.ag" #-}+ []+ {-# LINE 2449 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 384, column 57)+ _lhsOlocalSigMap =+ ({-# LINE 384 "src-ag/KWOrder.ag" #-}+ Map.empty+ {-# LINE 2455 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 56, column 67)+ _lhsOrefHoNts =+ ({-# LINE 56 "src-ag/KWOrder.ag" #-}+ mempty+ {-# LINE 2461 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 56, column 67)+ _lhsOrefNts =+ ({-# LINE 56 "src-ag/KWOrder.ag" #-}+ mempty+ {-# LINE 2467 "dist/build/KWOrder" #-}+ )+ -- copy rule (chain)+ _lhsOrulenumber =+ ({-# LINE 41 "src-ag/KWOrder.ag" #-}+ _lhsIrulenumber+ {-# LINE 2473 "dist/build/KWOrder" #-}+ )+ in ( _lhsOdepgraph,_lhsOlocalSigMap,_lhsOrefHoNts,_lhsOrefNts,_lhsOrulenumber))))+-- Rule --------------------------------------------------------+{-+ visit 0:+ chained attribute:+ rulenumber : Int+ synthesized attributes:+ edges : Set.Set Edge+ erules : ERule+ vertices : Set.Set Vertex+ alternatives:+ alternative Rule:+ child mbName : {Maybe Identifier}+ child pattern : Pattern + child rhs : Expression + child owrt : {Bool}+ child origin : {String}+ child explicit : {Bool}+ child pure : {Bool}+ child identity : {Bool}+ child mbError : {Maybe Error}+ child eager : {Bool}+ visit 0:+ local rulename : _+ local vertex : _+ local edgesout : _+ local edgesin : _+-}+-- cata+sem_Rule :: Rule ->+ T_Rule+sem_Rule (Rule _mbName _pattern _rhs _owrt _origin _explicit _pure _identity _mbError _eager) =+ (sem_Rule_Rule _mbName (sem_Pattern _pattern) (sem_Expression _rhs) _owrt _origin _explicit _pure _identity _mbError _eager)+-- semantic domain+newtype T_Rule = T_Rule (Int ->+ ( (Set.Set Edge),ERule,Int,(Set.Set Vertex)))+data Inh_Rule = Inh_Rule {rulenumber_Inh_Rule :: Int}+data Syn_Rule = Syn_Rule {edges_Syn_Rule :: (Set.Set Edge),erules_Syn_Rule :: ERule,rulenumber_Syn_Rule :: Int,vertices_Syn_Rule :: (Set.Set Vertex)}+wrap_Rule :: T_Rule ->+ Inh_Rule ->+ Syn_Rule+wrap_Rule (T_Rule sem) (Inh_Rule _lhsIrulenumber) =+ (let ( _lhsOedges,_lhsOerules,_lhsOrulenumber,_lhsOvertices) = sem _lhsIrulenumber+ in (Syn_Rule _lhsOedges _lhsOerules _lhsOrulenumber _lhsOvertices))+sem_Rule_Rule :: (Maybe Identifier) ->+ T_Pattern ->+ T_Expression ->+ Bool ->+ String ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Error) ->+ Bool ->+ T_Rule+sem_Rule_Rule mbName_ (T_Pattern pattern_) (T_Expression rhs_) owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_ =+ (T_Rule (\ _lhsIrulenumber ->+ (let _lhsOrulenumber :: Int+ _lhsOerules :: ERule+ _lhsOvertices :: (Set.Set Vertex)+ _lhsOedges :: (Set.Set Edge)+ _patternIcopy :: Pattern+ _patternIvertices :: (Set.Set Vertex)+ _rhsIcopy :: Expression+ _rhsIvertices :: (Set.Set Vertex)+ -- "src-ag/KWOrder.ag"(line 47, column 11)+ _lhsOrulenumber =+ ({-# LINE 47 "src-ag/KWOrder.ag" #-}+ _lhsIrulenumber + 1+ {-# LINE 2544 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 48, column 11)+ _rulename =+ ({-# LINE 48 "src-ag/KWOrder.ag" #-}+ maybe (identifier $ "rule" ++ show _lhsIrulenumber) id mbName_+ {-# LINE 2550 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 160, column 10)+ _lhsOerules =+ ({-# LINE 160 "src-ag/KWOrder.ag" #-}+ ERule _rulename+ _patternIcopy+ _rhsIcopy+ owrt_+ origin_+ explicit_+ pure_+ mbError_+ {-# LINE 2563 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 224, column 11)+ _vertex =+ ({-# LINE 224 "src-ag/KWOrder.ag" #-}+ VRule _rulename+ {-# LINE 2569 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 225, column 11)+ _lhsOvertices =+ ({-# LINE 225 "src-ag/KWOrder.ag" #-}+ Set.insert _vertex $ _patternIvertices `Set.union` _rhsIvertices+ {-# LINE 2575 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 237, column 11)+ _edgesout =+ ({-# LINE 237 "src-ag/KWOrder.ag" #-}+ map ((,) _vertex ) (Set.toList _rhsIvertices)+ {-# LINE 2581 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 238, column 11)+ _edgesin =+ ({-# LINE 238 "src-ag/KWOrder.ag" #-}+ map (flip (,) _vertex ) (Set.toList _patternIvertices)+ {-# LINE 2587 "dist/build/KWOrder" #-}+ )+ -- "src-ag/KWOrder.ag"(line 239, column 11)+ _lhsOedges =+ ({-# LINE 239 "src-ag/KWOrder.ag" #-}+ Set.fromList $ _edgesout ++ _edgesin+ {-# LINE 2593 "dist/build/KWOrder" #-}+ )+ ( _patternIcopy,_patternIvertices) =+ pattern_+ ( _rhsIcopy,_rhsIvertices) =+ rhs_+ in ( _lhsOedges,_lhsOerules,_lhsOrulenumber,_lhsOvertices))))+-- Rules -------------------------------------------------------+{-+ visit 0:+ chained attribute:+ rulenumber : Int+ synthesized attributes:+ edges : Set.Set Edge+ erules : ERules+ vertices : Set.Set Vertex+ alternatives:+ alternative Cons:+ child hd : Rule + child tl : Rules + alternative Nil:+-}+-- cata+sem_Rules :: Rules ->+ T_Rules+sem_Rules list =+ (Prelude.foldr sem_Rules_Cons sem_Rules_Nil (Prelude.map sem_Rule list))+-- semantic domain+newtype T_Rules = T_Rules (Int ->+ ( (Set.Set Edge),ERules,Int,(Set.Set Vertex)))+data Inh_Rules = Inh_Rules {rulenumber_Inh_Rules :: Int}+data Syn_Rules = Syn_Rules {edges_Syn_Rules :: (Set.Set Edge),erules_Syn_Rules :: ERules,rulenumber_Syn_Rules :: Int,vertices_Syn_Rules :: (Set.Set Vertex)}+wrap_Rules :: T_Rules ->+ Inh_Rules ->+ Syn_Rules+wrap_Rules (T_Rules sem) (Inh_Rules _lhsIrulenumber) =+ (let ( _lhsOedges,_lhsOerules,_lhsOrulenumber,_lhsOvertices) = sem _lhsIrulenumber+ in (Syn_Rules _lhsOedges _lhsOerules _lhsOrulenumber _lhsOvertices))+sem_Rules_Cons :: T_Rule ->+ T_Rules ->+ T_Rules+sem_Rules_Cons (T_Rule hd_) (T_Rules tl_) =+ (T_Rules (\ _lhsIrulenumber ->+ (let _lhsOedges :: (Set.Set Edge)+ _lhsOerules :: ERules+ _lhsOvertices :: (Set.Set Vertex)+ _lhsOrulenumber :: Int+ _hdOrulenumber :: Int+ _tlOrulenumber :: Int+ _hdIedges :: (Set.Set Edge)+ _hdIerules :: ERule+ _hdIrulenumber :: Int+ _hdIvertices :: (Set.Set Vertex)+ _tlIedges :: (Set.Set Edge)+ _tlIerules :: ERules+ _tlIrulenumber :: Int+ _tlIvertices :: (Set.Set Vertex)+ -- use rule "src-ag/KWOrder.ag"(line 233, column 33)+ _lhsOedges =+ ({-# LINE 233 "src-ag/KWOrder.ag" #-}+ _hdIedges `Set.union` _tlIedges+ {-# LINE 2654 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 157, column 25)+ _lhsOerules =+ ({-# LINE 157 "src-ag/KWOrder.ag" #-}+ _hdIerules : _tlIerules+ {-# LINE 2660 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 189, column 36)+ _lhsOvertices =+ ({-# LINE 189 "src-ag/KWOrder.ag" #-}+ _hdIvertices `Set.union` _tlIvertices+ {-# LINE 2666 "dist/build/KWOrder" #-}+ )+ -- copy rule (up)+ _lhsOrulenumber =+ ({-# LINE 41 "src-ag/KWOrder.ag" #-}+ _tlIrulenumber+ {-# LINE 2672 "dist/build/KWOrder" #-}+ )+ -- copy rule (down)+ _hdOrulenumber =+ ({-# LINE 41 "src-ag/KWOrder.ag" #-}+ _lhsIrulenumber+ {-# LINE 2678 "dist/build/KWOrder" #-}+ )+ -- copy rule (chain)+ _tlOrulenumber =+ ({-# LINE 41 "src-ag/KWOrder.ag" #-}+ _hdIrulenumber+ {-# LINE 2684 "dist/build/KWOrder" #-}+ )+ ( _hdIedges,_hdIerules,_hdIrulenumber,_hdIvertices) =+ hd_ _hdOrulenumber+ ( _tlIedges,_tlIerules,_tlIrulenumber,_tlIvertices) =+ tl_ _tlOrulenumber+ in ( _lhsOedges,_lhsOerules,_lhsOrulenumber,_lhsOvertices))))+sem_Rules_Nil :: T_Rules+sem_Rules_Nil =+ (T_Rules (\ _lhsIrulenumber ->+ (let _lhsOedges :: (Set.Set Edge)+ _lhsOerules :: ERules+ _lhsOvertices :: (Set.Set Vertex)+ _lhsOrulenumber :: Int+ -- use rule "src-ag/KWOrder.ag"(line 233, column 33)+ _lhsOedges =+ ({-# LINE 233 "src-ag/KWOrder.ag" #-}+ Set.empty+ {-# LINE 2702 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 157, column 25)+ _lhsOerules =+ ({-# LINE 157 "src-ag/KWOrder.ag" #-}+ []+ {-# LINE 2708 "dist/build/KWOrder" #-}+ )+ -- use rule "src-ag/KWOrder.ag"(line 189, column 36)+ _lhsOvertices =+ ({-# LINE 189 "src-ag/KWOrder.ag" #-}+ Set.empty+ {-# LINE 2714 "dist/build/KWOrder" #-}+ )+ -- copy rule (chain)+ _lhsOrulenumber =+ ({-# LINE 41 "src-ag/KWOrder.ag" #-}+ _lhsIrulenumber+ {-# LINE 2720 "dist/build/KWOrder" #-}+ )+ in ( _lhsOedges,_lhsOerules,_lhsOrulenumber,_lhsOvertices))))+-- TypeSig -----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ localSigMap : Map Identifier Type+ alternatives:+ alternative TypeSig:+ child name : {Identifier}+ child tp : {Type}+-}+-- cata+sem_TypeSig :: TypeSig ->+ T_TypeSig+sem_TypeSig (TypeSig _name _tp) =+ (sem_TypeSig_TypeSig _name _tp)+-- semantic domain+newtype T_TypeSig = T_TypeSig (( (Map Identifier Type)))+data Inh_TypeSig = Inh_TypeSig {}+data Syn_TypeSig = Syn_TypeSig {localSigMap_Syn_TypeSig :: (Map Identifier Type)}+wrap_TypeSig :: T_TypeSig ->+ Inh_TypeSig ->+ Syn_TypeSig+wrap_TypeSig (T_TypeSig sem) (Inh_TypeSig) =+ (let ( _lhsOlocalSigMap) = sem+ in (Syn_TypeSig _lhsOlocalSigMap))+sem_TypeSig_TypeSig :: Identifier ->+ Type ->+ T_TypeSig+sem_TypeSig_TypeSig name_ tp_ =+ (T_TypeSig (let _lhsOlocalSigMap :: (Map Identifier Type)+ -- "src-ag/KWOrder.ag"(line 389, column 32)+ _lhsOlocalSigMap =+ ({-# LINE 389 "src-ag/KWOrder.ag" #-}+ Map.singleton name_ tp_+ {-# LINE 2757 "dist/build/KWOrder" #-}+ )+ in ( _lhsOlocalSigMap)))+-- TypeSigs ----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ localSigMap : Map Identifier Type+ alternatives:+ alternative Cons:+ child hd : TypeSig + child tl : TypeSigs + alternative Nil:+-}+-- cata+sem_TypeSigs :: TypeSigs ->+ T_TypeSigs+sem_TypeSigs list =+ (Prelude.foldr sem_TypeSigs_Cons sem_TypeSigs_Nil (Prelude.map sem_TypeSig list))+-- semantic domain+newtype T_TypeSigs = T_TypeSigs (( (Map Identifier Type)))+data Inh_TypeSigs = Inh_TypeSigs {}+data Syn_TypeSigs = Syn_TypeSigs {localSigMap_Syn_TypeSigs :: (Map Identifier Type)}+wrap_TypeSigs :: T_TypeSigs ->+ Inh_TypeSigs ->+ Syn_TypeSigs+wrap_TypeSigs (T_TypeSigs sem) (Inh_TypeSigs) =+ (let ( _lhsOlocalSigMap) = sem+ in (Syn_TypeSigs _lhsOlocalSigMap))+sem_TypeSigs_Cons :: T_TypeSig ->+ T_TypeSigs ->+ T_TypeSigs+sem_TypeSigs_Cons (T_TypeSig hd_) (T_TypeSigs tl_) =+ (T_TypeSigs (let _lhsOlocalSigMap :: (Map Identifier Type)+ _hdIlocalSigMap :: (Map Identifier Type)+ _tlIlocalSigMap :: (Map Identifier Type)+ -- use rule "src-ag/KWOrder.ag"(line 385, column 57)+ _lhsOlocalSigMap =+ ({-# LINE 385 "src-ag/KWOrder.ag" #-}+ _hdIlocalSigMap `Map.union` _tlIlocalSigMap+ {-# LINE 2797 "dist/build/KWOrder" #-}+ )+ ( _hdIlocalSigMap) =+ hd_+ ( _tlIlocalSigMap) =+ tl_+ in ( _lhsOlocalSigMap)))+sem_TypeSigs_Nil :: T_TypeSigs+sem_TypeSigs_Nil =+ (T_TypeSigs (let _lhsOlocalSigMap :: (Map Identifier Type)+ -- use rule "src-ag/KWOrder.ag"(line 385, column 57)+ _lhsOlocalSigMap =+ ({-# LINE 385 "src-ag/KWOrder.ag" #-}+ Map.empty+ {-# LINE 2811 "dist/build/KWOrder" #-}+ )+ in ( _lhsOlocalSigMap)))
src-derived/Macro.hs view
@@ -1,11 +1,11 @@ --- UUAGC 0.9.39.1.0 (src-ag/Macro.ag)+-- UUAGC 0.9.40.1 (src-ag/Macro.ag) module Macro where {-# LINE 4 "src-ag/Macro.ag" #-} import CommonTypes-{-# LINE 9 "dist/build/uuagc/uuagc-tmp/Macro.hs" #-}+{-# LINE 9 "dist/build/Macro.hs" #-} -- Macro ------------------------------------------------------- {- alternatives:@@ -14,9 +14,9 @@ child children : MacroChildren alternative None: -}-data Macro = Macro (ConstructorIdent) (MacroChildren ) - | None - deriving ( Show)+data Macro = Macro (ConstructorIdent) (MacroChildren)+ | None+ deriving ( Show) -- MacroChild -------------------------------------------------- {- alternatives:@@ -30,10 +30,10 @@ child name : {Identifier} child value : {String} -}-data MacroChild = ChildChild (Identifier) (Identifier) - | RuleChild (Identifier) (Macro ) - | ValueChild (Identifier) (String) - deriving ( Show)+data MacroChild = ChildChild (Identifier) (Identifier)+ | RuleChild (Identifier) (Macro)+ | ValueChild (Identifier) (String)+ deriving ( Show) -- MacroChildren ----------------------------------------------- {- alternatives:@@ -42,7 +42,7 @@ child tl : MacroChildren alternative Nil: -}-type MacroChildren = [MacroChild ]+type MacroChildren = [MacroChild] -- MaybeMacro -------------------------------------------------- {- alternatives:@@ -50,4 +50,4 @@ child just : Macro alternative Nothing: -}-type MaybeMacro = Maybe Macro +type MaybeMacro = Maybe Macro
src-derived/Order.hs view
@@ -1,5728 +1,5684 @@ --- UUAGC 0.9.39.1.0 (src-ag/Order.ag)-module Order where-{-# LINE 9 "src-ag/Order.ag" #-}---- From uuagc-import CommonTypes-import Patterns-import ErrorMessages-import AbstractSyntax-import Code hiding (Type)-import qualified Code-import Expression-import Options-import SequentialComputation-import SequentialTypes-import CodeSyntax-import GrammarInfo-import HsToken(HsTokensRoot(HsTokensRoot))-import HsTokenScanner(lexTokens)-import SemHsTokens(sem_HsTokensRoot,wrap_HsTokensRoot, Syn_HsTokensRoot(..),Inh_HsTokensRoot(..))--- From uulib-import qualified Data.Map as Map-import qualified Data.Set as Set-import qualified Data.Sequence as Seq-import Data.Map(Map)-import Data.Set(Set)-import Data.Sequence(Seq, (><))-import UU.Util.Utils-import UU.Scanner.Position(Pos(..),initPos)-import Data.Foldable(toList)---- From haskell libraries-import Control.Monad(liftM)-import qualified Data.Array as Array-import Data.Array((!),bounds,inRange)-import Data.List(elemIndex,partition,sort,mapAccumL,find,nubBy,intersperse,groupBy,transpose)-import qualified Data.Tree as Tree-import Data.Maybe-{-# LINE 42 "dist/build/uuagc/uuagc-tmp/Order.hs" #-}--{-# LINE 2 "src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 49 "dist/build/uuagc/uuagc-tmp/Order.hs" #-}--{-# LINE 2 "src-ag/Expression.ag" #-}--import UU.Scanner.Position(Pos)-import HsToken-{-# LINE 55 "dist/build/uuagc/uuagc-tmp/Order.hs" #-}--{-# LINE 2 "src-ag/AbstractSyntax.ag" #-}---- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import Macro --marcos-import CommonTypes-import ErrorMessages-{-# LINE 67 "dist/build/uuagc/uuagc-tmp/Order.hs" #-}-{-# LINE 46 "src-ag/Order.ag" #-}---- Terminates with an error if the key is not in the map-findWithErr1 :: (Ord k, Show k) => String -> k -> Map k a -> a-findWithErr1 s k- = Map.findWithDefault (error ("findWithErr1 " ++ s ++ ": key " ++ show k ++ " not in map.")) k--findWithErr2 :: (Ord k, Show k, Show a) => k -> Map k a -> a-findWithErr2 k m- = Map.findWithDefault (error ("findWithErr2: key " ++ show k ++ " not in map: " ++ show m)) k m-{-# LINE 78 "dist/build/uuagc/uuagc-tmp/Order.hs" #-}--{-# LINE 71 "src-ag/Order.ag" #-}--startsWith :: String -> String -> Bool-startsWith k h = k == take (length k) h-{-# LINE 84 "dist/build/uuagc/uuagc-tmp/Order.hs" #-}--{-# LINE 138 "src-ag/Order.ag" #-}--getNtName :: Type -> NontermIdent-getNtName (NT nt _ _) = nt-getNtName _ = nullIdent-{-# LINE 91 "dist/build/uuagc/uuagc-tmp/Order.hs" #-}--{-# LINE 166 "src-ag/Order.ag" #-}--data AltAttr = AltAttr Identifier Identifier Bool- deriving (Eq, Ord, Show)-{-# LINE 97 "dist/build/uuagc/uuagc-tmp/Order.hs" #-}--{-# LINE 236 "src-ag/Order.ag" #-}--substSelf nt tp- = case tp of- NT n tps defor | n == _SELF -> NT nt tps defor- _ -> tp--haskellTupel :: [Type] -> Maybe Type-haskellTupel ts = Just ( Haskell ( '(' : (concat (intersperse "," (map show ts))) ++ ")" ))-{-# LINE 108 "dist/build/uuagc/uuagc-tmp/Order.hs" #-}--{-# LINE 687 "src-ag/Order.ag" #-}--swap (a,b) = (b,a)--showPath :: Table CRule -> [Vertex] -> [String]-showPath ruleTable path- = let look a | inRange (bounds ruleTable) a = [showOrigin (ruleTable ! a)]- | otherwise = ["Vertex " ++ show a]- showOrigin cr | getHasCode cr && getName (getAttr cr) /= "self" = prettyCRule cr ++ " (" ++ show (getPos (getAttr cr)) ++ ")"- | otherwise = prettyCRule cr- in concatMap look path---showPathLocal :: Table CRule -> [Vertex] -> [String]-showPathLocal _ [] = []-showPathLocal ruleTable xs = showP (xs++[-1])- where showP [] = []- showP (v1:v2:vs) = let line = step v1 v2- lines = showP vs- in line:lines- step v1 v2 = " - " ++ a1- where r1 = ruleTable ! v1- a1 = show (getAttr r1)---limitTo :: Int -> [String] -> [String]-limitTo _ [] = []-limitTo 0 _ = ["....etcetera, etcetera...."]-limitTo n (x:xs) = x : limitTo (n-1) xs--showPathNice :: Table CRule -> [Vertex] -> [String]-showPathNice _ [] = []-showPathNice ruleTable xs = limitTo 100 (showP ((-1):xs++[-1]))- where [maxf, maxa, maxn, maxc] = maxWidths ruleTable (take 100 xs)- showP [] = []- showP (v1:v2:vs) = let line = step v1 v2- lines = showP vs- in if null line then lines else line:lines- step v1 v2 | last && first = induced- | last && isSyn r1 = "pass up " ++ alignR maxf "" ++ " " ++ alignL maxa a1 ++ " in " ++ alignR maxn n1 ++ "|" ++ c1 ++ induced- | first&& not(isSyn r2) = "get from above " ++ alignR maxf "" ++ " " ++ alignL maxa a2 ++ " in " ++ alignR maxn n2 ++ "|" ++ c2- | last = "pass down " ++ alignR maxf f1 ++ "." ++ a1 ++ induced- | isSyn r2 = "get from below " ++ alignR maxf f2 ++ "." ++ alignL maxa a2 ++ " in " ++ alignR maxn n2 ++ "|" ++ c2- | isLocal r1 = if head a1 == '_'- then ""- else "calculate " ++ alignR maxf "loc" ++ "." ++ a1- | otherwise = "pass down " ++ alignR maxf f1 ++ "." ++ alignL maxa a1 ++ " to " ++ alignR maxn n2 ++ "|" ++ c2- where- first = v1<0- last = v2<0- r1 = ruleTable ! v1- r2 = ruleTable ! v2- a1 = show (getAttr r1)- a2 = show (getAttr r2)- f1 = show (getField r1)- f2 = show (getField r2)- n1 = show (getLhsNt r1)- n2 = show (getLhsNt r2)- c1 = show (getCon r1)- c2 = show (getCon r2)- induced | v2== -2 = " INDUCED dependency to "- | otherwise = ""---maxWidths ruleTable vs- = map maximum (transpose (map getWidth vs))- where getWidth v | v<0 = [0,0,0,0]- | otherwise = map (length . show . ($ (ruleTable!v))) [getField, getAttr, getLhsNt, getCon]--alignL n xs | k<n = xs ++ replicate (n-k) ' '- | otherwise = xs- where k = length xs--alignR n xs | k<n = replicate (n-k) ' ' ++ xs- | otherwise = xs- where k = length xs--localCycleErr :: Table CRule -> Bool -> Route -> Error-localCycleErr ruleTable o_visit (s:path)- = let cr = ruleTable ! s- attr = getAttr cr- nt = getLhsNt cr- con = getCon cr- in LocalCirc nt con attr o_visit (showPathLocal ruleTable path)--instCycleErr :: Table CRule -> Bool -> Route -> Error-instCycleErr ruleTable o_visit (s:path)- = let cr = ruleTable ! s- attr = getAttr cr- nt = getLhsNt cr- con = getCon cr- in InstCirc nt con attr o_visit (showPathLocal ruleTable path)--directCycleErrs :: Table NTAttr -> Table CRule -> Bool -> [EdgeRoutes] -> [Error]-directCycleErrs attrTable ruleTable o_visit xs- = let getNont v = case attrTable ! v of- NTASyn nt _ _ -> nt- NTAInh nt _ _ -> nt- getAttr v = case attrTable ! v of- NTASyn _ a _ -> a- NTAInh _ a _ -> a- sameNont ((v1,_),_,_) ((v2,_),_,_) = getNont v1 == getNont v2- procCycle ((v1,v2),p1,p2) = ((getAttr v1, getAttr v2), showPathNice ruleTable p1, showPathNice ruleTable p2)- wrapGroup gr@(((v1,_),_,_):_) = DirectCirc (getNont v1) o_visit (map procCycle gr)- in map wrapGroup (groupBy sameNont xs)--inducedCycleErrs :: Table NTAttr -> Table CRule -> CInterfaceMap -> [EdgeRoutes] -> [Error]-inducedCycleErrs attrTable ruleTable cim xs- = let getNont v = case attrTable ! v of- NTASyn nt _ _ -> nt- NTAInh nt _ _ -> nt- getAttr v = case attrTable ! v of- NTASyn _ a _ -> a- NTAInh _ a _ -> a- sameNont ((v1,_),_,_) ((v2,_),_,_) = getNont v1 == getNont v2- procCycle ((v1,v2),p1,p2) = ((getAttr v1, getAttr v2), showPathNice ruleTable p1, showPathNice ruleTable p2)- wrapGroup gr@(((v1,_),_,_):_) = InducedCirc (getNont v1) (findWithErr1 "inducedCycleErr.cinter" (getNont v1) cim) (map procCycle gr)- in map wrapGroup (groupBy sameNont xs)-{-# LINE 228 "dist/build/uuagc/uuagc-tmp/Order.hs" #-}--- Child --------------------------------------------------------{-- visit 0:- inherited attributes:- allfields : [(Identifier,Type,ChildKind)]- allnts : [Identifier]- attrs : [(Identifier,Identifier)]- con : Identifier- inh : Attributes- inhMap : Map Identifier Attributes- mergeMap : Map Identifier (Identifier,[Identifier])- nt : Identifier- o_unbox : Bool- syn : Attributes- synMap : Map Identifier Attributes- synthesized attributes:- attributes : [(Identifier,Attributes,Attributes)]- collectChildrenInhs : Map Identifier Attributes - collectChildrenSyns : Map Identifier Attributes - errors : Seq Error- field : (Identifier,Type,ChildKind)- gathAltAttrs : [AltAttr]- gathRules : Seq CRule- inhs : Seq (Identifier,Attributes)- nts : Seq (Identifier,NontermIdent)- singlevisits : [CRule]- terminals : [Identifier]- alternatives:- alternative Child:- child name : {Identifier}- child tp : {Type}- child kind : {ChildKind}- visit 0:- local maptolocal : _- local gathRules : _- local chnt : _- local inh : _- local syn : _--}--- cata-sem_Child :: Child ->- T_Child -sem_Child (Child _name _tp _kind ) =- (sem_Child_Child _name _tp _kind )--- semantic domain-newtype T_Child = T_Child (([(Identifier,Type,ChildKind)]) ->- ([Identifier]) ->- ([(Identifier,Identifier)]) ->- Identifier ->- Attributes ->- (Map Identifier Attributes) ->- (Map Identifier (Identifier,[Identifier])) ->- Identifier ->- Bool ->- Attributes ->- (Map Identifier Attributes) ->- ( ([(Identifier,Attributes,Attributes)]),(Map Identifier Attributes ),(Map Identifier Attributes ),(Seq Error),((Identifier,Type,ChildKind)),([AltAttr]),(Seq CRule),(Seq (Identifier,Attributes)),(Seq (Identifier,NontermIdent)),([CRule]),([Identifier])))-data Inh_Child = Inh_Child {allfields_Inh_Child :: !(([(Identifier,Type,ChildKind)])),allnts_Inh_Child :: !(([Identifier])),attrs_Inh_Child :: !(([(Identifier,Identifier)])),con_Inh_Child :: !(Identifier),inh_Inh_Child :: !(Attributes),inhMap_Inh_Child :: !((Map Identifier Attributes)),mergeMap_Inh_Child :: !((Map Identifier (Identifier,[Identifier]))),nt_Inh_Child :: !(Identifier),o_unbox_Inh_Child :: !(Bool),syn_Inh_Child :: !(Attributes),synMap_Inh_Child :: !((Map Identifier Attributes))}-data Syn_Child = Syn_Child {attributes_Syn_Child :: !(([(Identifier,Attributes,Attributes)])),collectChildrenInhs_Syn_Child :: !((Map Identifier Attributes )),collectChildrenSyns_Syn_Child :: !((Map Identifier Attributes )),errors_Syn_Child :: !((Seq Error)),field_Syn_Child :: !(((Identifier,Type,ChildKind))),gathAltAttrs_Syn_Child :: !(([AltAttr])),gathRules_Syn_Child :: !((Seq CRule)),inhs_Syn_Child :: !((Seq (Identifier,Attributes))),nts_Syn_Child :: !((Seq (Identifier,NontermIdent))),singlevisits_Syn_Child :: !(([CRule])),terminals_Syn_Child :: !(([Identifier]))}-wrap_Child :: T_Child ->- Inh_Child ->- Syn_Child -wrap_Child (T_Child sem ) (Inh_Child _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap ) =- (let ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfield,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap - in (Syn_Child _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfield _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals ))-sem_Child_Child :: Identifier ->- Type ->- ChildKind ->- T_Child -sem_Child_Child name_ tp_ kind_ =- (T_Child (\ _lhsIallfields- _lhsIallnts- _lhsIattrs- _lhsIcon- _lhsIinh- _lhsIinhMap- _lhsImergeMap- _lhsInt- _lhsIo_unbox- _lhsIsyn- _lhsIsynMap ->- (let _lhsOgathAltAttrs :: ([AltAttr])- _lhsOnts :: (Seq (Identifier,NontermIdent))- _lhsOinhs :: (Seq (Identifier,Attributes))- _lhsOcollectChildrenSyns :: (Map Identifier Attributes )- _lhsOcollectChildrenInhs :: (Map Identifier Attributes )- _lhsOsinglevisits :: ([CRule])- _lhsOterminals :: ([Identifier])- _lhsOattributes :: ([(Identifier,Attributes,Attributes)])- _lhsOfield :: ((Identifier,Type,ChildKind))- _lhsOerrors :: (Seq Error)- _lhsOgathRules :: (Seq CRule)- -- "src-ag/Order.ag"(line 177, column 13)- _maptolocal =- ({-# LINE 177 "src-ag/Order.ag" #-}- case tp_ of- NT nt _ _ -> Map.null _syn- _ -> True- {-# LINE 327 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 180, column 13)- _lhsOgathAltAttrs =- ({-# LINE 180 "src-ag/Order.ag" #-}- if _maptolocal- then [ AltAttr _LOC name_ True ]- else [ AltAttr name_ syn True | syn <- Map.keys _syn ]- {-# LINE 335 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 195, column 13)- _lhsOnts =- ({-# LINE 195 "src-ag/Order.ag" #-}- Seq.singleton (name_,getNtName tp_)- {-# LINE 341 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 196, column 13)- _lhsOinhs =- ({-# LINE 196 "src-ag/Order.ag" #-}- Seq.singleton (name_,_inh )- {-# LINE 347 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 212, column 13)- _gathRules =- ({-# LINE 212 "src-ag/Order.ag" #-}- if _maptolocal- then Seq.singleton (cRuleTerminal name_ _lhsInt _lhsIcon tp_)- else Seq.fromList [ cRuleRhsSyn syn _lhsInt _lhsIcon tp name_ (getNtName tp_) | (syn,tp) <- Map.assocs _syn ]- {-# LINE 355 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 344, column 12)- _lhsOcollectChildrenSyns =- ({-# LINE 344 "src-ag/Order.ag" #-}- Map.singleton name_ _syn- {-# LINE 361 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 345, column 12)- _lhsOcollectChildrenInhs =- ({-# LINE 345 "src-ag/Order.ag" #-}- Map.singleton name_ _inh- {-# LINE 367 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 613, column 11)- _lhsOsinglevisits =- ({-# LINE 613 "src-ag/Order.ag" #-}- if _maptolocal- then []- else [CChildVisit name_ (getNtName tp_) 0 _inh _syn True]- {-# LINE 375 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 638, column 11)- _lhsOterminals =- ({-# LINE 638 "src-ag/Order.ag" #-}- if _maptolocal- then [name_]- else []- {-# LINE 383 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 667, column 11)- _lhsOattributes =- ({-# LINE 667 "src-ag/Order.ag" #-}- [(name_, _inh , _syn )]- {-# LINE 389 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 671, column 11)- _lhsOfield =- ({-# LINE 671 "src-ag/Order.ag" #-}- (name_, tp_, kind_)- {-# LINE 395 "src-ag/Order.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 19, column 11)- _chnt =- ({-# LINE 19 "src-ag/DistChildAttr.ag" #-}- case tp_ of- NT nt _ _ -> nt- Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")- Haskell t -> identifier t- {-# LINE 404 "src-ag/Order.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 23, column 11)- _inh =- ({-# LINE 23 "src-ag/DistChildAttr.ag" #-}- Map.findWithDefault Map.empty _chnt _lhsIinhMap- {-# LINE 410 "src-ag/Order.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 24, column 11)- _syn =- ({-# LINE 24 "src-ag/DistChildAttr.ag" #-}- Map.findWithDefault Map.empty _chnt _lhsIsynMap- {-# LINE 416 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 422 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 206, column 23)- _lhsOgathRules =- ({-# LINE 206 "src-ag/Order.ag" #-}- _gathRules- {-# LINE 428 "src-ag/Order.hs" #-}- )- in ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfield,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals))) )--- Children -----------------------------------------------------{-- visit 0:- inherited attributes:- allfields : [(Identifier,Type,ChildKind)]- allnts : [Identifier]- attrs : [(Identifier,Identifier)]- con : Identifier- inh : Attributes- inhMap : Map Identifier Attributes- mergeMap : Map Identifier (Identifier,[Identifier])- nt : Identifier- o_unbox : Bool- syn : Attributes- synMap : Map Identifier Attributes- synthesized attributes:- attributes : [(Identifier,Attributes,Attributes)]- collectChildrenInhs : Map Identifier Attributes - collectChildrenSyns : Map Identifier Attributes - errors : Seq Error- fields : [(Identifier,Type,ChildKind)]- gathAltAttrs : [AltAttr]- gathRules : Seq CRule- inhs : Seq (Identifier,Attributes)- nts : Seq (Identifier,NontermIdent)- singlevisits : [CRule]- terminals : [Identifier]- alternatives:- alternative Cons:- child hd : Child - child tl : Children - alternative Nil:--}--- cata-sem_Children :: Children ->- T_Children -sem_Children list =- (Prelude.foldr sem_Children_Cons sem_Children_Nil (Prelude.map sem_Child list) )--- semantic domain-newtype T_Children = T_Children (([(Identifier,Type,ChildKind)]) ->- ([Identifier]) ->- ([(Identifier,Identifier)]) ->- Identifier ->- Attributes ->- (Map Identifier Attributes) ->- (Map Identifier (Identifier,[Identifier])) ->- Identifier ->- Bool ->- Attributes ->- (Map Identifier Attributes) ->- ( ([(Identifier,Attributes,Attributes)]),(Map Identifier Attributes ),(Map Identifier Attributes ),(Seq Error),([(Identifier,Type,ChildKind)]),([AltAttr]),(Seq CRule),(Seq (Identifier,Attributes)),(Seq (Identifier,NontermIdent)),([CRule]),([Identifier])))-data Inh_Children = Inh_Children {allfields_Inh_Children :: !(([(Identifier,Type,ChildKind)])),allnts_Inh_Children :: !(([Identifier])),attrs_Inh_Children :: !(([(Identifier,Identifier)])),con_Inh_Children :: !(Identifier),inh_Inh_Children :: !(Attributes),inhMap_Inh_Children :: !((Map Identifier Attributes)),mergeMap_Inh_Children :: !((Map Identifier (Identifier,[Identifier]))),nt_Inh_Children :: !(Identifier),o_unbox_Inh_Children :: !(Bool),syn_Inh_Children :: !(Attributes),synMap_Inh_Children :: !((Map Identifier Attributes))}-data Syn_Children = Syn_Children {attributes_Syn_Children :: !(([(Identifier,Attributes,Attributes)])),collectChildrenInhs_Syn_Children :: !((Map Identifier Attributes )),collectChildrenSyns_Syn_Children :: !((Map Identifier Attributes )),errors_Syn_Children :: !((Seq Error)),fields_Syn_Children :: !(([(Identifier,Type,ChildKind)])),gathAltAttrs_Syn_Children :: !(([AltAttr])),gathRules_Syn_Children :: !((Seq CRule)),inhs_Syn_Children :: !((Seq (Identifier,Attributes))),nts_Syn_Children :: !((Seq (Identifier,NontermIdent))),singlevisits_Syn_Children :: !(([CRule])),terminals_Syn_Children :: !(([Identifier]))}-wrap_Children :: T_Children ->- Inh_Children ->- Syn_Children -wrap_Children (T_Children sem ) (Inh_Children _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap ) =- (let ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfields,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap - in (Syn_Children _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfields _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals ))-sem_Children_Cons :: T_Child ->- T_Children ->- T_Children -sem_Children_Cons (T_Child hd_ ) (T_Children tl_ ) =- (T_Children (\ _lhsIallfields- _lhsIallnts- _lhsIattrs- _lhsIcon- _lhsIinh- _lhsIinhMap- _lhsImergeMap- _lhsInt- _lhsIo_unbox- _lhsIsyn- _lhsIsynMap ->- (let _lhsOfields :: ([(Identifier,Type,ChildKind)])- _lhsOattributes :: ([(Identifier,Attributes,Attributes)])- _lhsOcollectChildrenInhs :: (Map Identifier Attributes )- _lhsOcollectChildrenSyns :: (Map Identifier Attributes )- _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOgathRules :: (Seq CRule)- _lhsOinhs :: (Seq (Identifier,Attributes))- _lhsOnts :: (Seq (Identifier,NontermIdent))- _lhsOsinglevisits :: ([CRule])- _lhsOterminals :: ([Identifier])- _hdOallfields :: ([(Identifier,Type,ChildKind)])- _hdOallnts :: ([Identifier])- _hdOattrs :: ([(Identifier,Identifier)])- _hdOcon :: Identifier- _hdOinh :: Attributes- _hdOinhMap :: (Map Identifier Attributes)- _hdOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _hdOnt :: Identifier- _hdOo_unbox :: Bool- _hdOsyn :: Attributes- _hdOsynMap :: (Map Identifier Attributes)- _tlOallfields :: ([(Identifier,Type,ChildKind)])- _tlOallnts :: ([Identifier])- _tlOattrs :: ([(Identifier,Identifier)])- _tlOcon :: Identifier- _tlOinh :: Attributes- _tlOinhMap :: (Map Identifier Attributes)- _tlOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _tlOnt :: Identifier- _tlOo_unbox :: Bool- _tlOsyn :: Attributes- _tlOsynMap :: (Map Identifier Attributes)- _hdIattributes :: ([(Identifier,Attributes,Attributes)])- _hdIcollectChildrenInhs :: (Map Identifier Attributes )- _hdIcollectChildrenSyns :: (Map Identifier Attributes )- _hdIerrors :: (Seq Error)- _hdIfield :: ((Identifier,Type,ChildKind))- _hdIgathAltAttrs :: ([AltAttr])- _hdIgathRules :: (Seq CRule)- _hdIinhs :: (Seq (Identifier,Attributes))- _hdInts :: (Seq (Identifier,NontermIdent))- _hdIsinglevisits :: ([CRule])- _hdIterminals :: ([Identifier])- _tlIattributes :: ([(Identifier,Attributes,Attributes)])- _tlIcollectChildrenInhs :: (Map Identifier Attributes )- _tlIcollectChildrenSyns :: (Map Identifier Attributes )- _tlIerrors :: (Seq Error)- _tlIfields :: ([(Identifier,Type,ChildKind)])- _tlIgathAltAttrs :: ([AltAttr])- _tlIgathRules :: (Seq CRule)- _tlIinhs :: (Seq (Identifier,Attributes))- _tlInts :: (Seq (Identifier,NontermIdent))- _tlIsinglevisits :: ([CRule])- _tlIterminals :: ([Identifier])- -- "src-ag/Order.ag"(line 674, column 11)- _lhsOfields =- ({-# LINE 674 "src-ag/Order.ag" #-}- _hdIfield : _tlIfields- {-# LINE 564 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 665, column 32)- _lhsOattributes =- ({-# LINE 665 "src-ag/Order.ag" #-}- _hdIattributes ++ _tlIattributes- {-# LINE 570 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 342, column 68)- _lhsOcollectChildrenInhs =- ({-# LINE 342 "src-ag/Order.ag" #-}- _hdIcollectChildrenInhs `Map.union` _tlIcollectChildrenInhs- {-# LINE 576 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 342, column 68)- _lhsOcollectChildrenSyns =- ({-# LINE 342 "src-ag/Order.ag" #-}- _hdIcollectChildrenSyns `Map.union` _tlIcollectChildrenSyns- {-# LINE 582 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 588 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "src-ag/Order.ag" #-}- _hdIgathAltAttrs ++ _tlIgathAltAttrs- {-# LINE 594 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 206, column 23)- _lhsOgathRules =- ({-# LINE 206 "src-ag/Order.ag" #-}- _hdIgathRules Seq.>< _tlIgathRules- {-# LINE 600 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 193, column 20)- _lhsOinhs =- ({-# LINE 193 "src-ag/Order.ag" #-}- _hdIinhs Seq.>< _tlIinhs- {-# LINE 606 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 192, column 19)- _lhsOnts =- ({-# LINE 192 "src-ag/Order.ag" #-}- _hdInts Seq.>< _tlInts- {-# LINE 612 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 611, column 40)- _lhsOsinglevisits =- ({-# LINE 611 "src-ag/Order.ag" #-}- _hdIsinglevisits ++ _tlIsinglevisits- {-# LINE 618 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 636, column 38)- _lhsOterminals =- ({-# LINE 636 "src-ag/Order.ag" #-}- _hdIterminals ++ _tlIterminals- {-# LINE 624 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOallfields =- ({-# LINE 654 "src-ag/Order.ag" #-}- _lhsIallfields- {-# LINE 630 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOallnts =- ({-# LINE 647 "src-ag/Order.ag" #-}- _lhsIallnts- {-# LINE 636 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOattrs =- ({-# LINE 654 "src-ag/Order.ag" #-}- _lhsIattrs- {-# LINE 642 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOcon =- ({-# LINE 90 "src-ag/Order.ag" #-}- _lhsIcon- {-# LINE 648 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOinh =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIinh- {-# LINE 654 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 660 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 360 "src-ag/Order.ag" #-}- _lhsImergeMap- {-# LINE 666 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOnt =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsInt- {-# LINE 672 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_unbox =- ({-# LINE 119 "src-ag/Order.ag" #-}- _lhsIo_unbox- {-# LINE 678 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOsyn =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIsyn- {-# LINE 684 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 690 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOallfields =- ({-# LINE 654 "src-ag/Order.ag" #-}- _lhsIallfields- {-# LINE 696 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOallnts =- ({-# LINE 647 "src-ag/Order.ag" #-}- _lhsIallnts- {-# LINE 702 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOattrs =- ({-# LINE 654 "src-ag/Order.ag" #-}- _lhsIattrs- {-# LINE 708 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOcon =- ({-# LINE 90 "src-ag/Order.ag" #-}- _lhsIcon- {-# LINE 714 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOinh =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIinh- {-# LINE 720 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 726 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 360 "src-ag/Order.ag" #-}- _lhsImergeMap- {-# LINE 732 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOnt =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsInt- {-# LINE 738 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_unbox =- ({-# LINE 119 "src-ag/Order.ag" #-}- _lhsIo_unbox- {-# LINE 744 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOsyn =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIsyn- {-# LINE 750 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 756 "src-ag/Order.hs" #-}- )- ( _hdIattributes,_hdIcollectChildrenInhs,_hdIcollectChildrenSyns,_hdIerrors,_hdIfield,_hdIgathAltAttrs,_hdIgathRules,_hdIinhs,_hdInts,_hdIsinglevisits,_hdIterminals) =- hd_ _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOinh _hdOinhMap _hdOmergeMap _hdOnt _hdOo_unbox _hdOsyn _hdOsynMap - ( _tlIattributes,_tlIcollectChildrenInhs,_tlIcollectChildrenSyns,_tlIerrors,_tlIfields,_tlIgathAltAttrs,_tlIgathRules,_tlIinhs,_tlInts,_tlIsinglevisits,_tlIterminals) =- tl_ _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOinh _tlOinhMap _tlOmergeMap _tlOnt _tlOo_unbox _tlOsyn _tlOsynMap - in ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfields,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals))) )-sem_Children_Nil :: T_Children -sem_Children_Nil =- (T_Children (\ _lhsIallfields- _lhsIallnts- _lhsIattrs- _lhsIcon- _lhsIinh- _lhsIinhMap- _lhsImergeMap- _lhsInt- _lhsIo_unbox- _lhsIsyn- _lhsIsynMap ->- (let _lhsOfields :: ([(Identifier,Type,ChildKind)])- _lhsOattributes :: ([(Identifier,Attributes,Attributes)])- _lhsOcollectChildrenInhs :: (Map Identifier Attributes )- _lhsOcollectChildrenSyns :: (Map Identifier Attributes )- _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOgathRules :: (Seq CRule)- _lhsOinhs :: (Seq (Identifier,Attributes))- _lhsOnts :: (Seq (Identifier,NontermIdent))- _lhsOsinglevisits :: ([CRule])- _lhsOterminals :: ([Identifier])- -- "src-ag/Order.ag"(line 675, column 11)- _lhsOfields =- ({-# LINE 675 "src-ag/Order.ag" #-}- []- {-# LINE 791 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 665, column 32)- _lhsOattributes =- ({-# LINE 665 "src-ag/Order.ag" #-}- []- {-# LINE 797 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 342, column 68)- _lhsOcollectChildrenInhs =- ({-# LINE 342 "src-ag/Order.ag" #-}- Map.empty- {-# LINE 803 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 342, column 68)- _lhsOcollectChildrenSyns =- ({-# LINE 342 "src-ag/Order.ag" #-}- Map.empty- {-# LINE 809 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 815 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "src-ag/Order.ag" #-}- []- {-# LINE 821 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 206, column 23)- _lhsOgathRules =- ({-# LINE 206 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 827 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 193, column 20)- _lhsOinhs =- ({-# LINE 193 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 833 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 192, column 19)- _lhsOnts =- ({-# LINE 192 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 839 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 611, column 40)- _lhsOsinglevisits =- ({-# LINE 611 "src-ag/Order.ag" #-}- []- {-# LINE 845 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 636, column 38)- _lhsOterminals =- ({-# LINE 636 "src-ag/Order.ag" #-}- []- {-# LINE 851 "src-ag/Order.hs" #-}- )- in ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfields,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals))) )--- Expression ---------------------------------------------------{-- visit 0:- inherited attributes:- allfields : [(Identifier,Type,ChildKind)]- allnts : [Identifier]- attrs : [(Identifier,Identifier)]- con : Identifier- mergeMap : Map Identifier (Identifier,[Identifier])- nt : Identifier- synthesized attributes:- allRhsVars : Set (Identifier,Identifier)- copy : SELF - errors : Seq Error- textLines : [String]- usedAttrs : [(Identifier,Identifier)]- usedFields : [Identifier]- usedLocals : [Identifier]- alternatives:- alternative Expression:- child pos : {Pos}- child tks : {[HsToken]}- visit 0:- local _tup1 : _- local textLines : _- local usedAttrs : _- local usedLocals : _- local usedFields : _- local copy : _--}--- cata-sem_Expression :: Expression ->- T_Expression -sem_Expression (Expression _pos _tks ) =- (sem_Expression_Expression _pos _tks )--- semantic domain-newtype T_Expression = T_Expression (([(Identifier,Type,ChildKind)]) ->- ([Identifier]) ->- ([(Identifier,Identifier)]) ->- Identifier ->- (Map Identifier (Identifier,[Identifier])) ->- Identifier ->- ( (Set (Identifier,Identifier)),Expression ,(Seq Error),([String]),([(Identifier,Identifier)]),([Identifier]),([Identifier])))-data Inh_Expression = Inh_Expression {allfields_Inh_Expression :: !(([(Identifier,Type,ChildKind)])),allnts_Inh_Expression :: !(([Identifier])),attrs_Inh_Expression :: !(([(Identifier,Identifier)])),con_Inh_Expression :: !(Identifier),mergeMap_Inh_Expression :: !((Map Identifier (Identifier,[Identifier]))),nt_Inh_Expression :: !(Identifier)}-data Syn_Expression = Syn_Expression {allRhsVars_Syn_Expression :: !((Set (Identifier,Identifier))),copy_Syn_Expression :: !(Expression ),errors_Syn_Expression :: !((Seq Error)),textLines_Syn_Expression :: !(([String])),usedAttrs_Syn_Expression :: !(([(Identifier,Identifier)])),usedFields_Syn_Expression :: !(([Identifier])),usedLocals_Syn_Expression :: !(([Identifier]))}-wrap_Expression :: T_Expression ->- Inh_Expression ->- Syn_Expression -wrap_Expression (T_Expression sem ) (Inh_Expression _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt ) =- (let ( _lhsOallRhsVars,_lhsOcopy,_lhsOerrors,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt - in (Syn_Expression _lhsOallRhsVars _lhsOcopy _lhsOerrors _lhsOtextLines _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals ))-sem_Expression_Expression :: Pos ->- ([HsToken]) ->- T_Expression -sem_Expression_Expression pos_ tks_ =- (T_Expression (\ _lhsIallfields- _lhsIallnts- _lhsIattrs- _lhsIcon- _lhsImergeMap- _lhsInt ->- (let _lhsOerrors :: (Seq Error)- _lhsOallRhsVars :: (Set (Identifier,Identifier))- _lhsOcopy :: Expression - _lhsOtextLines :: ([String])- _lhsOusedAttrs :: ([(Identifier,Identifier)])- _lhsOusedFields :: ([Identifier])- _lhsOusedLocals :: ([Identifier])- -- "src-ag/Order.ag"(line 464, column 21)- __tup1 =- ({-# LINE 464 "src-ag/Order.ag" #-}- let mergedChildren = [ x | (_,xs) <- Map.elems _lhsImergeMap, x <- xs ]- attrsIn = filter (\(fld,_) -> not (fld `elem` mergedChildren)) _lhsIattrs- inherited = Inh_HsTokensRoot- { attrs_Inh_HsTokensRoot = attrsIn- , con_Inh_HsTokensRoot = _lhsIcon- , allfields_Inh_HsTokensRoot = _lhsIallfields- , allnts_Inh_HsTokensRoot = _lhsIallnts- , nt_Inh_HsTokensRoot = _lhsInt- }- synthesized = wrap_HsTokensRoot (sem_HsTokensRoot (HsTokensRoot tks_)) inherited- in case synthesized of- Syn_HsTokensRoot- { textLines_Syn_HsTokensRoot = textLines- , usedAttrs_Syn_HsTokensRoot = usedAttrs- , usedLocals_Syn_HsTokensRoot = usedLocals- , usedFields_Syn_HsTokensRoot = usedFields- } -> let extraAttrs = [ (src,attr)- | (fld,attr) <- usedAttrs, let mbMerged = Map.lookup fld _lhsImergeMap, isJust mbMerged- , let (Just (_, srcs)) = mbMerged, src <- srcs ]- usedAttrs' = usedAttrs ++ extraAttrs- in (textLines,usedAttrs',usedLocals,usedFields)- {-# LINE 946 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 464, column 21)- (_textLines,_,_,_) =- ({-# LINE 464 "src-ag/Order.ag" #-}- __tup1- {-# LINE 952 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 464, column 21)- (_,_usedAttrs,_,_) =- ({-# LINE 464 "src-ag/Order.ag" #-}- __tup1- {-# LINE 958 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 464, column 21)- (_,_,_usedLocals,_) =- ({-# LINE 464 "src-ag/Order.ag" #-}- __tup1- {-# LINE 964 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 464, column 21)- (_,_,_,_usedFields) =- ({-# LINE 464 "src-ag/Order.ag" #-}- __tup1- {-# LINE 970 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 487, column 17)- _lhsOerrors =- ({-# LINE 487 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 976 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 488, column 17)- _lhsOallRhsVars =- ({-# LINE 488 "src-ag/Order.ag" #-}- Set.fromList _usedAttrs- `Set.union`- Set.fromList [ (_LOC, l) | l <- _usedLocals ]- `Set.union`- Set.fromList [ (_FIELD, fld) | fld <- _usedFields ]- {-# LINE 986 "src-ag/Order.hs" #-}- )- -- self rule- _copy =- ({-# LINE 455 "src-ag/Order.ag" #-}- Expression pos_ tks_- {-# LINE 992 "src-ag/Order.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 455 "src-ag/Order.ag" #-}- _copy- {-# LINE 998 "src-ag/Order.hs" #-}- )- -- copy rule (from local)- _lhsOtextLines =- ({-# LINE 454 "src-ag/Order.ag" #-}- _textLines- {-# LINE 1004 "src-ag/Order.hs" #-}- )- -- copy rule (from local)- _lhsOusedAttrs =- ({-# LINE 452 "src-ag/Order.ag" #-}- _usedAttrs- {-# LINE 1010 "src-ag/Order.hs" #-}- )- -- copy rule (from local)- _lhsOusedFields =- ({-# LINE 453 "src-ag/Order.ag" #-}- _usedFields- {-# LINE 1016 "src-ag/Order.hs" #-}- )- -- copy rule (from local)- _lhsOusedLocals =- ({-# LINE 451 "src-ag/Order.ag" #-}- _usedLocals- {-# LINE 1022 "src-ag/Order.hs" #-}- )- in ( _lhsOallRhsVars,_lhsOcopy,_lhsOerrors,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) )--- Grammar ------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attributes:- errors : Seq Error- nAutoRules : Int- nExplicitRules : Int- output : CGrammar- alternatives:- alternative Grammar:- child typeSyns : {TypeSyns}- child useMap : {UseMap}- child derivings : {Derivings}- child wrappers : {Set NontermIdent}- child nonts : Nonterminals - child pragmas : {PragmaMap}- child manualAttrOrderMap : {AttrOrderMap}- child paramMap : {ParamMap}- child contextMap : {ContextMap}- child quantMap : {QuantMap}- child uniqueMap : {UniqueMap}- child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}- visit 0:- local o_dovisit : _- local ruleTable : _- local attrTable : _- local attrVertex : _- local tdpToTds : _- local tdsToTdp : _- local directDep : _- local instDep : _- local aroundDep : _- local mergeDep : _- local info : _- local _tup2 : _- local cInterfaceMap : _- local cVisitsMap : _- local cyclesErrors : _- local aroundMap : _- local mergeMap : _--}--- cata-sem_Grammar :: Grammar ->- T_Grammar -sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap ) =- (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap )--- semantic domain-newtype T_Grammar = T_Grammar (Options ->- ( (Seq Error),Int,Int,CGrammar))-data Inh_Grammar = Inh_Grammar {options_Inh_Grammar :: !(Options)}-data Syn_Grammar = Syn_Grammar {errors_Syn_Grammar :: !((Seq Error)),nAutoRules_Syn_Grammar :: !(Int),nExplicitRules_Syn_Grammar :: !(Int),output_Syn_Grammar :: !(CGrammar)}-wrap_Grammar :: T_Grammar ->- Inh_Grammar ->- Syn_Grammar -wrap_Grammar (T_Grammar sem ) (Inh_Grammar _lhsIoptions ) =- (let ( _lhsOerrors,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOoutput) = sem _lhsIoptions - in (Syn_Grammar _lhsOerrors _lhsOnAutoRules _lhsOnExplicitRules _lhsOoutput ))-sem_Grammar_Grammar :: TypeSyns ->- UseMap ->- Derivings ->- (Set NontermIdent) ->- T_Nonterminals ->- PragmaMap ->- AttrOrderMap ->- ParamMap ->- ContextMap ->- QuantMap ->- UniqueMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->- T_Grammar -sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_ =- (T_Grammar (\ _lhsIoptions ->- (let _nontsOo_cata :: Bool- _nontsOo_data :: Bool- _nontsOo_sig :: Bool- _nontsOo_sem :: Bool- _nontsOo_rename :: Bool- _nontsOo_newtypes :: Bool- _nontsOo_wantvisit :: Bool- _nontsOo_unbox :: Bool- _nontsOo_case :: Bool- _nontsOprefix :: String- _nontsOvcount :: Int- _nontsOmanualAttrDepMap :: AttrOrderMap- _nontsOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))- _nontsOacount :: Int- _lhsOerrors :: (Seq Error)- _lhsOoutput :: CGrammar- _nontsOallnts :: ([Identifier])- _nontsOinhMap :: (Map Identifier Attributes)- _nontsOsynMap :: (Map Identifier Attributes)- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- _nontsOcInterfaceMap :: CInterfaceMap- _nontsOcVisitsMap :: CVisitsMap- _nontsOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))- _nontsOo_dovisit :: Bool- _nontsIacount :: Int- _nontsIadditionalDep :: (Seq Edge)- _nontsIaranges :: (Seq (Int,Int,Int))- _nontsIaroundDep :: (Seq Edge)- _nontsIcNonterminals :: CNonterminals- _nontsIdirectDep :: (Seq Edge)- _nontsIerrors :: (Seq Error)- _nontsIinhMap' :: (Map Identifier Attributes)- _nontsIinstDep :: (Seq Edge)- _nontsImergeDep :: (Seq Edge)- _nontsInAutoRules :: Int- _nontsInExplicitRules :: Int- _nontsInonts :: ([(NontermIdent,[ConstructorIdent])])- _nontsIntattrs :: (Seq (Vertex,NTAttr))- _nontsIrules :: (Seq (Vertex,CRule))- _nontsIsynMap' :: (Map Identifier Attributes)- _nontsIvcount :: Int- -- "src-ag/Order.ag"(line 123, column 17)- _o_dovisit =- ({-# LINE 123 "src-ag/Order.ag" #-}- visit _lhsIoptions && null _cyclesErrors- {-# LINE 1149 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 124, column 17)- _nontsOo_cata =- ({-# LINE 124 "src-ag/Order.ag" #-}- folds _lhsIoptions- {-# LINE 1155 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 124, column 17)- _nontsOo_data =- ({-# LINE 125 "src-ag/Order.ag" #-}- dataTypes _lhsIoptions- {-# LINE 1161 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 124, column 17)- _nontsOo_sig =- ({-# LINE 126 "src-ag/Order.ag" #-}- typeSigs _lhsIoptions- {-# LINE 1167 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 124, column 17)- _nontsOo_sem =- ({-# LINE 127 "src-ag/Order.ag" #-}- semfuns _lhsIoptions- {-# LINE 1173 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 124, column 17)- _nontsOo_rename =- ({-# LINE 128 "src-ag/Order.ag" #-}- rename _lhsIoptions- {-# LINE 1179 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 124, column 17)- _nontsOo_newtypes =- ({-# LINE 129 "src-ag/Order.ag" #-}- newtypes _lhsIoptions- {-# LINE 1185 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 124, column 17)- _nontsOo_wantvisit =- ({-# LINE 130 "src-ag/Order.ag" #-}- visit _lhsIoptions- {-# LINE 1191 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 124, column 17)- _nontsOo_unbox =- ({-# LINE 131 "src-ag/Order.ag" #-}- unbox _lhsIoptions- {-# LINE 1197 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 124, column 17)- _nontsOo_case =- ({-# LINE 132 "src-ag/Order.ag" #-}- cases _lhsIoptions- {-# LINE 1203 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 124, column 17)- _nontsOprefix =- ({-# LINE 133 "src-ag/Order.ag" #-}- prefix _lhsIoptions- {-# LINE 1209 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 259, column 15)- _nontsOvcount =- ({-# LINE 259 "src-ag/Order.ag" #-}- 0- {-# LINE 1215 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 285, column 7)- _nontsOmanualAttrDepMap =- ({-# LINE 285 "src-ag/Order.ag" #-}- manualAttrOrderMap_- {-# LINE 1221 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 414, column 14)- _nontsOaroundMap =- ({-# LINE 414 "src-ag/Order.ag" #-}- aroundsMap_- {-# LINE 1227 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 503, column 13)- _nontsOacount =- ({-# LINE 503 "src-ag/Order.ag" #-}- 0- {-# LINE 1233 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 541, column 13)- _ruleTable =- ({-# LINE 541 "src-ag/Order.ag" #-}- Array.array (0,_nontsIvcount-1) (toList _nontsIrules)- {-# LINE 1239 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 542, column 13)- _attrTable =- ({-# LINE 542 "src-ag/Order.ag" #-}- Array.array (0,_nontsIacount-1) (toList _nontsIntattrs)- {-# LINE 1245 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 543, column 13)- _attrVertex =- ({-# LINE 543 "src-ag/Order.ag" #-}- Map.fromList (map swap (toList _nontsIntattrs))- {-# LINE 1251 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 544, column 13)- _tdpToTds =- ({-# LINE 544 "src-ag/Order.ag" #-}- [ (s, maybe (-1) (\v -> findWithErr1 "Grammar.tdpToTds" v _attrVertex) (ntattr cr))- | (s,cr) <- toList _nontsIrules]- {-# LINE 1258 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 546, column 13)- _tdsToTdp =- ({-# LINE 546 "src-ag/Order.ag" #-}- let eq (_,v) (_,v') = v == v'- conv ((s,v):svs) | v == -1 = Nothing- | otherwise = Just (v,s:map fst svs)- in mapMaybe conv (eqClasses eq _tdpToTds)- {-# LINE 1267 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 550, column 13)- _directDep =- ({-# LINE 550 "src-ag/Order.ag" #-}- toList (_nontsIdirectDep Seq.>< _nontsIadditionalDep)- {-# LINE 1273 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 551, column 13)- _instDep =- ({-# LINE 551 "src-ag/Order.ag" #-}- toList _nontsIinstDep- {-# LINE 1279 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 552, column 13)- _aroundDep =- ({-# LINE 552 "src-ag/Order.ag" #-}- toList _nontsIaroundDep- {-# LINE 1285 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 553, column 13)- _mergeDep =- ({-# LINE 553 "src-ag/Order.ag" #-}- toList _nontsImergeDep- {-# LINE 1291 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 554, column 13)- _info =- ({-# LINE 554 "src-ag/Order.ag" #-}- let def [] = -1- def (v:vs) = v- in Info { tdsToTdp = Array.array (0,_nontsIacount-1) _tdsToTdp- , tdpToTds = Array.array (0,_nontsIvcount-1) _tdpToTds- , attrTable = _attrTable- , ruleTable = _ruleTable- , lmh = toList _nontsIaranges- , nonts = _nontsInonts- , wraps = wrappers_- }- {-# LINE 1306 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 565, column 17)- __tup2 =- ({-# LINE 565 "src-ag/Order.ag" #-}- case computeSequential _info _directDep (_instDep ++ _aroundDep ++ _mergeDep ) of- CycleFree cim cvm -> ( cim- , cvm- , []- )- LocalCycle errs -> ( error "No interfaces for AG with local cycles"- , error "No visit sub-sequences for AG with local cycles"- , map (localCycleErr _ruleTable (visit _lhsIoptions)) errs- )- InstCycle errs -> ( error "No interfaces for AG with cycles through insts"- , error "No visit sub-sequences for AG with cycles through insts"- , map (instCycleErr _ruleTable (visit _lhsIoptions)) errs- )- DirectCycle errs -> ( error "No interfaces for AG with direct cycles"- , error "No visit sub-sequences for AG with direct cycles"- , directCycleErrs _attrTable _ruleTable (visit _lhsIoptions) errs- )- InducedCycle cim errs -> ( cim- , error "No visit sub-sequences for AG with induced cycles"- , inducedCycleErrs _attrTable _ruleTable cim errs- )- {-# LINE 1332 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 565, column 17)- (_cInterfaceMap,_,_) =- ({-# LINE 565 "src-ag/Order.ag" #-}- __tup2- {-# LINE 1338 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 565, column 17)- (_,_cVisitsMap,_) =- ({-# LINE 565 "src-ag/Order.ag" #-}- __tup2- {-# LINE 1344 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 565, column 17)- (_,_,_cyclesErrors) =- ({-# LINE 565 "src-ag/Order.ag" #-}- __tup2- {-# LINE 1350 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 587, column 13)- _lhsOerrors =- ({-# LINE 587 "src-ag/Order.ag" #-}- (if withCycle _lhsIoptions then Seq.fromList _cyclesErrors else Seq.empty)- Seq.>< _nontsIerrors- {-# LINE 1357 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 619, column 15)- _lhsOoutput =- ({-# LINE 619 "src-ag/Order.ag" #-}- CGrammar typeSyns_ derivings_ wrappers_ _nontsIcNonterminals pragmas_ paramMap_ contextMap_ quantMap_ _aroundMap _mergeMap _o_dovisit- {-# LINE 1363 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 632, column 14)- _aroundMap =- ({-# LINE 632 "src-ag/Order.ag" #-}- Map.map (Map.map Map.keysSet) aroundsMap_- {-# LINE 1369 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 633, column 14)- _mergeMap =- ({-# LINE 633 "src-ag/Order.ag" #-}- Map.map (Map.map (Map.map (\(nt,srcs,_) -> (nt,srcs)))) mergeMap_- {-# LINE 1375 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 650, column 13)- _nontsOallnts =- ({-# LINE 650 "src-ag/Order.ag" #-}- map fst (_nontsInonts)- {-# LINE 1381 "src-ag/Order.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 15, column 13)- _nontsOinhMap =- ({-# LINE 15 "src-ag/DistChildAttr.ag" #-}- _nontsIinhMap'- {-# LINE 1387 "src-ag/Order.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 16, column 13)- _nontsOsynMap =- ({-# LINE 16 "src-ag/DistChildAttr.ag" #-}- _nontsIsynMap'- {-# LINE 1393 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- _nontsInAutoRules- {-# LINE 1399 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- _nontsInExplicitRules- {-# LINE 1405 "src-ag/Order.hs" #-}- )- -- copy rule (from local)- _nontsOcInterfaceMap =- ({-# LINE 594 "src-ag/Order.ag" #-}- _cInterfaceMap- {-# LINE 1411 "src-ag/Order.hs" #-}- )- -- copy rule (from local)- _nontsOcVisitsMap =- ({-# LINE 601 "src-ag/Order.ag" #-}- _cVisitsMap- {-# LINE 1417 "src-ag/Order.hs" #-}- )- -- copy rule (from local)- _nontsOmergeMap =- ({-# LINE 352 "src-ag/Order.ag" #-}- _mergeMap- {-# LINE 1423 "src-ag/Order.hs" #-}- )- -- copy rule (from local)- _nontsOo_dovisit =- ({-# LINE 116 "src-ag/Order.ag" #-}- _o_dovisit- {-# LINE 1429 "src-ag/Order.hs" #-}- )- ( _nontsIacount,_nontsIadditionalDep,_nontsIaranges,_nontsIaroundDep,_nontsIcNonterminals,_nontsIdirectDep,_nontsIerrors,_nontsIinhMap',_nontsIinstDep,_nontsImergeDep,_nontsInAutoRules,_nontsInExplicitRules,_nontsInonts,_nontsIntattrs,_nontsIrules,_nontsIsynMap',_nontsIvcount) =- nonts_ _nontsOacount _nontsOallnts _nontsOaroundMap _nontsOcInterfaceMap _nontsOcVisitsMap _nontsOinhMap _nontsOmanualAttrDepMap _nontsOmergeMap _nontsOo_case _nontsOo_cata _nontsOo_data _nontsOo_dovisit _nontsOo_newtypes _nontsOo_rename _nontsOo_sem _nontsOo_sig _nontsOo_unbox _nontsOo_wantvisit _nontsOprefix _nontsOsynMap _nontsOvcount - in ( _lhsOerrors,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOoutput))) )--- Nonterminal --------------------------------------------------{-- visit 0:- inherited attributes:- allnts : [Identifier]- aroundMap : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- cInterfaceMap : CInterfaceMap- cVisitsMap : CVisitsMap- inhMap : Map Identifier Attributes- manualAttrDepMap : AttrOrderMap- mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))- o_case : Bool- o_cata : Bool- o_data : Bool- o_dovisit : Bool- o_newtypes : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_unbox : Bool- o_wantvisit : Bool- prefix : String- synMap : Map Identifier Attributes- chained attributes:- acount : Int- vcount : Int- synthesized attributes:- additionalDep : Seq Edge- aranges : Seq (Int,Int,Int)- aroundDep : Seq Edge- cNonterminal : CNonterminal- directDep : Seq Edge- errors : Seq Error- inhMap' : Map Identifier Attributes- instDep : Seq Edge- mergeDep : Seq Edge- nAutoRules : Int- nExplicitRules : Int- nonts : [(NontermIdent,[ConstructorIdent])]- ntattrs : Seq (Vertex,NTAttr)- rules : Seq (Vertex,CRule)- synMap' : Map Identifier Attributes- alternatives:- alternative Nonterminal:- child nt : {NontermIdent}- child params : {[Identifier]}- child inh : {Attributes}- child syn : {Attributes}- child prods : Productions - visit 0:- local mergeMap : _- local aroundMap : _- local ntattrs : _- local cInter : _--}--- cata-sem_Nonterminal :: Nonterminal ->- T_Nonterminal -sem_Nonterminal (Nonterminal _nt _params _inh _syn _prods ) =- (sem_Nonterminal_Nonterminal _nt _params _inh _syn (sem_Productions _prods ) )--- semantic domain-newtype T_Nonterminal = T_Nonterminal (Int ->- ([Identifier]) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- CInterfaceMap ->- CVisitsMap ->- (Map Identifier Attributes) ->- AttrOrderMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- String ->- (Map Identifier Attributes) ->- Int ->- ( Int,(Seq Edge),(Seq (Int,Int,Int)),(Seq Edge),CNonterminal,(Seq Edge),(Seq Error),(Map Identifier Attributes),(Seq Edge),(Seq Edge),Int,Int,([(NontermIdent,[ConstructorIdent])]),(Seq (Vertex,NTAttr)),(Seq (Vertex,CRule)),(Map Identifier Attributes),Int))-data Inh_Nonterminal = Inh_Nonterminal {acount_Inh_Nonterminal :: !(Int),allnts_Inh_Nonterminal :: !(([Identifier])),aroundMap_Inh_Nonterminal :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))),cInterfaceMap_Inh_Nonterminal :: !(CInterfaceMap),cVisitsMap_Inh_Nonterminal :: !(CVisitsMap),inhMap_Inh_Nonterminal :: !((Map Identifier Attributes)),manualAttrDepMap_Inh_Nonterminal :: !(AttrOrderMap),mergeMap_Inh_Nonterminal :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))),o_case_Inh_Nonterminal :: !(Bool),o_cata_Inh_Nonterminal :: !(Bool),o_data_Inh_Nonterminal :: !(Bool),o_dovisit_Inh_Nonterminal :: !(Bool),o_newtypes_Inh_Nonterminal :: !(Bool),o_rename_Inh_Nonterminal :: !(Bool),o_sem_Inh_Nonterminal :: !(Bool),o_sig_Inh_Nonterminal :: !(Bool),o_unbox_Inh_Nonterminal :: !(Bool),o_wantvisit_Inh_Nonterminal :: !(Bool),prefix_Inh_Nonterminal :: !(String),synMap_Inh_Nonterminal :: !((Map Identifier Attributes)),vcount_Inh_Nonterminal :: !(Int)}-data Syn_Nonterminal = Syn_Nonterminal {acount_Syn_Nonterminal :: !(Int),additionalDep_Syn_Nonterminal :: !((Seq Edge)),aranges_Syn_Nonterminal :: !((Seq (Int,Int,Int))),aroundDep_Syn_Nonterminal :: !((Seq Edge)),cNonterminal_Syn_Nonterminal :: !(CNonterminal),directDep_Syn_Nonterminal :: !((Seq Edge)),errors_Syn_Nonterminal :: !((Seq Error)),inhMap'_Syn_Nonterminal :: !((Map Identifier Attributes)),instDep_Syn_Nonterminal :: !((Seq Edge)),mergeDep_Syn_Nonterminal :: !((Seq Edge)),nAutoRules_Syn_Nonterminal :: !(Int),nExplicitRules_Syn_Nonterminal :: !(Int),nonts_Syn_Nonterminal :: !(([(NontermIdent,[ConstructorIdent])])),ntattrs_Syn_Nonterminal :: !((Seq (Vertex,NTAttr))),rules_Syn_Nonterminal :: !((Seq (Vertex,CRule))),synMap'_Syn_Nonterminal :: !((Map Identifier Attributes)),vcount_Syn_Nonterminal :: !(Int)}-wrap_Nonterminal :: T_Nonterminal ->- Inh_Nonterminal ->- Syn_Nonterminal -wrap_Nonterminal (T_Nonterminal sem ) (Inh_Nonterminal _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsynMap _lhsIvcount ) =- (let ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminal,_lhsOdirectDep,_lhsOerrors,_lhsOinhMap',_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOsynMap',_lhsOvcount) = sem _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsynMap _lhsIvcount - in (Syn_Nonterminal _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminal _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount ))-sem_Nonterminal_Nonterminal :: NontermIdent ->- ([Identifier]) ->- Attributes ->- Attributes ->- T_Productions ->- T_Nonterminal -sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ (T_Productions prods_ ) =- (T_Nonterminal (\ _lhsIacount- _lhsIallnts- _lhsIaroundMap- _lhsIcInterfaceMap- _lhsIcVisitsMap- _lhsIinhMap- _lhsImanualAttrDepMap- _lhsImergeMap- _lhsIo_case- _lhsIo_cata- _lhsIo_data- _lhsIo_dovisit- _lhsIo_newtypes- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_unbox- _lhsIo_wantvisit- _lhsIprefix- _lhsIsynMap- _lhsIvcount ->- (let _prodsOnt :: Identifier- _prodsOinh :: Attributes- _prodsOsyn :: Attributes- _lhsOntattrs :: (Seq (Vertex,NTAttr))- _lhsOacount :: Int- _lhsOaranges :: (Seq (Int,Int,Int))- _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])- _lhsOcNonterminal :: CNonterminal- _lhsOinhMap' :: (Map Identifier Attributes)- _lhsOsynMap' :: (Map Identifier Attributes)- _lhsOadditionalDep :: (Seq Edge)- _lhsOaroundDep :: (Seq Edge)- _lhsOdirectDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOinstDep :: (Seq Edge)- _lhsOmergeDep :: (Seq Edge)- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- _lhsOrules :: (Seq (Vertex,CRule))- _lhsOvcount :: Int- _prodsOallnts :: ([Identifier])- _prodsOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))- _prodsOcVisitsMap :: CVisitsMap- _prodsOinhMap :: (Map Identifier Attributes)- _prodsOmanualAttrDepMap :: AttrOrderMap- _prodsOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))- _prodsOo_case :: Bool- _prodsOo_cata :: Bool- _prodsOo_dovisit :: Bool- _prodsOo_newtypes :: Bool- _prodsOo_rename :: Bool- _prodsOo_sem :: Bool- _prodsOo_sig :: Bool- _prodsOo_unbox :: Bool- _prodsOo_wantvisit :: Bool- _prodsOprefix :: String- _prodsOsynMap :: (Map Identifier Attributes)- _prodsOvcount :: Int- _prodsIadditionalDep :: (Seq Edge)- _prodsIaroundDep :: (Seq Edge)- _prodsIcProductions :: CProductions- _prodsIcons :: ([ConstructorIdent])- _prodsIdirectDep :: (Seq Edge)- _prodsIerrors :: (Seq Error)- _prodsIinstDep :: (Seq Edge)- _prodsImergeDep :: (Seq Edge)- _prodsInAutoRules :: Int- _prodsInExplicitRules :: Int- _prodsIrules :: (Seq (Vertex,CRule))- _prodsIvcount :: Int- -- "src-ag/Order.ag"(line 97, column 17)- _prodsOnt =- ({-# LINE 97 "src-ag/Order.ag" #-}- nt_- {-# LINE 1607 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 100, column 17)- _prodsOinh =- ({-# LINE 100 "src-ag/Order.ag" #-}- inh_- {-# LINE 1613 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 101, column 17)- _prodsOsyn =- ({-# LINE 101 "src-ag/Order.ag" #-}- syn_- {-# LINE 1619 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 357, column 32)- _mergeMap =- ({-# LINE 357 "src-ag/Order.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsImergeMap- {-# LINE 1625 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 410, column 32)- _aroundMap =- ({-# LINE 410 "src-ag/Order.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIaroundMap- {-# LINE 1631 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 506, column 17)- _ntattrs =- ({-# LINE 506 "src-ag/Order.ag" #-}- [ NTAInh nt_ inh tp | (inh,tp) <- Map.assocs inh_ ]- ++ [NTASyn nt_ syn tp | (syn,tp) <- Map.assocs syn_ ]- {-# LINE 1638 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 508, column 17)- _lhsOntattrs =- ({-# LINE 508 "src-ag/Order.ag" #-}- Seq.fromList (zip [_lhsIacount ..] _ntattrs)- {-# LINE 1644 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 509, column 17)- _lhsOacount =- ({-# LINE 509 "src-ag/Order.ag" #-}- _lhsIacount + Map.size inh_ + Map.size syn_- {-# LINE 1650 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 510, column 17)- _lhsOaranges =- ({-# LINE 510 "src-ag/Order.ag" #-}- Seq.singleton- (_lhsIacount- ,_lhsIacount + Map.size inh_- ,_lhsIacount + Map.size syn_ + Map.size inh_ - 1)- {-# LINE 1659 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 519, column 19)- _lhsOnonts =- ({-# LINE 519 "src-ag/Order.ag" #-}- [(nt_,_prodsIcons)]- {-# LINE 1665 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 596, column 19)- _cInter =- ({-# LINE 596 "src-ag/Order.ag" #-}- if _lhsIo_dovisit- then findWithErr1 "Nonterminal.cInter" nt_ _lhsIcInterfaceMap- else CInterface [CSegment inh_ syn_]- {-# LINE 1673 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 624, column 19)- _lhsOcNonterminal =- ({-# LINE 624 "src-ag/Order.ag" #-}- CNonterminal nt_ params_ inh_ syn_ _prodsIcProductions _cInter- {-# LINE 1679 "src-ag/Order.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 7, column 18)- _lhsOinhMap' =- ({-# LINE 7 "src-ag/DistChildAttr.ag" #-}- Map.singleton nt_ inh_- {-# LINE 1685 "src-ag/Order.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 8, column 18)- _lhsOsynMap' =- ({-# LINE 8 "src-ag/DistChildAttr.ag" #-}- Map.singleton nt_ syn_- {-# LINE 1691 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 281, column 60)- _lhsOadditionalDep =- ({-# LINE 281 "src-ag/Order.ag" #-}- _prodsIadditionalDep- {-# LINE 1697 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 402, column 24)- _lhsOaroundDep =- ({-# LINE 402 "src-ag/Order.ag" #-}- _prodsIaroundDep- {-# LINE 1703 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 267, column 33)- _lhsOdirectDep =- ({-# LINE 267 "src-ag/Order.ag" #-}- _prodsIdirectDep- {-# LINE 1709 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- _prodsIerrors- {-# LINE 1715 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 310, column 31)- _lhsOinstDep =- ({-# LINE 310 "src-ag/Order.ag" #-}- _prodsIinstDep- {-# LINE 1721 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 365, column 18)- _lhsOmergeDep =- ({-# LINE 365 "src-ag/Order.ag" #-}- _prodsImergeDep- {-# LINE 1727 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- _prodsInAutoRules- {-# LINE 1733 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- _prodsInExplicitRules- {-# LINE 1739 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 257, column 18)- _lhsOrules =- ({-# LINE 257 "src-ag/Order.ag" #-}- _prodsIrules- {-# LINE 1745 "src-ag/Order.hs" #-}- )- -- copy rule (up)- _lhsOvcount =- ({-# LINE 256 "src-ag/Order.ag" #-}- _prodsIvcount- {-# LINE 1751 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _prodsOallnts =- ({-# LINE 647 "src-ag/Order.ag" #-}- _lhsIallnts- {-# LINE 1757 "src-ag/Order.hs" #-}- )- -- copy rule (from local)- _prodsOaroundMap =- ({-# LINE 408 "src-ag/Order.ag" #-}- _aroundMap- {-# LINE 1763 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _prodsOcVisitsMap =- ({-# LINE 601 "src-ag/Order.ag" #-}- _lhsIcVisitsMap- {-# LINE 1769 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _prodsOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 1775 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _prodsOmanualAttrDepMap =- ({-# LINE 281 "src-ag/Order.ag" #-}- _lhsImanualAttrDepMap- {-# LINE 1781 "src-ag/Order.hs" #-}- )- -- copy rule (from local)- _prodsOmergeMap =- ({-# LINE 355 "src-ag/Order.ag" #-}- _mergeMap- {-# LINE 1787 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _prodsOo_case =- ({-# LINE 117 "src-ag/Order.ag" #-}- _lhsIo_case- {-# LINE 1793 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _prodsOo_cata =- ({-# LINE 111 "src-ag/Order.ag" #-}- _lhsIo_cata- {-# LINE 1799 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _prodsOo_dovisit =- ({-# LINE 116 "src-ag/Order.ag" #-}- _lhsIo_dovisit- {-# LINE 1805 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _prodsOo_newtypes =- ({-# LINE 110 "src-ag/Order.ag" #-}- _lhsIo_newtypes- {-# LINE 1811 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _prodsOo_rename =- ({-# LINE 114 "src-ag/Order.ag" #-}- _lhsIo_rename- {-# LINE 1817 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _prodsOo_sem =- ({-# LINE 113 "src-ag/Order.ag" #-}- _lhsIo_sem- {-# LINE 1823 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _prodsOo_sig =- ({-# LINE 112 "src-ag/Order.ag" #-}- _lhsIo_sig- {-# LINE 1829 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _prodsOo_unbox =- ({-# LINE 119 "src-ag/Order.ag" #-}- _lhsIo_unbox- {-# LINE 1835 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _prodsOo_wantvisit =- ({-# LINE 115 "src-ag/Order.ag" #-}- _lhsIo_wantvisit- {-# LINE 1841 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _prodsOprefix =- ({-# LINE 118 "src-ag/Order.ag" #-}- _lhsIprefix- {-# LINE 1847 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _prodsOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 1853 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _prodsOvcount =- ({-# LINE 256 "src-ag/Order.ag" #-}- _lhsIvcount- {-# LINE 1859 "src-ag/Order.hs" #-}- )- ( _prodsIadditionalDep,_prodsIaroundDep,_prodsIcProductions,_prodsIcons,_prodsIdirectDep,_prodsIerrors,_prodsIinstDep,_prodsImergeDep,_prodsInAutoRules,_prodsInExplicitRules,_prodsIrules,_prodsIvcount) =- prods_ _prodsOallnts _prodsOaroundMap _prodsOcVisitsMap _prodsOinh _prodsOinhMap _prodsOmanualAttrDepMap _prodsOmergeMap _prodsOnt _prodsOo_case _prodsOo_cata _prodsOo_dovisit _prodsOo_newtypes _prodsOo_rename _prodsOo_sem _prodsOo_sig _prodsOo_unbox _prodsOo_wantvisit _prodsOprefix _prodsOsyn _prodsOsynMap _prodsOvcount - in ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminal,_lhsOdirectDep,_lhsOerrors,_lhsOinhMap',_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOsynMap',_lhsOvcount))) )--- Nonterminals -------------------------------------------------{-- visit 0:- inherited attributes:- allnts : [Identifier]- aroundMap : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- cInterfaceMap : CInterfaceMap- cVisitsMap : CVisitsMap- inhMap : Map Identifier Attributes- manualAttrDepMap : AttrOrderMap- mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))- o_case : Bool- o_cata : Bool- o_data : Bool- o_dovisit : Bool- o_newtypes : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_unbox : Bool- o_wantvisit : Bool- prefix : String- synMap : Map Identifier Attributes- chained attributes:- acount : Int- vcount : Int- synthesized attributes:- additionalDep : Seq Edge- aranges : Seq (Int,Int,Int)- aroundDep : Seq Edge- cNonterminals : CNonterminals- directDep : Seq Edge- errors : Seq Error- inhMap' : Map Identifier Attributes- instDep : Seq Edge- mergeDep : Seq Edge- nAutoRules : Int- nExplicitRules : Int- nonts : [(NontermIdent,[ConstructorIdent])]- ntattrs : Seq (Vertex,NTAttr)- rules : Seq (Vertex,CRule)- synMap' : Map Identifier Attributes- alternatives:- alternative Cons:- child hd : Nonterminal - child tl : Nonterminals - alternative Nil:--}--- cata-sem_Nonterminals :: Nonterminals ->- T_Nonterminals -sem_Nonterminals list =- (Prelude.foldr sem_Nonterminals_Cons sem_Nonterminals_Nil (Prelude.map sem_Nonterminal list) )--- semantic domain-newtype T_Nonterminals = T_Nonterminals (Int ->- ([Identifier]) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- CInterfaceMap ->- CVisitsMap ->- (Map Identifier Attributes) ->- AttrOrderMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- String ->- (Map Identifier Attributes) ->- Int ->- ( Int,(Seq Edge),(Seq (Int,Int,Int)),(Seq Edge),CNonterminals,(Seq Edge),(Seq Error),(Map Identifier Attributes),(Seq Edge),(Seq Edge),Int,Int,([(NontermIdent,[ConstructorIdent])]),(Seq (Vertex,NTAttr)),(Seq (Vertex,CRule)),(Map Identifier Attributes),Int))-data Inh_Nonterminals = Inh_Nonterminals {acount_Inh_Nonterminals :: !(Int),allnts_Inh_Nonterminals :: !(([Identifier])),aroundMap_Inh_Nonterminals :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))),cInterfaceMap_Inh_Nonterminals :: !(CInterfaceMap),cVisitsMap_Inh_Nonterminals :: !(CVisitsMap),inhMap_Inh_Nonterminals :: !((Map Identifier Attributes)),manualAttrDepMap_Inh_Nonterminals :: !(AttrOrderMap),mergeMap_Inh_Nonterminals :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))),o_case_Inh_Nonterminals :: !(Bool),o_cata_Inh_Nonterminals :: !(Bool),o_data_Inh_Nonterminals :: !(Bool),o_dovisit_Inh_Nonterminals :: !(Bool),o_newtypes_Inh_Nonterminals :: !(Bool),o_rename_Inh_Nonterminals :: !(Bool),o_sem_Inh_Nonterminals :: !(Bool),o_sig_Inh_Nonterminals :: !(Bool),o_unbox_Inh_Nonterminals :: !(Bool),o_wantvisit_Inh_Nonterminals :: !(Bool),prefix_Inh_Nonterminals :: !(String),synMap_Inh_Nonterminals :: !((Map Identifier Attributes)),vcount_Inh_Nonterminals :: !(Int)}-data Syn_Nonterminals = Syn_Nonterminals {acount_Syn_Nonterminals :: !(Int),additionalDep_Syn_Nonterminals :: !((Seq Edge)),aranges_Syn_Nonterminals :: !((Seq (Int,Int,Int))),aroundDep_Syn_Nonterminals :: !((Seq Edge)),cNonterminals_Syn_Nonterminals :: !(CNonterminals),directDep_Syn_Nonterminals :: !((Seq Edge)),errors_Syn_Nonterminals :: !((Seq Error)),inhMap'_Syn_Nonterminals :: !((Map Identifier Attributes)),instDep_Syn_Nonterminals :: !((Seq Edge)),mergeDep_Syn_Nonterminals :: !((Seq Edge)),nAutoRules_Syn_Nonterminals :: !(Int),nExplicitRules_Syn_Nonterminals :: !(Int),nonts_Syn_Nonterminals :: !(([(NontermIdent,[ConstructorIdent])])),ntattrs_Syn_Nonterminals :: !((Seq (Vertex,NTAttr))),rules_Syn_Nonterminals :: !((Seq (Vertex,CRule))),synMap'_Syn_Nonterminals :: !((Map Identifier Attributes)),vcount_Syn_Nonterminals :: !(Int)}-wrap_Nonterminals :: T_Nonterminals ->- Inh_Nonterminals ->- Syn_Nonterminals -wrap_Nonterminals (T_Nonterminals sem ) (Inh_Nonterminals _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsynMap _lhsIvcount ) =- (let ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminals,_lhsOdirectDep,_lhsOerrors,_lhsOinhMap',_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOsynMap',_lhsOvcount) = sem _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsynMap _lhsIvcount - in (Syn_Nonterminals _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminals _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount ))-sem_Nonterminals_Cons :: T_Nonterminal ->- T_Nonterminals ->- T_Nonterminals -sem_Nonterminals_Cons (T_Nonterminal hd_ ) (T_Nonterminals tl_ ) =- (T_Nonterminals (\ _lhsIacount- _lhsIallnts- _lhsIaroundMap- _lhsIcInterfaceMap- _lhsIcVisitsMap- _lhsIinhMap- _lhsImanualAttrDepMap- _lhsImergeMap- _lhsIo_case- _lhsIo_cata- _lhsIo_data- _lhsIo_dovisit- _lhsIo_newtypes- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_unbox- _lhsIo_wantvisit- _lhsIprefix- _lhsIsynMap- _lhsIvcount ->- (let _lhsOcNonterminals :: CNonterminals- _lhsOadditionalDep :: (Seq Edge)- _lhsOaranges :: (Seq (Int,Int,Int))- _lhsOaroundDep :: (Seq Edge)- _lhsOdirectDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOinhMap' :: (Map Identifier Attributes)- _lhsOinstDep :: (Seq Edge)- _lhsOmergeDep :: (Seq Edge)- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])- _lhsOntattrs :: (Seq (Vertex,NTAttr))- _lhsOrules :: (Seq (Vertex,CRule))- _lhsOsynMap' :: (Map Identifier Attributes)- _lhsOacount :: Int- _lhsOvcount :: Int- _hdOacount :: Int- _hdOallnts :: ([Identifier])- _hdOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))- _hdOcInterfaceMap :: CInterfaceMap- _hdOcVisitsMap :: CVisitsMap- _hdOinhMap :: (Map Identifier Attributes)- _hdOmanualAttrDepMap :: AttrOrderMap- _hdOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))- _hdOo_case :: Bool- _hdOo_cata :: Bool- _hdOo_data :: Bool- _hdOo_dovisit :: Bool- _hdOo_newtypes :: Bool- _hdOo_rename :: Bool- _hdOo_sem :: Bool- _hdOo_sig :: Bool- _hdOo_unbox :: Bool- _hdOo_wantvisit :: Bool- _hdOprefix :: String- _hdOsynMap :: (Map Identifier Attributes)- _hdOvcount :: Int- _tlOacount :: Int- _tlOallnts :: ([Identifier])- _tlOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))- _tlOcInterfaceMap :: CInterfaceMap- _tlOcVisitsMap :: CVisitsMap- _tlOinhMap :: (Map Identifier Attributes)- _tlOmanualAttrDepMap :: AttrOrderMap- _tlOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))- _tlOo_case :: Bool- _tlOo_cata :: Bool- _tlOo_data :: Bool- _tlOo_dovisit :: Bool- _tlOo_newtypes :: Bool- _tlOo_rename :: Bool- _tlOo_sem :: Bool- _tlOo_sig :: Bool- _tlOo_unbox :: Bool- _tlOo_wantvisit :: Bool- _tlOprefix :: String- _tlOsynMap :: (Map Identifier Attributes)- _tlOvcount :: Int- _hdIacount :: Int- _hdIadditionalDep :: (Seq Edge)- _hdIaranges :: (Seq (Int,Int,Int))- _hdIaroundDep :: (Seq Edge)- _hdIcNonterminal :: CNonterminal- _hdIdirectDep :: (Seq Edge)- _hdIerrors :: (Seq Error)- _hdIinhMap' :: (Map Identifier Attributes)- _hdIinstDep :: (Seq Edge)- _hdImergeDep :: (Seq Edge)- _hdInAutoRules :: Int- _hdInExplicitRules :: Int- _hdInonts :: ([(NontermIdent,[ConstructorIdent])])- _hdIntattrs :: (Seq (Vertex,NTAttr))- _hdIrules :: (Seq (Vertex,CRule))- _hdIsynMap' :: (Map Identifier Attributes)- _hdIvcount :: Int- _tlIacount :: Int- _tlIadditionalDep :: (Seq Edge)- _tlIaranges :: (Seq (Int,Int,Int))- _tlIaroundDep :: (Seq Edge)- _tlIcNonterminals :: CNonterminals- _tlIdirectDep :: (Seq Edge)- _tlIerrors :: (Seq Error)- _tlIinhMap' :: (Map Identifier Attributes)- _tlIinstDep :: (Seq Edge)- _tlImergeDep :: (Seq Edge)- _tlInAutoRules :: Int- _tlInExplicitRules :: Int- _tlInonts :: ([(NontermIdent,[ConstructorIdent])])- _tlIntattrs :: (Seq (Vertex,NTAttr))- _tlIrules :: (Seq (Vertex,CRule))- _tlIsynMap' :: (Map Identifier Attributes)- _tlIvcount :: Int- -- "src-ag/Order.ag"(line 621, column 12)- _lhsOcNonterminals =- ({-# LINE 621 "src-ag/Order.ag" #-}- _hdIcNonterminal : _tlIcNonterminals- {-# LINE 2070 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 281, column 60)- _lhsOadditionalDep =- ({-# LINE 281 "src-ag/Order.ag" #-}- _hdIadditionalDep Seq.>< _tlIadditionalDep- {-# LINE 2076 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 500, column 36)- _lhsOaranges =- ({-# LINE 500 "src-ag/Order.ag" #-}- _hdIaranges Seq.>< _tlIaranges- {-# LINE 2082 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 402, column 24)- _lhsOaroundDep =- ({-# LINE 402 "src-ag/Order.ag" #-}- _hdIaroundDep Seq.>< _tlIaroundDep- {-# LINE 2088 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 267, column 33)- _lhsOdirectDep =- ({-# LINE 267 "src-ag/Order.ag" #-}- _hdIdirectDep Seq.>< _tlIdirectDep- {-# LINE 2094 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 2100 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)- _lhsOinhMap' =- ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- _hdIinhMap' `Map.union` _tlIinhMap'- {-# LINE 2106 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 310, column 31)- _lhsOinstDep =- ({-# LINE 310 "src-ag/Order.ag" #-}- _hdIinstDep Seq.>< _tlIinstDep- {-# LINE 2112 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 365, column 18)- _lhsOmergeDep =- ({-# LINE 365 "src-ag/Order.ag" #-}- _hdImergeDep Seq.>< _tlImergeDep- {-# LINE 2118 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- _hdInAutoRules + _tlInAutoRules- {-# LINE 2124 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- _hdInExplicitRules + _tlInExplicitRules- {-# LINE 2130 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 517, column 43)- _lhsOnonts =- ({-# LINE 517 "src-ag/Order.ag" #-}- _hdInonts ++ _tlInonts- {-# LINE 2136 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 499, column 35)- _lhsOntattrs =- ({-# LINE 499 "src-ag/Order.ag" #-}- _hdIntattrs Seq.>< _tlIntattrs- {-# LINE 2142 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 257, column 18)- _lhsOrules =- ({-# LINE 257 "src-ag/Order.ag" #-}- _hdIrules Seq.>< _tlIrules- {-# LINE 2148 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)- _lhsOsynMap' =- ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- _hdIsynMap' `Map.union` _tlIsynMap'- {-# LINE 2154 "src-ag/Order.hs" #-}- )- -- copy rule (up)- _lhsOacount =- ({-# LINE 499 "src-ag/Order.ag" #-}- _tlIacount- {-# LINE 2160 "src-ag/Order.hs" #-}- )- -- copy rule (up)- _lhsOvcount =- ({-# LINE 256 "src-ag/Order.ag" #-}- _tlIvcount- {-# LINE 2166 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOacount =- ({-# LINE 499 "src-ag/Order.ag" #-}- _lhsIacount- {-# LINE 2172 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOallnts =- ({-# LINE 647 "src-ag/Order.ag" #-}- _lhsIallnts- {-# LINE 2178 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOaroundMap =- ({-# LINE 405 "src-ag/Order.ag" #-}- _lhsIaroundMap- {-# LINE 2184 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOcInterfaceMap =- ({-# LINE 594 "src-ag/Order.ag" #-}- _lhsIcInterfaceMap- {-# LINE 2190 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOcVisitsMap =- ({-# LINE 601 "src-ag/Order.ag" #-}- _lhsIcVisitsMap- {-# LINE 2196 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 2202 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOmanualAttrDepMap =- ({-# LINE 281 "src-ag/Order.ag" #-}- _lhsImanualAttrDepMap- {-# LINE 2208 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 352 "src-ag/Order.ag" #-}- _lhsImergeMap- {-# LINE 2214 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_case =- ({-# LINE 117 "src-ag/Order.ag" #-}- _lhsIo_case- {-# LINE 2220 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_cata =- ({-# LINE 111 "src-ag/Order.ag" #-}- _lhsIo_cata- {-# LINE 2226 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_data =- ({-# LINE 120 "src-ag/Order.ag" #-}- _lhsIo_data- {-# LINE 2232 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_dovisit =- ({-# LINE 116 "src-ag/Order.ag" #-}- _lhsIo_dovisit- {-# LINE 2238 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_newtypes =- ({-# LINE 110 "src-ag/Order.ag" #-}- _lhsIo_newtypes- {-# LINE 2244 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_rename =- ({-# LINE 114 "src-ag/Order.ag" #-}- _lhsIo_rename- {-# LINE 2250 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_sem =- ({-# LINE 113 "src-ag/Order.ag" #-}- _lhsIo_sem- {-# LINE 2256 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_sig =- ({-# LINE 112 "src-ag/Order.ag" #-}- _lhsIo_sig- {-# LINE 2262 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_unbox =- ({-# LINE 119 "src-ag/Order.ag" #-}- _lhsIo_unbox- {-# LINE 2268 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_wantvisit =- ({-# LINE 115 "src-ag/Order.ag" #-}- _lhsIo_wantvisit- {-# LINE 2274 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOprefix =- ({-# LINE 118 "src-ag/Order.ag" #-}- _lhsIprefix- {-# LINE 2280 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 2286 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOvcount =- ({-# LINE 256 "src-ag/Order.ag" #-}- _lhsIvcount- {-# LINE 2292 "src-ag/Order.hs" #-}- )- -- copy rule (chain)- _tlOacount =- ({-# LINE 499 "src-ag/Order.ag" #-}- _hdIacount- {-# LINE 2298 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOallnts =- ({-# LINE 647 "src-ag/Order.ag" #-}- _lhsIallnts- {-# LINE 2304 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOaroundMap =- ({-# LINE 405 "src-ag/Order.ag" #-}- _lhsIaroundMap- {-# LINE 2310 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOcInterfaceMap =- ({-# LINE 594 "src-ag/Order.ag" #-}- _lhsIcInterfaceMap- {-# LINE 2316 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOcVisitsMap =- ({-# LINE 601 "src-ag/Order.ag" #-}- _lhsIcVisitsMap- {-# LINE 2322 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 2328 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOmanualAttrDepMap =- ({-# LINE 281 "src-ag/Order.ag" #-}- _lhsImanualAttrDepMap- {-# LINE 2334 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 352 "src-ag/Order.ag" #-}- _lhsImergeMap- {-# LINE 2340 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_case =- ({-# LINE 117 "src-ag/Order.ag" #-}- _lhsIo_case- {-# LINE 2346 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_cata =- ({-# LINE 111 "src-ag/Order.ag" #-}- _lhsIo_cata- {-# LINE 2352 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_data =- ({-# LINE 120 "src-ag/Order.ag" #-}- _lhsIo_data- {-# LINE 2358 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_dovisit =- ({-# LINE 116 "src-ag/Order.ag" #-}- _lhsIo_dovisit- {-# LINE 2364 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_newtypes =- ({-# LINE 110 "src-ag/Order.ag" #-}- _lhsIo_newtypes- {-# LINE 2370 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_rename =- ({-# LINE 114 "src-ag/Order.ag" #-}- _lhsIo_rename- {-# LINE 2376 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_sem =- ({-# LINE 113 "src-ag/Order.ag" #-}- _lhsIo_sem- {-# LINE 2382 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_sig =- ({-# LINE 112 "src-ag/Order.ag" #-}- _lhsIo_sig- {-# LINE 2388 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_unbox =- ({-# LINE 119 "src-ag/Order.ag" #-}- _lhsIo_unbox- {-# LINE 2394 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_wantvisit =- ({-# LINE 115 "src-ag/Order.ag" #-}- _lhsIo_wantvisit- {-# LINE 2400 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOprefix =- ({-# LINE 118 "src-ag/Order.ag" #-}- _lhsIprefix- {-# LINE 2406 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 2412 "src-ag/Order.hs" #-}- )- -- copy rule (chain)- _tlOvcount =- ({-# LINE 256 "src-ag/Order.ag" #-}- _hdIvcount- {-# LINE 2418 "src-ag/Order.hs" #-}- )- ( _hdIacount,_hdIadditionalDep,_hdIaranges,_hdIaroundDep,_hdIcNonterminal,_hdIdirectDep,_hdIerrors,_hdIinhMap',_hdIinstDep,_hdImergeDep,_hdInAutoRules,_hdInExplicitRules,_hdInonts,_hdIntattrs,_hdIrules,_hdIsynMap',_hdIvcount) =- hd_ _hdOacount _hdOallnts _hdOaroundMap _hdOcInterfaceMap _hdOcVisitsMap _hdOinhMap _hdOmanualAttrDepMap _hdOmergeMap _hdOo_case _hdOo_cata _hdOo_data _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_unbox _hdOo_wantvisit _hdOprefix _hdOsynMap _hdOvcount - ( _tlIacount,_tlIadditionalDep,_tlIaranges,_tlIaroundDep,_tlIcNonterminals,_tlIdirectDep,_tlIerrors,_tlIinhMap',_tlIinstDep,_tlImergeDep,_tlInAutoRules,_tlInExplicitRules,_tlInonts,_tlIntattrs,_tlIrules,_tlIsynMap',_tlIvcount) =- tl_ _tlOacount _tlOallnts _tlOaroundMap _tlOcInterfaceMap _tlOcVisitsMap _tlOinhMap _tlOmanualAttrDepMap _tlOmergeMap _tlOo_case _tlOo_cata _tlOo_data _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_unbox _tlOo_wantvisit _tlOprefix _tlOsynMap _tlOvcount - in ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminals,_lhsOdirectDep,_lhsOerrors,_lhsOinhMap',_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOsynMap',_lhsOvcount))) )-sem_Nonterminals_Nil :: T_Nonterminals -sem_Nonterminals_Nil =- (T_Nonterminals (\ _lhsIacount- _lhsIallnts- _lhsIaroundMap- _lhsIcInterfaceMap- _lhsIcVisitsMap- _lhsIinhMap- _lhsImanualAttrDepMap- _lhsImergeMap- _lhsIo_case- _lhsIo_cata- _lhsIo_data- _lhsIo_dovisit- _lhsIo_newtypes- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_unbox- _lhsIo_wantvisit- _lhsIprefix- _lhsIsynMap- _lhsIvcount ->- (let _lhsOcNonterminals :: CNonterminals- _lhsOadditionalDep :: (Seq Edge)- _lhsOaranges :: (Seq (Int,Int,Int))- _lhsOaroundDep :: (Seq Edge)- _lhsOdirectDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOinhMap' :: (Map Identifier Attributes)- _lhsOinstDep :: (Seq Edge)- _lhsOmergeDep :: (Seq Edge)- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])- _lhsOntattrs :: (Seq (Vertex,NTAttr))- _lhsOrules :: (Seq (Vertex,CRule))- _lhsOsynMap' :: (Map Identifier Attributes)- _lhsOacount :: Int- _lhsOvcount :: Int- -- "src-ag/Order.ag"(line 622, column 12)- _lhsOcNonterminals =- ({-# LINE 622 "src-ag/Order.ag" #-}- []- {-# LINE 2469 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 281, column 60)- _lhsOadditionalDep =- ({-# LINE 281 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 2475 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 500, column 36)- _lhsOaranges =- ({-# LINE 500 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 2481 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 402, column 24)- _lhsOaroundDep =- ({-# LINE 402 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 2487 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 267, column 33)- _lhsOdirectDep =- ({-# LINE 267 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 2493 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 2499 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)- _lhsOinhMap' =- ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- Map.empty- {-# LINE 2505 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 310, column 31)- _lhsOinstDep =- ({-# LINE 310 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 2511 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 365, column 18)- _lhsOmergeDep =- ({-# LINE 365 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 2517 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- 0- {-# LINE 2523 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- 0- {-# LINE 2529 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 517, column 43)- _lhsOnonts =- ({-# LINE 517 "src-ag/Order.ag" #-}- []- {-# LINE 2535 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 499, column 35)- _lhsOntattrs =- ({-# LINE 499 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 2541 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 257, column 18)- _lhsOrules =- ({-# LINE 257 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 2547 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)- _lhsOsynMap' =- ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- Map.empty- {-# LINE 2553 "src-ag/Order.hs" #-}- )- -- copy rule (chain)- _lhsOacount =- ({-# LINE 499 "src-ag/Order.ag" #-}- _lhsIacount- {-# LINE 2559 "src-ag/Order.hs" #-}- )- -- copy rule (chain)- _lhsOvcount =- ({-# LINE 256 "src-ag/Order.ag" #-}- _lhsIvcount- {-# LINE 2565 "src-ag/Order.hs" #-}- )- in ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminals,_lhsOdirectDep,_lhsOerrors,_lhsOinhMap',_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOsynMap',_lhsOvcount))) )--- Pattern ------------------------------------------------------{-- visit 0:- inherited attributes:- allTypeSigs : Map Identifier Type- altAttrs : Map AltAttr Vertex- con : Identifier- inh : Attributes- nt : Identifier- syn : Attributes- synthesized attributes:- copy : SELF - errors : Seq Error- gathAltAttrs : [AltAttr]- instVars : [Identifier]- locVars : [Identifier]- patternAttrs : [(Identifier,Identifier,Bool)]- alternatives:- alternative Alias:- child field : {Identifier}- child attr : {Identifier}- child pat : Pattern - 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 ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) )-sem_Pattern (Constr _name _pats ) =- (sem_Pattern_Constr _name (sem_Patterns _pats ) )-sem_Pattern (Irrefutable _pat ) =- (sem_Pattern_Irrefutable (sem_Pattern _pat ) )-sem_Pattern (Product _pos _pats ) =- (sem_Pattern_Product _pos (sem_Patterns _pats ) )-sem_Pattern (Underscore _pos ) =- (sem_Pattern_Underscore _pos )--- semantic domain-newtype T_Pattern = T_Pattern ((Map Identifier Type) ->- (Map AltAttr Vertex) ->- Identifier ->- Attributes ->- Identifier ->- Attributes ->- ( Pattern ,(Seq Error),([AltAttr]),([Identifier]),([Identifier]),([(Identifier,Identifier,Bool)])))-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)]))}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern (T_Pattern sem ) (Inh_Pattern _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn ) =- (let ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs) = sem _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn - in (Syn_Pattern _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs ))-sem_Pattern_Alias :: Identifier ->- Identifier ->- T_Pattern ->- T_Pattern -sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) =- (T_Pattern (\ _lhsIallTypeSigs- _lhsIaltAttrs- _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOgathAltAttrs :: ([AltAttr])- _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool)])- _lhsOlocVars :: ([Identifier])- _lhsOinstVars :: ([Identifier])- _lhsOerrors :: (Seq Error)- _lhsOcopy :: Pattern - _patOallTypeSigs :: (Map Identifier Type)- _patOaltAttrs :: (Map AltAttr Vertex)- _patOcon :: Identifier- _patOinh :: Attributes- _patOnt :: Identifier- _patOsyn :: Attributes- _patIcopy :: Pattern - _patIerrors :: (Seq Error)- _patIgathAltAttrs :: ([AltAttr])- _patIinstVars :: ([Identifier])- _patIlocVars :: ([Identifier])- _patIpatternAttrs :: ([(Identifier,Identifier,Bool)])- -- "src-ag/Order.ag"(line 184, column 12)- _lhsOgathAltAttrs =- ({-# LINE 184 "src-ag/Order.ag" #-}- [AltAttr field_ attr_ (field_ == _LOC || field_ == _INST)]- {-# LINE 2673 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 250, column 12)- _lhsOpatternAttrs =- ({-# LINE 250 "src-ag/Order.ag" #-}- [(field_,attr_,(field_ == _LOC || field_ == _INST))]- {-# LINE 2679 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 680, column 14)- _lhsOlocVars =- ({-# LINE 680 "src-ag/Order.ag" #-}- if field_ == _LOC- then [attr_]- else []- {-# LINE 2687 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 683, column 14)- _lhsOinstVars =- ({-# LINE 683 "src-ag/Order.ag" #-}- if field_ == _INST- then [attr_]- else []- {-# LINE 2695 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- _patIerrors- {-# LINE 2701 "src-ag/Order.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Alias field_ attr_ _patIcopy- {-# LINE 2707 "src-ag/Order.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 2713 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patOallTypeSigs =- ({-# LINE 533 "src-ag/Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 2719 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patOaltAttrs =- ({-# LINE 186 "src-ag/Order.ag" #-}- _lhsIaltAttrs- {-# LINE 2725 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patOcon =- ({-# LINE 90 "src-ag/Order.ag" #-}- _lhsIcon- {-# LINE 2731 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patOinh =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIinh- {-# LINE 2737 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patOnt =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsInt- {-# LINE 2743 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patOsyn =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIsyn- {-# LINE 2749 "src-ag/Order.hs" #-}- )- ( _patIcopy,_patIerrors,_patIgathAltAttrs,_patIinstVars,_patIlocVars,_patIpatternAttrs) =- pat_ _patOallTypeSigs _patOaltAttrs _patOcon _patOinh _patOnt _patOsyn - in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )-sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr name_ (T_Patterns pats_ ) =- (T_Pattern (\ _lhsIallTypeSigs- _lhsIaltAttrs- _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool)])- _lhsOcopy :: Pattern - _patsOallTypeSigs :: (Map Identifier Type)- _patsOaltAttrs :: (Map AltAttr Vertex)- _patsOcon :: Identifier- _patsOinh :: Attributes- _patsOnt :: Identifier- _patsOsyn :: Attributes- _patsIcopy :: Patterns - _patsIerrors :: (Seq Error)- _patsIgathAltAttrs :: ([AltAttr])- _patsIinstVars :: ([Identifier])- _patsIlocVars :: ([Identifier])- _patsIpatternAttrs :: ([(Identifier,Identifier,Bool)])- -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- _patsIerrors- {-# LINE 2786 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "src-ag/Order.ag" #-}- _patsIgathAltAttrs- {-# LINE 2792 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- _patsIinstVars- {-# LINE 2798 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- _patsIlocVars- {-# LINE 2804 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 247, column 42)- _lhsOpatternAttrs =- ({-# LINE 247 "src-ag/Order.ag" #-}- _patsIpatternAttrs- {-# LINE 2810 "src-ag/Order.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 2816 "src-ag/Order.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 2822 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patsOallTypeSigs =- ({-# LINE 533 "src-ag/Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 2828 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patsOaltAttrs =- ({-# LINE 186 "src-ag/Order.ag" #-}- _lhsIaltAttrs- {-# LINE 2834 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patsOcon =- ({-# LINE 90 "src-ag/Order.ag" #-}- _lhsIcon- {-# LINE 2840 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patsOinh =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIinh- {-# LINE 2846 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patsOnt =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsInt- {-# LINE 2852 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patsOsyn =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIsyn- {-# LINE 2858 "src-ag/Order.hs" #-}- )- ( _patsIcopy,_patsIerrors,_patsIgathAltAttrs,_patsIinstVars,_patsIlocVars,_patsIpatternAttrs) =- pats_ _patsOallTypeSigs _patsOaltAttrs _patsOcon _patsOinh _patsOnt _patsOsyn - in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable (T_Pattern pat_ ) =- (T_Pattern (\ _lhsIallTypeSigs- _lhsIaltAttrs- _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool)])- _lhsOcopy :: Pattern - _patOallTypeSigs :: (Map Identifier Type)- _patOaltAttrs :: (Map AltAttr Vertex)- _patOcon :: Identifier- _patOinh :: Attributes- _patOnt :: Identifier- _patOsyn :: Attributes- _patIcopy :: Pattern - _patIerrors :: (Seq Error)- _patIgathAltAttrs :: ([AltAttr])- _patIinstVars :: ([Identifier])- _patIlocVars :: ([Identifier])- _patIpatternAttrs :: ([(Identifier,Identifier,Bool)])- -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- _patIerrors- {-# LINE 2894 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "src-ag/Order.ag" #-}- _patIgathAltAttrs- {-# LINE 2900 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- _patIinstVars- {-# LINE 2906 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- _patIlocVars- {-# LINE 2912 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 247, column 42)- _lhsOpatternAttrs =- ({-# LINE 247 "src-ag/Order.ag" #-}- _patIpatternAttrs- {-# LINE 2918 "src-ag/Order.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 2924 "src-ag/Order.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 2930 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patOallTypeSigs =- ({-# LINE 533 "src-ag/Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 2936 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patOaltAttrs =- ({-# LINE 186 "src-ag/Order.ag" #-}- _lhsIaltAttrs- {-# LINE 2942 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patOcon =- ({-# LINE 90 "src-ag/Order.ag" #-}- _lhsIcon- {-# LINE 2948 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patOinh =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIinh- {-# LINE 2954 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patOnt =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsInt- {-# LINE 2960 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patOsyn =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIsyn- {-# LINE 2966 "src-ag/Order.hs" #-}- )- ( _patIcopy,_patIerrors,_patIgathAltAttrs,_patIinstVars,_patIlocVars,_patIpatternAttrs) =- pat_ _patOallTypeSigs _patOaltAttrs _patOcon _patOinh _patOnt _patOsyn - in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )-sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product pos_ (T_Patterns pats_ ) =- (T_Pattern (\ _lhsIallTypeSigs- _lhsIaltAttrs- _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool)])- _lhsOcopy :: Pattern - _patsOallTypeSigs :: (Map Identifier Type)- _patsOaltAttrs :: (Map AltAttr Vertex)- _patsOcon :: Identifier- _patsOinh :: Attributes- _patsOnt :: Identifier- _patsOsyn :: Attributes- _patsIcopy :: Patterns - _patsIerrors :: (Seq Error)- _patsIgathAltAttrs :: ([AltAttr])- _patsIinstVars :: ([Identifier])- _patsIlocVars :: ([Identifier])- _patsIpatternAttrs :: ([(Identifier,Identifier,Bool)])- -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- _patsIerrors- {-# LINE 3003 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "src-ag/Order.ag" #-}- _patsIgathAltAttrs- {-# LINE 3009 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- _patsIinstVars- {-# LINE 3015 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- _patsIlocVars- {-# LINE 3021 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 247, column 42)- _lhsOpatternAttrs =- ({-# LINE 247 "src-ag/Order.ag" #-}- _patsIpatternAttrs- {-# LINE 3027 "src-ag/Order.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 3033 "src-ag/Order.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 3039 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patsOallTypeSigs =- ({-# LINE 533 "src-ag/Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 3045 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patsOaltAttrs =- ({-# LINE 186 "src-ag/Order.ag" #-}- _lhsIaltAttrs- {-# LINE 3051 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patsOcon =- ({-# LINE 90 "src-ag/Order.ag" #-}- _lhsIcon- {-# LINE 3057 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patsOinh =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIinh- {-# LINE 3063 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patsOnt =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsInt- {-# LINE 3069 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patsOsyn =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIsyn- {-# LINE 3075 "src-ag/Order.hs" #-}- )- ( _patsIcopy,_patsIerrors,_patsIgathAltAttrs,_patsIinstVars,_patsIlocVars,_patsIpatternAttrs) =- pats_ _patsOallTypeSigs _patsOaltAttrs _patsOcon _patsOinh _patsOnt _patsOsyn - in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )-sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore pos_ =- (T_Pattern (\ _lhsIallTypeSigs- _lhsIaltAttrs- _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool)])- _lhsOcopy :: Pattern - -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 3099 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "src-ag/Order.ag" #-}- []- {-# LINE 3105 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- []- {-# LINE 3111 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- []- {-# LINE 3117 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 247, column 42)- _lhsOpatternAttrs =- ({-# LINE 247 "src-ag/Order.ag" #-}- []- {-# LINE 3123 "src-ag/Order.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Underscore pos_- {-# LINE 3129 "src-ag/Order.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 3135 "src-ag/Order.hs" #-}- )- in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )--- Patterns -----------------------------------------------------{-- visit 0:- inherited attributes:- allTypeSigs : Map Identifier Type- altAttrs : Map AltAttr Vertex- con : Identifier- inh : Attributes- nt : Identifier- syn : Attributes- synthesized attributes:- copy : SELF - errors : Seq Error- gathAltAttrs : [AltAttr]- instVars : [Identifier]- locVars : [Identifier]- patternAttrs : [(Identifier,Identifier,Bool)]- alternatives:- alternative Cons:- child hd : Pattern - child tl : Patterns - visit 0:- local copy : _- alternative Nil:- visit 0:- local copy : _--}--- cata-sem_Patterns :: Patterns ->- T_Patterns -sem_Patterns list =- (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list) )--- semantic domain-newtype T_Patterns = T_Patterns ((Map Identifier Type) ->- (Map AltAttr Vertex) ->- Identifier ->- Attributes ->- Identifier ->- Attributes ->- ( Patterns ,(Seq Error),([AltAttr]),([Identifier]),([Identifier]),([(Identifier,Identifier,Bool)])))-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)]))}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns (T_Patterns sem ) (Inh_Patterns _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn ) =- (let ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs) = sem _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn - in (Syn_Patterns _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) =- (T_Patterns (\ _lhsIallTypeSigs- _lhsIaltAttrs- _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool)])- _lhsOcopy :: Patterns - _hdOallTypeSigs :: (Map Identifier Type)- _hdOaltAttrs :: (Map AltAttr Vertex)- _hdOcon :: Identifier- _hdOinh :: Attributes- _hdOnt :: Identifier- _hdOsyn :: Attributes- _tlOallTypeSigs :: (Map Identifier Type)- _tlOaltAttrs :: (Map AltAttr Vertex)- _tlOcon :: Identifier- _tlOinh :: Attributes- _tlOnt :: Identifier- _tlOsyn :: Attributes- _hdIcopy :: Pattern - _hdIerrors :: (Seq Error)- _hdIgathAltAttrs :: ([AltAttr])- _hdIinstVars :: ([Identifier])- _hdIlocVars :: ([Identifier])- _hdIpatternAttrs :: ([(Identifier,Identifier,Bool)])- _tlIcopy :: Patterns - _tlIerrors :: (Seq Error)- _tlIgathAltAttrs :: ([AltAttr])- _tlIinstVars :: ([Identifier])- _tlIlocVars :: ([Identifier])- _tlIpatternAttrs :: ([(Identifier,Identifier,Bool)])- -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 3230 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "src-ag/Order.ag" #-}- _hdIgathAltAttrs ++ _tlIgathAltAttrs- {-# LINE 3236 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- _hdIinstVars ++ _tlIinstVars- {-# LINE 3242 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- _hdIlocVars ++ _tlIlocVars- {-# LINE 3248 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 247, column 42)- _lhsOpatternAttrs =- ({-# LINE 247 "src-ag/Order.ag" #-}- _hdIpatternAttrs ++ _tlIpatternAttrs- {-# LINE 3254 "src-ag/Order.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 3260 "src-ag/Order.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 3266 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOallTypeSigs =- ({-# LINE 533 "src-ag/Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 3272 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOaltAttrs =- ({-# LINE 186 "src-ag/Order.ag" #-}- _lhsIaltAttrs- {-# LINE 3278 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOcon =- ({-# LINE 90 "src-ag/Order.ag" #-}- _lhsIcon- {-# LINE 3284 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOinh =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIinh- {-# LINE 3290 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOnt =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsInt- {-# LINE 3296 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOsyn =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIsyn- {-# LINE 3302 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOallTypeSigs =- ({-# LINE 533 "src-ag/Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 3308 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOaltAttrs =- ({-# LINE 186 "src-ag/Order.ag" #-}- _lhsIaltAttrs- {-# LINE 3314 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOcon =- ({-# LINE 90 "src-ag/Order.ag" #-}- _lhsIcon- {-# LINE 3320 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOinh =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIinh- {-# LINE 3326 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOnt =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsInt- {-# LINE 3332 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOsyn =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIsyn- {-# LINE 3338 "src-ag/Order.hs" #-}- )- ( _hdIcopy,_hdIerrors,_hdIgathAltAttrs,_hdIinstVars,_hdIlocVars,_hdIpatternAttrs) =- hd_ _hdOallTypeSigs _hdOaltAttrs _hdOcon _hdOinh _hdOnt _hdOsyn - ( _tlIcopy,_tlIerrors,_tlIgathAltAttrs,_tlIinstVars,_tlIlocVars,_tlIpatternAttrs) =- tl_ _tlOallTypeSigs _tlOaltAttrs _tlOcon _tlOinh _tlOnt _tlOsyn - in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =- (T_Patterns (\ _lhsIallTypeSigs- _lhsIaltAttrs- _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool)])- _lhsOcopy :: Patterns - -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 3363 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "src-ag/Order.ag" #-}- []- {-# LINE 3369 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- []- {-# LINE 3375 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- []- {-# LINE 3381 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 247, column 42)- _lhsOpatternAttrs =- ({-# LINE 247 "src-ag/Order.ag" #-}- []- {-# LINE 3387 "src-ag/Order.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- []- {-# LINE 3393 "src-ag/Order.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 3399 "src-ag/Order.hs" #-}- )- in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )--- Production ---------------------------------------------------{-- visit 0:- inherited attributes:- allnts : [Identifier]- aroundMap : Map ConstructorIdent (Map Identifier [Expression])- cVisitsMap : CVisitsMap- inh : Attributes- inhMap : Map Identifier Attributes- manualAttrDepMap : AttrOrderMap- mergeMap : Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))- nt : Identifier- o_case : Bool- o_cata : Bool- o_dovisit : Bool- o_newtypes : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_unbox : Bool- o_wantvisit : Bool- prefix : String- syn : Attributes- synMap : Map Identifier Attributes- chained attribute:- vcount : Int- synthesized attributes:- additionalDep : Seq Edge- aroundDep : Seq Edge- cProduction : CProduction- cons : [ConstructorIdent]- directDep : Seq Edge- errors : Seq Error- instDep : Seq Edge- mergeDep : Seq Edge- nAutoRules : Int- nExplicitRules : Int- rules : Seq (Vertex,CRule)- alternatives:- alternative Production:- child con : {ConstructorIdent}- child params : {[Identifier]}- child constraints : {[Type]}- child children : Children - child rules : Rules - child typeSigs : TypeSigs - child macro : {MaybeMacro}- visit 0:- local gathAltAttrs : _- local altAttrs : _- local inhRules : _- local gathRules : _- local manualDeps : _- local mergeMap : _- local mergeDep1 : _- local mergeDep2 : _- local aroundMap : _- local aroundDep1 : _- local aroundDep2 : _- local cVisits : _- local allfields : _- local attrs : _- local inhnames : _- local synnames : _--}--- cata-sem_Production :: Production ->- T_Production -sem_Production (Production _con _params _constraints _children _rules _typeSigs _macro ) =- (sem_Production_Production _con _params _constraints (sem_Children _children ) (sem_Rules _rules ) (sem_TypeSigs _typeSigs ) _macro )--- semantic domain-newtype T_Production = T_Production (([Identifier]) ->- (Map ConstructorIdent (Map Identifier [Expression])) ->- CVisitsMap ->- Attributes ->- (Map Identifier Attributes) ->- AttrOrderMap ->- (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->- Identifier ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- String ->- Attributes ->- (Map Identifier Attributes) ->- Int ->- ( (Seq Edge),(Seq Edge),CProduction,([ConstructorIdent]),(Seq Edge),(Seq Error),(Seq Edge),(Seq Edge),Int,Int,(Seq (Vertex,CRule)),Int))-data Inh_Production = Inh_Production {allnts_Inh_Production :: !(([Identifier])),aroundMap_Inh_Production :: !((Map ConstructorIdent (Map Identifier [Expression]))),cVisitsMap_Inh_Production :: !(CVisitsMap),inh_Inh_Production :: !(Attributes),inhMap_Inh_Production :: !((Map Identifier Attributes)),manualAttrDepMap_Inh_Production :: !(AttrOrderMap),mergeMap_Inh_Production :: !((Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))),nt_Inh_Production :: !(Identifier),o_case_Inh_Production :: !(Bool),o_cata_Inh_Production :: !(Bool),o_dovisit_Inh_Production :: !(Bool),o_newtypes_Inh_Production :: !(Bool),o_rename_Inh_Production :: !(Bool),o_sem_Inh_Production :: !(Bool),o_sig_Inh_Production :: !(Bool),o_unbox_Inh_Production :: !(Bool),o_wantvisit_Inh_Production :: !(Bool),prefix_Inh_Production :: !(String),syn_Inh_Production :: !(Attributes),synMap_Inh_Production :: !((Map Identifier Attributes)),vcount_Inh_Production :: !(Int)}-data Syn_Production = Syn_Production {additionalDep_Syn_Production :: !((Seq Edge)),aroundDep_Syn_Production :: !((Seq Edge)),cProduction_Syn_Production :: !(CProduction),cons_Syn_Production :: !(([ConstructorIdent])),directDep_Syn_Production :: !((Seq Edge)),errors_Syn_Production :: !((Seq Error)),instDep_Syn_Production :: !((Seq Edge)),mergeDep_Syn_Production :: !((Seq Edge)),nAutoRules_Syn_Production :: !(Int),nExplicitRules_Syn_Production :: !(Int),rules_Syn_Production :: !((Seq (Vertex,CRule))),vcount_Syn_Production :: !(Int)}-wrap_Production :: T_Production ->- Inh_Production ->- Syn_Production -wrap_Production (T_Production sem ) (Inh_Production _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount ) =- (let ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProduction,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount) = sem _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount - in (Syn_Production _lhsOadditionalDep _lhsOaroundDep _lhsOcProduction _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount ))-sem_Production_Production :: ConstructorIdent ->- ([Identifier]) ->- ([Type]) ->- T_Children ->- T_Rules ->- T_TypeSigs ->- MaybeMacro ->- T_Production -sem_Production_Production con_ params_ constraints_ (T_Children children_ ) (T_Rules rules_ ) (T_TypeSigs typeSigs_ ) macro_ =- (T_Production (\ _lhsIallnts- _lhsIaroundMap- _lhsIcVisitsMap- _lhsIinh- _lhsIinhMap- _lhsImanualAttrDepMap- _lhsImergeMap- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_dovisit- _lhsIo_newtypes- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_unbox- _lhsIo_wantvisit- _lhsIprefix- _lhsIsyn- _lhsIsynMap- _lhsIvcount ->- (let _childrenOcon :: Identifier- _rulesOcon :: Identifier- _rulesOchildNts :: (Map Identifier NontermIdent)- _rulesOchildInhs :: (Map Identifier Attributes)- _lhsOrules :: (Seq (Vertex,CRule))- _lhsOvcount :: Int- _lhsOadditionalDep :: (Seq Edge)- _rulesOsynsOfChildren :: (Map Identifier Attributes)- _rulesOinhsOfChildren :: (Map Identifier Attributes)- _lhsOmergeDep :: (Seq Edge)- _lhsOaroundDep :: (Seq Edge)- _lhsOcons :: ([ConstructorIdent])- _typeSigsOtypeSigs :: (Map Identifier Type)- _rulesOallTypeSigs :: (Map Identifier Type)- _lhsOcProduction :: CProduction- _lhsOdirectDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOinstDep :: (Seq Edge)- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- _childrenOallfields :: ([(Identifier,Type,ChildKind)])- _childrenOallnts :: ([Identifier])- _childrenOattrs :: ([(Identifier,Identifier)])- _childrenOinh :: Attributes- _childrenOinhMap :: (Map Identifier Attributes)- _childrenOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _childrenOnt :: Identifier- _childrenOo_unbox :: Bool- _childrenOsyn :: Attributes- _childrenOsynMap :: (Map Identifier Attributes)- _rulesOallfields :: ([(Identifier,Type,ChildKind)])- _rulesOallnts :: ([Identifier])- _rulesOaltAttrs :: (Map AltAttr Vertex)- _rulesOattrs :: ([(Identifier,Identifier)])- _rulesOinh :: Attributes- _rulesOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _rulesOnt :: Identifier- _rulesOo_case :: Bool- _rulesOo_cata :: Bool- _rulesOo_dovisit :: Bool- _rulesOo_newtypes :: Bool- _rulesOo_rename :: Bool- _rulesOo_sem :: Bool- _rulesOo_sig :: Bool- _rulesOo_wantvisit :: Bool- _rulesOprefix :: String- _rulesOsyn :: Attributes- _childrenIattributes :: ([(Identifier,Attributes,Attributes)])- _childrenIcollectChildrenInhs :: (Map Identifier Attributes )- _childrenIcollectChildrenSyns :: (Map Identifier Attributes )- _childrenIerrors :: (Seq Error)- _childrenIfields :: ([(Identifier,Type,ChildKind)])- _childrenIgathAltAttrs :: ([AltAttr])- _childrenIgathRules :: (Seq CRule)- _childrenIinhs :: (Seq (Identifier,Attributes))- _childrenInts :: (Seq (Identifier,NontermIdent))- _childrenIsinglevisits :: ([CRule])- _childrenIterminals :: ([Identifier])- _rulesIdirectDep :: (Seq Edge)- _rulesIerrors :: (Seq Error)- _rulesIgathAltAttrs :: ([AltAttr])- _rulesIgathRules :: (Seq CRule)- _rulesIinstDep :: (Seq Edge)- _rulesIinstVars :: ([Identifier])- _rulesIlocVars :: ([Identifier])- _rulesInAutoRules :: Int- _rulesInExplicitRules :: Int- _typeSigsItypeSigs :: (Map Identifier Type)- -- "src-ag/Order.ag"(line 93, column 16)- _childrenOcon =- ({-# LINE 93 "src-ag/Order.ag" #-}- con_- {-# LINE 3605 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 95, column 16)- _rulesOcon =- ({-# LINE 95 "src-ag/Order.ag" #-}- con_- {-# LINE 3611 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 172, column 18)- _gathAltAttrs =- ({-# LINE 172 "src-ag/Order.ag" #-}- [ AltAttr _LHS inh True | inh <- Map.keys _lhsIinh ]- ++ _childrenIgathAltAttrs- ++ _rulesIgathAltAttrs- {-# LINE 3619 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 188, column 17)- _altAttrs =- ({-# LINE 188 "src-ag/Order.ag" #-}- Map.fromList (zip _gathAltAttrs [_lhsIvcount..])- {-# LINE 3625 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 201, column 18)- _rulesOchildNts =- ({-# LINE 201 "src-ag/Order.ag" #-}- Map.fromList (toList _childrenInts)- {-# LINE 3631 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 202, column 19)- _rulesOchildInhs =- ({-# LINE 202 "src-ag/Order.ag" #-}- Map.fromList (toList _childrenIinhs)- {-# LINE 3637 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 208, column 18)- _inhRules =- ({-# LINE 208 "src-ag/Order.ag" #-}- [ cRuleLhsInh inh _lhsInt con_ tp | (inh,tp) <- Map.assocs _lhsIinh ]- {-# LINE 3643 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 209, column 19)- _gathRules =- ({-# LINE 209 "src-ag/Order.ag" #-}- _inhRules ++ toList (_childrenIgathRules Seq.>< _rulesIgathRules)- {-# LINE 3649 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 261, column 18)- _lhsOrules =- ({-# LINE 261 "src-ag/Order.ag" #-}- Seq.fromList (zip [_lhsIvcount..] _gathRules)- {-# LINE 3655 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 262, column 19)- _lhsOvcount =- ({-# LINE 262 "src-ag/Order.ag" #-}- _lhsIvcount + length _gathRules- {-# LINE 3661 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 289, column 7)- _manualDeps =- ({-# LINE 289 "src-ag/Order.ag" #-}- Set.toList $ Map.findWithDefault Set.empty con_ $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrDepMap- {-# LINE 3667 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 292, column 7)- _lhsOadditionalDep =- ({-# LINE 292 "src-ag/Order.ag" #-}- Seq.fromList [ (vertex True occA, vertex False occB)- | Dependency occA occB <- _manualDeps- , let vertex inout (OccAttr child nm)- | child == _LOC = findWithErr2 (AltAttr _LOC nm True) _altAttrs- | otherwise = findWithErr2 (AltAttr child nm inout) _altAttrs- vertex _ (OccRule nm)- = findWithErr2 (AltAttr _LOC (Ident ("_rule_" ++ show nm) (getPos nm)) True) _altAttrs- ]- {-# LINE 3680 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 339, column 17)- _rulesOsynsOfChildren =- ({-# LINE 339 "src-ag/Order.ag" #-}- _childrenIcollectChildrenSyns- {-# LINE 3686 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 340, column 17)- _rulesOinhsOfChildren =- ({-# LINE 340 "src-ag/Order.ag" #-}- _childrenIcollectChildrenInhs- {-# LINE 3692 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 358, column 32)- _mergeMap =- ({-# LINE 358 "src-ag/Order.ag" #-}- Map.findWithDefault Map.empty con_ _lhsImergeMap- {-# LINE 3698 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 369, column 7)- _lhsOmergeDep =- ({-# LINE 369 "src-ag/Order.ag" #-}- _mergeDep1 Seq.>< _mergeDep2- {-# LINE 3704 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 370, column 7)- _mergeDep1 =- ({-# LINE 370 "src-ag/Order.ag" #-}- Seq.fromList $- [ (childVert, synVert)- | childNm <- Map.keys _mergeMap- , synNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenSyns)- , let childNm' = Ident (show childNm ++ "_merge") (getPos childNm)- childAttr = AltAttr _LOC childNm' True- synAttr = AltAttr childNm synNm True- childVert = findWithErr2 childAttr _altAttrs- synVert = findWithErr2 synAttr _altAttrs- ]- {-# LINE 3719 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 381, column 7)- _mergeDep2 =- ({-# LINE 381 "src-ag/Order.ag" #-}- Seq.fromList $- [ (mergedVert, sourceVert)- | (childNm, (_,cs)) <- Map.assocs _mergeMap- , c <- cs- , synNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenSyns)- , let sourceAttr = AltAttr childNm synNm True- mergedAttr = AltAttr c synNm True- sourceVert = findWithErr2 sourceAttr _altAttrs- mergedVert = findWithErr2 mergedAttr _altAttrs- ]- {-# LINE 3734 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 411, column 32)- _aroundMap =- ({-# LINE 411 "src-ag/Order.ag" #-}- Map.findWithDefault Map.empty con_ _lhsIaroundMap- {-# LINE 3740 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 418, column 6)- _aroundDep1 =- ({-# LINE 418 "src-ag/Order.ag" #-}- Seq.fromList $- [ (childVert, synVert)- | childNm <- Map.keys _aroundMap- , synNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenSyns)- , let childNm' = Ident (show childNm ++ "_around") (getPos childNm)- childAttr = AltAttr _LOC childNm' True- synAttr = AltAttr childNm synNm True- childVert = findWithErr2 childAttr _altAttrs- synVert = findWithErr2 synAttr _altAttrs- ]- {-# LINE 3755 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 429, column 6)- _aroundDep2 =- ({-# LINE 429 "src-ag/Order.ag" #-}- Seq.fromList $- [ (childVert, inhVert)- | childNm <- Map.keys _aroundMap- , inhNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenInhs)- , let childNm' = Ident (show childNm ++ "_around") (getPos childNm)- childAttr = AltAttr _LOC childNm' True- inhAttr = AltAttr childNm inhNm False- childVert = findWithErr2 childAttr _altAttrs- inhVert = findWithErr2 inhAttr _altAttrs- ]- {-# LINE 3770 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 440, column 6)- _lhsOaroundDep =- ({-# LINE 440 "src-ag/Order.ag" #-}- _aroundDep1 Seq.>< _aroundDep2- {-# LINE 3776 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 522, column 18)- _lhsOcons =- ({-# LINE 522 "src-ag/Order.ag" #-}- [con_]- {-# LINE 3782 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 529, column 16)- _typeSigsOtypeSigs =- ({-# LINE 529 "src-ag/Order.ag" #-}- Map.empty- {-# LINE 3788 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 535, column 17)- _rulesOallTypeSigs =- ({-# LINE 535 "src-ag/Order.ag" #-}- _typeSigsItypeSigs- {-# LINE 3794 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 603, column 17)- _cVisits =- ({-# LINE 603 "src-ag/Order.ag" #-}- if _lhsIo_dovisit- then let prodsVisitsMap = findWithErr1 "Production.cVisits.nt" _lhsInt _lhsIcVisitsMap- visits = findWithErr1 "Production.cVisits.con" con_ prodsVisitsMap- in visits- else let vss = nubBy eqCRuleDefines _gathRules ++ _childrenIsinglevisits- in [CVisit _lhsIinh _lhsIsyn vss [] False]- {-# LINE 3805 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 629, column 18)- _lhsOcProduction =- ({-# LINE 629 "src-ag/Order.ag" #-}- CProduction con_ _cVisits _childrenIfields _childrenIterminals- {-# LINE 3811 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 657, column 16)- _allfields =- ({-# LINE 657 "src-ag/Order.ag" #-}- _childrenIfields- {-# LINE 3817 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 657, column 16)- _attrs =- ({-# LINE 658 "src-ag/Order.ag" #-}- map ((,) _LOC) _rulesIlocVars ++- map ((,) _INST) _rulesIinstVars ++- map ((,) _LHS) _inhnames ++- concat [map ((,) nm) (Map.keys as) | (nm,_,as) <- _childrenIattributes]- {-# LINE 3826 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 657, column 16)- _inhnames =- ({-# LINE 662 "src-ag/Order.ag" #-}- Map.keys _lhsIinh- {-# LINE 3832 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 657, column 16)- _synnames =- ({-# LINE 663 "src-ag/Order.ag" #-}- Map.keys _lhsIsyn- {-# LINE 3838 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 267, column 33)- _lhsOdirectDep =- ({-# LINE 267 "src-ag/Order.ag" #-}- _rulesIdirectDep- {-# LINE 3844 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- _childrenIerrors Seq.>< _rulesIerrors- {-# LINE 3850 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 310, column 31)- _lhsOinstDep =- ({-# LINE 310 "src-ag/Order.ag" #-}- _rulesIinstDep- {-# LINE 3856 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- _rulesInAutoRules- {-# LINE 3862 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- _rulesInExplicitRules- {-# LINE 3868 "src-ag/Order.hs" #-}- )- -- copy rule (from local)- _childrenOallfields =- ({-# LINE 654 "src-ag/Order.ag" #-}- _allfields- {-# LINE 3874 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _childrenOallnts =- ({-# LINE 647 "src-ag/Order.ag" #-}- _lhsIallnts- {-# LINE 3880 "src-ag/Order.hs" #-}- )- -- copy rule (from local)- _childrenOattrs =- ({-# LINE 654 "src-ag/Order.ag" #-}- _attrs- {-# LINE 3886 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _childrenOinh =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIinh- {-# LINE 3892 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _childrenOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 3898 "src-ag/Order.hs" #-}- )- -- copy rule (from local)- _childrenOmergeMap =- ({-# LINE 360 "src-ag/Order.ag" #-}- _mergeMap- {-# LINE 3904 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _childrenOnt =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsInt- {-# LINE 3910 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _childrenOo_unbox =- ({-# LINE 119 "src-ag/Order.ag" #-}- _lhsIo_unbox- {-# LINE 3916 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _childrenOsyn =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIsyn- {-# LINE 3922 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _childrenOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 3928 "src-ag/Order.hs" #-}- )- -- copy rule (from local)- _rulesOallfields =- ({-# LINE 654 "src-ag/Order.ag" #-}- _allfields- {-# LINE 3934 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rulesOallnts =- ({-# LINE 647 "src-ag/Order.ag" #-}- _lhsIallnts- {-# LINE 3940 "src-ag/Order.hs" #-}- )- -- copy rule (from local)- _rulesOaltAttrs =- ({-# LINE 186 "src-ag/Order.ag" #-}- _altAttrs- {-# LINE 3946 "src-ag/Order.hs" #-}- )- -- copy rule (from local)- _rulesOattrs =- ({-# LINE 654 "src-ag/Order.ag" #-}- _attrs- {-# LINE 3952 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rulesOinh =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIinh- {-# LINE 3958 "src-ag/Order.hs" #-}- )- -- copy rule (from local)- _rulesOmergeMap =- ({-# LINE 360 "src-ag/Order.ag" #-}- _mergeMap- {-# LINE 3964 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rulesOnt =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsInt- {-# LINE 3970 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rulesOo_case =- ({-# LINE 117 "src-ag/Order.ag" #-}- _lhsIo_case- {-# LINE 3976 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rulesOo_cata =- ({-# LINE 111 "src-ag/Order.ag" #-}- _lhsIo_cata- {-# LINE 3982 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rulesOo_dovisit =- ({-# LINE 116 "src-ag/Order.ag" #-}- _lhsIo_dovisit- {-# LINE 3988 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rulesOo_newtypes =- ({-# LINE 110 "src-ag/Order.ag" #-}- _lhsIo_newtypes- {-# LINE 3994 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rulesOo_rename =- ({-# LINE 114 "src-ag/Order.ag" #-}- _lhsIo_rename- {-# LINE 4000 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rulesOo_sem =- ({-# LINE 113 "src-ag/Order.ag" #-}- _lhsIo_sem- {-# LINE 4006 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rulesOo_sig =- ({-# LINE 112 "src-ag/Order.ag" #-}- _lhsIo_sig- {-# LINE 4012 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rulesOo_wantvisit =- ({-# LINE 115 "src-ag/Order.ag" #-}- _lhsIo_wantvisit- {-# LINE 4018 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rulesOprefix =- ({-# LINE 118 "src-ag/Order.ag" #-}- _lhsIprefix- {-# LINE 4024 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rulesOsyn =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIsyn- {-# LINE 4030 "src-ag/Order.hs" #-}- )- ( _childrenIattributes,_childrenIcollectChildrenInhs,_childrenIcollectChildrenSyns,_childrenIerrors,_childrenIfields,_childrenIgathAltAttrs,_childrenIgathRules,_childrenIinhs,_childrenInts,_childrenIsinglevisits,_childrenIterminals) =- children_ _childrenOallfields _childrenOallnts _childrenOattrs _childrenOcon _childrenOinh _childrenOinhMap _childrenOmergeMap _childrenOnt _childrenOo_unbox _childrenOsyn _childrenOsynMap - ( _rulesIdirectDep,_rulesIerrors,_rulesIgathAltAttrs,_rulesIgathRules,_rulesIinstDep,_rulesIinstVars,_rulesIlocVars,_rulesInAutoRules,_rulesInExplicitRules) =- rules_ _rulesOallTypeSigs _rulesOallfields _rulesOallnts _rulesOaltAttrs _rulesOattrs _rulesOchildInhs _rulesOchildNts _rulesOcon _rulesOinh _rulesOinhsOfChildren _rulesOmergeMap _rulesOnt _rulesOo_case _rulesOo_cata _rulesOo_dovisit _rulesOo_newtypes _rulesOo_rename _rulesOo_sem _rulesOo_sig _rulesOo_wantvisit _rulesOprefix _rulesOsyn _rulesOsynsOfChildren - ( _typeSigsItypeSigs) =- typeSigs_ _typeSigsOtypeSigs - in ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProduction,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount))) )--- Productions --------------------------------------------------{-- visit 0:- inherited attributes:- allnts : [Identifier]- aroundMap : Map ConstructorIdent (Map Identifier [Expression])- cVisitsMap : CVisitsMap- inh : Attributes- inhMap : Map Identifier Attributes- manualAttrDepMap : AttrOrderMap- mergeMap : Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))- nt : Identifier- o_case : Bool- o_cata : Bool- o_dovisit : Bool- o_newtypes : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_unbox : Bool- o_wantvisit : Bool- prefix : String- syn : Attributes- synMap : Map Identifier Attributes- chained attribute:- vcount : Int- synthesized attributes:- additionalDep : Seq Edge- aroundDep : Seq Edge- cProductions : CProductions- cons : [ConstructorIdent]- directDep : Seq Edge- errors : Seq Error- instDep : Seq Edge- mergeDep : Seq Edge- nAutoRules : Int- nExplicitRules : Int- rules : Seq (Vertex,CRule)- alternatives:- alternative Cons:- child hd : Production - child tl : Productions - alternative Nil:--}--- cata-sem_Productions :: Productions ->- T_Productions -sem_Productions list =- (Prelude.foldr sem_Productions_Cons sem_Productions_Nil (Prelude.map sem_Production list) )--- semantic domain-newtype T_Productions = T_Productions (([Identifier]) ->- (Map ConstructorIdent (Map Identifier [Expression])) ->- CVisitsMap ->- Attributes ->- (Map Identifier Attributes) ->- AttrOrderMap ->- (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->- Identifier ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- String ->- Attributes ->- (Map Identifier Attributes) ->- Int ->- ( (Seq Edge),(Seq Edge),CProductions,([ConstructorIdent]),(Seq Edge),(Seq Error),(Seq Edge),(Seq Edge),Int,Int,(Seq (Vertex,CRule)),Int))-data Inh_Productions = Inh_Productions {allnts_Inh_Productions :: !(([Identifier])),aroundMap_Inh_Productions :: !((Map ConstructorIdent (Map Identifier [Expression]))),cVisitsMap_Inh_Productions :: !(CVisitsMap),inh_Inh_Productions :: !(Attributes),inhMap_Inh_Productions :: !((Map Identifier Attributes)),manualAttrDepMap_Inh_Productions :: !(AttrOrderMap),mergeMap_Inh_Productions :: !((Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))),nt_Inh_Productions :: !(Identifier),o_case_Inh_Productions :: !(Bool),o_cata_Inh_Productions :: !(Bool),o_dovisit_Inh_Productions :: !(Bool),o_newtypes_Inh_Productions :: !(Bool),o_rename_Inh_Productions :: !(Bool),o_sem_Inh_Productions :: !(Bool),o_sig_Inh_Productions :: !(Bool),o_unbox_Inh_Productions :: !(Bool),o_wantvisit_Inh_Productions :: !(Bool),prefix_Inh_Productions :: !(String),syn_Inh_Productions :: !(Attributes),synMap_Inh_Productions :: !((Map Identifier Attributes)),vcount_Inh_Productions :: !(Int)}-data Syn_Productions = Syn_Productions {additionalDep_Syn_Productions :: !((Seq Edge)),aroundDep_Syn_Productions :: !((Seq Edge)),cProductions_Syn_Productions :: !(CProductions),cons_Syn_Productions :: !(([ConstructorIdent])),directDep_Syn_Productions :: !((Seq Edge)),errors_Syn_Productions :: !((Seq Error)),instDep_Syn_Productions :: !((Seq Edge)),mergeDep_Syn_Productions :: !((Seq Edge)),nAutoRules_Syn_Productions :: !(Int),nExplicitRules_Syn_Productions :: !(Int),rules_Syn_Productions :: !((Seq (Vertex,CRule))),vcount_Syn_Productions :: !(Int)}-wrap_Productions :: T_Productions ->- Inh_Productions ->- Syn_Productions -wrap_Productions (T_Productions sem ) (Inh_Productions _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount ) =- (let ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProductions,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount) = sem _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount - in (Syn_Productions _lhsOadditionalDep _lhsOaroundDep _lhsOcProductions _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount ))-sem_Productions_Cons :: T_Production ->- T_Productions ->- T_Productions -sem_Productions_Cons (T_Production hd_ ) (T_Productions tl_ ) =- (T_Productions (\ _lhsIallnts- _lhsIaroundMap- _lhsIcVisitsMap- _lhsIinh- _lhsIinhMap- _lhsImanualAttrDepMap- _lhsImergeMap- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_dovisit- _lhsIo_newtypes- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_unbox- _lhsIo_wantvisit- _lhsIprefix- _lhsIsyn- _lhsIsynMap- _lhsIvcount ->- (let _lhsOcProductions :: CProductions- _lhsOadditionalDep :: (Seq Edge)- _lhsOaroundDep :: (Seq Edge)- _lhsOcons :: ([ConstructorIdent])- _lhsOdirectDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOinstDep :: (Seq Edge)- _lhsOmergeDep :: (Seq Edge)- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- _lhsOrules :: (Seq (Vertex,CRule))- _lhsOvcount :: Int- _hdOallnts :: ([Identifier])- _hdOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))- _hdOcVisitsMap :: CVisitsMap- _hdOinh :: Attributes- _hdOinhMap :: (Map Identifier Attributes)- _hdOmanualAttrDepMap :: AttrOrderMap- _hdOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))- _hdOnt :: Identifier- _hdOo_case :: Bool- _hdOo_cata :: Bool- _hdOo_dovisit :: Bool- _hdOo_newtypes :: Bool- _hdOo_rename :: Bool- _hdOo_sem :: Bool- _hdOo_sig :: Bool- _hdOo_unbox :: Bool- _hdOo_wantvisit :: Bool- _hdOprefix :: String- _hdOsyn :: Attributes- _hdOsynMap :: (Map Identifier Attributes)- _hdOvcount :: Int- _tlOallnts :: ([Identifier])- _tlOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))- _tlOcVisitsMap :: CVisitsMap- _tlOinh :: Attributes- _tlOinhMap :: (Map Identifier Attributes)- _tlOmanualAttrDepMap :: AttrOrderMap- _tlOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))- _tlOnt :: Identifier- _tlOo_case :: Bool- _tlOo_cata :: Bool- _tlOo_dovisit :: Bool- _tlOo_newtypes :: Bool- _tlOo_rename :: Bool- _tlOo_sem :: Bool- _tlOo_sig :: Bool- _tlOo_unbox :: Bool- _tlOo_wantvisit :: Bool- _tlOprefix :: String- _tlOsyn :: Attributes- _tlOsynMap :: (Map Identifier Attributes)- _tlOvcount :: Int- _hdIadditionalDep :: (Seq Edge)- _hdIaroundDep :: (Seq Edge)- _hdIcProduction :: CProduction- _hdIcons :: ([ConstructorIdent])- _hdIdirectDep :: (Seq Edge)- _hdIerrors :: (Seq Error)- _hdIinstDep :: (Seq Edge)- _hdImergeDep :: (Seq Edge)- _hdInAutoRules :: Int- _hdInExplicitRules :: Int- _hdIrules :: (Seq (Vertex,CRule))- _hdIvcount :: Int- _tlIadditionalDep :: (Seq Edge)- _tlIaroundDep :: (Seq Edge)- _tlIcProductions :: CProductions- _tlIcons :: ([ConstructorIdent])- _tlIdirectDep :: (Seq Edge)- _tlIerrors :: (Seq Error)- _tlIinstDep :: (Seq Edge)- _tlImergeDep :: (Seq Edge)- _tlInAutoRules :: Int- _tlInExplicitRules :: Int- _tlIrules :: (Seq (Vertex,CRule))- _tlIvcount :: Int- -- "src-ag/Order.ag"(line 626, column 12)- _lhsOcProductions =- ({-# LINE 626 "src-ag/Order.ag" #-}- _hdIcProduction : _tlIcProductions- {-# LINE 4226 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 281, column 60)- _lhsOadditionalDep =- ({-# LINE 281 "src-ag/Order.ag" #-}- _hdIadditionalDep Seq.>< _tlIadditionalDep- {-# LINE 4232 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 402, column 24)- _lhsOaroundDep =- ({-# LINE 402 "src-ag/Order.ag" #-}- _hdIaroundDep Seq.>< _tlIaroundDep- {-# LINE 4238 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 520, column 40)- _lhsOcons =- ({-# LINE 520 "src-ag/Order.ag" #-}- _hdIcons ++ _tlIcons- {-# LINE 4244 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 267, column 33)- _lhsOdirectDep =- ({-# LINE 267 "src-ag/Order.ag" #-}- _hdIdirectDep Seq.>< _tlIdirectDep- {-# LINE 4250 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 4256 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 310, column 31)- _lhsOinstDep =- ({-# LINE 310 "src-ag/Order.ag" #-}- _hdIinstDep Seq.>< _tlIinstDep- {-# LINE 4262 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 365, column 18)- _lhsOmergeDep =- ({-# LINE 365 "src-ag/Order.ag" #-}- _hdImergeDep Seq.>< _tlImergeDep- {-# LINE 4268 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- _hdInAutoRules + _tlInAutoRules- {-# LINE 4274 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- _hdInExplicitRules + _tlInExplicitRules- {-# LINE 4280 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 257, column 18)- _lhsOrules =- ({-# LINE 257 "src-ag/Order.ag" #-}- _hdIrules Seq.>< _tlIrules- {-# LINE 4286 "src-ag/Order.hs" #-}- )- -- copy rule (up)- _lhsOvcount =- ({-# LINE 256 "src-ag/Order.ag" #-}- _tlIvcount- {-# LINE 4292 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOallnts =- ({-# LINE 647 "src-ag/Order.ag" #-}- _lhsIallnts- {-# LINE 4298 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOaroundMap =- ({-# LINE 408 "src-ag/Order.ag" #-}- _lhsIaroundMap- {-# LINE 4304 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOcVisitsMap =- ({-# LINE 601 "src-ag/Order.ag" #-}- _lhsIcVisitsMap- {-# LINE 4310 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOinh =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIinh- {-# LINE 4316 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 4322 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOmanualAttrDepMap =- ({-# LINE 281 "src-ag/Order.ag" #-}- _lhsImanualAttrDepMap- {-# LINE 4328 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 355 "src-ag/Order.ag" #-}- _lhsImergeMap- {-# LINE 4334 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOnt =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsInt- {-# LINE 4340 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_case =- ({-# LINE 117 "src-ag/Order.ag" #-}- _lhsIo_case- {-# LINE 4346 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_cata =- ({-# LINE 111 "src-ag/Order.ag" #-}- _lhsIo_cata- {-# LINE 4352 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_dovisit =- ({-# LINE 116 "src-ag/Order.ag" #-}- _lhsIo_dovisit- {-# LINE 4358 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_newtypes =- ({-# LINE 110 "src-ag/Order.ag" #-}- _lhsIo_newtypes- {-# LINE 4364 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_rename =- ({-# LINE 114 "src-ag/Order.ag" #-}- _lhsIo_rename- {-# LINE 4370 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_sem =- ({-# LINE 113 "src-ag/Order.ag" #-}- _lhsIo_sem- {-# LINE 4376 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_sig =- ({-# LINE 112 "src-ag/Order.ag" #-}- _lhsIo_sig- {-# LINE 4382 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_unbox =- ({-# LINE 119 "src-ag/Order.ag" #-}- _lhsIo_unbox- {-# LINE 4388 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_wantvisit =- ({-# LINE 115 "src-ag/Order.ag" #-}- _lhsIo_wantvisit- {-# LINE 4394 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOprefix =- ({-# LINE 118 "src-ag/Order.ag" #-}- _lhsIprefix- {-# LINE 4400 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOsyn =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIsyn- {-# LINE 4406 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 4412 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOvcount =- ({-# LINE 256 "src-ag/Order.ag" #-}- _lhsIvcount- {-# LINE 4418 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOallnts =- ({-# LINE 647 "src-ag/Order.ag" #-}- _lhsIallnts- {-# LINE 4424 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOaroundMap =- ({-# LINE 408 "src-ag/Order.ag" #-}- _lhsIaroundMap- {-# LINE 4430 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOcVisitsMap =- ({-# LINE 601 "src-ag/Order.ag" #-}- _lhsIcVisitsMap- {-# LINE 4436 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOinh =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIinh- {-# LINE 4442 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 4448 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOmanualAttrDepMap =- ({-# LINE 281 "src-ag/Order.ag" #-}- _lhsImanualAttrDepMap- {-# LINE 4454 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 355 "src-ag/Order.ag" #-}- _lhsImergeMap- {-# LINE 4460 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOnt =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsInt- {-# LINE 4466 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_case =- ({-# LINE 117 "src-ag/Order.ag" #-}- _lhsIo_case- {-# LINE 4472 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_cata =- ({-# LINE 111 "src-ag/Order.ag" #-}- _lhsIo_cata- {-# LINE 4478 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_dovisit =- ({-# LINE 116 "src-ag/Order.ag" #-}- _lhsIo_dovisit- {-# LINE 4484 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_newtypes =- ({-# LINE 110 "src-ag/Order.ag" #-}- _lhsIo_newtypes- {-# LINE 4490 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_rename =- ({-# LINE 114 "src-ag/Order.ag" #-}- _lhsIo_rename- {-# LINE 4496 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_sem =- ({-# LINE 113 "src-ag/Order.ag" #-}- _lhsIo_sem- {-# LINE 4502 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_sig =- ({-# LINE 112 "src-ag/Order.ag" #-}- _lhsIo_sig- {-# LINE 4508 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_unbox =- ({-# LINE 119 "src-ag/Order.ag" #-}- _lhsIo_unbox- {-# LINE 4514 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_wantvisit =- ({-# LINE 115 "src-ag/Order.ag" #-}- _lhsIo_wantvisit- {-# LINE 4520 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOprefix =- ({-# LINE 118 "src-ag/Order.ag" #-}- _lhsIprefix- {-# LINE 4526 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOsyn =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIsyn- {-# LINE 4532 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 4538 "src-ag/Order.hs" #-}- )- -- copy rule (chain)- _tlOvcount =- ({-# LINE 256 "src-ag/Order.ag" #-}- _hdIvcount- {-# LINE 4544 "src-ag/Order.hs" #-}- )- ( _hdIadditionalDep,_hdIaroundDep,_hdIcProduction,_hdIcons,_hdIdirectDep,_hdIerrors,_hdIinstDep,_hdImergeDep,_hdInAutoRules,_hdInExplicitRules,_hdIrules,_hdIvcount) =- hd_ _hdOallnts _hdOaroundMap _hdOcVisitsMap _hdOinh _hdOinhMap _hdOmanualAttrDepMap _hdOmergeMap _hdOnt _hdOo_case _hdOo_cata _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_unbox _hdOo_wantvisit _hdOprefix _hdOsyn _hdOsynMap _hdOvcount - ( _tlIadditionalDep,_tlIaroundDep,_tlIcProductions,_tlIcons,_tlIdirectDep,_tlIerrors,_tlIinstDep,_tlImergeDep,_tlInAutoRules,_tlInExplicitRules,_tlIrules,_tlIvcount) =- tl_ _tlOallnts _tlOaroundMap _tlOcVisitsMap _tlOinh _tlOinhMap _tlOmanualAttrDepMap _tlOmergeMap _tlOnt _tlOo_case _tlOo_cata _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_unbox _tlOo_wantvisit _tlOprefix _tlOsyn _tlOsynMap _tlOvcount - in ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProductions,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount))) )-sem_Productions_Nil :: T_Productions -sem_Productions_Nil =- (T_Productions (\ _lhsIallnts- _lhsIaroundMap- _lhsIcVisitsMap- _lhsIinh- _lhsIinhMap- _lhsImanualAttrDepMap- _lhsImergeMap- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_dovisit- _lhsIo_newtypes- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_unbox- _lhsIo_wantvisit- _lhsIprefix- _lhsIsyn- _lhsIsynMap- _lhsIvcount ->- (let _lhsOcProductions :: CProductions- _lhsOadditionalDep :: (Seq Edge)- _lhsOaroundDep :: (Seq Edge)- _lhsOcons :: ([ConstructorIdent])- _lhsOdirectDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOinstDep :: (Seq Edge)- _lhsOmergeDep :: (Seq Edge)- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- _lhsOrules :: (Seq (Vertex,CRule))- _lhsOvcount :: Int- -- "src-ag/Order.ag"(line 627, column 12)- _lhsOcProductions =- ({-# LINE 627 "src-ag/Order.ag" #-}- []- {-# LINE 4590 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 281, column 60)- _lhsOadditionalDep =- ({-# LINE 281 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 4596 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 402, column 24)- _lhsOaroundDep =- ({-# LINE 402 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 4602 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 520, column 40)- _lhsOcons =- ({-# LINE 520 "src-ag/Order.ag" #-}- []- {-# LINE 4608 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 267, column 33)- _lhsOdirectDep =- ({-# LINE 267 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 4614 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 4620 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 310, column 31)- _lhsOinstDep =- ({-# LINE 310 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 4626 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 365, column 18)- _lhsOmergeDep =- ({-# LINE 365 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 4632 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- 0- {-# LINE 4638 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- 0- {-# LINE 4644 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 257, column 18)- _lhsOrules =- ({-# LINE 257 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 4650 "src-ag/Order.hs" #-}- )- -- copy rule (chain)- _lhsOvcount =- ({-# LINE 256 "src-ag/Order.ag" #-}- _lhsIvcount- {-# LINE 4656 "src-ag/Order.hs" #-}- )- in ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProductions,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount))) )--- Rule ---------------------------------------------------------{-- visit 0:- inherited attributes:- allTypeSigs : Map Identifier Type- allfields : [(Identifier,Type,ChildKind)]- allnts : [Identifier]- altAttrs : Map AltAttr Vertex- attrs : [(Identifier,Identifier)]- childInhs : Map Identifier Attributes- childNts : Map Identifier NontermIdent- con : Identifier- inh : Attributes- inhsOfChildren : Map Identifier Attributes- mergeMap : Map Identifier (Identifier,[Identifier])- nt : Identifier- o_case : Bool- o_cata : Bool- o_dovisit : Bool- o_newtypes : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_wantvisit : Bool- prefix : String- syn : Attributes- synsOfChildren : Map Identifier Attributes- synthesized attributes:- directDep : Seq Edge- errors : Seq Error- gathAltAttrs : [AltAttr]- gathRules : Seq CRule- instDep : Seq Edge- instVars : [Identifier]- locVars : [Identifier]- nAutoRules : Int- nExplicitRules : Int- alternatives:- alternative Rule:- child mbName : {Maybe Identifier}- child pattern : Pattern - child rhs : Expression - child owrt : {Bool}- child origin : {String}- child explicit : {Bool}- child pure : {Bool}- child identity : {Bool}- child mbError : {Maybe Error}- child eager : {Bool}- visit 0:- local defines : _- local gathRules : _- local instDep1 : _- local instDep2 : _--}--- cata-sem_Rule :: Rule ->- T_Rule -sem_Rule (Rule _mbName _pattern _rhs _owrt _origin _explicit _pure _identity _mbError _eager ) =- (sem_Rule_Rule _mbName (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin _explicit _pure _identity _mbError _eager )--- semantic domain-newtype T_Rule = T_Rule ((Map Identifier Type) ->- ([(Identifier,Type,ChildKind)]) ->- ([Identifier]) ->- (Map AltAttr Vertex) ->- ([(Identifier,Identifier)]) ->- (Map Identifier Attributes) ->- (Map Identifier NontermIdent) ->- Identifier ->- Attributes ->- (Map Identifier Attributes) ->- (Map Identifier (Identifier,[Identifier])) ->- Identifier ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- String ->- Attributes ->- (Map Identifier Attributes) ->- ( (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,ChildKind)])),allnts_Inh_Rule :: !(([Identifier])),altAttrs_Inh_Rule :: !((Map AltAttr Vertex)),attrs_Inh_Rule :: !(([(Identifier,Identifier)])),childInhs_Inh_Rule :: !((Map Identifier Attributes)),childNts_Inh_Rule :: !((Map Identifier NontermIdent)),con_Inh_Rule :: !(Identifier),inh_Inh_Rule :: !(Attributes),inhsOfChildren_Inh_Rule :: !((Map Identifier Attributes)),mergeMap_Inh_Rule :: !((Map Identifier (Identifier,[Identifier]))),nt_Inh_Rule :: !(Identifier),o_case_Inh_Rule :: !(Bool),o_cata_Inh_Rule :: !(Bool),o_dovisit_Inh_Rule :: !(Bool),o_newtypes_Inh_Rule :: !(Bool),o_rename_Inh_Rule :: !(Bool),o_sem_Inh_Rule :: !(Bool),o_sig_Inh_Rule :: !(Bool),o_wantvisit_Inh_Rule :: !(Bool),prefix_Inh_Rule :: !(String),syn_Inh_Rule :: !(Attributes),synsOfChildren_Inh_Rule :: !((Map Identifier Attributes))}-data Syn_Rule = Syn_Rule {directDep_Syn_Rule :: !((Seq Edge)),errors_Syn_Rule :: !((Seq Error)),gathAltAttrs_Syn_Rule :: !(([AltAttr])),gathRules_Syn_Rule :: !((Seq CRule)),instDep_Syn_Rule :: !((Seq Edge)),instVars_Syn_Rule :: !(([Identifier])),locVars_Syn_Rule :: !(([Identifier])),nAutoRules_Syn_Rule :: !(Int),nExplicitRules_Syn_Rule :: !(Int)}-wrap_Rule :: T_Rule ->- Inh_Rule ->- Syn_Rule -wrap_Rule (T_Rule sem ) (Inh_Rule _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren ) =- (let ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules) = sem _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren - in (Syn_Rule _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules ))-sem_Rule_Rule :: (Maybe Identifier) ->- T_Pattern ->- T_Expression ->- Bool ->- String ->- Bool ->- Bool ->- Bool ->- (Maybe Error) ->- Bool ->- T_Rule -sem_Rule_Rule mbName_ (T_Pattern pattern_ ) (T_Expression rhs_ ) owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_ =- (T_Rule (\ _lhsIallTypeSigs- _lhsIallfields- _lhsIallnts- _lhsIaltAttrs- _lhsIattrs- _lhsIchildInhs- _lhsIchildNts- _lhsIcon- _lhsIinh- _lhsIinhsOfChildren- _lhsImergeMap- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_dovisit- _lhsIo_newtypes- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_wantvisit- _lhsIprefix- _lhsIsyn- _lhsIsynsOfChildren ->- (let _lhsOnExplicitRules :: Int- _lhsOnAutoRules :: Int- _lhsOdirectDep :: (Seq Edge)- _lhsOinstDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOgathRules :: (Seq CRule)- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _patternOallTypeSigs :: (Map Identifier Type)- _patternOaltAttrs :: (Map AltAttr Vertex)- _patternOcon :: Identifier- _patternOinh :: Attributes- _patternOnt :: Identifier- _patternOsyn :: Attributes- _rhsOallfields :: ([(Identifier,Type,ChildKind)])- _rhsOallnts :: ([Identifier])- _rhsOattrs :: ([(Identifier,Identifier)])- _rhsOcon :: Identifier- _rhsOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _rhsOnt :: Identifier- _patternIcopy :: Pattern - _patternIerrors :: (Seq Error)- _patternIgathAltAttrs :: ([AltAttr])- _patternIinstVars :: ([Identifier])- _patternIlocVars :: ([Identifier])- _patternIpatternAttrs :: ([(Identifier,Identifier,Bool)])- _rhsIallRhsVars :: (Set (Identifier,Identifier))- _rhsIcopy :: Expression - _rhsIerrors :: (Seq Error)- _rhsItextLines :: ([String])- _rhsIusedAttrs :: ([(Identifier,Identifier)])- _rhsIusedFields :: ([Identifier])- _rhsIusedLocals :: ([Identifier])- -- "src-ag/Order.ag"(line 64, column 11)- _lhsOnExplicitRules =- ({-# LINE 64 "src-ag/Order.ag" #-}- if explicit_- then 1- else 0- {-# LINE 4827 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 67, column 11)- _lhsOnAutoRules =- ({-# LINE 67 "src-ag/Order.ag" #-}- if startsWith "use rule" origin_ || startsWith "copy rule" origin_- then 1- else 0- {-# LINE 4835 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 217, column 12)- _defines =- ({-# LINE 217 "src-ag/Order.ag" #-}- let tp field attr | field == _LOC || field == _INST- = Map.lookup attr _lhsIallTypeSigs- | field == _LHS = Map.lookup attr _lhsIsyn- | otherwise = Map.lookup attr (findWithErr1 "Rule.defines.tp" field _lhsIchildInhs)- typ :: Pattern -> Maybe Type- typ (Alias field attr _) = tp field attr- typ (Underscore _) = Nothing- typ _ = Nothing- in Map.fromList [ (findWithErr1 "Rule.defines" aa _lhsIaltAttrs, (field,attr,(tp field attr)))- | (field,attr,isLocalOrInst) <- _patternIpatternAttrs- , let aa = AltAttr field attr isLocalOrInst- ]- {-# LINE 4852 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 231, column 12)- _gathRules =- ({-# LINE 231 "src-ag/Order.ag" #-}- let childnt field = Map.lookup field _lhsIchildNts- in Seq.fromList [ CRule attr False True _lhsInt _lhsIcon field (childnt field) tp _patternIcopy _rhsItextLines _defines owrt_ origin_ _rhsIallRhsVars explicit_ mbName_- | (field,attr,tp) <- Map.elems _defines- ]- {-# LINE 4861 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 269, column 12)- _lhsOdirectDep =- ({-# LINE 269 "src-ag/Order.ag" #-}- let defined = Map.keys _defines- used = [ Map.lookup (AltAttr field attr True) _lhsIaltAttrs | (field,attr) <- _rhsIusedAttrs]- ++ [ Map.lookup (AltAttr _LOC attr True) _lhsIaltAttrs | attr <- _rhsIusedLocals ++ _rhsIusedFields ]- in Seq.fromList [ (x,y) | Just x <- used, y <- defined ]- {-# LINE 4870 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 313, column 6)- _instDep1 =- ({-# LINE 313 "src-ag/Order.ag" #-}- Seq.fromList $- [ (instVert, synVert)- | (field,instNm,_) <- Map.elems _defines- , field == _INST- , synNm <- Map.keys (findWithErr2 instNm _lhsIsynsOfChildren)- , let instAttr = AltAttr _INST instNm True- synAttr = AltAttr instNm synNm True- instVert = findWithErr2 instAttr _lhsIaltAttrs- synVert = findWithErr2 synAttr _lhsIaltAttrs- ]- {-# LINE 4885 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 324, column 6)- _instDep2 =- ({-# LINE 324 "src-ag/Order.ag" #-}- Seq.fromList $- [ (instVert, inhVert)- | (field,instNm,_) <- Map.elems _defines- , field == _INST- , inhNm <- Map.keys (findWithErr2 instNm _lhsIinhsOfChildren)- , let instAttr = AltAttr _INST instNm True- inhAttr = AltAttr instNm inhNm False- instVert = findWithErr2 instAttr _lhsIaltAttrs- inhVert = findWithErr2 inhAttr _lhsIaltAttrs- ]- {-# LINE 4900 "src-ag/Order.hs" #-}- )- -- "src-ag/Order.ag"(line 335, column 6)- _lhsOinstDep =- ({-# LINE 335 "src-ag/Order.ag" #-}- _instDep1 Seq.>< _instDep2- {-# LINE 4906 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- _patternIerrors Seq.>< _rhsIerrors- {-# LINE 4912 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "src-ag/Order.ag" #-}- _patternIgathAltAttrs- {-# LINE 4918 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 206, column 23)- _lhsOgathRules =- ({-# LINE 206 "src-ag/Order.ag" #-}- _gathRules- {-# LINE 4924 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- _patternIinstVars- {-# LINE 4930 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- _patternIlocVars- {-# LINE 4936 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patternOallTypeSigs =- ({-# LINE 533 "src-ag/Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 4942 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patternOaltAttrs =- ({-# LINE 186 "src-ag/Order.ag" #-}- _lhsIaltAttrs- {-# LINE 4948 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patternOcon =- ({-# LINE 90 "src-ag/Order.ag" #-}- _lhsIcon- {-# LINE 4954 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patternOinh =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIinh- {-# LINE 4960 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patternOnt =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsInt- {-# LINE 4966 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _patternOsyn =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIsyn- {-# LINE 4972 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rhsOallfields =- ({-# LINE 446 "src-ag/Order.ag" #-}- _lhsIallfields- {-# LINE 4978 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rhsOallnts =- ({-# LINE 447 "src-ag/Order.ag" #-}- _lhsIallnts- {-# LINE 4984 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rhsOattrs =- ({-# LINE 448 "src-ag/Order.ag" #-}- _lhsIattrs- {-# LINE 4990 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rhsOcon =- ({-# LINE 445 "src-ag/Order.ag" #-}- _lhsIcon- {-# LINE 4996 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rhsOmergeMap =- ({-# LINE 360 "src-ag/Order.ag" #-}- _lhsImergeMap- {-# LINE 5002 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _rhsOnt =- ({-# LINE 445 "src-ag/Order.ag" #-}- _lhsInt- {-# LINE 5008 "src-ag/Order.hs" #-}- )- ( _patternIcopy,_patternIerrors,_patternIgathAltAttrs,_patternIinstVars,_patternIlocVars,_patternIpatternAttrs) =- pattern_ _patternOallTypeSigs _patternOaltAttrs _patternOcon _patternOinh _patternOnt _patternOsyn - ( _rhsIallRhsVars,_rhsIcopy,_rhsIerrors,_rhsItextLines,_rhsIusedAttrs,_rhsIusedFields,_rhsIusedLocals) =- rhs_ _rhsOallfields _rhsOallnts _rhsOattrs _rhsOcon _rhsOmergeMap _rhsOnt - in ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules))) )--- Rules --------------------------------------------------------{-- visit 0:- inherited attributes:- allTypeSigs : Map Identifier Type- allfields : [(Identifier,Type,ChildKind)]- allnts : [Identifier]- altAttrs : Map AltAttr Vertex- attrs : [(Identifier,Identifier)]- childInhs : Map Identifier Attributes- childNts : Map Identifier NontermIdent- con : Identifier- inh : Attributes- inhsOfChildren : Map Identifier Attributes- mergeMap : Map Identifier (Identifier,[Identifier])- nt : Identifier- o_case : Bool- o_cata : Bool- o_dovisit : Bool- o_newtypes : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_wantvisit : Bool- prefix : String- syn : Attributes- synsOfChildren : Map Identifier Attributes- synthesized attributes:- directDep : Seq Edge- errors : Seq Error- gathAltAttrs : [AltAttr]- gathRules : Seq CRule- instDep : Seq Edge- instVars : [Identifier]- locVars : [Identifier]- nAutoRules : Int- nExplicitRules : Int- alternatives:- alternative Cons:- child hd : Rule - child tl : Rules - alternative Nil:--}--- cata-sem_Rules :: Rules ->- T_Rules -sem_Rules list =- (Prelude.foldr sem_Rules_Cons sem_Rules_Nil (Prelude.map sem_Rule list) )--- semantic domain-newtype T_Rules = T_Rules ((Map Identifier Type) ->- ([(Identifier,Type,ChildKind)]) ->- ([Identifier]) ->- (Map AltAttr Vertex) ->- ([(Identifier,Identifier)]) ->- (Map Identifier Attributes) ->- (Map Identifier NontermIdent) ->- Identifier ->- Attributes ->- (Map Identifier Attributes) ->- (Map Identifier (Identifier,[Identifier])) ->- Identifier ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- String ->- Attributes ->- (Map Identifier Attributes) ->- ( (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,ChildKind)])),allnts_Inh_Rules :: !(([Identifier])),altAttrs_Inh_Rules :: !((Map AltAttr Vertex)),attrs_Inh_Rules :: !(([(Identifier,Identifier)])),childInhs_Inh_Rules :: !((Map Identifier Attributes)),childNts_Inh_Rules :: !((Map Identifier NontermIdent)),con_Inh_Rules :: !(Identifier),inh_Inh_Rules :: !(Attributes),inhsOfChildren_Inh_Rules :: !((Map Identifier Attributes)),mergeMap_Inh_Rules :: !((Map Identifier (Identifier,[Identifier]))),nt_Inh_Rules :: !(Identifier),o_case_Inh_Rules :: !(Bool),o_cata_Inh_Rules :: !(Bool),o_dovisit_Inh_Rules :: !(Bool),o_newtypes_Inh_Rules :: !(Bool),o_rename_Inh_Rules :: !(Bool),o_sem_Inh_Rules :: !(Bool),o_sig_Inh_Rules :: !(Bool),o_wantvisit_Inh_Rules :: !(Bool),prefix_Inh_Rules :: !(String),syn_Inh_Rules :: !(Attributes),synsOfChildren_Inh_Rules :: !((Map Identifier Attributes))}-data Syn_Rules = Syn_Rules {directDep_Syn_Rules :: !((Seq Edge)),errors_Syn_Rules :: !((Seq Error)),gathAltAttrs_Syn_Rules :: !(([AltAttr])),gathRules_Syn_Rules :: !((Seq CRule)),instDep_Syn_Rules :: !((Seq Edge)),instVars_Syn_Rules :: !(([Identifier])),locVars_Syn_Rules :: !(([Identifier])),nAutoRules_Syn_Rules :: !(Int),nExplicitRules_Syn_Rules :: !(Int)}-wrap_Rules :: T_Rules ->- Inh_Rules ->- Syn_Rules -wrap_Rules (T_Rules sem ) (Inh_Rules _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren ) =- (let ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules) = sem _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren - in (Syn_Rules _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules ))-sem_Rules_Cons :: T_Rule ->- T_Rules ->- T_Rules -sem_Rules_Cons (T_Rule hd_ ) (T_Rules tl_ ) =- (T_Rules (\ _lhsIallTypeSigs- _lhsIallfields- _lhsIallnts- _lhsIaltAttrs- _lhsIattrs- _lhsIchildInhs- _lhsIchildNts- _lhsIcon- _lhsIinh- _lhsIinhsOfChildren- _lhsImergeMap- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_dovisit- _lhsIo_newtypes- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_wantvisit- _lhsIprefix- _lhsIsyn- _lhsIsynsOfChildren ->- (let _lhsOdirectDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOgathRules :: (Seq CRule)- _lhsOinstDep :: (Seq Edge)- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- _hdOallTypeSigs :: (Map Identifier Type)- _hdOallfields :: ([(Identifier,Type,ChildKind)])- _hdOallnts :: ([Identifier])- _hdOaltAttrs :: (Map AltAttr Vertex)- _hdOattrs :: ([(Identifier,Identifier)])- _hdOchildInhs :: (Map Identifier Attributes)- _hdOchildNts :: (Map Identifier NontermIdent)- _hdOcon :: Identifier- _hdOinh :: Attributes- _hdOinhsOfChildren :: (Map Identifier Attributes)- _hdOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _hdOnt :: Identifier- _hdOo_case :: Bool- _hdOo_cata :: Bool- _hdOo_dovisit :: Bool- _hdOo_newtypes :: Bool- _hdOo_rename :: Bool- _hdOo_sem :: Bool- _hdOo_sig :: Bool- _hdOo_wantvisit :: Bool- _hdOprefix :: String- _hdOsyn :: Attributes- _hdOsynsOfChildren :: (Map Identifier Attributes)- _tlOallTypeSigs :: (Map Identifier Type)- _tlOallfields :: ([(Identifier,Type,ChildKind)])- _tlOallnts :: ([Identifier])- _tlOaltAttrs :: (Map AltAttr Vertex)- _tlOattrs :: ([(Identifier,Identifier)])- _tlOchildInhs :: (Map Identifier Attributes)- _tlOchildNts :: (Map Identifier NontermIdent)- _tlOcon :: Identifier- _tlOinh :: Attributes- _tlOinhsOfChildren :: (Map Identifier Attributes)- _tlOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _tlOnt :: Identifier- _tlOo_case :: Bool- _tlOo_cata :: Bool- _tlOo_dovisit :: Bool- _tlOo_newtypes :: Bool- _tlOo_rename :: Bool- _tlOo_sem :: Bool- _tlOo_sig :: Bool- _tlOo_wantvisit :: Bool- _tlOprefix :: String- _tlOsyn :: Attributes- _tlOsynsOfChildren :: (Map Identifier Attributes)- _hdIdirectDep :: (Seq Edge)- _hdIerrors :: (Seq Error)- _hdIgathAltAttrs :: ([AltAttr])- _hdIgathRules :: (Seq CRule)- _hdIinstDep :: (Seq Edge)- _hdIinstVars :: ([Identifier])- _hdIlocVars :: ([Identifier])- _hdInAutoRules :: Int- _hdInExplicitRules :: Int- _tlIdirectDep :: (Seq Edge)- _tlIerrors :: (Seq Error)- _tlIgathAltAttrs :: ([AltAttr])- _tlIgathRules :: (Seq CRule)- _tlIinstDep :: (Seq Edge)- _tlIinstVars :: ([Identifier])- _tlIlocVars :: ([Identifier])- _tlInAutoRules :: Int- _tlInExplicitRules :: Int- -- use rule "src-ag/Order.ag"(line 267, column 33)- _lhsOdirectDep =- ({-# LINE 267 "src-ag/Order.ag" #-}- _hdIdirectDep Seq.>< _tlIdirectDep- {-# LINE 5200 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 5206 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "src-ag/Order.ag" #-}- _hdIgathAltAttrs ++ _tlIgathAltAttrs- {-# LINE 5212 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 206, column 23)- _lhsOgathRules =- ({-# LINE 206 "src-ag/Order.ag" #-}- _hdIgathRules Seq.>< _tlIgathRules- {-# LINE 5218 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 310, column 31)- _lhsOinstDep =- ({-# LINE 310 "src-ag/Order.ag" #-}- _hdIinstDep Seq.>< _tlIinstDep- {-# LINE 5224 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- _hdIinstVars ++ _tlIinstVars- {-# LINE 5230 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- _hdIlocVars ++ _tlIlocVars- {-# LINE 5236 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- _hdInAutoRules + _tlInAutoRules- {-# LINE 5242 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- _hdInExplicitRules + _tlInExplicitRules- {-# LINE 5248 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOallTypeSigs =- ({-# LINE 533 "src-ag/Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 5254 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOallfields =- ({-# LINE 654 "src-ag/Order.ag" #-}- _lhsIallfields- {-# LINE 5260 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOallnts =- ({-# LINE 647 "src-ag/Order.ag" #-}- _lhsIallnts- {-# LINE 5266 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOaltAttrs =- ({-# LINE 186 "src-ag/Order.ag" #-}- _lhsIaltAttrs- {-# LINE 5272 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOattrs =- ({-# LINE 654 "src-ag/Order.ag" #-}- _lhsIattrs- {-# LINE 5278 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOchildInhs =- ({-# LINE 199 "src-ag/Order.ag" #-}- _lhsIchildInhs- {-# LINE 5284 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOchildNts =- ({-# LINE 198 "src-ag/Order.ag" #-}- _lhsIchildNts- {-# LINE 5290 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOcon =- ({-# LINE 90 "src-ag/Order.ag" #-}- _lhsIcon- {-# LINE 5296 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOinh =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIinh- {-# LINE 5302 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOinhsOfChildren =- ({-# LINE 337 "src-ag/Order.ag" #-}- _lhsIinhsOfChildren- {-# LINE 5308 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 360 "src-ag/Order.ag" #-}- _lhsImergeMap- {-# LINE 5314 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOnt =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsInt- {-# LINE 5320 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_case =- ({-# LINE 117 "src-ag/Order.ag" #-}- _lhsIo_case- {-# LINE 5326 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_cata =- ({-# LINE 111 "src-ag/Order.ag" #-}- _lhsIo_cata- {-# LINE 5332 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_dovisit =- ({-# LINE 116 "src-ag/Order.ag" #-}- _lhsIo_dovisit- {-# LINE 5338 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_newtypes =- ({-# LINE 110 "src-ag/Order.ag" #-}- _lhsIo_newtypes- {-# LINE 5344 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_rename =- ({-# LINE 114 "src-ag/Order.ag" #-}- _lhsIo_rename- {-# LINE 5350 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_sem =- ({-# LINE 113 "src-ag/Order.ag" #-}- _lhsIo_sem- {-# LINE 5356 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_sig =- ({-# LINE 112 "src-ag/Order.ag" #-}- _lhsIo_sig- {-# LINE 5362 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOo_wantvisit =- ({-# LINE 115 "src-ag/Order.ag" #-}- _lhsIo_wantvisit- {-# LINE 5368 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOprefix =- ({-# LINE 118 "src-ag/Order.ag" #-}- _lhsIprefix- {-# LINE 5374 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOsyn =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIsyn- {-# LINE 5380 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOsynsOfChildren =- ({-# LINE 337 "src-ag/Order.ag" #-}- _lhsIsynsOfChildren- {-# LINE 5386 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOallTypeSigs =- ({-# LINE 533 "src-ag/Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 5392 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOallfields =- ({-# LINE 654 "src-ag/Order.ag" #-}- _lhsIallfields- {-# LINE 5398 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOallnts =- ({-# LINE 647 "src-ag/Order.ag" #-}- _lhsIallnts- {-# LINE 5404 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOaltAttrs =- ({-# LINE 186 "src-ag/Order.ag" #-}- _lhsIaltAttrs- {-# LINE 5410 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOattrs =- ({-# LINE 654 "src-ag/Order.ag" #-}- _lhsIattrs- {-# LINE 5416 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOchildInhs =- ({-# LINE 199 "src-ag/Order.ag" #-}- _lhsIchildInhs- {-# LINE 5422 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOchildNts =- ({-# LINE 198 "src-ag/Order.ag" #-}- _lhsIchildNts- {-# LINE 5428 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOcon =- ({-# LINE 90 "src-ag/Order.ag" #-}- _lhsIcon- {-# LINE 5434 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOinh =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIinh- {-# LINE 5440 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOinhsOfChildren =- ({-# LINE 337 "src-ag/Order.ag" #-}- _lhsIinhsOfChildren- {-# LINE 5446 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 360 "src-ag/Order.ag" #-}- _lhsImergeMap- {-# LINE 5452 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOnt =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsInt- {-# LINE 5458 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_case =- ({-# LINE 117 "src-ag/Order.ag" #-}- _lhsIo_case- {-# LINE 5464 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_cata =- ({-# LINE 111 "src-ag/Order.ag" #-}- _lhsIo_cata- {-# LINE 5470 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_dovisit =- ({-# LINE 116 "src-ag/Order.ag" #-}- _lhsIo_dovisit- {-# LINE 5476 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_newtypes =- ({-# LINE 110 "src-ag/Order.ag" #-}- _lhsIo_newtypes- {-# LINE 5482 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_rename =- ({-# LINE 114 "src-ag/Order.ag" #-}- _lhsIo_rename- {-# LINE 5488 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_sem =- ({-# LINE 113 "src-ag/Order.ag" #-}- _lhsIo_sem- {-# LINE 5494 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_sig =- ({-# LINE 112 "src-ag/Order.ag" #-}- _lhsIo_sig- {-# LINE 5500 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOo_wantvisit =- ({-# LINE 115 "src-ag/Order.ag" #-}- _lhsIo_wantvisit- {-# LINE 5506 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOprefix =- ({-# LINE 118 "src-ag/Order.ag" #-}- _lhsIprefix- {-# LINE 5512 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOsyn =- ({-# LINE 89 "src-ag/Order.ag" #-}- _lhsIsyn- {-# LINE 5518 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _tlOsynsOfChildren =- ({-# LINE 337 "src-ag/Order.ag" #-}- _lhsIsynsOfChildren- {-# LINE 5524 "src-ag/Order.hs" #-}- )- ( _hdIdirectDep,_hdIerrors,_hdIgathAltAttrs,_hdIgathRules,_hdIinstDep,_hdIinstVars,_hdIlocVars,_hdInAutoRules,_hdInExplicitRules) =- hd_ _hdOallTypeSigs _hdOallfields _hdOallnts _hdOaltAttrs _hdOattrs _hdOchildInhs _hdOchildNts _hdOcon _hdOinh _hdOinhsOfChildren _hdOmergeMap _hdOnt _hdOo_case _hdOo_cata _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_wantvisit _hdOprefix _hdOsyn _hdOsynsOfChildren - ( _tlIdirectDep,_tlIerrors,_tlIgathAltAttrs,_tlIgathRules,_tlIinstDep,_tlIinstVars,_tlIlocVars,_tlInAutoRules,_tlInExplicitRules) =- tl_ _tlOallTypeSigs _tlOallfields _tlOallnts _tlOaltAttrs _tlOattrs _tlOchildInhs _tlOchildNts _tlOcon _tlOinh _tlOinhsOfChildren _tlOmergeMap _tlOnt _tlOo_case _tlOo_cata _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_wantvisit _tlOprefix _tlOsyn _tlOsynsOfChildren - in ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules))) )-sem_Rules_Nil :: T_Rules -sem_Rules_Nil =- (T_Rules (\ _lhsIallTypeSigs- _lhsIallfields- _lhsIallnts- _lhsIaltAttrs- _lhsIattrs- _lhsIchildInhs- _lhsIchildNts- _lhsIcon- _lhsIinh- _lhsIinhsOfChildren- _lhsImergeMap- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_dovisit- _lhsIo_newtypes- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_wantvisit- _lhsIprefix- _lhsIsyn- _lhsIsynsOfChildren ->- (let _lhsOdirectDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOgathRules :: (Seq CRule)- _lhsOinstDep :: (Seq Edge)- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- -- use rule "src-ag/Order.ag"(line 267, column 33)- _lhsOdirectDep =- ({-# LINE 267 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 5569 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 5575 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "src-ag/Order.ag" #-}- []- {-# LINE 5581 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 206, column 23)- _lhsOgathRules =- ({-# LINE 206 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 5587 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 310, column 31)- _lhsOinstDep =- ({-# LINE 310 "src-ag/Order.ag" #-}- Seq.empty- {-# LINE 5593 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- []- {-# LINE 5599 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "src-ag/Order.ag" #-}- []- {-# LINE 5605 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- 0- {-# LINE 5611 "src-ag/Order.hs" #-}- )- -- use rule "src-ag/Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "src-ag/Order.ag" #-}- 0- {-# LINE 5617 "src-ag/Order.hs" #-}- )- in ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules))) )--- TypeSig ------------------------------------------------------{-- visit 0:- chained attribute:- typeSigs : Map Identifier Type- alternatives:- alternative TypeSig:- child name : {Identifier}- child tp : {Type}--}--- cata-sem_TypeSig :: TypeSig ->- T_TypeSig -sem_TypeSig (TypeSig _name _tp ) =- (sem_TypeSig_TypeSig _name _tp )--- semantic domain-newtype T_TypeSig = T_TypeSig ((Map Identifier Type) ->- ( (Map Identifier Type)))-data Inh_TypeSig = Inh_TypeSig {typeSigs_Inh_TypeSig :: !((Map Identifier Type))}-data Syn_TypeSig = Syn_TypeSig {typeSigs_Syn_TypeSig :: !((Map Identifier Type))}-wrap_TypeSig :: T_TypeSig ->- Inh_TypeSig ->- Syn_TypeSig -wrap_TypeSig (T_TypeSig sem ) (Inh_TypeSig _lhsItypeSigs ) =- (let ( _lhsOtypeSigs) = sem _lhsItypeSigs - in (Syn_TypeSig _lhsOtypeSigs ))-sem_TypeSig_TypeSig :: Identifier ->- Type ->- T_TypeSig -sem_TypeSig_TypeSig name_ tp_ =- (T_TypeSig (\ _lhsItypeSigs ->- (let _lhsOtypeSigs :: (Map Identifier Type)- -- "src-ag/Order.ag"(line 531, column 13)- _lhsOtypeSigs =- ({-# LINE 531 "src-ag/Order.ag" #-}- Map.insert name_ tp_ _lhsItypeSigs- {-# LINE 5656 "src-ag/Order.hs" #-}- )- in ( _lhsOtypeSigs))) )--- TypeSigs -----------------------------------------------------{-- visit 0:- chained attribute:- typeSigs : Map Identifier Type- alternatives:- alternative Cons:- child hd : TypeSig - child tl : TypeSigs - alternative Nil:--}--- cata-sem_TypeSigs :: TypeSigs ->- T_TypeSigs -sem_TypeSigs list =- (Prelude.foldr sem_TypeSigs_Cons sem_TypeSigs_Nil (Prelude.map sem_TypeSig list) )--- semantic domain-newtype T_TypeSigs = T_TypeSigs ((Map Identifier Type) ->- ( (Map Identifier Type)))-data Inh_TypeSigs = Inh_TypeSigs {typeSigs_Inh_TypeSigs :: !((Map Identifier Type))}-data Syn_TypeSigs = Syn_TypeSigs {typeSigs_Syn_TypeSigs :: !((Map Identifier Type))}-wrap_TypeSigs :: T_TypeSigs ->- Inh_TypeSigs ->- Syn_TypeSigs -wrap_TypeSigs (T_TypeSigs sem ) (Inh_TypeSigs _lhsItypeSigs ) =- (let ( _lhsOtypeSigs) = sem _lhsItypeSigs - in (Syn_TypeSigs _lhsOtypeSigs ))-sem_TypeSigs_Cons :: T_TypeSig ->- T_TypeSigs ->- T_TypeSigs -sem_TypeSigs_Cons (T_TypeSig hd_ ) (T_TypeSigs tl_ ) =- (T_TypeSigs (\ _lhsItypeSigs ->- (let _lhsOtypeSigs :: (Map Identifier Type)- _hdOtypeSigs :: (Map Identifier Type)- _tlOtypeSigs :: (Map Identifier Type)- _hdItypeSigs :: (Map Identifier Type)- _tlItypeSigs :: (Map Identifier Type)- -- copy rule (up)- _lhsOtypeSigs =- ({-# LINE 527 "src-ag/Order.ag" #-}- _tlItypeSigs- {-# LINE 5700 "src-ag/Order.hs" #-}- )- -- copy rule (down)- _hdOtypeSigs =- ({-# LINE 527 "src-ag/Order.ag" #-}- _lhsItypeSigs- {-# LINE 5706 "src-ag/Order.hs" #-}- )- -- copy rule (chain)- _tlOtypeSigs =- ({-# LINE 527 "src-ag/Order.ag" #-}- _hdItypeSigs- {-# LINE 5712 "src-ag/Order.hs" #-}- )- ( _hdItypeSigs) =- hd_ _hdOtypeSigs - ( _tlItypeSigs) =- tl_ _tlOtypeSigs - in ( _lhsOtypeSigs))) )-sem_TypeSigs_Nil :: T_TypeSigs -sem_TypeSigs_Nil =- (T_TypeSigs (\ _lhsItypeSigs ->- (let _lhsOtypeSigs :: (Map Identifier Type)- -- copy rule (chain)- _lhsOtypeSigs =- ({-# LINE 527 "src-ag/Order.ag" #-}- _lhsItypeSigs- {-# LINE 5727 "src-ag/Order.hs" #-}- )- in ( _lhsOtypeSigs))) )+-- UUAGC 0.9.40.1 (src-ag/Order.ag)+module Order where+{-# LINE 10 "src-ag/Order.ag" #-}++-- From uuagc+import CommonTypes+import Patterns+import ErrorMessages+import AbstractSyntax+import Code hiding (Type)+import qualified Code+import Expression+import Options+import SequentialComputation+import SequentialTypes+import CodeSyntax+import GrammarInfo+import HsToken(HsTokensRoot(HsTokensRoot))+import HsTokenScanner(lexTokens)+import SemHsTokens(sem_HsTokensRoot,wrap_HsTokensRoot, Syn_HsTokensRoot(..),Inh_HsTokensRoot(..))+-- From uulib+import qualified Data.Map as Map+import qualified Data.Set as Set+import qualified Data.Sequence as Seq+import Data.Map(Map)+import Data.Set(Set)+import Data.Sequence(Seq, (><))+import UU.Util.Utils+import UU.Scanner.Position(Pos(..),initPos)+import Data.Foldable(toList)++-- From haskell libraries+import Control.Monad(liftM)+import qualified Data.Array as Array+import Data.Array((!),bounds,inRange)+import Data.List(elemIndex,partition,sort,mapAccumL,find,nubBy,intersperse,groupBy,transpose)+import qualified Data.Tree as Tree+import Data.Maybe+{-# LINE 42 "dist/build/Order.hs" #-}++{-# LINE 2 "src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 49 "dist/build/Order.hs" #-}++{-# LINE 2 "src-ag/Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken+{-# LINE 55 "dist/build/Order.hs" #-}++{-# LINE 2 "src-ag/AbstractSyntax.ag" #-}++-- AbstractSyntax.ag imports+import Data.Set(Set)+import Data.Map(Map)+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import Macro --marcos+import CommonTypes+import ErrorMessages+{-# LINE 67 "dist/build/Order.hs" #-}+{-# LINE 47 "src-ag/Order.ag" #-}++-- Terminates with an error if the key is not in the map+findWithErr1 :: (Ord k, Show k) => String -> k -> Map k a -> a+findWithErr1 s k+ = Map.findWithDefault (error ("findWithErr1 " ++ s ++ ": key " ++ show k ++ " not in map.")) k++findWithErr2 :: (Ord k, Show k, Show a) => k -> Map k a -> a+findWithErr2 k m+ = Map.findWithDefault (error ("findWithErr2: key " ++ show k ++ " not in map: " ++ show m)) k m+{-# LINE 78 "dist/build/Order.hs" #-}++{-# LINE 72 "src-ag/Order.ag" #-}++startsWith :: String -> String -> Bool+startsWith k h = k == take (length k) h+{-# LINE 84 "dist/build/Order.hs" #-}++{-# LINE 139 "src-ag/Order.ag" #-}++getNtName :: Type -> NontermIdent+getNtName (NT nt _ _) = nt+getNtName _ = nullIdent+{-# LINE 91 "dist/build/Order.hs" #-}++{-# LINE 167 "src-ag/Order.ag" #-}++data AltAttr = AltAttr Identifier Identifier Bool+ deriving (Eq, Ord, Show)+{-# LINE 97 "dist/build/Order.hs" #-}++{-# LINE 237 "src-ag/Order.ag" #-}++substSelf nt tp+ = case tp of+ NT n tps defor | n == _SELF -> NT nt tps defor+ _ -> tp++haskellTupel :: [Type] -> Maybe Type+haskellTupel ts = Just ( Haskell ( '(' : (concat (intersperse "," (map show ts))) ++ ")" ))+{-# LINE 108 "dist/build/Order.hs" #-}++{-# LINE 688 "src-ag/Order.ag" #-}++swap (a,b) = (b,a)++showPath :: Table CRule -> [Vertex] -> [String]+showPath ruleTable path+ = let look a | inRange (bounds ruleTable) a = [showOrigin (ruleTable ! a)]+ | otherwise = ["Vertex " ++ show a]+ showOrigin cr | getHasCode cr && getName (getAttr cr) /= "self" = prettyCRule cr ++ " (" ++ show (getPos (getAttr cr)) ++ ")"+ | otherwise = prettyCRule cr+ in concatMap look path+++showPathLocal :: Table CRule -> [Vertex] -> [String]+showPathLocal _ [] = []+showPathLocal ruleTable xs = showP (xs++[-1])+ where showP [] = []+ showP (v1:v2:vs) = let line = step v1 v2+ lines = showP vs+ in line:lines+ step v1 v2 = " - " ++ a1+ where r1 = ruleTable ! v1+ a1 = show (getAttr r1)+++limitTo :: Int -> [String] -> [String]+limitTo _ [] = []+limitTo 0 _ = ["....etcetera, etcetera...."]+limitTo n (x:xs) = x : limitTo (n-1) xs++showPathNice :: Table CRule -> [Vertex] -> [String]+showPathNice _ [] = []+showPathNice ruleTable xs = limitTo 100 (showP ((-1):xs++[-1]))+ where [maxf, maxa, maxn, maxc] = maxWidths ruleTable (take 100 xs)+ showP [] = []+ showP (v1:v2:vs) = let line = step v1 v2+ lines = showP vs+ in if null line then lines else line:lines+ step v1 v2 | last && first = induced+ | last && isSyn r1 = "pass up " ++ alignR maxf "" ++ " " ++ alignL maxa a1 ++ " in " ++ alignR maxn n1 ++ "|" ++ c1 ++ induced+ | first&& not(isSyn r2) = "get from above " ++ alignR maxf "" ++ " " ++ alignL maxa a2 ++ " in " ++ alignR maxn n2 ++ "|" ++ c2+ | last = "pass down " ++ alignR maxf f1 ++ "." ++ a1 ++ induced+ | isSyn r2 = "get from below " ++ alignR maxf f2 ++ "." ++ alignL maxa a2 ++ " in " ++ alignR maxn n2 ++ "|" ++ c2+ | isLocal r1 = if head a1 == '_'+ then ""+ else "calculate " ++ alignR maxf "loc" ++ "." ++ a1+ | otherwise = "pass down " ++ alignR maxf f1 ++ "." ++ alignL maxa a1 ++ " to " ++ alignR maxn n2 ++ "|" ++ c2+ where+ first = v1<0+ last = v2<0+ r1 = ruleTable ! v1+ r2 = ruleTable ! v2+ a1 = show (getAttr r1)+ a2 = show (getAttr r2)+ f1 = show (getField r1)+ f2 = show (getField r2)+ n1 = show (getLhsNt r1)+ n2 = show (getLhsNt r2)+ c1 = show (getCon r1)+ c2 = show (getCon r2)+ induced | v2== -2 = " INDUCED dependency to "+ | otherwise = ""+++maxWidths ruleTable vs+ = map maximum (transpose (map getWidth vs))+ where getWidth v | v<0 = [0,0,0,0]+ | otherwise = map (length . show . ($ (ruleTable!v))) [getField, getAttr, getLhsNt, getCon]++alignL n xs | k<n = xs ++ replicate (n-k) ' '+ | otherwise = xs+ where k = length xs++alignR n xs | k<n = replicate (n-k) ' ' ++ xs+ | otherwise = xs+ where k = length xs++localCycleErr :: Table CRule -> Bool -> Route -> Error+localCycleErr ruleTable o_visit (s:path)+ = let cr = ruleTable ! s+ attr = getAttr cr+ nt = getLhsNt cr+ con = getCon cr+ in LocalCirc nt con attr o_visit (showPathLocal ruleTable path)++instCycleErr :: Table CRule -> Bool -> Route -> Error+instCycleErr ruleTable o_visit (s:path)+ = let cr = ruleTable ! s+ attr = getAttr cr+ nt = getLhsNt cr+ con = getCon cr+ in InstCirc nt con attr o_visit (showPathLocal ruleTable path)++directCycleErrs :: Table NTAttr -> Table CRule -> Bool -> [EdgeRoutes] -> [Error]+directCycleErrs attrTable ruleTable o_visit xs+ = let getNont v = case attrTable ! v of+ NTASyn nt _ _ -> nt+ NTAInh nt _ _ -> nt+ getAttr v = case attrTable ! v of+ NTASyn _ a _ -> a+ NTAInh _ a _ -> a+ sameNont ((v1,_),_,_) ((v2,_),_,_) = getNont v1 == getNont v2+ procCycle ((v1,v2),p1,p2) = ((getAttr v1, getAttr v2), showPathNice ruleTable p1, showPathNice ruleTable p2)+ wrapGroup gr@(((v1,_),_,_):_) = DirectCirc (getNont v1) o_visit (map procCycle gr)+ in map wrapGroup (groupBy sameNont xs)++inducedCycleErrs :: Table NTAttr -> Table CRule -> CInterfaceMap -> [EdgeRoutes] -> [Error]+inducedCycleErrs attrTable ruleTable cim xs+ = let getNont v = case attrTable ! v of+ NTASyn nt _ _ -> nt+ NTAInh nt _ _ -> nt+ getAttr v = case attrTable ! v of+ NTASyn _ a _ -> a+ NTAInh _ a _ -> a+ sameNont ((v1,_),_,_) ((v2,_),_,_) = getNont v1 == getNont v2+ procCycle ((v1,v2),p1,p2) = ((getAttr v1, getAttr v2), showPathNice ruleTable p1, showPathNice ruleTable p2)+ wrapGroup gr@(((v1,_),_,_):_) = InducedCirc (getNont v1) (findWithErr1 "inducedCycleErr.cinter" (getNont v1) cim) (map procCycle gr)+ in map wrapGroup (groupBy sameNont xs)+{-# LINE 228 "dist/build/Order.hs" #-}+-- Child -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allfields : [(Identifier,Type,ChildKind)]+ allnts : [Identifier]+ attrs : [(Identifier,Identifier)]+ con : Identifier+ inh : Attributes+ inhMap : Map Identifier Attributes+ mergeMap : Map Identifier (Identifier,[Identifier])+ nt : Identifier+ o_unbox : Bool+ syn : Attributes+ synMap : Map Identifier Attributes+ synthesized attributes:+ attributes : [(Identifier,Attributes,Attributes)]+ collectChildrenInhs : Map Identifier Attributes + collectChildrenSyns : Map Identifier Attributes + errors : Seq Error+ field : (Identifier,Type,ChildKind)+ gathAltAttrs : [AltAttr]+ gathRules : Seq CRule+ inhs : Seq (Identifier,Attributes)+ nts : Seq (Identifier,NontermIdent)+ singlevisits : [CRule]+ terminals : [Identifier]+ alternatives:+ alternative Child:+ child name : {Identifier}+ child tp : {Type}+ child kind : {ChildKind}+ visit 0:+ local maptolocal : _+ local gathRules : _+ local chnt : _+ local inh : _+ local syn : _+-}+-- cata+sem_Child :: Child ->+ T_Child+sem_Child (Child _name _tp _kind) =+ (sem_Child_Child _name _tp _kind)+-- semantic domain+newtype T_Child = T_Child (([(Identifier,Type,ChildKind)]) ->+ ([Identifier]) ->+ ([(Identifier,Identifier)]) ->+ Identifier ->+ Attributes ->+ (Map Identifier Attributes) ->+ (Map Identifier (Identifier,[Identifier])) ->+ Identifier ->+ Bool ->+ Attributes ->+ (Map Identifier Attributes) ->+ ( ([(Identifier,Attributes,Attributes)]),(Map Identifier Attributes ),(Map Identifier Attributes ),(Seq Error),((Identifier,Type,ChildKind)),([AltAttr]),(Seq CRule),(Seq (Identifier,Attributes)),(Seq (Identifier,NontermIdent)),([CRule]),([Identifier])))+data Inh_Child = Inh_Child {allfields_Inh_Child :: !(([(Identifier,Type,ChildKind)])),allnts_Inh_Child :: !(([Identifier])),attrs_Inh_Child :: !(([(Identifier,Identifier)])),con_Inh_Child :: !(Identifier),inh_Inh_Child :: !(Attributes),inhMap_Inh_Child :: !((Map Identifier Attributes)),mergeMap_Inh_Child :: !((Map Identifier (Identifier,[Identifier]))),nt_Inh_Child :: !(Identifier),o_unbox_Inh_Child :: !(Bool),syn_Inh_Child :: !(Attributes),synMap_Inh_Child :: !((Map Identifier Attributes))}+data Syn_Child = Syn_Child {attributes_Syn_Child :: !(([(Identifier,Attributes,Attributes)])),collectChildrenInhs_Syn_Child :: !((Map Identifier Attributes )),collectChildrenSyns_Syn_Child :: !((Map Identifier Attributes )),errors_Syn_Child :: !((Seq Error)),field_Syn_Child :: !(((Identifier,Type,ChildKind))),gathAltAttrs_Syn_Child :: !(([AltAttr])),gathRules_Syn_Child :: !((Seq CRule)),inhs_Syn_Child :: !((Seq (Identifier,Attributes))),nts_Syn_Child :: !((Seq (Identifier,NontermIdent))),singlevisits_Syn_Child :: !(([CRule])),terminals_Syn_Child :: !(([Identifier]))}+wrap_Child :: T_Child ->+ Inh_Child ->+ Syn_Child+wrap_Child (T_Child sem) (Inh_Child _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap) =+ (let ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfield,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap+ in (Syn_Child _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfield _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals))+sem_Child_Child :: Identifier ->+ Type ->+ ChildKind ->+ T_Child+sem_Child_Child name_ tp_ kind_ =+ (T_Child (\ _lhsIallfields+ _lhsIallnts+ _lhsIattrs+ _lhsIcon+ _lhsIinh+ _lhsIinhMap+ _lhsImergeMap+ _lhsInt+ _lhsIo_unbox+ _lhsIsyn+ _lhsIsynMap ->+ (let _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOnts :: (Seq (Identifier,NontermIdent))+ _lhsOinhs :: (Seq (Identifier,Attributes))+ _lhsOcollectChildrenSyns :: (Map Identifier Attributes )+ _lhsOcollectChildrenInhs :: (Map Identifier Attributes )+ _lhsOsinglevisits :: ([CRule])+ _lhsOterminals :: ([Identifier])+ _lhsOattributes :: ([(Identifier,Attributes,Attributes)])+ _lhsOfield :: ((Identifier,Type,ChildKind))+ _lhsOerrors :: (Seq Error)+ _lhsOgathRules :: (Seq CRule)+ -- "src-ag/Order.ag"(line 178, column 13)+ _maptolocal =+ ({-# LINE 178 "src-ag/Order.ag" #-}+ case tp_ of+ NT nt _ _ -> Map.null _syn+ _ -> True+ {-# LINE 327 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 181, column 13)+ _lhsOgathAltAttrs =+ ({-# LINE 181 "src-ag/Order.ag" #-}+ if _maptolocal+ then [ AltAttr _LOC name_ True ]+ else [ AltAttr name_ syn True | syn <- Map.keys _syn ]+ {-# LINE 335 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 196, column 13)+ _lhsOnts =+ ({-# LINE 196 "src-ag/Order.ag" #-}+ Seq.singleton (name_,getNtName tp_)+ {-# LINE 341 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 197, column 13)+ _lhsOinhs =+ ({-# LINE 197 "src-ag/Order.ag" #-}+ Seq.singleton (name_,_inh )+ {-# LINE 347 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 213, column 13)+ _gathRules =+ ({-# LINE 213 "src-ag/Order.ag" #-}+ if _maptolocal+ then Seq.singleton (cRuleTerminal name_ _lhsInt _lhsIcon tp_)+ else Seq.fromList [ cRuleRhsSyn syn _lhsInt _lhsIcon tp name_ (getNtName tp_) | (syn,tp) <- Map.assocs _syn ]+ {-# LINE 355 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 345, column 12)+ _lhsOcollectChildrenSyns =+ ({-# LINE 345 "src-ag/Order.ag" #-}+ Map.singleton name_ _syn+ {-# LINE 361 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 346, column 12)+ _lhsOcollectChildrenInhs =+ ({-# LINE 346 "src-ag/Order.ag" #-}+ Map.singleton name_ _inh+ {-# LINE 367 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 614, column 11)+ _lhsOsinglevisits =+ ({-# LINE 614 "src-ag/Order.ag" #-}+ if _maptolocal+ then []+ else [CChildVisit name_ (getNtName tp_) 0 _inh _syn True]+ {-# LINE 375 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 639, column 11)+ _lhsOterminals =+ ({-# LINE 639 "src-ag/Order.ag" #-}+ if _maptolocal+ then [name_]+ else []+ {-# LINE 383 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 668, column 11)+ _lhsOattributes =+ ({-# LINE 668 "src-ag/Order.ag" #-}+ [(name_, _inh , _syn )]+ {-# LINE 389 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 672, column 11)+ _lhsOfield =+ ({-# LINE 672 "src-ag/Order.ag" #-}+ (name_, tp_, kind_)+ {-# LINE 395 "dist/build/Order" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 19, column 11)+ _chnt =+ ({-# LINE 19 "src-ag/DistChildAttr.ag" #-}+ case tp_ of+ NT nt _ _ -> nt+ Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")+ Haskell t -> identifier ""+ {-# LINE 404 "dist/build/Order" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 23, column 11)+ _inh =+ ({-# LINE 23 "src-ag/DistChildAttr.ag" #-}+ Map.findWithDefault Map.empty _chnt _lhsIinhMap+ {-# LINE 410 "dist/build/Order" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 24, column 11)+ _syn =+ ({-# LINE 24 "src-ag/DistChildAttr.ag" #-}+ Map.findWithDefault Map.empty _chnt _lhsIsynMap+ {-# LINE 416 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 422 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 207, column 23)+ _lhsOgathRules =+ ({-# LINE 207 "src-ag/Order.ag" #-}+ _gathRules+ {-# LINE 428 "dist/build/Order" #-}+ )+ in ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfield,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals))))+-- Children ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allfields : [(Identifier,Type,ChildKind)]+ allnts : [Identifier]+ attrs : [(Identifier,Identifier)]+ con : Identifier+ inh : Attributes+ inhMap : Map Identifier Attributes+ mergeMap : Map Identifier (Identifier,[Identifier])+ nt : Identifier+ o_unbox : Bool+ syn : Attributes+ synMap : Map Identifier Attributes+ synthesized attributes:+ attributes : [(Identifier,Attributes,Attributes)]+ collectChildrenInhs : Map Identifier Attributes + collectChildrenSyns : Map Identifier Attributes + errors : Seq Error+ fields : [(Identifier,Type,ChildKind)]+ gathAltAttrs : [AltAttr]+ gathRules : Seq CRule+ inhs : Seq (Identifier,Attributes)+ nts : Seq (Identifier,NontermIdent)+ singlevisits : [CRule]+ terminals : [Identifier]+ alternatives:+ alternative Cons:+ child hd : Child + child tl : Children + alternative Nil:+-}+-- cata+sem_Children :: Children ->+ T_Children+sem_Children list =+ (Prelude.foldr sem_Children_Cons sem_Children_Nil (Prelude.map sem_Child list))+-- semantic domain+newtype T_Children = T_Children (([(Identifier,Type,ChildKind)]) ->+ ([Identifier]) ->+ ([(Identifier,Identifier)]) ->+ Identifier ->+ Attributes ->+ (Map Identifier Attributes) ->+ (Map Identifier (Identifier,[Identifier])) ->+ Identifier ->+ Bool ->+ Attributes ->+ (Map Identifier Attributes) ->+ ( ([(Identifier,Attributes,Attributes)]),(Map Identifier Attributes ),(Map Identifier Attributes ),(Seq Error),([(Identifier,Type,ChildKind)]),([AltAttr]),(Seq CRule),(Seq (Identifier,Attributes)),(Seq (Identifier,NontermIdent)),([CRule]),([Identifier])))+data Inh_Children = Inh_Children {allfields_Inh_Children :: !(([(Identifier,Type,ChildKind)])),allnts_Inh_Children :: !(([Identifier])),attrs_Inh_Children :: !(([(Identifier,Identifier)])),con_Inh_Children :: !(Identifier),inh_Inh_Children :: !(Attributes),inhMap_Inh_Children :: !((Map Identifier Attributes)),mergeMap_Inh_Children :: !((Map Identifier (Identifier,[Identifier]))),nt_Inh_Children :: !(Identifier),o_unbox_Inh_Children :: !(Bool),syn_Inh_Children :: !(Attributes),synMap_Inh_Children :: !((Map Identifier Attributes))}+data Syn_Children = Syn_Children {attributes_Syn_Children :: !(([(Identifier,Attributes,Attributes)])),collectChildrenInhs_Syn_Children :: !((Map Identifier Attributes )),collectChildrenSyns_Syn_Children :: !((Map Identifier Attributes )),errors_Syn_Children :: !((Seq Error)),fields_Syn_Children :: !(([(Identifier,Type,ChildKind)])),gathAltAttrs_Syn_Children :: !(([AltAttr])),gathRules_Syn_Children :: !((Seq CRule)),inhs_Syn_Children :: !((Seq (Identifier,Attributes))),nts_Syn_Children :: !((Seq (Identifier,NontermIdent))),singlevisits_Syn_Children :: !(([CRule])),terminals_Syn_Children :: !(([Identifier]))}+wrap_Children :: T_Children ->+ Inh_Children ->+ Syn_Children+wrap_Children (T_Children sem) (Inh_Children _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap) =+ (let ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfields,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap+ in (Syn_Children _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfields _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals))+sem_Children_Cons :: T_Child ->+ T_Children ->+ T_Children+sem_Children_Cons (T_Child hd_) (T_Children tl_) =+ (T_Children (\ _lhsIallfields+ _lhsIallnts+ _lhsIattrs+ _lhsIcon+ _lhsIinh+ _lhsIinhMap+ _lhsImergeMap+ _lhsInt+ _lhsIo_unbox+ _lhsIsyn+ _lhsIsynMap ->+ (let _lhsOfields :: ([(Identifier,Type,ChildKind)])+ _lhsOattributes :: ([(Identifier,Attributes,Attributes)])+ _lhsOcollectChildrenInhs :: (Map Identifier Attributes )+ _lhsOcollectChildrenSyns :: (Map Identifier Attributes )+ _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOgathRules :: (Seq CRule)+ _lhsOinhs :: (Seq (Identifier,Attributes))+ _lhsOnts :: (Seq (Identifier,NontermIdent))+ _lhsOsinglevisits :: ([CRule])+ _lhsOterminals :: ([Identifier])+ _hdOallfields :: ([(Identifier,Type,ChildKind)])+ _hdOallnts :: ([Identifier])+ _hdOattrs :: ([(Identifier,Identifier)])+ _hdOcon :: Identifier+ _hdOinh :: Attributes+ _hdOinhMap :: (Map Identifier Attributes)+ _hdOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _hdOnt :: Identifier+ _hdOo_unbox :: Bool+ _hdOsyn :: Attributes+ _hdOsynMap :: (Map Identifier Attributes)+ _tlOallfields :: ([(Identifier,Type,ChildKind)])+ _tlOallnts :: ([Identifier])+ _tlOattrs :: ([(Identifier,Identifier)])+ _tlOcon :: Identifier+ _tlOinh :: Attributes+ _tlOinhMap :: (Map Identifier Attributes)+ _tlOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _tlOnt :: Identifier+ _tlOo_unbox :: Bool+ _tlOsyn :: Attributes+ _tlOsynMap :: (Map Identifier Attributes)+ _hdIattributes :: ([(Identifier,Attributes,Attributes)])+ _hdIcollectChildrenInhs :: (Map Identifier Attributes )+ _hdIcollectChildrenSyns :: (Map Identifier Attributes )+ _hdIerrors :: (Seq Error)+ _hdIfield :: ((Identifier,Type,ChildKind))+ _hdIgathAltAttrs :: ([AltAttr])+ _hdIgathRules :: (Seq CRule)+ _hdIinhs :: (Seq (Identifier,Attributes))+ _hdInts :: (Seq (Identifier,NontermIdent))+ _hdIsinglevisits :: ([CRule])+ _hdIterminals :: ([Identifier])+ _tlIattributes :: ([(Identifier,Attributes,Attributes)])+ _tlIcollectChildrenInhs :: (Map Identifier Attributes )+ _tlIcollectChildrenSyns :: (Map Identifier Attributes )+ _tlIerrors :: (Seq Error)+ _tlIfields :: ([(Identifier,Type,ChildKind)])+ _tlIgathAltAttrs :: ([AltAttr])+ _tlIgathRules :: (Seq CRule)+ _tlIinhs :: (Seq (Identifier,Attributes))+ _tlInts :: (Seq (Identifier,NontermIdent))+ _tlIsinglevisits :: ([CRule])+ _tlIterminals :: ([Identifier])+ -- "src-ag/Order.ag"(line 675, column 11)+ _lhsOfields =+ ({-# LINE 675 "src-ag/Order.ag" #-}+ _hdIfield : _tlIfields+ {-# LINE 564 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 666, column 32)+ _lhsOattributes =+ ({-# LINE 666 "src-ag/Order.ag" #-}+ _hdIattributes ++ _tlIattributes+ {-# LINE 570 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 343, column 68)+ _lhsOcollectChildrenInhs =+ ({-# LINE 343 "src-ag/Order.ag" #-}+ _hdIcollectChildrenInhs `Map.union` _tlIcollectChildrenInhs+ {-# LINE 576 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 343, column 68)+ _lhsOcollectChildrenSyns =+ ({-# LINE 343 "src-ag/Order.ag" #-}+ _hdIcollectChildrenSyns `Map.union` _tlIcollectChildrenSyns+ {-# LINE 582 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 588 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 171, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 171 "src-ag/Order.ag" #-}+ _hdIgathAltAttrs ++ _tlIgathAltAttrs+ {-# LINE 594 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 207, column 23)+ _lhsOgathRules =+ ({-# LINE 207 "src-ag/Order.ag" #-}+ _hdIgathRules Seq.>< _tlIgathRules+ {-# LINE 600 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 194, column 20)+ _lhsOinhs =+ ({-# LINE 194 "src-ag/Order.ag" #-}+ _hdIinhs Seq.>< _tlIinhs+ {-# LINE 606 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 193, column 19)+ _lhsOnts =+ ({-# LINE 193 "src-ag/Order.ag" #-}+ _hdInts Seq.>< _tlInts+ {-# LINE 612 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 612, column 40)+ _lhsOsinglevisits =+ ({-# LINE 612 "src-ag/Order.ag" #-}+ _hdIsinglevisits ++ _tlIsinglevisits+ {-# LINE 618 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 637, column 38)+ _lhsOterminals =+ ({-# LINE 637 "src-ag/Order.ag" #-}+ _hdIterminals ++ _tlIterminals+ {-# LINE 624 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOallfields =+ ({-# LINE 655 "src-ag/Order.ag" #-}+ _lhsIallfields+ {-# LINE 630 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOallnts =+ ({-# LINE 648 "src-ag/Order.ag" #-}+ _lhsIallnts+ {-# LINE 636 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOattrs =+ ({-# LINE 655 "src-ag/Order.ag" #-}+ _lhsIattrs+ {-# LINE 642 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOcon =+ ({-# LINE 91 "src-ag/Order.ag" #-}+ _lhsIcon+ {-# LINE 648 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIinh+ {-# LINE 654 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 660 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 361 "src-ag/Order.ag" #-}+ _lhsImergeMap+ {-# LINE 666 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsInt+ {-# LINE 672 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_unbox =+ ({-# LINE 120 "src-ag/Order.ag" #-}+ _lhsIo_unbox+ {-# LINE 678 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIsyn+ {-# LINE 684 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 690 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOallfields =+ ({-# LINE 655 "src-ag/Order.ag" #-}+ _lhsIallfields+ {-# LINE 696 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOallnts =+ ({-# LINE 648 "src-ag/Order.ag" #-}+ _lhsIallnts+ {-# LINE 702 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOattrs =+ ({-# LINE 655 "src-ag/Order.ag" #-}+ _lhsIattrs+ {-# LINE 708 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOcon =+ ({-# LINE 91 "src-ag/Order.ag" #-}+ _lhsIcon+ {-# LINE 714 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIinh+ {-# LINE 720 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 726 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 361 "src-ag/Order.ag" #-}+ _lhsImergeMap+ {-# LINE 732 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsInt+ {-# LINE 738 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_unbox =+ ({-# LINE 120 "src-ag/Order.ag" #-}+ _lhsIo_unbox+ {-# LINE 744 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIsyn+ {-# LINE 750 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 756 "dist/build/Order" #-}+ )+ ( _hdIattributes,_hdIcollectChildrenInhs,_hdIcollectChildrenSyns,_hdIerrors,_hdIfield,_hdIgathAltAttrs,_hdIgathRules,_hdIinhs,_hdInts,_hdIsinglevisits,_hdIterminals) =+ hd_ _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOinh _hdOinhMap _hdOmergeMap _hdOnt _hdOo_unbox _hdOsyn _hdOsynMap+ ( _tlIattributes,_tlIcollectChildrenInhs,_tlIcollectChildrenSyns,_tlIerrors,_tlIfields,_tlIgathAltAttrs,_tlIgathRules,_tlIinhs,_tlInts,_tlIsinglevisits,_tlIterminals) =+ tl_ _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOinh _tlOinhMap _tlOmergeMap _tlOnt _tlOo_unbox _tlOsyn _tlOsynMap+ in ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfields,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals))))+sem_Children_Nil :: T_Children+sem_Children_Nil =+ (T_Children (\ _lhsIallfields+ _lhsIallnts+ _lhsIattrs+ _lhsIcon+ _lhsIinh+ _lhsIinhMap+ _lhsImergeMap+ _lhsInt+ _lhsIo_unbox+ _lhsIsyn+ _lhsIsynMap ->+ (let _lhsOfields :: ([(Identifier,Type,ChildKind)])+ _lhsOattributes :: ([(Identifier,Attributes,Attributes)])+ _lhsOcollectChildrenInhs :: (Map Identifier Attributes )+ _lhsOcollectChildrenSyns :: (Map Identifier Attributes )+ _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOgathRules :: (Seq CRule)+ _lhsOinhs :: (Seq (Identifier,Attributes))+ _lhsOnts :: (Seq (Identifier,NontermIdent))+ _lhsOsinglevisits :: ([CRule])+ _lhsOterminals :: ([Identifier])+ -- "src-ag/Order.ag"(line 676, column 11)+ _lhsOfields =+ ({-# LINE 676 "src-ag/Order.ag" #-}+ []+ {-# LINE 791 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 666, column 32)+ _lhsOattributes =+ ({-# LINE 666 "src-ag/Order.ag" #-}+ []+ {-# LINE 797 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 343, column 68)+ _lhsOcollectChildrenInhs =+ ({-# LINE 343 "src-ag/Order.ag" #-}+ Map.empty+ {-# LINE 803 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 343, column 68)+ _lhsOcollectChildrenSyns =+ ({-# LINE 343 "src-ag/Order.ag" #-}+ Map.empty+ {-# LINE 809 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 815 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 171, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 171 "src-ag/Order.ag" #-}+ []+ {-# LINE 821 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 207, column 23)+ _lhsOgathRules =+ ({-# LINE 207 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 827 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 194, column 20)+ _lhsOinhs =+ ({-# LINE 194 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 833 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 193, column 19)+ _lhsOnts =+ ({-# LINE 193 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 839 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 612, column 40)+ _lhsOsinglevisits =+ ({-# LINE 612 "src-ag/Order.ag" #-}+ []+ {-# LINE 845 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 637, column 38)+ _lhsOterminals =+ ({-# LINE 637 "src-ag/Order.ag" #-}+ []+ {-# LINE 851 "dist/build/Order" #-}+ )+ in ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfields,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals))))+-- Expression --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allfields : [(Identifier,Type,ChildKind)]+ allnts : [Identifier]+ attrs : [(Identifier,Identifier)]+ con : Identifier+ mergeMap : Map Identifier (Identifier,[Identifier])+ nt : Identifier+ synthesized attributes:+ allRhsVars : Set (Identifier,Identifier)+ copy : Expression + errors : Seq Error+ textLines : [String]+ usedAttrs : [(Identifier,Identifier)]+ usedFields : [Identifier]+ usedLocals : [Identifier]+ alternatives:+ alternative Expression:+ child pos : {Pos}+ child tks : {[HsToken]}+ visit 0:+ local textLines : _+ local usedAttrs : _+ local usedLocals : _+ local usedFields : _+ local copy : _+-}+-- cata+sem_Expression :: Expression ->+ T_Expression+sem_Expression (Expression _pos _tks) =+ (sem_Expression_Expression _pos _tks)+-- semantic domain+newtype T_Expression = T_Expression (([(Identifier,Type,ChildKind)]) ->+ ([Identifier]) ->+ ([(Identifier,Identifier)]) ->+ Identifier ->+ (Map Identifier (Identifier,[Identifier])) ->+ Identifier ->+ ( (Set (Identifier,Identifier)),Expression,(Seq Error),([String]),([(Identifier,Identifier)]),([Identifier]),([Identifier])))+data Inh_Expression = Inh_Expression {allfields_Inh_Expression :: !(([(Identifier,Type,ChildKind)])),allnts_Inh_Expression :: !(([Identifier])),attrs_Inh_Expression :: !(([(Identifier,Identifier)])),con_Inh_Expression :: !(Identifier),mergeMap_Inh_Expression :: !((Map Identifier (Identifier,[Identifier]))),nt_Inh_Expression :: !(Identifier)}+data Syn_Expression = Syn_Expression {allRhsVars_Syn_Expression :: !((Set (Identifier,Identifier))),copy_Syn_Expression :: !(Expression),errors_Syn_Expression :: !((Seq Error)),textLines_Syn_Expression :: !(([String])),usedAttrs_Syn_Expression :: !(([(Identifier,Identifier)])),usedFields_Syn_Expression :: !(([Identifier])),usedLocals_Syn_Expression :: !(([Identifier]))}+wrap_Expression :: T_Expression ->+ Inh_Expression ->+ Syn_Expression+wrap_Expression (T_Expression sem) (Inh_Expression _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt) =+ (let ( _lhsOallRhsVars,_lhsOcopy,_lhsOerrors,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt+ in (Syn_Expression _lhsOallRhsVars _lhsOcopy _lhsOerrors _lhsOtextLines _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals))+sem_Expression_Expression :: Pos ->+ ([HsToken]) ->+ T_Expression+sem_Expression_Expression pos_ tks_ =+ (T_Expression (\ _lhsIallfields+ _lhsIallnts+ _lhsIattrs+ _lhsIcon+ _lhsImergeMap+ _lhsInt ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOallRhsVars :: (Set (Identifier,Identifier))+ _lhsOcopy :: Expression+ _lhsOtextLines :: ([String])+ _lhsOusedAttrs :: ([(Identifier,Identifier)])+ _lhsOusedFields :: ([Identifier])+ _lhsOusedLocals :: ([Identifier])+ -- "src-ag/Order.ag"(line 465, column 21)+ (_textLines,_usedAttrs,_usedLocals,_usedFields) =+ ({-# LINE 465 "src-ag/Order.ag" #-}+ let mergedChildren = [ x | (_,xs) <- Map.elems _lhsImergeMap, x <- xs ]+ attrsIn = filter (\(fld,_) -> not (fld `elem` mergedChildren)) _lhsIattrs+ inherited = Inh_HsTokensRoot+ { attrs_Inh_HsTokensRoot = attrsIn+ , con_Inh_HsTokensRoot = _lhsIcon+ , allfields_Inh_HsTokensRoot = _lhsIallfields+ , allnts_Inh_HsTokensRoot = _lhsIallnts+ , nt_Inh_HsTokensRoot = _lhsInt+ }+ synthesized = wrap_HsTokensRoot (sem_HsTokensRoot (HsTokensRoot tks_)) inherited+ in case synthesized of+ Syn_HsTokensRoot+ { textLines_Syn_HsTokensRoot = textLines+ , usedAttrs_Syn_HsTokensRoot = usedAttrs+ , usedLocals_Syn_HsTokensRoot = usedLocals+ , usedFields_Syn_HsTokensRoot = usedFields+ } -> let extraAttrs = [ (src,attr)+ | (fld,attr) <- usedAttrs, let mbMerged = Map.lookup fld _lhsImergeMap, isJust mbMerged+ , let (Just (_, srcs)) = mbMerged, src <- srcs ]+ usedAttrs' = usedAttrs ++ extraAttrs+ in (textLines,usedAttrs',usedLocals,usedFields)+ {-# LINE 945 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 488, column 17)+ _lhsOerrors =+ ({-# LINE 488 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 951 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 489, column 17)+ _lhsOallRhsVars =+ ({-# LINE 489 "src-ag/Order.ag" #-}+ Set.fromList _usedAttrs+ `Set.union`+ Set.fromList [ (_LOC, l) | l <- _usedLocals ]+ `Set.union`+ Set.fromList [ (_FIELD, fld) | fld <- _usedFields ]+ {-# LINE 961 "dist/build/Order" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 456 "src-ag/Order.ag" #-}+ Expression pos_ tks_+ {-# LINE 967 "dist/build/Order" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 456 "src-ag/Order.ag" #-}+ _copy+ {-# LINE 973 "dist/build/Order" #-}+ )+ -- copy rule (from local)+ _lhsOtextLines =+ ({-# LINE 455 "src-ag/Order.ag" #-}+ _textLines+ {-# LINE 979 "dist/build/Order" #-}+ )+ -- copy rule (from local)+ _lhsOusedAttrs =+ ({-# LINE 453 "src-ag/Order.ag" #-}+ _usedAttrs+ {-# LINE 985 "dist/build/Order" #-}+ )+ -- copy rule (from local)+ _lhsOusedFields =+ ({-# LINE 454 "src-ag/Order.ag" #-}+ _usedFields+ {-# LINE 991 "dist/build/Order" #-}+ )+ -- copy rule (from local)+ _lhsOusedLocals =+ ({-# LINE 452 "src-ag/Order.ag" #-}+ _usedLocals+ {-# LINE 997 "dist/build/Order" #-}+ )+ in ( _lhsOallRhsVars,_lhsOcopy,_lhsOerrors,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))))+-- Grammar -----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attributes:+ errors : Seq Error+ nAutoRules : Int+ nExplicitRules : Int+ output : CGrammar+ alternatives:+ alternative Grammar:+ child typeSyns : {TypeSyns}+ child useMap : {UseMap}+ child derivings : {Derivings}+ child wrappers : {Set NontermIdent}+ child nonts : Nonterminals + child pragmas : {PragmaMap}+ child manualAttrOrderMap : {AttrOrderMap}+ child paramMap : {ParamMap}+ child contextMap : {ContextMap}+ child quantMap : {QuantMap}+ child uniqueMap : {UniqueMap}+ child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}+ visit 0:+ local o_dovisit : _+ local ruleTable : _+ local attrTable : _+ local attrVertex : _+ local tdpToTds : _+ local tdsToTdp : _+ local directDep : _+ local instDep : _+ local aroundDep : _+ local mergeDep : _+ local info : _+ local cInterfaceMap : _+ local cVisitsMap : _+ local cyclesErrors : _+ local aroundMap : _+ local mergeMap : _+-}+-- cata+sem_Grammar :: Grammar ->+ T_Grammar+sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap) =+ (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts) _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap)+-- semantic domain+newtype T_Grammar = T_Grammar (Options ->+ ( (Seq Error),Int,Int,CGrammar))+data Inh_Grammar = Inh_Grammar {options_Inh_Grammar :: !(Options)}+data Syn_Grammar = Syn_Grammar {errors_Syn_Grammar :: !((Seq Error)),nAutoRules_Syn_Grammar :: !(Int),nExplicitRules_Syn_Grammar :: !(Int),output_Syn_Grammar :: !(CGrammar)}+wrap_Grammar :: T_Grammar ->+ Inh_Grammar ->+ Syn_Grammar+wrap_Grammar (T_Grammar sem) (Inh_Grammar _lhsIoptions) =+ (let ( _lhsOerrors,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOoutput) = sem _lhsIoptions+ in (Syn_Grammar _lhsOerrors _lhsOnAutoRules _lhsOnExplicitRules _lhsOoutput))+sem_Grammar_Grammar :: TypeSyns ->+ UseMap ->+ Derivings ->+ (Set NontermIdent) ->+ T_Nonterminals ->+ PragmaMap ->+ AttrOrderMap ->+ ParamMap ->+ ContextMap ->+ QuantMap ->+ UniqueMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->+ T_Grammar+sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_ =+ (T_Grammar (\ _lhsIoptions ->+ (let _nontsOo_cata :: Bool+ _nontsOo_data :: Bool+ _nontsOo_sig :: Bool+ _nontsOo_sem :: Bool+ _nontsOo_rename :: Bool+ _nontsOo_newtypes :: Bool+ _nontsOo_wantvisit :: Bool+ _nontsOo_unbox :: Bool+ _nontsOo_case :: Bool+ _nontsOprefix :: String+ _nontsOvcount :: Int+ _nontsOmanualAttrDepMap :: AttrOrderMap+ _nontsOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))+ _nontsOacount :: Int+ _lhsOerrors :: (Seq Error)+ _lhsOoutput :: CGrammar+ _nontsOallnts :: ([Identifier])+ _nontsOinhMap :: (Map Identifier Attributes)+ _nontsOsynMap :: (Map Identifier Attributes)+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ _nontsOcInterfaceMap :: CInterfaceMap+ _nontsOcVisitsMap :: CVisitsMap+ _nontsOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))+ _nontsOo_dovisit :: Bool+ _nontsIacount :: Int+ _nontsIadditionalDep :: (Seq Edge)+ _nontsIaranges :: (Seq (Int,Int,Int))+ _nontsIaroundDep :: (Seq Edge)+ _nontsIcNonterminals :: CNonterminals+ _nontsIdirectDep :: (Seq Edge)+ _nontsIerrors :: (Seq Error)+ _nontsIinhMap' :: (Map Identifier Attributes)+ _nontsIinstDep :: (Seq Edge)+ _nontsImergeDep :: (Seq Edge)+ _nontsInAutoRules :: Int+ _nontsInExplicitRules :: Int+ _nontsInonts :: ([(NontermIdent,[ConstructorIdent])])+ _nontsIntattrs :: (Seq (Vertex,NTAttr))+ _nontsIrules :: (Seq (Vertex,CRule))+ _nontsIsynMap' :: (Map Identifier Attributes)+ _nontsIvcount :: Int+ -- "src-ag/Order.ag"(line 124, column 17)+ _o_dovisit =+ ({-# LINE 124 "src-ag/Order.ag" #-}+ visit _lhsIoptions && null _cyclesErrors+ {-# LINE 1123 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 125, column 17)+ _nontsOo_cata =+ ({-# LINE 125 "src-ag/Order.ag" #-}+ folds _lhsIoptions+ {-# LINE 1129 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 125, column 17)+ _nontsOo_data =+ ({-# LINE 126 "src-ag/Order.ag" #-}+ dataTypes _lhsIoptions+ {-# LINE 1135 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 125, column 17)+ _nontsOo_sig =+ ({-# LINE 127 "src-ag/Order.ag" #-}+ typeSigs _lhsIoptions+ {-# LINE 1141 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 125, column 17)+ _nontsOo_sem =+ ({-# LINE 128 "src-ag/Order.ag" #-}+ semfuns _lhsIoptions+ {-# LINE 1147 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 125, column 17)+ _nontsOo_rename =+ ({-# LINE 129 "src-ag/Order.ag" #-}+ rename _lhsIoptions+ {-# LINE 1153 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 125, column 17)+ _nontsOo_newtypes =+ ({-# LINE 130 "src-ag/Order.ag" #-}+ newtypes _lhsIoptions+ {-# LINE 1159 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 125, column 17)+ _nontsOo_wantvisit =+ ({-# LINE 131 "src-ag/Order.ag" #-}+ visit _lhsIoptions+ {-# LINE 1165 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 125, column 17)+ _nontsOo_unbox =+ ({-# LINE 132 "src-ag/Order.ag" #-}+ unbox _lhsIoptions+ {-# LINE 1171 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 125, column 17)+ _nontsOo_case =+ ({-# LINE 133 "src-ag/Order.ag" #-}+ cases _lhsIoptions+ {-# LINE 1177 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 125, column 17)+ _nontsOprefix =+ ({-# LINE 134 "src-ag/Order.ag" #-}+ prefix _lhsIoptions+ {-# LINE 1183 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 260, column 15)+ _nontsOvcount =+ ({-# LINE 260 "src-ag/Order.ag" #-}+ 0+ {-# LINE 1189 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 286, column 7)+ _nontsOmanualAttrDepMap =+ ({-# LINE 286 "src-ag/Order.ag" #-}+ manualAttrOrderMap_+ {-# LINE 1195 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 415, column 14)+ _nontsOaroundMap =+ ({-# LINE 415 "src-ag/Order.ag" #-}+ aroundsMap_+ {-# LINE 1201 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 504, column 13)+ _nontsOacount =+ ({-# LINE 504 "src-ag/Order.ag" #-}+ 0+ {-# LINE 1207 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 542, column 13)+ _ruleTable =+ ({-# LINE 542 "src-ag/Order.ag" #-}+ Array.array (0,_nontsIvcount-1) (toList _nontsIrules)+ {-# LINE 1213 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 543, column 13)+ _attrTable =+ ({-# LINE 543 "src-ag/Order.ag" #-}+ Array.array (0,_nontsIacount-1) (toList _nontsIntattrs)+ {-# LINE 1219 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 544, column 13)+ _attrVertex =+ ({-# LINE 544 "src-ag/Order.ag" #-}+ Map.fromList (map swap (toList _nontsIntattrs))+ {-# LINE 1225 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 545, column 13)+ _tdpToTds =+ ({-# LINE 545 "src-ag/Order.ag" #-}+ [ (s, maybe (-1) (\v -> findWithErr1 "Grammar.tdpToTds" v _attrVertex) (ntattr cr))+ | (s,cr) <- toList _nontsIrules]+ {-# LINE 1232 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 547, column 13)+ _tdsToTdp =+ ({-# LINE 547 "src-ag/Order.ag" #-}+ let eq (_,v) (_,v') = v == v'+ conv ((s,v):svs) | v == -1 = Nothing+ | otherwise = Just (v,s:map fst svs)+ in mapMaybe conv (eqClasses eq _tdpToTds)+ {-# LINE 1241 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 551, column 13)+ _directDep =+ ({-# LINE 551 "src-ag/Order.ag" #-}+ toList (_nontsIdirectDep Seq.>< _nontsIadditionalDep)+ {-# LINE 1247 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 552, column 13)+ _instDep =+ ({-# LINE 552 "src-ag/Order.ag" #-}+ toList _nontsIinstDep+ {-# LINE 1253 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 553, column 13)+ _aroundDep =+ ({-# LINE 553 "src-ag/Order.ag" #-}+ toList _nontsIaroundDep+ {-# LINE 1259 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 554, column 13)+ _mergeDep =+ ({-# LINE 554 "src-ag/Order.ag" #-}+ toList _nontsImergeDep+ {-# LINE 1265 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 555, column 13)+ _info =+ ({-# LINE 555 "src-ag/Order.ag" #-}+ let def [] = -1+ def (v:vs) = v+ in Info { tdsToTdp = Array.array (0,_nontsIacount-1) _tdsToTdp+ , tdpToTds = Array.array (0,_nontsIvcount-1) _tdpToTds+ , attrTable = _attrTable+ , ruleTable = _ruleTable+ , lmh = toList _nontsIaranges+ , nonts = _nontsInonts+ , wraps = wrappers_+ }+ {-# LINE 1280 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 566, column 17)+ (_cInterfaceMap,_cVisitsMap,_cyclesErrors) =+ ({-# LINE 566 "src-ag/Order.ag" #-}+ case computeSequential _info _directDep (_instDep ++ _aroundDep ++ _mergeDep ) of+ CycleFree cim cvm -> ( cim+ , cvm+ , []+ )+ LocalCycle errs -> ( error "No interfaces for AG with local cycles"+ , error "No visit sub-sequences for AG with local cycles"+ , map (localCycleErr _ruleTable (visit _lhsIoptions)) errs+ )+ InstCycle errs -> ( error "No interfaces for AG with cycles through insts"+ , error "No visit sub-sequences for AG with cycles through insts"+ , map (instCycleErr _ruleTable (visit _lhsIoptions)) errs+ )+ DirectCycle errs -> ( error "No interfaces for AG with direct cycles"+ , error "No visit sub-sequences for AG with direct cycles"+ , directCycleErrs _attrTable _ruleTable (visit _lhsIoptions) errs+ )+ InducedCycle cim errs -> ( cim+ , error "No visit sub-sequences for AG with induced cycles"+ , inducedCycleErrs _attrTable _ruleTable cim errs+ )+ {-# LINE 1306 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 588, column 13)+ _lhsOerrors =+ ({-# LINE 588 "src-ag/Order.ag" #-}+ (if withCycle _lhsIoptions then Seq.fromList _cyclesErrors else Seq.empty)+ Seq.>< _nontsIerrors+ {-# LINE 1313 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 620, column 15)+ _lhsOoutput =+ ({-# LINE 620 "src-ag/Order.ag" #-}+ CGrammar typeSyns_ derivings_ wrappers_ _nontsIcNonterminals pragmas_ paramMap_ contextMap_ quantMap_ _aroundMap _mergeMap _o_dovisit+ {-# LINE 1319 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 633, column 14)+ _aroundMap =+ ({-# LINE 633 "src-ag/Order.ag" #-}+ Map.map (Map.map Map.keysSet) aroundsMap_+ {-# LINE 1325 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 634, column 14)+ _mergeMap =+ ({-# LINE 634 "src-ag/Order.ag" #-}+ Map.map (Map.map (Map.map (\(nt,srcs,_) -> (nt,srcs)))) mergeMap_+ {-# LINE 1331 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 651, column 13)+ _nontsOallnts =+ ({-# LINE 651 "src-ag/Order.ag" #-}+ map fst (_nontsInonts)+ {-# LINE 1337 "dist/build/Order" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 15, column 13)+ _nontsOinhMap =+ ({-# LINE 15 "src-ag/DistChildAttr.ag" #-}+ _nontsIinhMap'+ {-# LINE 1343 "dist/build/Order" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 16, column 13)+ _nontsOsynMap =+ ({-# LINE 16 "src-ag/DistChildAttr.ag" #-}+ _nontsIsynMap'+ {-# LINE 1349 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnAutoRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ _nontsInAutoRules+ {-# LINE 1355 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ _nontsInExplicitRules+ {-# LINE 1361 "dist/build/Order" #-}+ )+ -- copy rule (from local)+ _nontsOcInterfaceMap =+ ({-# LINE 595 "src-ag/Order.ag" #-}+ _cInterfaceMap+ {-# LINE 1367 "dist/build/Order" #-}+ )+ -- copy rule (from local)+ _nontsOcVisitsMap =+ ({-# LINE 602 "src-ag/Order.ag" #-}+ _cVisitsMap+ {-# LINE 1373 "dist/build/Order" #-}+ )+ -- copy rule (from local)+ _nontsOmergeMap =+ ({-# LINE 353 "src-ag/Order.ag" #-}+ _mergeMap+ {-# LINE 1379 "dist/build/Order" #-}+ )+ -- copy rule (from local)+ _nontsOo_dovisit =+ ({-# LINE 117 "src-ag/Order.ag" #-}+ _o_dovisit+ {-# LINE 1385 "dist/build/Order" #-}+ )+ ( _nontsIacount,_nontsIadditionalDep,_nontsIaranges,_nontsIaroundDep,_nontsIcNonterminals,_nontsIdirectDep,_nontsIerrors,_nontsIinhMap',_nontsIinstDep,_nontsImergeDep,_nontsInAutoRules,_nontsInExplicitRules,_nontsInonts,_nontsIntattrs,_nontsIrules,_nontsIsynMap',_nontsIvcount) =+ nonts_ _nontsOacount _nontsOallnts _nontsOaroundMap _nontsOcInterfaceMap _nontsOcVisitsMap _nontsOinhMap _nontsOmanualAttrDepMap _nontsOmergeMap _nontsOo_case _nontsOo_cata _nontsOo_data _nontsOo_dovisit _nontsOo_newtypes _nontsOo_rename _nontsOo_sem _nontsOo_sig _nontsOo_unbox _nontsOo_wantvisit _nontsOprefix _nontsOsynMap _nontsOvcount+ in ( _lhsOerrors,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOoutput))))+-- Nonterminal -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allnts : [Identifier]+ aroundMap : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ cInterfaceMap : CInterfaceMap+ cVisitsMap : CVisitsMap+ inhMap : Map Identifier Attributes+ manualAttrDepMap : AttrOrderMap+ mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))+ o_case : Bool+ o_cata : Bool+ o_data : Bool+ o_dovisit : Bool+ o_newtypes : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_unbox : Bool+ o_wantvisit : Bool+ prefix : String+ synMap : Map Identifier Attributes+ chained attributes:+ acount : Int+ vcount : Int+ synthesized attributes:+ additionalDep : Seq Edge+ aranges : Seq (Int,Int,Int)+ aroundDep : Seq Edge+ cNonterminal : CNonterminal+ directDep : Seq Edge+ errors : Seq Error+ inhMap' : Map Identifier Attributes+ instDep : Seq Edge+ mergeDep : Seq Edge+ nAutoRules : Int+ nExplicitRules : Int+ nonts : [(NontermIdent,[ConstructorIdent])]+ ntattrs : Seq (Vertex,NTAttr)+ rules : Seq (Vertex,CRule)+ synMap' : Map Identifier Attributes+ alternatives:+ alternative Nonterminal:+ child nt : {NontermIdent}+ child params : {[Identifier]}+ child inh : {Attributes}+ child syn : {Attributes}+ child prods : Productions + visit 0:+ local mergeMap : _+ local aroundMap : _+ local ntattrs : _+ local cInter : _+-}+-- cata+sem_Nonterminal :: Nonterminal ->+ T_Nonterminal+sem_Nonterminal (Nonterminal _nt _params _inh _syn _prods) =+ (sem_Nonterminal_Nonterminal _nt _params _inh _syn (sem_Productions _prods))+-- semantic domain+newtype T_Nonterminal = T_Nonterminal (Int ->+ ([Identifier]) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ CInterfaceMap ->+ CVisitsMap ->+ (Map Identifier Attributes) ->+ AttrOrderMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ String ->+ (Map Identifier Attributes) ->+ Int ->+ ( Int,(Seq Edge),(Seq (Int,Int,Int)),(Seq Edge),CNonterminal,(Seq Edge),(Seq Error),(Map Identifier Attributes),(Seq Edge),(Seq Edge),Int,Int,([(NontermIdent,[ConstructorIdent])]),(Seq (Vertex,NTAttr)),(Seq (Vertex,CRule)),(Map Identifier Attributes),Int))+data Inh_Nonterminal = Inh_Nonterminal {acount_Inh_Nonterminal :: !(Int),allnts_Inh_Nonterminal :: !(([Identifier])),aroundMap_Inh_Nonterminal :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))),cInterfaceMap_Inh_Nonterminal :: !(CInterfaceMap),cVisitsMap_Inh_Nonterminal :: !(CVisitsMap),inhMap_Inh_Nonterminal :: !((Map Identifier Attributes)),manualAttrDepMap_Inh_Nonterminal :: !(AttrOrderMap),mergeMap_Inh_Nonterminal :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))),o_case_Inh_Nonterminal :: !(Bool),o_cata_Inh_Nonterminal :: !(Bool),o_data_Inh_Nonterminal :: !(Bool),o_dovisit_Inh_Nonterminal :: !(Bool),o_newtypes_Inh_Nonterminal :: !(Bool),o_rename_Inh_Nonterminal :: !(Bool),o_sem_Inh_Nonterminal :: !(Bool),o_sig_Inh_Nonterminal :: !(Bool),o_unbox_Inh_Nonterminal :: !(Bool),o_wantvisit_Inh_Nonterminal :: !(Bool),prefix_Inh_Nonterminal :: !(String),synMap_Inh_Nonterminal :: !((Map Identifier Attributes)),vcount_Inh_Nonterminal :: !(Int)}+data Syn_Nonterminal = Syn_Nonterminal {acount_Syn_Nonterminal :: !(Int),additionalDep_Syn_Nonterminal :: !((Seq Edge)),aranges_Syn_Nonterminal :: !((Seq (Int,Int,Int))),aroundDep_Syn_Nonterminal :: !((Seq Edge)),cNonterminal_Syn_Nonterminal :: !(CNonterminal),directDep_Syn_Nonterminal :: !((Seq Edge)),errors_Syn_Nonterminal :: !((Seq Error)),inhMap'_Syn_Nonterminal :: !((Map Identifier Attributes)),instDep_Syn_Nonterminal :: !((Seq Edge)),mergeDep_Syn_Nonterminal :: !((Seq Edge)),nAutoRules_Syn_Nonterminal :: !(Int),nExplicitRules_Syn_Nonterminal :: !(Int),nonts_Syn_Nonterminal :: !(([(NontermIdent,[ConstructorIdent])])),ntattrs_Syn_Nonterminal :: !((Seq (Vertex,NTAttr))),rules_Syn_Nonterminal :: !((Seq (Vertex,CRule))),synMap'_Syn_Nonterminal :: !((Map Identifier Attributes)),vcount_Syn_Nonterminal :: !(Int)}+wrap_Nonterminal :: T_Nonterminal ->+ Inh_Nonterminal ->+ Syn_Nonterminal+wrap_Nonterminal (T_Nonterminal sem) (Inh_Nonterminal _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsynMap _lhsIvcount) =+ (let ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminal,_lhsOdirectDep,_lhsOerrors,_lhsOinhMap',_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOsynMap',_lhsOvcount) = sem _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsynMap _lhsIvcount+ in (Syn_Nonterminal _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminal _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount))+sem_Nonterminal_Nonterminal :: NontermIdent ->+ ([Identifier]) ->+ Attributes ->+ Attributes ->+ T_Productions ->+ T_Nonterminal+sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ (T_Productions prods_) =+ (T_Nonterminal (\ _lhsIacount+ _lhsIallnts+ _lhsIaroundMap+ _lhsIcInterfaceMap+ _lhsIcVisitsMap+ _lhsIinhMap+ _lhsImanualAttrDepMap+ _lhsImergeMap+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_data+ _lhsIo_dovisit+ _lhsIo_newtypes+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_unbox+ _lhsIo_wantvisit+ _lhsIprefix+ _lhsIsynMap+ _lhsIvcount ->+ (let _prodsOnt :: Identifier+ _prodsOinh :: Attributes+ _prodsOsyn :: Attributes+ _lhsOntattrs :: (Seq (Vertex,NTAttr))+ _lhsOacount :: Int+ _lhsOaranges :: (Seq (Int,Int,Int))+ _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])+ _lhsOcNonterminal :: CNonterminal+ _lhsOinhMap' :: (Map Identifier Attributes)+ _lhsOsynMap' :: (Map Identifier Attributes)+ _lhsOadditionalDep :: (Seq Edge)+ _lhsOaroundDep :: (Seq Edge)+ _lhsOdirectDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOinstDep :: (Seq Edge)+ _lhsOmergeDep :: (Seq Edge)+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ _lhsOrules :: (Seq (Vertex,CRule))+ _lhsOvcount :: Int+ _prodsOallnts :: ([Identifier])+ _prodsOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))+ _prodsOcVisitsMap :: CVisitsMap+ _prodsOinhMap :: (Map Identifier Attributes)+ _prodsOmanualAttrDepMap :: AttrOrderMap+ _prodsOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))+ _prodsOo_case :: Bool+ _prodsOo_cata :: Bool+ _prodsOo_dovisit :: Bool+ _prodsOo_newtypes :: Bool+ _prodsOo_rename :: Bool+ _prodsOo_sem :: Bool+ _prodsOo_sig :: Bool+ _prodsOo_unbox :: Bool+ _prodsOo_wantvisit :: Bool+ _prodsOprefix :: String+ _prodsOsynMap :: (Map Identifier Attributes)+ _prodsOvcount :: Int+ _prodsIadditionalDep :: (Seq Edge)+ _prodsIaroundDep :: (Seq Edge)+ _prodsIcProductions :: CProductions+ _prodsIcons :: ([ConstructorIdent])+ _prodsIdirectDep :: (Seq Edge)+ _prodsIerrors :: (Seq Error)+ _prodsIinstDep :: (Seq Edge)+ _prodsImergeDep :: (Seq Edge)+ _prodsInAutoRules :: Int+ _prodsInExplicitRules :: Int+ _prodsIrules :: (Seq (Vertex,CRule))+ _prodsIvcount :: Int+ -- "src-ag/Order.ag"(line 98, column 17)+ _prodsOnt =+ ({-# LINE 98 "src-ag/Order.ag" #-}+ nt_+ {-# LINE 1563 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 101, column 17)+ _prodsOinh =+ ({-# LINE 101 "src-ag/Order.ag" #-}+ inh_+ {-# LINE 1569 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 102, column 17)+ _prodsOsyn =+ ({-# LINE 102 "src-ag/Order.ag" #-}+ syn_+ {-# LINE 1575 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 358, column 32)+ _mergeMap =+ ({-# LINE 358 "src-ag/Order.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsImergeMap+ {-# LINE 1581 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 411, column 32)+ _aroundMap =+ ({-# LINE 411 "src-ag/Order.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIaroundMap+ {-# LINE 1587 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 507, column 17)+ _ntattrs =+ ({-# LINE 507 "src-ag/Order.ag" #-}+ [ NTAInh nt_ inh tp | (inh,tp) <- Map.assocs inh_ ]+ ++ [NTASyn nt_ syn tp | (syn,tp) <- Map.assocs syn_ ]+ {-# LINE 1594 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 509, column 17)+ _lhsOntattrs =+ ({-# LINE 509 "src-ag/Order.ag" #-}+ Seq.fromList (zip [_lhsIacount ..] _ntattrs)+ {-# LINE 1600 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 510, column 17)+ _lhsOacount =+ ({-# LINE 510 "src-ag/Order.ag" #-}+ _lhsIacount + Map.size inh_ + Map.size syn_+ {-# LINE 1606 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 511, column 17)+ _lhsOaranges =+ ({-# LINE 511 "src-ag/Order.ag" #-}+ Seq.singleton+ (_lhsIacount+ ,_lhsIacount + Map.size inh_+ ,_lhsIacount + Map.size syn_ + Map.size inh_ - 1)+ {-# LINE 1615 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 520, column 19)+ _lhsOnonts =+ ({-# LINE 520 "src-ag/Order.ag" #-}+ [(nt_,_prodsIcons)]+ {-# LINE 1621 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 597, column 19)+ _cInter =+ ({-# LINE 597 "src-ag/Order.ag" #-}+ if _lhsIo_dovisit+ then findWithErr1 "Nonterminal.cInter" nt_ _lhsIcInterfaceMap+ else CInterface [CSegment inh_ syn_]+ {-# LINE 1629 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 625, column 19)+ _lhsOcNonterminal =+ ({-# LINE 625 "src-ag/Order.ag" #-}+ CNonterminal nt_ params_ inh_ syn_ _prodsIcProductions _cInter+ {-# LINE 1635 "dist/build/Order" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 7, column 18)+ _lhsOinhMap' =+ ({-# LINE 7 "src-ag/DistChildAttr.ag" #-}+ Map.singleton nt_ inh_+ {-# LINE 1641 "dist/build/Order" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 8, column 18)+ _lhsOsynMap' =+ ({-# LINE 8 "src-ag/DistChildAttr.ag" #-}+ Map.singleton nt_ syn_+ {-# LINE 1647 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 282, column 60)+ _lhsOadditionalDep =+ ({-# LINE 282 "src-ag/Order.ag" #-}+ _prodsIadditionalDep+ {-# LINE 1653 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 403, column 24)+ _lhsOaroundDep =+ ({-# LINE 403 "src-ag/Order.ag" #-}+ _prodsIaroundDep+ {-# LINE 1659 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 268, column 33)+ _lhsOdirectDep =+ ({-# LINE 268 "src-ag/Order.ag" #-}+ _prodsIdirectDep+ {-# LINE 1665 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ _prodsIerrors+ {-# LINE 1671 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 311, column 31)+ _lhsOinstDep =+ ({-# LINE 311 "src-ag/Order.ag" #-}+ _prodsIinstDep+ {-# LINE 1677 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 366, column 18)+ _lhsOmergeDep =+ ({-# LINE 366 "src-ag/Order.ag" #-}+ _prodsImergeDep+ {-# LINE 1683 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnAutoRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ _prodsInAutoRules+ {-# LINE 1689 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ _prodsInExplicitRules+ {-# LINE 1695 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 258, column 18)+ _lhsOrules =+ ({-# LINE 258 "src-ag/Order.ag" #-}+ _prodsIrules+ {-# LINE 1701 "dist/build/Order" #-}+ )+ -- copy rule (up)+ _lhsOvcount =+ ({-# LINE 257 "src-ag/Order.ag" #-}+ _prodsIvcount+ {-# LINE 1707 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _prodsOallnts =+ ({-# LINE 648 "src-ag/Order.ag" #-}+ _lhsIallnts+ {-# LINE 1713 "dist/build/Order" #-}+ )+ -- copy rule (from local)+ _prodsOaroundMap =+ ({-# LINE 409 "src-ag/Order.ag" #-}+ _aroundMap+ {-# LINE 1719 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _prodsOcVisitsMap =+ ({-# LINE 602 "src-ag/Order.ag" #-}+ _lhsIcVisitsMap+ {-# LINE 1725 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _prodsOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 1731 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _prodsOmanualAttrDepMap =+ ({-# LINE 282 "src-ag/Order.ag" #-}+ _lhsImanualAttrDepMap+ {-# LINE 1737 "dist/build/Order" #-}+ )+ -- copy rule (from local)+ _prodsOmergeMap =+ ({-# LINE 356 "src-ag/Order.ag" #-}+ _mergeMap+ {-# LINE 1743 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _prodsOo_case =+ ({-# LINE 118 "src-ag/Order.ag" #-}+ _lhsIo_case+ {-# LINE 1749 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _prodsOo_cata =+ ({-# LINE 112 "src-ag/Order.ag" #-}+ _lhsIo_cata+ {-# LINE 1755 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _prodsOo_dovisit =+ ({-# LINE 117 "src-ag/Order.ag" #-}+ _lhsIo_dovisit+ {-# LINE 1761 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _prodsOo_newtypes =+ ({-# LINE 111 "src-ag/Order.ag" #-}+ _lhsIo_newtypes+ {-# LINE 1767 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _prodsOo_rename =+ ({-# LINE 115 "src-ag/Order.ag" #-}+ _lhsIo_rename+ {-# LINE 1773 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _prodsOo_sem =+ ({-# LINE 114 "src-ag/Order.ag" #-}+ _lhsIo_sem+ {-# LINE 1779 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _prodsOo_sig =+ ({-# LINE 113 "src-ag/Order.ag" #-}+ _lhsIo_sig+ {-# LINE 1785 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _prodsOo_unbox =+ ({-# LINE 120 "src-ag/Order.ag" #-}+ _lhsIo_unbox+ {-# LINE 1791 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _prodsOo_wantvisit =+ ({-# LINE 116 "src-ag/Order.ag" #-}+ _lhsIo_wantvisit+ {-# LINE 1797 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _prodsOprefix =+ ({-# LINE 119 "src-ag/Order.ag" #-}+ _lhsIprefix+ {-# LINE 1803 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _prodsOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 1809 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _prodsOvcount =+ ({-# LINE 257 "src-ag/Order.ag" #-}+ _lhsIvcount+ {-# LINE 1815 "dist/build/Order" #-}+ )+ ( _prodsIadditionalDep,_prodsIaroundDep,_prodsIcProductions,_prodsIcons,_prodsIdirectDep,_prodsIerrors,_prodsIinstDep,_prodsImergeDep,_prodsInAutoRules,_prodsInExplicitRules,_prodsIrules,_prodsIvcount) =+ prods_ _prodsOallnts _prodsOaroundMap _prodsOcVisitsMap _prodsOinh _prodsOinhMap _prodsOmanualAttrDepMap _prodsOmergeMap _prodsOnt _prodsOo_case _prodsOo_cata _prodsOo_dovisit _prodsOo_newtypes _prodsOo_rename _prodsOo_sem _prodsOo_sig _prodsOo_unbox _prodsOo_wantvisit _prodsOprefix _prodsOsyn _prodsOsynMap _prodsOvcount+ in ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminal,_lhsOdirectDep,_lhsOerrors,_lhsOinhMap',_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOsynMap',_lhsOvcount))))+-- Nonterminals ------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allnts : [Identifier]+ aroundMap : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ cInterfaceMap : CInterfaceMap+ cVisitsMap : CVisitsMap+ inhMap : Map Identifier Attributes+ manualAttrDepMap : AttrOrderMap+ mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))+ o_case : Bool+ o_cata : Bool+ o_data : Bool+ o_dovisit : Bool+ o_newtypes : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_unbox : Bool+ o_wantvisit : Bool+ prefix : String+ synMap : Map Identifier Attributes+ chained attributes:+ acount : Int+ vcount : Int+ synthesized attributes:+ additionalDep : Seq Edge+ aranges : Seq (Int,Int,Int)+ aroundDep : Seq Edge+ cNonterminals : CNonterminals+ directDep : Seq Edge+ errors : Seq Error+ inhMap' : Map Identifier Attributes+ instDep : Seq Edge+ mergeDep : Seq Edge+ nAutoRules : Int+ nExplicitRules : Int+ nonts : [(NontermIdent,[ConstructorIdent])]+ ntattrs : Seq (Vertex,NTAttr)+ rules : Seq (Vertex,CRule)+ synMap' : Map Identifier Attributes+ alternatives:+ alternative Cons:+ child hd : Nonterminal + child tl : Nonterminals + alternative Nil:+-}+-- cata+sem_Nonterminals :: Nonterminals ->+ T_Nonterminals+sem_Nonterminals list =+ (Prelude.foldr sem_Nonterminals_Cons sem_Nonterminals_Nil (Prelude.map sem_Nonterminal list))+-- semantic domain+newtype T_Nonterminals = T_Nonterminals (Int ->+ ([Identifier]) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ CInterfaceMap ->+ CVisitsMap ->+ (Map Identifier Attributes) ->+ AttrOrderMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ String ->+ (Map Identifier Attributes) ->+ Int ->+ ( Int,(Seq Edge),(Seq (Int,Int,Int)),(Seq Edge),CNonterminals,(Seq Edge),(Seq Error),(Map Identifier Attributes),(Seq Edge),(Seq Edge),Int,Int,([(NontermIdent,[ConstructorIdent])]),(Seq (Vertex,NTAttr)),(Seq (Vertex,CRule)),(Map Identifier Attributes),Int))+data Inh_Nonterminals = Inh_Nonterminals {acount_Inh_Nonterminals :: !(Int),allnts_Inh_Nonterminals :: !(([Identifier])),aroundMap_Inh_Nonterminals :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))),cInterfaceMap_Inh_Nonterminals :: !(CInterfaceMap),cVisitsMap_Inh_Nonterminals :: !(CVisitsMap),inhMap_Inh_Nonterminals :: !((Map Identifier Attributes)),manualAttrDepMap_Inh_Nonterminals :: !(AttrOrderMap),mergeMap_Inh_Nonterminals :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))),o_case_Inh_Nonterminals :: !(Bool),o_cata_Inh_Nonterminals :: !(Bool),o_data_Inh_Nonterminals :: !(Bool),o_dovisit_Inh_Nonterminals :: !(Bool),o_newtypes_Inh_Nonterminals :: !(Bool),o_rename_Inh_Nonterminals :: !(Bool),o_sem_Inh_Nonterminals :: !(Bool),o_sig_Inh_Nonterminals :: !(Bool),o_unbox_Inh_Nonterminals :: !(Bool),o_wantvisit_Inh_Nonterminals :: !(Bool),prefix_Inh_Nonterminals :: !(String),synMap_Inh_Nonterminals :: !((Map Identifier Attributes)),vcount_Inh_Nonterminals :: !(Int)}+data Syn_Nonterminals = Syn_Nonterminals {acount_Syn_Nonterminals :: !(Int),additionalDep_Syn_Nonterminals :: !((Seq Edge)),aranges_Syn_Nonterminals :: !((Seq (Int,Int,Int))),aroundDep_Syn_Nonterminals :: !((Seq Edge)),cNonterminals_Syn_Nonterminals :: !(CNonterminals),directDep_Syn_Nonterminals :: !((Seq Edge)),errors_Syn_Nonterminals :: !((Seq Error)),inhMap'_Syn_Nonterminals :: !((Map Identifier Attributes)),instDep_Syn_Nonterminals :: !((Seq Edge)),mergeDep_Syn_Nonterminals :: !((Seq Edge)),nAutoRules_Syn_Nonterminals :: !(Int),nExplicitRules_Syn_Nonterminals :: !(Int),nonts_Syn_Nonterminals :: !(([(NontermIdent,[ConstructorIdent])])),ntattrs_Syn_Nonterminals :: !((Seq (Vertex,NTAttr))),rules_Syn_Nonterminals :: !((Seq (Vertex,CRule))),synMap'_Syn_Nonterminals :: !((Map Identifier Attributes)),vcount_Syn_Nonterminals :: !(Int)}+wrap_Nonterminals :: T_Nonterminals ->+ Inh_Nonterminals ->+ Syn_Nonterminals+wrap_Nonterminals (T_Nonterminals sem) (Inh_Nonterminals _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsynMap _lhsIvcount) =+ (let ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminals,_lhsOdirectDep,_lhsOerrors,_lhsOinhMap',_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOsynMap',_lhsOvcount) = sem _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsynMap _lhsIvcount+ in (Syn_Nonterminals _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminals _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount))+sem_Nonterminals_Cons :: T_Nonterminal ->+ T_Nonterminals ->+ T_Nonterminals+sem_Nonterminals_Cons (T_Nonterminal hd_) (T_Nonterminals tl_) =+ (T_Nonterminals (\ _lhsIacount+ _lhsIallnts+ _lhsIaroundMap+ _lhsIcInterfaceMap+ _lhsIcVisitsMap+ _lhsIinhMap+ _lhsImanualAttrDepMap+ _lhsImergeMap+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_data+ _lhsIo_dovisit+ _lhsIo_newtypes+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_unbox+ _lhsIo_wantvisit+ _lhsIprefix+ _lhsIsynMap+ _lhsIvcount ->+ (let _lhsOcNonterminals :: CNonterminals+ _lhsOadditionalDep :: (Seq Edge)+ _lhsOaranges :: (Seq (Int,Int,Int))+ _lhsOaroundDep :: (Seq Edge)+ _lhsOdirectDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOinhMap' :: (Map Identifier Attributes)+ _lhsOinstDep :: (Seq Edge)+ _lhsOmergeDep :: (Seq Edge)+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])+ _lhsOntattrs :: (Seq (Vertex,NTAttr))+ _lhsOrules :: (Seq (Vertex,CRule))+ _lhsOsynMap' :: (Map Identifier Attributes)+ _lhsOacount :: Int+ _lhsOvcount :: Int+ _hdOacount :: Int+ _hdOallnts :: ([Identifier])+ _hdOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))+ _hdOcInterfaceMap :: CInterfaceMap+ _hdOcVisitsMap :: CVisitsMap+ _hdOinhMap :: (Map Identifier Attributes)+ _hdOmanualAttrDepMap :: AttrOrderMap+ _hdOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))+ _hdOo_case :: Bool+ _hdOo_cata :: Bool+ _hdOo_data :: Bool+ _hdOo_dovisit :: Bool+ _hdOo_newtypes :: Bool+ _hdOo_rename :: Bool+ _hdOo_sem :: Bool+ _hdOo_sig :: Bool+ _hdOo_unbox :: Bool+ _hdOo_wantvisit :: Bool+ _hdOprefix :: String+ _hdOsynMap :: (Map Identifier Attributes)+ _hdOvcount :: Int+ _tlOacount :: Int+ _tlOallnts :: ([Identifier])+ _tlOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))+ _tlOcInterfaceMap :: CInterfaceMap+ _tlOcVisitsMap :: CVisitsMap+ _tlOinhMap :: (Map Identifier Attributes)+ _tlOmanualAttrDepMap :: AttrOrderMap+ _tlOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))+ _tlOo_case :: Bool+ _tlOo_cata :: Bool+ _tlOo_data :: Bool+ _tlOo_dovisit :: Bool+ _tlOo_newtypes :: Bool+ _tlOo_rename :: Bool+ _tlOo_sem :: Bool+ _tlOo_sig :: Bool+ _tlOo_unbox :: Bool+ _tlOo_wantvisit :: Bool+ _tlOprefix :: String+ _tlOsynMap :: (Map Identifier Attributes)+ _tlOvcount :: Int+ _hdIacount :: Int+ _hdIadditionalDep :: (Seq Edge)+ _hdIaranges :: (Seq (Int,Int,Int))+ _hdIaroundDep :: (Seq Edge)+ _hdIcNonterminal :: CNonterminal+ _hdIdirectDep :: (Seq Edge)+ _hdIerrors :: (Seq Error)+ _hdIinhMap' :: (Map Identifier Attributes)+ _hdIinstDep :: (Seq Edge)+ _hdImergeDep :: (Seq Edge)+ _hdInAutoRules :: Int+ _hdInExplicitRules :: Int+ _hdInonts :: ([(NontermIdent,[ConstructorIdent])])+ _hdIntattrs :: (Seq (Vertex,NTAttr))+ _hdIrules :: (Seq (Vertex,CRule))+ _hdIsynMap' :: (Map Identifier Attributes)+ _hdIvcount :: Int+ _tlIacount :: Int+ _tlIadditionalDep :: (Seq Edge)+ _tlIaranges :: (Seq (Int,Int,Int))+ _tlIaroundDep :: (Seq Edge)+ _tlIcNonterminals :: CNonterminals+ _tlIdirectDep :: (Seq Edge)+ _tlIerrors :: (Seq Error)+ _tlIinhMap' :: (Map Identifier Attributes)+ _tlIinstDep :: (Seq Edge)+ _tlImergeDep :: (Seq Edge)+ _tlInAutoRules :: Int+ _tlInExplicitRules :: Int+ _tlInonts :: ([(NontermIdent,[ConstructorIdent])])+ _tlIntattrs :: (Seq (Vertex,NTAttr))+ _tlIrules :: (Seq (Vertex,CRule))+ _tlIsynMap' :: (Map Identifier Attributes)+ _tlIvcount :: Int+ -- "src-ag/Order.ag"(line 622, column 12)+ _lhsOcNonterminals =+ ({-# LINE 622 "src-ag/Order.ag" #-}+ _hdIcNonterminal : _tlIcNonterminals+ {-# LINE 2026 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 282, column 60)+ _lhsOadditionalDep =+ ({-# LINE 282 "src-ag/Order.ag" #-}+ _hdIadditionalDep Seq.>< _tlIadditionalDep+ {-# LINE 2032 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 501, column 36)+ _lhsOaranges =+ ({-# LINE 501 "src-ag/Order.ag" #-}+ _hdIaranges Seq.>< _tlIaranges+ {-# LINE 2038 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 403, column 24)+ _lhsOaroundDep =+ ({-# LINE 403 "src-ag/Order.ag" #-}+ _hdIaroundDep Seq.>< _tlIaroundDep+ {-# LINE 2044 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 268, column 33)+ _lhsOdirectDep =+ ({-# LINE 268 "src-ag/Order.ag" #-}+ _hdIdirectDep Seq.>< _tlIdirectDep+ {-# LINE 2050 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 2056 "dist/build/Order" #-}+ )+ -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)+ _lhsOinhMap' =+ ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ _hdIinhMap' `Map.union` _tlIinhMap'+ {-# LINE 2062 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 311, column 31)+ _lhsOinstDep =+ ({-# LINE 311 "src-ag/Order.ag" #-}+ _hdIinstDep Seq.>< _tlIinstDep+ {-# LINE 2068 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 366, column 18)+ _lhsOmergeDep =+ ({-# LINE 366 "src-ag/Order.ag" #-}+ _hdImergeDep Seq.>< _tlImergeDep+ {-# LINE 2074 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnAutoRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ _hdInAutoRules + _tlInAutoRules+ {-# LINE 2080 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ _hdInExplicitRules + _tlInExplicitRules+ {-# LINE 2086 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 518, column 43)+ _lhsOnonts =+ ({-# LINE 518 "src-ag/Order.ag" #-}+ _hdInonts ++ _tlInonts+ {-# LINE 2092 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 500, column 35)+ _lhsOntattrs =+ ({-# LINE 500 "src-ag/Order.ag" #-}+ _hdIntattrs Seq.>< _tlIntattrs+ {-# LINE 2098 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 258, column 18)+ _lhsOrules =+ ({-# LINE 258 "src-ag/Order.ag" #-}+ _hdIrules Seq.>< _tlIrules+ {-# LINE 2104 "dist/build/Order" #-}+ )+ -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)+ _lhsOsynMap' =+ ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ _hdIsynMap' `Map.union` _tlIsynMap'+ {-# LINE 2110 "dist/build/Order" #-}+ )+ -- copy rule (up)+ _lhsOacount =+ ({-# LINE 500 "src-ag/Order.ag" #-}+ _tlIacount+ {-# LINE 2116 "dist/build/Order" #-}+ )+ -- copy rule (up)+ _lhsOvcount =+ ({-# LINE 257 "src-ag/Order.ag" #-}+ _tlIvcount+ {-# LINE 2122 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOacount =+ ({-# LINE 500 "src-ag/Order.ag" #-}+ _lhsIacount+ {-# LINE 2128 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOallnts =+ ({-# LINE 648 "src-ag/Order.ag" #-}+ _lhsIallnts+ {-# LINE 2134 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOaroundMap =+ ({-# LINE 406 "src-ag/Order.ag" #-}+ _lhsIaroundMap+ {-# LINE 2140 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOcInterfaceMap =+ ({-# LINE 595 "src-ag/Order.ag" #-}+ _lhsIcInterfaceMap+ {-# LINE 2146 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOcVisitsMap =+ ({-# LINE 602 "src-ag/Order.ag" #-}+ _lhsIcVisitsMap+ {-# LINE 2152 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 2158 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOmanualAttrDepMap =+ ({-# LINE 282 "src-ag/Order.ag" #-}+ _lhsImanualAttrDepMap+ {-# LINE 2164 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 353 "src-ag/Order.ag" #-}+ _lhsImergeMap+ {-# LINE 2170 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_case =+ ({-# LINE 118 "src-ag/Order.ag" #-}+ _lhsIo_case+ {-# LINE 2176 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_cata =+ ({-# LINE 112 "src-ag/Order.ag" #-}+ _lhsIo_cata+ {-# LINE 2182 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_data =+ ({-# LINE 121 "src-ag/Order.ag" #-}+ _lhsIo_data+ {-# LINE 2188 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_dovisit =+ ({-# LINE 117 "src-ag/Order.ag" #-}+ _lhsIo_dovisit+ {-# LINE 2194 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_newtypes =+ ({-# LINE 111 "src-ag/Order.ag" #-}+ _lhsIo_newtypes+ {-# LINE 2200 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 115 "src-ag/Order.ag" #-}+ _lhsIo_rename+ {-# LINE 2206 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_sem =+ ({-# LINE 114 "src-ag/Order.ag" #-}+ _lhsIo_sem+ {-# LINE 2212 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_sig =+ ({-# LINE 113 "src-ag/Order.ag" #-}+ _lhsIo_sig+ {-# LINE 2218 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_unbox =+ ({-# LINE 120 "src-ag/Order.ag" #-}+ _lhsIo_unbox+ {-# LINE 2224 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_wantvisit =+ ({-# LINE 116 "src-ag/Order.ag" #-}+ _lhsIo_wantvisit+ {-# LINE 2230 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOprefix =+ ({-# LINE 119 "src-ag/Order.ag" #-}+ _lhsIprefix+ {-# LINE 2236 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 2242 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOvcount =+ ({-# LINE 257 "src-ag/Order.ag" #-}+ _lhsIvcount+ {-# LINE 2248 "dist/build/Order" #-}+ )+ -- copy rule (chain)+ _tlOacount =+ ({-# LINE 500 "src-ag/Order.ag" #-}+ _hdIacount+ {-# LINE 2254 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOallnts =+ ({-# LINE 648 "src-ag/Order.ag" #-}+ _lhsIallnts+ {-# LINE 2260 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOaroundMap =+ ({-# LINE 406 "src-ag/Order.ag" #-}+ _lhsIaroundMap+ {-# LINE 2266 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOcInterfaceMap =+ ({-# LINE 595 "src-ag/Order.ag" #-}+ _lhsIcInterfaceMap+ {-# LINE 2272 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOcVisitsMap =+ ({-# LINE 602 "src-ag/Order.ag" #-}+ _lhsIcVisitsMap+ {-# LINE 2278 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 2284 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOmanualAttrDepMap =+ ({-# LINE 282 "src-ag/Order.ag" #-}+ _lhsImanualAttrDepMap+ {-# LINE 2290 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 353 "src-ag/Order.ag" #-}+ _lhsImergeMap+ {-# LINE 2296 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_case =+ ({-# LINE 118 "src-ag/Order.ag" #-}+ _lhsIo_case+ {-# LINE 2302 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_cata =+ ({-# LINE 112 "src-ag/Order.ag" #-}+ _lhsIo_cata+ {-# LINE 2308 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_data =+ ({-# LINE 121 "src-ag/Order.ag" #-}+ _lhsIo_data+ {-# LINE 2314 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_dovisit =+ ({-# LINE 117 "src-ag/Order.ag" #-}+ _lhsIo_dovisit+ {-# LINE 2320 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_newtypes =+ ({-# LINE 111 "src-ag/Order.ag" #-}+ _lhsIo_newtypes+ {-# LINE 2326 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 115 "src-ag/Order.ag" #-}+ _lhsIo_rename+ {-# LINE 2332 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_sem =+ ({-# LINE 114 "src-ag/Order.ag" #-}+ _lhsIo_sem+ {-# LINE 2338 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_sig =+ ({-# LINE 113 "src-ag/Order.ag" #-}+ _lhsIo_sig+ {-# LINE 2344 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_unbox =+ ({-# LINE 120 "src-ag/Order.ag" #-}+ _lhsIo_unbox+ {-# LINE 2350 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_wantvisit =+ ({-# LINE 116 "src-ag/Order.ag" #-}+ _lhsIo_wantvisit+ {-# LINE 2356 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOprefix =+ ({-# LINE 119 "src-ag/Order.ag" #-}+ _lhsIprefix+ {-# LINE 2362 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 2368 "dist/build/Order" #-}+ )+ -- copy rule (chain)+ _tlOvcount =+ ({-# LINE 257 "src-ag/Order.ag" #-}+ _hdIvcount+ {-# LINE 2374 "dist/build/Order" #-}+ )+ ( _hdIacount,_hdIadditionalDep,_hdIaranges,_hdIaroundDep,_hdIcNonterminal,_hdIdirectDep,_hdIerrors,_hdIinhMap',_hdIinstDep,_hdImergeDep,_hdInAutoRules,_hdInExplicitRules,_hdInonts,_hdIntattrs,_hdIrules,_hdIsynMap',_hdIvcount) =+ hd_ _hdOacount _hdOallnts _hdOaroundMap _hdOcInterfaceMap _hdOcVisitsMap _hdOinhMap _hdOmanualAttrDepMap _hdOmergeMap _hdOo_case _hdOo_cata _hdOo_data _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_unbox _hdOo_wantvisit _hdOprefix _hdOsynMap _hdOvcount+ ( _tlIacount,_tlIadditionalDep,_tlIaranges,_tlIaroundDep,_tlIcNonterminals,_tlIdirectDep,_tlIerrors,_tlIinhMap',_tlIinstDep,_tlImergeDep,_tlInAutoRules,_tlInExplicitRules,_tlInonts,_tlIntattrs,_tlIrules,_tlIsynMap',_tlIvcount) =+ tl_ _tlOacount _tlOallnts _tlOaroundMap _tlOcInterfaceMap _tlOcVisitsMap _tlOinhMap _tlOmanualAttrDepMap _tlOmergeMap _tlOo_case _tlOo_cata _tlOo_data _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_unbox _tlOo_wantvisit _tlOprefix _tlOsynMap _tlOvcount+ in ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminals,_lhsOdirectDep,_lhsOerrors,_lhsOinhMap',_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOsynMap',_lhsOvcount))))+sem_Nonterminals_Nil :: T_Nonterminals+sem_Nonterminals_Nil =+ (T_Nonterminals (\ _lhsIacount+ _lhsIallnts+ _lhsIaroundMap+ _lhsIcInterfaceMap+ _lhsIcVisitsMap+ _lhsIinhMap+ _lhsImanualAttrDepMap+ _lhsImergeMap+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_data+ _lhsIo_dovisit+ _lhsIo_newtypes+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_unbox+ _lhsIo_wantvisit+ _lhsIprefix+ _lhsIsynMap+ _lhsIvcount ->+ (let _lhsOcNonterminals :: CNonterminals+ _lhsOadditionalDep :: (Seq Edge)+ _lhsOaranges :: (Seq (Int,Int,Int))+ _lhsOaroundDep :: (Seq Edge)+ _lhsOdirectDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOinhMap' :: (Map Identifier Attributes)+ _lhsOinstDep :: (Seq Edge)+ _lhsOmergeDep :: (Seq Edge)+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])+ _lhsOntattrs :: (Seq (Vertex,NTAttr))+ _lhsOrules :: (Seq (Vertex,CRule))+ _lhsOsynMap' :: (Map Identifier Attributes)+ _lhsOacount :: Int+ _lhsOvcount :: Int+ -- "src-ag/Order.ag"(line 623, column 12)+ _lhsOcNonterminals =+ ({-# LINE 623 "src-ag/Order.ag" #-}+ []+ {-# LINE 2425 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 282, column 60)+ _lhsOadditionalDep =+ ({-# LINE 282 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 2431 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 501, column 36)+ _lhsOaranges =+ ({-# LINE 501 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 2437 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 403, column 24)+ _lhsOaroundDep =+ ({-# LINE 403 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 2443 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 268, column 33)+ _lhsOdirectDep =+ ({-# LINE 268 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 2449 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 2455 "dist/build/Order" #-}+ )+ -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)+ _lhsOinhMap' =+ ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ Map.empty+ {-# LINE 2461 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 311, column 31)+ _lhsOinstDep =+ ({-# LINE 311 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 2467 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 366, column 18)+ _lhsOmergeDep =+ ({-# LINE 366 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 2473 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnAutoRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ 0+ {-# LINE 2479 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ 0+ {-# LINE 2485 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 518, column 43)+ _lhsOnonts =+ ({-# LINE 518 "src-ag/Order.ag" #-}+ []+ {-# LINE 2491 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 500, column 35)+ _lhsOntattrs =+ ({-# LINE 500 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 2497 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 258, column 18)+ _lhsOrules =+ ({-# LINE 258 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 2503 "dist/build/Order" #-}+ )+ -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)+ _lhsOsynMap' =+ ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ Map.empty+ {-# LINE 2509 "dist/build/Order" #-}+ )+ -- copy rule (chain)+ _lhsOacount =+ ({-# LINE 500 "src-ag/Order.ag" #-}+ _lhsIacount+ {-# LINE 2515 "dist/build/Order" #-}+ )+ -- copy rule (chain)+ _lhsOvcount =+ ({-# LINE 257 "src-ag/Order.ag" #-}+ _lhsIvcount+ {-# LINE 2521 "dist/build/Order" #-}+ )+ in ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminals,_lhsOdirectDep,_lhsOerrors,_lhsOinhMap',_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOsynMap',_lhsOvcount))))+-- Pattern -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allTypeSigs : Map Identifier Type+ altAttrs : Map AltAttr Vertex+ con : Identifier+ inh : Attributes+ nt : Identifier+ syn : Attributes+ synthesized attributes:+ copy : Pattern + errors : Seq Error+ gathAltAttrs : [AltAttr]+ instVars : [Identifier]+ locVars : [Identifier]+ patternAttrs : [(Identifier,Identifier,Bool)]+ alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + 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) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat))+sem_Pattern (Constr _name _pats) =+ (sem_Pattern_Constr _name (sem_Patterns _pats))+sem_Pattern (Irrefutable _pat) =+ (sem_Pattern_Irrefutable (sem_Pattern _pat))+sem_Pattern (Product _pos _pats) =+ (sem_Pattern_Product _pos (sem_Patterns _pats))+sem_Pattern (Underscore _pos) =+ (sem_Pattern_Underscore _pos)+-- semantic domain+newtype T_Pattern = T_Pattern ((Map Identifier Type) ->+ (Map AltAttr Vertex) ->+ Identifier ->+ Attributes ->+ Identifier ->+ Attributes ->+ ( Pattern,(Seq Error),([AltAttr]),([Identifier]),([Identifier]),([(Identifier,Identifier,Bool)])))+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)]))}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern+wrap_Pattern (T_Pattern sem) (Inh_Pattern _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) =+ (let ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs) = sem _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn+ in (Syn_Pattern _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs))+sem_Pattern_Alias :: Identifier ->+ Identifier ->+ T_Pattern ->+ T_Pattern+sem_Pattern_Alias field_ attr_ (T_Pattern pat_) =+ (T_Pattern (\ _lhsIallTypeSigs+ _lhsIaltAttrs+ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool)])+ _lhsOlocVars :: ([Identifier])+ _lhsOinstVars :: ([Identifier])+ _lhsOerrors :: (Seq Error)+ _lhsOcopy :: Pattern+ _patOallTypeSigs :: (Map Identifier Type)+ _patOaltAttrs :: (Map AltAttr Vertex)+ _patOcon :: Identifier+ _patOinh :: Attributes+ _patOnt :: Identifier+ _patOsyn :: Attributes+ _patIcopy :: Pattern+ _patIerrors :: (Seq Error)+ _patIgathAltAttrs :: ([AltAttr])+ _patIinstVars :: ([Identifier])+ _patIlocVars :: ([Identifier])+ _patIpatternAttrs :: ([(Identifier,Identifier,Bool)])+ -- "src-ag/Order.ag"(line 185, column 12)+ _lhsOgathAltAttrs =+ ({-# LINE 185 "src-ag/Order.ag" #-}+ [AltAttr field_ attr_ (field_ == _LOC || field_ == _INST)]+ {-# LINE 2629 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 251, column 12)+ _lhsOpatternAttrs =+ ({-# LINE 251 "src-ag/Order.ag" #-}+ [(field_,attr_,(field_ == _LOC || field_ == _INST))]+ {-# LINE 2635 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 681, column 14)+ _lhsOlocVars =+ ({-# LINE 681 "src-ag/Order.ag" #-}+ if field_ == _LOC+ then [attr_]+ else []+ {-# LINE 2643 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 684, column 14)+ _lhsOinstVars =+ ({-# LINE 684 "src-ag/Order.ag" #-}+ if field_ == _INST+ then [attr_]+ else []+ {-# LINE 2651 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ _patIerrors+ {-# LINE 2657 "dist/build/Order" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Alias field_ attr_ _patIcopy+ {-# LINE 2663 "dist/build/Order" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 2669 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patOallTypeSigs =+ ({-# LINE 534 "src-ag/Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 2675 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patOaltAttrs =+ ({-# LINE 187 "src-ag/Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 2681 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patOcon =+ ({-# LINE 91 "src-ag/Order.ag" #-}+ _lhsIcon+ {-# LINE 2687 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patOinh =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIinh+ {-# LINE 2693 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patOnt =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsInt+ {-# LINE 2699 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patOsyn =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIsyn+ {-# LINE 2705 "dist/build/Order" #-}+ )+ ( _patIcopy,_patIerrors,_patIgathAltAttrs,_patIinstVars,_patIlocVars,_patIpatternAttrs) =+ pat_ _patOallTypeSigs _patOaltAttrs _patOcon _patOinh _patOnt _patOsyn+ in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))))+sem_Pattern_Constr :: ConstructorIdent ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Constr name_ (T_Patterns pats_) =+ (T_Pattern (\ _lhsIallTypeSigs+ _lhsIaltAttrs+ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool)])+ _lhsOcopy :: Pattern+ _patsOallTypeSigs :: (Map Identifier Type)+ _patsOaltAttrs :: (Map AltAttr Vertex)+ _patsOcon :: Identifier+ _patsOinh :: Attributes+ _patsOnt :: Identifier+ _patsOsyn :: Attributes+ _patsIcopy :: Patterns+ _patsIerrors :: (Seq Error)+ _patsIgathAltAttrs :: ([AltAttr])+ _patsIinstVars :: ([Identifier])+ _patsIlocVars :: ([Identifier])+ _patsIpatternAttrs :: ([(Identifier,Identifier,Bool)])+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ _patsIerrors+ {-# LINE 2742 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 171, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 171 "src-ag/Order.ag" #-}+ _patsIgathAltAttrs+ {-# LINE 2748 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 86)+ _lhsOinstVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ _patsIinstVars+ {-# LINE 2754 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 48)+ _lhsOlocVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ _patsIlocVars+ {-# LINE 2760 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 248, column 42)+ _lhsOpatternAttrs =+ ({-# LINE 248 "src-ag/Order.ag" #-}+ _patsIpatternAttrs+ {-# LINE 2766 "dist/build/Order" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 2772 "dist/build/Order" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 2778 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patsOallTypeSigs =+ ({-# LINE 534 "src-ag/Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 2784 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patsOaltAttrs =+ ({-# LINE 187 "src-ag/Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 2790 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patsOcon =+ ({-# LINE 91 "src-ag/Order.ag" #-}+ _lhsIcon+ {-# LINE 2796 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patsOinh =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIinh+ {-# LINE 2802 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patsOnt =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsInt+ {-# LINE 2808 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patsOsyn =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIsyn+ {-# LINE 2814 "dist/build/Order" #-}+ )+ ( _patsIcopy,_patsIerrors,_patsIgathAltAttrs,_patsIinstVars,_patsIlocVars,_patsIpatternAttrs) =+ pats_ _patsOallTypeSigs _patsOaltAttrs _patsOcon _patsOinh _patsOnt _patsOsyn+ in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))))+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern+sem_Pattern_Irrefutable (T_Pattern pat_) =+ (T_Pattern (\ _lhsIallTypeSigs+ _lhsIaltAttrs+ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool)])+ _lhsOcopy :: Pattern+ _patOallTypeSigs :: (Map Identifier Type)+ _patOaltAttrs :: (Map AltAttr Vertex)+ _patOcon :: Identifier+ _patOinh :: Attributes+ _patOnt :: Identifier+ _patOsyn :: Attributes+ _patIcopy :: Pattern+ _patIerrors :: (Seq Error)+ _patIgathAltAttrs :: ([AltAttr])+ _patIinstVars :: ([Identifier])+ _patIlocVars :: ([Identifier])+ _patIpatternAttrs :: ([(Identifier,Identifier,Bool)])+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ _patIerrors+ {-# LINE 2850 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 171, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 171 "src-ag/Order.ag" #-}+ _patIgathAltAttrs+ {-# LINE 2856 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 86)+ _lhsOinstVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ _patIinstVars+ {-# LINE 2862 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 48)+ _lhsOlocVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ _patIlocVars+ {-# LINE 2868 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 248, column 42)+ _lhsOpatternAttrs =+ ({-# LINE 248 "src-ag/Order.ag" #-}+ _patIpatternAttrs+ {-# LINE 2874 "dist/build/Order" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 2880 "dist/build/Order" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 2886 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patOallTypeSigs =+ ({-# LINE 534 "src-ag/Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 2892 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patOaltAttrs =+ ({-# LINE 187 "src-ag/Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 2898 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patOcon =+ ({-# LINE 91 "src-ag/Order.ag" #-}+ _lhsIcon+ {-# LINE 2904 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patOinh =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIinh+ {-# LINE 2910 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patOnt =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsInt+ {-# LINE 2916 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patOsyn =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIsyn+ {-# LINE 2922 "dist/build/Order" #-}+ )+ ( _patIcopy,_patIerrors,_patIgathAltAttrs,_patIinstVars,_patIlocVars,_patIpatternAttrs) =+ pat_ _patOallTypeSigs _patOaltAttrs _patOcon _patOinh _patOnt _patOsyn+ in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))))+sem_Pattern_Product :: Pos ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Product pos_ (T_Patterns pats_) =+ (T_Pattern (\ _lhsIallTypeSigs+ _lhsIaltAttrs+ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool)])+ _lhsOcopy :: Pattern+ _patsOallTypeSigs :: (Map Identifier Type)+ _patsOaltAttrs :: (Map AltAttr Vertex)+ _patsOcon :: Identifier+ _patsOinh :: Attributes+ _patsOnt :: Identifier+ _patsOsyn :: Attributes+ _patsIcopy :: Patterns+ _patsIerrors :: (Seq Error)+ _patsIgathAltAttrs :: ([AltAttr])+ _patsIinstVars :: ([Identifier])+ _patsIlocVars :: ([Identifier])+ _patsIpatternAttrs :: ([(Identifier,Identifier,Bool)])+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ _patsIerrors+ {-# LINE 2959 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 171, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 171 "src-ag/Order.ag" #-}+ _patsIgathAltAttrs+ {-# LINE 2965 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 86)+ _lhsOinstVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ _patsIinstVars+ {-# LINE 2971 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 48)+ _lhsOlocVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ _patsIlocVars+ {-# LINE 2977 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 248, column 42)+ _lhsOpatternAttrs =+ ({-# LINE 248 "src-ag/Order.ag" #-}+ _patsIpatternAttrs+ {-# LINE 2983 "dist/build/Order" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 2989 "dist/build/Order" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 2995 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patsOallTypeSigs =+ ({-# LINE 534 "src-ag/Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 3001 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patsOaltAttrs =+ ({-# LINE 187 "src-ag/Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 3007 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patsOcon =+ ({-# LINE 91 "src-ag/Order.ag" #-}+ _lhsIcon+ {-# LINE 3013 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patsOinh =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIinh+ {-# LINE 3019 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patsOnt =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsInt+ {-# LINE 3025 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patsOsyn =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIsyn+ {-# LINE 3031 "dist/build/Order" #-}+ )+ ( _patsIcopy,_patsIerrors,_patsIgathAltAttrs,_patsIinstVars,_patsIlocVars,_patsIpatternAttrs) =+ pats_ _patsOallTypeSigs _patsOaltAttrs _patsOcon _patsOinh _patsOnt _patsOsyn+ in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))))+sem_Pattern_Underscore :: Pos ->+ T_Pattern+sem_Pattern_Underscore pos_ =+ (T_Pattern (\ _lhsIallTypeSigs+ _lhsIaltAttrs+ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool)])+ _lhsOcopy :: Pattern+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 3055 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 171, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 171 "src-ag/Order.ag" #-}+ []+ {-# LINE 3061 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 86)+ _lhsOinstVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ []+ {-# LINE 3067 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 48)+ _lhsOlocVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ []+ {-# LINE 3073 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 248, column 42)+ _lhsOpatternAttrs =+ ({-# LINE 248 "src-ag/Order.ag" #-}+ []+ {-# LINE 3079 "dist/build/Order" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Underscore pos_+ {-# LINE 3085 "dist/build/Order" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 3091 "dist/build/Order" #-}+ )+ in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))))+-- Patterns ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allTypeSigs : Map Identifier Type+ altAttrs : Map AltAttr Vertex+ con : Identifier+ inh : Attributes+ nt : Identifier+ syn : Attributes+ synthesized attributes:+ copy : Patterns + errors : Seq Error+ gathAltAttrs : [AltAttr]+ instVars : [Identifier]+ locVars : [Identifier]+ patternAttrs : [(Identifier,Identifier,Bool)]+ alternatives:+ alternative Cons:+ child hd : Pattern + child tl : Patterns + visit 0:+ local copy : _+ alternative Nil:+ visit 0:+ local copy : _+-}+-- cata+sem_Patterns :: Patterns ->+ T_Patterns+sem_Patterns list =+ (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list))+-- semantic domain+newtype T_Patterns = T_Patterns ((Map Identifier Type) ->+ (Map AltAttr Vertex) ->+ Identifier ->+ Attributes ->+ Identifier ->+ Attributes ->+ ( Patterns,(Seq Error),([AltAttr]),([Identifier]),([Identifier]),([(Identifier,Identifier,Bool)])))+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)]))}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns+wrap_Patterns (T_Patterns sem) (Inh_Patterns _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) =+ (let ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs) = sem _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn+ in (Syn_Patterns _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns+sem_Patterns_Cons (T_Pattern hd_) (T_Patterns tl_) =+ (T_Patterns (\ _lhsIallTypeSigs+ _lhsIaltAttrs+ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool)])+ _lhsOcopy :: Patterns+ _hdOallTypeSigs :: (Map Identifier Type)+ _hdOaltAttrs :: (Map AltAttr Vertex)+ _hdOcon :: Identifier+ _hdOinh :: Attributes+ _hdOnt :: Identifier+ _hdOsyn :: Attributes+ _tlOallTypeSigs :: (Map Identifier Type)+ _tlOaltAttrs :: (Map AltAttr Vertex)+ _tlOcon :: Identifier+ _tlOinh :: Attributes+ _tlOnt :: Identifier+ _tlOsyn :: Attributes+ _hdIcopy :: Pattern+ _hdIerrors :: (Seq Error)+ _hdIgathAltAttrs :: ([AltAttr])+ _hdIinstVars :: ([Identifier])+ _hdIlocVars :: ([Identifier])+ _hdIpatternAttrs :: ([(Identifier,Identifier,Bool)])+ _tlIcopy :: Patterns+ _tlIerrors :: (Seq Error)+ _tlIgathAltAttrs :: ([AltAttr])+ _tlIinstVars :: ([Identifier])+ _tlIlocVars :: ([Identifier])+ _tlIpatternAttrs :: ([(Identifier,Identifier,Bool)])+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 3186 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 171, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 171 "src-ag/Order.ag" #-}+ _hdIgathAltAttrs ++ _tlIgathAltAttrs+ {-# LINE 3192 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 86)+ _lhsOinstVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ _hdIinstVars ++ _tlIinstVars+ {-# LINE 3198 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 48)+ _lhsOlocVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ _hdIlocVars ++ _tlIlocVars+ {-# LINE 3204 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 248, column 42)+ _lhsOpatternAttrs =+ ({-# LINE 248 "src-ag/Order.ag" #-}+ _hdIpatternAttrs ++ _tlIpatternAttrs+ {-# LINE 3210 "dist/build/Order" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 3216 "dist/build/Order" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 3222 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOallTypeSigs =+ ({-# LINE 534 "src-ag/Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 3228 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOaltAttrs =+ ({-# LINE 187 "src-ag/Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 3234 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOcon =+ ({-# LINE 91 "src-ag/Order.ag" #-}+ _lhsIcon+ {-# LINE 3240 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIinh+ {-# LINE 3246 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsInt+ {-# LINE 3252 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIsyn+ {-# LINE 3258 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOallTypeSigs =+ ({-# LINE 534 "src-ag/Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 3264 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOaltAttrs =+ ({-# LINE 187 "src-ag/Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 3270 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOcon =+ ({-# LINE 91 "src-ag/Order.ag" #-}+ _lhsIcon+ {-# LINE 3276 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIinh+ {-# LINE 3282 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsInt+ {-# LINE 3288 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIsyn+ {-# LINE 3294 "dist/build/Order" #-}+ )+ ( _hdIcopy,_hdIerrors,_hdIgathAltAttrs,_hdIinstVars,_hdIlocVars,_hdIpatternAttrs) =+ hd_ _hdOallTypeSigs _hdOaltAttrs _hdOcon _hdOinh _hdOnt _hdOsyn+ ( _tlIcopy,_tlIerrors,_tlIgathAltAttrs,_tlIinstVars,_tlIlocVars,_tlIpatternAttrs) =+ tl_ _tlOallTypeSigs _tlOaltAttrs _tlOcon _tlOinh _tlOnt _tlOsyn+ in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))))+sem_Patterns_Nil :: T_Patterns+sem_Patterns_Nil =+ (T_Patterns (\ _lhsIallTypeSigs+ _lhsIaltAttrs+ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool)])+ _lhsOcopy :: Patterns+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 3319 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 171, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 171 "src-ag/Order.ag" #-}+ []+ {-# LINE 3325 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 86)+ _lhsOinstVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ []+ {-# LINE 3331 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 48)+ _lhsOlocVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ []+ {-# LINE 3337 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 248, column 42)+ _lhsOpatternAttrs =+ ({-# LINE 248 "src-ag/Order.ag" #-}+ []+ {-# LINE 3343 "dist/build/Order" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ []+ {-# LINE 3349 "dist/build/Order" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 3355 "dist/build/Order" #-}+ )+ in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))))+-- Production --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allnts : [Identifier]+ aroundMap : Map ConstructorIdent (Map Identifier [Expression])+ cVisitsMap : CVisitsMap+ inh : Attributes+ inhMap : Map Identifier Attributes+ manualAttrDepMap : AttrOrderMap+ mergeMap : Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))+ nt : Identifier+ o_case : Bool+ o_cata : Bool+ o_dovisit : Bool+ o_newtypes : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_unbox : Bool+ o_wantvisit : Bool+ prefix : String+ syn : Attributes+ synMap : Map Identifier Attributes+ chained attribute:+ vcount : Int+ synthesized attributes:+ additionalDep : Seq Edge+ aroundDep : Seq Edge+ cProduction : CProduction+ cons : [ConstructorIdent]+ directDep : Seq Edge+ errors : Seq Error+ instDep : Seq Edge+ mergeDep : Seq Edge+ nAutoRules : Int+ nExplicitRules : Int+ rules : Seq (Vertex,CRule)+ alternatives:+ alternative Production:+ child con : {ConstructorIdent}+ child params : {[Identifier]}+ child constraints : {[Type]}+ child children : Children + child rules : Rules + child typeSigs : TypeSigs + child macro : {MaybeMacro}+ visit 0:+ local gathAltAttrs : _+ local altAttrs : _+ local inhRules : _+ local gathRules : _+ local manualDeps : _+ local mergeMap : _+ local mergeDep1 : _+ local mergeDep2 : _+ local aroundMap : _+ local aroundDep1 : _+ local aroundDep2 : _+ local cVisits : _+ local allfields : _+ local attrs : _+ local inhnames : _+ local synnames : _+-}+-- cata+sem_Production :: Production ->+ T_Production+sem_Production (Production _con _params _constraints _children _rules _typeSigs _macro) =+ (sem_Production_Production _con _params _constraints (sem_Children _children) (sem_Rules _rules) (sem_TypeSigs _typeSigs) _macro)+-- semantic domain+newtype T_Production = T_Production (([Identifier]) ->+ (Map ConstructorIdent (Map Identifier [Expression])) ->+ CVisitsMap ->+ Attributes ->+ (Map Identifier Attributes) ->+ AttrOrderMap ->+ (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->+ Identifier ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ String ->+ Attributes ->+ (Map Identifier Attributes) ->+ Int ->+ ( (Seq Edge),(Seq Edge),CProduction,([ConstructorIdent]),(Seq Edge),(Seq Error),(Seq Edge),(Seq Edge),Int,Int,(Seq (Vertex,CRule)),Int))+data Inh_Production = Inh_Production {allnts_Inh_Production :: !(([Identifier])),aroundMap_Inh_Production :: !((Map ConstructorIdent (Map Identifier [Expression]))),cVisitsMap_Inh_Production :: !(CVisitsMap),inh_Inh_Production :: !(Attributes),inhMap_Inh_Production :: !((Map Identifier Attributes)),manualAttrDepMap_Inh_Production :: !(AttrOrderMap),mergeMap_Inh_Production :: !((Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))),nt_Inh_Production :: !(Identifier),o_case_Inh_Production :: !(Bool),o_cata_Inh_Production :: !(Bool),o_dovisit_Inh_Production :: !(Bool),o_newtypes_Inh_Production :: !(Bool),o_rename_Inh_Production :: !(Bool),o_sem_Inh_Production :: !(Bool),o_sig_Inh_Production :: !(Bool),o_unbox_Inh_Production :: !(Bool),o_wantvisit_Inh_Production :: !(Bool),prefix_Inh_Production :: !(String),syn_Inh_Production :: !(Attributes),synMap_Inh_Production :: !((Map Identifier Attributes)),vcount_Inh_Production :: !(Int)}+data Syn_Production = Syn_Production {additionalDep_Syn_Production :: !((Seq Edge)),aroundDep_Syn_Production :: !((Seq Edge)),cProduction_Syn_Production :: !(CProduction),cons_Syn_Production :: !(([ConstructorIdent])),directDep_Syn_Production :: !((Seq Edge)),errors_Syn_Production :: !((Seq Error)),instDep_Syn_Production :: !((Seq Edge)),mergeDep_Syn_Production :: !((Seq Edge)),nAutoRules_Syn_Production :: !(Int),nExplicitRules_Syn_Production :: !(Int),rules_Syn_Production :: !((Seq (Vertex,CRule))),vcount_Syn_Production :: !(Int)}+wrap_Production :: T_Production ->+ Inh_Production ->+ Syn_Production+wrap_Production (T_Production sem) (Inh_Production _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount) =+ (let ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProduction,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount) = sem _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount+ in (Syn_Production _lhsOadditionalDep _lhsOaroundDep _lhsOcProduction _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount))+sem_Production_Production :: ConstructorIdent ->+ ([Identifier]) ->+ ([Type]) ->+ T_Children ->+ T_Rules ->+ T_TypeSigs ->+ MaybeMacro ->+ T_Production+sem_Production_Production con_ params_ constraints_ (T_Children children_) (T_Rules rules_) (T_TypeSigs typeSigs_) macro_ =+ (T_Production (\ _lhsIallnts+ _lhsIaroundMap+ _lhsIcVisitsMap+ _lhsIinh+ _lhsIinhMap+ _lhsImanualAttrDepMap+ _lhsImergeMap+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_dovisit+ _lhsIo_newtypes+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_unbox+ _lhsIo_wantvisit+ _lhsIprefix+ _lhsIsyn+ _lhsIsynMap+ _lhsIvcount ->+ (let _childrenOcon :: Identifier+ _rulesOcon :: Identifier+ _rulesOchildNts :: (Map Identifier NontermIdent)+ _rulesOchildInhs :: (Map Identifier Attributes)+ _lhsOrules :: (Seq (Vertex,CRule))+ _lhsOvcount :: Int+ _lhsOadditionalDep :: (Seq Edge)+ _rulesOsynsOfChildren :: (Map Identifier Attributes)+ _rulesOinhsOfChildren :: (Map Identifier Attributes)+ _lhsOmergeDep :: (Seq Edge)+ _lhsOaroundDep :: (Seq Edge)+ _lhsOcons :: ([ConstructorIdent])+ _typeSigsOtypeSigs :: (Map Identifier Type)+ _rulesOallTypeSigs :: (Map Identifier Type)+ _lhsOcProduction :: CProduction+ _lhsOdirectDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOinstDep :: (Seq Edge)+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ _childrenOallfields :: ([(Identifier,Type,ChildKind)])+ _childrenOallnts :: ([Identifier])+ _childrenOattrs :: ([(Identifier,Identifier)])+ _childrenOinh :: Attributes+ _childrenOinhMap :: (Map Identifier Attributes)+ _childrenOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _childrenOnt :: Identifier+ _childrenOo_unbox :: Bool+ _childrenOsyn :: Attributes+ _childrenOsynMap :: (Map Identifier Attributes)+ _rulesOallfields :: ([(Identifier,Type,ChildKind)])+ _rulesOallnts :: ([Identifier])+ _rulesOaltAttrs :: (Map AltAttr Vertex)+ _rulesOattrs :: ([(Identifier,Identifier)])+ _rulesOinh :: Attributes+ _rulesOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _rulesOnt :: Identifier+ _rulesOo_case :: Bool+ _rulesOo_cata :: Bool+ _rulesOo_dovisit :: Bool+ _rulesOo_newtypes :: Bool+ _rulesOo_rename :: Bool+ _rulesOo_sem :: Bool+ _rulesOo_sig :: Bool+ _rulesOo_wantvisit :: Bool+ _rulesOprefix :: String+ _rulesOsyn :: Attributes+ _childrenIattributes :: ([(Identifier,Attributes,Attributes)])+ _childrenIcollectChildrenInhs :: (Map Identifier Attributes )+ _childrenIcollectChildrenSyns :: (Map Identifier Attributes )+ _childrenIerrors :: (Seq Error)+ _childrenIfields :: ([(Identifier,Type,ChildKind)])+ _childrenIgathAltAttrs :: ([AltAttr])+ _childrenIgathRules :: (Seq CRule)+ _childrenIinhs :: (Seq (Identifier,Attributes))+ _childrenInts :: (Seq (Identifier,NontermIdent))+ _childrenIsinglevisits :: ([CRule])+ _childrenIterminals :: ([Identifier])+ _rulesIdirectDep :: (Seq Edge)+ _rulesIerrors :: (Seq Error)+ _rulesIgathAltAttrs :: ([AltAttr])+ _rulesIgathRules :: (Seq CRule)+ _rulesIinstDep :: (Seq Edge)+ _rulesIinstVars :: ([Identifier])+ _rulesIlocVars :: ([Identifier])+ _rulesInAutoRules :: Int+ _rulesInExplicitRules :: Int+ _typeSigsItypeSigs :: (Map Identifier Type)+ -- "src-ag/Order.ag"(line 94, column 16)+ _childrenOcon =+ ({-# LINE 94 "src-ag/Order.ag" #-}+ con_+ {-# LINE 3561 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 96, column 16)+ _rulesOcon =+ ({-# LINE 96 "src-ag/Order.ag" #-}+ con_+ {-# LINE 3567 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 173, column 18)+ _gathAltAttrs =+ ({-# LINE 173 "src-ag/Order.ag" #-}+ [ AltAttr _LHS inh True | inh <- Map.keys _lhsIinh ]+ ++ _childrenIgathAltAttrs+ ++ _rulesIgathAltAttrs+ {-# LINE 3575 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 189, column 17)+ _altAttrs =+ ({-# LINE 189 "src-ag/Order.ag" #-}+ Map.fromList (zip _gathAltAttrs [_lhsIvcount..])+ {-# LINE 3581 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 202, column 18)+ _rulesOchildNts =+ ({-# LINE 202 "src-ag/Order.ag" #-}+ Map.fromList (toList _childrenInts)+ {-# LINE 3587 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 203, column 19)+ _rulesOchildInhs =+ ({-# LINE 203 "src-ag/Order.ag" #-}+ Map.fromList (toList _childrenIinhs)+ {-# LINE 3593 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 209, column 18)+ _inhRules =+ ({-# LINE 209 "src-ag/Order.ag" #-}+ [ cRuleLhsInh inh _lhsInt con_ tp | (inh,tp) <- Map.assocs _lhsIinh ]+ {-# LINE 3599 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 210, column 19)+ _gathRules =+ ({-# LINE 210 "src-ag/Order.ag" #-}+ _inhRules ++ toList (_childrenIgathRules Seq.>< _rulesIgathRules)+ {-# LINE 3605 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 262, column 18)+ _lhsOrules =+ ({-# LINE 262 "src-ag/Order.ag" #-}+ Seq.fromList (zip [_lhsIvcount..] _gathRules)+ {-# LINE 3611 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 263, column 19)+ _lhsOvcount =+ ({-# LINE 263 "src-ag/Order.ag" #-}+ _lhsIvcount + length _gathRules+ {-# LINE 3617 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 290, column 7)+ _manualDeps =+ ({-# LINE 290 "src-ag/Order.ag" #-}+ Set.toList $ Map.findWithDefault Set.empty con_ $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrDepMap+ {-# LINE 3623 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 293, column 7)+ _lhsOadditionalDep =+ ({-# LINE 293 "src-ag/Order.ag" #-}+ Seq.fromList [ (vertex True occA, vertex False occB)+ | Dependency occA occB <- _manualDeps+ , let vertex inout (OccAttr child nm)+ | child == _LOC = findWithErr2 (AltAttr _LOC nm True) _altAttrs+ | otherwise = findWithErr2 (AltAttr child nm inout) _altAttrs+ vertex _ (OccRule nm)+ = findWithErr2 (AltAttr _LOC (Ident ("_rule_" ++ show nm) (getPos nm)) True) _altAttrs+ ]+ {-# LINE 3636 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 340, column 17)+ _rulesOsynsOfChildren =+ ({-# LINE 340 "src-ag/Order.ag" #-}+ _childrenIcollectChildrenSyns+ {-# LINE 3642 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 341, column 17)+ _rulesOinhsOfChildren =+ ({-# LINE 341 "src-ag/Order.ag" #-}+ _childrenIcollectChildrenInhs+ {-# LINE 3648 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 359, column 32)+ _mergeMap =+ ({-# LINE 359 "src-ag/Order.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsImergeMap+ {-# LINE 3654 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 370, column 7)+ _lhsOmergeDep =+ ({-# LINE 370 "src-ag/Order.ag" #-}+ _mergeDep1 Seq.>< _mergeDep2+ {-# LINE 3660 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 371, column 7)+ _mergeDep1 =+ ({-# LINE 371 "src-ag/Order.ag" #-}+ Seq.fromList $+ [ (childVert, synVert)+ | childNm <- Map.keys _mergeMap+ , synNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenSyns)+ , let childNm' = Ident (show childNm ++ "_merge") (getPos childNm)+ childAttr = AltAttr _LOC childNm' True+ synAttr = AltAttr childNm synNm True+ childVert = findWithErr2 childAttr _altAttrs+ synVert = findWithErr2 synAttr _altAttrs+ ]+ {-# LINE 3675 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 382, column 7)+ _mergeDep2 =+ ({-# LINE 382 "src-ag/Order.ag" #-}+ Seq.fromList $+ [ (mergedVert, sourceVert)+ | (childNm, (_,cs)) <- Map.assocs _mergeMap+ , c <- cs+ , synNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenSyns)+ , let sourceAttr = AltAttr childNm synNm True+ mergedAttr = AltAttr c synNm True+ sourceVert = findWithErr2 sourceAttr _altAttrs+ mergedVert = findWithErr2 mergedAttr _altAttrs+ ]+ {-# LINE 3690 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 412, column 32)+ _aroundMap =+ ({-# LINE 412 "src-ag/Order.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsIaroundMap+ {-# LINE 3696 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 419, column 6)+ _aroundDep1 =+ ({-# LINE 419 "src-ag/Order.ag" #-}+ Seq.fromList $+ [ (childVert, synVert)+ | childNm <- Map.keys _aroundMap+ , synNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenSyns)+ , let childNm' = Ident (show childNm ++ "_around") (getPos childNm)+ childAttr = AltAttr _LOC childNm' True+ synAttr = AltAttr childNm synNm True+ childVert = findWithErr2 childAttr _altAttrs+ synVert = findWithErr2 synAttr _altAttrs+ ]+ {-# LINE 3711 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 430, column 6)+ _aroundDep2 =+ ({-# LINE 430 "src-ag/Order.ag" #-}+ Seq.fromList $+ [ (childVert, inhVert)+ | childNm <- Map.keys _aroundMap+ , inhNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenInhs)+ , let childNm' = Ident (show childNm ++ "_around") (getPos childNm)+ childAttr = AltAttr _LOC childNm' True+ inhAttr = AltAttr childNm inhNm False+ childVert = findWithErr2 childAttr _altAttrs+ inhVert = findWithErr2 inhAttr _altAttrs+ ]+ {-# LINE 3726 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 441, column 6)+ _lhsOaroundDep =+ ({-# LINE 441 "src-ag/Order.ag" #-}+ _aroundDep1 Seq.>< _aroundDep2+ {-# LINE 3732 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 523, column 18)+ _lhsOcons =+ ({-# LINE 523 "src-ag/Order.ag" #-}+ [con_]+ {-# LINE 3738 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 530, column 16)+ _typeSigsOtypeSigs =+ ({-# LINE 530 "src-ag/Order.ag" #-}+ Map.empty+ {-# LINE 3744 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 536, column 17)+ _rulesOallTypeSigs =+ ({-# LINE 536 "src-ag/Order.ag" #-}+ _typeSigsItypeSigs+ {-# LINE 3750 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 604, column 17)+ _cVisits =+ ({-# LINE 604 "src-ag/Order.ag" #-}+ if _lhsIo_dovisit+ then let prodsVisitsMap = findWithErr1 "Production.cVisits.nt" _lhsInt _lhsIcVisitsMap+ visits = findWithErr1 "Production.cVisits.con" con_ prodsVisitsMap+ in visits+ else let vss = nubBy eqCRuleDefines _gathRules ++ _childrenIsinglevisits+ in [CVisit _lhsIinh _lhsIsyn vss [] False]+ {-# LINE 3761 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 630, column 18)+ _lhsOcProduction =+ ({-# LINE 630 "src-ag/Order.ag" #-}+ CProduction con_ _cVisits _childrenIfields _childrenIterminals+ {-# LINE 3767 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 658, column 16)+ _allfields =+ ({-# LINE 658 "src-ag/Order.ag" #-}+ _childrenIfields+ {-# LINE 3773 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 658, column 16)+ _attrs =+ ({-# LINE 659 "src-ag/Order.ag" #-}+ map ((,) _LOC) _rulesIlocVars +++ map ((,) _INST) _rulesIinstVars +++ map ((,) _LHS) _inhnames +++ concat [map ((,) nm) (Map.keys as) | (nm,_,as) <- _childrenIattributes]+ {-# LINE 3782 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 658, column 16)+ _inhnames =+ ({-# LINE 663 "src-ag/Order.ag" #-}+ Map.keys _lhsIinh+ {-# LINE 3788 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 658, column 16)+ _synnames =+ ({-# LINE 664 "src-ag/Order.ag" #-}+ Map.keys _lhsIsyn+ {-# LINE 3794 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 268, column 33)+ _lhsOdirectDep =+ ({-# LINE 268 "src-ag/Order.ag" #-}+ _rulesIdirectDep+ {-# LINE 3800 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ _childrenIerrors Seq.>< _rulesIerrors+ {-# LINE 3806 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 311, column 31)+ _lhsOinstDep =+ ({-# LINE 311 "src-ag/Order.ag" #-}+ _rulesIinstDep+ {-# LINE 3812 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnAutoRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ _rulesInAutoRules+ {-# LINE 3818 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ _rulesInExplicitRules+ {-# LINE 3824 "dist/build/Order" #-}+ )+ -- copy rule (from local)+ _childrenOallfields =+ ({-# LINE 655 "src-ag/Order.ag" #-}+ _allfields+ {-# LINE 3830 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _childrenOallnts =+ ({-# LINE 648 "src-ag/Order.ag" #-}+ _lhsIallnts+ {-# LINE 3836 "dist/build/Order" #-}+ )+ -- copy rule (from local)+ _childrenOattrs =+ ({-# LINE 655 "src-ag/Order.ag" #-}+ _attrs+ {-# LINE 3842 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _childrenOinh =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIinh+ {-# LINE 3848 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _childrenOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 3854 "dist/build/Order" #-}+ )+ -- copy rule (from local)+ _childrenOmergeMap =+ ({-# LINE 361 "src-ag/Order.ag" #-}+ _mergeMap+ {-# LINE 3860 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _childrenOnt =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsInt+ {-# LINE 3866 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _childrenOo_unbox =+ ({-# LINE 120 "src-ag/Order.ag" #-}+ _lhsIo_unbox+ {-# LINE 3872 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _childrenOsyn =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIsyn+ {-# LINE 3878 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _childrenOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 3884 "dist/build/Order" #-}+ )+ -- copy rule (from local)+ _rulesOallfields =+ ({-# LINE 655 "src-ag/Order.ag" #-}+ _allfields+ {-# LINE 3890 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rulesOallnts =+ ({-# LINE 648 "src-ag/Order.ag" #-}+ _lhsIallnts+ {-# LINE 3896 "dist/build/Order" #-}+ )+ -- copy rule (from local)+ _rulesOaltAttrs =+ ({-# LINE 187 "src-ag/Order.ag" #-}+ _altAttrs+ {-# LINE 3902 "dist/build/Order" #-}+ )+ -- copy rule (from local)+ _rulesOattrs =+ ({-# LINE 655 "src-ag/Order.ag" #-}+ _attrs+ {-# LINE 3908 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rulesOinh =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIinh+ {-# LINE 3914 "dist/build/Order" #-}+ )+ -- copy rule (from local)+ _rulesOmergeMap =+ ({-# LINE 361 "src-ag/Order.ag" #-}+ _mergeMap+ {-# LINE 3920 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rulesOnt =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsInt+ {-# LINE 3926 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rulesOo_case =+ ({-# LINE 118 "src-ag/Order.ag" #-}+ _lhsIo_case+ {-# LINE 3932 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rulesOo_cata =+ ({-# LINE 112 "src-ag/Order.ag" #-}+ _lhsIo_cata+ {-# LINE 3938 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rulesOo_dovisit =+ ({-# LINE 117 "src-ag/Order.ag" #-}+ _lhsIo_dovisit+ {-# LINE 3944 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rulesOo_newtypes =+ ({-# LINE 111 "src-ag/Order.ag" #-}+ _lhsIo_newtypes+ {-# LINE 3950 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rulesOo_rename =+ ({-# LINE 115 "src-ag/Order.ag" #-}+ _lhsIo_rename+ {-# LINE 3956 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rulesOo_sem =+ ({-# LINE 114 "src-ag/Order.ag" #-}+ _lhsIo_sem+ {-# LINE 3962 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rulesOo_sig =+ ({-# LINE 113 "src-ag/Order.ag" #-}+ _lhsIo_sig+ {-# LINE 3968 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rulesOo_wantvisit =+ ({-# LINE 116 "src-ag/Order.ag" #-}+ _lhsIo_wantvisit+ {-# LINE 3974 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rulesOprefix =+ ({-# LINE 119 "src-ag/Order.ag" #-}+ _lhsIprefix+ {-# LINE 3980 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rulesOsyn =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIsyn+ {-# LINE 3986 "dist/build/Order" #-}+ )+ ( _childrenIattributes,_childrenIcollectChildrenInhs,_childrenIcollectChildrenSyns,_childrenIerrors,_childrenIfields,_childrenIgathAltAttrs,_childrenIgathRules,_childrenIinhs,_childrenInts,_childrenIsinglevisits,_childrenIterminals) =+ children_ _childrenOallfields _childrenOallnts _childrenOattrs _childrenOcon _childrenOinh _childrenOinhMap _childrenOmergeMap _childrenOnt _childrenOo_unbox _childrenOsyn _childrenOsynMap+ ( _rulesIdirectDep,_rulesIerrors,_rulesIgathAltAttrs,_rulesIgathRules,_rulesIinstDep,_rulesIinstVars,_rulesIlocVars,_rulesInAutoRules,_rulesInExplicitRules) =+ rules_ _rulesOallTypeSigs _rulesOallfields _rulesOallnts _rulesOaltAttrs _rulesOattrs _rulesOchildInhs _rulesOchildNts _rulesOcon _rulesOinh _rulesOinhsOfChildren _rulesOmergeMap _rulesOnt _rulesOo_case _rulesOo_cata _rulesOo_dovisit _rulesOo_newtypes _rulesOo_rename _rulesOo_sem _rulesOo_sig _rulesOo_wantvisit _rulesOprefix _rulesOsyn _rulesOsynsOfChildren+ ( _typeSigsItypeSigs) =+ typeSigs_ _typeSigsOtypeSigs+ in ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProduction,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount))))+-- Productions -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allnts : [Identifier]+ aroundMap : Map ConstructorIdent (Map Identifier [Expression])+ cVisitsMap : CVisitsMap+ inh : Attributes+ inhMap : Map Identifier Attributes+ manualAttrDepMap : AttrOrderMap+ mergeMap : Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))+ nt : Identifier+ o_case : Bool+ o_cata : Bool+ o_dovisit : Bool+ o_newtypes : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_unbox : Bool+ o_wantvisit : Bool+ prefix : String+ syn : Attributes+ synMap : Map Identifier Attributes+ chained attribute:+ vcount : Int+ synthesized attributes:+ additionalDep : Seq Edge+ aroundDep : Seq Edge+ cProductions : CProductions+ cons : [ConstructorIdent]+ directDep : Seq Edge+ errors : Seq Error+ instDep : Seq Edge+ mergeDep : Seq Edge+ nAutoRules : Int+ nExplicitRules : Int+ rules : Seq (Vertex,CRule)+ alternatives:+ alternative Cons:+ child hd : Production + child tl : Productions + alternative Nil:+-}+-- cata+sem_Productions :: Productions ->+ T_Productions+sem_Productions list =+ (Prelude.foldr sem_Productions_Cons sem_Productions_Nil (Prelude.map sem_Production list))+-- semantic domain+newtype T_Productions = T_Productions (([Identifier]) ->+ (Map ConstructorIdent (Map Identifier [Expression])) ->+ CVisitsMap ->+ Attributes ->+ (Map Identifier Attributes) ->+ AttrOrderMap ->+ (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->+ Identifier ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ String ->+ Attributes ->+ (Map Identifier Attributes) ->+ Int ->+ ( (Seq Edge),(Seq Edge),CProductions,([ConstructorIdent]),(Seq Edge),(Seq Error),(Seq Edge),(Seq Edge),Int,Int,(Seq (Vertex,CRule)),Int))+data Inh_Productions = Inh_Productions {allnts_Inh_Productions :: !(([Identifier])),aroundMap_Inh_Productions :: !((Map ConstructorIdent (Map Identifier [Expression]))),cVisitsMap_Inh_Productions :: !(CVisitsMap),inh_Inh_Productions :: !(Attributes),inhMap_Inh_Productions :: !((Map Identifier Attributes)),manualAttrDepMap_Inh_Productions :: !(AttrOrderMap),mergeMap_Inh_Productions :: !((Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))),nt_Inh_Productions :: !(Identifier),o_case_Inh_Productions :: !(Bool),o_cata_Inh_Productions :: !(Bool),o_dovisit_Inh_Productions :: !(Bool),o_newtypes_Inh_Productions :: !(Bool),o_rename_Inh_Productions :: !(Bool),o_sem_Inh_Productions :: !(Bool),o_sig_Inh_Productions :: !(Bool),o_unbox_Inh_Productions :: !(Bool),o_wantvisit_Inh_Productions :: !(Bool),prefix_Inh_Productions :: !(String),syn_Inh_Productions :: !(Attributes),synMap_Inh_Productions :: !((Map Identifier Attributes)),vcount_Inh_Productions :: !(Int)}+data Syn_Productions = Syn_Productions {additionalDep_Syn_Productions :: !((Seq Edge)),aroundDep_Syn_Productions :: !((Seq Edge)),cProductions_Syn_Productions :: !(CProductions),cons_Syn_Productions :: !(([ConstructorIdent])),directDep_Syn_Productions :: !((Seq Edge)),errors_Syn_Productions :: !((Seq Error)),instDep_Syn_Productions :: !((Seq Edge)),mergeDep_Syn_Productions :: !((Seq Edge)),nAutoRules_Syn_Productions :: !(Int),nExplicitRules_Syn_Productions :: !(Int),rules_Syn_Productions :: !((Seq (Vertex,CRule))),vcount_Syn_Productions :: !(Int)}+wrap_Productions :: T_Productions ->+ Inh_Productions ->+ Syn_Productions+wrap_Productions (T_Productions sem) (Inh_Productions _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount) =+ (let ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProductions,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount) = sem _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount+ in (Syn_Productions _lhsOadditionalDep _lhsOaroundDep _lhsOcProductions _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount))+sem_Productions_Cons :: T_Production ->+ T_Productions ->+ T_Productions+sem_Productions_Cons (T_Production hd_) (T_Productions tl_) =+ (T_Productions (\ _lhsIallnts+ _lhsIaroundMap+ _lhsIcVisitsMap+ _lhsIinh+ _lhsIinhMap+ _lhsImanualAttrDepMap+ _lhsImergeMap+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_dovisit+ _lhsIo_newtypes+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_unbox+ _lhsIo_wantvisit+ _lhsIprefix+ _lhsIsyn+ _lhsIsynMap+ _lhsIvcount ->+ (let _lhsOcProductions :: CProductions+ _lhsOadditionalDep :: (Seq Edge)+ _lhsOaroundDep :: (Seq Edge)+ _lhsOcons :: ([ConstructorIdent])+ _lhsOdirectDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOinstDep :: (Seq Edge)+ _lhsOmergeDep :: (Seq Edge)+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ _lhsOrules :: (Seq (Vertex,CRule))+ _lhsOvcount :: Int+ _hdOallnts :: ([Identifier])+ _hdOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))+ _hdOcVisitsMap :: CVisitsMap+ _hdOinh :: Attributes+ _hdOinhMap :: (Map Identifier Attributes)+ _hdOmanualAttrDepMap :: AttrOrderMap+ _hdOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))+ _hdOnt :: Identifier+ _hdOo_case :: Bool+ _hdOo_cata :: Bool+ _hdOo_dovisit :: Bool+ _hdOo_newtypes :: Bool+ _hdOo_rename :: Bool+ _hdOo_sem :: Bool+ _hdOo_sig :: Bool+ _hdOo_unbox :: Bool+ _hdOo_wantvisit :: Bool+ _hdOprefix :: String+ _hdOsyn :: Attributes+ _hdOsynMap :: (Map Identifier Attributes)+ _hdOvcount :: Int+ _tlOallnts :: ([Identifier])+ _tlOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))+ _tlOcVisitsMap :: CVisitsMap+ _tlOinh :: Attributes+ _tlOinhMap :: (Map Identifier Attributes)+ _tlOmanualAttrDepMap :: AttrOrderMap+ _tlOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))+ _tlOnt :: Identifier+ _tlOo_case :: Bool+ _tlOo_cata :: Bool+ _tlOo_dovisit :: Bool+ _tlOo_newtypes :: Bool+ _tlOo_rename :: Bool+ _tlOo_sem :: Bool+ _tlOo_sig :: Bool+ _tlOo_unbox :: Bool+ _tlOo_wantvisit :: Bool+ _tlOprefix :: String+ _tlOsyn :: Attributes+ _tlOsynMap :: (Map Identifier Attributes)+ _tlOvcount :: Int+ _hdIadditionalDep :: (Seq Edge)+ _hdIaroundDep :: (Seq Edge)+ _hdIcProduction :: CProduction+ _hdIcons :: ([ConstructorIdent])+ _hdIdirectDep :: (Seq Edge)+ _hdIerrors :: (Seq Error)+ _hdIinstDep :: (Seq Edge)+ _hdImergeDep :: (Seq Edge)+ _hdInAutoRules :: Int+ _hdInExplicitRules :: Int+ _hdIrules :: (Seq (Vertex,CRule))+ _hdIvcount :: Int+ _tlIadditionalDep :: (Seq Edge)+ _tlIaroundDep :: (Seq Edge)+ _tlIcProductions :: CProductions+ _tlIcons :: ([ConstructorIdent])+ _tlIdirectDep :: (Seq Edge)+ _tlIerrors :: (Seq Error)+ _tlIinstDep :: (Seq Edge)+ _tlImergeDep :: (Seq Edge)+ _tlInAutoRules :: Int+ _tlInExplicitRules :: Int+ _tlIrules :: (Seq (Vertex,CRule))+ _tlIvcount :: Int+ -- "src-ag/Order.ag"(line 627, column 12)+ _lhsOcProductions =+ ({-# LINE 627 "src-ag/Order.ag" #-}+ _hdIcProduction : _tlIcProductions+ {-# LINE 4182 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 282, column 60)+ _lhsOadditionalDep =+ ({-# LINE 282 "src-ag/Order.ag" #-}+ _hdIadditionalDep Seq.>< _tlIadditionalDep+ {-# LINE 4188 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 403, column 24)+ _lhsOaroundDep =+ ({-# LINE 403 "src-ag/Order.ag" #-}+ _hdIaroundDep Seq.>< _tlIaroundDep+ {-# LINE 4194 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 521, column 40)+ _lhsOcons =+ ({-# LINE 521 "src-ag/Order.ag" #-}+ _hdIcons ++ _tlIcons+ {-# LINE 4200 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 268, column 33)+ _lhsOdirectDep =+ ({-# LINE 268 "src-ag/Order.ag" #-}+ _hdIdirectDep Seq.>< _tlIdirectDep+ {-# LINE 4206 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 4212 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 311, column 31)+ _lhsOinstDep =+ ({-# LINE 311 "src-ag/Order.ag" #-}+ _hdIinstDep Seq.>< _tlIinstDep+ {-# LINE 4218 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 366, column 18)+ _lhsOmergeDep =+ ({-# LINE 366 "src-ag/Order.ag" #-}+ _hdImergeDep Seq.>< _tlImergeDep+ {-# LINE 4224 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnAutoRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ _hdInAutoRules + _tlInAutoRules+ {-# LINE 4230 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ _hdInExplicitRules + _tlInExplicitRules+ {-# LINE 4236 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 258, column 18)+ _lhsOrules =+ ({-# LINE 258 "src-ag/Order.ag" #-}+ _hdIrules Seq.>< _tlIrules+ {-# LINE 4242 "dist/build/Order" #-}+ )+ -- copy rule (up)+ _lhsOvcount =+ ({-# LINE 257 "src-ag/Order.ag" #-}+ _tlIvcount+ {-# LINE 4248 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOallnts =+ ({-# LINE 648 "src-ag/Order.ag" #-}+ _lhsIallnts+ {-# LINE 4254 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOaroundMap =+ ({-# LINE 409 "src-ag/Order.ag" #-}+ _lhsIaroundMap+ {-# LINE 4260 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOcVisitsMap =+ ({-# LINE 602 "src-ag/Order.ag" #-}+ _lhsIcVisitsMap+ {-# LINE 4266 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIinh+ {-# LINE 4272 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 4278 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOmanualAttrDepMap =+ ({-# LINE 282 "src-ag/Order.ag" #-}+ _lhsImanualAttrDepMap+ {-# LINE 4284 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 356 "src-ag/Order.ag" #-}+ _lhsImergeMap+ {-# LINE 4290 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsInt+ {-# LINE 4296 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_case =+ ({-# LINE 118 "src-ag/Order.ag" #-}+ _lhsIo_case+ {-# LINE 4302 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_cata =+ ({-# LINE 112 "src-ag/Order.ag" #-}+ _lhsIo_cata+ {-# LINE 4308 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_dovisit =+ ({-# LINE 117 "src-ag/Order.ag" #-}+ _lhsIo_dovisit+ {-# LINE 4314 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_newtypes =+ ({-# LINE 111 "src-ag/Order.ag" #-}+ _lhsIo_newtypes+ {-# LINE 4320 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 115 "src-ag/Order.ag" #-}+ _lhsIo_rename+ {-# LINE 4326 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_sem =+ ({-# LINE 114 "src-ag/Order.ag" #-}+ _lhsIo_sem+ {-# LINE 4332 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_sig =+ ({-# LINE 113 "src-ag/Order.ag" #-}+ _lhsIo_sig+ {-# LINE 4338 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_unbox =+ ({-# LINE 120 "src-ag/Order.ag" #-}+ _lhsIo_unbox+ {-# LINE 4344 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_wantvisit =+ ({-# LINE 116 "src-ag/Order.ag" #-}+ _lhsIo_wantvisit+ {-# LINE 4350 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOprefix =+ ({-# LINE 119 "src-ag/Order.ag" #-}+ _lhsIprefix+ {-# LINE 4356 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIsyn+ {-# LINE 4362 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 4368 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOvcount =+ ({-# LINE 257 "src-ag/Order.ag" #-}+ _lhsIvcount+ {-# LINE 4374 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOallnts =+ ({-# LINE 648 "src-ag/Order.ag" #-}+ _lhsIallnts+ {-# LINE 4380 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOaroundMap =+ ({-# LINE 409 "src-ag/Order.ag" #-}+ _lhsIaroundMap+ {-# LINE 4386 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOcVisitsMap =+ ({-# LINE 602 "src-ag/Order.ag" #-}+ _lhsIcVisitsMap+ {-# LINE 4392 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIinh+ {-# LINE 4398 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 4404 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOmanualAttrDepMap =+ ({-# LINE 282 "src-ag/Order.ag" #-}+ _lhsImanualAttrDepMap+ {-# LINE 4410 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 356 "src-ag/Order.ag" #-}+ _lhsImergeMap+ {-# LINE 4416 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsInt+ {-# LINE 4422 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_case =+ ({-# LINE 118 "src-ag/Order.ag" #-}+ _lhsIo_case+ {-# LINE 4428 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_cata =+ ({-# LINE 112 "src-ag/Order.ag" #-}+ _lhsIo_cata+ {-# LINE 4434 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_dovisit =+ ({-# LINE 117 "src-ag/Order.ag" #-}+ _lhsIo_dovisit+ {-# LINE 4440 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_newtypes =+ ({-# LINE 111 "src-ag/Order.ag" #-}+ _lhsIo_newtypes+ {-# LINE 4446 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 115 "src-ag/Order.ag" #-}+ _lhsIo_rename+ {-# LINE 4452 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_sem =+ ({-# LINE 114 "src-ag/Order.ag" #-}+ _lhsIo_sem+ {-# LINE 4458 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_sig =+ ({-# LINE 113 "src-ag/Order.ag" #-}+ _lhsIo_sig+ {-# LINE 4464 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_unbox =+ ({-# LINE 120 "src-ag/Order.ag" #-}+ _lhsIo_unbox+ {-# LINE 4470 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_wantvisit =+ ({-# LINE 116 "src-ag/Order.ag" #-}+ _lhsIo_wantvisit+ {-# LINE 4476 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOprefix =+ ({-# LINE 119 "src-ag/Order.ag" #-}+ _lhsIprefix+ {-# LINE 4482 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIsyn+ {-# LINE 4488 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 4494 "dist/build/Order" #-}+ )+ -- copy rule (chain)+ _tlOvcount =+ ({-# LINE 257 "src-ag/Order.ag" #-}+ _hdIvcount+ {-# LINE 4500 "dist/build/Order" #-}+ )+ ( _hdIadditionalDep,_hdIaroundDep,_hdIcProduction,_hdIcons,_hdIdirectDep,_hdIerrors,_hdIinstDep,_hdImergeDep,_hdInAutoRules,_hdInExplicitRules,_hdIrules,_hdIvcount) =+ hd_ _hdOallnts _hdOaroundMap _hdOcVisitsMap _hdOinh _hdOinhMap _hdOmanualAttrDepMap _hdOmergeMap _hdOnt _hdOo_case _hdOo_cata _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_unbox _hdOo_wantvisit _hdOprefix _hdOsyn _hdOsynMap _hdOvcount+ ( _tlIadditionalDep,_tlIaroundDep,_tlIcProductions,_tlIcons,_tlIdirectDep,_tlIerrors,_tlIinstDep,_tlImergeDep,_tlInAutoRules,_tlInExplicitRules,_tlIrules,_tlIvcount) =+ tl_ _tlOallnts _tlOaroundMap _tlOcVisitsMap _tlOinh _tlOinhMap _tlOmanualAttrDepMap _tlOmergeMap _tlOnt _tlOo_case _tlOo_cata _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_unbox _tlOo_wantvisit _tlOprefix _tlOsyn _tlOsynMap _tlOvcount+ in ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProductions,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount))))+sem_Productions_Nil :: T_Productions+sem_Productions_Nil =+ (T_Productions (\ _lhsIallnts+ _lhsIaroundMap+ _lhsIcVisitsMap+ _lhsIinh+ _lhsIinhMap+ _lhsImanualAttrDepMap+ _lhsImergeMap+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_dovisit+ _lhsIo_newtypes+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_unbox+ _lhsIo_wantvisit+ _lhsIprefix+ _lhsIsyn+ _lhsIsynMap+ _lhsIvcount ->+ (let _lhsOcProductions :: CProductions+ _lhsOadditionalDep :: (Seq Edge)+ _lhsOaroundDep :: (Seq Edge)+ _lhsOcons :: ([ConstructorIdent])+ _lhsOdirectDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOinstDep :: (Seq Edge)+ _lhsOmergeDep :: (Seq Edge)+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ _lhsOrules :: (Seq (Vertex,CRule))+ _lhsOvcount :: Int+ -- "src-ag/Order.ag"(line 628, column 12)+ _lhsOcProductions =+ ({-# LINE 628 "src-ag/Order.ag" #-}+ []+ {-# LINE 4546 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 282, column 60)+ _lhsOadditionalDep =+ ({-# LINE 282 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 4552 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 403, column 24)+ _lhsOaroundDep =+ ({-# LINE 403 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 4558 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 521, column 40)+ _lhsOcons =+ ({-# LINE 521 "src-ag/Order.ag" #-}+ []+ {-# LINE 4564 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 268, column 33)+ _lhsOdirectDep =+ ({-# LINE 268 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 4570 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 4576 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 311, column 31)+ _lhsOinstDep =+ ({-# LINE 311 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 4582 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 366, column 18)+ _lhsOmergeDep =+ ({-# LINE 366 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 4588 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnAutoRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ 0+ {-# LINE 4594 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ 0+ {-# LINE 4600 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 258, column 18)+ _lhsOrules =+ ({-# LINE 258 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 4606 "dist/build/Order" #-}+ )+ -- copy rule (chain)+ _lhsOvcount =+ ({-# LINE 257 "src-ag/Order.ag" #-}+ _lhsIvcount+ {-# LINE 4612 "dist/build/Order" #-}+ )+ in ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProductions,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount))))+-- Rule --------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allTypeSigs : Map Identifier Type+ allfields : [(Identifier,Type,ChildKind)]+ allnts : [Identifier]+ altAttrs : Map AltAttr Vertex+ attrs : [(Identifier,Identifier)]+ childInhs : Map Identifier Attributes+ childNts : Map Identifier NontermIdent+ con : Identifier+ inh : Attributes+ inhsOfChildren : Map Identifier Attributes+ mergeMap : Map Identifier (Identifier,[Identifier])+ nt : Identifier+ o_case : Bool+ o_cata : Bool+ o_dovisit : Bool+ o_newtypes : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_wantvisit : Bool+ prefix : String+ syn : Attributes+ synsOfChildren : Map Identifier Attributes+ synthesized attributes:+ directDep : Seq Edge+ errors : Seq Error+ gathAltAttrs : [AltAttr]+ gathRules : Seq CRule+ instDep : Seq Edge+ instVars : [Identifier]+ locVars : [Identifier]+ nAutoRules : Int+ nExplicitRules : Int+ alternatives:+ alternative Rule:+ child mbName : {Maybe Identifier}+ child pattern : Pattern + child rhs : Expression + child owrt : {Bool}+ child origin : {String}+ child explicit : {Bool}+ child pure : {Bool}+ child identity : {Bool}+ child mbError : {Maybe Error}+ child eager : {Bool}+ visit 0:+ local defines : _+ local gathRules : _+ local instDep1 : _+ local instDep2 : _+-}+-- cata+sem_Rule :: Rule ->+ T_Rule+sem_Rule (Rule _mbName _pattern _rhs _owrt _origin _explicit _pure _identity _mbError _eager) =+ (sem_Rule_Rule _mbName (sem_Pattern _pattern) (sem_Expression _rhs) _owrt _origin _explicit _pure _identity _mbError _eager)+-- semantic domain+newtype T_Rule = T_Rule ((Map Identifier Type) ->+ ([(Identifier,Type,ChildKind)]) ->+ ([Identifier]) ->+ (Map AltAttr Vertex) ->+ ([(Identifier,Identifier)]) ->+ (Map Identifier Attributes) ->+ (Map Identifier NontermIdent) ->+ Identifier ->+ Attributes ->+ (Map Identifier Attributes) ->+ (Map Identifier (Identifier,[Identifier])) ->+ Identifier ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ String ->+ Attributes ->+ (Map Identifier Attributes) ->+ ( (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,ChildKind)])),allnts_Inh_Rule :: !(([Identifier])),altAttrs_Inh_Rule :: !((Map AltAttr Vertex)),attrs_Inh_Rule :: !(([(Identifier,Identifier)])),childInhs_Inh_Rule :: !((Map Identifier Attributes)),childNts_Inh_Rule :: !((Map Identifier NontermIdent)),con_Inh_Rule :: !(Identifier),inh_Inh_Rule :: !(Attributes),inhsOfChildren_Inh_Rule :: !((Map Identifier Attributes)),mergeMap_Inh_Rule :: !((Map Identifier (Identifier,[Identifier]))),nt_Inh_Rule :: !(Identifier),o_case_Inh_Rule :: !(Bool),o_cata_Inh_Rule :: !(Bool),o_dovisit_Inh_Rule :: !(Bool),o_newtypes_Inh_Rule :: !(Bool),o_rename_Inh_Rule :: !(Bool),o_sem_Inh_Rule :: !(Bool),o_sig_Inh_Rule :: !(Bool),o_wantvisit_Inh_Rule :: !(Bool),prefix_Inh_Rule :: !(String),syn_Inh_Rule :: !(Attributes),synsOfChildren_Inh_Rule :: !((Map Identifier Attributes))}+data Syn_Rule = Syn_Rule {directDep_Syn_Rule :: !((Seq Edge)),errors_Syn_Rule :: !((Seq Error)),gathAltAttrs_Syn_Rule :: !(([AltAttr])),gathRules_Syn_Rule :: !((Seq CRule)),instDep_Syn_Rule :: !((Seq Edge)),instVars_Syn_Rule :: !(([Identifier])),locVars_Syn_Rule :: !(([Identifier])),nAutoRules_Syn_Rule :: !(Int),nExplicitRules_Syn_Rule :: !(Int)}+wrap_Rule :: T_Rule ->+ Inh_Rule ->+ Syn_Rule+wrap_Rule (T_Rule sem) (Inh_Rule _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren) =+ (let ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules) = sem _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren+ in (Syn_Rule _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules))+sem_Rule_Rule :: (Maybe Identifier) ->+ T_Pattern ->+ T_Expression ->+ Bool ->+ String ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Error) ->+ Bool ->+ T_Rule+sem_Rule_Rule mbName_ (T_Pattern pattern_) (T_Expression rhs_) owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_ =+ (T_Rule (\ _lhsIallTypeSigs+ _lhsIallfields+ _lhsIallnts+ _lhsIaltAttrs+ _lhsIattrs+ _lhsIchildInhs+ _lhsIchildNts+ _lhsIcon+ _lhsIinh+ _lhsIinhsOfChildren+ _lhsImergeMap+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_dovisit+ _lhsIo_newtypes+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_wantvisit+ _lhsIprefix+ _lhsIsyn+ _lhsIsynsOfChildren ->+ (let _lhsOnExplicitRules :: Int+ _lhsOnAutoRules :: Int+ _lhsOdirectDep :: (Seq Edge)+ _lhsOinstDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOgathRules :: (Seq CRule)+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _patternOallTypeSigs :: (Map Identifier Type)+ _patternOaltAttrs :: (Map AltAttr Vertex)+ _patternOcon :: Identifier+ _patternOinh :: Attributes+ _patternOnt :: Identifier+ _patternOsyn :: Attributes+ _rhsOallfields :: ([(Identifier,Type,ChildKind)])+ _rhsOallnts :: ([Identifier])+ _rhsOattrs :: ([(Identifier,Identifier)])+ _rhsOcon :: Identifier+ _rhsOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _rhsOnt :: Identifier+ _patternIcopy :: Pattern+ _patternIerrors :: (Seq Error)+ _patternIgathAltAttrs :: ([AltAttr])+ _patternIinstVars :: ([Identifier])+ _patternIlocVars :: ([Identifier])+ _patternIpatternAttrs :: ([(Identifier,Identifier,Bool)])+ _rhsIallRhsVars :: (Set (Identifier,Identifier))+ _rhsIcopy :: Expression+ _rhsIerrors :: (Seq Error)+ _rhsItextLines :: ([String])+ _rhsIusedAttrs :: ([(Identifier,Identifier)])+ _rhsIusedFields :: ([Identifier])+ _rhsIusedLocals :: ([Identifier])+ -- "src-ag/Order.ag"(line 65, column 11)+ _lhsOnExplicitRules =+ ({-# LINE 65 "src-ag/Order.ag" #-}+ if explicit_+ then 1+ else 0+ {-# LINE 4783 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 68, column 11)+ _lhsOnAutoRules =+ ({-# LINE 68 "src-ag/Order.ag" #-}+ if startsWith "use rule" origin_ || startsWith "copy rule" origin_+ then 1+ else 0+ {-# LINE 4791 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 218, column 12)+ _defines =+ ({-# LINE 218 "src-ag/Order.ag" #-}+ let tp field attr | field == _LOC || field == _INST+ = Map.lookup attr _lhsIallTypeSigs+ | field == _LHS = Map.lookup attr _lhsIsyn+ | otherwise = Map.lookup attr (findWithErr1 "Rule.defines.tp" field _lhsIchildInhs)+ typ :: Pattern -> Maybe Type+ typ (Alias field attr _) = tp field attr+ typ (Underscore _) = Nothing+ typ _ = Nothing+ in Map.fromList [ (findWithErr1 "Rule.defines" aa _lhsIaltAttrs, (field,attr,(tp field attr)))+ | (field,attr,isLocalOrInst) <- _patternIpatternAttrs+ , let aa = AltAttr field attr isLocalOrInst+ ]+ {-# LINE 4808 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 232, column 12)+ _gathRules =+ ({-# LINE 232 "src-ag/Order.ag" #-}+ let childnt field = Map.lookup field _lhsIchildNts+ in Seq.fromList [ CRule attr False True _lhsInt _lhsIcon field (childnt field) tp _patternIcopy _rhsItextLines _defines owrt_ origin_ _rhsIallRhsVars explicit_ mbName_+ | (field,attr,tp) <- Map.elems _defines+ ]+ {-# LINE 4817 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 270, column 12)+ _lhsOdirectDep =+ ({-# LINE 270 "src-ag/Order.ag" #-}+ let defined = Map.keys _defines+ used = [ Map.lookup (AltAttr field attr True) _lhsIaltAttrs | (field,attr) <- _rhsIusedAttrs]+ ++ [ Map.lookup (AltAttr _LOC attr True) _lhsIaltAttrs | attr <- _rhsIusedLocals ++ _rhsIusedFields ]+ in Seq.fromList [ (x,y) | Just x <- used, y <- defined ]+ {-# LINE 4826 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 314, column 6)+ _instDep1 =+ ({-# LINE 314 "src-ag/Order.ag" #-}+ Seq.fromList $+ [ (instVert, synVert)+ | (field,instNm,_) <- Map.elems _defines+ , field == _INST+ , synNm <- Map.keys (findWithErr2 instNm _lhsIsynsOfChildren)+ , let instAttr = AltAttr _INST instNm True+ synAttr = AltAttr instNm synNm True+ instVert = findWithErr2 instAttr _lhsIaltAttrs+ synVert = findWithErr2 synAttr _lhsIaltAttrs+ ]+ {-# LINE 4841 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 325, column 6)+ _instDep2 =+ ({-# LINE 325 "src-ag/Order.ag" #-}+ Seq.fromList $+ [ (instVert, inhVert)+ | (field,instNm,_) <- Map.elems _defines+ , field == _INST+ , inhNm <- Map.keys (findWithErr2 instNm _lhsIinhsOfChildren)+ , let instAttr = AltAttr _INST instNm True+ inhAttr = AltAttr instNm inhNm False+ instVert = findWithErr2 instAttr _lhsIaltAttrs+ inhVert = findWithErr2 inhAttr _lhsIaltAttrs+ ]+ {-# LINE 4856 "dist/build/Order" #-}+ )+ -- "src-ag/Order.ag"(line 336, column 6)+ _lhsOinstDep =+ ({-# LINE 336 "src-ag/Order.ag" #-}+ _instDep1 Seq.>< _instDep2+ {-# LINE 4862 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ _patternIerrors Seq.>< _rhsIerrors+ {-# LINE 4868 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 171, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 171 "src-ag/Order.ag" #-}+ _patternIgathAltAttrs+ {-# LINE 4874 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 207, column 23)+ _lhsOgathRules =+ ({-# LINE 207 "src-ag/Order.ag" #-}+ _gathRules+ {-# LINE 4880 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 86)+ _lhsOinstVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ _patternIinstVars+ {-# LINE 4886 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 48)+ _lhsOlocVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ _patternIlocVars+ {-# LINE 4892 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patternOallTypeSigs =+ ({-# LINE 534 "src-ag/Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 4898 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patternOaltAttrs =+ ({-# LINE 187 "src-ag/Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 4904 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patternOcon =+ ({-# LINE 91 "src-ag/Order.ag" #-}+ _lhsIcon+ {-# LINE 4910 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patternOinh =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIinh+ {-# LINE 4916 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patternOnt =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsInt+ {-# LINE 4922 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _patternOsyn =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIsyn+ {-# LINE 4928 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rhsOallfields =+ ({-# LINE 447 "src-ag/Order.ag" #-}+ _lhsIallfields+ {-# LINE 4934 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rhsOallnts =+ ({-# LINE 448 "src-ag/Order.ag" #-}+ _lhsIallnts+ {-# LINE 4940 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rhsOattrs =+ ({-# LINE 449 "src-ag/Order.ag" #-}+ _lhsIattrs+ {-# LINE 4946 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rhsOcon =+ ({-# LINE 446 "src-ag/Order.ag" #-}+ _lhsIcon+ {-# LINE 4952 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rhsOmergeMap =+ ({-# LINE 361 "src-ag/Order.ag" #-}+ _lhsImergeMap+ {-# LINE 4958 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _rhsOnt =+ ({-# LINE 446 "src-ag/Order.ag" #-}+ _lhsInt+ {-# LINE 4964 "dist/build/Order" #-}+ )+ ( _patternIcopy,_patternIerrors,_patternIgathAltAttrs,_patternIinstVars,_patternIlocVars,_patternIpatternAttrs) =+ pattern_ _patternOallTypeSigs _patternOaltAttrs _patternOcon _patternOinh _patternOnt _patternOsyn+ ( _rhsIallRhsVars,_rhsIcopy,_rhsIerrors,_rhsItextLines,_rhsIusedAttrs,_rhsIusedFields,_rhsIusedLocals) =+ rhs_ _rhsOallfields _rhsOallnts _rhsOattrs _rhsOcon _rhsOmergeMap _rhsOnt+ in ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules))))+-- Rules -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allTypeSigs : Map Identifier Type+ allfields : [(Identifier,Type,ChildKind)]+ allnts : [Identifier]+ altAttrs : Map AltAttr Vertex+ attrs : [(Identifier,Identifier)]+ childInhs : Map Identifier Attributes+ childNts : Map Identifier NontermIdent+ con : Identifier+ inh : Attributes+ inhsOfChildren : Map Identifier Attributes+ mergeMap : Map Identifier (Identifier,[Identifier])+ nt : Identifier+ o_case : Bool+ o_cata : Bool+ o_dovisit : Bool+ o_newtypes : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_wantvisit : Bool+ prefix : String+ syn : Attributes+ synsOfChildren : Map Identifier Attributes+ synthesized attributes:+ directDep : Seq Edge+ errors : Seq Error+ gathAltAttrs : [AltAttr]+ gathRules : Seq CRule+ instDep : Seq Edge+ instVars : [Identifier]+ locVars : [Identifier]+ nAutoRules : Int+ nExplicitRules : Int+ alternatives:+ alternative Cons:+ child hd : Rule + child tl : Rules + alternative Nil:+-}+-- cata+sem_Rules :: Rules ->+ T_Rules+sem_Rules list =+ (Prelude.foldr sem_Rules_Cons sem_Rules_Nil (Prelude.map sem_Rule list))+-- semantic domain+newtype T_Rules = T_Rules ((Map Identifier Type) ->+ ([(Identifier,Type,ChildKind)]) ->+ ([Identifier]) ->+ (Map AltAttr Vertex) ->+ ([(Identifier,Identifier)]) ->+ (Map Identifier Attributes) ->+ (Map Identifier NontermIdent) ->+ Identifier ->+ Attributes ->+ (Map Identifier Attributes) ->+ (Map Identifier (Identifier,[Identifier])) ->+ Identifier ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ String ->+ Attributes ->+ (Map Identifier Attributes) ->+ ( (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,ChildKind)])),allnts_Inh_Rules :: !(([Identifier])),altAttrs_Inh_Rules :: !((Map AltAttr Vertex)),attrs_Inh_Rules :: !(([(Identifier,Identifier)])),childInhs_Inh_Rules :: !((Map Identifier Attributes)),childNts_Inh_Rules :: !((Map Identifier NontermIdent)),con_Inh_Rules :: !(Identifier),inh_Inh_Rules :: !(Attributes),inhsOfChildren_Inh_Rules :: !((Map Identifier Attributes)),mergeMap_Inh_Rules :: !((Map Identifier (Identifier,[Identifier]))),nt_Inh_Rules :: !(Identifier),o_case_Inh_Rules :: !(Bool),o_cata_Inh_Rules :: !(Bool),o_dovisit_Inh_Rules :: !(Bool),o_newtypes_Inh_Rules :: !(Bool),o_rename_Inh_Rules :: !(Bool),o_sem_Inh_Rules :: !(Bool),o_sig_Inh_Rules :: !(Bool),o_wantvisit_Inh_Rules :: !(Bool),prefix_Inh_Rules :: !(String),syn_Inh_Rules :: !(Attributes),synsOfChildren_Inh_Rules :: !((Map Identifier Attributes))}+data Syn_Rules = Syn_Rules {directDep_Syn_Rules :: !((Seq Edge)),errors_Syn_Rules :: !((Seq Error)),gathAltAttrs_Syn_Rules :: !(([AltAttr])),gathRules_Syn_Rules :: !((Seq CRule)),instDep_Syn_Rules :: !((Seq Edge)),instVars_Syn_Rules :: !(([Identifier])),locVars_Syn_Rules :: !(([Identifier])),nAutoRules_Syn_Rules :: !(Int),nExplicitRules_Syn_Rules :: !(Int)}+wrap_Rules :: T_Rules ->+ Inh_Rules ->+ Syn_Rules+wrap_Rules (T_Rules sem) (Inh_Rules _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren) =+ (let ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules) = sem _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren+ in (Syn_Rules _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules))+sem_Rules_Cons :: T_Rule ->+ T_Rules ->+ T_Rules+sem_Rules_Cons (T_Rule hd_) (T_Rules tl_) =+ (T_Rules (\ _lhsIallTypeSigs+ _lhsIallfields+ _lhsIallnts+ _lhsIaltAttrs+ _lhsIattrs+ _lhsIchildInhs+ _lhsIchildNts+ _lhsIcon+ _lhsIinh+ _lhsIinhsOfChildren+ _lhsImergeMap+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_dovisit+ _lhsIo_newtypes+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_wantvisit+ _lhsIprefix+ _lhsIsyn+ _lhsIsynsOfChildren ->+ (let _lhsOdirectDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOgathRules :: (Seq CRule)+ _lhsOinstDep :: (Seq Edge)+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ _hdOallTypeSigs :: (Map Identifier Type)+ _hdOallfields :: ([(Identifier,Type,ChildKind)])+ _hdOallnts :: ([Identifier])+ _hdOaltAttrs :: (Map AltAttr Vertex)+ _hdOattrs :: ([(Identifier,Identifier)])+ _hdOchildInhs :: (Map Identifier Attributes)+ _hdOchildNts :: (Map Identifier NontermIdent)+ _hdOcon :: Identifier+ _hdOinh :: Attributes+ _hdOinhsOfChildren :: (Map Identifier Attributes)+ _hdOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _hdOnt :: Identifier+ _hdOo_case :: Bool+ _hdOo_cata :: Bool+ _hdOo_dovisit :: Bool+ _hdOo_newtypes :: Bool+ _hdOo_rename :: Bool+ _hdOo_sem :: Bool+ _hdOo_sig :: Bool+ _hdOo_wantvisit :: Bool+ _hdOprefix :: String+ _hdOsyn :: Attributes+ _hdOsynsOfChildren :: (Map Identifier Attributes)+ _tlOallTypeSigs :: (Map Identifier Type)+ _tlOallfields :: ([(Identifier,Type,ChildKind)])+ _tlOallnts :: ([Identifier])+ _tlOaltAttrs :: (Map AltAttr Vertex)+ _tlOattrs :: ([(Identifier,Identifier)])+ _tlOchildInhs :: (Map Identifier Attributes)+ _tlOchildNts :: (Map Identifier NontermIdent)+ _tlOcon :: Identifier+ _tlOinh :: Attributes+ _tlOinhsOfChildren :: (Map Identifier Attributes)+ _tlOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _tlOnt :: Identifier+ _tlOo_case :: Bool+ _tlOo_cata :: Bool+ _tlOo_dovisit :: Bool+ _tlOo_newtypes :: Bool+ _tlOo_rename :: Bool+ _tlOo_sem :: Bool+ _tlOo_sig :: Bool+ _tlOo_wantvisit :: Bool+ _tlOprefix :: String+ _tlOsyn :: Attributes+ _tlOsynsOfChildren :: (Map Identifier Attributes)+ _hdIdirectDep :: (Seq Edge)+ _hdIerrors :: (Seq Error)+ _hdIgathAltAttrs :: ([AltAttr])+ _hdIgathRules :: (Seq CRule)+ _hdIinstDep :: (Seq Edge)+ _hdIinstVars :: ([Identifier])+ _hdIlocVars :: ([Identifier])+ _hdInAutoRules :: Int+ _hdInExplicitRules :: Int+ _tlIdirectDep :: (Seq Edge)+ _tlIerrors :: (Seq Error)+ _tlIgathAltAttrs :: ([AltAttr])+ _tlIgathRules :: (Seq CRule)+ _tlIinstDep :: (Seq Edge)+ _tlIinstVars :: ([Identifier])+ _tlIlocVars :: ([Identifier])+ _tlInAutoRules :: Int+ _tlInExplicitRules :: Int+ -- use rule "src-ag/Order.ag"(line 268, column 33)+ _lhsOdirectDep =+ ({-# LINE 268 "src-ag/Order.ag" #-}+ _hdIdirectDep Seq.>< _tlIdirectDep+ {-# LINE 5156 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 5162 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 171, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 171 "src-ag/Order.ag" #-}+ _hdIgathAltAttrs ++ _tlIgathAltAttrs+ {-# LINE 5168 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 207, column 23)+ _lhsOgathRules =+ ({-# LINE 207 "src-ag/Order.ag" #-}+ _hdIgathRules Seq.>< _tlIgathRules+ {-# LINE 5174 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 311, column 31)+ _lhsOinstDep =+ ({-# LINE 311 "src-ag/Order.ag" #-}+ _hdIinstDep Seq.>< _tlIinstDep+ {-# LINE 5180 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 86)+ _lhsOinstVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ _hdIinstVars ++ _tlIinstVars+ {-# LINE 5186 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 48)+ _lhsOlocVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ _hdIlocVars ++ _tlIlocVars+ {-# LINE 5192 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnAutoRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ _hdInAutoRules + _tlInAutoRules+ {-# LINE 5198 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ _hdInExplicitRules + _tlInExplicitRules+ {-# LINE 5204 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOallTypeSigs =+ ({-# LINE 534 "src-ag/Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 5210 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOallfields =+ ({-# LINE 655 "src-ag/Order.ag" #-}+ _lhsIallfields+ {-# LINE 5216 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOallnts =+ ({-# LINE 648 "src-ag/Order.ag" #-}+ _lhsIallnts+ {-# LINE 5222 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOaltAttrs =+ ({-# LINE 187 "src-ag/Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 5228 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOattrs =+ ({-# LINE 655 "src-ag/Order.ag" #-}+ _lhsIattrs+ {-# LINE 5234 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOchildInhs =+ ({-# LINE 200 "src-ag/Order.ag" #-}+ _lhsIchildInhs+ {-# LINE 5240 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOchildNts =+ ({-# LINE 199 "src-ag/Order.ag" #-}+ _lhsIchildNts+ {-# LINE 5246 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOcon =+ ({-# LINE 91 "src-ag/Order.ag" #-}+ _lhsIcon+ {-# LINE 5252 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIinh+ {-# LINE 5258 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOinhsOfChildren =+ ({-# LINE 338 "src-ag/Order.ag" #-}+ _lhsIinhsOfChildren+ {-# LINE 5264 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 361 "src-ag/Order.ag" #-}+ _lhsImergeMap+ {-# LINE 5270 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsInt+ {-# LINE 5276 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_case =+ ({-# LINE 118 "src-ag/Order.ag" #-}+ _lhsIo_case+ {-# LINE 5282 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_cata =+ ({-# LINE 112 "src-ag/Order.ag" #-}+ _lhsIo_cata+ {-# LINE 5288 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_dovisit =+ ({-# LINE 117 "src-ag/Order.ag" #-}+ _lhsIo_dovisit+ {-# LINE 5294 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_newtypes =+ ({-# LINE 111 "src-ag/Order.ag" #-}+ _lhsIo_newtypes+ {-# LINE 5300 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 115 "src-ag/Order.ag" #-}+ _lhsIo_rename+ {-# LINE 5306 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_sem =+ ({-# LINE 114 "src-ag/Order.ag" #-}+ _lhsIo_sem+ {-# LINE 5312 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_sig =+ ({-# LINE 113 "src-ag/Order.ag" #-}+ _lhsIo_sig+ {-# LINE 5318 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOo_wantvisit =+ ({-# LINE 116 "src-ag/Order.ag" #-}+ _lhsIo_wantvisit+ {-# LINE 5324 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOprefix =+ ({-# LINE 119 "src-ag/Order.ag" #-}+ _lhsIprefix+ {-# LINE 5330 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIsyn+ {-# LINE 5336 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOsynsOfChildren =+ ({-# LINE 338 "src-ag/Order.ag" #-}+ _lhsIsynsOfChildren+ {-# LINE 5342 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOallTypeSigs =+ ({-# LINE 534 "src-ag/Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 5348 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOallfields =+ ({-# LINE 655 "src-ag/Order.ag" #-}+ _lhsIallfields+ {-# LINE 5354 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOallnts =+ ({-# LINE 648 "src-ag/Order.ag" #-}+ _lhsIallnts+ {-# LINE 5360 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOaltAttrs =+ ({-# LINE 187 "src-ag/Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 5366 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOattrs =+ ({-# LINE 655 "src-ag/Order.ag" #-}+ _lhsIattrs+ {-# LINE 5372 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOchildInhs =+ ({-# LINE 200 "src-ag/Order.ag" #-}+ _lhsIchildInhs+ {-# LINE 5378 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOchildNts =+ ({-# LINE 199 "src-ag/Order.ag" #-}+ _lhsIchildNts+ {-# LINE 5384 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOcon =+ ({-# LINE 91 "src-ag/Order.ag" #-}+ _lhsIcon+ {-# LINE 5390 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIinh+ {-# LINE 5396 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOinhsOfChildren =+ ({-# LINE 338 "src-ag/Order.ag" #-}+ _lhsIinhsOfChildren+ {-# LINE 5402 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 361 "src-ag/Order.ag" #-}+ _lhsImergeMap+ {-# LINE 5408 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsInt+ {-# LINE 5414 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_case =+ ({-# LINE 118 "src-ag/Order.ag" #-}+ _lhsIo_case+ {-# LINE 5420 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_cata =+ ({-# LINE 112 "src-ag/Order.ag" #-}+ _lhsIo_cata+ {-# LINE 5426 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_dovisit =+ ({-# LINE 117 "src-ag/Order.ag" #-}+ _lhsIo_dovisit+ {-# LINE 5432 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_newtypes =+ ({-# LINE 111 "src-ag/Order.ag" #-}+ _lhsIo_newtypes+ {-# LINE 5438 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 115 "src-ag/Order.ag" #-}+ _lhsIo_rename+ {-# LINE 5444 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_sem =+ ({-# LINE 114 "src-ag/Order.ag" #-}+ _lhsIo_sem+ {-# LINE 5450 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_sig =+ ({-# LINE 113 "src-ag/Order.ag" #-}+ _lhsIo_sig+ {-# LINE 5456 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOo_wantvisit =+ ({-# LINE 116 "src-ag/Order.ag" #-}+ _lhsIo_wantvisit+ {-# LINE 5462 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOprefix =+ ({-# LINE 119 "src-ag/Order.ag" #-}+ _lhsIprefix+ {-# LINE 5468 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 90 "src-ag/Order.ag" #-}+ _lhsIsyn+ {-# LINE 5474 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _tlOsynsOfChildren =+ ({-# LINE 338 "src-ag/Order.ag" #-}+ _lhsIsynsOfChildren+ {-# LINE 5480 "dist/build/Order" #-}+ )+ ( _hdIdirectDep,_hdIerrors,_hdIgathAltAttrs,_hdIgathRules,_hdIinstDep,_hdIinstVars,_hdIlocVars,_hdInAutoRules,_hdInExplicitRules) =+ hd_ _hdOallTypeSigs _hdOallfields _hdOallnts _hdOaltAttrs _hdOattrs _hdOchildInhs _hdOchildNts _hdOcon _hdOinh _hdOinhsOfChildren _hdOmergeMap _hdOnt _hdOo_case _hdOo_cata _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_wantvisit _hdOprefix _hdOsyn _hdOsynsOfChildren+ ( _tlIdirectDep,_tlIerrors,_tlIgathAltAttrs,_tlIgathRules,_tlIinstDep,_tlIinstVars,_tlIlocVars,_tlInAutoRules,_tlInExplicitRules) =+ tl_ _tlOallTypeSigs _tlOallfields _tlOallnts _tlOaltAttrs _tlOattrs _tlOchildInhs _tlOchildNts _tlOcon _tlOinh _tlOinhsOfChildren _tlOmergeMap _tlOnt _tlOo_case _tlOo_cata _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_wantvisit _tlOprefix _tlOsyn _tlOsynsOfChildren+ in ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules))))+sem_Rules_Nil :: T_Rules+sem_Rules_Nil =+ (T_Rules (\ _lhsIallTypeSigs+ _lhsIallfields+ _lhsIallnts+ _lhsIaltAttrs+ _lhsIattrs+ _lhsIchildInhs+ _lhsIchildNts+ _lhsIcon+ _lhsIinh+ _lhsIinhsOfChildren+ _lhsImergeMap+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_dovisit+ _lhsIo_newtypes+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_wantvisit+ _lhsIprefix+ _lhsIsyn+ _lhsIsynsOfChildren ->+ (let _lhsOdirectDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOgathRules :: (Seq CRule)+ _lhsOinstDep :: (Seq Edge)+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ -- use rule "src-ag/Order.ag"(line 268, column 33)+ _lhsOdirectDep =+ ({-# LINE 268 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 5525 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 85, column 70)+ _lhsOerrors =+ ({-# LINE 85 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 5531 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 171, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 171 "src-ag/Order.ag" #-}+ []+ {-# LINE 5537 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 207, column 23)+ _lhsOgathRules =+ ({-# LINE 207 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 5543 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 311, column 31)+ _lhsOinstDep =+ ({-# LINE 311 "src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 5549 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 86)+ _lhsOinstVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ []+ {-# LINE 5555 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 678, column 48)+ _lhsOlocVars =+ ({-# LINE 678 "src-ag/Order.ag" #-}+ []+ {-# LINE 5561 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnAutoRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ 0+ {-# LINE 5567 "dist/build/Order" #-}+ )+ -- use rule "src-ag/Order.ag"(line 62, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 62 "src-ag/Order.ag" #-}+ 0+ {-# LINE 5573 "dist/build/Order" #-}+ )+ in ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules))))+-- TypeSig -----------------------------------------------------+{-+ visit 0:+ chained attribute:+ typeSigs : Map Identifier Type+ alternatives:+ alternative TypeSig:+ child name : {Identifier}+ child tp : {Type}+-}+-- cata+sem_TypeSig :: TypeSig ->+ T_TypeSig+sem_TypeSig (TypeSig _name _tp) =+ (sem_TypeSig_TypeSig _name _tp)+-- semantic domain+newtype T_TypeSig = T_TypeSig ((Map Identifier Type) ->+ ( (Map Identifier Type)))+data Inh_TypeSig = Inh_TypeSig {typeSigs_Inh_TypeSig :: !((Map Identifier Type))}+data Syn_TypeSig = Syn_TypeSig {typeSigs_Syn_TypeSig :: !((Map Identifier Type))}+wrap_TypeSig :: T_TypeSig ->+ Inh_TypeSig ->+ Syn_TypeSig+wrap_TypeSig (T_TypeSig sem) (Inh_TypeSig _lhsItypeSigs) =+ (let ( _lhsOtypeSigs) = sem _lhsItypeSigs+ in (Syn_TypeSig _lhsOtypeSigs))+sem_TypeSig_TypeSig :: Identifier ->+ Type ->+ T_TypeSig+sem_TypeSig_TypeSig name_ tp_ =+ (T_TypeSig (\ _lhsItypeSigs ->+ (let _lhsOtypeSigs :: (Map Identifier Type)+ -- "src-ag/Order.ag"(line 532, column 13)+ _lhsOtypeSigs =+ ({-# LINE 532 "src-ag/Order.ag" #-}+ Map.insert name_ tp_ _lhsItypeSigs+ {-# LINE 5612 "dist/build/Order" #-}+ )+ in ( _lhsOtypeSigs))))+-- TypeSigs ----------------------------------------------------+{-+ visit 0:+ chained attribute:+ typeSigs : Map Identifier Type+ alternatives:+ alternative Cons:+ child hd : TypeSig + child tl : TypeSigs + alternative Nil:+-}+-- cata+sem_TypeSigs :: TypeSigs ->+ T_TypeSigs+sem_TypeSigs list =+ (Prelude.foldr sem_TypeSigs_Cons sem_TypeSigs_Nil (Prelude.map sem_TypeSig list))+-- semantic domain+newtype T_TypeSigs = T_TypeSigs ((Map Identifier Type) ->+ ( (Map Identifier Type)))+data Inh_TypeSigs = Inh_TypeSigs {typeSigs_Inh_TypeSigs :: !((Map Identifier Type))}+data Syn_TypeSigs = Syn_TypeSigs {typeSigs_Syn_TypeSigs :: !((Map Identifier Type))}+wrap_TypeSigs :: T_TypeSigs ->+ Inh_TypeSigs ->+ Syn_TypeSigs+wrap_TypeSigs (T_TypeSigs sem) (Inh_TypeSigs _lhsItypeSigs) =+ (let ( _lhsOtypeSigs) = sem _lhsItypeSigs+ in (Syn_TypeSigs _lhsOtypeSigs))+sem_TypeSigs_Cons :: T_TypeSig ->+ T_TypeSigs ->+ T_TypeSigs+sem_TypeSigs_Cons (T_TypeSig hd_) (T_TypeSigs tl_) =+ (T_TypeSigs (\ _lhsItypeSigs ->+ (let _lhsOtypeSigs :: (Map Identifier Type)+ _hdOtypeSigs :: (Map Identifier Type)+ _tlOtypeSigs :: (Map Identifier Type)+ _hdItypeSigs :: (Map Identifier Type)+ _tlItypeSigs :: (Map Identifier Type)+ -- copy rule (up)+ _lhsOtypeSigs =+ ({-# LINE 528 "src-ag/Order.ag" #-}+ _tlItypeSigs+ {-# LINE 5656 "dist/build/Order" #-}+ )+ -- copy rule (down)+ _hdOtypeSigs =+ ({-# LINE 528 "src-ag/Order.ag" #-}+ _lhsItypeSigs+ {-# LINE 5662 "dist/build/Order" #-}+ )+ -- copy rule (chain)+ _tlOtypeSigs =+ ({-# LINE 528 "src-ag/Order.ag" #-}+ _hdItypeSigs+ {-# LINE 5668 "dist/build/Order" #-}+ )+ ( _hdItypeSigs) =+ hd_ _hdOtypeSigs+ ( _tlItypeSigs) =+ tl_ _tlOtypeSigs+ in ( _lhsOtypeSigs))))+sem_TypeSigs_Nil :: T_TypeSigs+sem_TypeSigs_Nil =+ (T_TypeSigs (\ _lhsItypeSigs ->+ (let _lhsOtypeSigs :: (Map Identifier Type)+ -- copy rule (chain)+ _lhsOtypeSigs =+ ({-# LINE 528 "src-ag/Order.ag" #-}+ _lhsItypeSigs+ {-# LINE 5683 "dist/build/Order" #-}+ )+ in ( _lhsOtypeSigs))))
src-derived/Patterns.hs view
@@ -1,18 +1,18 @@ --- UUAGC 0.9.39.1.0 (src-ag/Patterns.ag)+-- UUAGC 0.9.40.1 (src-ag/Patterns.ag) module Patterns where {-# LINE 2 "src-ag/Patterns.ag" #-} -- Patterns.ag imports import UU.Scanner.Position(Pos) import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 11 "dist/build/uuagc/uuagc-tmp/Patterns.hs" #-}+{-# LINE 11 "dist/build/Patterns.hs" #-} -- Pattern ----------------------------------------------------- {- visit 0: synthesized attribute:- copy : SELF + copy : Pattern alternatives: alternative Alias: child field : {Identifier}@@ -39,17 +39,17 @@ visit 0: local copy : _ -}-data Pattern = Alias (Identifier) (Identifier) (Pattern ) - | Constr (ConstructorIdent) (Patterns ) - | Irrefutable (Pattern ) - | Product (Pos) (Patterns ) - | Underscore (Pos) - deriving ( Show)+data Pattern = Alias (Identifier) (Identifier) (Pattern)+ | Constr (ConstructorIdent) (Patterns)+ | Irrefutable (Pattern)+ | Product (Pos) (Patterns)+ | Underscore (Pos)+ deriving ( Show) -- Patterns ---------------------------------------------------- {- visit 0: synthesized attribute:- copy : SELF + copy : Patterns alternatives: alternative Cons: child hd : Pattern @@ -60,4 +60,4 @@ visit 0: local copy : _ -}-type Patterns = [Pattern ]+type Patterns = [Pattern]
src-derived/PrintCode.hs view
@@ -1,4118 +1,4119 @@ {-# OPTIONS_GHC -XBangPatterns #-} --- UUAGC 0.9.39.1.0 (src-ag/PrintCode.ag)-module PrintCode where-{-# LINE 10 "src-ag/PrintCode.ag" #-}--import Data.Char (isAlphaNum)-import Pretty-import Code-import Patterns-import Options-import CommonTypes (attrname, _LOC, getName, nullIdent)-import Data.List(intersperse)-import System.IO-import System.Directory-import System.FilePath-import CommonTypes(BlockInfo, BlockKind(..), identifier)-{-# LINE 19 "dist/build/uuagc/uuagc-tmp/PrintCode.hs" #-}--{-# LINE 2 "src-ag/Code.ag" #-}--import Pretty-import Patterns-import Data.List(partition)-import Data.Set(Set)-import qualified Data.Set as Set-import Data.Map(Map)-import qualified Data.Map as Map-{-# LINE 30 "dist/build/uuagc/uuagc-tmp/PrintCode.hs" #-}--{-# LINE 2 "src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 37 "dist/build/uuagc/uuagc-tmp/PrintCode.hs" #-}-{-# LINE 24 "src-ag/PrintCode.ag" #-}--type PP_Docs = [PP_Doc]-{-# LINE 41 "dist/build/uuagc/uuagc-tmp/PrintCode.hs" #-}--{-# LINE 28 "src-ag/PrintCode.ag" #-}--ppMultiSeqH :: [PP_Doc] -> PP_Doc -> PP_Doc-ppMultiSeqH = ppMultiSeq' (>#<)--ppMultiSeqV :: [PP_Doc] -> PP_Doc -> PP_Doc-ppMultiSeqV = ppMultiSeq' (>-<)--ppMultiSeq' :: (PP_Doc -> PP_Doc -> PP_Doc) -> [PP_Doc] -> PP_Doc -> PP_Doc-ppMultiSeq' next strictArgs expr- = foldr (\v r -> (v >#< "`seq`") `next` pp_parens r) expr strictArgs-{-# LINE 54 "dist/build/uuagc/uuagc-tmp/PrintCode.hs" #-}--{-# LINE 300 "src-ag/PrintCode.ag" #-}---reallySimple :: String -> Bool-reallySimple = and . map (\x -> isAlphaNum x || x=='_')--ppTuple True pps = "(" >|< pp_block " " (replicate (length pps `max` 1) ')') ",(" pps-ppTuple False pps = "(" >|< pp_block " " ")" "," pps-ppUnboxedTuple True pps = "(# " >|< pp_block " " (concat $ replicate (length pps `max` 1) " #)") ",(# " pps-ppUnboxedTuple False pps = "(# " >|< pp_block " " " #)" "," pps--{-# LINE 67 "dist/build/uuagc/uuagc-tmp/PrintCode.hs" #-}--{-# LINE 399 "src-ag/PrintCode.ag" #-}--locname' n = "_loc_" ++ getName n-{-# LINE 72 "dist/build/uuagc/uuagc-tmp/PrintCode.hs" #-}--{-# LINE 473 "src-ag/PrintCode.ag" #-}--renderDocs :: [PP_Doc] -> String-renderDocs pps = foldr (.) id (map (\d -> (disp d 50000) . ( '\n':) ) pps) ""-{-# LINE 78 "dist/build/uuagc/uuagc-tmp/PrintCode.hs" #-}--{-# LINE 520 "src-ag/PrintCode.ag" #-}--writeModule :: FilePath -> [PP_Doc] -> IO ()-writeModule path docs- = do bExists <- doesFileExist path- if bExists- then do input <- readFile path- seq (length input) (return ())- if input /= output- then dumpIt- else return ()- else dumpIt- where- output = renderDocs docs- dumpIt = writeFile path output-{-# LINE 95 "dist/build/uuagc/uuagc-tmp/PrintCode.hs" #-}--{-# LINE 146 "src-ag/Code.ag" #-}---- Unboxed tuples--- unbox Whether unboxed tuples are wanted or not--- inh The inherited attributes.--- If there are none, no unboxing can take place,--- because in that case the semantic function (a top-level identifier) would have an unboxed type.--- Of course we can't have an unboxed 1-tuple-mkTupleExpr :: Bool -> Bool -> Exprs -> Expr-mkTupleExpr unbox noInh exprs | not unbox || noInh || length exprs == 1 = TupleExpr exprs- | otherwise = UnboxedTupleExpr exprs-mkTupleType :: Bool -> Bool -> Types -> Type-mkTupleType unbox noInh tps | not unbox || noInh || length tps == 1 = TupleType tps- | otherwise = UnboxedTupleType tps-mkTupleLhs :: Bool -> Bool -> [String] -> Lhs-mkTupleLhs unbox noInh comps | not unbox || noInh || length comps == 1 = TupleLhs comps- | otherwise = UnboxedTupleLhs comps-{-# LINE 114 "dist/build/uuagc/uuagc-tmp/PrintCode.hs" #-}--- CaseAlt ------------------------------------------------------{-- visit 0:- inherited attributes:- nested : Bool- options : Options- outputfile : String- synthesized attribute:- pps : PP_Docs- alternatives:- alternative CaseAlt:- child left : Lhs - child expr : Expr --}--- cata-sem_CaseAlt :: CaseAlt ->- T_CaseAlt -sem_CaseAlt !(CaseAlt _left _expr ) =- (sem_CaseAlt_CaseAlt (sem_Lhs _left ) (sem_Expr _expr ) )--- semantic domain-newtype T_CaseAlt = T_CaseAlt (Bool ->- Options ->- String ->- ( PP_Docs))-data Inh_CaseAlt = Inh_CaseAlt {nested_Inh_CaseAlt :: !(Bool),options_Inh_CaseAlt :: !(Options),outputfile_Inh_CaseAlt :: !(String)}-data Syn_CaseAlt = Syn_CaseAlt {pps_Syn_CaseAlt :: !(PP_Docs)}-wrap_CaseAlt :: T_CaseAlt ->- Inh_CaseAlt ->- Syn_CaseAlt -wrap_CaseAlt !(T_CaseAlt sem ) !(Inh_CaseAlt _lhsInested _lhsIoptions _lhsIoutputfile ) =- (let ( !_lhsOpps) = sem _lhsInested _lhsIoptions _lhsIoutputfile - in (Syn_CaseAlt _lhsOpps ))-sem_CaseAlt_CaseAlt :: T_Lhs ->- T_Expr ->- T_CaseAlt -sem_CaseAlt_CaseAlt !(T_Lhs left_ ) !(T_Expr expr_ ) =- (T_CaseAlt (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 156 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 161 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 166 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOnested ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 171 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 176 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 181 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOnested ->- (case (({-# LINE 422 "src-ag/PrintCode.ag" #-}- False- {-# LINE 186 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOisDeclOfLet ->- (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of- { ( !_exprIpp) ->- (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile ) of- { ( !_leftIpp) ->- (case (({-# LINE 219 "src-ag/PrintCode.ag" #-}- ["{" >#< _leftIpp >#< "->", _exprIpp >#< "}"]- {-# LINE 195 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) }) }) }) }) }) })) )--- CaseAlts -----------------------------------------------------{-- visit 0:- inherited attributes:- nested : Bool- options : Options- outputfile : String- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : CaseAlt - child tl : CaseAlts - alternative Nil:--}--- cata-sem_CaseAlts :: CaseAlts ->- T_CaseAlts -sem_CaseAlts !list =- (Prelude.foldr sem_CaseAlts_Cons sem_CaseAlts_Nil (Prelude.map sem_CaseAlt list) )--- semantic domain-newtype T_CaseAlts = T_CaseAlts (Bool ->- Options ->- String ->- ( PP_Docs))-data Inh_CaseAlts = Inh_CaseAlts {nested_Inh_CaseAlts :: !(Bool),options_Inh_CaseAlts :: !(Options),outputfile_Inh_CaseAlts :: !(String)}-data Syn_CaseAlts = Syn_CaseAlts {pps_Syn_CaseAlts :: !(PP_Docs)}-wrap_CaseAlts :: T_CaseAlts ->- Inh_CaseAlts ->- Syn_CaseAlts -wrap_CaseAlts !(T_CaseAlts sem ) !(Inh_CaseAlts _lhsInested _lhsIoptions _lhsIoutputfile ) =- (let ( !_lhsOpps) = sem _lhsInested _lhsIoptions _lhsIoutputfile - in (Syn_CaseAlts _lhsOpps ))-sem_CaseAlts_Cons :: T_CaseAlt ->- T_CaseAlts ->- T_CaseAlts -sem_CaseAlts_Cons !(T_CaseAlt hd_ ) !(T_CaseAlts tl_ ) =- (T_CaseAlts (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 241 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 246 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOoptions ->- (case (({-# LINE 56 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 251 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOnested ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 256 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 261 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOoptions ->- (case (({-# LINE 56 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 266 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOnested ->- (case (tl_ _tlOnested _tlOoptions _tlOoutputfile ) of- { ( !_tlIpps) ->- (case (hd_ _hdOnested _hdOoptions _hdOoutputfile ) of- { ( !_hdIpps) ->- (case (({-# LINE 69 "src-ag/PrintCode.ag" #-}- _hdIpps ++ _tlIpps- {-# LINE 275 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) }) }) }) }) })) )-sem_CaseAlts_Nil :: T_CaseAlts -sem_CaseAlts_Nil =- (T_CaseAlts (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 70 "src-ag/PrintCode.ag" #-}- []- {-# LINE 286 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- Chunk --------------------------------------------------------{-- visit 0:- inherited attributes:- importBlocks : PP_Doc- isDeclOfLet : Bool- mainFile : String- mainName : String- moduleHeader : String -> String -> String -> Bool -> String- nested : Bool- options : Options- optionsLine : String- pragmaBlocks : String- textBlockMap : Map BlockInfo PP_Doc- textBlocks : PP_Doc- synthesized attributes:- appendCommon : [[PP_Doc]]- appendMain : [[PP_Doc]]- genSems : IO ()- imports : [String]- pps : PP_Docs- alternatives:- alternative Chunk:- child name : {String}- child comment : Decl - child info : Decls - child dataDef : Decls - child cataFun : Decls - child semDom : Decls - child semWrapper : Decls - child semFunctions : Decls - child semNames : {[String]}- visit 0:- local outputfile : _- local exports : _--}--- cata-sem_Chunk :: Chunk ->- T_Chunk -sem_Chunk !(Chunk _name _comment _info _dataDef _cataFun _semDom _semWrapper _semFunctions _semNames ) =- (sem_Chunk_Chunk _name (sem_Decl _comment ) (sem_Decls _info ) (sem_Decls _dataDef ) (sem_Decls _cataFun ) (sem_Decls _semDom ) (sem_Decls _semWrapper ) (sem_Decls _semFunctions ) _semNames )--- semantic domain-newtype T_Chunk = T_Chunk (PP_Doc ->- Bool ->- String ->- String ->- (String -> String -> String -> Bool -> String) ->- Bool ->- Options ->- String ->- String ->- (Map BlockInfo PP_Doc) ->- PP_Doc ->- ( ([[PP_Doc]]),([[PP_Doc]]),(IO ()),([String]),PP_Docs))-data Inh_Chunk = Inh_Chunk {importBlocks_Inh_Chunk :: !(PP_Doc),isDeclOfLet_Inh_Chunk :: !(Bool),mainFile_Inh_Chunk :: !(String),mainName_Inh_Chunk :: !(String),moduleHeader_Inh_Chunk :: !((String -> String -> String -> Bool -> String)),nested_Inh_Chunk :: !(Bool),options_Inh_Chunk :: !(Options),optionsLine_Inh_Chunk :: !(String),pragmaBlocks_Inh_Chunk :: !(String),textBlockMap_Inh_Chunk :: !((Map BlockInfo PP_Doc)),textBlocks_Inh_Chunk :: !(PP_Doc)}-data Syn_Chunk = Syn_Chunk {appendCommon_Syn_Chunk :: !(([[PP_Doc]])),appendMain_Syn_Chunk :: !(([[PP_Doc]])),genSems_Syn_Chunk :: !((IO ())),imports_Syn_Chunk :: !(([String])),pps_Syn_Chunk :: !(PP_Docs)}-wrap_Chunk :: T_Chunk ->- Inh_Chunk ->- Syn_Chunk -wrap_Chunk !(T_Chunk sem ) !(Inh_Chunk _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks ) =- (let ( !_lhsOappendCommon,!_lhsOappendMain,!_lhsOgenSems,!_lhsOimports,!_lhsOpps) = sem _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks - in (Syn_Chunk _lhsOappendCommon _lhsOappendMain _lhsOgenSems _lhsOimports _lhsOpps ))-sem_Chunk_Chunk :: String ->- T_Decl ->- T_Decls ->- T_Decls ->- T_Decls ->- T_Decls ->- T_Decls ->- T_Decls ->- ([String]) ->- T_Chunk -sem_Chunk_Chunk !name_ !(T_Decl comment_ ) !(T_Decls info_ ) !(T_Decls dataDef_ ) !(T_Decls cataFun_ ) !(T_Decls semDom_ ) !(T_Decls semWrapper_ ) !(T_Decls semFunctions_ ) !semNames_ =- (T_Chunk (\ (!_lhsIimportBlocks)- (!_lhsIisDeclOfLet)- (!_lhsImainFile)- (!_lhsImainName)- (!_lhsImoduleHeader)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoptionsLine)- (!_lhsIpragmaBlocks)- (!_lhsItextBlockMap)- (!_lhsItextBlocks) ->- (case (({-# LINE 44 "src-ag/PrintCode.ag" #-}- if sepSemMods _lhsIoptions- then replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ "_" ++ name_)- else _lhsImainFile- {-# LINE 378 "src-ag/PrintCode.hs" #-}- )) of- { !_outputfile ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _outputfile- {-# LINE 383 "src-ag/PrintCode.hs" #-}- )) of- { !_semDomOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 388 "src-ag/PrintCode.hs" #-}- )) of- { !_semDomOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 393 "src-ag/PrintCode.hs" #-}- )) of- { !_semDomOnested ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 398 "src-ag/PrintCode.hs" #-}- )) of- { !_semDomOisDeclOfLet ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _outputfile- {-# LINE 403 "src-ag/PrintCode.hs" #-}- )) of- { !_dataDefOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 408 "src-ag/PrintCode.hs" #-}- )) of- { !_dataDefOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 413 "src-ag/PrintCode.hs" #-}- )) of- { !_dataDefOnested ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 418 "src-ag/PrintCode.hs" #-}- )) of- { !_dataDefOisDeclOfLet ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _outputfile- {-# LINE 423 "src-ag/PrintCode.hs" #-}- )) of- { !_commentOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 428 "src-ag/PrintCode.hs" #-}- )) of- { !_commentOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 433 "src-ag/PrintCode.hs" #-}- )) of- { !_commentOnested ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 438 "src-ag/PrintCode.hs" #-}- )) of- { !_commentOisDeclOfLet ->- (case (semDom_ _semDomOisDeclOfLet _semDomOnested _semDomOoptions _semDomOoutputfile ) of- { ( !_semDomIpps) ->- (case (dataDef_ _dataDefOisDeclOfLet _dataDefOnested _dataDefOoptions _dataDefOoutputfile ) of- { ( !_dataDefIpps) ->- (case (comment_ _commentOisDeclOfLet _commentOnested _commentOoptions _commentOoutputfile ) of- { ( !_commentIpp) ->- (case (({-# LINE 487 "src-ag/PrintCode.ag" #-}- [ [_commentIpp]- , _dataDefIpps- , _semDomIpps- ]- {-# LINE 452 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOappendCommon ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _outputfile- {-# LINE 457 "src-ag/PrintCode.hs" #-}- )) of- { !_semWrapperOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 462 "src-ag/PrintCode.hs" #-}- )) of- { !_semWrapperOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 467 "src-ag/PrintCode.hs" #-}- )) of- { !_semWrapperOnested ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 472 "src-ag/PrintCode.hs" #-}- )) of- { !_semWrapperOisDeclOfLet ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _outputfile- {-# LINE 477 "src-ag/PrintCode.hs" #-}- )) of- { !_cataFunOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 482 "src-ag/PrintCode.hs" #-}- )) of- { !_cataFunOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 487 "src-ag/PrintCode.hs" #-}- )) of- { !_cataFunOnested ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 492 "src-ag/PrintCode.hs" #-}- )) of- { !_cataFunOisDeclOfLet ->- (case (semWrapper_ _semWrapperOisDeclOfLet _semWrapperOnested _semWrapperOoptions _semWrapperOoutputfile ) of- { ( !_semWrapperIpps) ->- (case (cataFun_ _cataFunOisDeclOfLet _cataFunOnested _cataFunOoptions _cataFunOoutputfile ) of- { ( !_cataFunIpps) ->- (case (({-# LINE 492 "src-ag/PrintCode.ag" #-}- [ [_commentIpp]- , _cataFunIpps- , _semWrapperIpps- ]- {-# LINE 504 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOappendMain ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _outputfile- {-# LINE 509 "src-ag/PrintCode.hs" #-}- )) of- { !_semFunctionsOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 514 "src-ag/PrintCode.hs" #-}- )) of- { !_semFunctionsOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 519 "src-ag/PrintCode.hs" #-}- )) of- { !_semFunctionsOnested ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 524 "src-ag/PrintCode.hs" #-}- )) of- { !_semFunctionsOisDeclOfLet ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _outputfile- {-# LINE 529 "src-ag/PrintCode.hs" #-}- )) of- { !_infoOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 534 "src-ag/PrintCode.hs" #-}- )) of- { !_infoOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 539 "src-ag/PrintCode.hs" #-}- )) of- { !_infoOnested ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 544 "src-ag/PrintCode.hs" #-}- )) of- { !_infoOisDeclOfLet ->- (case (({-# LINE 518 "src-ag/PrintCode.ag" #-}- concat $ intersperse "," semNames_- {-# LINE 549 "src-ag/PrintCode.hs" #-}- )) of- { !_exports ->- (case (semFunctions_ _semFunctionsOisDeclOfLet _semFunctionsOnested _semFunctionsOoptions _semFunctionsOoutputfile ) of- { ( !_semFunctionsIpps) ->- (case (info_ _infoOisDeclOfLet _infoOnested _infoOoptions _infoOoutputfile ) of- { ( !_infoIpps) ->- (case (({-# LINE 502 "src-ag/PrintCode.ag" #-}- writeModule _outputfile- [ pp $ _lhsIpragmaBlocks- , pp $ Map.findWithDefault empty (BlockPragma, Just $ identifier name_) _lhsItextBlockMap- , pp $ _lhsIoptionsLine- , pp $ _lhsImoduleHeader _lhsImainName ("_" ++ name_) _exports True- , pp $ ("import " ++ _lhsImainName ++ "_common\n")- , pp $ Map.findWithDefault empty (BlockImport, Just $ identifier name_) _lhsItextBlockMap- , _commentIpp- , vlist_sep "" _infoIpps- , vlist_sep "" _semFunctionsIpps- , Map.findWithDefault empty (BlockOther, Just $ identifier name_) _lhsItextBlockMap- ]- {-# LINE 569 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOgenSems ->- (case (({-# LINE 481 "src-ag/PrintCode.ag" #-}- ["import " ++ _lhsImainName ++ "_" ++ name_ ++ "\n"]- {-# LINE 574 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOimports ->- (case (({-# LINE 97 "src-ag/PrintCode.ag" #-}- _commentIpp- : _infoIpps- ++ _dataDefIpps- ++ _cataFunIpps- ++ _semDomIpps- ++ _semWrapperIpps- ++ _semFunctionsIpps- ++ [Map.findWithDefault empty (BlockOther, Just $ identifier name_) _lhsItextBlockMap]- {-# LINE 586 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOappendCommon,_lhsOappendMain,_lhsOgenSems,_lhsOimports,_lhsOpps) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Chunks -------------------------------------------------------{-- visit 0:- inherited attributes:- importBlocks : PP_Doc- isDeclOfLet : Bool- mainFile : String- mainName : String- moduleHeader : String -> String -> String -> Bool -> String- nested : Bool- options : Options- optionsLine : String- pragmaBlocks : String- textBlockMap : Map BlockInfo PP_Doc- textBlocks : PP_Doc- synthesized attributes:- appendCommon : [[PP_Doc]]- appendMain : [[PP_Doc]]- genSems : IO ()- imports : [String]- pps : PP_Docs- alternatives:- alternative Cons:- child hd : Chunk - child tl : Chunks - alternative Nil:--}--- cata-sem_Chunks :: Chunks ->- T_Chunks -sem_Chunks !list =- (Prelude.foldr sem_Chunks_Cons sem_Chunks_Nil (Prelude.map sem_Chunk list) )--- semantic domain-newtype T_Chunks = T_Chunks (PP_Doc ->- Bool ->- String ->- String ->- (String -> String -> String -> Bool -> String) ->- Bool ->- Options ->- String ->- String ->- (Map BlockInfo PP_Doc) ->- PP_Doc ->- ( ([[PP_Doc]]),([[PP_Doc]]),(IO ()),([String]),PP_Docs))-data Inh_Chunks = Inh_Chunks {importBlocks_Inh_Chunks :: !(PP_Doc),isDeclOfLet_Inh_Chunks :: !(Bool),mainFile_Inh_Chunks :: !(String),mainName_Inh_Chunks :: !(String),moduleHeader_Inh_Chunks :: !((String -> String -> String -> Bool -> String)),nested_Inh_Chunks :: !(Bool),options_Inh_Chunks :: !(Options),optionsLine_Inh_Chunks :: !(String),pragmaBlocks_Inh_Chunks :: !(String),textBlockMap_Inh_Chunks :: !((Map BlockInfo PP_Doc)),textBlocks_Inh_Chunks :: !(PP_Doc)}-data Syn_Chunks = Syn_Chunks {appendCommon_Syn_Chunks :: !(([[PP_Doc]])),appendMain_Syn_Chunks :: !(([[PP_Doc]])),genSems_Syn_Chunks :: !((IO ())),imports_Syn_Chunks :: !(([String])),pps_Syn_Chunks :: !(PP_Docs)}-wrap_Chunks :: T_Chunks ->- Inh_Chunks ->- Syn_Chunks -wrap_Chunks !(T_Chunks sem ) !(Inh_Chunks _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks ) =- (let ( !_lhsOappendCommon,!_lhsOappendMain,!_lhsOgenSems,!_lhsOimports,!_lhsOpps) = sem _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks - in (Syn_Chunks _lhsOappendCommon _lhsOappendMain _lhsOgenSems _lhsOimports _lhsOpps ))-sem_Chunks_Cons :: T_Chunk ->- T_Chunks ->- T_Chunks -sem_Chunks_Cons !(T_Chunk hd_ ) !(T_Chunks tl_ ) =- (T_Chunks (\ (!_lhsIimportBlocks)- (!_lhsIisDeclOfLet)- (!_lhsImainFile)- (!_lhsImainName)- (!_lhsImoduleHeader)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoptionsLine)- (!_lhsIpragmaBlocks)- (!_lhsItextBlockMap)- (!_lhsItextBlocks) ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 660 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 665 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOnested ->- (case (({-# LINE 437 "src-ag/PrintCode.ag" #-}- _lhsImainFile- {-# LINE 670 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOmainFile ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 675 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOisDeclOfLet ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 680 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 685 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOnested ->- (case (({-# LINE 437 "src-ag/PrintCode.ag" #-}- _lhsImainFile- {-# LINE 690 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOmainFile ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 695 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOisDeclOfLet ->- (case (({-# LINE 434 "src-ag/PrintCode.ag" #-}- _lhsItextBlocks- {-# LINE 700 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOtextBlocks ->- (case (({-# LINE 435 "src-ag/PrintCode.ag" #-}- _lhsItextBlockMap- {-# LINE 705 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOtextBlockMap ->- (case (({-# LINE 433 "src-ag/PrintCode.ag" #-}- _lhsIpragmaBlocks- {-# LINE 710 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOpragmaBlocks ->- (case (({-# LINE 436 "src-ag/PrintCode.ag" #-}- _lhsIoptionsLine- {-# LINE 715 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOoptionsLine ->- (case (({-# LINE 439 "src-ag/PrintCode.ag" #-}- _lhsImoduleHeader- {-# LINE 720 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOmoduleHeader ->- (case (({-# LINE 438 "src-ag/PrintCode.ag" #-}- _lhsImainName- {-# LINE 725 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOmainName ->- (case (({-# LINE 432 "src-ag/PrintCode.ag" #-}- _lhsIimportBlocks- {-# LINE 730 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOimportBlocks ->- (case (tl_ _tlOimportBlocks _tlOisDeclOfLet _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnested _tlOoptions _tlOoptionsLine _tlOpragmaBlocks _tlOtextBlockMap _tlOtextBlocks ) of- { ( !_tlIappendCommon,!_tlIappendMain,!_tlIgenSems,!_tlIimports,!_tlIpps) ->- (case (({-# LINE 434 "src-ag/PrintCode.ag" #-}- _lhsItextBlocks- {-# LINE 737 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOtextBlocks ->- (case (({-# LINE 435 "src-ag/PrintCode.ag" #-}- _lhsItextBlockMap- {-# LINE 742 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOtextBlockMap ->- (case (({-# LINE 433 "src-ag/PrintCode.ag" #-}- _lhsIpragmaBlocks- {-# LINE 747 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOpragmaBlocks ->- (case (({-# LINE 436 "src-ag/PrintCode.ag" #-}- _lhsIoptionsLine- {-# LINE 752 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOoptionsLine ->- (case (({-# LINE 439 "src-ag/PrintCode.ag" #-}- _lhsImoduleHeader- {-# LINE 757 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOmoduleHeader ->- (case (({-# LINE 438 "src-ag/PrintCode.ag" #-}- _lhsImainName- {-# LINE 762 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOmainName ->- (case (({-# LINE 432 "src-ag/PrintCode.ag" #-}- _lhsIimportBlocks- {-# LINE 767 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOimportBlocks ->- (case (hd_ _hdOimportBlocks _hdOisDeclOfLet _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnested _hdOoptions _hdOoptionsLine _hdOpragmaBlocks _hdOtextBlockMap _hdOtextBlocks ) of- { ( !_hdIappendCommon,!_hdIappendMain,!_hdIgenSems,!_hdIimports,!_hdIpps) ->- (case (({-# LINE 483 "src-ag/PrintCode.ag" #-}- _hdIappendCommon ++ _tlIappendCommon- {-# LINE 774 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOappendCommon ->- (case (({-# LINE 483 "src-ag/PrintCode.ag" #-}- _hdIappendMain ++ _tlIappendMain- {-# LINE 779 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOappendMain ->- (case (({-# LINE 498 "src-ag/PrintCode.ag" #-}- _hdIgenSems >> _tlIgenSems- {-# LINE 784 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOgenSems ->- (case (({-# LINE 478 "src-ag/PrintCode.ag" #-}- _hdIimports ++ _tlIimports- {-# LINE 789 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOimports ->- (case (({-# LINE 89 "src-ag/PrintCode.ag" #-}- _hdIpps ++ _tlIpps- {-# LINE 794 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOappendCommon,_lhsOappendMain,_lhsOgenSems,_lhsOimports,_lhsOpps) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Chunks_Nil :: T_Chunks -sem_Chunks_Nil =- (T_Chunks (\ (!_lhsIimportBlocks)- (!_lhsIisDeclOfLet)- (!_lhsImainFile)- (!_lhsImainName)- (!_lhsImoduleHeader)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoptionsLine)- (!_lhsIpragmaBlocks)- (!_lhsItextBlockMap)- (!_lhsItextBlocks) ->- (case (({-# LINE 483 "src-ag/PrintCode.ag" #-}- []- {-# LINE 813 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOappendCommon ->- (case (({-# LINE 483 "src-ag/PrintCode.ag" #-}- []- {-# LINE 818 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOappendMain ->- (case (({-# LINE 498 "src-ag/PrintCode.ag" #-}- return ()- {-# LINE 823 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOgenSems ->- (case (({-# LINE 478 "src-ag/PrintCode.ag" #-}- []- {-# LINE 828 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOimports ->- (case (({-# LINE 90 "src-ag/PrintCode.ag" #-}- []- {-# LINE 833 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOappendCommon,_lhsOappendMain,_lhsOgenSems,_lhsOimports,_lhsOpps) }) }) }) }) })) )--- DataAlt ------------------------------------------------------{-- visit 0:- inherited attributes:- nested : Bool- strictPre : PP_Doc- synthesized attribute:- pp : PP_Doc- alternatives:- alternative DataAlt:- child name : {String}- child args : Types - alternative Record:- child name : {String}- child args : NamedTypes --}--- cata-sem_DataAlt :: DataAlt ->- T_DataAlt -sem_DataAlt !(DataAlt _name _args ) =- (sem_DataAlt_DataAlt _name (sem_Types _args ) )-sem_DataAlt !(Record _name _args ) =- (sem_DataAlt_Record _name (sem_NamedTypes _args ) )--- semantic domain-newtype T_DataAlt = T_DataAlt (Bool ->- PP_Doc ->- ( PP_Doc))-data Inh_DataAlt = Inh_DataAlt {nested_Inh_DataAlt :: !(Bool),strictPre_Inh_DataAlt :: !(PP_Doc)}-data Syn_DataAlt = Syn_DataAlt {pp_Syn_DataAlt :: !(PP_Doc)}-wrap_DataAlt :: T_DataAlt ->- Inh_DataAlt ->- Syn_DataAlt -wrap_DataAlt !(T_DataAlt sem ) !(Inh_DataAlt _lhsInested _lhsIstrictPre ) =- (let ( !_lhsOpp) = sem _lhsInested _lhsIstrictPre - in (Syn_DataAlt _lhsOpp ))-sem_DataAlt_DataAlt :: String ->- T_Types ->- T_DataAlt -sem_DataAlt_DataAlt !name_ !(T_Types args_ ) =- (T_DataAlt (\ (!_lhsInested)- (!_lhsIstrictPre) ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 880 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOnested ->- (case (args_ _argsOnested ) of- { ( !_argsIpps) ->- (case (({-# LINE 222 "src-ag/PrintCode.ag" #-}- name_ >#< hv_sp (map ((_lhsIstrictPre >|<) . pp_parens) _argsIpps)- {-# LINE 887 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_DataAlt_Record :: String ->- T_NamedTypes ->- T_DataAlt -sem_DataAlt_Record !name_ !(T_NamedTypes args_ ) =- (T_DataAlt (\ (!_lhsInested)- (!_lhsIstrictPre) ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 899 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOnested ->- (case (args_ _argsOnested ) of- { ( !_argsIpps) ->- (case (({-# LINE 223 "src-ag/PrintCode.ag" #-}- name_ >#< pp_block "{" "}" "," _argsIpps- {-# LINE 906 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )--- DataAlts -----------------------------------------------------{-- visit 0:- inherited attributes:- nested : Bool- strictPre : PP_Doc- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : DataAlt - child tl : DataAlts - alternative Nil:--}--- cata-sem_DataAlts :: DataAlts ->- T_DataAlts -sem_DataAlts !list =- (Prelude.foldr sem_DataAlts_Cons sem_DataAlts_Nil (Prelude.map sem_DataAlt list) )--- semantic domain-newtype T_DataAlts = T_DataAlts (Bool ->- PP_Doc ->- ( PP_Docs))-data Inh_DataAlts = Inh_DataAlts {nested_Inh_DataAlts :: !(Bool),strictPre_Inh_DataAlts :: !(PP_Doc)}-data Syn_DataAlts = Syn_DataAlts {pps_Syn_DataAlts :: !(PP_Docs)}-wrap_DataAlts :: T_DataAlts ->- Inh_DataAlts ->- Syn_DataAlts -wrap_DataAlts !(T_DataAlts sem ) !(Inh_DataAlts _lhsInested _lhsIstrictPre ) =- (let ( !_lhsOpps) = sem _lhsInested _lhsIstrictPre - in (Syn_DataAlts _lhsOpps ))-sem_DataAlts_Cons :: T_DataAlt ->- T_DataAlts ->- T_DataAlts -sem_DataAlts_Cons !(T_DataAlt hd_ ) !(T_DataAlts tl_ ) =- (T_DataAlts (\ (!_lhsInested)- (!_lhsIstrictPre) ->- (case (({-# LINE 317 "src-ag/PrintCode.ag" #-}- _lhsIstrictPre- {-# LINE 949 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOstrictPre ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 954 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOnested ->- (case (({-# LINE 317 "src-ag/PrintCode.ag" #-}- _lhsIstrictPre- {-# LINE 959 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOstrictPre ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 964 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOnested ->- (case (tl_ _tlOnested _tlOstrictPre ) of- { ( !_tlIpps) ->- (case (hd_ _hdOnested _hdOstrictPre ) of- { ( !_hdIpp) ->- (case (({-# LINE 73 "src-ag/PrintCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 973 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) }) }) })) )-sem_DataAlts_Nil :: T_DataAlts -sem_DataAlts_Nil =- (T_DataAlts (\ (!_lhsInested)- (!_lhsIstrictPre) ->- (case (({-# LINE 74 "src-ag/PrintCode.ag" #-}- []- {-# LINE 983 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- Decl ---------------------------------------------------------{-- visit 0:- inherited attributes:- isDeclOfLet : Bool- nested : Bool- options : Options- outputfile : String- synthesized attribute:- pp : PP_Doc- alternatives:- alternative Bind:- child left : Lhs - child rhs : Expr - alternative BindLet:- child left : Lhs - child rhs : Expr - alternative Comment:- child txt : {String}- alternative Data:- child name : {String}- child params : {[String]}- child alts : DataAlts - child strict : {Bool}- child derivings : {[String]}- alternative Decl:- child left : Lhs - child rhs : Expr - child binds : {Set String}- child uses : {Set String}- alternative EvalDecl:- child nt : {String}- child left : Lhs - child rhs : Expr - visit 0:- local strat : _- alternative NewType:- child name : {String}- child params : {[String]}- child con : {String}- child tp : Type - alternative PragmaDecl:- child txt : {String}- alternative Resume:- child monadic : {Bool}- child nt : {String}- child left : Lhs - child rhs : Expr - alternative TSig:- child name : {String}- child tp : Type - alternative Type:- child name : {String}- child params : {[String]}- child tp : Type --}--- cata-sem_Decl :: Decl ->- T_Decl -sem_Decl !(Bind _left _rhs ) =- (sem_Decl_Bind (sem_Lhs _left ) (sem_Expr _rhs ) )-sem_Decl !(BindLet _left _rhs ) =- (sem_Decl_BindLet (sem_Lhs _left ) (sem_Expr _rhs ) )-sem_Decl !(Comment _txt ) =- (sem_Decl_Comment _txt )-sem_Decl !(Data _name _params _alts _strict _derivings ) =- (sem_Decl_Data _name _params (sem_DataAlts _alts ) _strict _derivings )-sem_Decl !(Decl _left _rhs _binds _uses ) =- (sem_Decl_Decl (sem_Lhs _left ) (sem_Expr _rhs ) _binds _uses )-sem_Decl !(EvalDecl _nt _left _rhs ) =- (sem_Decl_EvalDecl _nt (sem_Lhs _left ) (sem_Expr _rhs ) )-sem_Decl !(NewType _name _params _con _tp ) =- (sem_Decl_NewType _name _params _con (sem_Type _tp ) )-sem_Decl !(PragmaDecl _txt ) =- (sem_Decl_PragmaDecl _txt )-sem_Decl !(Resume _monadic _nt _left _rhs ) =- (sem_Decl_Resume _monadic _nt (sem_Lhs _left ) (sem_Expr _rhs ) )-sem_Decl !(TSig _name _tp ) =- (sem_Decl_TSig _name (sem_Type _tp ) )-sem_Decl !(Type _name _params _tp ) =- (sem_Decl_Type _name _params (sem_Type _tp ) )--- semantic domain-newtype T_Decl = T_Decl (Bool ->- Bool ->- Options ->- String ->- ( PP_Doc))-data Inh_Decl = Inh_Decl {isDeclOfLet_Inh_Decl :: !(Bool),nested_Inh_Decl :: !(Bool),options_Inh_Decl :: !(Options),outputfile_Inh_Decl :: !(String)}-data Syn_Decl = Syn_Decl {pp_Syn_Decl :: !(PP_Doc)}-wrap_Decl :: T_Decl ->- Inh_Decl ->- Syn_Decl -wrap_Decl !(T_Decl sem ) !(Inh_Decl _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile ) =- (let ( !_lhsOpp) = sem _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile - in (Syn_Decl _lhsOpp ))-sem_Decl_Bind :: T_Lhs ->- T_Expr ->- T_Decl -sem_Decl_Bind !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1092 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1097 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1102 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOnested ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1107 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1112 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1117 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOnested ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 1122 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOisDeclOfLet ->- (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile ) of- { ( !_rhsIpp) ->- (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile ) of- { ( !_leftIpp) ->- (case (({-# LINE 109 "src-ag/PrintCode.ag" #-}- _leftIpp >#< "<-" >#< _rhsIpp- {-# LINE 1131 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )-sem_Decl_BindLet :: T_Lhs ->- T_Expr ->- T_Decl -sem_Decl_BindLet !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1145 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1150 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1155 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOnested ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1160 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1165 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1170 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOnested ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 1175 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOisDeclOfLet ->- (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile ) of- { ( !_rhsIpp) ->- (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile ) of- { ( !_leftIpp) ->- (case (({-# LINE 110 "src-ag/PrintCode.ag" #-}- "let" >#< _leftIpp >#< "=" >#< _rhsIpp- {-# LINE 1184 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )-sem_Decl_Comment :: String ->- T_Decl -sem_Decl_Comment !txt_ =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 123 "src-ag/PrintCode.ag" #-}- if '\n' `elem` txt_- then "{-" >-< vlist (lines txt_) >-< "-}"- else "--" >#< txt_- {-# LINE 1199 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Decl_Data :: String ->- ([String]) ->- T_DataAlts ->- Bool ->- ([String]) ->- T_Decl -sem_Decl_Data !name_ !params_ !(T_DataAlts alts_ ) !strict_ !derivings_ =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1216 "src-ag/PrintCode.hs" #-}- )) of- { !_altsOnested ->- (case (({-# LINE 320 "src-ag/PrintCode.ag" #-}- if strict_ then pp "!" else empty- {-# LINE 1221 "src-ag/PrintCode.hs" #-}- )) of- { !_altsOstrictPre ->- (case (alts_ _altsOnested _altsOstrictPre ) of- { ( !_altsIpps) ->- (case (({-# LINE 111 "src-ag/PrintCode.ag" #-}- "data" >#< hv_sp (name_ : params_)- >#< ( case _altsIpps of- [] -> empty- (x:xs) -> "=" >#< x- >-< vlist (map ("|" >#<) xs)- >-< if null derivings_- then empty- else "deriving" >#< ppTuple False (map text derivings_)- )- {-# LINE 1236 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) })) )-sem_Decl_Decl :: T_Lhs ->- T_Expr ->- (Set String) ->- (Set String) ->- T_Decl -sem_Decl_Decl !(T_Lhs left_ ) !(T_Expr rhs_ ) !binds_ !uses_ =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1252 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1257 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1262 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOnested ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1267 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1272 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1277 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOnested ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 1282 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOisDeclOfLet ->- (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile ) of- { ( !_rhsIpp) ->- (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile ) of- { ( !_leftIpp) ->- (case (({-# LINE 107 "src-ag/PrintCode.ag" #-}- _leftIpp >#< "="- >-< indent 4 _rhsIpp- {-# LINE 1292 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )-sem_Decl_EvalDecl :: String ->- T_Lhs ->- T_Expr ->- T_Decl -sem_Decl_EvalDecl !nt_ !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1307 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1312 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1317 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOnested ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1322 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1327 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1332 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOnested ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 1337 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOisDeclOfLet ->- (case (({-# LINE 130 "src-ag/PrintCode.ag" #-}- if breadthFirstStrict _lhsIoptions- then "stepwiseEval"- else "lazyEval"- {-# LINE 1344 "src-ag/PrintCode.hs" #-}- )) of- { !_strat ->- (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile ) of- { ( !_rhsIpp) ->- (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile ) of- { ( !_leftIpp) ->- (case (({-# LINE 133 "src-ag/PrintCode.ag" #-}- if breadthFirst _lhsIoptions- then _leftIpp >#< "=" >#< "case" >#< _strat >#< pp_parens _rhsIpp >#< "of"- >-< indent 4 (- pp_parens (nt_ >|< "_Syn" >#< "_val") >#< "-> _val"- )- else _leftIpp >#< "=" >#< _rhsIpp- {-# LINE 1358 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) }) })) )-sem_Decl_NewType :: String ->- ([String]) ->- String ->- T_Type ->- T_Decl -sem_Decl_NewType !name_ !params_ !con_ !(T_Type tp_ ) =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1374 "src-ag/PrintCode.hs" #-}- )) of- { !_tpOnested ->- (case (tp_ _tpOnested ) of- { ( !_tpIpp,!_tpIprec) ->- (case (({-# LINE 120 "src-ag/PrintCode.ag" #-}- "newtype" >#< hv_sp (name_ : params_) >#< "=" >#< con_ >#< pp_parens _tpIpp- {-# LINE 1381 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Decl_PragmaDecl :: String ->- T_Decl -sem_Decl_PragmaDecl !txt_ =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 126 "src-ag/PrintCode.ag" #-}- "{-#" >#< text txt_ >#< "#-}"- {-# LINE 1394 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Decl_Resume :: Bool ->- String ->- T_Lhs ->- T_Expr ->- T_Decl -sem_Decl_Resume !monadic_ !nt_ !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1410 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1415 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1420 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOnested ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1425 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1430 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1435 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOnested ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 1440 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOisDeclOfLet ->- (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile ) of- { ( !_rhsIpp) ->- (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile ) of- { ( !_leftIpp) ->- (case (({-# LINE 127 "src-ag/PrintCode.ag" #-}- if monadic_- then _leftIpp >#< "<-" >#< _rhsIpp- else _leftIpp >#< "=" >-< indent 4 _rhsIpp- {-# LINE 1451 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )-sem_Decl_TSig :: String ->- T_Type ->- T_Decl -sem_Decl_TSig !name_ !(T_Type tp_ ) =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1465 "src-ag/PrintCode.hs" #-}- )) of- { !_tpOnested ->- (case (tp_ _tpOnested ) of- { ( !_tpIpp,!_tpIprec) ->- (case (({-# LINE 122 "src-ag/PrintCode.ag" #-}- name_ >#< "::" >#< _tpIpp- {-# LINE 1472 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Decl_Type :: String ->- ([String]) ->- T_Type ->- T_Decl -sem_Decl_Type !name_ !params_ !(T_Type tp_ ) =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1487 "src-ag/PrintCode.hs" #-}- )) of- { !_tpOnested ->- (case (tp_ _tpOnested ) of- { ( !_tpIpp,!_tpIprec) ->- (case (({-# LINE 121 "src-ag/PrintCode.ag" #-}- "type" >#< hv_sp (name_ : params_) >#< "=" >#< _tpIpp- {-# LINE 1494 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )--- Decls --------------------------------------------------------{-- visit 0:- inherited attributes:- isDeclOfLet : Bool- nested : Bool- options : Options- outputfile : String- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : Decl - child tl : Decls - alternative Nil:--}--- cata-sem_Decls :: Decls ->- T_Decls -sem_Decls !list =- (Prelude.foldr sem_Decls_Cons sem_Decls_Nil (Prelude.map sem_Decl list) )--- semantic domain-newtype T_Decls = T_Decls (Bool ->- Bool ->- Options ->- String ->- ( PP_Docs))-data Inh_Decls = Inh_Decls {isDeclOfLet_Inh_Decls :: !(Bool),nested_Inh_Decls :: !(Bool),options_Inh_Decls :: !(Options),outputfile_Inh_Decls :: !(String)}-data Syn_Decls = Syn_Decls {pps_Syn_Decls :: !(PP_Docs)}-wrap_Decls :: T_Decls ->- Inh_Decls ->- Syn_Decls -wrap_Decls !(T_Decls sem ) !(Inh_Decls _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile ) =- (let ( !_lhsOpps) = sem _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile - in (Syn_Decls _lhsOpps ))-sem_Decls_Cons :: T_Decl ->- T_Decls ->- T_Decls -sem_Decls_Cons !(T_Decl hd_ ) !(T_Decls tl_ ) =- (T_Decls (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1543 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1548 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1553 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOnested ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 1558 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOisDeclOfLet ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1563 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1568 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1573 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOnested ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 1578 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOisDeclOfLet ->- (case (tl_ _tlOisDeclOfLet _tlOnested _tlOoptions _tlOoutputfile ) of- { ( !_tlIpps) ->- (case (hd_ _hdOisDeclOfLet _hdOnested _hdOoptions _hdOoutputfile ) of- { ( !_hdIpp) ->- (case (({-# LINE 85 "src-ag/PrintCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 1587 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) }) }) }) }) }) }) })) )-sem_Decls_Nil :: T_Decls -sem_Decls_Nil =- (T_Decls (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 86 "src-ag/PrintCode.ag" #-}- []- {-# LINE 1599 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- Expr ---------------------------------------------------------{-- visit 0:- inherited attributes:- nested : Bool- options : Options- outputfile : String- synthesized attribute:- pp : PP_Doc- alternatives:- alternative App:- child name : {String}- child args : Exprs - alternative Case:- child expr : Expr - child alts : CaseAlts - alternative Do:- child stmts : Decls - child body : Expr - alternative InvokeExpr:- child nt : {String}- child expr : Expr - child args : Exprs - alternative Lambda:- child args : Exprs - child body : Expr - visit 0:- local addBang : _- local strictParams : _- alternative Let:- child decls : Decls - child body : Expr - alternative LineExpr:- child expr : Expr - alternative PragmaExpr:- child onLeftSide : {Bool}- child onNewLine : {Bool}- child txt : {String}- child expr : Expr - alternative ResultExpr:- child nt : {String}- child expr : Expr - alternative ResumeExpr:- child nt : {String}- child expr : Expr - child left : Lhs - child rhs : Expr - alternative SemFun:- child nt : {String}- child args : Exprs - child body : Expr - visit 0:- local addBang : _- local strictParams : _- alternative SimpleExpr:- child txt : {String}- alternative TextExpr:- child lns : {[String]}- alternative Trace:- child txt : {String}- child expr : Expr - alternative TupleExpr:- child exprs : Exprs - alternative TypedExpr:- child expr : Expr - child tp : Type - alternative UnboxedTupleExpr:- child exprs : Exprs --}--- cata-sem_Expr :: Expr ->- T_Expr -sem_Expr !(App _name _args ) =- (sem_Expr_App _name (sem_Exprs _args ) )-sem_Expr !(Case _expr _alts ) =- (sem_Expr_Case (sem_Expr _expr ) (sem_CaseAlts _alts ) )-sem_Expr !(Do _stmts _body ) =- (sem_Expr_Do (sem_Decls _stmts ) (sem_Expr _body ) )-sem_Expr !(InvokeExpr _nt _expr _args ) =- (sem_Expr_InvokeExpr _nt (sem_Expr _expr ) (sem_Exprs _args ) )-sem_Expr !(Lambda _args _body ) =- (sem_Expr_Lambda (sem_Exprs _args ) (sem_Expr _body ) )-sem_Expr !(Let _decls _body ) =- (sem_Expr_Let (sem_Decls _decls ) (sem_Expr _body ) )-sem_Expr !(LineExpr _expr ) =- (sem_Expr_LineExpr (sem_Expr _expr ) )-sem_Expr !(PragmaExpr _onLeftSide _onNewLine _txt _expr ) =- (sem_Expr_PragmaExpr _onLeftSide _onNewLine _txt (sem_Expr _expr ) )-sem_Expr !(ResultExpr _nt _expr ) =- (sem_Expr_ResultExpr _nt (sem_Expr _expr ) )-sem_Expr !(ResumeExpr _nt _expr _left _rhs ) =- (sem_Expr_ResumeExpr _nt (sem_Expr _expr ) (sem_Lhs _left ) (sem_Expr _rhs ) )-sem_Expr !(SemFun _nt _args _body ) =- (sem_Expr_SemFun _nt (sem_Exprs _args ) (sem_Expr _body ) )-sem_Expr !(SimpleExpr _txt ) =- (sem_Expr_SimpleExpr _txt )-sem_Expr !(TextExpr _lns ) =- (sem_Expr_TextExpr _lns )-sem_Expr !(Trace _txt _expr ) =- (sem_Expr_Trace _txt (sem_Expr _expr ) )-sem_Expr !(TupleExpr _exprs ) =- (sem_Expr_TupleExpr (sem_Exprs _exprs ) )-sem_Expr !(TypedExpr _expr _tp ) =- (sem_Expr_TypedExpr (sem_Expr _expr ) (sem_Type _tp ) )-sem_Expr !(UnboxedTupleExpr _exprs ) =- (sem_Expr_UnboxedTupleExpr (sem_Exprs _exprs ) )--- semantic domain-newtype T_Expr = T_Expr (Bool ->- Options ->- String ->- ( PP_Doc))-data Inh_Expr = Inh_Expr {nested_Inh_Expr :: !(Bool),options_Inh_Expr :: !(Options),outputfile_Inh_Expr :: !(String)}-data Syn_Expr = Syn_Expr {pp_Syn_Expr :: !(PP_Doc)}-wrap_Expr :: T_Expr ->- Inh_Expr ->- Syn_Expr -wrap_Expr !(T_Expr sem ) !(Inh_Expr _lhsInested _lhsIoptions _lhsIoutputfile ) =- (let ( !_lhsOpp) = sem _lhsInested _lhsIoptions _lhsIoutputfile - in (Syn_Expr _lhsOpp ))-sem_Expr_App :: String ->- T_Exprs ->- T_Expr -sem_Expr_App !name_ !(T_Exprs args_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1731 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1736 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1741 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOnested ->- (case (args_ _argsOnested _argsOoptions _argsOoutputfile ) of- { ( !_argsIpps) ->- (case (({-# LINE 161 "src-ag/PrintCode.ag" #-}- pp_parens $ name_ >#< hv_sp _argsIpps- {-# LINE 1748 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Expr_Case :: T_Expr ->- T_CaseAlts ->- T_Expr -sem_Expr_Case !(T_Expr expr_ ) !(T_CaseAlts alts_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1761 "src-ag/PrintCode.hs" #-}- )) of- { !_altsOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1766 "src-ag/PrintCode.hs" #-}- )) of- { !_altsOoptions ->- (case (({-# LINE 56 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1771 "src-ag/PrintCode.hs" #-}- )) of- { !_altsOnested ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1776 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1781 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1786 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOnested ->- (case (alts_ _altsOnested _altsOoptions _altsOoutputfile ) of- { ( !_altsIpps) ->- (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of- { ( !_exprIpp) ->- (case (({-# LINE 144 "src-ag/PrintCode.ag" #-}- pp_parens ( "case" >#< pp_parens _exprIpp >#< "of"- >-< (vlist _altsIpps)- )- {-# LINE 1797 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) })) )-sem_Expr_Do :: T_Decls ->- T_Expr ->- T_Expr -sem_Expr_Do !(T_Decls stmts_ ) !(T_Expr body_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1810 "src-ag/PrintCode.hs" #-}- )) of- { !_bodyOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1815 "src-ag/PrintCode.hs" #-}- )) of- { !_bodyOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1820 "src-ag/PrintCode.hs" #-}- )) of- { !_bodyOnested ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1825 "src-ag/PrintCode.hs" #-}- )) of- { !_stmtsOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1830 "src-ag/PrintCode.hs" #-}- )) of- { !_stmtsOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1835 "src-ag/PrintCode.hs" #-}- )) of- { !_stmtsOnested ->- (case (({-# LINE 416 "src-ag/PrintCode.ag" #-}- False- {-# LINE 1840 "src-ag/PrintCode.hs" #-}- )) of- { !_stmtsOisDeclOfLet ->- (case (body_ _bodyOnested _bodyOoptions _bodyOoutputfile ) of- { ( !_bodyIpp) ->- (case (stmts_ _stmtsOisDeclOfLet _stmtsOnested _stmtsOoptions _stmtsOoutputfile ) of- { ( !_stmtsIpps) ->- (case (({-# LINE 147 "src-ag/PrintCode.ag" #-}- pp_parens ( "do" >#< ( vlist _stmtsIpps- >-< ("return" >#< _bodyIpp))- )- {-# LINE 1851 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )-sem_Expr_InvokeExpr :: String ->- T_Expr ->- T_Exprs ->- T_Expr -sem_Expr_InvokeExpr !nt_ !(T_Expr expr_ ) !(T_Exprs args_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1865 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1870 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1875 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOnested ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1880 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1885 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1890 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOnested ->- (case (args_ _argsOnested _argsOoptions _argsOoutputfile ) of- { ( !_argsIpps) ->- (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of- { ( !_exprIpp) ->- (case (({-# LINE 185 "src-ag/PrintCode.ag" #-}- if breadthFirst _lhsIoptions- then "invoke" >#< pp_parens _exprIpp >#< pp_parens (- nt_ >|< "_Inh" >#< pp_parens (ppTuple False _argsIpps))- else _exprIpp >#< hv_sp _argsIpps- {-# LINE 1902 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) })) )-sem_Expr_Lambda :: T_Exprs ->- T_Expr ->- T_Expr -sem_Expr_Lambda !(T_Exprs args_ ) !(T_Expr body_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1915 "src-ag/PrintCode.hs" #-}- )) of- { !_bodyOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1920 "src-ag/PrintCode.hs" #-}- )) of- { !_bodyOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1925 "src-ag/PrintCode.hs" #-}- )) of- { !_bodyOnested ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1930 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1935 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1940 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOnested ->- (case (({-# LINE 153 "src-ag/PrintCode.ag" #-}- if bangpats _lhsIoptions- then \p -> pp_parens ("!" >|< p)- else id- {-# LINE 1947 "src-ag/PrintCode.hs" #-}- )) of- { !_addBang ->- (case (args_ _argsOnested _argsOoptions _argsOoutputfile ) of- { ( !_argsIpps) ->- (case (({-# LINE 150 "src-ag/PrintCode.ag" #-}- if strictSems _lhsIoptions- then _argsIpps- else []- {-# LINE 1956 "src-ag/PrintCode.hs" #-}- )) of- { !_strictParams ->- (case (body_ _bodyOnested _bodyOoptions _bodyOoutputfile ) of- { ( !_bodyIpp) ->- (case (({-# LINE 156 "src-ag/PrintCode.ag" #-}- pp_parens ( "\\" >#< (vlist (map _addBang _argsIpps)) >#< "->"- >-< indent 4 (_strictParams `ppMultiSeqV` _bodyIpp)- )- {-# LINE 1965 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) }) })) )-sem_Expr_Let :: T_Decls ->- T_Expr ->- T_Expr -sem_Expr_Let !(T_Decls decls_ ) !(T_Expr body_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1978 "src-ag/PrintCode.hs" #-}- )) of- { !_bodyOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1983 "src-ag/PrintCode.hs" #-}- )) of- { !_bodyOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 1988 "src-ag/PrintCode.hs" #-}- )) of- { !_bodyOnested ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1993 "src-ag/PrintCode.hs" #-}- )) of- { !_declsOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1998 "src-ag/PrintCode.hs" #-}- )) of- { !_declsOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2003 "src-ag/PrintCode.hs" #-}- )) of- { !_declsOnested ->- (case (({-# LINE 414 "src-ag/PrintCode.ag" #-}- True- {-# LINE 2008 "src-ag/PrintCode.hs" #-}- )) of- { !_declsOisDeclOfLet ->- (case (body_ _bodyOnested _bodyOoptions _bodyOoutputfile ) of- { ( !_bodyIpp) ->- (case (decls_ _declsOisDeclOfLet _declsOnested _declsOoptions _declsOoutputfile ) of- { ( !_declsIpps) ->- (case (({-# LINE 141 "src-ag/PrintCode.ag" #-}- pp_parens ( "let" >#< (vlist _declsIpps)- >-< "in " >#< _bodyIpp- )- {-# LINE 2019 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )-sem_Expr_LineExpr :: T_Expr ->- T_Expr -sem_Expr_LineExpr !(T_Expr expr_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2031 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2036 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2041 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOnested ->- (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of- { ( !_exprIpp) ->- (case (({-# LINE 178 "src-ag/PrintCode.ag" #-}- _exprIpp >-< "{-# LINE" >#< ppWithLineNr (\n -> pp $ show $ n + 1) >#< show _lhsIoutputfile >#< "#-}"- >-< ""- {-# LINE 2049 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Expr_PragmaExpr :: Bool ->- Bool ->- String ->- T_Expr ->- T_Expr -sem_Expr_PragmaExpr !onLeftSide_ !onNewLine_ !txt_ !(T_Expr expr_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2064 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2069 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2074 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOnested ->- (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of- { ( !_exprIpp) ->- (case (({-# LINE 167 "src-ag/PrintCode.ag" #-}- let pragmaDoc = "{-#" >#< txt_ >#< "#-}"- op = if onNewLine_- then (>-<)- else (>#<)- leftOp x y = if onLeftSide_- then x `op` y- else y- rightOp x y = if onLeftSide_- then x- else x `op` y- in pp_parens (pragmaDoc `leftOp` _exprIpp `rightOp` pragmaDoc)- {-# LINE 2091 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Expr_ResultExpr :: String ->- T_Expr ->- T_Expr -sem_Expr_ResultExpr !nt_ !(T_Expr expr_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2104 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2109 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2114 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOnested ->- (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of- { ( !_exprIpp) ->- (case (({-# LINE 181 "src-ag/PrintCode.ag" #-}- if breadthFirst _lhsIoptions- then "final" >#<- pp_parens (nt_ >|< "_Syn" >#< pp_parens _exprIpp)- else _exprIpp- {-# LINE 2124 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Expr_ResumeExpr :: String ->- T_Expr ->- T_Lhs ->- T_Expr ->- T_Expr -sem_Expr_ResumeExpr !nt_ !(T_Expr expr_ ) !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2139 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2144 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2149 "src-ag/PrintCode.hs" #-}- )) of- { !_rhsOnested ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2154 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2159 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2164 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOnested ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2169 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2174 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2179 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOnested ->- (case (({-# LINE 418 "src-ag/PrintCode.ag" #-}- False- {-# LINE 2184 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOisDeclOfLet ->- (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile ) of- { ( !_rhsIpp) ->- (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile ) of- { ( !_leftIpp) ->- (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of- { ( !_exprIpp) ->- (case (({-# LINE 189 "src-ag/PrintCode.ag" #-}- if breadthFirst _lhsIoptions- then pp_parens ("resume" >#< pp_parens _exprIpp- >-< indent 2 (pp_parens ( "\\" >|<- pp_parens ("~" >|< pp_parens (nt_ >|< "_Syn" >#< "_inh_arg"))- >#< "->"- >-< indent 2 ( "let" >#< _leftIpp >#< "= _inh_arg"- >-< indent 2 ("in" >#< _rhsIpp)- ))))- else pp_parens ( "case" >#< pp_parens _exprIpp >#< "of"- >-< ("{" >#< _leftIpp >#< "->")- >-< indent 4 (_rhsIpp >#< "}")- )- {-# LINE 2206 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Expr_SemFun :: String ->- T_Exprs ->- T_Expr ->- T_Expr -sem_Expr_SemFun !nt_ !(T_Exprs args_ ) !(T_Expr body_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2220 "src-ag/PrintCode.hs" #-}- )) of- { !_bodyOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2225 "src-ag/PrintCode.hs" #-}- )) of- { !_bodyOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2230 "src-ag/PrintCode.hs" #-}- )) of- { !_bodyOnested ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2235 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2240 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2245 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOnested ->- (case (({-# LINE 204 "src-ag/PrintCode.ag" #-}- if bangpats _lhsIoptions- then \p -> pp_parens ("!" >|< p)- else id- {-# LINE 2252 "src-ag/PrintCode.hs" #-}- )) of- { !_addBang ->- (case (args_ _argsOnested _argsOoptions _argsOoutputfile ) of- { ( !_argsIpps) ->- (case (({-# LINE 201 "src-ag/PrintCode.ag" #-}- if strictSems _lhsIoptions- then _argsIpps- else []- {-# LINE 2261 "src-ag/PrintCode.hs" #-}- )) of- { !_strictParams ->- (case (body_ _bodyOnested _bodyOoptions _bodyOoutputfile ) of- { ( !_bodyIpp) ->- (case (({-# LINE 207 "src-ag/PrintCode.ag" #-}- if breadthFirst _lhsIoptions- then "Child" >#< pp_parens ( "\\" >|<- pp_parens (nt_ >|< "_Inh" >#<- ppTuple False (map _addBang _argsIpps)) >#< "->"- >-< indent 2 (_strictParams `ppMultiSeqV` _bodyIpp))- else if null _argsIpps- then _bodyIpp- else pp_parens ( "\\" >#< (vlist (map _addBang _argsIpps)) >#< "->"- >-< indent 4 (_strictParams `ppMultiSeqV` _bodyIpp)- )- {-# LINE 2277 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) }) })) )-sem_Expr_SimpleExpr :: String ->- T_Expr -sem_Expr_SimpleExpr !txt_ =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 162 "src-ag/PrintCode.ag" #-}- text txt_- {-# LINE 2289 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Expr_TextExpr :: ([String]) ->- T_Expr -sem_Expr_TextExpr !lns_ =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 163 "src-ag/PrintCode.ag" #-}- vlist (map text lns_)- {-# LINE 2301 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Expr_Trace :: String ->- T_Expr ->- T_Expr -sem_Expr_Trace !txt_ !(T_Expr expr_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2314 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2319 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2324 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOnested ->- (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of- { ( !_exprIpp) ->- (case (({-# LINE 164 "src-ag/PrintCode.ag" #-}- "trace" >#< ( pp_parens ("\"" >|< text txt_ >|< "\"")- >-< pp_parens _exprIpp- )- {-# LINE 2333 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Expr_TupleExpr :: T_Exprs ->- T_Expr -sem_Expr_TupleExpr !(T_Exprs exprs_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2345 "src-ag/PrintCode.hs" #-}- )) of- { !_exprsOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2350 "src-ag/PrintCode.hs" #-}- )) of- { !_exprsOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2355 "src-ag/PrintCode.hs" #-}- )) of- { !_exprsOnested ->- (case (exprs_ _exprsOnested _exprsOoptions _exprsOoutputfile ) of- { ( !_exprsIpps) ->- (case (({-# LINE 159 "src-ag/PrintCode.ag" #-}- ppTuple _lhsInested _exprsIpps- {-# LINE 2362 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Expr_TypedExpr :: T_Expr ->- T_Type ->- T_Expr -sem_Expr_TypedExpr !(T_Expr expr_ ) !(T_Type tp_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2375 "src-ag/PrintCode.hs" #-}- )) of- { !_tpOnested ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2380 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2385 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2390 "src-ag/PrintCode.hs" #-}- )) of- { !_exprOnested ->- (case (tp_ _tpOnested ) of- { ( !_tpIpp,!_tpIprec) ->- (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of- { ( !_exprIpp) ->- (case (({-# LINE 180 "src-ag/PrintCode.ag" #-}- pp_parens (_exprIpp >#< "::" >#< _tpIpp)- {-# LINE 2399 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) })) )-sem_Expr_UnboxedTupleExpr :: T_Exprs ->- T_Expr -sem_Expr_UnboxedTupleExpr !(T_Exprs exprs_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2411 "src-ag/PrintCode.hs" #-}- )) of- { !_exprsOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2416 "src-ag/PrintCode.hs" #-}- )) of- { !_exprsOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2421 "src-ag/PrintCode.hs" #-}- )) of- { !_exprsOnested ->- (case (exprs_ _exprsOnested _exprsOoptions _exprsOoutputfile ) of- { ( !_exprsIpps) ->- (case (({-# LINE 160 "src-ag/PrintCode.ag" #-}- ppUnboxedTuple _lhsInested _exprsIpps- {-# LINE 2428 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )--- Exprs --------------------------------------------------------{-- visit 0:- inherited attributes:- nested : Bool- options : Options- outputfile : String- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : Expr - child tl : Exprs - alternative Nil:--}--- cata-sem_Exprs :: Exprs ->- T_Exprs -sem_Exprs !list =- (Prelude.foldr sem_Exprs_Cons sem_Exprs_Nil (Prelude.map sem_Expr list) )--- semantic domain-newtype T_Exprs = T_Exprs (Bool ->- Options ->- String ->- ( PP_Docs))-data Inh_Exprs = Inh_Exprs {nested_Inh_Exprs :: !(Bool),options_Inh_Exprs :: !(Options),outputfile_Inh_Exprs :: !(String)}-data Syn_Exprs = Syn_Exprs {pps_Syn_Exprs :: !(PP_Docs)}-wrap_Exprs :: T_Exprs ->- Inh_Exprs ->- Syn_Exprs -wrap_Exprs !(T_Exprs sem ) !(Inh_Exprs _lhsInested _lhsIoptions _lhsIoutputfile ) =- (let ( !_lhsOpps) = sem _lhsInested _lhsIoptions _lhsIoutputfile - in (Syn_Exprs _lhsOpps ))-sem_Exprs_Cons :: T_Expr ->- T_Exprs ->- T_Exprs -sem_Exprs_Cons !(T_Expr hd_ ) !(T_Exprs tl_ ) =- (T_Exprs (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2474 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2479 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2484 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOnested ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2489 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2494 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2499 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOnested ->- (case (tl_ _tlOnested _tlOoptions _tlOoutputfile ) of- { ( !_tlIpps) ->- (case (hd_ _hdOnested _hdOoptions _hdOoutputfile ) of- { ( !_hdIpp) ->- (case (({-# LINE 65 "src-ag/PrintCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 2508 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) }) }) }) }) })) )-sem_Exprs_Nil :: T_Exprs -sem_Exprs_Nil =- (T_Exprs (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 66 "src-ag/PrintCode.ag" #-}- []- {-# LINE 2519 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- Lhs ----------------------------------------------------------{-- visit 0:- inherited attributes:- isDeclOfLet : Bool- nested : Bool- options : Options- outputfile : String- synthesized attribute:- pp : PP_Doc- alternatives:- alternative Fun:- child name : {String}- child args : Exprs - visit 0:- local addBang : _- local strictGuard : _- local hasStrictVars : _- local addStrictGuard : _- alternative Pattern3:- child pat3 : Pattern - visit 0:- local hasStrictVars : _- local strictGuard : _- local addStrictGuard : _- alternative Pattern3SM:- child pat3 : Pattern - alternative TupleLhs:- child comps : {[String]}- visit 0:- local addBang : _- local hasStrictVars : _- local strictGuard : _- local addStrictGuard : _- alternative UnboxedTupleLhs:- child comps : {[String]}- visit 0:- local addBang : _- local hasStrictVars : _- local strictGuard : _- local addStrictGuard : _- alternative Unwrap:- child name : {String}- child sub : Lhs --}--- cata-sem_Lhs :: Lhs ->- T_Lhs -sem_Lhs !(Fun _name _args ) =- (sem_Lhs_Fun _name (sem_Exprs _args ) )-sem_Lhs !(Pattern3 _pat3 ) =- (sem_Lhs_Pattern3 (sem_Pattern _pat3 ) )-sem_Lhs !(Pattern3SM _pat3 ) =- (sem_Lhs_Pattern3SM (sem_Pattern _pat3 ) )-sem_Lhs !(TupleLhs _comps ) =- (sem_Lhs_TupleLhs _comps )-sem_Lhs !(UnboxedTupleLhs _comps ) =- (sem_Lhs_UnboxedTupleLhs _comps )-sem_Lhs !(Unwrap _name _sub ) =- (sem_Lhs_Unwrap _name (sem_Lhs _sub ) )--- semantic domain-newtype T_Lhs = T_Lhs (Bool ->- Bool ->- Options ->- String ->- ( PP_Doc))-data Inh_Lhs = Inh_Lhs {isDeclOfLet_Inh_Lhs :: !(Bool),nested_Inh_Lhs :: !(Bool),options_Inh_Lhs :: !(Options),outputfile_Inh_Lhs :: !(String)}-data Syn_Lhs = Syn_Lhs {pp_Syn_Lhs :: !(PP_Doc)}-wrap_Lhs :: T_Lhs ->- Inh_Lhs ->- Syn_Lhs -wrap_Lhs !(T_Lhs sem ) !(Inh_Lhs _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile ) =- (let ( !_lhsOpp) = sem _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile - in (Syn_Lhs _lhsOpp ))-sem_Lhs_Fun :: String ->- T_Exprs ->- T_Lhs -sem_Lhs_Fun !name_ !(T_Exprs args_ ) =- (T_Lhs (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2607 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2612 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOoptions ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2617 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOnested ->- (case (({-# LINE 248 "src-ag/PrintCode.ag" #-}- if bangpats _lhsIoptions- then \p -> "!" >|< p- else id- {-# LINE 2624 "src-ag/PrintCode.hs" #-}- )) of- { !_addBang ->- (case (args_ _argsOnested _argsOoptions _argsOoutputfile ) of- { ( !_argsIpps) ->- (case (({-# LINE 245 "src-ag/PrintCode.ag" #-}- _argsIpps `ppMultiSeqH` (pp "True")- {-# LINE 2631 "src-ag/PrintCode.hs" #-}- )) of- { !_strictGuard ->- (case (({-# LINE 244 "src-ag/PrintCode.ag" #-}- not (null _argsIpps)- {-# LINE 2636 "src-ag/PrintCode.hs" #-}- )) of- { !_hasStrictVars ->- (case (({-# LINE 243 "src-ag/PrintCode.ag" #-}- if strictSems _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id- {-# LINE 2641 "src-ag/PrintCode.hs" #-}- )) of- { !_addStrictGuard ->- (case (({-# LINE 256 "src-ag/PrintCode.ag" #-}- _addStrictGuard (name_ >#< hv_sp (map _addBang _argsIpps))- {-# LINE 2646 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) })) )-sem_Lhs_Pattern3 :: T_Pattern ->- T_Lhs -sem_Lhs_Pattern3 !(T_Pattern pat3_ ) =- (T_Lhs (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2659 "src-ag/PrintCode.hs" #-}- )) of- { !_pat3Ooptions ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 2664 "src-ag/PrintCode.hs" #-}- )) of- { !_pat3OisDeclOfLet ->- (case (({-# LINE 380 "src-ag/PrintCode.ag" #-}- False- {-# LINE 2669 "src-ag/PrintCode.hs" #-}- )) of- { !_pat3ObelowIrrefutable ->- (case (pat3_ _pat3ObelowIrrefutable _pat3OisDeclOfLet _pat3Ooptions ) of- { ( !_pat3Icopy,!_pat3IisUnderscore,!_pat3Ipp,!_pat3Ipp',!_pat3IstrictVars) ->- (case (({-# LINE 235 "src-ag/PrintCode.ag" #-}- not (null _pat3IstrictVars)- {-# LINE 2676 "src-ag/PrintCode.hs" #-}- )) of- { !_hasStrictVars ->- (case (({-# LINE 234 "src-ag/PrintCode.ag" #-}- _pat3IstrictVars `ppMultiSeqH` (pp "True")- {-# LINE 2681 "src-ag/PrintCode.hs" #-}- )) of- { !_strictGuard ->- (case (({-# LINE 232 "src-ag/PrintCode.ag" #-}- if strictCases _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id- {-# LINE 2686 "src-ag/PrintCode.hs" #-}- )) of- { !_addStrictGuard ->- (case (({-# LINE 252 "src-ag/PrintCode.ag" #-}- _addStrictGuard _pat3Ipp- {-# LINE 2691 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) })) )-sem_Lhs_Pattern3SM :: T_Pattern ->- T_Lhs -sem_Lhs_Pattern3SM !(T_Pattern pat3_ ) =- (T_Lhs (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2704 "src-ag/PrintCode.hs" #-}- )) of- { !_pat3Ooptions ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 2709 "src-ag/PrintCode.hs" #-}- )) of- { !_pat3OisDeclOfLet ->- (case (({-# LINE 380 "src-ag/PrintCode.ag" #-}- False- {-# LINE 2714 "src-ag/PrintCode.hs" #-}- )) of- { !_pat3ObelowIrrefutable ->- (case (pat3_ _pat3ObelowIrrefutable _pat3OisDeclOfLet _pat3Ooptions ) of- { ( !_pat3Icopy,!_pat3IisUnderscore,!_pat3Ipp,!_pat3Ipp',!_pat3IstrictVars) ->- (case (({-# LINE 253 "src-ag/PrintCode.ag" #-}- _pat3Ipp'- {-# LINE 2721 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Lhs_TupleLhs :: ([String]) ->- T_Lhs -sem_Lhs_TupleLhs !comps_ =- (T_Lhs (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 248 "src-ag/PrintCode.ag" #-}- if bangpats _lhsIoptions- then \p -> "!" >|< p- else id- {-# LINE 2736 "src-ag/PrintCode.hs" #-}- )) of- { !_addBang ->- (case (({-# LINE 240 "src-ag/PrintCode.ag" #-}- not (null comps_)- {-# LINE 2741 "src-ag/PrintCode.hs" #-}- )) of- { !_hasStrictVars ->- (case (({-# LINE 237 "src-ag/PrintCode.ag" #-}- if stricterCases _lhsIoptions && not _lhsIisDeclOfLet- then map text comps_ `ppMultiSeqH` (pp "True")- else pp "True"- {-# LINE 2748 "src-ag/PrintCode.hs" #-}- )) of- { !_strictGuard ->- (case (({-# LINE 232 "src-ag/PrintCode.ag" #-}- if strictCases _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id- {-# LINE 2753 "src-ag/PrintCode.hs" #-}- )) of- { !_addStrictGuard ->- (case (({-# LINE 254 "src-ag/PrintCode.ag" #-}- _addStrictGuard $ ppTuple _lhsInested (map (_addBang . text) comps_)- {-# LINE 2758 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Lhs_UnboxedTupleLhs :: ([String]) ->- T_Lhs -sem_Lhs_UnboxedTupleLhs !comps_ =- (T_Lhs (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 248 "src-ag/PrintCode.ag" #-}- if bangpats _lhsIoptions- then \p -> "!" >|< p- else id- {-# LINE 2773 "src-ag/PrintCode.hs" #-}- )) of- { !_addBang ->- (case (({-# LINE 240 "src-ag/PrintCode.ag" #-}- not (null comps_)- {-# LINE 2778 "src-ag/PrintCode.hs" #-}- )) of- { !_hasStrictVars ->- (case (({-# LINE 237 "src-ag/PrintCode.ag" #-}- if stricterCases _lhsIoptions && not _lhsIisDeclOfLet- then map text comps_ `ppMultiSeqH` (pp "True")- else pp "True"- {-# LINE 2785 "src-ag/PrintCode.hs" #-}- )) of- { !_strictGuard ->- (case (({-# LINE 232 "src-ag/PrintCode.ag" #-}- if strictCases _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id- {-# LINE 2790 "src-ag/PrintCode.hs" #-}- )) of- { !_addStrictGuard ->- (case (({-# LINE 255 "src-ag/PrintCode.ag" #-}- _addStrictGuard $ ppUnboxedTuple _lhsInested (map (_addBang . text) comps_)- {-# LINE 2795 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Lhs_Unwrap :: String ->- T_Lhs ->- T_Lhs -sem_Lhs_Unwrap !name_ !(T_Lhs sub_ ) =- (T_Lhs (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2809 "src-ag/PrintCode.hs" #-}- )) of- { !_subOoutputfile ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2814 "src-ag/PrintCode.hs" #-}- )) of- { !_subOoptions ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2819 "src-ag/PrintCode.hs" #-}- )) of- { !_subOnested ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 2824 "src-ag/PrintCode.hs" #-}- )) of- { !_subOisDeclOfLet ->- (case (sub_ _subOisDeclOfLet _subOnested _subOoptions _subOoutputfile ) of- { ( !_subIpp) ->- (case (({-# LINE 257 "src-ag/PrintCode.ag" #-}- pp_parens (name_ >#< _subIpp)- {-# LINE 2831 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) })) )--- NamedType ----------------------------------------------------{-- visit 0:- inherited attribute:- nested : Bool- synthesized attribute:- pp : PP_Doc- alternatives:- alternative Named:- child strict : {Bool}- child name : {String}- child tp : Type --}--- cata-sem_NamedType :: NamedType ->- T_NamedType -sem_NamedType !(Named _strict _name _tp ) =- (sem_NamedType_Named _strict _name (sem_Type _tp ) )--- semantic domain-newtype T_NamedType = T_NamedType (Bool ->- ( PP_Doc))-data Inh_NamedType = Inh_NamedType {nested_Inh_NamedType :: !(Bool)}-data Syn_NamedType = Syn_NamedType {pp_Syn_NamedType :: !(PP_Doc)}-wrap_NamedType :: T_NamedType ->- Inh_NamedType ->- Syn_NamedType -wrap_NamedType !(T_NamedType sem ) !(Inh_NamedType _lhsInested ) =- (let ( !_lhsOpp) = sem _lhsInested - in (Syn_NamedType _lhsOpp ))-sem_NamedType_Named :: Bool ->- String ->- T_Type ->- T_NamedType -sem_NamedType_Named !strict_ !name_ !(T_Type tp_ ) =- (T_NamedType (\ (!_lhsInested) ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2872 "src-ag/PrintCode.hs" #-}- )) of- { !_tpOnested ->- (case (tp_ _tpOnested ) of- { ( !_tpIpp,!_tpIprec) ->- (case (({-# LINE 226 "src-ag/PrintCode.ag" #-}- if strict_- then name_ >#< "::" >#< "!" >|< pp_parens _tpIpp- else name_ >#< "::" >#< _tpIpp- {-# LINE 2881 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )--- NamedTypes ---------------------------------------------------{-- visit 0:- inherited attribute:- nested : Bool- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : NamedType - child tl : NamedTypes - alternative Nil:--}--- cata-sem_NamedTypes :: NamedTypes ->- T_NamedTypes -sem_NamedTypes !list =- (Prelude.foldr sem_NamedTypes_Cons sem_NamedTypes_Nil (Prelude.map sem_NamedType list) )--- semantic domain-newtype T_NamedTypes = T_NamedTypes (Bool ->- ( PP_Docs))-data Inh_NamedTypes = Inh_NamedTypes {nested_Inh_NamedTypes :: !(Bool)}-data Syn_NamedTypes = Syn_NamedTypes {pps_Syn_NamedTypes :: !(PP_Docs)}-wrap_NamedTypes :: T_NamedTypes ->- Inh_NamedTypes ->- Syn_NamedTypes -wrap_NamedTypes !(T_NamedTypes sem ) !(Inh_NamedTypes _lhsInested ) =- (let ( !_lhsOpps) = sem _lhsInested - in (Syn_NamedTypes _lhsOpps ))-sem_NamedTypes_Cons :: T_NamedType ->- T_NamedTypes ->- T_NamedTypes -sem_NamedTypes_Cons !(T_NamedType hd_ ) !(T_NamedTypes tl_ ) =- (T_NamedTypes (\ (!_lhsInested) ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2921 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOnested ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 2926 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOnested ->- (case (tl_ _tlOnested ) of- { ( !_tlIpps) ->- (case (hd_ _hdOnested ) of- { ( !_hdIpp) ->- (case (({-# LINE 81 "src-ag/PrintCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 2935 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) })) )-sem_NamedTypes_Nil :: T_NamedTypes -sem_NamedTypes_Nil =- (T_NamedTypes (\ (!_lhsInested) ->- (case (({-# LINE 82 "src-ag/PrintCode.ag" #-}- []- {-# LINE 2944 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- Pattern ------------------------------------------------------{-- visit 0:- inherited attributes:- belowIrrefutable : Bool- isDeclOfLet : Bool- options : Options- synthesized attributes:- copy : SELF - isUnderscore : Bool- pp : PP_Doc- pp' : PP_Doc- strictVars : [PP_Doc]- alternatives:- alternative Alias:- child field : {Identifier}- child attr : {Identifier}- child pat : Pattern - visit 0:- local copy : _- local ppVar : _- local addBang : _- local ppVarBang : _- local strictPatVars : _- local strictVar : _- alternative Constr:- child name : {ConstructorIdent}- child pats : Patterns - visit 0:- local copy : _- local addBang : _- alternative Irrefutable:- child pat : Pattern - visit 0:- local copy : _- alternative Product:- child pos : {Pos}- child pats : Patterns - visit 0:- local copy : _- local addBang : _- alternative Underscore:- child pos : {Pos}- visit 0:- local copy : _--}--- cata-sem_Pattern :: Pattern ->- T_Pattern -sem_Pattern !(Alias _field _attr _pat ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) )-sem_Pattern !(Constr _name _pats ) =- (sem_Pattern_Constr _name (sem_Patterns _pats ) )-sem_Pattern !(Irrefutable _pat ) =- (sem_Pattern_Irrefutable (sem_Pattern _pat ) )-sem_Pattern !(Product _pos _pats ) =- (sem_Pattern_Product _pos (sem_Patterns _pats ) )-sem_Pattern !(Underscore _pos ) =- (sem_Pattern_Underscore _pos )--- semantic domain-newtype T_Pattern = T_Pattern (Bool ->- Bool ->- Options ->- ( Pattern ,Bool,PP_Doc,PP_Doc,([PP_Doc])))-data Inh_Pattern = Inh_Pattern {belowIrrefutable_Inh_Pattern :: !(Bool),isDeclOfLet_Inh_Pattern :: !(Bool),options_Inh_Pattern :: !(Options)}-data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: !(Pattern ),isUnderscore_Syn_Pattern :: !(Bool),pp_Syn_Pattern :: !(PP_Doc),pp'_Syn_Pattern :: !(PP_Doc),strictVars_Syn_Pattern :: !(([PP_Doc]))}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern !(T_Pattern sem ) !(Inh_Pattern _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions ) =- (let ( !_lhsOcopy,!_lhsOisUnderscore,!_lhsOpp,!_lhsOpp',!_lhsOstrictVars) = sem _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions - in (Syn_Pattern _lhsOcopy _lhsOisUnderscore _lhsOpp _lhsOpp' _lhsOstrictVars ))-sem_Pattern_Alias :: Identifier ->- Identifier ->- T_Pattern ->- T_Pattern -sem_Pattern_Alias !field_ !attr_ !(T_Pattern pat_ ) =- (T_Pattern (\ (!_lhsIbelowIrrefutable)- (!_lhsIisDeclOfLet)- (!_lhsIoptions) ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 3030 "src-ag/PrintCode.hs" #-}- )) of- { !_patOoptions ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 3035 "src-ag/PrintCode.hs" #-}- )) of- { !_patOisDeclOfLet ->- (case (({-# LINE 373 "src-ag/PrintCode.ag" #-}- _lhsIbelowIrrefutable- {-# LINE 3040 "src-ag/PrintCode.hs" #-}- )) of- { !_patObelowIrrefutable ->- (case (pat_ _patObelowIrrefutable _patOisDeclOfLet _patOoptions ) of- { ( !_patIcopy,!_patIisUnderscore,!_patIpp,!_patIpp',!_patIstrictVars) ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Alias field_ attr_ _patIcopy- {-# LINE 3047 "src-ag/PrintCode.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 3052 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 370 "src-ag/PrintCode.ag" #-}- False- {-# LINE 3057 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOisUnderscore ->- (case (({-# LINE 359 "src-ag/PrintCode.ag" #-}- pp (attrname False field_ attr_)- {-# LINE 3062 "src-ag/PrintCode.hs" #-}- )) of- { !_ppVar ->- (case (({-# LINE 352 "src-ag/PrintCode.ag" #-}- if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable- then \p -> "!" >|< p- else id- {-# LINE 3069 "src-ag/PrintCode.hs" #-}- )) of- { !_addBang ->- (case (({-# LINE 360 "src-ag/PrintCode.ag" #-}- _addBang $ _ppVar- {-# LINE 3074 "src-ag/PrintCode.hs" #-}- )) of- { !_ppVarBang ->- (case (({-# LINE 361 "src-ag/PrintCode.ag" #-}- if _patIisUnderscore- then _ppVarBang- else _ppVarBang >|< "@" >|< _patIpp- {-# LINE 3081 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 393 "src-ag/PrintCode.ag" #-}- let attribute | field_ == _LOC || field_ == nullIdent = locname' attr_- | otherwise = attrname False field_ attr_- in attribute >|< "@" >|< _patIpp'- {-# LINE 3088 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp' ->- (case (({-# LINE 333 "src-ag/PrintCode.ag" #-}- if stricterCases _lhsIoptions && not _lhsIisDeclOfLet- then _patIstrictVars- else []- {-# LINE 3095 "src-ag/PrintCode.hs" #-}- )) of- { !_strictPatVars ->- (case (({-# LINE 329 "src-ag/PrintCode.ag" #-}- if strictCases _lhsIoptions && not _lhsIisDeclOfLet- then [_ppVar ]- else []- {-# LINE 3102 "src-ag/PrintCode.hs" #-}- )) of- { !_strictVar ->- (case (({-# LINE 337 "src-ag/PrintCode.ag" #-}- _strictVar ++ _strictPatVars- {-# LINE 3107 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOstrictVars ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr !name_ !(T_Patterns pats_ ) =- (T_Pattern (\ (!_lhsIbelowIrrefutable)- (!_lhsIisDeclOfLet)- (!_lhsIoptions) ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 3120 "src-ag/PrintCode.hs" #-}- )) of- { !_patsOoptions ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 3125 "src-ag/PrintCode.hs" #-}- )) of- { !_patsOisDeclOfLet ->- (case (({-# LINE 373 "src-ag/PrintCode.ag" #-}- _lhsIbelowIrrefutable- {-# LINE 3130 "src-ag/PrintCode.hs" #-}- )) of- { !_patsObelowIrrefutable ->- (case (pats_ _patsObelowIrrefutable _patsOisDeclOfLet _patsOoptions ) of- { ( !_patsIcopy,!_patsIpps,!_patsIpps',!_patsIstrictVars) ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 3137 "src-ag/PrintCode.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 3142 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 368 "src-ag/PrintCode.ag" #-}- False- {-# LINE 3147 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOisUnderscore ->- (case (({-# LINE 352 "src-ag/PrintCode.ag" #-}- if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable- then \p -> "!" >|< p- else id- {-# LINE 3154 "src-ag/PrintCode.hs" #-}- )) of- { !_addBang ->- (case (({-# LINE 357 "src-ag/PrintCode.ag" #-}- _addBang $ pp_parens $ name_ >#< hv_sp _patsIpps- {-# LINE 3159 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 391 "src-ag/PrintCode.ag" #-}- pp_parens $ name_ >#< hv_sp (map pp_parens _patsIpps')- {-# LINE 3164 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp' ->- (case (({-# LINE 326 "src-ag/PrintCode.ag" #-}- _patsIstrictVars- {-# LINE 3169 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOstrictVars ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable !(T_Pattern pat_ ) =- (T_Pattern (\ (!_lhsIbelowIrrefutable)- (!_lhsIisDeclOfLet)- (!_lhsIoptions) ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 3181 "src-ag/PrintCode.hs" #-}- )) of- { !_patOoptions ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 3186 "src-ag/PrintCode.hs" #-}- )) of- { !_patOisDeclOfLet ->- (case (({-# LINE 376 "src-ag/PrintCode.ag" #-}- True- {-# LINE 3191 "src-ag/PrintCode.hs" #-}- )) of- { !_patObelowIrrefutable ->- (case (pat_ _patObelowIrrefutable _patOisDeclOfLet _patOoptions ) of- { ( !_patIcopy,!_patIisUnderscore,!_patIpp,!_patIpp',!_patIstrictVars) ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 3198 "src-ag/PrintCode.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 3203 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 367 "src-ag/PrintCode.ag" #-}- _patIisUnderscore- {-# LINE 3208 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOisUnderscore ->- (case (({-# LINE 364 "src-ag/PrintCode.ag" #-}- text "~" >|< pp_parens _patIpp- {-# LINE 3213 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 396 "src-ag/PrintCode.ag" #-}- text "~" >|< pp_parens _patIpp- {-# LINE 3218 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp' ->- (case (({-# LINE 340 "src-ag/PrintCode.ag" #-}- []- {-# LINE 3223 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOstrictVars ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product !pos_ !(T_Patterns pats_ ) =- (T_Pattern (\ (!_lhsIbelowIrrefutable)- (!_lhsIisDeclOfLet)- (!_lhsIoptions) ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 3236 "src-ag/PrintCode.hs" #-}- )) of- { !_patsOoptions ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 3241 "src-ag/PrintCode.hs" #-}- )) of- { !_patsOisDeclOfLet ->- (case (({-# LINE 373 "src-ag/PrintCode.ag" #-}- _lhsIbelowIrrefutable- {-# LINE 3246 "src-ag/PrintCode.hs" #-}- )) of- { !_patsObelowIrrefutable ->- (case (pats_ _patsObelowIrrefutable _patsOisDeclOfLet _patsOoptions ) of- { ( !_patsIcopy,!_patsIpps,!_patsIpps',!_patsIstrictVars) ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 3253 "src-ag/PrintCode.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 3258 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 369 "src-ag/PrintCode.ag" #-}- False- {-# LINE 3263 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOisUnderscore ->- (case (({-# LINE 352 "src-ag/PrintCode.ag" #-}- if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable- then \p -> "!" >|< p- else id- {-# LINE 3270 "src-ag/PrintCode.hs" #-}- )) of- { !_addBang ->- (case (({-# LINE 358 "src-ag/PrintCode.ag" #-}- _addBang $ pp_block "(" ")" "," _patsIpps- {-# LINE 3275 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 392 "src-ag/PrintCode.ag" #-}- pp_block "(" ")" "," _patsIpps'- {-# LINE 3280 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp' ->- (case (({-# LINE 326 "src-ag/PrintCode.ag" #-}- _patsIstrictVars- {-# LINE 3285 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOstrictVars ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore !pos_ =- (T_Pattern (\ (!_lhsIbelowIrrefutable)- (!_lhsIisDeclOfLet)- (!_lhsIoptions) ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Underscore pos_- {-# LINE 3297 "src-ag/PrintCode.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 3302 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 371 "src-ag/PrintCode.ag" #-}- True- {-# LINE 3307 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOisUnderscore ->- (case (({-# LINE 365 "src-ag/PrintCode.ag" #-}- text "_"- {-# LINE 3312 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 397 "src-ag/PrintCode.ag" #-}- text "_"- {-# LINE 3317 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp' ->- (case (({-# LINE 326 "src-ag/PrintCode.ag" #-}- []- {-# LINE 3322 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOstrictVars ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) })) )--- Patterns -----------------------------------------------------{-- visit 0:- inherited attributes:- belowIrrefutable : Bool- isDeclOfLet : Bool- options : Options- synthesized attributes:- copy : SELF - pps : [PP_Doc]- pps' : [PP_Doc]- strictVars : [PP_Doc]- alternatives:- alternative Cons:- child hd : Pattern - child tl : Patterns - visit 0:- local copy : _- alternative Nil:- visit 0:- local copy : _--}--- cata-sem_Patterns :: Patterns ->- T_Patterns -sem_Patterns !list =- (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list) )--- semantic domain-newtype T_Patterns = T_Patterns (Bool ->- Bool ->- Options ->- ( Patterns ,([PP_Doc]),([PP_Doc]),([PP_Doc])))-data Inh_Patterns = Inh_Patterns {belowIrrefutable_Inh_Patterns :: !(Bool),isDeclOfLet_Inh_Patterns :: !(Bool),options_Inh_Patterns :: !(Options)}-data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: !(Patterns ),pps_Syn_Patterns :: !(([PP_Doc])),pps'_Syn_Patterns :: !(([PP_Doc])),strictVars_Syn_Patterns :: !(([PP_Doc]))}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns !(T_Patterns sem ) !(Inh_Patterns _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions ) =- (let ( !_lhsOcopy,!_lhsOpps,!_lhsOpps',!_lhsOstrictVars) = sem _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions - in (Syn_Patterns _lhsOcopy _lhsOpps _lhsOpps' _lhsOstrictVars ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons !(T_Pattern hd_ ) !(T_Patterns tl_ ) =- (T_Patterns (\ (!_lhsIbelowIrrefutable)- (!_lhsIisDeclOfLet)- (!_lhsIoptions) ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 3375 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOoptions ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 3380 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOisDeclOfLet ->- (case (({-# LINE 373 "src-ag/PrintCode.ag" #-}- _lhsIbelowIrrefutable- {-# LINE 3385 "src-ag/PrintCode.hs" #-}- )) of- { !_tlObelowIrrefutable ->- (case (tl_ _tlObelowIrrefutable _tlOisDeclOfLet _tlOoptions ) of- { ( !_tlIcopy,!_tlIpps,!_tlIpps',!_tlIstrictVars) ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _lhsIoptions- {-# LINE 3392 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOoptions ->- (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 3397 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOisDeclOfLet ->- (case (({-# LINE 373 "src-ag/PrintCode.ag" #-}- _lhsIbelowIrrefutable- {-# LINE 3402 "src-ag/PrintCode.hs" #-}- )) of- { !_hdObelowIrrefutable ->- (case (hd_ _hdObelowIrrefutable _hdOisDeclOfLet _hdOoptions ) of- { ( !_hdIcopy,!_hdIisUnderscore,!_hdIpp,!_hdIpp',!_hdIstrictVars) ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 3409 "src-ag/PrintCode.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 3414 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 347 "src-ag/PrintCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 3419 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- (case (({-# LINE 387 "src-ag/PrintCode.ag" #-}- _hdIpp' : _tlIpps'- {-# LINE 3424 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps' ->- (case (({-# LINE 326 "src-ag/PrintCode.ag" #-}- _hdIstrictVars ++ _tlIstrictVars- {-# LINE 3429 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOstrictVars ->- ( _lhsOcopy,_lhsOpps,_lhsOpps',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =- (T_Patterns (\ (!_lhsIbelowIrrefutable)- (!_lhsIisDeclOfLet)- (!_lhsIoptions) ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- []- {-# LINE 3440 "src-ag/PrintCode.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 3445 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 348 "src-ag/PrintCode.ag" #-}- []- {-# LINE 3450 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- (case (({-# LINE 388 "src-ag/PrintCode.ag" #-}- []- {-# LINE 3455 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps' ->- (case (({-# LINE 326 "src-ag/PrintCode.ag" #-}- []- {-# LINE 3460 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOstrictVars ->- ( _lhsOcopy,_lhsOpps,_lhsOpps',_lhsOstrictVars) }) }) }) }) })) )--- Program ------------------------------------------------------{-- visit 0:- inherited attributes:- importBlocks : PP_Doc- mainBlocksDoc : PP_Doc- mainFile : String- mainName : String- moduleHeader : String -> String -> String -> Bool -> String- options : Options- optionsLine : String- pragmaBlocks : String- textBlockMap : Map BlockInfo PP_Doc- textBlocks : PP_Doc- synthesized attributes:- genIO : IO ()- output : PP_Docs- alternatives:- alternative Program:- child chunks : Chunks - child ordered : {Bool}- visit 0:- local options : _- local commonFile : _- local genCommonModule : _- local mainModuleFile : _- local genMainModule : _--}--- cata-sem_Program :: Program ->- T_Program -sem_Program !(Program _chunks _ordered ) =- (sem_Program_Program (sem_Chunks _chunks ) _ordered )--- semantic domain-newtype T_Program = T_Program (PP_Doc ->- PP_Doc ->- String ->- String ->- (String -> String -> String -> Bool -> String) ->- Options ->- String ->- String ->- (Map BlockInfo PP_Doc) ->- PP_Doc ->- ( (IO ()),PP_Docs))-data Inh_Program = Inh_Program {importBlocks_Inh_Program :: !(PP_Doc),mainBlocksDoc_Inh_Program :: !(PP_Doc),mainFile_Inh_Program :: !(String),mainName_Inh_Program :: !(String),moduleHeader_Inh_Program :: !((String -> String -> String -> Bool -> String)),options_Inh_Program :: !(Options),optionsLine_Inh_Program :: !(String),pragmaBlocks_Inh_Program :: !(String),textBlockMap_Inh_Program :: !((Map BlockInfo PP_Doc)),textBlocks_Inh_Program :: !(PP_Doc)}-data Syn_Program = Syn_Program {genIO_Syn_Program :: !((IO ())),output_Syn_Program :: !(PP_Docs)}-wrap_Program :: T_Program ->- Inh_Program ->- Syn_Program -wrap_Program !(T_Program sem ) !(Inh_Program _lhsIimportBlocks _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks ) =- (let ( !_lhsOgenIO,!_lhsOoutput) = sem _lhsIimportBlocks _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks - in (Syn_Program _lhsOgenIO _lhsOoutput ))-sem_Program_Program :: T_Chunks ->- Bool ->- T_Program -sem_Program_Program !(T_Chunks chunks_ ) !ordered_ =- (T_Program (\ (!_lhsIimportBlocks)- (!_lhsImainBlocksDoc)- (!_lhsImainFile)- (!_lhsImainName)- (!_lhsImoduleHeader)- (!_lhsIoptions)- (!_lhsIoptionsLine)- (!_lhsIpragmaBlocks)- (!_lhsItextBlockMap)- (!_lhsItextBlocks) ->- (case (({-# LINE 435 "src-ag/PrintCode.ag" #-}- _lhsItextBlockMap- {-# LINE 3533 "src-ag/PrintCode.hs" #-}- )) of- { !_chunksOtextBlockMap ->- (case (({-# LINE 433 "src-ag/PrintCode.ag" #-}- _lhsIpragmaBlocks- {-# LINE 3538 "src-ag/PrintCode.hs" #-}- )) of- { !_chunksOpragmaBlocks ->- (case (({-# LINE 436 "src-ag/PrintCode.ag" #-}- _lhsIoptionsLine- {-# LINE 3543 "src-ag/PrintCode.hs" #-}- )) of- { !_chunksOoptionsLine ->- (case (({-# LINE 59 "src-ag/PrintCode.ag" #-}- _lhsIoptions { breadthFirst = breadthFirst _lhsIoptions && visit _lhsIoptions && cases _lhsIoptions && ordered_ }- {-# LINE 3548 "src-ag/PrintCode.hs" #-}- )) of- { !_options ->- (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}- _options- {-# LINE 3553 "src-ag/PrintCode.hs" #-}- )) of- { !_chunksOoptions ->- (case (({-# LINE 439 "src-ag/PrintCode.ag" #-}- _lhsImoduleHeader- {-# LINE 3558 "src-ag/PrintCode.hs" #-}- )) of- { !_chunksOmoduleHeader ->- (case (({-# LINE 438 "src-ag/PrintCode.ag" #-}- _lhsImainName- {-# LINE 3563 "src-ag/PrintCode.hs" #-}- )) of- { !_chunksOmainName ->- (case (({-# LINE 437 "src-ag/PrintCode.ag" #-}- _lhsImainFile- {-# LINE 3568 "src-ag/PrintCode.hs" #-}- )) of- { !_chunksOmainFile ->- (case (({-# LINE 457 "src-ag/PrintCode.ag" #-}- replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ "_common")- {-# LINE 3573 "src-ag/PrintCode.hs" #-}- )) of- { !_commonFile ->- (case (({-# LINE 410 "src-ag/PrintCode.ag" #-}- False- {-# LINE 3578 "src-ag/PrintCode.hs" #-}- )) of- { !_chunksOisDeclOfLet ->- (case (({-# LINE 62 "src-ag/PrintCode.ag" #-}- nest _lhsIoptions- {-# LINE 3583 "src-ag/PrintCode.hs" #-}- )) of- { !_chunksOnested ->- (case (({-# LINE 434 "src-ag/PrintCode.ag" #-}- _lhsItextBlocks- {-# LINE 3588 "src-ag/PrintCode.hs" #-}- )) of- { !_chunksOtextBlocks ->- (case (({-# LINE 432 "src-ag/PrintCode.ag" #-}- _lhsIimportBlocks- {-# LINE 3593 "src-ag/PrintCode.hs" #-}- )) of- { !_chunksOimportBlocks ->- (case (chunks_ _chunksOimportBlocks _chunksOisDeclOfLet _chunksOmainFile _chunksOmainName _chunksOmoduleHeader _chunksOnested _chunksOoptions _chunksOoptionsLine _chunksOpragmaBlocks _chunksOtextBlockMap _chunksOtextBlocks ) of- { ( !_chunksIappendCommon,!_chunksIappendMain,!_chunksIgenSems,!_chunksIimports,!_chunksIpps) ->- (case (({-# LINE 458 "src-ag/PrintCode.ag" #-}- writeModule _commonFile- ( [ pp $ _lhsIpragmaBlocks- , pp $ _lhsIoptionsLine- , pp $ _lhsImoduleHeader _lhsImainName "_common" "" True- , _lhsIimportBlocks- , _lhsItextBlocks- ]- ++ map vlist _chunksIappendCommon- )- {-# LINE 3608 "src-ag/PrintCode.hs" #-}- )) of- { !_genCommonModule ->- (case (({-# LINE 444 "src-ag/PrintCode.ag" #-}- _lhsImainFile- {-# LINE 3613 "src-ag/PrintCode.hs" #-}- )) of- { !_mainModuleFile ->- (case (({-# LINE 445 "src-ag/PrintCode.ag" #-}- writeModule _mainModuleFile- ( [ pp $ _lhsIpragmaBlocks- , pp $ _lhsIoptionsLine- , pp $ _lhsImoduleHeader _lhsImainName "" "" False- , pp $ ("import " ++ _lhsImainName ++ "_common\n")- ]- ++ map pp _chunksIimports- ++ map vlist _chunksIappendMain- ++ [_lhsImainBlocksDoc]- )- {-# LINE 3627 "src-ag/PrintCode.hs" #-}- )) of- { !_genMainModule ->- (case (({-# LINE 469 "src-ag/PrintCode.ag" #-}- do _genMainModule- _genCommonModule- _chunksIgenSems- {-# LINE 3634 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOgenIO ->- (case (({-# LINE 94 "src-ag/PrintCode.ag" #-}- _chunksIpps- {-# LINE 3639 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOgenIO,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Type ---------------------------------------------------------{-- visit 0:- inherited attribute:- nested : Bool- synthesized attributes:- pp : PP_Doc- prec : Int- alternatives:- alternative Arr:- child left : Type - child right : Type - visit 0:- local r : _- local l : _- alternative CtxApp:- child left : {[(String, [String])]}- child right : Type - alternative List:- child tp : Type - alternative NontermType:- child name : {String}- child params : {[String]}- child deforested : {Bool}- visit 0:- local prefix : _- alternative QuantApp:- child left : {String}- child right : Type - alternative SimpleType:- child txt : {String}- alternative TEither:- child left : Type - child right : Type - alternative TIntMap:- child value : Type - alternative TMap:- child key : Type - child value : Type - alternative TMaybe:- child tp : Type - alternative TupleType:- child tps : Types - alternative TypeApp:- child func : Type - child args : Types - alternative UnboxedTupleType:- child tps : Types --}--- cata-sem_Type :: Type ->- T_Type -sem_Type !(Arr _left _right ) =- (sem_Type_Arr (sem_Type _left ) (sem_Type _right ) )-sem_Type !(CtxApp _left _right ) =- (sem_Type_CtxApp _left (sem_Type _right ) )-sem_Type !(List _tp ) =- (sem_Type_List (sem_Type _tp ) )-sem_Type !(NontermType _name _params _deforested ) =- (sem_Type_NontermType _name _params _deforested )-sem_Type !(QuantApp _left _right ) =- (sem_Type_QuantApp _left (sem_Type _right ) )-sem_Type !(SimpleType _txt ) =- (sem_Type_SimpleType _txt )-sem_Type !(TEither _left _right ) =- (sem_Type_TEither (sem_Type _left ) (sem_Type _right ) )-sem_Type !(TIntMap _value ) =- (sem_Type_TIntMap (sem_Type _value ) )-sem_Type !(TMap _key _value ) =- (sem_Type_TMap (sem_Type _key ) (sem_Type _value ) )-sem_Type !(TMaybe _tp ) =- (sem_Type_TMaybe (sem_Type _tp ) )-sem_Type !(TupleType _tps ) =- (sem_Type_TupleType (sem_Types _tps ) )-sem_Type !(TypeApp _func _args ) =- (sem_Type_TypeApp (sem_Type _func ) (sem_Types _args ) )-sem_Type !(UnboxedTupleType _tps ) =- (sem_Type_UnboxedTupleType (sem_Types _tps ) )--- semantic domain-newtype T_Type = T_Type (Bool ->- ( PP_Doc,Int))-data Inh_Type = Inh_Type {nested_Inh_Type :: !(Bool)}-data Syn_Type = Syn_Type {pp_Syn_Type :: !(PP_Doc),prec_Syn_Type :: !(Int)}-wrap_Type :: T_Type ->- Inh_Type ->- Syn_Type -wrap_Type !(T_Type sem ) !(Inh_Type _lhsInested ) =- (let ( !_lhsOpp,!_lhsOprec) = sem _lhsInested - in (Syn_Type _lhsOpp _lhsOprec ))-sem_Type_Arr :: T_Type ->- T_Type ->- T_Type -sem_Type_Arr !(T_Type left_ ) !(T_Type right_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 3739 "src-ag/PrintCode.hs" #-}- )) of- { !_rightOnested ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 3744 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOnested ->- (case (right_ _rightOnested ) of- { ( !_rightIpp,!_rightIprec) ->- (case (({-# LINE 263 "src-ag/PrintCode.ag" #-}- if _rightIprec < 2 then pp_parens _rightIpp else _rightIpp- {-# LINE 3751 "src-ag/PrintCode.hs" #-}- )) of- { !_r ->- (case (left_ _leftOnested ) of- { ( !_leftIpp,!_leftIprec) ->- (case (({-# LINE 262 "src-ag/PrintCode.ag" #-}- if _leftIprec <= 2 then pp_parens _leftIpp else _leftIpp- {-# LINE 3758 "src-ag/PrintCode.hs" #-}- )) of- { !_l ->- (case (({-# LINE 261 "src-ag/PrintCode.ag" #-}- _l >#< "->" >-< _r- {-# LINE 3763 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 260 "src-ag/PrintCode.ag" #-}- 2- {-# LINE 3768 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) }) }) }) }) })) )-sem_Type_CtxApp :: ([(String, [String])]) ->- T_Type ->- T_Type -sem_Type_CtxApp !left_ !(T_Type right_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 3779 "src-ag/PrintCode.hs" #-}- )) of- { !_rightOnested ->- (case (right_ _rightOnested ) of- { ( !_rightIpp,!_rightIprec) ->- (case (({-# LINE 269 "src-ag/PrintCode.ag" #-}- (pp_block "(" ")" "," $ map (\(n,ns) -> hv_sp $ map pp (n:ns)) left_) >#< "=>" >#< _rightIpp- {-# LINE 3786 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 259 "src-ag/PrintCode.ag" #-}- _rightIprec- {-# LINE 3791 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) })) )-sem_Type_List :: T_Type ->- T_Type -sem_Type_List !(T_Type tp_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 3801 "src-ag/PrintCode.hs" #-}- )) of- { !_tpOnested ->- (case (tp_ _tpOnested ) of- { ( !_tpIpp,!_tpIprec) ->- (case (({-# LINE 280 "src-ag/PrintCode.ag" #-}- "[" >|< _tpIpp >|< "]"- {-# LINE 3808 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 279 "src-ag/PrintCode.ag" #-}- 5- {-# LINE 3813 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) })) )-sem_Type_NontermType :: String ->- ([String]) ->- Bool ->- T_Type -sem_Type_NontermType !name_ !params_ !deforested_ =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 287 "src-ag/PrintCode.ag" #-}- if deforested_- then text "T_"- else empty- {-# LINE 3827 "src-ag/PrintCode.hs" #-}- )) of- { !_prefix ->- (case (({-# LINE 286 "src-ag/PrintCode.ag" #-}- _prefix >|< text name_ >#< hv_sp params_- {-# LINE 3832 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 285 "src-ag/PrintCode.ag" #-}- 5- {-# LINE 3837 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) })) )-sem_Type_QuantApp :: String ->- T_Type ->- T_Type -sem_Type_QuantApp !left_ !(T_Type right_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 3848 "src-ag/PrintCode.hs" #-}- )) of- { !_rightOnested ->- (case (right_ _rightOnested ) of- { ( !_rightIpp,!_rightIprec) ->- (case (({-# LINE 271 "src-ag/PrintCode.ag" #-}- left_ >#< _rightIpp- {-# LINE 3855 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 259 "src-ag/PrintCode.ag" #-}- _rightIprec- {-# LINE 3860 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) })) )-sem_Type_SimpleType :: String ->- T_Type -sem_Type_SimpleType !txt_ =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 283 "src-ag/PrintCode.ag" #-}- if reallySimple txt_ then text txt_ else pp_parens (text txt_)- {-# LINE 3870 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 282 "src-ag/PrintCode.ag" #-}- 5- {-# LINE 3875 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) })) )-sem_Type_TEither :: T_Type ->- T_Type ->- T_Type -sem_Type_TEither !(T_Type left_ ) !(T_Type right_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 3886 "src-ag/PrintCode.hs" #-}- )) of- { !_rightOnested ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 3891 "src-ag/PrintCode.hs" #-}- )) of- { !_leftOnested ->- (case (right_ _rightOnested ) of- { ( !_rightIpp,!_rightIprec) ->- (case (left_ _leftOnested ) of- { ( !_leftIpp,!_leftIprec) ->- (case (({-# LINE 293 "src-ag/PrintCode.ag" #-}- text "Either" >#< pp_parens _leftIpp >#< pp_parens _rightIpp- {-# LINE 3900 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 292 "src-ag/PrintCode.ag" #-}- 5- {-# LINE 3905 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) }) }) })) )-sem_Type_TIntMap :: T_Type ->- T_Type -sem_Type_TIntMap !(T_Type value_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 3915 "src-ag/PrintCode.hs" #-}- )) of- { !_valueOnested ->- (case (value_ _valueOnested ) of- { ( !_valueIpp,!_valueIprec) ->- (case (({-# LINE 297 "src-ag/PrintCode.ag" #-}- text "Data.IntMap.IntMap" >#< pp_parens _valueIpp- {-# LINE 3922 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 296 "src-ag/PrintCode.ag" #-}- 5- {-# LINE 3927 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) })) )-sem_Type_TMap :: T_Type ->- T_Type ->- T_Type -sem_Type_TMap !(T_Type key_ ) !(T_Type value_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 3938 "src-ag/PrintCode.hs" #-}- )) of- { !_valueOnested ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 3943 "src-ag/PrintCode.hs" #-}- )) of- { !_keyOnested ->- (case (value_ _valueOnested ) of- { ( !_valueIpp,!_valueIprec) ->- (case (key_ _keyOnested ) of- { ( !_keyIpp,!_keyIprec) ->- (case (({-# LINE 295 "src-ag/PrintCode.ag" #-}- text "Data.Map.Map" >#< pp_parens _keyIpp >#< pp_parens _valueIpp- {-# LINE 3952 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 294 "src-ag/PrintCode.ag" #-}- 5- {-# LINE 3957 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) }) }) })) )-sem_Type_TMaybe :: T_Type ->- T_Type -sem_Type_TMaybe !(T_Type tp_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 3967 "src-ag/PrintCode.hs" #-}- )) of- { !_tpOnested ->- (case (tp_ _tpOnested ) of- { ( !_tpIpp,!_tpIprec) ->- (case (({-# LINE 291 "src-ag/PrintCode.ag" #-}- text "Maybe" >#< _tpIpp- {-# LINE 3974 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 290 "src-ag/PrintCode.ag" #-}- 5- {-# LINE 3979 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) })) )-sem_Type_TupleType :: T_Types ->- T_Type -sem_Type_TupleType !(T_Types tps_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 3989 "src-ag/PrintCode.hs" #-}- )) of- { !_tpsOnested ->- (case (tps_ _tpsOnested ) of- { ( !_tpsIpps) ->- (case (({-# LINE 274 "src-ag/PrintCode.ag" #-}- ppTuple _lhsInested _tpsIpps- {-# LINE 3996 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 273 "src-ag/PrintCode.ag" #-}- 5- {-# LINE 4001 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) })) )-sem_Type_TypeApp :: T_Type ->- T_Types ->- T_Type -sem_Type_TypeApp !(T_Type func_ ) !(T_Types args_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 4012 "src-ag/PrintCode.hs" #-}- )) of- { !_argsOnested ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 4017 "src-ag/PrintCode.hs" #-}- )) of- { !_funcOnested ->- (case (args_ _argsOnested ) of- { ( !_argsIpps) ->- (case (func_ _funcOnested ) of- { ( !_funcIpp,!_funcIprec) ->- (case (({-# LINE 266 "src-ag/PrintCode.ag" #-}- hv_sp (_funcIpp : _argsIpps)- {-# LINE 4026 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 259 "src-ag/PrintCode.ag" #-}- _funcIprec- {-# LINE 4031 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) }) }) })) )-sem_Type_UnboxedTupleType :: T_Types ->- T_Type -sem_Type_UnboxedTupleType !(T_Types tps_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 4041 "src-ag/PrintCode.hs" #-}- )) of- { !_tpsOnested ->- (case (tps_ _tpsOnested ) of- { ( !_tpsIpps) ->- (case (({-# LINE 277 "src-ag/PrintCode.ag" #-}- ppUnboxedTuple _lhsInested _tpsIpps- {-# LINE 4048 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpp ->- (case (({-# LINE 276 "src-ag/PrintCode.ag" #-}- 5- {-# LINE 4053 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) })) )--- Types --------------------------------------------------------{-- visit 0:- inherited attribute:- nested : Bool- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : Type - child tl : Types - alternative Nil:--}--- cata-sem_Types :: Types ->- T_Types -sem_Types !list =- (Prelude.foldr sem_Types_Cons sem_Types_Nil (Prelude.map sem_Type list) )--- semantic domain-newtype T_Types = T_Types (Bool ->- ( PP_Docs))-data Inh_Types = Inh_Types {nested_Inh_Types :: !(Bool)}-data Syn_Types = Syn_Types {pps_Syn_Types :: !(PP_Docs)}-wrap_Types :: T_Types ->- Inh_Types ->- Syn_Types -wrap_Types !(T_Types sem ) !(Inh_Types _lhsInested ) =- (let ( !_lhsOpps) = sem _lhsInested - in (Syn_Types _lhsOpps ))-sem_Types_Cons :: T_Type ->- T_Types ->- T_Types -sem_Types_Cons !(T_Type hd_ ) !(T_Types tl_ ) =- (T_Types (\ (!_lhsInested) ->- (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 4093 "src-ag/PrintCode.hs" #-}- )) of- { !_tlOnested ->- (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}- _lhsInested- {-# LINE 4098 "src-ag/PrintCode.hs" #-}- )) of- { !_hdOnested ->- (case (tl_ _tlOnested ) of- { ( !_tlIpps) ->- (case (hd_ _hdOnested ) of- { ( !_hdIpp,!_hdIprec) ->- (case (({-# LINE 77 "src-ag/PrintCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 4107 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) })) )-sem_Types_Nil :: T_Types -sem_Types_Nil =- (T_Types (\ (!_lhsInested) ->- (case (({-# LINE 78 "src-ag/PrintCode.ag" #-}- []- {-# LINE 4116 "src-ag/PrintCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) })) )+-- UUAGC 0.9.40.1 (src-ag/PrintCode.ag)+module PrintCode where+{-# LINE 10 "src-ag/PrintCode.ag" #-}++import Data.Char (isAlphaNum)+import Pretty+import Code+import Patterns+import Options+import CommonTypes (attrname, _LOC, getName, nullIdent)+import Data.List(intersperse)+import System.IO+import System.Directory+import System.FilePath+import CommonTypes(BlockInfo, BlockKind(..), identifier)+{-# LINE 19 "dist/build/PrintCode.hs" #-}++{-# LINE 2 "src-ag/Code.ag" #-}++import Pretty+import Patterns+import Data.List(partition)+import Data.Set(Set)+import qualified Data.Set as Set+import Data.Map(Map)+import qualified Data.Map as Map+{-# LINE 30 "dist/build/PrintCode.hs" #-}++{-# LINE 2 "src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 37 "dist/build/PrintCode.hs" #-}+{-# LINE 24 "src-ag/PrintCode.ag" #-}++type PP_Docs = [PP_Doc]+{-# LINE 41 "dist/build/PrintCode.hs" #-}++{-# LINE 28 "src-ag/PrintCode.ag" #-}++ppMultiSeqH :: [PP_Doc] -> PP_Doc -> PP_Doc+ppMultiSeqH = ppMultiSeq' (>#<)++ppMultiSeqV :: [PP_Doc] -> PP_Doc -> PP_Doc+ppMultiSeqV = ppMultiSeq' (>-<)++ppMultiSeq' :: (PP_Doc -> PP_Doc -> PP_Doc) -> [PP_Doc] -> PP_Doc -> PP_Doc+ppMultiSeq' next strictArgs expr+ = foldr (\v r -> (v >#< "`seq`") `next` pp_parens r) expr strictArgs+{-# LINE 54 "dist/build/PrintCode.hs" #-}++{-# LINE 300 "src-ag/PrintCode.ag" #-}+++reallySimple :: String -> Bool+reallySimple = and . map (\x -> isAlphaNum x || x=='_')++ppTuple True pps = "(" >|< pp_block " " (replicate (length pps `max` 1) ')') ",(" pps+ppTuple False pps = "(" >|< pp_block " " ")" "," pps+ppUnboxedTuple True pps = "(# " >|< pp_block " " (concat $ replicate (length pps `max` 1) " #)") ",(# " pps+ppUnboxedTuple False pps = "(# " >|< pp_block " " " #)" "," pps++{-# LINE 67 "dist/build/PrintCode.hs" #-}++{-# LINE 399 "src-ag/PrintCode.ag" #-}++locname' n = "_loc_" ++ getName n+{-# LINE 72 "dist/build/PrintCode.hs" #-}++{-# LINE 473 "src-ag/PrintCode.ag" #-}++renderDocs :: [PP_Doc] -> String+renderDocs pps = foldr (.) id (map (\d -> (disp d 50000) . ( '\n':) ) pps) ""+{-# LINE 78 "dist/build/PrintCode.hs" #-}++{-# LINE 521 "src-ag/PrintCode.ag" #-}++writeModule :: FilePath -> [PP_Doc] -> IO ()+writeModule path docs+ = do bExists <- doesFileExist path+ if bExists+ then do input <- readFile path+ seq (length input) (return ())+ if input /= output+ then dumpIt+ else return ()+ else dumpIt+ where+ output = renderDocs docs+ dumpIt = writeFile path output+{-# LINE 95 "dist/build/PrintCode.hs" #-}++{-# LINE 146 "src-ag/Code.ag" #-}++-- Unboxed tuples+-- unbox Whether unboxed tuples are wanted or not+-- inh The inherited attributes.+-- If there are none, no unboxing can take place,+-- because in that case the semantic function (a top-level identifier) would have an unboxed type.+-- Of course we can't have an unboxed 1-tuple+mkTupleExpr :: Bool -> Bool -> Exprs -> Expr+mkTupleExpr unbox noInh exprs | not unbox || noInh || length exprs == 1 = TupleExpr exprs+ | otherwise = UnboxedTupleExpr exprs+mkTupleType :: Bool -> Bool -> Types -> Type+mkTupleType unbox noInh tps | not unbox || noInh || length tps == 1 = TupleType tps+ | otherwise = UnboxedTupleType tps+mkTupleLhs :: Bool -> Bool -> [String] -> Lhs+mkTupleLhs unbox noInh comps | not unbox || noInh || length comps == 1 = TupleLhs comps+ | otherwise = UnboxedTupleLhs comps+{-# LINE 114 "dist/build/PrintCode.hs" #-}+-- CaseAlt -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ nested : Bool+ options : Options+ outputfile : String+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative CaseAlt:+ child left : Lhs + child expr : Expr +-}+-- cata+sem_CaseAlt :: CaseAlt ->+ T_CaseAlt+sem_CaseAlt !(CaseAlt _left _expr) =+ (sem_CaseAlt_CaseAlt (sem_Lhs _left) (sem_Expr _expr))+-- semantic domain+newtype T_CaseAlt = T_CaseAlt (Bool ->+ Options ->+ String ->+ ( PP_Docs))+data Inh_CaseAlt = Inh_CaseAlt {nested_Inh_CaseAlt :: !(Bool),options_Inh_CaseAlt :: !(Options),outputfile_Inh_CaseAlt :: !(String)}+data Syn_CaseAlt = Syn_CaseAlt {pps_Syn_CaseAlt :: !(PP_Docs)}+wrap_CaseAlt :: T_CaseAlt ->+ Inh_CaseAlt ->+ Syn_CaseAlt+wrap_CaseAlt !(T_CaseAlt sem) !(Inh_CaseAlt _lhsInested _lhsIoptions _lhsIoutputfile) =+ (let ( !_lhsOpps) = sem _lhsInested _lhsIoptions _lhsIoutputfile+ in (Syn_CaseAlt _lhsOpps))+sem_CaseAlt_CaseAlt :: T_Lhs ->+ T_Expr ->+ T_CaseAlt+sem_CaseAlt_CaseAlt !(T_Lhs left_) !(T_Expr expr_) =+ (T_CaseAlt (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 156 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 161 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 166 "dist/build/PrintCode" #-}+ )) of+ { !_exprOnested ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 171 "dist/build/PrintCode" #-}+ )) of+ { !_leftOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 176 "dist/build/PrintCode" #-}+ )) of+ { !_leftOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 181 "dist/build/PrintCode" #-}+ )) of+ { !_leftOnested ->+ (case (({-# LINE 422 "src-ag/PrintCode.ag" #-}+ False+ {-# LINE 186 "dist/build/PrintCode" #-}+ )) of+ { !_leftOisDeclOfLet ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile) of+ { ( !_exprIpp) ->+ (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile) of+ { ( !_leftIpp) ->+ (case (({-# LINE 219 "src-ag/PrintCode.ag" #-}+ ["{" >#< _leftIpp >#< "->", _exprIpp >#< "}"]+ {-# LINE 195 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) }) }) }) }) }) })))+-- CaseAlts ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ nested : Bool+ options : Options+ outputfile : String+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : CaseAlt + child tl : CaseAlts + alternative Nil:+-}+-- cata+sem_CaseAlts :: CaseAlts ->+ T_CaseAlts+sem_CaseAlts !list =+ (Prelude.foldr sem_CaseAlts_Cons sem_CaseAlts_Nil (Prelude.map sem_CaseAlt list))+-- semantic domain+newtype T_CaseAlts = T_CaseAlts (Bool ->+ Options ->+ String ->+ ( PP_Docs))+data Inh_CaseAlts = Inh_CaseAlts {nested_Inh_CaseAlts :: !(Bool),options_Inh_CaseAlts :: !(Options),outputfile_Inh_CaseAlts :: !(String)}+data Syn_CaseAlts = Syn_CaseAlts {pps_Syn_CaseAlts :: !(PP_Docs)}+wrap_CaseAlts :: T_CaseAlts ->+ Inh_CaseAlts ->+ Syn_CaseAlts+wrap_CaseAlts !(T_CaseAlts sem) !(Inh_CaseAlts _lhsInested _lhsIoptions _lhsIoutputfile) =+ (let ( !_lhsOpps) = sem _lhsInested _lhsIoptions _lhsIoutputfile+ in (Syn_CaseAlts _lhsOpps))+sem_CaseAlts_Cons :: T_CaseAlt ->+ T_CaseAlts ->+ T_CaseAlts+sem_CaseAlts_Cons !(T_CaseAlt hd_) !(T_CaseAlts tl_) =+ (T_CaseAlts (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 241 "dist/build/PrintCode" #-}+ )) of+ { !_tlOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 246 "dist/build/PrintCode" #-}+ )) of+ { !_tlOoptions ->+ (case (({-# LINE 56 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 251 "dist/build/PrintCode" #-}+ )) of+ { !_tlOnested ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 256 "dist/build/PrintCode" #-}+ )) of+ { !_hdOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 261 "dist/build/PrintCode" #-}+ )) of+ { !_hdOoptions ->+ (case (({-# LINE 56 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 266 "dist/build/PrintCode" #-}+ )) of+ { !_hdOnested ->+ (case (tl_ _tlOnested _tlOoptions _tlOoutputfile) of+ { ( !_tlIpps) ->+ (case (hd_ _hdOnested _hdOoptions _hdOoutputfile) of+ { ( !_hdIpps) ->+ (case (({-# LINE 69 "src-ag/PrintCode.ag" #-}+ _hdIpps ++ _tlIpps+ {-# LINE 275 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) }) }) }) }) })))+sem_CaseAlts_Nil :: T_CaseAlts+sem_CaseAlts_Nil =+ (T_CaseAlts (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 70 "src-ag/PrintCode.ag" #-}+ []+ {-# LINE 286 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) })))+-- Chunk -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ importBlocks : PP_Doc+ isDeclOfLet : Bool+ mainFile : String+ mainName : String+ moduleHeader : String -> String -> String -> Bool -> String+ nested : Bool+ options : Options+ optionsLine : String+ pragmaBlocks : String+ textBlockMap : Map BlockInfo PP_Doc+ textBlocks : PP_Doc+ synthesized attributes:+ appendCommon : [[PP_Doc]]+ appendMain : [[PP_Doc]]+ genSems : IO ()+ imports : [String]+ pps : PP_Docs+ alternatives:+ alternative Chunk:+ child name : {String}+ child comment : Decl + child info : Decls + child dataDef : Decls + child cataFun : Decls + child semDom : Decls + child semWrapper : Decls + child semFunctions : Decls + child semNames : {[String]}+ visit 0:+ local outputfile : _+ local exports : _+-}+-- cata+sem_Chunk :: Chunk ->+ T_Chunk+sem_Chunk !(Chunk _name _comment _info _dataDef _cataFun _semDom _semWrapper _semFunctions _semNames) =+ (sem_Chunk_Chunk _name (sem_Decl _comment) (sem_Decls _info) (sem_Decls _dataDef) (sem_Decls _cataFun) (sem_Decls _semDom) (sem_Decls _semWrapper) (sem_Decls _semFunctions) _semNames)+-- semantic domain+newtype T_Chunk = T_Chunk (PP_Doc ->+ Bool ->+ String ->+ String ->+ (String -> String -> String -> Bool -> String) ->+ Bool ->+ Options ->+ String ->+ String ->+ (Map BlockInfo PP_Doc) ->+ PP_Doc ->+ ( ([[PP_Doc]]),([[PP_Doc]]),(IO ()),([String]),PP_Docs))+data Inh_Chunk = Inh_Chunk {importBlocks_Inh_Chunk :: !(PP_Doc),isDeclOfLet_Inh_Chunk :: !(Bool),mainFile_Inh_Chunk :: !(String),mainName_Inh_Chunk :: !(String),moduleHeader_Inh_Chunk :: !((String -> String -> String -> Bool -> String)),nested_Inh_Chunk :: !(Bool),options_Inh_Chunk :: !(Options),optionsLine_Inh_Chunk :: !(String),pragmaBlocks_Inh_Chunk :: !(String),textBlockMap_Inh_Chunk :: !((Map BlockInfo PP_Doc)),textBlocks_Inh_Chunk :: !(PP_Doc)}+data Syn_Chunk = Syn_Chunk {appendCommon_Syn_Chunk :: !(([[PP_Doc]])),appendMain_Syn_Chunk :: !(([[PP_Doc]])),genSems_Syn_Chunk :: !((IO ())),imports_Syn_Chunk :: !(([String])),pps_Syn_Chunk :: !(PP_Docs)}+wrap_Chunk :: T_Chunk ->+ Inh_Chunk ->+ Syn_Chunk+wrap_Chunk !(T_Chunk sem) !(Inh_Chunk _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks) =+ (let ( !_lhsOappendCommon,!_lhsOappendMain,!_lhsOgenSems,!_lhsOimports,!_lhsOpps) = sem _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks+ in (Syn_Chunk _lhsOappendCommon _lhsOappendMain _lhsOgenSems _lhsOimports _lhsOpps))+sem_Chunk_Chunk :: String ->+ T_Decl ->+ T_Decls ->+ T_Decls ->+ T_Decls ->+ T_Decls ->+ T_Decls ->+ T_Decls ->+ ([String]) ->+ T_Chunk+sem_Chunk_Chunk !name_ !(T_Decl comment_) !(T_Decls info_) !(T_Decls dataDef_) !(T_Decls cataFun_) !(T_Decls semDom_) !(T_Decls semWrapper_) !(T_Decls semFunctions_) !semNames_ =+ (T_Chunk (\ (!_lhsIimportBlocks)+ (!_lhsIisDeclOfLet)+ (!_lhsImainFile)+ (!_lhsImainName)+ (!_lhsImoduleHeader)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoptionsLine)+ (!_lhsIpragmaBlocks)+ (!_lhsItextBlockMap)+ (!_lhsItextBlocks) ->+ (case (({-# LINE 44 "src-ag/PrintCode.ag" #-}+ if sepSemMods _lhsIoptions+ then replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ "_" ++ name_)+ else _lhsImainFile+ {-# LINE 378 "dist/build/PrintCode" #-}+ )) of+ { !_outputfile ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _outputfile+ {-# LINE 383 "dist/build/PrintCode" #-}+ )) of+ { !_semWrapperOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 388 "dist/build/PrintCode" #-}+ )) of+ { !_semWrapperOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 393 "dist/build/PrintCode" #-}+ )) of+ { !_semWrapperOnested ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 398 "dist/build/PrintCode" #-}+ )) of+ { !_semWrapperOisDeclOfLet ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _outputfile+ {-# LINE 403 "dist/build/PrintCode" #-}+ )) of+ { !_semDomOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 408 "dist/build/PrintCode" #-}+ )) of+ { !_semDomOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 413 "dist/build/PrintCode" #-}+ )) of+ { !_semDomOnested ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 418 "dist/build/PrintCode" #-}+ )) of+ { !_semDomOisDeclOfLet ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _outputfile+ {-# LINE 423 "dist/build/PrintCode" #-}+ )) of+ { !_dataDefOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 428 "dist/build/PrintCode" #-}+ )) of+ { !_dataDefOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 433 "dist/build/PrintCode" #-}+ )) of+ { !_dataDefOnested ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 438 "dist/build/PrintCode" #-}+ )) of+ { !_dataDefOisDeclOfLet ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _outputfile+ {-# LINE 443 "dist/build/PrintCode" #-}+ )) of+ { !_commentOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 448 "dist/build/PrintCode" #-}+ )) of+ { !_commentOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 453 "dist/build/PrintCode" #-}+ )) of+ { !_commentOnested ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 458 "dist/build/PrintCode" #-}+ )) of+ { !_commentOisDeclOfLet ->+ (case (semWrapper_ _semWrapperOisDeclOfLet _semWrapperOnested _semWrapperOoptions _semWrapperOoutputfile) of+ { ( !_semWrapperIpps) ->+ (case (semDom_ _semDomOisDeclOfLet _semDomOnested _semDomOoptions _semDomOoutputfile) of+ { ( !_semDomIpps) ->+ (case (dataDef_ _dataDefOisDeclOfLet _dataDefOnested _dataDefOoptions _dataDefOoutputfile) of+ { ( !_dataDefIpps) ->+ (case (comment_ _commentOisDeclOfLet _commentOnested _commentOoptions _commentOoutputfile) of+ { ( !_commentIpp) ->+ (case (({-# LINE 487 "src-ag/PrintCode.ag" #-}+ [ [_commentIpp]+ , _dataDefIpps+ , _semDomIpps+ , if reference _lhsIoptions then _semWrapperIpps else []+ ]+ {-# LINE 475 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOappendCommon ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _outputfile+ {-# LINE 480 "dist/build/PrintCode" #-}+ )) of+ { !_cataFunOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 485 "dist/build/PrintCode" #-}+ )) of+ { !_cataFunOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 490 "dist/build/PrintCode" #-}+ )) of+ { !_cataFunOnested ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 495 "dist/build/PrintCode" #-}+ )) of+ { !_cataFunOisDeclOfLet ->+ (case (cataFun_ _cataFunOisDeclOfLet _cataFunOnested _cataFunOoptions _cataFunOoutputfile) of+ { ( !_cataFunIpps) ->+ (case (({-# LINE 493 "src-ag/PrintCode.ag" #-}+ [ [_commentIpp]+ , _cataFunIpps+ , if reference _lhsIoptions then [] else _semWrapperIpps+ ]+ {-# LINE 505 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOappendMain ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _outputfile+ {-# LINE 510 "dist/build/PrintCode" #-}+ )) of+ { !_semFunctionsOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 515 "dist/build/PrintCode" #-}+ )) of+ { !_semFunctionsOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 520 "dist/build/PrintCode" #-}+ )) of+ { !_semFunctionsOnested ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 525 "dist/build/PrintCode" #-}+ )) of+ { !_semFunctionsOisDeclOfLet ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _outputfile+ {-# LINE 530 "dist/build/PrintCode" #-}+ )) of+ { !_infoOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 535 "dist/build/PrintCode" #-}+ )) of+ { !_infoOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 540 "dist/build/PrintCode" #-}+ )) of+ { !_infoOnested ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 545 "dist/build/PrintCode" #-}+ )) of+ { !_infoOisDeclOfLet ->+ (case (({-# LINE 519 "src-ag/PrintCode.ag" #-}+ concat $ intersperse "," semNames_+ {-# LINE 550 "dist/build/PrintCode" #-}+ )) of+ { !_exports ->+ (case (semFunctions_ _semFunctionsOisDeclOfLet _semFunctionsOnested _semFunctionsOoptions _semFunctionsOoutputfile) of+ { ( !_semFunctionsIpps) ->+ (case (info_ _infoOisDeclOfLet _infoOnested _infoOoptions _infoOoutputfile) of+ { ( !_infoIpps) ->+ (case (({-# LINE 503 "src-ag/PrintCode.ag" #-}+ writeModule _outputfile+ [ pp $ _lhsIpragmaBlocks+ , pp $ Map.findWithDefault empty (BlockPragma, Just $ identifier name_) _lhsItextBlockMap+ , pp $ _lhsIoptionsLine+ , pp $ _lhsImoduleHeader _lhsImainName ("_" ++ name_) _exports True+ , pp $ ("import " ++ _lhsImainName ++ "_common\n")+ , pp $ Map.findWithDefault empty (BlockImport, Just $ identifier name_) _lhsItextBlockMap+ , _commentIpp+ , vlist_sep "" _infoIpps+ , vlist_sep "" _semFunctionsIpps+ , Map.findWithDefault empty (BlockOther, Just $ identifier name_) _lhsItextBlockMap+ ]+ {-# LINE 570 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOgenSems ->+ (case (({-# LINE 481 "src-ag/PrintCode.ag" #-}+ ["import " ++ _lhsImainName ++ "_" ++ name_ ++ "\n"]+ {-# LINE 575 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOimports ->+ (case (({-# LINE 97 "src-ag/PrintCode.ag" #-}+ _commentIpp+ : _infoIpps+ ++ _dataDefIpps+ ++ _cataFunIpps+ ++ _semDomIpps+ ++ _semWrapperIpps+ ++ _semFunctionsIpps+ ++ [Map.findWithDefault empty (BlockOther, Just $ identifier name_) _lhsItextBlockMap]+ {-# LINE 587 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOappendCommon,_lhsOappendMain,_lhsOgenSems,_lhsOimports,_lhsOpps) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+-- Chunks ------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ importBlocks : PP_Doc+ isDeclOfLet : Bool+ mainFile : String+ mainName : String+ moduleHeader : String -> String -> String -> Bool -> String+ nested : Bool+ options : Options+ optionsLine : String+ pragmaBlocks : String+ textBlockMap : Map BlockInfo PP_Doc+ textBlocks : PP_Doc+ synthesized attributes:+ appendCommon : [[PP_Doc]]+ appendMain : [[PP_Doc]]+ genSems : IO ()+ imports : [String]+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Chunk + child tl : Chunks + alternative Nil:+-}+-- cata+sem_Chunks :: Chunks ->+ T_Chunks+sem_Chunks !list =+ (Prelude.foldr sem_Chunks_Cons sem_Chunks_Nil (Prelude.map sem_Chunk list))+-- semantic domain+newtype T_Chunks = T_Chunks (PP_Doc ->+ Bool ->+ String ->+ String ->+ (String -> String -> String -> Bool -> String) ->+ Bool ->+ Options ->+ String ->+ String ->+ (Map BlockInfo PP_Doc) ->+ PP_Doc ->+ ( ([[PP_Doc]]),([[PP_Doc]]),(IO ()),([String]),PP_Docs))+data Inh_Chunks = Inh_Chunks {importBlocks_Inh_Chunks :: !(PP_Doc),isDeclOfLet_Inh_Chunks :: !(Bool),mainFile_Inh_Chunks :: !(String),mainName_Inh_Chunks :: !(String),moduleHeader_Inh_Chunks :: !((String -> String -> String -> Bool -> String)),nested_Inh_Chunks :: !(Bool),options_Inh_Chunks :: !(Options),optionsLine_Inh_Chunks :: !(String),pragmaBlocks_Inh_Chunks :: !(String),textBlockMap_Inh_Chunks :: !((Map BlockInfo PP_Doc)),textBlocks_Inh_Chunks :: !(PP_Doc)}+data Syn_Chunks = Syn_Chunks {appendCommon_Syn_Chunks :: !(([[PP_Doc]])),appendMain_Syn_Chunks :: !(([[PP_Doc]])),genSems_Syn_Chunks :: !((IO ())),imports_Syn_Chunks :: !(([String])),pps_Syn_Chunks :: !(PP_Docs)}+wrap_Chunks :: T_Chunks ->+ Inh_Chunks ->+ Syn_Chunks+wrap_Chunks !(T_Chunks sem) !(Inh_Chunks _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks) =+ (let ( !_lhsOappendCommon,!_lhsOappendMain,!_lhsOgenSems,!_lhsOimports,!_lhsOpps) = sem _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks+ in (Syn_Chunks _lhsOappendCommon _lhsOappendMain _lhsOgenSems _lhsOimports _lhsOpps))+sem_Chunks_Cons :: T_Chunk ->+ T_Chunks ->+ T_Chunks+sem_Chunks_Cons !(T_Chunk hd_) !(T_Chunks tl_) =+ (T_Chunks (\ (!_lhsIimportBlocks)+ (!_lhsIisDeclOfLet)+ (!_lhsImainFile)+ (!_lhsImainName)+ (!_lhsImoduleHeader)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoptionsLine)+ (!_lhsIpragmaBlocks)+ (!_lhsItextBlockMap)+ (!_lhsItextBlocks) ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 661 "dist/build/PrintCode" #-}+ )) of+ { !_tlOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 666 "dist/build/PrintCode" #-}+ )) of+ { !_tlOnested ->+ (case (({-# LINE 437 "src-ag/PrintCode.ag" #-}+ _lhsImainFile+ {-# LINE 671 "dist/build/PrintCode" #-}+ )) of+ { !_tlOmainFile ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 676 "dist/build/PrintCode" #-}+ )) of+ { !_tlOisDeclOfLet ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 681 "dist/build/PrintCode" #-}+ )) of+ { !_hdOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 686 "dist/build/PrintCode" #-}+ )) of+ { !_hdOnested ->+ (case (({-# LINE 437 "src-ag/PrintCode.ag" #-}+ _lhsImainFile+ {-# LINE 691 "dist/build/PrintCode" #-}+ )) of+ { !_hdOmainFile ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 696 "dist/build/PrintCode" #-}+ )) of+ { !_hdOisDeclOfLet ->+ (case (({-# LINE 434 "src-ag/PrintCode.ag" #-}+ _lhsItextBlocks+ {-# LINE 701 "dist/build/PrintCode" #-}+ )) of+ { !_tlOtextBlocks ->+ (case (({-# LINE 435 "src-ag/PrintCode.ag" #-}+ _lhsItextBlockMap+ {-# LINE 706 "dist/build/PrintCode" #-}+ )) of+ { !_tlOtextBlockMap ->+ (case (({-# LINE 433 "src-ag/PrintCode.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 711 "dist/build/PrintCode" #-}+ )) of+ { !_tlOpragmaBlocks ->+ (case (({-# LINE 436 "src-ag/PrintCode.ag" #-}+ _lhsIoptionsLine+ {-# LINE 716 "dist/build/PrintCode" #-}+ )) of+ { !_tlOoptionsLine ->+ (case (({-# LINE 439 "src-ag/PrintCode.ag" #-}+ _lhsImoduleHeader+ {-# LINE 721 "dist/build/PrintCode" #-}+ )) of+ { !_tlOmoduleHeader ->+ (case (({-# LINE 438 "src-ag/PrintCode.ag" #-}+ _lhsImainName+ {-# LINE 726 "dist/build/PrintCode" #-}+ )) of+ { !_tlOmainName ->+ (case (({-# LINE 432 "src-ag/PrintCode.ag" #-}+ _lhsIimportBlocks+ {-# LINE 731 "dist/build/PrintCode" #-}+ )) of+ { !_tlOimportBlocks ->+ (case (tl_ _tlOimportBlocks _tlOisDeclOfLet _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnested _tlOoptions _tlOoptionsLine _tlOpragmaBlocks _tlOtextBlockMap _tlOtextBlocks) of+ { ( !_tlIappendCommon,!_tlIappendMain,!_tlIgenSems,!_tlIimports,!_tlIpps) ->+ (case (({-# LINE 434 "src-ag/PrintCode.ag" #-}+ _lhsItextBlocks+ {-# LINE 738 "dist/build/PrintCode" #-}+ )) of+ { !_hdOtextBlocks ->+ (case (({-# LINE 435 "src-ag/PrintCode.ag" #-}+ _lhsItextBlockMap+ {-# LINE 743 "dist/build/PrintCode" #-}+ )) of+ { !_hdOtextBlockMap ->+ (case (({-# LINE 433 "src-ag/PrintCode.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 748 "dist/build/PrintCode" #-}+ )) of+ { !_hdOpragmaBlocks ->+ (case (({-# LINE 436 "src-ag/PrintCode.ag" #-}+ _lhsIoptionsLine+ {-# LINE 753 "dist/build/PrintCode" #-}+ )) of+ { !_hdOoptionsLine ->+ (case (({-# LINE 439 "src-ag/PrintCode.ag" #-}+ _lhsImoduleHeader+ {-# LINE 758 "dist/build/PrintCode" #-}+ )) of+ { !_hdOmoduleHeader ->+ (case (({-# LINE 438 "src-ag/PrintCode.ag" #-}+ _lhsImainName+ {-# LINE 763 "dist/build/PrintCode" #-}+ )) of+ { !_hdOmainName ->+ (case (({-# LINE 432 "src-ag/PrintCode.ag" #-}+ _lhsIimportBlocks+ {-# LINE 768 "dist/build/PrintCode" #-}+ )) of+ { !_hdOimportBlocks ->+ (case (hd_ _hdOimportBlocks _hdOisDeclOfLet _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnested _hdOoptions _hdOoptionsLine _hdOpragmaBlocks _hdOtextBlockMap _hdOtextBlocks) of+ { ( !_hdIappendCommon,!_hdIappendMain,!_hdIgenSems,!_hdIimports,!_hdIpps) ->+ (case (({-# LINE 483 "src-ag/PrintCode.ag" #-}+ _hdIappendCommon ++ _tlIappendCommon+ {-# LINE 775 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOappendCommon ->+ (case (({-# LINE 483 "src-ag/PrintCode.ag" #-}+ _hdIappendMain ++ _tlIappendMain+ {-# LINE 780 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOappendMain ->+ (case (({-# LINE 499 "src-ag/PrintCode.ag" #-}+ _hdIgenSems >> _tlIgenSems+ {-# LINE 785 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOgenSems ->+ (case (({-# LINE 478 "src-ag/PrintCode.ag" #-}+ _hdIimports ++ _tlIimports+ {-# LINE 790 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOimports ->+ (case (({-# LINE 89 "src-ag/PrintCode.ag" #-}+ _hdIpps ++ _tlIpps+ {-# LINE 795 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOappendCommon,_lhsOappendMain,_lhsOgenSems,_lhsOimports,_lhsOpps) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+sem_Chunks_Nil :: T_Chunks+sem_Chunks_Nil =+ (T_Chunks (\ (!_lhsIimportBlocks)+ (!_lhsIisDeclOfLet)+ (!_lhsImainFile)+ (!_lhsImainName)+ (!_lhsImoduleHeader)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoptionsLine)+ (!_lhsIpragmaBlocks)+ (!_lhsItextBlockMap)+ (!_lhsItextBlocks) ->+ (case (({-# LINE 483 "src-ag/PrintCode.ag" #-}+ []+ {-# LINE 814 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOappendCommon ->+ (case (({-# LINE 483 "src-ag/PrintCode.ag" #-}+ []+ {-# LINE 819 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOappendMain ->+ (case (({-# LINE 499 "src-ag/PrintCode.ag" #-}+ return ()+ {-# LINE 824 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOgenSems ->+ (case (({-# LINE 478 "src-ag/PrintCode.ag" #-}+ []+ {-# LINE 829 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOimports ->+ (case (({-# LINE 90 "src-ag/PrintCode.ag" #-}+ []+ {-# LINE 834 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOappendCommon,_lhsOappendMain,_lhsOgenSems,_lhsOimports,_lhsOpps) }) }) }) }) })))+-- DataAlt -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ nested : Bool+ strictPre : PP_Doc+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative DataAlt:+ child name : {String}+ child args : Types + alternative Record:+ child name : {String}+ child args : NamedTypes +-}+-- cata+sem_DataAlt :: DataAlt ->+ T_DataAlt+sem_DataAlt !(DataAlt _name _args) =+ (sem_DataAlt_DataAlt _name (sem_Types _args))+sem_DataAlt !(Record _name _args) =+ (sem_DataAlt_Record _name (sem_NamedTypes _args))+-- semantic domain+newtype T_DataAlt = T_DataAlt (Bool ->+ PP_Doc ->+ ( PP_Doc))+data Inh_DataAlt = Inh_DataAlt {nested_Inh_DataAlt :: !(Bool),strictPre_Inh_DataAlt :: !(PP_Doc)}+data Syn_DataAlt = Syn_DataAlt {pp_Syn_DataAlt :: !(PP_Doc)}+wrap_DataAlt :: T_DataAlt ->+ Inh_DataAlt ->+ Syn_DataAlt+wrap_DataAlt !(T_DataAlt sem) !(Inh_DataAlt _lhsInested _lhsIstrictPre) =+ (let ( !_lhsOpp) = sem _lhsInested _lhsIstrictPre+ in (Syn_DataAlt _lhsOpp))+sem_DataAlt_DataAlt :: String ->+ T_Types ->+ T_DataAlt+sem_DataAlt_DataAlt !name_ !(T_Types args_) =+ (T_DataAlt (\ (!_lhsInested)+ (!_lhsIstrictPre) ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 881 "dist/build/PrintCode" #-}+ )) of+ { !_argsOnested ->+ (case (args_ _argsOnested) of+ { ( !_argsIpps) ->+ (case (({-# LINE 222 "src-ag/PrintCode.ag" #-}+ name_ >#< hv_sp (map ((_lhsIstrictPre >|<) . pp_parens) _argsIpps)+ {-# LINE 888 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+sem_DataAlt_Record :: String ->+ T_NamedTypes ->+ T_DataAlt+sem_DataAlt_Record !name_ !(T_NamedTypes args_) =+ (T_DataAlt (\ (!_lhsInested)+ (!_lhsIstrictPre) ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 900 "dist/build/PrintCode" #-}+ )) of+ { !_argsOnested ->+ (case (args_ _argsOnested) of+ { ( !_argsIpps) ->+ (case (({-# LINE 223 "src-ag/PrintCode.ag" #-}+ name_ >#< pp_block "{" "}" "," _argsIpps+ {-# LINE 907 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+-- DataAlts ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ nested : Bool+ strictPre : PP_Doc+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : DataAlt + child tl : DataAlts + alternative Nil:+-}+-- cata+sem_DataAlts :: DataAlts ->+ T_DataAlts+sem_DataAlts !list =+ (Prelude.foldr sem_DataAlts_Cons sem_DataAlts_Nil (Prelude.map sem_DataAlt list))+-- semantic domain+newtype T_DataAlts = T_DataAlts (Bool ->+ PP_Doc ->+ ( PP_Docs))+data Inh_DataAlts = Inh_DataAlts {nested_Inh_DataAlts :: !(Bool),strictPre_Inh_DataAlts :: !(PP_Doc)}+data Syn_DataAlts = Syn_DataAlts {pps_Syn_DataAlts :: !(PP_Docs)}+wrap_DataAlts :: T_DataAlts ->+ Inh_DataAlts ->+ Syn_DataAlts+wrap_DataAlts !(T_DataAlts sem) !(Inh_DataAlts _lhsInested _lhsIstrictPre) =+ (let ( !_lhsOpps) = sem _lhsInested _lhsIstrictPre+ in (Syn_DataAlts _lhsOpps))+sem_DataAlts_Cons :: T_DataAlt ->+ T_DataAlts ->+ T_DataAlts+sem_DataAlts_Cons !(T_DataAlt hd_) !(T_DataAlts tl_) =+ (T_DataAlts (\ (!_lhsInested)+ (!_lhsIstrictPre) ->+ (case (({-# LINE 317 "src-ag/PrintCode.ag" #-}+ _lhsIstrictPre+ {-# LINE 950 "dist/build/PrintCode" #-}+ )) of+ { !_tlOstrictPre ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 955 "dist/build/PrintCode" #-}+ )) of+ { !_tlOnested ->+ (case (({-# LINE 317 "src-ag/PrintCode.ag" #-}+ _lhsIstrictPre+ {-# LINE 960 "dist/build/PrintCode" #-}+ )) of+ { !_hdOstrictPre ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 965 "dist/build/PrintCode" #-}+ )) of+ { !_hdOnested ->+ (case (tl_ _tlOnested _tlOstrictPre) of+ { ( !_tlIpps) ->+ (case (hd_ _hdOnested _hdOstrictPre) of+ { ( !_hdIpp) ->+ (case (({-# LINE 73 "src-ag/PrintCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 974 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) }) }) })))+sem_DataAlts_Nil :: T_DataAlts+sem_DataAlts_Nil =+ (T_DataAlts (\ (!_lhsInested)+ (!_lhsIstrictPre) ->+ (case (({-# LINE 74 "src-ag/PrintCode.ag" #-}+ []+ {-# LINE 984 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) })))+-- Decl --------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ isDeclOfLet : Bool+ nested : Bool+ options : Options+ outputfile : String+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative Bind:+ child left : Lhs + child rhs : Expr + alternative BindLet:+ child left : Lhs + child rhs : Expr + alternative Comment:+ child txt : {String}+ alternative Data:+ child name : {String}+ child params : {[String]}+ child alts : DataAlts + child strict : {Bool}+ child derivings : {[String]}+ alternative Decl:+ child left : Lhs + child rhs : Expr + child binds : {Set String}+ child uses : {Set String}+ alternative EvalDecl:+ child nt : {String}+ child left : Lhs + child rhs : Expr + visit 0:+ local strat : _+ alternative NewType:+ child name : {String}+ child params : {[String]}+ child con : {String}+ child tp : Type + alternative PragmaDecl:+ child txt : {String}+ alternative Resume:+ child monadic : {Bool}+ child nt : {String}+ child left : Lhs + child rhs : Expr + alternative TSig:+ child name : {String}+ child tp : Type + alternative Type:+ child name : {String}+ child params : {[String]}+ child tp : Type +-}+-- cata+sem_Decl :: Decl ->+ T_Decl+sem_Decl !(Bind _left _rhs) =+ (sem_Decl_Bind (sem_Lhs _left) (sem_Expr _rhs))+sem_Decl !(BindLet _left _rhs) =+ (sem_Decl_BindLet (sem_Lhs _left) (sem_Expr _rhs))+sem_Decl !(Comment _txt) =+ (sem_Decl_Comment _txt)+sem_Decl !(Data _name _params _alts _strict _derivings) =+ (sem_Decl_Data _name _params (sem_DataAlts _alts) _strict _derivings)+sem_Decl !(Decl _left _rhs _binds _uses) =+ (sem_Decl_Decl (sem_Lhs _left) (sem_Expr _rhs) _binds _uses)+sem_Decl !(EvalDecl _nt _left _rhs) =+ (sem_Decl_EvalDecl _nt (sem_Lhs _left) (sem_Expr _rhs))+sem_Decl !(NewType _name _params _con _tp) =+ (sem_Decl_NewType _name _params _con (sem_Type _tp))+sem_Decl !(PragmaDecl _txt) =+ (sem_Decl_PragmaDecl _txt)+sem_Decl !(Resume _monadic _nt _left _rhs) =+ (sem_Decl_Resume _monadic _nt (sem_Lhs _left) (sem_Expr _rhs))+sem_Decl !(TSig _name _tp) =+ (sem_Decl_TSig _name (sem_Type _tp))+sem_Decl !(Type _name _params _tp) =+ (sem_Decl_Type _name _params (sem_Type _tp))+-- semantic domain+newtype T_Decl = T_Decl (Bool ->+ Bool ->+ Options ->+ String ->+ ( PP_Doc))+data Inh_Decl = Inh_Decl {isDeclOfLet_Inh_Decl :: !(Bool),nested_Inh_Decl :: !(Bool),options_Inh_Decl :: !(Options),outputfile_Inh_Decl :: !(String)}+data Syn_Decl = Syn_Decl {pp_Syn_Decl :: !(PP_Doc)}+wrap_Decl :: T_Decl ->+ Inh_Decl ->+ Syn_Decl+wrap_Decl !(T_Decl sem) !(Inh_Decl _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) =+ (let ( !_lhsOpp) = sem _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile+ in (Syn_Decl _lhsOpp))+sem_Decl_Bind :: T_Lhs ->+ T_Expr ->+ T_Decl+sem_Decl_Bind !(T_Lhs left_) !(T_Expr rhs_) =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1093 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1098 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1103 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOnested ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1108 "dist/build/PrintCode" #-}+ )) of+ { !_leftOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1113 "dist/build/PrintCode" #-}+ )) of+ { !_leftOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1118 "dist/build/PrintCode" #-}+ )) of+ { !_leftOnested ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 1123 "dist/build/PrintCode" #-}+ )) of+ { !_leftOisDeclOfLet ->+ (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile) of+ { ( !_rhsIpp) ->+ (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile) of+ { ( !_leftIpp) ->+ (case (({-# LINE 109 "src-ag/PrintCode.ag" #-}+ _leftIpp >#< "<-" >#< _rhsIpp+ {-# LINE 1132 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) })))+sem_Decl_BindLet :: T_Lhs ->+ T_Expr ->+ T_Decl+sem_Decl_BindLet !(T_Lhs left_) !(T_Expr rhs_) =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1146 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1151 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1156 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOnested ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1161 "dist/build/PrintCode" #-}+ )) of+ { !_leftOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1166 "dist/build/PrintCode" #-}+ )) of+ { !_leftOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1171 "dist/build/PrintCode" #-}+ )) of+ { !_leftOnested ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 1176 "dist/build/PrintCode" #-}+ )) of+ { !_leftOisDeclOfLet ->+ (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile) of+ { ( !_rhsIpp) ->+ (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile) of+ { ( !_leftIpp) ->+ (case (({-# LINE 110 "src-ag/PrintCode.ag" #-}+ "let" >#< _leftIpp >#< "=" >#< _rhsIpp+ {-# LINE 1185 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) })))+sem_Decl_Comment :: String ->+ T_Decl+sem_Decl_Comment !txt_ =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 123 "src-ag/PrintCode.ag" #-}+ if '\n' `elem` txt_+ then "{-" >-< vlist (lines txt_) >-< "-}"+ else "--" >#< txt_+ {-# LINE 1200 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) })))+sem_Decl_Data :: String ->+ ([String]) ->+ T_DataAlts ->+ Bool ->+ ([String]) ->+ T_Decl+sem_Decl_Data !name_ !params_ !(T_DataAlts alts_) !strict_ !derivings_ =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1217 "dist/build/PrintCode" #-}+ )) of+ { !_altsOnested ->+ (case (({-# LINE 320 "src-ag/PrintCode.ag" #-}+ if strict_ then pp "!" else empty+ {-# LINE 1222 "dist/build/PrintCode" #-}+ )) of+ { !_altsOstrictPre ->+ (case (alts_ _altsOnested _altsOstrictPre) of+ { ( !_altsIpps) ->+ (case (({-# LINE 111 "src-ag/PrintCode.ag" #-}+ "data" >#< hv_sp (name_ : params_)+ >#< ( case _altsIpps of+ [] -> empty+ (x:xs) -> "=" >#< x+ >-< vlist (map ("|" >#<) xs)+ >-< if null derivings_+ then empty+ else "deriving" >#< ppTuple False (map text derivings_)+ )+ {-# LINE 1237 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) })))+sem_Decl_Decl :: T_Lhs ->+ T_Expr ->+ (Set String) ->+ (Set String) ->+ T_Decl+sem_Decl_Decl !(T_Lhs left_) !(T_Expr rhs_) !binds_ !uses_ =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1253 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1258 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1263 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOnested ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1268 "dist/build/PrintCode" #-}+ )) of+ { !_leftOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1273 "dist/build/PrintCode" #-}+ )) of+ { !_leftOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1278 "dist/build/PrintCode" #-}+ )) of+ { !_leftOnested ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 1283 "dist/build/PrintCode" #-}+ )) of+ { !_leftOisDeclOfLet ->+ (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile) of+ { ( !_rhsIpp) ->+ (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile) of+ { ( !_leftIpp) ->+ (case (({-# LINE 107 "src-ag/PrintCode.ag" #-}+ _leftIpp >#< "="+ >-< indent 4 _rhsIpp+ {-# LINE 1293 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) })))+sem_Decl_EvalDecl :: String ->+ T_Lhs ->+ T_Expr ->+ T_Decl+sem_Decl_EvalDecl !nt_ !(T_Lhs left_) !(T_Expr rhs_) =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1308 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1313 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1318 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOnested ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1323 "dist/build/PrintCode" #-}+ )) of+ { !_leftOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1328 "dist/build/PrintCode" #-}+ )) of+ { !_leftOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1333 "dist/build/PrintCode" #-}+ )) of+ { !_leftOnested ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 1338 "dist/build/PrintCode" #-}+ )) of+ { !_leftOisDeclOfLet ->+ (case (({-# LINE 130 "src-ag/PrintCode.ag" #-}+ if breadthFirstStrict _lhsIoptions+ then "stepwiseEval"+ else "lazyEval"+ {-# LINE 1345 "dist/build/PrintCode" #-}+ )) of+ { !_strat ->+ (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile) of+ { ( !_rhsIpp) ->+ (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile) of+ { ( !_leftIpp) ->+ (case (({-# LINE 133 "src-ag/PrintCode.ag" #-}+ if breadthFirst _lhsIoptions+ then _leftIpp >#< "=" >#< "case" >#< _strat >#< pp_parens _rhsIpp >#< "of"+ >-< indent 4 (+ pp_parens (nt_ >|< "_Syn" >#< "_val") >#< "-> _val"+ )+ else _leftIpp >#< "=" >#< _rhsIpp+ {-# LINE 1359 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) }) })))+sem_Decl_NewType :: String ->+ ([String]) ->+ String ->+ T_Type ->+ T_Decl+sem_Decl_NewType !name_ !params_ !con_ !(T_Type tp_) =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1375 "dist/build/PrintCode" #-}+ )) of+ { !_tpOnested ->+ (case (tp_ _tpOnested) of+ { ( !_tpIpp,!_tpIprec) ->+ (case (({-# LINE 120 "src-ag/PrintCode.ag" #-}+ "newtype" >#< hv_sp (name_ : params_) >#< "=" >#< con_ >#< pp_parens _tpIpp+ {-# LINE 1382 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+sem_Decl_PragmaDecl :: String ->+ T_Decl+sem_Decl_PragmaDecl !txt_ =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 126 "src-ag/PrintCode.ag" #-}+ "{-#" >#< text txt_ >#< "#-}"+ {-# LINE 1395 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) })))+sem_Decl_Resume :: Bool ->+ String ->+ T_Lhs ->+ T_Expr ->+ T_Decl+sem_Decl_Resume !monadic_ !nt_ !(T_Lhs left_) !(T_Expr rhs_) =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1411 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1416 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1421 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOnested ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1426 "dist/build/PrintCode" #-}+ )) of+ { !_leftOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1431 "dist/build/PrintCode" #-}+ )) of+ { !_leftOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1436 "dist/build/PrintCode" #-}+ )) of+ { !_leftOnested ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 1441 "dist/build/PrintCode" #-}+ )) of+ { !_leftOisDeclOfLet ->+ (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile) of+ { ( !_rhsIpp) ->+ (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile) of+ { ( !_leftIpp) ->+ (case (({-# LINE 127 "src-ag/PrintCode.ag" #-}+ if monadic_+ then _leftIpp >#< "<-" >#< _rhsIpp+ else _leftIpp >#< "=" >-< indent 4 _rhsIpp+ {-# LINE 1452 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) })))+sem_Decl_TSig :: String ->+ T_Type ->+ T_Decl+sem_Decl_TSig !name_ !(T_Type tp_) =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1466 "dist/build/PrintCode" #-}+ )) of+ { !_tpOnested ->+ (case (tp_ _tpOnested) of+ { ( !_tpIpp,!_tpIprec) ->+ (case (({-# LINE 122 "src-ag/PrintCode.ag" #-}+ name_ >#< "::" >#< _tpIpp+ {-# LINE 1473 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+sem_Decl_Type :: String ->+ ([String]) ->+ T_Type ->+ T_Decl+sem_Decl_Type !name_ !params_ !(T_Type tp_) =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1488 "dist/build/PrintCode" #-}+ )) of+ { !_tpOnested ->+ (case (tp_ _tpOnested) of+ { ( !_tpIpp,!_tpIprec) ->+ (case (({-# LINE 121 "src-ag/PrintCode.ag" #-}+ "type" >#< hv_sp (name_ : params_) >#< "=" >#< _tpIpp+ {-# LINE 1495 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+-- Decls -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ isDeclOfLet : Bool+ nested : Bool+ options : Options+ outputfile : String+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Decl + child tl : Decls + alternative Nil:+-}+-- cata+sem_Decls :: Decls ->+ T_Decls+sem_Decls !list =+ (Prelude.foldr sem_Decls_Cons sem_Decls_Nil (Prelude.map sem_Decl list))+-- semantic domain+newtype T_Decls = T_Decls (Bool ->+ Bool ->+ Options ->+ String ->+ ( PP_Docs))+data Inh_Decls = Inh_Decls {isDeclOfLet_Inh_Decls :: !(Bool),nested_Inh_Decls :: !(Bool),options_Inh_Decls :: !(Options),outputfile_Inh_Decls :: !(String)}+data Syn_Decls = Syn_Decls {pps_Syn_Decls :: !(PP_Docs)}+wrap_Decls :: T_Decls ->+ Inh_Decls ->+ Syn_Decls+wrap_Decls !(T_Decls sem) !(Inh_Decls _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) =+ (let ( !_lhsOpps) = sem _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile+ in (Syn_Decls _lhsOpps))+sem_Decls_Cons :: T_Decl ->+ T_Decls ->+ T_Decls+sem_Decls_Cons !(T_Decl hd_) !(T_Decls tl_) =+ (T_Decls (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1544 "dist/build/PrintCode" #-}+ )) of+ { !_tlOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1549 "dist/build/PrintCode" #-}+ )) of+ { !_tlOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1554 "dist/build/PrintCode" #-}+ )) of+ { !_tlOnested ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 1559 "dist/build/PrintCode" #-}+ )) of+ { !_tlOisDeclOfLet ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1564 "dist/build/PrintCode" #-}+ )) of+ { !_hdOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1569 "dist/build/PrintCode" #-}+ )) of+ { !_hdOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1574 "dist/build/PrintCode" #-}+ )) of+ { !_hdOnested ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 1579 "dist/build/PrintCode" #-}+ )) of+ { !_hdOisDeclOfLet ->+ (case (tl_ _tlOisDeclOfLet _tlOnested _tlOoptions _tlOoutputfile) of+ { ( !_tlIpps) ->+ (case (hd_ _hdOisDeclOfLet _hdOnested _hdOoptions _hdOoutputfile) of+ { ( !_hdIpp) ->+ (case (({-# LINE 85 "src-ag/PrintCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 1588 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) }) }) }) }) }) }) })))+sem_Decls_Nil :: T_Decls+sem_Decls_Nil =+ (T_Decls (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 86 "src-ag/PrintCode.ag" #-}+ []+ {-# LINE 1600 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) })))+-- Expr --------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ nested : Bool+ options : Options+ outputfile : String+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative App:+ child name : {String}+ child args : Exprs + alternative Case:+ child expr : Expr + child alts : CaseAlts + alternative Do:+ child stmts : Decls + child body : Expr + alternative InvokeExpr:+ child nt : {String}+ child expr : Expr + child args : Exprs + alternative Lambda:+ child args : Exprs + child body : Expr + visit 0:+ local addBang : _+ local strictParams : _+ alternative Let:+ child decls : Decls + child body : Expr + alternative LineExpr:+ child expr : Expr + alternative PragmaExpr:+ child onLeftSide : {Bool}+ child onNewLine : {Bool}+ child txt : {String}+ child expr : Expr + alternative ResultExpr:+ child nt : {String}+ child expr : Expr + alternative ResumeExpr:+ child nt : {String}+ child expr : Expr + child left : Lhs + child rhs : Expr + alternative SemFun:+ child nt : {String}+ child args : Exprs + child body : Expr + visit 0:+ local addBang : _+ local strictParams : _+ alternative SimpleExpr:+ child txt : {String}+ alternative TextExpr:+ child lns : {[String]}+ alternative Trace:+ child txt : {String}+ child expr : Expr + alternative TupleExpr:+ child exprs : Exprs + alternative TypedExpr:+ child expr : Expr + child tp : Type + alternative UnboxedTupleExpr:+ child exprs : Exprs +-}+-- cata+sem_Expr :: Expr ->+ T_Expr+sem_Expr !(App _name _args) =+ (sem_Expr_App _name (sem_Exprs _args))+sem_Expr !(Case _expr _alts) =+ (sem_Expr_Case (sem_Expr _expr) (sem_CaseAlts _alts))+sem_Expr !(Do _stmts _body) =+ (sem_Expr_Do (sem_Decls _stmts) (sem_Expr _body))+sem_Expr !(InvokeExpr _nt _expr _args) =+ (sem_Expr_InvokeExpr _nt (sem_Expr _expr) (sem_Exprs _args))+sem_Expr !(Lambda _args _body) =+ (sem_Expr_Lambda (sem_Exprs _args) (sem_Expr _body))+sem_Expr !(Let _decls _body) =+ (sem_Expr_Let (sem_Decls _decls) (sem_Expr _body))+sem_Expr !(LineExpr _expr) =+ (sem_Expr_LineExpr (sem_Expr _expr))+sem_Expr !(PragmaExpr _onLeftSide _onNewLine _txt _expr) =+ (sem_Expr_PragmaExpr _onLeftSide _onNewLine _txt (sem_Expr _expr))+sem_Expr !(ResultExpr _nt _expr) =+ (sem_Expr_ResultExpr _nt (sem_Expr _expr))+sem_Expr !(ResumeExpr _nt _expr _left _rhs) =+ (sem_Expr_ResumeExpr _nt (sem_Expr _expr) (sem_Lhs _left) (sem_Expr _rhs))+sem_Expr !(SemFun _nt _args _body) =+ (sem_Expr_SemFun _nt (sem_Exprs _args) (sem_Expr _body))+sem_Expr !(SimpleExpr _txt) =+ (sem_Expr_SimpleExpr _txt)+sem_Expr !(TextExpr _lns) =+ (sem_Expr_TextExpr _lns)+sem_Expr !(Trace _txt _expr) =+ (sem_Expr_Trace _txt (sem_Expr _expr))+sem_Expr !(TupleExpr _exprs) =+ (sem_Expr_TupleExpr (sem_Exprs _exprs))+sem_Expr !(TypedExpr _expr _tp) =+ (sem_Expr_TypedExpr (sem_Expr _expr) (sem_Type _tp))+sem_Expr !(UnboxedTupleExpr _exprs) =+ (sem_Expr_UnboxedTupleExpr (sem_Exprs _exprs))+-- semantic domain+newtype T_Expr = T_Expr (Bool ->+ Options ->+ String ->+ ( PP_Doc))+data Inh_Expr = Inh_Expr {nested_Inh_Expr :: !(Bool),options_Inh_Expr :: !(Options),outputfile_Inh_Expr :: !(String)}+data Syn_Expr = Syn_Expr {pp_Syn_Expr :: !(PP_Doc)}+wrap_Expr :: T_Expr ->+ Inh_Expr ->+ Syn_Expr+wrap_Expr !(T_Expr sem) !(Inh_Expr _lhsInested _lhsIoptions _lhsIoutputfile) =+ (let ( !_lhsOpp) = sem _lhsInested _lhsIoptions _lhsIoutputfile+ in (Syn_Expr _lhsOpp))+sem_Expr_App :: String ->+ T_Exprs ->+ T_Expr+sem_Expr_App !name_ !(T_Exprs args_) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1732 "dist/build/PrintCode" #-}+ )) of+ { !_argsOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1737 "dist/build/PrintCode" #-}+ )) of+ { !_argsOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1742 "dist/build/PrintCode" #-}+ )) of+ { !_argsOnested ->+ (case (args_ _argsOnested _argsOoptions _argsOoutputfile) of+ { ( !_argsIpps) ->+ (case (({-# LINE 161 "src-ag/PrintCode.ag" #-}+ pp_parens $ name_ >#< hv_sp _argsIpps+ {-# LINE 1749 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })))+sem_Expr_Case :: T_Expr ->+ T_CaseAlts ->+ T_Expr+sem_Expr_Case !(T_Expr expr_) !(T_CaseAlts alts_) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1762 "dist/build/PrintCode" #-}+ )) of+ { !_altsOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1767 "dist/build/PrintCode" #-}+ )) of+ { !_altsOoptions ->+ (case (({-# LINE 56 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1772 "dist/build/PrintCode" #-}+ )) of+ { !_altsOnested ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1777 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1782 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1787 "dist/build/PrintCode" #-}+ )) of+ { !_exprOnested ->+ (case (alts_ _altsOnested _altsOoptions _altsOoutputfile) of+ { ( !_altsIpps) ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile) of+ { ( !_exprIpp) ->+ (case (({-# LINE 144 "src-ag/PrintCode.ag" #-}+ pp_parens ( "case" >#< pp_parens _exprIpp >#< "of"+ >-< (vlist _altsIpps)+ )+ {-# LINE 1798 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) })))+sem_Expr_Do :: T_Decls ->+ T_Expr ->+ T_Expr+sem_Expr_Do !(T_Decls stmts_) !(T_Expr body_) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1811 "dist/build/PrintCode" #-}+ )) of+ { !_bodyOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1816 "dist/build/PrintCode" #-}+ )) of+ { !_bodyOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1821 "dist/build/PrintCode" #-}+ )) of+ { !_bodyOnested ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1826 "dist/build/PrintCode" #-}+ )) of+ { !_stmtsOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1831 "dist/build/PrintCode" #-}+ )) of+ { !_stmtsOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1836 "dist/build/PrintCode" #-}+ )) of+ { !_stmtsOnested ->+ (case (({-# LINE 416 "src-ag/PrintCode.ag" #-}+ False+ {-# LINE 1841 "dist/build/PrintCode" #-}+ )) of+ { !_stmtsOisDeclOfLet ->+ (case (body_ _bodyOnested _bodyOoptions _bodyOoutputfile) of+ { ( !_bodyIpp) ->+ (case (stmts_ _stmtsOisDeclOfLet _stmtsOnested _stmtsOoptions _stmtsOoutputfile) of+ { ( !_stmtsIpps) ->+ (case (({-# LINE 147 "src-ag/PrintCode.ag" #-}+ pp_parens ( "do" >#< ( vlist _stmtsIpps+ >-< ("return" >#< _bodyIpp))+ )+ {-# LINE 1852 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) })))+sem_Expr_InvokeExpr :: String ->+ T_Expr ->+ T_Exprs ->+ T_Expr+sem_Expr_InvokeExpr !nt_ !(T_Expr expr_) !(T_Exprs args_) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1866 "dist/build/PrintCode" #-}+ )) of+ { !_argsOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1871 "dist/build/PrintCode" #-}+ )) of+ { !_argsOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1876 "dist/build/PrintCode" #-}+ )) of+ { !_argsOnested ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1881 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1886 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1891 "dist/build/PrintCode" #-}+ )) of+ { !_exprOnested ->+ (case (args_ _argsOnested _argsOoptions _argsOoutputfile) of+ { ( !_argsIpps) ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile) of+ { ( !_exprIpp) ->+ (case (({-# LINE 185 "src-ag/PrintCode.ag" #-}+ if breadthFirst _lhsIoptions+ then "invoke" >#< pp_parens _exprIpp >#< pp_parens (+ nt_ >|< "_Inh" >#< pp_parens (ppTuple False _argsIpps))+ else _exprIpp >#< hv_sp _argsIpps+ {-# LINE 1903 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) })))+sem_Expr_Lambda :: T_Exprs ->+ T_Expr ->+ T_Expr+sem_Expr_Lambda !(T_Exprs args_) !(T_Expr body_) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1916 "dist/build/PrintCode" #-}+ )) of+ { !_bodyOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1921 "dist/build/PrintCode" #-}+ )) of+ { !_bodyOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1926 "dist/build/PrintCode" #-}+ )) of+ { !_bodyOnested ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1931 "dist/build/PrintCode" #-}+ )) of+ { !_argsOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1936 "dist/build/PrintCode" #-}+ )) of+ { !_argsOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1941 "dist/build/PrintCode" #-}+ )) of+ { !_argsOnested ->+ (case (({-# LINE 153 "src-ag/PrintCode.ag" #-}+ if bangpats _lhsIoptions+ then \p -> pp_parens ("!" >|< p)+ else id+ {-# LINE 1948 "dist/build/PrintCode" #-}+ )) of+ { !_addBang ->+ (case (args_ _argsOnested _argsOoptions _argsOoutputfile) of+ { ( !_argsIpps) ->+ (case (({-# LINE 150 "src-ag/PrintCode.ag" #-}+ if strictSems _lhsIoptions+ then _argsIpps+ else []+ {-# LINE 1957 "dist/build/PrintCode" #-}+ )) of+ { !_strictParams ->+ (case (body_ _bodyOnested _bodyOoptions _bodyOoutputfile) of+ { ( !_bodyIpp) ->+ (case (({-# LINE 156 "src-ag/PrintCode.ag" #-}+ pp_parens ( "\\" >#< (vlist (map _addBang _argsIpps)) >#< "->"+ >-< indent 4 (_strictParams `ppMultiSeqV` _bodyIpp)+ )+ {-# LINE 1966 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) }) })))+sem_Expr_Let :: T_Decls ->+ T_Expr ->+ T_Expr+sem_Expr_Let !(T_Decls decls_) !(T_Expr body_) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1979 "dist/build/PrintCode" #-}+ )) of+ { !_bodyOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1984 "dist/build/PrintCode" #-}+ )) of+ { !_bodyOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1989 "dist/build/PrintCode" #-}+ )) of+ { !_bodyOnested ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1994 "dist/build/PrintCode" #-}+ )) of+ { !_declsOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1999 "dist/build/PrintCode" #-}+ )) of+ { !_declsOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2004 "dist/build/PrintCode" #-}+ )) of+ { !_declsOnested ->+ (case (({-# LINE 414 "src-ag/PrintCode.ag" #-}+ True+ {-# LINE 2009 "dist/build/PrintCode" #-}+ )) of+ { !_declsOisDeclOfLet ->+ (case (body_ _bodyOnested _bodyOoptions _bodyOoutputfile) of+ { ( !_bodyIpp) ->+ (case (decls_ _declsOisDeclOfLet _declsOnested _declsOoptions _declsOoutputfile) of+ { ( !_declsIpps) ->+ (case (({-# LINE 141 "src-ag/PrintCode.ag" #-}+ pp_parens ( "let" >#< (vlist _declsIpps)+ >-< "in " >#< _bodyIpp+ )+ {-# LINE 2020 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) })))+sem_Expr_LineExpr :: T_Expr ->+ T_Expr+sem_Expr_LineExpr !(T_Expr expr_) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2032 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2037 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2042 "dist/build/PrintCode" #-}+ )) of+ { !_exprOnested ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile) of+ { ( !_exprIpp) ->+ (case (({-# LINE 178 "src-ag/PrintCode.ag" #-}+ _exprIpp >-< "{-# LINE" >#< ppWithLineNr (\n -> pp $ show $ n + 1) >#< show _lhsIoutputfile >#< "#-}"+ >-< ""+ {-# LINE 2050 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })))+sem_Expr_PragmaExpr :: Bool ->+ Bool ->+ String ->+ T_Expr ->+ T_Expr+sem_Expr_PragmaExpr !onLeftSide_ !onNewLine_ !txt_ !(T_Expr expr_) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2065 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2070 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2075 "dist/build/PrintCode" #-}+ )) of+ { !_exprOnested ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile) of+ { ( !_exprIpp) ->+ (case (({-# LINE 167 "src-ag/PrintCode.ag" #-}+ let pragmaDoc = "{-#" >#< txt_ >#< "#-}"+ op = if onNewLine_+ then (>-<)+ else (>#<)+ leftOp x y = if onLeftSide_+ then x `op` y+ else y+ rightOp x y = if onLeftSide_+ then x+ else x `op` y+ in pp_parens (pragmaDoc `leftOp` _exprIpp `rightOp` pragmaDoc)+ {-# LINE 2092 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })))+sem_Expr_ResultExpr :: String ->+ T_Expr ->+ T_Expr+sem_Expr_ResultExpr !nt_ !(T_Expr expr_) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2105 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2110 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2115 "dist/build/PrintCode" #-}+ )) of+ { !_exprOnested ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile) of+ { ( !_exprIpp) ->+ (case (({-# LINE 181 "src-ag/PrintCode.ag" #-}+ if breadthFirst _lhsIoptions+ then "final" >#<+ pp_parens (nt_ >|< "_Syn" >#< pp_parens _exprIpp)+ else _exprIpp+ {-# LINE 2125 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })))+sem_Expr_ResumeExpr :: String ->+ T_Expr ->+ T_Lhs ->+ T_Expr ->+ T_Expr+sem_Expr_ResumeExpr !nt_ !(T_Expr expr_) !(T_Lhs left_) !(T_Expr rhs_) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2140 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2145 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2150 "dist/build/PrintCode" #-}+ )) of+ { !_rhsOnested ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2155 "dist/build/PrintCode" #-}+ )) of+ { !_leftOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2160 "dist/build/PrintCode" #-}+ )) of+ { !_leftOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2165 "dist/build/PrintCode" #-}+ )) of+ { !_leftOnested ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2170 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2175 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2180 "dist/build/PrintCode" #-}+ )) of+ { !_exprOnested ->+ (case (({-# LINE 418 "src-ag/PrintCode.ag" #-}+ False+ {-# LINE 2185 "dist/build/PrintCode" #-}+ )) of+ { !_leftOisDeclOfLet ->+ (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile) of+ { ( !_rhsIpp) ->+ (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile) of+ { ( !_leftIpp) ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile) of+ { ( !_exprIpp) ->+ (case (({-# LINE 189 "src-ag/PrintCode.ag" #-}+ if breadthFirst _lhsIoptions+ then pp_parens ("resume" >#< pp_parens _exprIpp+ >-< indent 2 (pp_parens ( "\\" >|<+ pp_parens ("~" >|< pp_parens (nt_ >|< "_Syn" >#< "_inh_arg"))+ >#< "->"+ >-< indent 2 ( "let" >#< _leftIpp >#< "= _inh_arg"+ >-< indent 2 ("in" >#< _rhsIpp)+ ))))+ else pp_parens ( "case" >#< pp_parens _exprIpp >#< "of"+ >-< ("{" >#< _leftIpp >#< "->")+ >-< indent 4 (_rhsIpp >#< "}")+ )+ {-# LINE 2207 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+sem_Expr_SemFun :: String ->+ T_Exprs ->+ T_Expr ->+ T_Expr+sem_Expr_SemFun !nt_ !(T_Exprs args_) !(T_Expr body_) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2221 "dist/build/PrintCode" #-}+ )) of+ { !_bodyOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2226 "dist/build/PrintCode" #-}+ )) of+ { !_bodyOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2231 "dist/build/PrintCode" #-}+ )) of+ { !_bodyOnested ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2236 "dist/build/PrintCode" #-}+ )) of+ { !_argsOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2241 "dist/build/PrintCode" #-}+ )) of+ { !_argsOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2246 "dist/build/PrintCode" #-}+ )) of+ { !_argsOnested ->+ (case (({-# LINE 204 "src-ag/PrintCode.ag" #-}+ if bangpats _lhsIoptions+ then \p -> pp_parens ("!" >|< p)+ else id+ {-# LINE 2253 "dist/build/PrintCode" #-}+ )) of+ { !_addBang ->+ (case (args_ _argsOnested _argsOoptions _argsOoutputfile) of+ { ( !_argsIpps) ->+ (case (({-# LINE 201 "src-ag/PrintCode.ag" #-}+ if strictSems _lhsIoptions+ then _argsIpps+ else []+ {-# LINE 2262 "dist/build/PrintCode" #-}+ )) of+ { !_strictParams ->+ (case (body_ _bodyOnested _bodyOoptions _bodyOoutputfile) of+ { ( !_bodyIpp) ->+ (case (({-# LINE 207 "src-ag/PrintCode.ag" #-}+ if breadthFirst _lhsIoptions+ then "Child" >#< pp_parens ( "\\" >|<+ pp_parens (nt_ >|< "_Inh" >#<+ ppTuple False (map _addBang _argsIpps)) >#< "->"+ >-< indent 2 (_strictParams `ppMultiSeqV` _bodyIpp))+ else if null _argsIpps+ then _bodyIpp+ else pp_parens ( "\\" >#< (vlist (map _addBang _argsIpps)) >#< "->"+ >-< indent 4 (_strictParams `ppMultiSeqV` _bodyIpp)+ )+ {-# LINE 2278 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) }) })))+sem_Expr_SimpleExpr :: String ->+ T_Expr+sem_Expr_SimpleExpr !txt_ =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 162 "src-ag/PrintCode.ag" #-}+ text txt_+ {-# LINE 2290 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) })))+sem_Expr_TextExpr :: ([String]) ->+ T_Expr+sem_Expr_TextExpr !lns_ =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 163 "src-ag/PrintCode.ag" #-}+ vlist (map text lns_)+ {-# LINE 2302 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) })))+sem_Expr_Trace :: String ->+ T_Expr ->+ T_Expr+sem_Expr_Trace !txt_ !(T_Expr expr_) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2315 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2320 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2325 "dist/build/PrintCode" #-}+ )) of+ { !_exprOnested ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile) of+ { ( !_exprIpp) ->+ (case (({-# LINE 164 "src-ag/PrintCode.ag" #-}+ "trace" >#< ( pp_parens ("\"" >|< text txt_ >|< "\"")+ >-< pp_parens _exprIpp+ )+ {-# LINE 2334 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })))+sem_Expr_TupleExpr :: T_Exprs ->+ T_Expr+sem_Expr_TupleExpr !(T_Exprs exprs_) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2346 "dist/build/PrintCode" #-}+ )) of+ { !_exprsOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2351 "dist/build/PrintCode" #-}+ )) of+ { !_exprsOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2356 "dist/build/PrintCode" #-}+ )) of+ { !_exprsOnested ->+ (case (exprs_ _exprsOnested _exprsOoptions _exprsOoutputfile) of+ { ( !_exprsIpps) ->+ (case (({-# LINE 159 "src-ag/PrintCode.ag" #-}+ ppTuple _lhsInested _exprsIpps+ {-# LINE 2363 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })))+sem_Expr_TypedExpr :: T_Expr ->+ T_Type ->+ T_Expr+sem_Expr_TypedExpr !(T_Expr expr_) !(T_Type tp_) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2376 "dist/build/PrintCode" #-}+ )) of+ { !_tpOnested ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2381 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2386 "dist/build/PrintCode" #-}+ )) of+ { !_exprOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2391 "dist/build/PrintCode" #-}+ )) of+ { !_exprOnested ->+ (case (tp_ _tpOnested) of+ { ( !_tpIpp,!_tpIprec) ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile) of+ { ( !_exprIpp) ->+ (case (({-# LINE 180 "src-ag/PrintCode.ag" #-}+ pp_parens (_exprIpp >#< "::" >#< _tpIpp)+ {-# LINE 2400 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) })))+sem_Expr_UnboxedTupleExpr :: T_Exprs ->+ T_Expr+sem_Expr_UnboxedTupleExpr !(T_Exprs exprs_) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2412 "dist/build/PrintCode" #-}+ )) of+ { !_exprsOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2417 "dist/build/PrintCode" #-}+ )) of+ { !_exprsOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2422 "dist/build/PrintCode" #-}+ )) of+ { !_exprsOnested ->+ (case (exprs_ _exprsOnested _exprsOoptions _exprsOoutputfile) of+ { ( !_exprsIpps) ->+ (case (({-# LINE 160 "src-ag/PrintCode.ag" #-}+ ppUnboxedTuple _lhsInested _exprsIpps+ {-# LINE 2429 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })))+-- Exprs -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ nested : Bool+ options : Options+ outputfile : String+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Expr + child tl : Exprs + alternative Nil:+-}+-- cata+sem_Exprs :: Exprs ->+ T_Exprs+sem_Exprs !list =+ (Prelude.foldr sem_Exprs_Cons sem_Exprs_Nil (Prelude.map sem_Expr list))+-- semantic domain+newtype T_Exprs = T_Exprs (Bool ->+ Options ->+ String ->+ ( PP_Docs))+data Inh_Exprs = Inh_Exprs {nested_Inh_Exprs :: !(Bool),options_Inh_Exprs :: !(Options),outputfile_Inh_Exprs :: !(String)}+data Syn_Exprs = Syn_Exprs {pps_Syn_Exprs :: !(PP_Docs)}+wrap_Exprs :: T_Exprs ->+ Inh_Exprs ->+ Syn_Exprs+wrap_Exprs !(T_Exprs sem) !(Inh_Exprs _lhsInested _lhsIoptions _lhsIoutputfile) =+ (let ( !_lhsOpps) = sem _lhsInested _lhsIoptions _lhsIoutputfile+ in (Syn_Exprs _lhsOpps))+sem_Exprs_Cons :: T_Expr ->+ T_Exprs ->+ T_Exprs+sem_Exprs_Cons !(T_Expr hd_) !(T_Exprs tl_) =+ (T_Exprs (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2475 "dist/build/PrintCode" #-}+ )) of+ { !_tlOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2480 "dist/build/PrintCode" #-}+ )) of+ { !_tlOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2485 "dist/build/PrintCode" #-}+ )) of+ { !_tlOnested ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2490 "dist/build/PrintCode" #-}+ )) of+ { !_hdOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2495 "dist/build/PrintCode" #-}+ )) of+ { !_hdOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2500 "dist/build/PrintCode" #-}+ )) of+ { !_hdOnested ->+ (case (tl_ _tlOnested _tlOoptions _tlOoutputfile) of+ { ( !_tlIpps) ->+ (case (hd_ _hdOnested _hdOoptions _hdOoutputfile) of+ { ( !_hdIpp) ->+ (case (({-# LINE 65 "src-ag/PrintCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 2509 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) }) }) }) }) })))+sem_Exprs_Nil :: T_Exprs+sem_Exprs_Nil =+ (T_Exprs (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 66 "src-ag/PrintCode.ag" #-}+ []+ {-# LINE 2520 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) })))+-- Lhs ---------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ isDeclOfLet : Bool+ nested : Bool+ options : Options+ outputfile : String+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative Fun:+ child name : {String}+ child args : Exprs + visit 0:+ local addBang : _+ local strictGuard : _+ local hasStrictVars : _+ local addStrictGuard : _+ alternative Pattern3:+ child pat3 : Pattern + visit 0:+ local hasStrictVars : _+ local strictGuard : _+ local addStrictGuard : _+ alternative Pattern3SM:+ child pat3 : Pattern + alternative TupleLhs:+ child comps : {[String]}+ visit 0:+ local addBang : _+ local hasStrictVars : _+ local strictGuard : _+ local addStrictGuard : _+ alternative UnboxedTupleLhs:+ child comps : {[String]}+ visit 0:+ local addBang : _+ local hasStrictVars : _+ local strictGuard : _+ local addStrictGuard : _+ alternative Unwrap:+ child name : {String}+ child sub : Lhs +-}+-- cata+sem_Lhs :: Lhs ->+ T_Lhs+sem_Lhs !(Fun _name _args) =+ (sem_Lhs_Fun _name (sem_Exprs _args))+sem_Lhs !(Pattern3 _pat3) =+ (sem_Lhs_Pattern3 (sem_Pattern _pat3))+sem_Lhs !(Pattern3SM _pat3) =+ (sem_Lhs_Pattern3SM (sem_Pattern _pat3))+sem_Lhs !(TupleLhs _comps) =+ (sem_Lhs_TupleLhs _comps)+sem_Lhs !(UnboxedTupleLhs _comps) =+ (sem_Lhs_UnboxedTupleLhs _comps)+sem_Lhs !(Unwrap _name _sub) =+ (sem_Lhs_Unwrap _name (sem_Lhs _sub))+-- semantic domain+newtype T_Lhs = T_Lhs (Bool ->+ Bool ->+ Options ->+ String ->+ ( PP_Doc))+data Inh_Lhs = Inh_Lhs {isDeclOfLet_Inh_Lhs :: !(Bool),nested_Inh_Lhs :: !(Bool),options_Inh_Lhs :: !(Options),outputfile_Inh_Lhs :: !(String)}+data Syn_Lhs = Syn_Lhs {pp_Syn_Lhs :: !(PP_Doc)}+wrap_Lhs :: T_Lhs ->+ Inh_Lhs ->+ Syn_Lhs+wrap_Lhs !(T_Lhs sem) !(Inh_Lhs _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) =+ (let ( !_lhsOpp) = sem _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile+ in (Syn_Lhs _lhsOpp))+sem_Lhs_Fun :: String ->+ T_Exprs ->+ T_Lhs+sem_Lhs_Fun !name_ !(T_Exprs args_) =+ (T_Lhs (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2608 "dist/build/PrintCode" #-}+ )) of+ { !_argsOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2613 "dist/build/PrintCode" #-}+ )) of+ { !_argsOoptions ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2618 "dist/build/PrintCode" #-}+ )) of+ { !_argsOnested ->+ (case (({-# LINE 248 "src-ag/PrintCode.ag" #-}+ if bangpats _lhsIoptions+ then \p -> "!" >|< p+ else id+ {-# LINE 2625 "dist/build/PrintCode" #-}+ )) of+ { !_addBang ->+ (case (args_ _argsOnested _argsOoptions _argsOoutputfile) of+ { ( !_argsIpps) ->+ (case (({-# LINE 245 "src-ag/PrintCode.ag" #-}+ _argsIpps `ppMultiSeqH` (pp "True")+ {-# LINE 2632 "dist/build/PrintCode" #-}+ )) of+ { !_strictGuard ->+ (case (({-# LINE 244 "src-ag/PrintCode.ag" #-}+ not (null _argsIpps)+ {-# LINE 2637 "dist/build/PrintCode" #-}+ )) of+ { !_hasStrictVars ->+ (case (({-# LINE 243 "src-ag/PrintCode.ag" #-}+ if strictSems _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id+ {-# LINE 2642 "dist/build/PrintCode" #-}+ )) of+ { !_addStrictGuard ->+ (case (({-# LINE 256 "src-ag/PrintCode.ag" #-}+ _addStrictGuard (name_ >#< hv_sp (map _addBang _argsIpps))+ {-# LINE 2647 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) })))+sem_Lhs_Pattern3 :: T_Pattern ->+ T_Lhs+sem_Lhs_Pattern3 !(T_Pattern pat3_) =+ (T_Lhs (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2660 "dist/build/PrintCode" #-}+ )) of+ { !_pat3Ooptions ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 2665 "dist/build/PrintCode" #-}+ )) of+ { !_pat3OisDeclOfLet ->+ (case (({-# LINE 380 "src-ag/PrintCode.ag" #-}+ False+ {-# LINE 2670 "dist/build/PrintCode" #-}+ )) of+ { !_pat3ObelowIrrefutable ->+ (case (pat3_ _pat3ObelowIrrefutable _pat3OisDeclOfLet _pat3Ooptions) of+ { ( !_pat3Icopy,!_pat3IisUnderscore,!_pat3Ipp,!_pat3Ipp',!_pat3IstrictVars) ->+ (case (({-# LINE 235 "src-ag/PrintCode.ag" #-}+ not (null _pat3IstrictVars)+ {-# LINE 2677 "dist/build/PrintCode" #-}+ )) of+ { !_hasStrictVars ->+ (case (({-# LINE 234 "src-ag/PrintCode.ag" #-}+ _pat3IstrictVars `ppMultiSeqH` (pp "True")+ {-# LINE 2682 "dist/build/PrintCode" #-}+ )) of+ { !_strictGuard ->+ (case (({-# LINE 232 "src-ag/PrintCode.ag" #-}+ if strictCases _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id+ {-# LINE 2687 "dist/build/PrintCode" #-}+ )) of+ { !_addStrictGuard ->+ (case (({-# LINE 252 "src-ag/PrintCode.ag" #-}+ _addStrictGuard _pat3Ipp+ {-# LINE 2692 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) })))+sem_Lhs_Pattern3SM :: T_Pattern ->+ T_Lhs+sem_Lhs_Pattern3SM !(T_Pattern pat3_) =+ (T_Lhs (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2705 "dist/build/PrintCode" #-}+ )) of+ { !_pat3Ooptions ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 2710 "dist/build/PrintCode" #-}+ )) of+ { !_pat3OisDeclOfLet ->+ (case (({-# LINE 380 "src-ag/PrintCode.ag" #-}+ False+ {-# LINE 2715 "dist/build/PrintCode" #-}+ )) of+ { !_pat3ObelowIrrefutable ->+ (case (pat3_ _pat3ObelowIrrefutable _pat3OisDeclOfLet _pat3Ooptions) of+ { ( !_pat3Icopy,!_pat3IisUnderscore,!_pat3Ipp,!_pat3Ipp',!_pat3IstrictVars) ->+ (case (({-# LINE 253 "src-ag/PrintCode.ag" #-}+ _pat3Ipp'+ {-# LINE 2722 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })))+sem_Lhs_TupleLhs :: ([String]) ->+ T_Lhs+sem_Lhs_TupleLhs !comps_ =+ (T_Lhs (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 248 "src-ag/PrintCode.ag" #-}+ if bangpats _lhsIoptions+ then \p -> "!" >|< p+ else id+ {-# LINE 2737 "dist/build/PrintCode" #-}+ )) of+ { !_addBang ->+ (case (({-# LINE 240 "src-ag/PrintCode.ag" #-}+ not (null comps_)+ {-# LINE 2742 "dist/build/PrintCode" #-}+ )) of+ { !_hasStrictVars ->+ (case (({-# LINE 237 "src-ag/PrintCode.ag" #-}+ if stricterCases _lhsIoptions && not _lhsIisDeclOfLet+ then map text comps_ `ppMultiSeqH` (pp "True")+ else pp "True"+ {-# LINE 2749 "dist/build/PrintCode" #-}+ )) of+ { !_strictGuard ->+ (case (({-# LINE 232 "src-ag/PrintCode.ag" #-}+ if strictCases _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id+ {-# LINE 2754 "dist/build/PrintCode" #-}+ )) of+ { !_addStrictGuard ->+ (case (({-# LINE 254 "src-ag/PrintCode.ag" #-}+ _addStrictGuard $ ppTuple _lhsInested (map (_addBang . text) comps_)+ {-# LINE 2759 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })))+sem_Lhs_UnboxedTupleLhs :: ([String]) ->+ T_Lhs+sem_Lhs_UnboxedTupleLhs !comps_ =+ (T_Lhs (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 248 "src-ag/PrintCode.ag" #-}+ if bangpats _lhsIoptions+ then \p -> "!" >|< p+ else id+ {-# LINE 2774 "dist/build/PrintCode" #-}+ )) of+ { !_addBang ->+ (case (({-# LINE 240 "src-ag/PrintCode.ag" #-}+ not (null comps_)+ {-# LINE 2779 "dist/build/PrintCode" #-}+ )) of+ { !_hasStrictVars ->+ (case (({-# LINE 237 "src-ag/PrintCode.ag" #-}+ if stricterCases _lhsIoptions && not _lhsIisDeclOfLet+ then map text comps_ `ppMultiSeqH` (pp "True")+ else pp "True"+ {-# LINE 2786 "dist/build/PrintCode" #-}+ )) of+ { !_strictGuard ->+ (case (({-# LINE 232 "src-ag/PrintCode.ag" #-}+ if strictCases _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id+ {-# LINE 2791 "dist/build/PrintCode" #-}+ )) of+ { !_addStrictGuard ->+ (case (({-# LINE 255 "src-ag/PrintCode.ag" #-}+ _addStrictGuard $ ppUnboxedTuple _lhsInested (map (_addBang . text) comps_)+ {-# LINE 2796 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })))+sem_Lhs_Unwrap :: String ->+ T_Lhs ->+ T_Lhs+sem_Lhs_Unwrap !name_ !(T_Lhs sub_) =+ (T_Lhs (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 40 "src-ag/PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2810 "dist/build/PrintCode" #-}+ )) of+ { !_subOoutputfile ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2815 "dist/build/PrintCode" #-}+ )) of+ { !_subOoptions ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2820 "dist/build/PrintCode" #-}+ )) of+ { !_subOnested ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 2825 "dist/build/PrintCode" #-}+ )) of+ { !_subOisDeclOfLet ->+ (case (sub_ _subOisDeclOfLet _subOnested _subOoptions _subOoutputfile) of+ { ( !_subIpp) ->+ (case (({-# LINE 257 "src-ag/PrintCode.ag" #-}+ pp_parens (name_ >#< _subIpp)+ {-# LINE 2832 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) })))+-- NamedType ---------------------------------------------------+{-+ visit 0:+ inherited attribute:+ nested : Bool+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative Named:+ child strict : {Bool}+ child name : {String}+ child tp : Type +-}+-- cata+sem_NamedType :: NamedType ->+ T_NamedType+sem_NamedType !(Named _strict _name _tp) =+ (sem_NamedType_Named _strict _name (sem_Type _tp))+-- semantic domain+newtype T_NamedType = T_NamedType (Bool ->+ ( PP_Doc))+data Inh_NamedType = Inh_NamedType {nested_Inh_NamedType :: !(Bool)}+data Syn_NamedType = Syn_NamedType {pp_Syn_NamedType :: !(PP_Doc)}+wrap_NamedType :: T_NamedType ->+ Inh_NamedType ->+ Syn_NamedType+wrap_NamedType !(T_NamedType sem) !(Inh_NamedType _lhsInested) =+ (let ( !_lhsOpp) = sem _lhsInested+ in (Syn_NamedType _lhsOpp))+sem_NamedType_Named :: Bool ->+ String ->+ T_Type ->+ T_NamedType+sem_NamedType_Named !strict_ !name_ !(T_Type tp_) =+ (T_NamedType (\ (!_lhsInested) ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2873 "dist/build/PrintCode" #-}+ )) of+ { !_tpOnested ->+ (case (tp_ _tpOnested) of+ { ( !_tpIpp,!_tpIprec) ->+ (case (({-# LINE 226 "src-ag/PrintCode.ag" #-}+ if strict_+ then name_ >#< "::" >#< "!" >|< pp_parens _tpIpp+ else name_ >#< "::" >#< _tpIpp+ {-# LINE 2882 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+-- NamedTypes --------------------------------------------------+{-+ visit 0:+ inherited attribute:+ nested : Bool+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : NamedType + child tl : NamedTypes + alternative Nil:+-}+-- cata+sem_NamedTypes :: NamedTypes ->+ T_NamedTypes+sem_NamedTypes !list =+ (Prelude.foldr sem_NamedTypes_Cons sem_NamedTypes_Nil (Prelude.map sem_NamedType list))+-- semantic domain+newtype T_NamedTypes = T_NamedTypes (Bool ->+ ( PP_Docs))+data Inh_NamedTypes = Inh_NamedTypes {nested_Inh_NamedTypes :: !(Bool)}+data Syn_NamedTypes = Syn_NamedTypes {pps_Syn_NamedTypes :: !(PP_Docs)}+wrap_NamedTypes :: T_NamedTypes ->+ Inh_NamedTypes ->+ Syn_NamedTypes+wrap_NamedTypes !(T_NamedTypes sem) !(Inh_NamedTypes _lhsInested) =+ (let ( !_lhsOpps) = sem _lhsInested+ in (Syn_NamedTypes _lhsOpps))+sem_NamedTypes_Cons :: T_NamedType ->+ T_NamedTypes ->+ T_NamedTypes+sem_NamedTypes_Cons !(T_NamedType hd_) !(T_NamedTypes tl_) =+ (T_NamedTypes (\ (!_lhsInested) ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2922 "dist/build/PrintCode" #-}+ )) of+ { !_tlOnested ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2927 "dist/build/PrintCode" #-}+ )) of+ { !_hdOnested ->+ (case (tl_ _tlOnested) of+ { ( !_tlIpps) ->+ (case (hd_ _hdOnested) of+ { ( !_hdIpp) ->+ (case (({-# LINE 81 "src-ag/PrintCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 2936 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) })))+sem_NamedTypes_Nil :: T_NamedTypes+sem_NamedTypes_Nil =+ (T_NamedTypes (\ (!_lhsInested) ->+ (case (({-# LINE 82 "src-ag/PrintCode.ag" #-}+ []+ {-# LINE 2945 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) })))+-- Pattern -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ belowIrrefutable : Bool+ isDeclOfLet : Bool+ options : Options+ synthesized attributes:+ copy : Pattern + isUnderscore : Bool+ pp : PP_Doc+ pp' : PP_Doc+ strictVars : [PP_Doc]+ alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + visit 0:+ local copy : _+ local ppVar : _+ local addBang : _+ local ppVarBang : _+ local strictPatVars : _+ local strictVar : _+ alternative Constr:+ child name : {ConstructorIdent}+ child pats : Patterns + visit 0:+ local copy : _+ local addBang : _+ alternative Irrefutable:+ child pat : Pattern + visit 0:+ local copy : _+ alternative Product:+ child pos : {Pos}+ child pats : Patterns + visit 0:+ local copy : _+ local addBang : _+ alternative Underscore:+ child pos : {Pos}+ visit 0:+ local copy : _+-}+-- cata+sem_Pattern :: Pattern ->+ T_Pattern+sem_Pattern !(Alias _field _attr _pat) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat))+sem_Pattern !(Constr _name _pats) =+ (sem_Pattern_Constr _name (sem_Patterns _pats))+sem_Pattern !(Irrefutable _pat) =+ (sem_Pattern_Irrefutable (sem_Pattern _pat))+sem_Pattern !(Product _pos _pats) =+ (sem_Pattern_Product _pos (sem_Patterns _pats))+sem_Pattern !(Underscore _pos) =+ (sem_Pattern_Underscore _pos)+-- semantic domain+newtype T_Pattern = T_Pattern (Bool ->+ Bool ->+ Options ->+ ( Pattern,Bool,PP_Doc,PP_Doc,([PP_Doc])))+data Inh_Pattern = Inh_Pattern {belowIrrefutable_Inh_Pattern :: !(Bool),isDeclOfLet_Inh_Pattern :: !(Bool),options_Inh_Pattern :: !(Options)}+data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: !(Pattern),isUnderscore_Syn_Pattern :: !(Bool),pp_Syn_Pattern :: !(PP_Doc),pp'_Syn_Pattern :: !(PP_Doc),strictVars_Syn_Pattern :: !(([PP_Doc]))}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern+wrap_Pattern !(T_Pattern sem) !(Inh_Pattern _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions) =+ (let ( !_lhsOcopy,!_lhsOisUnderscore,!_lhsOpp,!_lhsOpp',!_lhsOstrictVars) = sem _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions+ in (Syn_Pattern _lhsOcopy _lhsOisUnderscore _lhsOpp _lhsOpp' _lhsOstrictVars))+sem_Pattern_Alias :: Identifier ->+ Identifier ->+ T_Pattern ->+ T_Pattern+sem_Pattern_Alias !field_ !attr_ !(T_Pattern pat_) =+ (T_Pattern (\ (!_lhsIbelowIrrefutable)+ (!_lhsIisDeclOfLet)+ (!_lhsIoptions) ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 3031 "dist/build/PrintCode" #-}+ )) of+ { !_patOoptions ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 3036 "dist/build/PrintCode" #-}+ )) of+ { !_patOisDeclOfLet ->+ (case (({-# LINE 373 "src-ag/PrintCode.ag" #-}+ _lhsIbelowIrrefutable+ {-# LINE 3041 "dist/build/PrintCode" #-}+ )) of+ { !_patObelowIrrefutable ->+ (case (pat_ _patObelowIrrefutable _patOisDeclOfLet _patOoptions) of+ { ( !_patIcopy,!_patIisUnderscore,!_patIpp,!_patIpp',!_patIstrictVars) ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Alias field_ attr_ _patIcopy+ {-# LINE 3048 "dist/build/PrintCode" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 3053 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 370 "src-ag/PrintCode.ag" #-}+ False+ {-# LINE 3058 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 359 "src-ag/PrintCode.ag" #-}+ pp (attrname False field_ attr_)+ {-# LINE 3063 "dist/build/PrintCode" #-}+ )) of+ { !_ppVar ->+ (case (({-# LINE 352 "src-ag/PrintCode.ag" #-}+ if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable+ then \p -> "!" >|< p+ else id+ {-# LINE 3070 "dist/build/PrintCode" #-}+ )) of+ { !_addBang ->+ (case (({-# LINE 360 "src-ag/PrintCode.ag" #-}+ _addBang $ _ppVar+ {-# LINE 3075 "dist/build/PrintCode" #-}+ )) of+ { !_ppVarBang ->+ (case (({-# LINE 361 "src-ag/PrintCode.ag" #-}+ if _patIisUnderscore+ then _ppVarBang+ else _ppVarBang >|< "@" >|< _patIpp+ {-# LINE 3082 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 393 "src-ag/PrintCode.ag" #-}+ let attribute | field_ == _LOC || field_ == nullIdent = locname' attr_+ | otherwise = attrname False field_ attr_+ in attribute >|< "@" >|< _patIpp'+ {-# LINE 3089 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp' ->+ (case (({-# LINE 333 "src-ag/PrintCode.ag" #-}+ if stricterCases _lhsIoptions && not _lhsIisDeclOfLet+ then _patIstrictVars+ else []+ {-# LINE 3096 "dist/build/PrintCode" #-}+ )) of+ { !_strictPatVars ->+ (case (({-# LINE 329 "src-ag/PrintCode.ag" #-}+ if strictCases _lhsIoptions && not _lhsIisDeclOfLet+ then [_ppVar ]+ else []+ {-# LINE 3103 "dist/build/PrintCode" #-}+ )) of+ { !_strictVar ->+ (case (({-# LINE 337 "src-ag/PrintCode.ag" #-}+ _strictVar ++ _strictPatVars+ {-# LINE 3108 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOstrictVars ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+sem_Pattern_Constr :: ConstructorIdent ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Constr !name_ !(T_Patterns pats_) =+ (T_Pattern (\ (!_lhsIbelowIrrefutable)+ (!_lhsIisDeclOfLet)+ (!_lhsIoptions) ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 3121 "dist/build/PrintCode" #-}+ )) of+ { !_patsOoptions ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 3126 "dist/build/PrintCode" #-}+ )) of+ { !_patsOisDeclOfLet ->+ (case (({-# LINE 373 "src-ag/PrintCode.ag" #-}+ _lhsIbelowIrrefutable+ {-# LINE 3131 "dist/build/PrintCode" #-}+ )) of+ { !_patsObelowIrrefutable ->+ (case (pats_ _patsObelowIrrefutable _patsOisDeclOfLet _patsOoptions) of+ { ( !_patsIcopy,!_patsIpps,!_patsIpps',!_patsIstrictVars) ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 3138 "dist/build/PrintCode" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 3143 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 368 "src-ag/PrintCode.ag" #-}+ False+ {-# LINE 3148 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 352 "src-ag/PrintCode.ag" #-}+ if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable+ then \p -> "!" >|< p+ else id+ {-# LINE 3155 "dist/build/PrintCode" #-}+ )) of+ { !_addBang ->+ (case (({-# LINE 357 "src-ag/PrintCode.ag" #-}+ _addBang $ pp_parens $ name_ >#< hv_sp _patsIpps+ {-# LINE 3160 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 391 "src-ag/PrintCode.ag" #-}+ pp_parens $ name_ >#< hv_sp (map pp_parens _patsIpps')+ {-# LINE 3165 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp' ->+ (case (({-# LINE 326 "src-ag/PrintCode.ag" #-}+ _patsIstrictVars+ {-# LINE 3170 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOstrictVars ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) })))+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern+sem_Pattern_Irrefutable !(T_Pattern pat_) =+ (T_Pattern (\ (!_lhsIbelowIrrefutable)+ (!_lhsIisDeclOfLet)+ (!_lhsIoptions) ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 3182 "dist/build/PrintCode" #-}+ )) of+ { !_patOoptions ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 3187 "dist/build/PrintCode" #-}+ )) of+ { !_patOisDeclOfLet ->+ (case (({-# LINE 376 "src-ag/PrintCode.ag" #-}+ True+ {-# LINE 3192 "dist/build/PrintCode" #-}+ )) of+ { !_patObelowIrrefutable ->+ (case (pat_ _patObelowIrrefutable _patOisDeclOfLet _patOoptions) of+ { ( !_patIcopy,!_patIisUnderscore,!_patIpp,!_patIpp',!_patIstrictVars) ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 3199 "dist/build/PrintCode" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 3204 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 367 "src-ag/PrintCode.ag" #-}+ _patIisUnderscore+ {-# LINE 3209 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 364 "src-ag/PrintCode.ag" #-}+ text "~" >|< pp_parens _patIpp+ {-# LINE 3214 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 396 "src-ag/PrintCode.ag" #-}+ text "~" >|< pp_parens _patIpp+ {-# LINE 3219 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp' ->+ (case (({-# LINE 340 "src-ag/PrintCode.ag" #-}+ []+ {-# LINE 3224 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOstrictVars ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) })))+sem_Pattern_Product :: Pos ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Product !pos_ !(T_Patterns pats_) =+ (T_Pattern (\ (!_lhsIbelowIrrefutable)+ (!_lhsIisDeclOfLet)+ (!_lhsIoptions) ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 3237 "dist/build/PrintCode" #-}+ )) of+ { !_patsOoptions ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 3242 "dist/build/PrintCode" #-}+ )) of+ { !_patsOisDeclOfLet ->+ (case (({-# LINE 373 "src-ag/PrintCode.ag" #-}+ _lhsIbelowIrrefutable+ {-# LINE 3247 "dist/build/PrintCode" #-}+ )) of+ { !_patsObelowIrrefutable ->+ (case (pats_ _patsObelowIrrefutable _patsOisDeclOfLet _patsOoptions) of+ { ( !_patsIcopy,!_patsIpps,!_patsIpps',!_patsIstrictVars) ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 3254 "dist/build/PrintCode" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 3259 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 369 "src-ag/PrintCode.ag" #-}+ False+ {-# LINE 3264 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 352 "src-ag/PrintCode.ag" #-}+ if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable+ then \p -> "!" >|< p+ else id+ {-# LINE 3271 "dist/build/PrintCode" #-}+ )) of+ { !_addBang ->+ (case (({-# LINE 358 "src-ag/PrintCode.ag" #-}+ _addBang $ pp_block "(" ")" "," _patsIpps+ {-# LINE 3276 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 392 "src-ag/PrintCode.ag" #-}+ pp_block "(" ")" "," _patsIpps'+ {-# LINE 3281 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp' ->+ (case (({-# LINE 326 "src-ag/PrintCode.ag" #-}+ _patsIstrictVars+ {-# LINE 3286 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOstrictVars ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) })))+sem_Pattern_Underscore :: Pos ->+ T_Pattern+sem_Pattern_Underscore !pos_ =+ (T_Pattern (\ (!_lhsIbelowIrrefutable)+ (!_lhsIisDeclOfLet)+ (!_lhsIoptions) ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Underscore pos_+ {-# LINE 3298 "dist/build/PrintCode" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 3303 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 371 "src-ag/PrintCode.ag" #-}+ True+ {-# LINE 3308 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 365 "src-ag/PrintCode.ag" #-}+ text "_"+ {-# LINE 3313 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 397 "src-ag/PrintCode.ag" #-}+ text "_"+ {-# LINE 3318 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp' ->+ (case (({-# LINE 326 "src-ag/PrintCode.ag" #-}+ []+ {-# LINE 3323 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOstrictVars ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) })))+-- Patterns ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ belowIrrefutable : Bool+ isDeclOfLet : Bool+ options : Options+ synthesized attributes:+ copy : Patterns + pps : [PP_Doc]+ pps' : [PP_Doc]+ strictVars : [PP_Doc]+ alternatives:+ alternative Cons:+ child hd : Pattern + child tl : Patterns + visit 0:+ local copy : _+ alternative Nil:+ visit 0:+ local copy : _+-}+-- cata+sem_Patterns :: Patterns ->+ T_Patterns+sem_Patterns !list =+ (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list))+-- semantic domain+newtype T_Patterns = T_Patterns (Bool ->+ Bool ->+ Options ->+ ( Patterns,([PP_Doc]),([PP_Doc]),([PP_Doc])))+data Inh_Patterns = Inh_Patterns {belowIrrefutable_Inh_Patterns :: !(Bool),isDeclOfLet_Inh_Patterns :: !(Bool),options_Inh_Patterns :: !(Options)}+data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: !(Patterns),pps_Syn_Patterns :: !(([PP_Doc])),pps'_Syn_Patterns :: !(([PP_Doc])),strictVars_Syn_Patterns :: !(([PP_Doc]))}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns+wrap_Patterns !(T_Patterns sem) !(Inh_Patterns _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions) =+ (let ( !_lhsOcopy,!_lhsOpps,!_lhsOpps',!_lhsOstrictVars) = sem _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions+ in (Syn_Patterns _lhsOcopy _lhsOpps _lhsOpps' _lhsOstrictVars))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns+sem_Patterns_Cons !(T_Pattern hd_) !(T_Patterns tl_) =+ (T_Patterns (\ (!_lhsIbelowIrrefutable)+ (!_lhsIisDeclOfLet)+ (!_lhsIoptions) ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 3376 "dist/build/PrintCode" #-}+ )) of+ { !_tlOoptions ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 3381 "dist/build/PrintCode" #-}+ )) of+ { !_tlOisDeclOfLet ->+ (case (({-# LINE 373 "src-ag/PrintCode.ag" #-}+ _lhsIbelowIrrefutable+ {-# LINE 3386 "dist/build/PrintCode" #-}+ )) of+ { !_tlObelowIrrefutable ->+ (case (tl_ _tlObelowIrrefutable _tlOisDeclOfLet _tlOoptions) of+ { ( !_tlIcopy,!_tlIpps,!_tlIpps',!_tlIstrictVars) ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 3393 "dist/build/PrintCode" #-}+ )) of+ { !_hdOoptions ->+ (case (({-# LINE 407 "src-ag/PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 3398 "dist/build/PrintCode" #-}+ )) of+ { !_hdOisDeclOfLet ->+ (case (({-# LINE 373 "src-ag/PrintCode.ag" #-}+ _lhsIbelowIrrefutable+ {-# LINE 3403 "dist/build/PrintCode" #-}+ )) of+ { !_hdObelowIrrefutable ->+ (case (hd_ _hdObelowIrrefutable _hdOisDeclOfLet _hdOoptions) of+ { ( !_hdIcopy,!_hdIisUnderscore,!_hdIpp,!_hdIpp',!_hdIstrictVars) ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 3410 "dist/build/PrintCode" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 3415 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 347 "src-ag/PrintCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 3420 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ (case (({-# LINE 387 "src-ag/PrintCode.ag" #-}+ _hdIpp' : _tlIpps'+ {-# LINE 3425 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps' ->+ (case (({-# LINE 326 "src-ag/PrintCode.ag" #-}+ _hdIstrictVars ++ _tlIstrictVars+ {-# LINE 3430 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOstrictVars ->+ ( _lhsOcopy,_lhsOpps,_lhsOpps',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) }) }) })))+sem_Patterns_Nil :: T_Patterns+sem_Patterns_Nil =+ (T_Patterns (\ (!_lhsIbelowIrrefutable)+ (!_lhsIisDeclOfLet)+ (!_lhsIoptions) ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ []+ {-# LINE 3441 "dist/build/PrintCode" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 3446 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 348 "src-ag/PrintCode.ag" #-}+ []+ {-# LINE 3451 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ (case (({-# LINE 388 "src-ag/PrintCode.ag" #-}+ []+ {-# LINE 3456 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps' ->+ (case (({-# LINE 326 "src-ag/PrintCode.ag" #-}+ []+ {-# LINE 3461 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOstrictVars ->+ ( _lhsOcopy,_lhsOpps,_lhsOpps',_lhsOstrictVars) }) }) }) }) })))+-- Program -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ importBlocks : PP_Doc+ mainBlocksDoc : PP_Doc+ mainFile : String+ mainName : String+ moduleHeader : String -> String -> String -> Bool -> String+ options : Options+ optionsLine : String+ pragmaBlocks : String+ textBlockMap : Map BlockInfo PP_Doc+ textBlocks : PP_Doc+ synthesized attributes:+ genIO : IO ()+ output : PP_Docs+ alternatives:+ alternative Program:+ child chunks : Chunks + child ordered : {Bool}+ visit 0:+ local options : _+ local commonFile : _+ local genCommonModule : _+ local mainModuleFile : _+ local genMainModule : _+-}+-- cata+sem_Program :: Program ->+ T_Program+sem_Program !(Program _chunks _ordered) =+ (sem_Program_Program (sem_Chunks _chunks) _ordered)+-- semantic domain+newtype T_Program = T_Program (PP_Doc ->+ PP_Doc ->+ String ->+ String ->+ (String -> String -> String -> Bool -> String) ->+ Options ->+ String ->+ String ->+ (Map BlockInfo PP_Doc) ->+ PP_Doc ->+ ( (IO ()),PP_Docs))+data Inh_Program = Inh_Program {importBlocks_Inh_Program :: !(PP_Doc),mainBlocksDoc_Inh_Program :: !(PP_Doc),mainFile_Inh_Program :: !(String),mainName_Inh_Program :: !(String),moduleHeader_Inh_Program :: !((String -> String -> String -> Bool -> String)),options_Inh_Program :: !(Options),optionsLine_Inh_Program :: !(String),pragmaBlocks_Inh_Program :: !(String),textBlockMap_Inh_Program :: !((Map BlockInfo PP_Doc)),textBlocks_Inh_Program :: !(PP_Doc)}+data Syn_Program = Syn_Program {genIO_Syn_Program :: !((IO ())),output_Syn_Program :: !(PP_Docs)}+wrap_Program :: T_Program ->+ Inh_Program ->+ Syn_Program+wrap_Program !(T_Program sem) !(Inh_Program _lhsIimportBlocks _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks) =+ (let ( !_lhsOgenIO,!_lhsOoutput) = sem _lhsIimportBlocks _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks+ in (Syn_Program _lhsOgenIO _lhsOoutput))+sem_Program_Program :: T_Chunks ->+ Bool ->+ T_Program+sem_Program_Program !(T_Chunks chunks_) !ordered_ =+ (T_Program (\ (!_lhsIimportBlocks)+ (!_lhsImainBlocksDoc)+ (!_lhsImainFile)+ (!_lhsImainName)+ (!_lhsImoduleHeader)+ (!_lhsIoptions)+ (!_lhsIoptionsLine)+ (!_lhsIpragmaBlocks)+ (!_lhsItextBlockMap)+ (!_lhsItextBlocks) ->+ (case (({-# LINE 435 "src-ag/PrintCode.ag" #-}+ _lhsItextBlockMap+ {-# LINE 3534 "dist/build/PrintCode" #-}+ )) of+ { !_chunksOtextBlockMap ->+ (case (({-# LINE 433 "src-ag/PrintCode.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 3539 "dist/build/PrintCode" #-}+ )) of+ { !_chunksOpragmaBlocks ->+ (case (({-# LINE 436 "src-ag/PrintCode.ag" #-}+ _lhsIoptionsLine+ {-# LINE 3544 "dist/build/PrintCode" #-}+ )) of+ { !_chunksOoptionsLine ->+ (case (({-# LINE 59 "src-ag/PrintCode.ag" #-}+ _lhsIoptions { breadthFirst = breadthFirst _lhsIoptions && visit _lhsIoptions && cases _lhsIoptions && ordered_ }+ {-# LINE 3549 "dist/build/PrintCode" #-}+ )) of+ { !_options ->+ (case (({-# LINE 50 "src-ag/PrintCode.ag" #-}+ _options+ {-# LINE 3554 "dist/build/PrintCode" #-}+ )) of+ { !_chunksOoptions ->+ (case (({-# LINE 439 "src-ag/PrintCode.ag" #-}+ _lhsImoduleHeader+ {-# LINE 3559 "dist/build/PrintCode" #-}+ )) of+ { !_chunksOmoduleHeader ->+ (case (({-# LINE 438 "src-ag/PrintCode.ag" #-}+ _lhsImainName+ {-# LINE 3564 "dist/build/PrintCode" #-}+ )) of+ { !_chunksOmainName ->+ (case (({-# LINE 437 "src-ag/PrintCode.ag" #-}+ _lhsImainFile+ {-# LINE 3569 "dist/build/PrintCode" #-}+ )) of+ { !_chunksOmainFile ->+ (case (({-# LINE 457 "src-ag/PrintCode.ag" #-}+ replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ "_common")+ {-# LINE 3574 "dist/build/PrintCode" #-}+ )) of+ { !_commonFile ->+ (case (({-# LINE 410 "src-ag/PrintCode.ag" #-}+ False+ {-# LINE 3579 "dist/build/PrintCode" #-}+ )) of+ { !_chunksOisDeclOfLet ->+ (case (({-# LINE 62 "src-ag/PrintCode.ag" #-}+ nest _lhsIoptions+ {-# LINE 3584 "dist/build/PrintCode" #-}+ )) of+ { !_chunksOnested ->+ (case (({-# LINE 434 "src-ag/PrintCode.ag" #-}+ _lhsItextBlocks+ {-# LINE 3589 "dist/build/PrintCode" #-}+ )) of+ { !_chunksOtextBlocks ->+ (case (({-# LINE 432 "src-ag/PrintCode.ag" #-}+ _lhsIimportBlocks+ {-# LINE 3594 "dist/build/PrintCode" #-}+ )) of+ { !_chunksOimportBlocks ->+ (case (chunks_ _chunksOimportBlocks _chunksOisDeclOfLet _chunksOmainFile _chunksOmainName _chunksOmoduleHeader _chunksOnested _chunksOoptions _chunksOoptionsLine _chunksOpragmaBlocks _chunksOtextBlockMap _chunksOtextBlocks) of+ { ( !_chunksIappendCommon,!_chunksIappendMain,!_chunksIgenSems,!_chunksIimports,!_chunksIpps) ->+ (case (({-# LINE 458 "src-ag/PrintCode.ag" #-}+ writeModule _commonFile+ ( [ pp $ _lhsIpragmaBlocks+ , pp $ _lhsIoptionsLine+ , pp $ _lhsImoduleHeader _lhsImainName "_common" "" True+ , _lhsIimportBlocks+ , _lhsItextBlocks+ ]+ ++ map vlist _chunksIappendCommon+ )+ {-# LINE 3609 "dist/build/PrintCode" #-}+ )) of+ { !_genCommonModule ->+ (case (({-# LINE 444 "src-ag/PrintCode.ag" #-}+ _lhsImainFile+ {-# LINE 3614 "dist/build/PrintCode" #-}+ )) of+ { !_mainModuleFile ->+ (case (({-# LINE 445 "src-ag/PrintCode.ag" #-}+ writeModule _mainModuleFile+ ( [ pp $ _lhsIpragmaBlocks+ , pp $ _lhsIoptionsLine+ , pp $ _lhsImoduleHeader _lhsImainName "" "" False+ , pp $ ("import " ++ _lhsImainName ++ "_common\n")+ ]+ ++ map pp _chunksIimports+ ++ map vlist _chunksIappendMain+ ++ [_lhsImainBlocksDoc]+ )+ {-# LINE 3628 "dist/build/PrintCode" #-}+ )) of+ { !_genMainModule ->+ (case (({-# LINE 469 "src-ag/PrintCode.ag" #-}+ do _genMainModule+ _genCommonModule+ _chunksIgenSems+ {-# LINE 3635 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOgenIO ->+ (case (({-# LINE 94 "src-ag/PrintCode.ag" #-}+ _chunksIpps+ {-# LINE 3640 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOgenIO,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+-- Type --------------------------------------------------------+{-+ visit 0:+ inherited attribute:+ nested : Bool+ synthesized attributes:+ pp : PP_Doc+ prec : Int+ alternatives:+ alternative Arr:+ child left : Type + child right : Type + visit 0:+ local r : _+ local l : _+ alternative CtxApp:+ child left : {[(String, [String])]}+ child right : Type + alternative List:+ child tp : Type + alternative NontermType:+ child name : {String}+ child params : {[String]}+ child deforested : {Bool}+ visit 0:+ local prefix : _+ alternative QuantApp:+ child left : {String}+ child right : Type + alternative SimpleType:+ child txt : {String}+ alternative TEither:+ child left : Type + child right : Type + alternative TIntMap:+ child value : Type + alternative TMap:+ child key : Type + child value : Type + alternative TMaybe:+ child tp : Type + alternative TupleType:+ child tps : Types + alternative TypeApp:+ child func : Type + child args : Types + alternative UnboxedTupleType:+ child tps : Types +-}+-- cata+sem_Type :: Type ->+ T_Type+sem_Type !(Arr _left _right) =+ (sem_Type_Arr (sem_Type _left) (sem_Type _right))+sem_Type !(CtxApp _left _right) =+ (sem_Type_CtxApp _left (sem_Type _right))+sem_Type !(List _tp) =+ (sem_Type_List (sem_Type _tp))+sem_Type !(NontermType _name _params _deforested) =+ (sem_Type_NontermType _name _params _deforested)+sem_Type !(QuantApp _left _right) =+ (sem_Type_QuantApp _left (sem_Type _right))+sem_Type !(SimpleType _txt) =+ (sem_Type_SimpleType _txt)+sem_Type !(TEither _left _right) =+ (sem_Type_TEither (sem_Type _left) (sem_Type _right))+sem_Type !(TIntMap _value) =+ (sem_Type_TIntMap (sem_Type _value))+sem_Type !(TMap _key _value) =+ (sem_Type_TMap (sem_Type _key) (sem_Type _value))+sem_Type !(TMaybe _tp) =+ (sem_Type_TMaybe (sem_Type _tp))+sem_Type !(TupleType _tps) =+ (sem_Type_TupleType (sem_Types _tps))+sem_Type !(TypeApp _func _args) =+ (sem_Type_TypeApp (sem_Type _func) (sem_Types _args))+sem_Type !(UnboxedTupleType _tps) =+ (sem_Type_UnboxedTupleType (sem_Types _tps))+-- semantic domain+newtype T_Type = T_Type (Bool ->+ ( PP_Doc,Int))+data Inh_Type = Inh_Type {nested_Inh_Type :: !(Bool)}+data Syn_Type = Syn_Type {pp_Syn_Type :: !(PP_Doc),prec_Syn_Type :: !(Int)}+wrap_Type :: T_Type ->+ Inh_Type ->+ Syn_Type+wrap_Type !(T_Type sem) !(Inh_Type _lhsInested) =+ (let ( !_lhsOpp,!_lhsOprec) = sem _lhsInested+ in (Syn_Type _lhsOpp _lhsOprec))+sem_Type_Arr :: T_Type ->+ T_Type ->+ T_Type+sem_Type_Arr !(T_Type left_) !(T_Type right_) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3740 "dist/build/PrintCode" #-}+ )) of+ { !_rightOnested ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3745 "dist/build/PrintCode" #-}+ )) of+ { !_leftOnested ->+ (case (right_ _rightOnested) of+ { ( !_rightIpp,!_rightIprec) ->+ (case (({-# LINE 263 "src-ag/PrintCode.ag" #-}+ if _rightIprec < 2 then pp_parens _rightIpp else _rightIpp+ {-# LINE 3752 "dist/build/PrintCode" #-}+ )) of+ { !_r ->+ (case (left_ _leftOnested) of+ { ( !_leftIpp,!_leftIprec) ->+ (case (({-# LINE 262 "src-ag/PrintCode.ag" #-}+ if _leftIprec <= 2 then pp_parens _leftIpp else _leftIpp+ {-# LINE 3759 "dist/build/PrintCode" #-}+ )) of+ { !_l ->+ (case (({-# LINE 261 "src-ag/PrintCode.ag" #-}+ _l >#< "->" >-< _r+ {-# LINE 3764 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 260 "src-ag/PrintCode.ag" #-}+ 2+ {-# LINE 3769 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) }) }) }) }) })))+sem_Type_CtxApp :: ([(String, [String])]) ->+ T_Type ->+ T_Type+sem_Type_CtxApp !left_ !(T_Type right_) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3780 "dist/build/PrintCode" #-}+ )) of+ { !_rightOnested ->+ (case (right_ _rightOnested) of+ { ( !_rightIpp,!_rightIprec) ->+ (case (({-# LINE 269 "src-ag/PrintCode.ag" #-}+ (pp_block "(" ")" "," $ map (\(n,ns) -> hv_sp $ map pp (n:ns)) left_) >#< "=>" >#< _rightIpp+ {-# LINE 3787 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 259 "src-ag/PrintCode.ag" #-}+ _rightIprec+ {-# LINE 3792 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) })))+sem_Type_List :: T_Type ->+ T_Type+sem_Type_List !(T_Type tp_) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3802 "dist/build/PrintCode" #-}+ )) of+ { !_tpOnested ->+ (case (tp_ _tpOnested) of+ { ( !_tpIpp,!_tpIprec) ->+ (case (({-# LINE 280 "src-ag/PrintCode.ag" #-}+ "[" >|< _tpIpp >|< "]"+ {-# LINE 3809 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 279 "src-ag/PrintCode.ag" #-}+ 5+ {-# LINE 3814 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) })))+sem_Type_NontermType :: String ->+ ([String]) ->+ Bool ->+ T_Type+sem_Type_NontermType !name_ !params_ !deforested_ =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 287 "src-ag/PrintCode.ag" #-}+ if deforested_+ then text "T_"+ else empty+ {-# LINE 3828 "dist/build/PrintCode" #-}+ )) of+ { !_prefix ->+ (case (({-# LINE 286 "src-ag/PrintCode.ag" #-}+ _prefix >|< text name_ >#< hv_sp params_+ {-# LINE 3833 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 285 "src-ag/PrintCode.ag" #-}+ 5+ {-# LINE 3838 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) })))+sem_Type_QuantApp :: String ->+ T_Type ->+ T_Type+sem_Type_QuantApp !left_ !(T_Type right_) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3849 "dist/build/PrintCode" #-}+ )) of+ { !_rightOnested ->+ (case (right_ _rightOnested) of+ { ( !_rightIpp,!_rightIprec) ->+ (case (({-# LINE 271 "src-ag/PrintCode.ag" #-}+ left_ >#< _rightIpp+ {-# LINE 3856 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 259 "src-ag/PrintCode.ag" #-}+ _rightIprec+ {-# LINE 3861 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) })))+sem_Type_SimpleType :: String ->+ T_Type+sem_Type_SimpleType !txt_ =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 283 "src-ag/PrintCode.ag" #-}+ if reallySimple txt_ then text txt_ else pp_parens (text txt_)+ {-# LINE 3871 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 282 "src-ag/PrintCode.ag" #-}+ 5+ {-# LINE 3876 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) })))+sem_Type_TEither :: T_Type ->+ T_Type ->+ T_Type+sem_Type_TEither !(T_Type left_) !(T_Type right_) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3887 "dist/build/PrintCode" #-}+ )) of+ { !_rightOnested ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3892 "dist/build/PrintCode" #-}+ )) of+ { !_leftOnested ->+ (case (right_ _rightOnested) of+ { ( !_rightIpp,!_rightIprec) ->+ (case (left_ _leftOnested) of+ { ( !_leftIpp,!_leftIprec) ->+ (case (({-# LINE 293 "src-ag/PrintCode.ag" #-}+ text "Either" >#< pp_parens _leftIpp >#< pp_parens _rightIpp+ {-# LINE 3901 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 292 "src-ag/PrintCode.ag" #-}+ 5+ {-# LINE 3906 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) }) }) })))+sem_Type_TIntMap :: T_Type ->+ T_Type+sem_Type_TIntMap !(T_Type value_) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3916 "dist/build/PrintCode" #-}+ )) of+ { !_valueOnested ->+ (case (value_ _valueOnested) of+ { ( !_valueIpp,!_valueIprec) ->+ (case (({-# LINE 297 "src-ag/PrintCode.ag" #-}+ text "Data.IntMap.IntMap" >#< pp_parens _valueIpp+ {-# LINE 3923 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 296 "src-ag/PrintCode.ag" #-}+ 5+ {-# LINE 3928 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) })))+sem_Type_TMap :: T_Type ->+ T_Type ->+ T_Type+sem_Type_TMap !(T_Type key_) !(T_Type value_) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3939 "dist/build/PrintCode" #-}+ )) of+ { !_valueOnested ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3944 "dist/build/PrintCode" #-}+ )) of+ { !_keyOnested ->+ (case (value_ _valueOnested) of+ { ( !_valueIpp,!_valueIprec) ->+ (case (key_ _keyOnested) of+ { ( !_keyIpp,!_keyIprec) ->+ (case (({-# LINE 295 "src-ag/PrintCode.ag" #-}+ text "Data.Map.Map" >#< pp_parens _keyIpp >#< pp_parens _valueIpp+ {-# LINE 3953 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 294 "src-ag/PrintCode.ag" #-}+ 5+ {-# LINE 3958 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) }) }) })))+sem_Type_TMaybe :: T_Type ->+ T_Type+sem_Type_TMaybe !(T_Type tp_) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3968 "dist/build/PrintCode" #-}+ )) of+ { !_tpOnested ->+ (case (tp_ _tpOnested) of+ { ( !_tpIpp,!_tpIprec) ->+ (case (({-# LINE 291 "src-ag/PrintCode.ag" #-}+ text "Maybe" >#< _tpIpp+ {-# LINE 3975 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 290 "src-ag/PrintCode.ag" #-}+ 5+ {-# LINE 3980 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) })))+sem_Type_TupleType :: T_Types ->+ T_Type+sem_Type_TupleType !(T_Types tps_) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3990 "dist/build/PrintCode" #-}+ )) of+ { !_tpsOnested ->+ (case (tps_ _tpsOnested) of+ { ( !_tpsIpps) ->+ (case (({-# LINE 274 "src-ag/PrintCode.ag" #-}+ ppTuple _lhsInested _tpsIpps+ {-# LINE 3997 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 273 "src-ag/PrintCode.ag" #-}+ 5+ {-# LINE 4002 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) })))+sem_Type_TypeApp :: T_Type ->+ T_Types ->+ T_Type+sem_Type_TypeApp !(T_Type func_) !(T_Types args_) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 4013 "dist/build/PrintCode" #-}+ )) of+ { !_argsOnested ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 4018 "dist/build/PrintCode" #-}+ )) of+ { !_funcOnested ->+ (case (args_ _argsOnested) of+ { ( !_argsIpps) ->+ (case (func_ _funcOnested) of+ { ( !_funcIpp,!_funcIprec) ->+ (case (({-# LINE 266 "src-ag/PrintCode.ag" #-}+ hv_sp (_funcIpp : _argsIpps)+ {-# LINE 4027 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 259 "src-ag/PrintCode.ag" #-}+ _funcIprec+ {-# LINE 4032 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) }) }) })))+sem_Type_UnboxedTupleType :: T_Types ->+ T_Type+sem_Type_UnboxedTupleType !(T_Types tps_) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 4042 "dist/build/PrintCode" #-}+ )) of+ { !_tpsOnested ->+ (case (tps_ _tpsOnested) of+ { ( !_tpsIpps) ->+ (case (({-# LINE 277 "src-ag/PrintCode.ag" #-}+ ppUnboxedTuple _lhsInested _tpsIpps+ {-# LINE 4049 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpp ->+ (case (({-# LINE 276 "src-ag/PrintCode.ag" #-}+ 5+ {-# LINE 4054 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) })))+-- Types -------------------------------------------------------+{-+ visit 0:+ inherited attribute:+ nested : Bool+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Type + child tl : Types + alternative Nil:+-}+-- cata+sem_Types :: Types ->+ T_Types+sem_Types !list =+ (Prelude.foldr sem_Types_Cons sem_Types_Nil (Prelude.map sem_Type list))+-- semantic domain+newtype T_Types = T_Types (Bool ->+ ( PP_Docs))+data Inh_Types = Inh_Types {nested_Inh_Types :: !(Bool)}+data Syn_Types = Syn_Types {pps_Syn_Types :: !(PP_Docs)}+wrap_Types :: T_Types ->+ Inh_Types ->+ Syn_Types+wrap_Types !(T_Types sem) !(Inh_Types _lhsInested) =+ (let ( !_lhsOpps) = sem _lhsInested+ in (Syn_Types _lhsOpps))+sem_Types_Cons :: T_Type ->+ T_Types ->+ T_Types+sem_Types_Cons !(T_Type hd_) !(T_Types tl_) =+ (T_Types (\ (!_lhsInested) ->+ (case (({-# LINE 54 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 4094 "dist/build/PrintCode" #-}+ )) of+ { !_tlOnested ->+ (case (({-# LINE 52 "src-ag/PrintCode.ag" #-}+ _lhsInested+ {-# LINE 4099 "dist/build/PrintCode" #-}+ )) of+ { !_hdOnested ->+ (case (tl_ _tlOnested) of+ { ( !_tlIpps) ->+ (case (hd_ _hdOnested) of+ { ( !_hdIpp,!_hdIprec) ->+ (case (({-# LINE 77 "src-ag/PrintCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 4108 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) })))+sem_Types_Nil :: T_Types+sem_Types_Nil =+ (T_Types (\ (!_lhsInested) ->+ (case (({-# LINE 78 "src-ag/PrintCode.ag" #-}+ []+ {-# LINE 4117 "dist/build/PrintCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) })))
src-derived/PrintErrorMessages.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.39.1.0 (src-ag/PrintErrorMessages.ag)+-- UUAGC 0.9.40.1 (src-ag/PrintErrorMessages.ag) module PrintErrorMessages where {-# LINE 4 "src-ag/PrintErrorMessages.ag" #-} @@ -11,7 +11,7 @@ import Data.List(mapAccumL,intersect,(\\)) import GrammarInfo import qualified Control.Monad.Error.Class as Err-{-# LINE 15 "dist/build/uuagc/uuagc-tmp/PrintErrorMessages.hs" #-}+{-# LINE 15 "dist/build/PrintErrorMessages.hs" #-} {-# LINE 2 "src-ag/ErrorMessages.ag" #-} @@ -19,13 +19,13 @@ import Pretty import CodeSyntax import CommonTypes-{-# LINE 23 "dist/build/uuagc/uuagc-tmp/PrintErrorMessages.hs" #-}+{-# LINE 23 "dist/build/PrintErrorMessages.hs" #-} {-# LINE 15 "src-ag/PrintErrorMessages.ag" #-} instance Err.Error Error where noMsg = Err.strMsg "error" strMsg = CustomError False noPos . pp-{-# LINE 29 "dist/build/uuagc/uuagc-tmp/PrintErrorMessages.hs" #-}+{-# LINE 29 "dist/build/PrintErrorMessages.hs" #-} {-# LINE 22 "src-ag/PrintErrorMessages.ag" #-} @@ -69,7 +69,7 @@ cycleIsDangerous :: Options -> Bool cycleIsDangerous opts = any ($ opts) [ wignore, bangpats, cases, strictCases, stricterCases, strictSems, withCycle ]-{-# LINE 73 "dist/build/uuagc/uuagc-tmp/PrintErrorMessages.hs" #-}+{-# LINE 73 "dist/build/PrintErrorMessages.hs" #-} {-# LINE 550 "src-ag/PrintErrorMessages.ag" #-} @@ -107,7 +107,7 @@ ppAttr f a = text (getName f++"."++getName a) ppAttrUse f a = "@" >|< ppAttr f a-{-# LINE 111 "dist/build/uuagc/uuagc-tmp/PrintErrorMessages.hs" #-}+{-# LINE 111 "dist/build/PrintErrorMessages.hs" #-} {-# LINE 588 "src-ag/PrintErrorMessages.ag" #-} @@ -168,7 +168,7 @@ ppInterface inter = wfill ["interface:", show inter] -{-# LINE 172 "dist/build/uuagc/uuagc-tmp/PrintErrorMessages.hs" #-}+{-# LINE 172 "dist/build/PrintErrorMessages.hs" #-} -- Error ------------------------------------------------------- {- visit 0:@@ -176,7 +176,7 @@ options : Options verbose : Bool synthesized attributes:- me : SELF + me : Error pp : PP_Doc alternatives: alternative ChildAsLocal:@@ -391,99 +391,99 @@ local me : _ -} -- cata-sem_Error :: Error ->- T_Error -sem_Error (ChildAsLocal _nt _con _var ) =- (sem_Error_ChildAsLocal _nt _con _var )-sem_Error (CustomError _isWarning _pos _mesg ) =- (sem_Error_CustomError _isWarning _pos _mesg )-sem_Error (Cyclic _nt _mbCon _verts ) =- (sem_Error_Cyclic _nt _mbCon _verts )-sem_Error (CyclicSet _name ) =- (sem_Error_CyclicSet _name )-sem_Error (DirectCirc _nt _o_visit _cyclic ) =- (sem_Error_DirectCirc _nt _o_visit _cyclic )-sem_Error (DupAlt _nt _con _occ1 ) =- (sem_Error_DupAlt _nt _con _occ1 )-sem_Error (DupChild _nt _con _name _occ1 ) =- (sem_Error_DupChild _nt _con _name _occ1 )-sem_Error (DupInhAttr _nt _attr _occ1 ) =- (sem_Error_DupInhAttr _nt _attr _occ1 )-sem_Error (DupRule _nt _con _field _attr _occ1 ) =- (sem_Error_DupRule _nt _con _field _attr _occ1 )-sem_Error (DupRuleName _nt _con _nm ) =- (sem_Error_DupRuleName _nt _con _nm )-sem_Error (DupSet _name _occ1 ) =- (sem_Error_DupSet _name _occ1 )-sem_Error (DupSig _nt _con _attr ) =- (sem_Error_DupSig _nt _con _attr )-sem_Error (DupSynAttr _nt _attr _occ1 ) =- (sem_Error_DupSynAttr _nt _attr _occ1 )-sem_Error (DupSynonym _nt _occ1 ) =- (sem_Error_DupSynonym _nt _occ1 )-sem_Error (DupUnique _nt _con _attr ) =- (sem_Error_DupUnique _nt _con _attr )-sem_Error (HsParseError _pos _msg ) =- (sem_Error_HsParseError _pos _msg )-sem_Error (IncompatibleAttachKind _child _kind ) =- (sem_Error_IncompatibleAttachKind _child _kind )-sem_Error (IncompatibleRuleKind _rule _kind ) =- (sem_Error_IncompatibleRuleKind _rule _kind )-sem_Error (IncompatibleVisitKind _child _vis _from _to ) =- (sem_Error_IncompatibleVisitKind _child _vis _from _to )-sem_Error (InducedCirc _nt _cinter _cyclic ) =- (sem_Error_InducedCirc _nt _cinter _cyclic )-sem_Error (InstCirc _nt _con _attr _o_visit _path ) =- (sem_Error_InstCirc _nt _con _attr _o_visit _path )-sem_Error (LocalCirc _nt _con _attr _o_visit _path ) =- (sem_Error_LocalCirc _nt _con _attr _o_visit _path )-sem_Error (MissingInstSig _nt _con _attr ) =- (sem_Error_MissingInstSig _nt _con _attr )-sem_Error (MissingNamedRule _nt _con _name ) =- (sem_Error_MissingNamedRule _nt _con _name )-sem_Error (MissingRule _nt _con _field _attr ) =- (sem_Error_MissingRule _nt _con _field _attr )-sem_Error (MissingSyn _nt _attr ) =- (sem_Error_MissingSyn _nt _attr )-sem_Error (MissingTypeSig _nt _con _attr ) =- (sem_Error_MissingTypeSig _nt _con _attr )-sem_Error (MissingUnique _nt _attr ) =- (sem_Error_MissingUnique _nt _attr )-sem_Error (ParserError _pos _problem _action ) =- (sem_Error_ParserError _pos _problem _action )-sem_Error (SuperfluousRule _nt _con _field _attr ) =- (sem_Error_SuperfluousRule _nt _con _field _attr )-sem_Error (UndefAlt _nt _con ) =- (sem_Error_UndefAlt _nt _con )-sem_Error (UndefAttr _nt _con _field _attr _isOut ) =- (sem_Error_UndefAttr _nt _con _field _attr _isOut )-sem_Error (UndefChild _nt _con _name ) =- (sem_Error_UndefChild _nt _con _name )-sem_Error (UndefLocal _nt _con _var ) =- (sem_Error_UndefLocal _nt _con _var )-sem_Error (UndefNont _nt ) =- (sem_Error_UndefNont _nt )+sem_Error :: Error ->+ T_Error+sem_Error (ChildAsLocal _nt _con _var) =+ (sem_Error_ChildAsLocal _nt _con _var)+sem_Error (CustomError _isWarning _pos _mesg) =+ (sem_Error_CustomError _isWarning _pos _mesg)+sem_Error (Cyclic _nt _mbCon _verts) =+ (sem_Error_Cyclic _nt _mbCon _verts)+sem_Error (CyclicSet _name) =+ (sem_Error_CyclicSet _name)+sem_Error (DirectCirc _nt _o_visit _cyclic) =+ (sem_Error_DirectCirc _nt _o_visit _cyclic)+sem_Error (DupAlt _nt _con _occ1) =+ (sem_Error_DupAlt _nt _con _occ1)+sem_Error (DupChild _nt _con _name _occ1) =+ (sem_Error_DupChild _nt _con _name _occ1)+sem_Error (DupInhAttr _nt _attr _occ1) =+ (sem_Error_DupInhAttr _nt _attr _occ1)+sem_Error (DupRule _nt _con _field _attr _occ1) =+ (sem_Error_DupRule _nt _con _field _attr _occ1)+sem_Error (DupRuleName _nt _con _nm) =+ (sem_Error_DupRuleName _nt _con _nm)+sem_Error (DupSet _name _occ1) =+ (sem_Error_DupSet _name _occ1)+sem_Error (DupSig _nt _con _attr) =+ (sem_Error_DupSig _nt _con _attr)+sem_Error (DupSynAttr _nt _attr _occ1) =+ (sem_Error_DupSynAttr _nt _attr _occ1)+sem_Error (DupSynonym _nt _occ1) =+ (sem_Error_DupSynonym _nt _occ1)+sem_Error (DupUnique _nt _con _attr) =+ (sem_Error_DupUnique _nt _con _attr)+sem_Error (HsParseError _pos _msg) =+ (sem_Error_HsParseError _pos _msg)+sem_Error (IncompatibleAttachKind _child _kind) =+ (sem_Error_IncompatibleAttachKind _child _kind)+sem_Error (IncompatibleRuleKind _rule _kind) =+ (sem_Error_IncompatibleRuleKind _rule _kind)+sem_Error (IncompatibleVisitKind _child _vis _from _to) =+ (sem_Error_IncompatibleVisitKind _child _vis _from _to)+sem_Error (InducedCirc _nt _cinter _cyclic) =+ (sem_Error_InducedCirc _nt _cinter _cyclic)+sem_Error (InstCirc _nt _con _attr _o_visit _path) =+ (sem_Error_InstCirc _nt _con _attr _o_visit _path)+sem_Error (LocalCirc _nt _con _attr _o_visit _path) =+ (sem_Error_LocalCirc _nt _con _attr _o_visit _path)+sem_Error (MissingInstSig _nt _con _attr) =+ (sem_Error_MissingInstSig _nt _con _attr)+sem_Error (MissingNamedRule _nt _con _name) =+ (sem_Error_MissingNamedRule _nt _con _name)+sem_Error (MissingRule _nt _con _field _attr) =+ (sem_Error_MissingRule _nt _con _field _attr)+sem_Error (MissingSyn _nt _attr) =+ (sem_Error_MissingSyn _nt _attr)+sem_Error (MissingTypeSig _nt _con _attr) =+ (sem_Error_MissingTypeSig _nt _con _attr)+sem_Error (MissingUnique _nt _attr) =+ (sem_Error_MissingUnique _nt _attr)+sem_Error (ParserError _pos _problem _action) =+ (sem_Error_ParserError _pos _problem _action)+sem_Error (SuperfluousRule _nt _con _field _attr) =+ (sem_Error_SuperfluousRule _nt _con _field _attr)+sem_Error (UndefAlt _nt _con) =+ (sem_Error_UndefAlt _nt _con)+sem_Error (UndefAttr _nt _con _field _attr _isOut) =+ (sem_Error_UndefAttr _nt _con _field _attr _isOut)+sem_Error (UndefChild _nt _con _name) =+ (sem_Error_UndefChild _nt _con _name)+sem_Error (UndefLocal _nt _con _var) =+ (sem_Error_UndefLocal _nt _con _var)+sem_Error (UndefNont _nt) =+ (sem_Error_UndefNont _nt) -- semantic domain-newtype T_Error = T_Error (Options ->- Bool ->- ( 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}-wrap_Error :: T_Error ->- Inh_Error ->- Syn_Error -wrap_Error (T_Error sem ) (Inh_Error _lhsIoptions _lhsIverbose ) =- (let ( _lhsOme,_lhsOpp) = sem _lhsIoptions _lhsIverbose - in (Syn_Error _lhsOme _lhsOpp ))+newtype T_Error = T_Error (Options ->+ Bool ->+ ( 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}+wrap_Error :: T_Error ->+ Inh_Error ->+ Syn_Error+wrap_Error (T_Error sem) (Inh_Error _lhsIoptions _lhsIverbose) =+ (let ( _lhsOme,_lhsOpp) = sem _lhsIoptions _lhsIverbose+ in (Syn_Error _lhsOme _lhsOpp)) sem_Error_ChildAsLocal :: NontermIdent -> ConstructorIdent -> Identifier ->- T_Error -sem_Error_ChildAsLocal nt_ con_ var_ =+ T_Error+sem_Error_ChildAsLocal nt_ con_ var_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 351, column 21) _lhsOpp = ({-# LINE 351 "src-ag/PrintErrorMessages.ag" #-}@@ -499,30 +499,30 @@ ] act = wfill ["The generated program probably contains a type error or has undefined variables."] in ppError (isError _lhsIoptions _me) (getPos var_) mesg pat help act _lhsIverbose- {-# LINE 503 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 503 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} ChildAsLocal nt_ con_ var_- {-# LINE 509 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 509 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 515 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 515 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_CustomError :: Bool -> Pos -> PP_Doc ->- T_Error -sem_Error_CustomError isWarning_ pos_ mesg_ =+ T_Error+sem_Error_CustomError isWarning_ pos_ mesg_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 408, column 21) _lhsOpp = ({-# LINE 408 "src-ag/PrintErrorMessages.ag" #-}@@ -530,30 +530,30 @@ help = wfill ["not available."] act = wfill ["unknown"] in ppError (isError _lhsIoptions _me) pos_ mesg_ pat help act False- {-# LINE 534 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 534 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} CustomError isWarning_ pos_ mesg_- {-# LINE 540 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 540 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 546 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 546 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_Cyclic :: NontermIdent -> (Maybe ConstructorIdent) -> ([String]) ->- T_Error -sem_Error_Cyclic nt_ mbCon_ verts_ =+ T_Error+sem_Error_Cyclic nt_ mbCon_ verts_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 393, column 21) _lhsOpp = ({-# LINE 393 "src-ag/PrintErrorMessages.ag" #-}@@ -571,28 +571,28 @@ help = hlist (text "The following attributes are all cyclic: " : map text verts_) act = wfill ["code cannot be generated until the cycle is removed."] in ppError (isError _lhsIoptions _me) pos mesg pat help act False- {-# LINE 575 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 575 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} Cyclic nt_ mbCon_ verts_- {-# LINE 581 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 581 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 587 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 587 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_CyclicSet :: Identifier ->- T_Error -sem_Error_CyclicSet name_ =+ T_Error+sem_Error_CyclicSet name_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 384, column 21) _lhsOpp = ({-# LINE 384 "src-ag/PrintErrorMessages.ag" #-}@@ -604,30 +604,30 @@ ] act = wfill ["The nonterminal set", getName name_, "is considered to be empty."] in ppError (isError _lhsIoptions _me) (getPos name_) mesg pat help act _lhsIverbose- {-# LINE 608 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 608 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} CyclicSet name_- {-# LINE 614 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 614 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 620 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 620 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_DirectCirc :: NontermIdent -> Bool -> ([((Identifier,Identifier),[String],[String])]) ->- T_Error -sem_Error_DirectCirc nt_ o_visit_ cyclic_ =+ T_Error+sem_Error_DirectCirc nt_ o_visit_ cyclic_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 437, column 21) _lhsOpp = ({-# LINE 437 "src-ag/PrintErrorMessages.ag" #-}@@ -638,30 +638,30 @@ act | o_visit_ = text "An unoptimized version was generated. It might hang when run." | otherwise = text "The generated program might hang when run." in ppError (isError _lhsIoptions _me) noPos mesg pat help act _lhsIverbose- {-# LINE 642 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 642 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} DirectCirc nt_ o_visit_ cyclic_- {-# LINE 648 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 648 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 654 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 654 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_DupAlt :: NontermIdent -> ConstructorIdent -> ConstructorIdent ->- T_Error -sem_Error_DupAlt nt_ con_ occ1_ =+ T_Error+sem_Error_DupAlt nt_ con_ occ1_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 97, column 21) _lhsOpp = ({-# LINE 97 "src-ag/PrintErrorMessages.ag" #-}@@ -683,31 +683,31 @@ ,"is considered valid. All other alternatives have been discarded." ] in ppError (isError _lhsIoptions _me) (getPos con_) mesg pat help act _lhsIverbose- {-# LINE 687 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 687 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} DupAlt nt_ con_ occ1_- {-# LINE 693 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 693 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 699 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 699 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_DupChild :: NontermIdent -> ConstructorIdent -> Identifier -> Identifier ->- T_Error -sem_Error_DupChild nt_ con_ name_ occ1_ =+ T_Error+sem_Error_DupChild nt_ con_ name_ occ1_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 190, column 21) _lhsOpp = ({-# LINE 190 "src-ag/PrintErrorMessages.ag" #-}@@ -728,30 +728,30 @@ ,"All others have been discarded." ] in ppError (isError _lhsIoptions _me) (getPos name_) mesg pat help act _lhsIverbose- {-# LINE 732 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 732 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} DupChild nt_ con_ name_ occ1_- {-# LINE 738 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 738 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 744 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 744 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_DupInhAttr :: NontermIdent -> Identifier -> Identifier ->- T_Error -sem_Error_DupInhAttr nt_ attr_ occ1_ =+ T_Error+sem_Error_DupInhAttr nt_ attr_ occ1_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 152, column 21) _lhsOpp = ({-# LINE 152 "src-ag/PrintErrorMessages.ag" #-}@@ -771,32 +771,32 @@ ,"All others have been discarded. The generated program will probably not run." ] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 775 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 775 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} DupInhAttr nt_ attr_ occ1_- {-# LINE 781 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 781 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 787 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 787 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_DupRule :: NontermIdent -> ConstructorIdent -> Identifier -> Identifier -> Identifier ->- T_Error -sem_Error_DupRule nt_ con_ field_ attr_ occ1_ =+ T_Error+sem_Error_DupRule nt_ con_ field_ attr_ occ1_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 210, column 21) _lhsOpp = ({-# LINE 210 "src-ag/PrintErrorMessages.ag" #-}@@ -815,30 +815,30 @@ ] act = wfill ["The last rule given is considered valid. All others have been discarded."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 819 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 819 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} DupRule nt_ con_ field_ attr_ occ1_- {-# LINE 825 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 825 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 831 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 831 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_DupRuleName :: NontermIdent -> ConstructorIdent -> Identifier ->- T_Error -sem_Error_DupRuleName nt_ con_ nm_ =+ T_Error+sem_Error_DupRuleName nt_ con_ nm_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 228, column 21) _lhsOpp = ({-# LINE 228 "src-ag/PrintErrorMessages.ag" #-}@@ -854,29 +854,29 @@ ] act = wfill ["Compilation cannot continue."] in ppError (isError _lhsIoptions _me) (getPos nm_) mesg pat help act _lhsIverbose- {-# LINE 858 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 858 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} DupRuleName nt_ con_ nm_- {-# LINE 864 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 864 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 870 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 870 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_DupSet :: NontermIdent -> NontermIdent ->- T_Error -sem_Error_DupSet name_ occ1_ =+ T_Error+sem_Error_DupSet name_ occ1_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 136, column 21) _lhsOpp = ({-# LINE 136 "src-ag/PrintErrorMessages.ag" #-}@@ -895,30 +895,30 @@ act = wfill [ "The clashing nonterminal set will be ignored." ] in ppError (isError _lhsIoptions _me) (getPos name_) mesg pat help act _lhsIverbose- {-# LINE 899 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 899 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} DupSet name_ occ1_- {-# LINE 905 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 905 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 911 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 911 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_DupSig :: NontermIdent -> ConstructorIdent -> Identifier ->- T_Error -sem_Error_DupSig nt_ con_ attr_ =+ T_Error+sem_Error_DupSig nt_ con_ attr_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 243, column 21) _lhsOpp = ({-# LINE 243 "src-ag/PrintErrorMessages.ag" #-}@@ -936,30 +936,30 @@ ] act = wfill ["The last typesignature given is considered valid. All others have been discarded."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 940 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 940 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} DupSig nt_ con_ attr_- {-# LINE 946 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 946 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 952 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 952 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_DupSynAttr :: NontermIdent -> Identifier -> Identifier ->- T_Error -sem_Error_DupSynAttr nt_ attr_ occ1_ =+ T_Error+sem_Error_DupSynAttr nt_ attr_ occ1_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 171, column 21) _lhsOpp = ({-# LINE 171 "src-ag/PrintErrorMessages.ag" #-}@@ -979,29 +979,29 @@ ,"All others have been discarded. The generated program will probably not run." ] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 983 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 983 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} DupSynAttr nt_ attr_ occ1_- {-# LINE 989 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 989 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 995 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 995 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_DupSynonym :: NontermIdent -> NontermIdent ->- T_Error -sem_Error_DupSynonym nt_ occ1_ =+ T_Error+sem_Error_DupSynonym nt_ occ1_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 119, column 21) _lhsOpp = ({-# LINE 119 "src-ag/PrintErrorMessages.ag" #-}@@ -1021,30 +1021,30 @@ act = wfill [ "The clashing type synonym will be ignored." ] in ppError (isError _lhsIoptions _me) (getPos nt_) mesg pat help act _lhsIverbose- {-# LINE 1025 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1025 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} DupSynonym nt_ occ1_- {-# LINE 1031 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1031 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1037 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1037 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_DupUnique :: NontermIdent -> ConstructorIdent -> Identifier ->- T_Error -sem_Error_DupUnique nt_ con_ attr_ =+ T_Error+sem_Error_DupUnique nt_ con_ attr_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 498, column 21) _lhsOpp = ({-# LINE 498 "src-ag/PrintErrorMessages.ag" #-}@@ -1062,56 +1062,56 @@ ] act = wfill ["Unpredicatable sharing of unique numbers may occur."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 1066 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1066 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} DupUnique nt_ con_ attr_- {-# LINE 1072 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1072 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1078 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1078 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_HsParseError :: Pos -> String ->- T_Error -sem_Error_HsParseError pos_ msg_ =+ T_Error+sem_Error_HsParseError pos_ msg_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 95, column 21) _lhsOpp = ({-# LINE 95 "src-ag/PrintErrorMessages.ag" #-} ppError True pos_ (text msg_) (text "") (text "") (text "Correct the syntax of the Haskell code.") _lhsIverbose- {-# LINE 1093 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1093 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} HsParseError pos_ msg_- {-# LINE 1099 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1099 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1105 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1105 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_IncompatibleAttachKind :: Identifier -> VisitKind ->- T_Error -sem_Error_IncompatibleAttachKind child_ kind_ =+ T_Error+sem_Error_IncompatibleAttachKind child_ kind_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 544, column 20) _lhsOpp = ({-# LINE 544 "src-ag/PrintErrorMessages.ag" #-}@@ -1120,29 +1120,29 @@ help = empty act = text "It is not possible to proceed without fixing this kind error." in ppError (isError _lhsIoptions _me) (getPos child_) mesg pat help act _lhsIverbose- {-# LINE 1124 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1124 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} IncompatibleAttachKind child_ kind_- {-# LINE 1130 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1130 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1136 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1136 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_IncompatibleRuleKind :: Identifier -> VisitKind ->- T_Error -sem_Error_IncompatibleRuleKind rule_ kind_ =+ T_Error+sem_Error_IncompatibleRuleKind rule_ kind_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 537, column 20) _lhsOpp = ({-# LINE 537 "src-ag/PrintErrorMessages.ag" #-}@@ -1151,31 +1151,31 @@ help = empty act = text "It is not possible to proceed without fixing this kind error." in ppError (isError _lhsIoptions _me) (getPos rule_) mesg pat help act _lhsIverbose- {-# LINE 1155 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1155 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} IncompatibleRuleKind rule_ kind_- {-# LINE 1161 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1161 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1167 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1167 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_IncompatibleVisitKind :: Identifier -> VisitIdentifier -> VisitKind -> VisitKind ->- T_Error -sem_Error_IncompatibleVisitKind child_ vis_ from_ to_ =+ T_Error+sem_Error_IncompatibleVisitKind child_ vis_ from_ to_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 531, column 20) _lhsOpp = ({-# LINE 531 "src-ag/PrintErrorMessages.ag" #-}@@ -1184,30 +1184,30 @@ help = empty act = text "It is not possible to proceed without fixing this kind error." in ppError (isError _lhsIoptions _me) (getPos child_) mesg pat help act _lhsIverbose- {-# LINE 1188 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1188 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} IncompatibleVisitKind child_ vis_ from_ to_- {-# LINE 1194 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1194 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1200 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1200 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_InducedCirc :: NontermIdent -> CInterface -> ([((Identifier,Identifier),[String],[String])]) ->- T_Error -sem_Error_InducedCirc nt_ cinter_ cyclic_ =+ T_Error+sem_Error_InducedCirc nt_ cinter_ cyclic_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 445, column 21) _lhsOpp = ({-# LINE 445 "src-ag/PrintErrorMessages.ag" #-}@@ -1219,32 +1219,32 @@ >-< vlist (map showEdgeLong cyclic_) act = text "An unoptimized version was generated. It might hang when run." in ppError (isError _lhsIoptions _me) noPos mesg pat help act _lhsIverbose- {-# LINE 1223 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1223 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} InducedCirc nt_ cinter_ cyclic_- {-# LINE 1229 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1229 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1235 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1235 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_InstCirc :: NontermIdent -> ConstructorIdent -> Identifier -> Bool -> ([String]) ->- T_Error -sem_Error_InstCirc nt_ con_ attr_ o_visit_ path_ =+ T_Error+sem_Error_InstCirc nt_ con_ attr_ o_visit_ path_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 425, column 21) _lhsOpp = ({-# LINE 425 "src-ag/PrintErrorMessages.ag" #-}@@ -1259,32 +1259,32 @@ act | o_visit_ = text "An unoptimized version was generated. It might hang when run." | otherwise = text "The generated program might hang when run." in ppError (isError _lhsIoptions _me) (getPos (attr_)) mesg pat help act _lhsIverbose- {-# LINE 1263 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1263 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} InstCirc nt_ con_ attr_ o_visit_ path_- {-# LINE 1269 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1269 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1275 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1275 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_LocalCirc :: NontermIdent -> ConstructorIdent -> Identifier -> Bool -> ([String]) ->- T_Error -sem_Error_LocalCirc nt_ con_ attr_ o_visit_ path_ =+ T_Error+sem_Error_LocalCirc nt_ con_ attr_ o_visit_ path_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 413, column 21) _lhsOpp = ({-# LINE 413 "src-ag/PrintErrorMessages.ag" #-}@@ -1299,30 +1299,30 @@ act | o_visit_ = text "An unoptimized version was generated. It might hang when run." | otherwise = text "The generated program might hang when run." in ppError (isError _lhsIoptions _me) (getPos (attr_)) mesg pat help act _lhsIverbose- {-# LINE 1303 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1303 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} LocalCirc nt_ con_ attr_ o_visit_ path_- {-# LINE 1309 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1309 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1315 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1315 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_MissingInstSig :: NontermIdent -> ConstructorIdent -> Identifier ->- T_Error -sem_Error_MissingInstSig nt_ con_ attr_ =+ T_Error+sem_Error_MissingInstSig nt_ con_ attr_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 468, column 21) _lhsOpp = ({-# LINE 468 "src-ag/PrintErrorMessages.ag" #-}@@ -1339,30 +1339,30 @@ ] act = wfill ["It is not possible to proceed without this signature."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 1343 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1343 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} MissingInstSig nt_ con_ attr_- {-# LINE 1349 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1349 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1355 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1355 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_MissingNamedRule :: NontermIdent -> Identifier -> Identifier ->- T_Error -sem_Error_MissingNamedRule nt_ con_ name_ =+ T_Error+sem_Error_MissingNamedRule nt_ con_ name_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 310, column 23) _lhsOpp = ({-# LINE 310 "src-ag/PrintErrorMessages.ag" #-}@@ -1376,31 +1376,31 @@ ] act = wfill ["Compilation cannot continue."] in ppError (isError _lhsIoptions _me) (getPos name_) mesg pat help act _lhsIverbose- {-# LINE 1380 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1380 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} MissingNamedRule nt_ con_ name_- {-# LINE 1386 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1386 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1392 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1392 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_MissingRule :: NontermIdent -> ConstructorIdent -> Identifier -> Identifier ->- T_Error -sem_Error_MissingRule nt_ con_ field_ attr_ =+ T_Error+sem_Error_MissingRule nt_ con_ field_ attr_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 297, column 21) _lhsOpp = ({-# LINE 297 "src-ag/PrintErrorMessages.ag" #-}@@ -1415,29 +1415,29 @@ ] act = wfill ["The value of the attribute has been set to undefined."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 1419 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1419 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} MissingRule nt_ con_ field_ attr_- {-# LINE 1425 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1425 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1431 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1431 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_MissingSyn :: NontermIdent -> Identifier ->- T_Error -sem_Error_MissingSyn nt_ attr_ =+ T_Error+sem_Error_MissingSyn nt_ attr_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 515, column 20) _lhsOpp = ({-# LINE 515 "src-ag/PrintErrorMessages.ag" #-}@@ -1455,30 +1455,30 @@ ] act = wfill ["It is not possible to proceed without this declaration."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 1459 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1459 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} MissingSyn nt_ attr_- {-# LINE 1465 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1465 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1471 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1471 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_MissingTypeSig :: NontermIdent -> ConstructorIdent -> Identifier ->- T_Error -sem_Error_MissingTypeSig nt_ con_ attr_ =+ T_Error+sem_Error_MissingTypeSig nt_ con_ attr_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 454, column 21) _lhsOpp = ({-# LINE 454 "src-ag/PrintErrorMessages.ag" #-}@@ -1495,29 +1495,29 @@ ] act = wfill ["The type signatures of semantic functions are not generated."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 1499 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1499 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} MissingTypeSig nt_ con_ attr_- {-# LINE 1505 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1505 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1511 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1511 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_MissingUnique :: NontermIdent -> Identifier ->- T_Error -sem_Error_MissingUnique nt_ attr_ =+ T_Error+sem_Error_MissingUnique nt_ attr_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 482, column 21) _lhsOpp = ({-# LINE 482 "src-ag/PrintErrorMessages.ag" #-}@@ -1535,30 +1535,30 @@ ] act = wfill ["It is not possible to proceed without this declaration."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 1539 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1539 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} MissingUnique nt_ attr_- {-# LINE 1545 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1545 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1551 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1551 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_ParserError :: Pos -> String -> String ->- T_Error -sem_Error_ParserError pos_ problem_ action_ =+ T_Error+sem_Error_ParserError pos_ problem_ action_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 89, column 21) _lhsOpp = ({-# LINE 89 "src-ag/PrintErrorMessages.ag" #-}@@ -1567,31 +1567,31 @@ help = text "" act = text action_ in ppError (isError _lhsIoptions _me) pos_ mesg pat help act _lhsIverbose- {-# LINE 1571 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1571 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} ParserError pos_ problem_ action_- {-# LINE 1577 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1577 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1583 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1583 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_SuperfluousRule :: NontermIdent -> ConstructorIdent -> Identifier -> Identifier ->- T_Error -sem_Error_SuperfluousRule nt_ con_ field_ attr_ =+ T_Error+sem_Error_SuperfluousRule nt_ con_ field_ attr_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 322, column 21) _lhsOpp = ({-# LINE 322 "src-ag/PrintErrorMessages.ag" #-}@@ -1606,29 +1606,29 @@ ] act = wfill ["The rule has been ignored."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 1610 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1610 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} SuperfluousRule nt_ con_ field_ attr_- {-# LINE 1616 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1616 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1622 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1622 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_UndefAlt :: NontermIdent -> ConstructorIdent ->- T_Error -sem_Error_UndefAlt nt_ con_ =+ T_Error+sem_Error_UndefAlt nt_ con_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 270, column 21) _lhsOpp = ({-# LINE 270 "src-ag/PrintErrorMessages.ag" #-}@@ -1642,32 +1642,32 @@ ] act = wfill ["All rules for the unknown alternative have been ignored."] in ppError (isError _lhsIoptions _me) (getPos con_) mesg pat help act _lhsIverbose- {-# LINE 1646 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1646 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} UndefAlt nt_ con_- {-# LINE 1652 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1652 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1658 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1658 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_UndefAttr :: NontermIdent -> ConstructorIdent -> Identifier -> Identifier -> Bool ->- T_Error -sem_Error_UndefAttr nt_ con_ field_ attr_ isOut_ =+ T_Error+sem_Error_UndefAttr nt_ con_ field_ attr_ isOut_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 365, column 21) _lhsOpp = ({-# LINE 365 "src-ag/PrintErrorMessages.ag" #-}@@ -1688,30 +1688,30 @@ ] act = wfill ["The generated program will not run."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 1692 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1692 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} UndefAttr nt_ con_ field_ attr_ isOut_- {-# LINE 1698 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1698 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1704 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1704 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_UndefChild :: NontermIdent -> ConstructorIdent -> Identifier ->- T_Error -sem_Error_UndefChild nt_ con_ name_ =+ T_Error+sem_Error_UndefChild nt_ con_ name_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 282, column 21) _lhsOpp = ({-# LINE 282 "src-ag/PrintErrorMessages.ag" #-}@@ -1728,30 +1728,30 @@ ] act = wfill ["All rules for the unknown field have been ignored."] in ppError (isError _lhsIoptions _me) (getPos name_) mesg pat help act _lhsIverbose- {-# LINE 1732 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1732 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} UndefChild nt_ con_ name_- {-# LINE 1738 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1738 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1744 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1744 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_UndefLocal :: NontermIdent -> ConstructorIdent -> Identifier ->- T_Error -sem_Error_UndefLocal nt_ con_ var_ =+ T_Error+sem_Error_UndefLocal nt_ con_ var_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 336, column 21) _lhsOpp = ({-# LINE 336 "src-ag/PrintErrorMessages.ag" #-}@@ -1768,28 +1768,28 @@ ] act = wfill ["The generated program will not run."] in ppError (isError _lhsIoptions _me) (getPos var_) mesg pat help act _lhsIverbose- {-# LINE 1772 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1772 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} UndefLocal nt_ con_ var_- {-# LINE 1778 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1778 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1784 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1784 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) sem_Error_UndefNont :: NontermIdent ->- T_Error -sem_Error_UndefNont nt_ =+ T_Error+sem_Error_UndefNont nt_ = (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error + _lhsOme :: Error -- "src-ag/PrintErrorMessages.ag"(line 260, column 21) _lhsOpp = ({-# LINE 260 "src-ag/PrintErrorMessages.ag" #-}@@ -1801,21 +1801,21 @@ ] act = wfill ["Everything regarding the unknown nonterminal has been ignored."] in ppError (isError _lhsIoptions _me) (getPos nt_) mesg pat help act _lhsIverbose- {-# LINE 1805 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1805 "dist/build/PrintErrorMessages" #-} ) -- self rule _me = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} UndefNont nt_- {-# LINE 1811 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1811 "dist/build/PrintErrorMessages" #-} ) -- self rule _lhsOme = ({-# LINE 71 "src-ag/PrintErrorMessages.ag" #-} _me- {-# LINE 1817 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1817 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOme,_lhsOpp))) )+ in ( _lhsOme,_lhsOpp)))) -- Errors ------------------------------------------------------ {- visit 0:@@ -1836,26 +1836,26 @@ local verbose : _ -} -- cata-sem_Errors :: Errors ->- T_Errors -sem_Errors list =- (Prelude.foldr sem_Errors_Cons sem_Errors_Nil (Prelude.map sem_Error list) )+sem_Errors :: Errors ->+ T_Errors+sem_Errors list =+ (Prelude.foldr sem_Errors_Cons sem_Errors_Nil (Prelude.map sem_Error list)) -- semantic domain-newtype T_Errors = T_Errors (([String]) ->- Options ->- ( PP_Doc))-data Inh_Errors = Inh_Errors {dups_Inh_Errors :: ([String]),options_Inh_Errors :: Options}-data Syn_Errors = Syn_Errors {pp_Syn_Errors :: PP_Doc}-wrap_Errors :: T_Errors ->- Inh_Errors ->- Syn_Errors -wrap_Errors (T_Errors sem ) (Inh_Errors _lhsIdups _lhsIoptions ) =- (let ( _lhsOpp) = sem _lhsIdups _lhsIoptions - in (Syn_Errors _lhsOpp ))-sem_Errors_Cons :: T_Error ->- T_Errors ->- T_Errors -sem_Errors_Cons (T_Error hd_ ) (T_Errors tl_ ) =+newtype T_Errors = T_Errors (([String]) ->+ Options ->+ ( PP_Doc))+data Inh_Errors = Inh_Errors {dups_Inh_Errors :: ([String]),options_Inh_Errors :: Options}+data Syn_Errors = Syn_Errors {pp_Syn_Errors :: PP_Doc}+wrap_Errors :: T_Errors ->+ Inh_Errors ->+ Syn_Errors+wrap_Errors (T_Errors sem) (Inh_Errors _lhsIdups _lhsIoptions) =+ (let ( _lhsOpp) = sem _lhsIdups _lhsIoptions+ in (Syn_Errors _lhsOpp))+sem_Errors_Cons :: T_Error ->+ T_Errors ->+ T_Errors+sem_Errors_Cons (T_Error hd_) (T_Errors tl_) = (T_Errors (\ _lhsIdups _lhsIoptions -> (let _lhsOpp :: PP_Doc@@ -1863,20 +1863,20 @@ _hdOoptions :: Options _hdOverbose :: Bool _tlOoptions :: Options- _hdIme :: Error + _hdIme :: Error _hdIpp :: PP_Doc _tlIpp :: PP_Doc -- "src-ag/PrintErrorMessages.ag"(line 78, column 8) _verbose = ({-# LINE 78 "src-ag/PrintErrorMessages.ag" #-} verbose _lhsIoptions- {-# LINE 1874 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1874 "dist/build/PrintErrorMessages" #-} ) -- "src-ag/PrintErrorMessages.ag"(line 79, column 11) _str = ({-# LINE 79 "src-ag/PrintErrorMessages.ag" #-} disp _hdIpp 5000 ""- {-# LINE 1880 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1880 "dist/build/PrintErrorMessages" #-} ) -- "src-ag/PrintErrorMessages.ag"(line 81, column 11) _lhsOpp =@@ -1884,39 +1884,39 @@ if _str `elem` _lhsIdups then _tlIpp else _hdIpp >-< _tlIpp- {-# LINE 1888 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1888 "dist/build/PrintErrorMessages" #-} ) -- "src-ag/PrintErrorMessages.ag"(line 84, column 11) _tlOdups = ({-# LINE 84 "src-ag/PrintErrorMessages.ag" #-} _str : _lhsIdups- {-# LINE 1894 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1894 "dist/build/PrintErrorMessages" #-} ) -- copy rule (down) _hdOoptions = ({-# LINE 70 "src-ag/PrintErrorMessages.ag" #-} _lhsIoptions- {-# LINE 1900 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1900 "dist/build/PrintErrorMessages" #-} ) -- copy rule (from local) _hdOverbose = ({-# LINE 70 "src-ag/PrintErrorMessages.ag" #-} _verbose- {-# LINE 1906 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1906 "dist/build/PrintErrorMessages" #-} ) -- copy rule (down) _tlOoptions = ({-# LINE 74 "src-ag/PrintErrorMessages.ag" #-} _lhsIoptions- {-# LINE 1912 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1912 "dist/build/PrintErrorMessages" #-} ) ( _hdIme,_hdIpp) =- hd_ _hdOoptions _hdOverbose + hd_ _hdOoptions _hdOverbose ( _tlIpp) =- tl_ _tlOdups _tlOoptions - in ( _lhsOpp))) )-sem_Errors_Nil :: T_Errors -sem_Errors_Nil =+ tl_ _tlOdups _tlOoptions+ in ( _lhsOpp))))+sem_Errors_Nil :: T_Errors+sem_Errors_Nil = (T_Errors (\ _lhsIdups _lhsIoptions -> (let _lhsOpp :: PP_Doc@@ -1924,12 +1924,12 @@ _verbose = ({-# LINE 78 "src-ag/PrintErrorMessages.ag" #-} verbose _lhsIoptions- {-# LINE 1928 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1928 "dist/build/PrintErrorMessages" #-} ) -- "src-ag/PrintErrorMessages.ag"(line 85, column 11) _lhsOpp = ({-# LINE 85 "src-ag/PrintErrorMessages.ag" #-} text ""- {-# LINE 1934 "src-ag/PrintErrorMessages.hs" #-}+ {-# LINE 1934 "dist/build/PrintErrorMessages" #-} )- in ( _lhsOpp))) )+ in ( _lhsOpp))))
src-derived/PrintOcamlCode.hs view
@@ -1,2223 +1,2223 @@ {-# OPTIONS_GHC -XBangPatterns #-} --- UUAGC 0.9.39.1.0 (src-ag/PrintOcamlCode.ag)-module PrintOcamlCode where-{-# LINE 10 "src-ag/PrintOcamlCode.ag" #-}--import Pretty-import Code-import Patterns-import Options-import CommonTypes hiding (List,Type,Map,Maybe,IntMap,Either)-import Data.List(intersperse,intercalate)-import Data.Char(toLower)-{-# LINE 15 "dist/build/uuagc/uuagc-tmp/PrintOcamlCode.hs" #-}--{-# LINE 2 "src-ag/Code.ag" #-}--import Pretty-import Patterns-import Data.List(partition)-import Data.Set(Set)-import qualified Data.Set as Set-import Data.Map(Map)-import qualified Data.Map as Map-{-# LINE 26 "dist/build/uuagc/uuagc-tmp/PrintOcamlCode.hs" #-}--{-# LINE 2 "src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 33 "dist/build/uuagc/uuagc-tmp/PrintOcamlCode.hs" #-}-{-# LINE 21 "src-ag/PrintOcamlCode.ag" #-}--type PP_Docs = [PP_Doc]--ppMultiSeqH :: [PP_Doc] -> PP_Doc -> PP_Doc-ppMultiSeqH = ppMultiSeq' (>#<)--ppMultiSeqV :: [PP_Doc] -> PP_Doc -> PP_Doc-ppMultiSeqV = ppMultiSeq' (>-<)--ppMultiSeq' :: (PP_Doc -> PP_Doc -> PP_Doc) -> [PP_Doc] -> PP_Doc -> PP_Doc-ppMultiSeq' next strictArgs expr- = foldr (\v r -> (v >#< "`seq`") `next` pp_parens r) expr strictArgs--ppTuple True pps = "(" >|< pp_block " " (replicate (length pps `max` 1) ')') ",(" pps-ppTuple False pps = "(" >|< pp_block " " ")" "," pps-{-# LINE 50 "dist/build/uuagc/uuagc-tmp/PrintOcamlCode.hs" #-}--{-# LINE 174 "src-ag/PrintOcamlCode.ag" #-}--toOcamlTC (c:cs) = toLower c : cs-toOcamlTC xs = xs-{-# LINE 56 "dist/build/uuagc/uuagc-tmp/PrintOcamlCode.hs" #-}--{-# LINE 146 "src-ag/Code.ag" #-}---- Unboxed tuples--- unbox Whether unboxed tuples are wanted or not--- inh The inherited attributes.--- If there are none, no unboxing can take place,--- because in that case the semantic function (a top-level identifier) would have an unboxed type.--- Of course we can't have an unboxed 1-tuple-mkTupleExpr :: Bool -> Bool -> Exprs -> Expr-mkTupleExpr unbox noInh exprs | not unbox || noInh || length exprs == 1 = TupleExpr exprs- | otherwise = UnboxedTupleExpr exprs-mkTupleType :: Bool -> Bool -> Types -> Type-mkTupleType unbox noInh tps | not unbox || noInh || length tps == 1 = TupleType tps- | otherwise = UnboxedTupleType tps-mkTupleLhs :: Bool -> Bool -> [String] -> Lhs-mkTupleLhs unbox noInh comps | not unbox || noInh || length comps == 1 = TupleLhs comps- | otherwise = UnboxedTupleLhs comps-{-# LINE 75 "dist/build/uuagc/uuagc-tmp/PrintOcamlCode.hs" #-}--- CaseAlt ------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attribute:- pp : PP_Doc- alternatives:- alternative CaseAlt:- child left : Lhs - child expr : Expr --}--- cata-sem_CaseAlt :: CaseAlt ->- T_CaseAlt -sem_CaseAlt !(CaseAlt _left _expr ) =- (sem_CaseAlt_CaseAlt (sem_Lhs _left ) (sem_Expr _expr ) )--- semantic domain-newtype T_CaseAlt = T_CaseAlt (Options ->- ( PP_Doc))-data Inh_CaseAlt = Inh_CaseAlt {options_Inh_CaseAlt :: !(Options)}-data Syn_CaseAlt = Syn_CaseAlt {pp_Syn_CaseAlt :: !(PP_Doc)}-wrap_CaseAlt :: T_CaseAlt ->- Inh_CaseAlt ->- Syn_CaseAlt -wrap_CaseAlt !(T_CaseAlt sem ) !(Inh_CaseAlt _lhsIoptions ) =- (let ( !_lhsOpp) = sem _lhsIoptions - in (Syn_CaseAlt _lhsOpp ))-sem_CaseAlt_CaseAlt :: T_Lhs ->- T_Expr ->- T_CaseAlt -sem_CaseAlt_CaseAlt !(T_Lhs left_ ) !(T_Expr expr_ ) =- (T_CaseAlt (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 111 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_exprOoptions ->- (case (expr_ _exprOoptions ) of- { ( !_exprIpp) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 118 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_leftOoptions ->- (case (left_ _leftOoptions ) of- { ( !_leftIpp) ->- (case (({-# LINE 180 "src-ag/PrintOcamlCode.ag" #-}- _leftIpp >#< "->" >#< _exprIpp- {-# LINE 125 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )--- CaseAlts -----------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : CaseAlt - child tl : CaseAlts - alternative Nil:--}--- cata-sem_CaseAlts :: CaseAlts ->- T_CaseAlts -sem_CaseAlts !list =- (Prelude.foldr sem_CaseAlts_Cons sem_CaseAlts_Nil (Prelude.map sem_CaseAlt list) )--- semantic domain-newtype T_CaseAlts = T_CaseAlts (Options ->- ( PP_Docs))-data Inh_CaseAlts = Inh_CaseAlts {options_Inh_CaseAlts :: !(Options)}-data Syn_CaseAlts = Syn_CaseAlts {pps_Syn_CaseAlts :: !(PP_Docs)}-wrap_CaseAlts :: T_CaseAlts ->- Inh_CaseAlts ->- Syn_CaseAlts -wrap_CaseAlts !(T_CaseAlts sem ) !(Inh_CaseAlts _lhsIoptions ) =- (let ( !_lhsOpps) = sem _lhsIoptions - in (Syn_CaseAlts _lhsOpps ))-sem_CaseAlts_Cons :: T_CaseAlt ->- T_CaseAlts ->- T_CaseAlts -sem_CaseAlts_Cons !(T_CaseAlt hd_ ) !(T_CaseAlts tl_ ) =- (T_CaseAlts (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 165 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_tlOoptions ->- (case (tl_ _tlOoptions ) of- { ( !_tlIpps) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 172 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_hdOoptions ->- (case (hd_ _hdOoptions ) of- { ( !_hdIpp) ->- (case (({-# LINE 64 "src-ag/PrintOcamlCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 179 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) })) )-sem_CaseAlts_Nil :: T_CaseAlts -sem_CaseAlts_Nil =- (T_CaseAlts (\ (!_lhsIoptions) ->- (case (({-# LINE 65 "src-ag/PrintOcamlCode.ag" #-}- []- {-# LINE 188 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- Chunk --------------------------------------------------------{-- visit 0:- inherited attributes:- isToplevel : Bool- options : Options- textBlockMap : Map BlockInfo PP_Doc- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Chunk:- child name : {String}- child comment : Decl - child info : Decls - child dataDef : Decls - child cataFun : Decls - child semDom : Decls - child semWrapper : Decls - child semFunctions : Decls - child semNames : {[String]}--}--- cata-sem_Chunk :: Chunk ->- T_Chunk -sem_Chunk !(Chunk _name _comment _info _dataDef _cataFun _semDom _semWrapper _semFunctions _semNames ) =- (sem_Chunk_Chunk _name (sem_Decl _comment ) (sem_Decls _info ) (sem_Decls _dataDef ) (sem_Decls _cataFun ) (sem_Decls _semDom ) (sem_Decls _semWrapper ) (sem_Decls _semFunctions ) _semNames )--- semantic domain-newtype T_Chunk = T_Chunk (Bool ->- Options ->- (Map BlockInfo PP_Doc) ->- ( PP_Docs))-data Inh_Chunk = Inh_Chunk {isToplevel_Inh_Chunk :: !(Bool),options_Inh_Chunk :: !(Options),textBlockMap_Inh_Chunk :: !((Map BlockInfo PP_Doc))}-data Syn_Chunk = Syn_Chunk {pps_Syn_Chunk :: !(PP_Docs)}-wrap_Chunk :: T_Chunk ->- Inh_Chunk ->- Syn_Chunk -wrap_Chunk !(T_Chunk sem ) !(Inh_Chunk _lhsIisToplevel _lhsIoptions _lhsItextBlockMap ) =- (let ( !_lhsOpps) = sem _lhsIisToplevel _lhsIoptions _lhsItextBlockMap - in (Syn_Chunk _lhsOpps ))-sem_Chunk_Chunk :: String ->- T_Decl ->- T_Decls ->- T_Decls ->- T_Decls ->- T_Decls ->- T_Decls ->- T_Decls ->- ([String]) ->- T_Chunk -sem_Chunk_Chunk !name_ !(T_Decl comment_ ) !(T_Decls info_ ) !(T_Decls dataDef_ ) !(T_Decls cataFun_ ) !(T_Decls semDom_ ) !(T_Decls semWrapper_ ) !(T_Decls semFunctions_ ) !semNames_ =- (T_Chunk (\ (!_lhsIisToplevel)- (!_lhsIoptions)- (!_lhsItextBlockMap) ->- (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 247 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_semFunctionsOisToplevel ->- (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 252 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_semWrapperOisToplevel ->- (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 257 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_semDomOisToplevel ->- (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 262 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_cataFunOisToplevel ->- (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 267 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_dataDefOisToplevel ->- (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 272 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_infoOisToplevel ->- (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 277 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_commentOisToplevel ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 282 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_semFunctionsOoptions ->- (case (semFunctions_ _semFunctionsOisToplevel _semFunctionsOoptions ) of- { ( !_semFunctionsIpps) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 289 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_semWrapperOoptions ->- (case (semWrapper_ _semWrapperOisToplevel _semWrapperOoptions ) of- { ( !_semWrapperIpps) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 296 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_semDomOoptions ->- (case (semDom_ _semDomOisToplevel _semDomOoptions ) of- { ( !_semDomIpps) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 303 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_cataFunOoptions ->- (case (cataFun_ _cataFunOisToplevel _cataFunOoptions ) of- { ( !_cataFunIpps) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 310 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_dataDefOoptions ->- (case (dataDef_ _dataDefOisToplevel _dataDefOoptions ) of- { ( !_dataDefIpps) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 317 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_infoOoptions ->- (case (info_ _infoOisToplevel _infoOoptions ) of- { ( !_infoIpps) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 324 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_commentOoptions ->- (case (comment_ _commentOisToplevel _commentOoptions ) of- { ( !_commentIpp) ->- (case (({-# LINE 96 "src-ag/PrintOcamlCode.ag" #-}- _commentIpp- : _infoIpps- ++ _dataDefIpps- ++ _semDomIpps- ++ _semFunctionsIpps- ++ _semWrapperIpps- ++ _cataFunIpps- ++ [Map.findWithDefault empty (BlockOther, Just $ identifier name_) _lhsItextBlockMap]- {-# LINE 338 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Chunks -------------------------------------------------------{-- visit 0:- inherited attributes:- isToplevel : Bool- options : Options- textBlockMap : Map BlockInfo PP_Doc- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : Chunk - child tl : Chunks - alternative Nil:--}--- cata-sem_Chunks :: Chunks ->- T_Chunks -sem_Chunks !list =- (Prelude.foldr sem_Chunks_Cons sem_Chunks_Nil (Prelude.map sem_Chunk list) )--- semantic domain-newtype T_Chunks = T_Chunks (Bool ->- Options ->- (Map BlockInfo PP_Doc) ->- ( PP_Docs))-data Inh_Chunks = Inh_Chunks {isToplevel_Inh_Chunks :: !(Bool),options_Inh_Chunks :: !(Options),textBlockMap_Inh_Chunks :: !((Map BlockInfo PP_Doc))}-data Syn_Chunks = Syn_Chunks {pps_Syn_Chunks :: !(PP_Docs)}-wrap_Chunks :: T_Chunks ->- Inh_Chunks ->- Syn_Chunks -wrap_Chunks !(T_Chunks sem ) !(Inh_Chunks _lhsIisToplevel _lhsIoptions _lhsItextBlockMap ) =- (let ( !_lhsOpps) = sem _lhsIisToplevel _lhsIoptions _lhsItextBlockMap - in (Syn_Chunks _lhsOpps ))-sem_Chunks_Cons :: T_Chunk ->- T_Chunks ->- T_Chunks -sem_Chunks_Cons !(T_Chunk hd_ ) !(T_Chunks tl_ ) =- (T_Chunks (\ (!_lhsIisToplevel)- (!_lhsIoptions)- (!_lhsItextBlockMap) ->- (case (({-# LINE 45 "src-ag/PrintOcamlCode.ag" #-}- _lhsItextBlockMap- {-# LINE 384 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_tlOtextBlockMap ->- (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 389 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_tlOisToplevel ->- (case (({-# LINE 45 "src-ag/PrintOcamlCode.ag" #-}- _lhsItextBlockMap- {-# LINE 394 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_hdOtextBlockMap ->- (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 399 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_hdOisToplevel ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 404 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_tlOoptions ->- (case (tl_ _tlOisToplevel _tlOoptions _tlOtextBlockMap ) of- { ( !_tlIpps) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 411 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_hdOoptions ->- (case (hd_ _hdOisToplevel _hdOoptions _hdOtextBlockMap ) of- { ( !_hdIpps) ->- (case (({-# LINE 84 "src-ag/PrintOcamlCode.ag" #-}- _hdIpps ++ _tlIpps- {-# LINE 418 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) }) }) }) }) })) )-sem_Chunks_Nil :: T_Chunks -sem_Chunks_Nil =- (T_Chunks (\ (!_lhsIisToplevel)- (!_lhsIoptions)- (!_lhsItextBlockMap) ->- (case (({-# LINE 85 "src-ag/PrintOcamlCode.ag" #-}- []- {-# LINE 429 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- DataAlt ------------------------------------------------------{-- visit 0:- synthesized attribute:- pp : PP_Doc- alternatives:- alternative DataAlt:- child name : {String}- child args : Types - alternative Record:- child name : {String}- child args : NamedTypes --}--- cata-sem_DataAlt :: DataAlt ->- T_DataAlt -sem_DataAlt !(DataAlt _name _args ) =- (sem_DataAlt_DataAlt _name (sem_Types _args ) )-sem_DataAlt !(Record _name _args ) =- (sem_DataAlt_Record _name (sem_NamedTypes _args ) )--- semantic domain-newtype T_DataAlt = T_DataAlt (( PP_Doc))-data Inh_DataAlt = Inh_DataAlt {}-data Syn_DataAlt = Syn_DataAlt {pp_Syn_DataAlt :: !(PP_Doc)}-wrap_DataAlt :: T_DataAlt ->- Inh_DataAlt ->- Syn_DataAlt -wrap_DataAlt !(T_DataAlt sem ) !(Inh_DataAlt ) =- (let ( !_lhsOpp) = sem - in (Syn_DataAlt _lhsOpp ))-sem_DataAlt_DataAlt :: String ->- T_Types ->- T_DataAlt -sem_DataAlt_DataAlt !name_ !(T_Types args_ ) =- (T_DataAlt (case (args_ ) of- { ( !_argsIpps) ->- (case (({-# LINE 183 "src-ag/PrintOcamlCode.ag" #-}- name_ >#< "of" >#< pp_block "" "" " * " (map pp_parens _argsIpps)- {-# LINE 471 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) )-sem_DataAlt_Record :: String ->- T_NamedTypes ->- T_DataAlt -sem_DataAlt_Record !name_ !(T_NamedTypes args_ ) =- (T_DataAlt (case (args_ ) of- { ( !_argsIpps) ->- (case (({-# LINE 184 "src-ag/PrintOcamlCode.ag" #-}- pp_block "{" "}" ";" _argsIpps- {-# LINE 483 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) )--- DataAlts -----------------------------------------------------{-- visit 0:- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : DataAlt - child tl : DataAlts - alternative Nil:--}--- cata-sem_DataAlts :: DataAlts ->- T_DataAlts -sem_DataAlts !list =- (Prelude.foldr sem_DataAlts_Cons sem_DataAlts_Nil (Prelude.map sem_DataAlt list) )--- semantic domain-newtype T_DataAlts = T_DataAlts (( PP_Docs))-data Inh_DataAlts = Inh_DataAlts {}-data Syn_DataAlts = Syn_DataAlts {pps_Syn_DataAlts :: !(PP_Docs)}-wrap_DataAlts :: T_DataAlts ->- Inh_DataAlts ->- Syn_DataAlts -wrap_DataAlts !(T_DataAlts sem ) !(Inh_DataAlts ) =- (let ( !_lhsOpps) = sem - in (Syn_DataAlts _lhsOpps ))-sem_DataAlts_Cons :: T_DataAlt ->- T_DataAlts ->- T_DataAlts -sem_DataAlts_Cons !(T_DataAlt hd_ ) !(T_DataAlts tl_ ) =- (T_DataAlts (case (tl_ ) of- { ( !_tlIpps) ->- (case (hd_ ) of- { ( !_hdIpp) ->- (case (({-# LINE 68 "src-ag/PrintOcamlCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 523 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) )-sem_DataAlts_Nil :: T_DataAlts -sem_DataAlts_Nil =- (T_DataAlts (case (({-# LINE 69 "src-ag/PrintOcamlCode.ag" #-}- []- {-# LINE 531 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) )--- Decl ---------------------------------------------------------{-- visit 0:- inherited attributes:- isToplevel : Bool- options : Options- synthesized attribute:- pp : PP_Doc- alternatives:- alternative Bind:- child left : Lhs - child rhs : Expr - alternative BindLet:- child left : Lhs - child rhs : Expr - alternative Comment:- child txt : {String}- alternative Data:- child name : {String}- child params : {[String]}- child alts : DataAlts - child strict : {Bool}- child derivings : {[String]}- alternative Decl:- child left : Lhs - child rhs : Expr - child binds : {Set String}- child uses : {Set String}- alternative EvalDecl:- child nt : {String}- child left : Lhs - child rhs : Expr - alternative NewType:- child name : {String}- child params : {[String]}- child con : {String}- child tp : Type - alternative PragmaDecl:- child txt : {String}- alternative Resume:- child monadic : {Bool}- child nt : {String}- child left : Lhs - child rhs : Expr - alternative TSig:- child name : {String}- child tp : Type - alternative Type:- child name : {String}- child params : {[String]}- child tp : Type --}--- cata-sem_Decl :: Decl ->- T_Decl -sem_Decl !(Bind _left _rhs ) =- (sem_Decl_Bind (sem_Lhs _left ) (sem_Expr _rhs ) )-sem_Decl !(BindLet _left _rhs ) =- (sem_Decl_BindLet (sem_Lhs _left ) (sem_Expr _rhs ) )-sem_Decl !(Comment _txt ) =- (sem_Decl_Comment _txt )-sem_Decl !(Data _name _params _alts _strict _derivings ) =- (sem_Decl_Data _name _params (sem_DataAlts _alts ) _strict _derivings )-sem_Decl !(Decl _left _rhs _binds _uses ) =- (sem_Decl_Decl (sem_Lhs _left ) (sem_Expr _rhs ) _binds _uses )-sem_Decl !(EvalDecl _nt _left _rhs ) =- (sem_Decl_EvalDecl _nt (sem_Lhs _left ) (sem_Expr _rhs ) )-sem_Decl !(NewType _name _params _con _tp ) =- (sem_Decl_NewType _name _params _con (sem_Type _tp ) )-sem_Decl !(PragmaDecl _txt ) =- (sem_Decl_PragmaDecl _txt )-sem_Decl !(Resume _monadic _nt _left _rhs ) =- (sem_Decl_Resume _monadic _nt (sem_Lhs _left ) (sem_Expr _rhs ) )-sem_Decl !(TSig _name _tp ) =- (sem_Decl_TSig _name (sem_Type _tp ) )-sem_Decl !(Type _name _params _tp ) =- (sem_Decl_Type _name _params (sem_Type _tp ) )--- semantic domain-newtype T_Decl = T_Decl (Bool ->- Options ->- ( PP_Doc))-data Inh_Decl = Inh_Decl {isToplevel_Inh_Decl :: !(Bool),options_Inh_Decl :: !(Options)}-data Syn_Decl = Syn_Decl {pp_Syn_Decl :: !(PP_Doc)}-wrap_Decl :: T_Decl ->- Inh_Decl ->- Syn_Decl -wrap_Decl !(T_Decl sem ) !(Inh_Decl _lhsIisToplevel _lhsIoptions ) =- (let ( !_lhsOpp) = sem _lhsIisToplevel _lhsIoptions - in (Syn_Decl _lhsOpp ))-sem_Decl_Bind :: T_Lhs ->- T_Expr ->- T_Decl -sem_Decl_Bind !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 111 "src-ag/PrintOcamlCode.ag" #-}- error "pp of Decl.Bind not supported"- {-# LINE 632 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Decl_BindLet :: T_Lhs ->- T_Expr ->- T_Decl -sem_Decl_BindLet !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 112 "src-ag/PrintOcamlCode.ag" #-}- error "pp of Decl.BindLet not supported"- {-# LINE 644 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Decl_Comment :: String ->- T_Decl -sem_Decl_Comment !txt_ =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 123 "src-ag/PrintOcamlCode.ag" #-}- if '\n' `elem` txt_- then "(* " >-< vlist (lines txt_) >-< "*)"- else "(*" >#< txt_ >#< "*)"- {-# LINE 657 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Decl_Data :: String ->- ([String]) ->- T_DataAlts ->- Bool ->- ([String]) ->- T_Decl -sem_Decl_Data !name_ !params_ !(T_DataAlts alts_ ) !strict_ !derivings_ =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (alts_ ) of- { ( !_altsIpps) ->- (case (({-# LINE 113 "src-ag/PrintOcamlCode.ag" #-}- "type" >#< hv_sp (map (\p -> "'" >|< p) params_ ++ [text $ toOcamlTC name_])- >#< ( case _altsIpps of- [] -> empty- (x:xs) -> "=" >#< x- >-< vlist (map ("|" >#<) xs)- )- >#< ";;"- {-# LINE 680 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) })) )-sem_Decl_Decl :: T_Lhs ->- T_Expr ->- (Set String) ->- (Set String) ->- T_Decl -sem_Decl_Decl !(T_Lhs left_ ) !(T_Expr rhs_ ) !binds_ !uses_ =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 694 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_rhsOoptions ->- (case (rhs_ _rhsOoptions ) of- { ( !_rhsIpp) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 701 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_leftOoptions ->- (case (left_ _leftOoptions ) of- { ( !_leftIpp) ->- (case (({-# LINE 106 "src-ag/PrintOcamlCode.ag" #-}- if _lhsIisToplevel- then "let" >#< _leftIpp >#< "="- >-< indent 4 _rhsIpp >#< ";;"- else "let" >#< _leftIpp >#< "="- >-< indent 4 _rhsIpp >#< "in"- {-# LINE 712 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Decl_EvalDecl :: String ->- T_Lhs ->- T_Expr ->- T_Decl -sem_Decl_EvalDecl !nt_ !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 725 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_rhsOoptions ->- (case (rhs_ _rhsOoptions ) of- { ( !_rhsIpp) ->- (case (({-# LINE 53 "src-ag/PrintOcamlCode.ag" #-}- _rhsIpp- {-# LINE 732 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Decl_NewType :: String ->- ([String]) ->- String ->- T_Type ->- T_Decl -sem_Decl_NewType !name_ !params_ !con_ !(T_Type tp_ ) =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 120 "src-ag/PrintOcamlCode.ag" #-}- error "pp of Decl.NewType not supported"- {-# LINE 746 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Decl_PragmaDecl :: String ->- T_Decl -sem_Decl_PragmaDecl !txt_ =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 126 "src-ag/PrintOcamlCode.ag" #-}- error "pp of Decl.PragmaDecl not supported"- {-# LINE 757 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Decl_Resume :: Bool ->- String ->- T_Lhs ->- T_Expr ->- T_Decl -sem_Decl_Resume !monadic_ !nt_ !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 771 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_rhsOoptions ->- (case (rhs_ _rhsOoptions ) of- { ( !_rhsIpp) ->- (case (({-# LINE 53 "src-ag/PrintOcamlCode.ag" #-}- _rhsIpp- {-# LINE 778 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Decl_TSig :: String ->- T_Type ->- T_Decl -sem_Decl_TSig !name_ !(T_Type tp_ ) =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (tp_ ) of- { ( !_tpIpp) ->- (case (({-# LINE 122 "src-ag/PrintOcamlCode.ag" #-}- "(*" >#< name_ >#< ":" >#< _tpIpp >#< "*)"- {-# LINE 792 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) })) )-sem_Decl_Type :: String ->- ([String]) ->- T_Type ->- T_Decl -sem_Decl_Type !name_ !params_ !(T_Type tp_ ) =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (tp_ ) of- { ( !_tpIpp) ->- (case (({-# LINE 121 "src-ag/PrintOcamlCode.ag" #-}- "type" >#< hv_sp (map (\p -> "'" >|< p) params_ ++ [text $ toOcamlTC name_]) >#< "=" >#< _tpIpp >#< ";;"- {-# LINE 807 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) })) )--- Decls --------------------------------------------------------{-- visit 0:- inherited attributes:- isToplevel : Bool- options : Options- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : Decl - child tl : Decls - alternative Nil:--}--- cata-sem_Decls :: Decls ->- T_Decls -sem_Decls !list =- (Prelude.foldr sem_Decls_Cons sem_Decls_Nil (Prelude.map sem_Decl list) )--- semantic domain-newtype T_Decls = T_Decls (Bool ->- Options ->- ( PP_Docs))-data Inh_Decls = Inh_Decls {isToplevel_Inh_Decls :: !(Bool),options_Inh_Decls :: !(Options)}-data Syn_Decls = Syn_Decls {pps_Syn_Decls :: !(PP_Docs)}-wrap_Decls :: T_Decls ->- Inh_Decls ->- Syn_Decls -wrap_Decls !(T_Decls sem ) !(Inh_Decls _lhsIisToplevel _lhsIoptions ) =- (let ( !_lhsOpps) = sem _lhsIisToplevel _lhsIoptions - in (Syn_Decls _lhsOpps ))-sem_Decls_Cons :: T_Decl ->- T_Decls ->- T_Decls -sem_Decls_Cons !(T_Decl hd_ ) !(T_Decls tl_ ) =- (T_Decls (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 850 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_tlOisToplevel ->- (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 855 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_hdOisToplevel ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 860 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_tlOoptions ->- (case (tl_ _tlOisToplevel _tlOoptions ) of- { ( !_tlIpps) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 867 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_hdOoptions ->- (case (hd_ _hdOisToplevel _hdOoptions ) of- { ( !_hdIpp) ->- (case (({-# LINE 80 "src-ag/PrintOcamlCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 874 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) }) }) })) )-sem_Decls_Nil :: T_Decls -sem_Decls_Nil =- (T_Decls (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 81 "src-ag/PrintOcamlCode.ag" #-}- []- {-# LINE 884 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- Expr ---------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attribute:- pp : PP_Doc- alternatives:- alternative App:- child name : {String}- child args : Exprs - alternative Case:- child expr : Expr - child alts : CaseAlts - alternative Do:- child stmts : Decls - child body : Expr - alternative InvokeExpr:- child nt : {String}- child expr : Expr - child args : Exprs - alternative Lambda:- child args : Exprs - child body : Expr - alternative Let:- child decls : Decls - child body : Expr - alternative LineExpr:- child expr : Expr - alternative PragmaExpr:- child onLeftSide : {Bool}- child onNewLine : {Bool}- child txt : {String}- child expr : Expr - alternative ResultExpr:- child nt : {String}- child expr : Expr - alternative ResumeExpr:- child nt : {String}- child expr : Expr - child left : Lhs - child rhs : Expr - alternative SemFun:- child nt : {String}- child args : Exprs - child body : Expr - alternative SimpleExpr:- child txt : {String}- alternative TextExpr:- child lns : {[String]}- alternative Trace:- child txt : {String}- child expr : Expr - alternative TupleExpr:- child exprs : Exprs - alternative TypedExpr:- child expr : Expr - child tp : Type - alternative UnboxedTupleExpr:- child exprs : Exprs --}--- cata-sem_Expr :: Expr ->- T_Expr -sem_Expr !(App _name _args ) =- (sem_Expr_App _name (sem_Exprs _args ) )-sem_Expr !(Case _expr _alts ) =- (sem_Expr_Case (sem_Expr _expr ) (sem_CaseAlts _alts ) )-sem_Expr !(Do _stmts _body ) =- (sem_Expr_Do (sem_Decls _stmts ) (sem_Expr _body ) )-sem_Expr !(InvokeExpr _nt _expr _args ) =- (sem_Expr_InvokeExpr _nt (sem_Expr _expr ) (sem_Exprs _args ) )-sem_Expr !(Lambda _args _body ) =- (sem_Expr_Lambda (sem_Exprs _args ) (sem_Expr _body ) )-sem_Expr !(Let _decls _body ) =- (sem_Expr_Let (sem_Decls _decls ) (sem_Expr _body ) )-sem_Expr !(LineExpr _expr ) =- (sem_Expr_LineExpr (sem_Expr _expr ) )-sem_Expr !(PragmaExpr _onLeftSide _onNewLine _txt _expr ) =- (sem_Expr_PragmaExpr _onLeftSide _onNewLine _txt (sem_Expr _expr ) )-sem_Expr !(ResultExpr _nt _expr ) =- (sem_Expr_ResultExpr _nt (sem_Expr _expr ) )-sem_Expr !(ResumeExpr _nt _expr _left _rhs ) =- (sem_Expr_ResumeExpr _nt (sem_Expr _expr ) (sem_Lhs _left ) (sem_Expr _rhs ) )-sem_Expr !(SemFun _nt _args _body ) =- (sem_Expr_SemFun _nt (sem_Exprs _args ) (sem_Expr _body ) )-sem_Expr !(SimpleExpr _txt ) =- (sem_Expr_SimpleExpr _txt )-sem_Expr !(TextExpr _lns ) =- (sem_Expr_TextExpr _lns )-sem_Expr !(Trace _txt _expr ) =- (sem_Expr_Trace _txt (sem_Expr _expr ) )-sem_Expr !(TupleExpr _exprs ) =- (sem_Expr_TupleExpr (sem_Exprs _exprs ) )-sem_Expr !(TypedExpr _expr _tp ) =- (sem_Expr_TypedExpr (sem_Expr _expr ) (sem_Type _tp ) )-sem_Expr !(UnboxedTupleExpr _exprs ) =- (sem_Expr_UnboxedTupleExpr (sem_Exprs _exprs ) )--- semantic domain-newtype T_Expr = T_Expr (Options ->- ( PP_Doc))-data Inh_Expr = Inh_Expr {options_Inh_Expr :: !(Options)}-data Syn_Expr = Syn_Expr {pp_Syn_Expr :: !(PP_Doc)}-wrap_Expr :: T_Expr ->- Inh_Expr ->- Syn_Expr -wrap_Expr !(T_Expr sem ) !(Inh_Expr _lhsIoptions ) =- (let ( !_lhsOpp) = sem _lhsIoptions - in (Syn_Expr _lhsOpp ))-sem_Expr_App :: String ->- T_Exprs ->- T_Expr -sem_Expr_App !name_ !(T_Exprs args_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1004 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_argsOoptions ->- (case (args_ _argsOoptions ) of- { ( !_argsIpps) ->- (case (({-# LINE 143 "src-ag/PrintOcamlCode.ag" #-}- pp_parens $ name_ >#< hv_sp _argsIpps- {-# LINE 1011 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_Case :: T_Expr ->- T_CaseAlts ->- T_Expr -sem_Expr_Case !(T_Expr expr_ ) !(T_CaseAlts alts_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1022 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_altsOoptions ->- (case (alts_ _altsOoptions ) of- { ( !_altsIpps) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1029 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_exprOoptions ->- (case (expr_ _exprOoptions ) of- { ( !_exprIpp) ->- (case (({-# LINE 131 "src-ag/PrintOcamlCode.ag" #-}- pp_parens ( "match" >#< _exprIpp >#< "with"- >-< indent 2 ( case _altsIpps of- [] -> empty- (x:xs) -> " " >#< x- >-< vlist (map ("|" >#<) xs)- )- )- {-# LINE 1042 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Expr_Do :: T_Decls ->- T_Expr ->- T_Expr -sem_Expr_Do !(T_Decls stmts_ ) !(T_Expr body_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 138 "src-ag/PrintOcamlCode.ag" #-}- error "pp of Expr.Do not supported"- {-# LINE 1053 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Expr_InvokeExpr :: String ->- T_Expr ->- T_Exprs ->- T_Expr -sem_Expr_InvokeExpr !nt_ !(T_Expr expr_ ) !(T_Exprs args_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1065 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_exprOoptions ->- (case (expr_ _exprOoptions ) of- { ( !_exprIpp) ->- (case (({-# LINE 53 "src-ag/PrintOcamlCode.ag" #-}- _exprIpp- {-# LINE 1072 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_Lambda :: T_Exprs ->- T_Expr ->- T_Expr -sem_Expr_Lambda !(T_Exprs args_ ) !(T_Expr body_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1083 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_bodyOoptions ->- (case (body_ _bodyOoptions ) of- { ( !_bodyIpp) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1090 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_argsOoptions ->- (case (args_ _argsOoptions ) of- { ( !_argsIpps) ->- (case (({-# LINE 139 "src-ag/PrintOcamlCode.ag" #-}- pp_parens ( pp "fun" >#< hv_sp _argsIpps >#< "->"- >-< indent 2 _bodyIpp )- {-# LINE 1098 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Expr_Let :: T_Decls ->- T_Expr ->- T_Expr -sem_Expr_Let !(T_Decls decls_ ) !(T_Expr body_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 216 "src-ag/PrintOcamlCode.ag" #-}- False- {-# LINE 1109 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_declsOisToplevel ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1114 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_bodyOoptions ->- (case (body_ _bodyOoptions ) of- { ( !_bodyIpp) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1121 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_declsOoptions ->- (case (decls_ _declsOisToplevel _declsOoptions ) of- { ( !_declsIpps) ->- (case (({-# LINE 130 "src-ag/PrintOcamlCode.ag" #-}- pp_parens $ vlist (_declsIpps ++ [_bodyIpp])- {-# LINE 1128 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) })) )-sem_Expr_LineExpr :: T_Expr ->- T_Expr -sem_Expr_LineExpr !(T_Expr expr_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1138 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_exprOoptions ->- (case (expr_ _exprOoptions ) of- { ( !_exprIpp) ->- (case (({-# LINE 148 "src-ag/PrintOcamlCode.ag" #-}- _exprIpp- {-# LINE 1145 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_PragmaExpr :: Bool ->- Bool ->- String ->- T_Expr ->- T_Expr -sem_Expr_PragmaExpr !onLeftSide_ !onNewLine_ !txt_ !(T_Expr expr_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1158 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_exprOoptions ->- (case (expr_ _exprOoptions ) of- { ( !_exprIpp) ->- (case (({-# LINE 147 "src-ag/PrintOcamlCode.ag" #-}- _exprIpp- {-# LINE 1165 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_ResultExpr :: String ->- T_Expr ->- T_Expr -sem_Expr_ResultExpr !nt_ !(T_Expr expr_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1176 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_exprOoptions ->- (case (expr_ _exprOoptions ) of- { ( !_exprIpp) ->- (case (({-# LINE 53 "src-ag/PrintOcamlCode.ag" #-}- _exprIpp- {-# LINE 1183 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_ResumeExpr :: String ->- T_Expr ->- T_Lhs ->- T_Expr ->- T_Expr -sem_Expr_ResumeExpr !nt_ !(T_Expr expr_ ) !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1196 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_rhsOoptions ->- (case (rhs_ _rhsOoptions ) of- { ( !_rhsIpp) ->- (case (({-# LINE 53 "src-ag/PrintOcamlCode.ag" #-}- _rhsIpp- {-# LINE 1203 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_SemFun :: String ->- T_Exprs ->- T_Expr ->- T_Expr -sem_Expr_SemFun !nt_ !(T_Exprs args_ ) !(T_Expr body_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1215 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_bodyOoptions ->- (case (body_ _bodyOoptions ) of- { ( !_bodyIpp) ->- (case (({-# LINE 53 "src-ag/PrintOcamlCode.ag" #-}- _bodyIpp- {-# LINE 1222 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_SimpleExpr :: String ->- T_Expr -sem_Expr_SimpleExpr !txt_ =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 144 "src-ag/PrintOcamlCode.ag" #-}- text txt_- {-# LINE 1232 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Expr_TextExpr :: ([String]) ->- T_Expr -sem_Expr_TextExpr !lns_ =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 145 "src-ag/PrintOcamlCode.ag" #-}- vlist (map text lns_)- {-# LINE 1242 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Expr_Trace :: String ->- T_Expr ->- T_Expr -sem_Expr_Trace !txt_ !(T_Expr expr_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1253 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_exprOoptions ->- (case (expr_ _exprOoptions ) of- { ( !_exprIpp) ->- (case (({-# LINE 146 "src-ag/PrintOcamlCode.ag" #-}- _exprIpp- {-# LINE 1260 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_TupleExpr :: T_Exprs ->- T_Expr -sem_Expr_TupleExpr !(T_Exprs exprs_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1270 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_exprsOoptions ->- (case (exprs_ _exprsOoptions ) of- { ( !_exprsIpps) ->- (case (({-# LINE 141 "src-ag/PrintOcamlCode.ag" #-}- ppTuple False _exprsIpps- {-# LINE 1277 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_TypedExpr :: T_Expr ->- T_Type ->- T_Expr -sem_Expr_TypedExpr !(T_Expr expr_ ) !(T_Type tp_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1288 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_exprOoptions ->- (case (expr_ _exprOoptions ) of- { ( !_exprIpp) ->- (case (({-# LINE 149 "src-ag/PrintOcamlCode.ag" #-}- _exprIpp- {-# LINE 1295 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_UnboxedTupleExpr :: T_Exprs ->- T_Expr -sem_Expr_UnboxedTupleExpr !(T_Exprs exprs_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 142 "src-ag/PrintOcamlCode.ag" #-}- error "pp of Expr.UnboxedTupleExpr not supported"- {-# LINE 1305 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) })) )--- Exprs --------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : Expr - child tl : Exprs - alternative Nil:--}--- cata-sem_Exprs :: Exprs ->- T_Exprs -sem_Exprs !list =- (Prelude.foldr sem_Exprs_Cons sem_Exprs_Nil (Prelude.map sem_Expr list) )--- semantic domain-newtype T_Exprs = T_Exprs (Options ->- ( PP_Docs))-data Inh_Exprs = Inh_Exprs {options_Inh_Exprs :: !(Options)}-data Syn_Exprs = Syn_Exprs {pps_Syn_Exprs :: !(PP_Docs)}-wrap_Exprs :: T_Exprs ->- Inh_Exprs ->- Syn_Exprs -wrap_Exprs !(T_Exprs sem ) !(Inh_Exprs _lhsIoptions ) =- (let ( !_lhsOpps) = sem _lhsIoptions - in (Syn_Exprs _lhsOpps ))-sem_Exprs_Cons :: T_Expr ->- T_Exprs ->- T_Exprs -sem_Exprs_Cons !(T_Expr hd_ ) !(T_Exprs tl_ ) =- (T_Exprs (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1345 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_tlOoptions ->- (case (tl_ _tlOoptions ) of- { ( !_tlIpps) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1352 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_hdOoptions ->- (case (hd_ _hdOoptions ) of- { ( !_hdIpp) ->- (case (({-# LINE 60 "src-ag/PrintOcamlCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 1359 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) })) )-sem_Exprs_Nil :: T_Exprs -sem_Exprs_Nil =- (T_Exprs (\ (!_lhsIoptions) ->- (case (({-# LINE 61 "src-ag/PrintOcamlCode.ag" #-}- []- {-# LINE 1368 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- Lhs ----------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attribute:- pp : PP_Doc- alternatives:- alternative Fun:- child name : {String}- child args : Exprs - alternative Pattern3:- child pat3 : Pattern - alternative Pattern3SM:- child pat3 : Pattern - alternative TupleLhs:- child comps : {[String]}- alternative UnboxedTupleLhs:- child comps : {[String]}- alternative Unwrap:- child name : {String}- child sub : Lhs --}--- cata-sem_Lhs :: Lhs ->- T_Lhs -sem_Lhs !(Fun _name _args ) =- (sem_Lhs_Fun _name (sem_Exprs _args ) )-sem_Lhs !(Pattern3 _pat3 ) =- (sem_Lhs_Pattern3 (sem_Pattern _pat3 ) )-sem_Lhs !(Pattern3SM _pat3 ) =- (sem_Lhs_Pattern3SM (sem_Pattern _pat3 ) )-sem_Lhs !(TupleLhs _comps ) =- (sem_Lhs_TupleLhs _comps )-sem_Lhs !(UnboxedTupleLhs _comps ) =- (sem_Lhs_UnboxedTupleLhs _comps )-sem_Lhs !(Unwrap _name _sub ) =- (sem_Lhs_Unwrap _name (sem_Lhs _sub ) )--- semantic domain-newtype T_Lhs = T_Lhs (Options ->- ( PP_Doc))-data Inh_Lhs = Inh_Lhs {options_Inh_Lhs :: !(Options)}-data Syn_Lhs = Syn_Lhs {pp_Syn_Lhs :: !(PP_Doc)}-wrap_Lhs :: T_Lhs ->- Inh_Lhs ->- Syn_Lhs -wrap_Lhs !(T_Lhs sem ) !(Inh_Lhs _lhsIoptions ) =- (let ( !_lhsOpp) = sem _lhsIoptions - in (Syn_Lhs _lhsOpp ))-sem_Lhs_Fun :: String ->- T_Exprs ->- T_Lhs -sem_Lhs_Fun !name_ !(T_Exprs args_ ) =- (T_Lhs (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1428 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_argsOoptions ->- (case (args_ _argsOoptions ) of- { ( !_argsIpps) ->- (case (({-# LINE 156 "src-ag/PrintOcamlCode.ag" #-}- name_ >#< hv_sp _argsIpps- {-# LINE 1435 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Lhs_Pattern3 :: T_Pattern ->- T_Lhs -sem_Lhs_Pattern3 !(T_Pattern pat3_ ) =- (T_Lhs (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1445 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_pat3Ooptions ->- (case (pat3_ _pat3Ooptions ) of- { ( !_pat3Icopy,!_pat3IisUnderscore,!_pat3Ipp) ->- (case (({-# LINE 152 "src-ag/PrintOcamlCode.ag" #-}- _pat3Ipp- {-# LINE 1452 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Lhs_Pattern3SM :: T_Pattern ->- T_Lhs -sem_Lhs_Pattern3SM !(T_Pattern pat3_ ) =- (T_Lhs (\ (!_lhsIoptions) ->- (case (({-# LINE 153 "src-ag/PrintOcamlCode.ag" #-}- error "pp of Lhs.Pattern3SM not supported"- {-# LINE 1462 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Lhs_TupleLhs :: ([String]) ->- T_Lhs -sem_Lhs_TupleLhs !comps_ =- (T_Lhs (\ (!_lhsIoptions) ->- (case (({-# LINE 154 "src-ag/PrintOcamlCode.ag" #-}- ppTuple False (map text comps_)- {-# LINE 1472 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Lhs_UnboxedTupleLhs :: ([String]) ->- T_Lhs -sem_Lhs_UnboxedTupleLhs !comps_ =- (T_Lhs (\ (!_lhsIoptions) ->- (case (({-# LINE 155 "src-ag/PrintOcamlCode.ag" #-}- error "pp of Lhs.UnboxedTupleLhs not supported"- {-# LINE 1482 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Lhs_Unwrap :: String ->- T_Lhs ->- T_Lhs -sem_Lhs_Unwrap !name_ !(T_Lhs sub_ ) =- (T_Lhs (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1493 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_subOoptions ->- (case (sub_ _subOoptions ) of- { ( !_subIpp) ->- (case (({-# LINE 157 "src-ag/PrintOcamlCode.ag" #-}- pp_parens (name_ >#< _subIpp)- {-# LINE 1500 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )--- NamedType ----------------------------------------------------{-- visit 0:- synthesized attribute:- pp : PP_Doc- alternatives:- alternative Named:- child strict : {Bool}- child name : {String}- child tp : Type --}--- cata-sem_NamedType :: NamedType ->- T_NamedType -sem_NamedType !(Named _strict _name _tp ) =- (sem_NamedType_Named _strict _name (sem_Type _tp ) )--- semantic domain-newtype T_NamedType = T_NamedType (( PP_Doc))-data Inh_NamedType = Inh_NamedType {}-data Syn_NamedType = Syn_NamedType {pp_Syn_NamedType :: !(PP_Doc)}-wrap_NamedType :: T_NamedType ->- Inh_NamedType ->- Syn_NamedType -wrap_NamedType !(T_NamedType sem ) !(Inh_NamedType ) =- (let ( !_lhsOpp) = sem - in (Syn_NamedType _lhsOpp ))-sem_NamedType_Named :: Bool ->- String ->- T_Type ->- T_NamedType -sem_NamedType_Named !strict_ !name_ !(T_Type tp_ ) =- (T_NamedType (case (tp_ ) of- { ( !_tpIpp) ->- (case (({-# LINE 187 "src-ag/PrintOcamlCode.ag" #-}- name_ >#< ":" >#< _tpIpp- {-# LINE 1539 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) )--- NamedTypes ---------------------------------------------------{-- visit 0:- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : NamedType - child tl : NamedTypes - alternative Nil:--}--- cata-sem_NamedTypes :: NamedTypes ->- T_NamedTypes -sem_NamedTypes !list =- (Prelude.foldr sem_NamedTypes_Cons sem_NamedTypes_Nil (Prelude.map sem_NamedType list) )--- semantic domain-newtype T_NamedTypes = T_NamedTypes (( PP_Docs))-data Inh_NamedTypes = Inh_NamedTypes {}-data Syn_NamedTypes = Syn_NamedTypes {pps_Syn_NamedTypes :: !(PP_Docs)}-wrap_NamedTypes :: T_NamedTypes ->- Inh_NamedTypes ->- Syn_NamedTypes -wrap_NamedTypes !(T_NamedTypes sem ) !(Inh_NamedTypes ) =- (let ( !_lhsOpps) = sem - in (Syn_NamedTypes _lhsOpps ))-sem_NamedTypes_Cons :: T_NamedType ->- T_NamedTypes ->- T_NamedTypes -sem_NamedTypes_Cons !(T_NamedType hd_ ) !(T_NamedTypes tl_ ) =- (T_NamedTypes (case (tl_ ) of- { ( !_tlIpps) ->- (case (hd_ ) of- { ( !_hdIpp) ->- (case (({-# LINE 76 "src-ag/PrintOcamlCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 1579 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) )-sem_NamedTypes_Nil :: T_NamedTypes -sem_NamedTypes_Nil =- (T_NamedTypes (case (({-# LINE 77 "src-ag/PrintOcamlCode.ag" #-}- []- {-# LINE 1587 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) )--- Pattern ------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attributes:- copy : SELF - isUnderscore : Bool- pp : PP_Doc- alternatives:- alternative Alias:- child field : {Identifier}- child attr : {Identifier}- child pat : Pattern - 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 ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) )-sem_Pattern !(Constr _name _pats ) =- (sem_Pattern_Constr _name (sem_Patterns _pats ) )-sem_Pattern !(Irrefutable _pat ) =- (sem_Pattern_Irrefutable (sem_Pattern _pat ) )-sem_Pattern !(Product _pos _pats ) =- (sem_Pattern_Product _pos (sem_Patterns _pats ) )-sem_Pattern !(Underscore _pos ) =- (sem_Pattern_Underscore _pos )--- semantic domain-newtype T_Pattern = T_Pattern (Options ->- ( Pattern ,Bool,PP_Doc))-data Inh_Pattern = Inh_Pattern {options_Inh_Pattern :: !(Options)}-data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: !(Pattern ),isUnderscore_Syn_Pattern :: !(Bool),pp_Syn_Pattern :: !(PP_Doc)}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern !(T_Pattern sem ) !(Inh_Pattern _lhsIoptions ) =- (let ( !_lhsOcopy,!_lhsOisUnderscore,!_lhsOpp) = sem _lhsIoptions - in (Syn_Pattern _lhsOcopy _lhsOisUnderscore _lhsOpp ))-sem_Pattern_Alias :: Identifier ->- Identifier ->- T_Pattern ->- T_Pattern -sem_Pattern_Alias !field_ !attr_ !(T_Pattern pat_ ) =- (T_Pattern (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1658 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_patOoptions ->- (case (pat_ _patOoptions ) of- { ( !_patIcopy,!_patIisUnderscore,!_patIpp) ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Alias field_ attr_ _patIcopy- {-# LINE 1665 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1670 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 202 "src-ag/PrintOcamlCode.ag" #-}- False- {-# LINE 1675 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOisUnderscore ->- (case (({-# LINE 193 "src-ag/PrintOcamlCode.ag" #-}- if _patIisUnderscore- then pp (attrname False field_ attr_)- else error "pp of Pattern.Alias is only supported in the form (x@_)"- {-# LINE 1682 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) }) }) })) )-sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr !name_ !(T_Patterns pats_ ) =- (T_Pattern (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1693 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_patsOoptions ->- (case (pats_ _patsOoptions ) of- { ( !_patsIcopy,!_patsIpps) ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 1700 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1705 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 200 "src-ag/PrintOcamlCode.ag" #-}- False- {-# LINE 1710 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOisUnderscore ->- (case (({-# LINE 190 "src-ag/PrintOcamlCode.ag" #-}- pp_parens $ name_ >#< hv_sp _patsIpps- {-# LINE 1715 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) }) }) })) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable !(T_Pattern pat_ ) =- (T_Pattern (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1725 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_patOoptions ->- (case (pat_ _patOoptions ) of- { ( !_patIcopy,!_patIisUnderscore,!_patIpp) ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 1732 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1737 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 199 "src-ag/PrintOcamlCode.ag" #-}- _patIisUnderscore- {-# LINE 1742 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOisUnderscore ->- (case (({-# LINE 196 "src-ag/PrintOcamlCode.ag" #-}- error "pp of Pattern.Irrefutable not supported"- {-# LINE 1747 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) }) }) })) )-sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product !pos_ !(T_Patterns pats_ ) =- (T_Pattern (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1758 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_patsOoptions ->- (case (pats_ _patsOoptions ) of- { ( !_patsIcopy,!_patsIpps) ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 1765 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1770 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 201 "src-ag/PrintOcamlCode.ag" #-}- False- {-# LINE 1775 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOisUnderscore ->- (case (({-# LINE 191 "src-ag/PrintOcamlCode.ag" #-}- pp_block "(" ")" "," _patsIpps- {-# LINE 1780 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) }) }) })) )-sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore !pos_ =- (T_Pattern (\ (!_lhsIoptions) ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- Underscore pos_- {-# LINE 1790 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1795 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 203 "src-ag/PrintOcamlCode.ag" #-}- True- {-# LINE 1800 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOisUnderscore ->- (case (({-# LINE 197 "src-ag/PrintOcamlCode.ag" #-}- text "_"- {-# LINE 1805 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) })) )--- Patterns -----------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attributes:- copy : SELF - pps : PP_Docs- alternatives:- alternative Cons:- child hd : Pattern - child tl : Patterns - visit 0:- local copy : _- alternative Nil:- visit 0:- local copy : _--}--- cata-sem_Patterns :: Patterns ->- T_Patterns -sem_Patterns !list =- (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list) )--- semantic domain-newtype T_Patterns = T_Patterns (Options ->- ( Patterns ,PP_Docs))-data Inh_Patterns = Inh_Patterns {options_Inh_Patterns :: !(Options)}-data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: !(Patterns ),pps_Syn_Patterns :: !(PP_Docs)}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns !(T_Patterns sem ) !(Inh_Patterns _lhsIoptions ) =- (let ( !_lhsOcopy,!_lhsOpps) = sem _lhsIoptions - in (Syn_Patterns _lhsOcopy _lhsOpps ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons !(T_Pattern hd_ ) !(T_Patterns tl_ ) =- (T_Patterns (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1850 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_tlOoptions ->- (case (tl_ _tlOoptions ) of- { ( !_tlIcopy,!_tlIpps) ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1857 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_hdOoptions ->- (case (hd_ _hdOoptions ) of- { ( !_hdIcopy,!_hdIisUnderscore,!_hdIpp) ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 1864 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1869 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 88 "src-ag/PrintOcamlCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 1874 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOcopy,_lhsOpps) }) }) }) }) }) }) })) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =- (T_Patterns (\ (!_lhsIoptions) ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- []- {-# LINE 1883 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_copy ->- (case (({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1888 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOcopy ->- (case (({-# LINE 89 "src-ag/PrintOcamlCode.ag" #-}- []- {-# LINE 1893 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOcopy,_lhsOpps) }) }) })) )--- Program ------------------------------------------------------{-- visit 0:- inherited attributes:- options : Options- textBlockMap : Map BlockInfo PP_Doc- synthesized attribute:- output : PP_Docs- alternatives:- alternative Program:- child chunks : Chunks - child ordered : {Bool}--}--- cata-sem_Program :: Program ->- T_Program -sem_Program !(Program _chunks _ordered ) =- (sem_Program_Program (sem_Chunks _chunks ) _ordered )--- semantic domain-newtype T_Program = T_Program (Options ->- (Map BlockInfo PP_Doc) ->- ( PP_Docs))-data Inh_Program = Inh_Program {options_Inh_Program :: !(Options),textBlockMap_Inh_Program :: !((Map BlockInfo PP_Doc))}-data Syn_Program = Syn_Program {output_Syn_Program :: !(PP_Docs)}-wrap_Program :: T_Program ->- Inh_Program ->- Syn_Program -wrap_Program !(T_Program sem ) !(Inh_Program _lhsIoptions _lhsItextBlockMap ) =- (let ( !_lhsOoutput) = sem _lhsIoptions _lhsItextBlockMap - in (Syn_Program _lhsOoutput ))-sem_Program_Program :: T_Chunks ->- Bool ->- T_Program -sem_Program_Program !(T_Chunks chunks_ ) !ordered_ =- (T_Program (\ (!_lhsIoptions)- (!_lhsItextBlockMap) ->- (case (({-# LINE 45 "src-ag/PrintOcamlCode.ag" #-}- _lhsItextBlockMap- {-# LINE 1935 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_chunksOtextBlockMap ->- (case (({-# LINE 212 "src-ag/PrintOcamlCode.ag" #-}- True- {-# LINE 1940 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_chunksOisToplevel ->- (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1945 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_chunksOoptions ->- (case (chunks_ _chunksOisToplevel _chunksOoptions _chunksOtextBlockMap ) of- { ( !_chunksIpps) ->- (case (({-# LINE 57 "src-ag/PrintOcamlCode.ag" #-}- _chunksIpps- {-# LINE 1952 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOoutput ->- ( _lhsOoutput) }) }) }) }) })) )--- Type ---------------------------------------------------------{-- visit 0:- synthesized attribute:- pp : PP_Doc- alternatives:- alternative Arr:- child left : Type - child right : Type - alternative CtxApp:- child left : {[(String, [String])]}- child right : Type - alternative List:- child tp : Type - alternative NontermType:- child name : {String}- child params : {[String]}- child deforested : {Bool}- alternative QuantApp:- child left : {String}- child right : Type - alternative SimpleType:- child txt : {String}- alternative TEither:- child left : Type - child right : Type - alternative TIntMap:- child value : Type - alternative TMap:- child key : Type - child value : Type - alternative TMaybe:- child tp : Type - alternative TupleType:- child tps : Types - alternative TypeApp:- child func : Type - child args : Types - alternative UnboxedTupleType:- child tps : Types --}--- cata-sem_Type :: Type ->- T_Type -sem_Type !(Arr _left _right ) =- (sem_Type_Arr (sem_Type _left ) (sem_Type _right ) )-sem_Type !(CtxApp _left _right ) =- (sem_Type_CtxApp _left (sem_Type _right ) )-sem_Type !(List _tp ) =- (sem_Type_List (sem_Type _tp ) )-sem_Type !(NontermType _name _params _deforested ) =- (sem_Type_NontermType _name _params _deforested )-sem_Type !(QuantApp _left _right ) =- (sem_Type_QuantApp _left (sem_Type _right ) )-sem_Type !(SimpleType _txt ) =- (sem_Type_SimpleType _txt )-sem_Type !(TEither _left _right ) =- (sem_Type_TEither (sem_Type _left ) (sem_Type _right ) )-sem_Type !(TIntMap _value ) =- (sem_Type_TIntMap (sem_Type _value ) )-sem_Type !(TMap _key _value ) =- (sem_Type_TMap (sem_Type _key ) (sem_Type _value ) )-sem_Type !(TMaybe _tp ) =- (sem_Type_TMaybe (sem_Type _tp ) )-sem_Type !(TupleType _tps ) =- (sem_Type_TupleType (sem_Types _tps ) )-sem_Type !(TypeApp _func _args ) =- (sem_Type_TypeApp (sem_Type _func ) (sem_Types _args ) )-sem_Type !(UnboxedTupleType _tps ) =- (sem_Type_UnboxedTupleType (sem_Types _tps ) )--- semantic domain-newtype T_Type = T_Type (( PP_Doc))-data Inh_Type = Inh_Type {}-data Syn_Type = Syn_Type {pp_Syn_Type :: !(PP_Doc)}-wrap_Type :: T_Type ->- Inh_Type ->- Syn_Type -wrap_Type !(T_Type sem ) !(Inh_Type ) =- (let ( !_lhsOpp) = sem - in (Syn_Type _lhsOpp ))-sem_Type_Arr :: T_Type ->- T_Type ->- T_Type -sem_Type_Arr !(T_Type left_ ) !(T_Type right_ ) =- (T_Type (case (right_ ) of- { ( !_rightIpp) ->- (case (left_ ) of- { ( !_leftIpp) ->- (case (({-# LINE 160 "src-ag/PrintOcamlCode.ag" #-}- pp_parens (_leftIpp >#< "->" >#< _rightIpp)- {-# LINE 2046 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) )-sem_Type_CtxApp :: ([(String, [String])]) ->- T_Type ->- T_Type -sem_Type_CtxApp !left_ !(T_Type right_ ) =- (T_Type (case (({-# LINE 161 "src-ag/PrintOcamlCode.ag" #-}- error "pp of Type.CtxApp not supported"- {-# LINE 2056 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) )-sem_Type_List :: T_Type ->- T_Type -sem_Type_List !(T_Type tp_ ) =- (T_Type (case (tp_ ) of- { ( !_tpIpp) ->- (case (({-# LINE 166 "src-ag/PrintOcamlCode.ag" #-}- _tpIpp >#< "list"- {-# LINE 2067 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) )-sem_Type_NontermType :: String ->- ([String]) ->- Bool ->- T_Type -sem_Type_NontermType !name_ !params_ !deforested_ =- (T_Type (case (({-# LINE 168 "src-ag/PrintOcamlCode.ag" #-}- pp_block "(" ")" " " (map text params_ ++ [text $ toOcamlTC name_])- {-# LINE 2078 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) )-sem_Type_QuantApp :: String ->- T_Type ->- T_Type -sem_Type_QuantApp !left_ !(T_Type right_ ) =- (T_Type (case (right_ ) of- { ( !_rightIpp) ->- (case (({-# LINE 53 "src-ag/PrintOcamlCode.ag" #-}- _rightIpp- {-# LINE 2090 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) )-sem_Type_SimpleType :: String ->- T_Type -sem_Type_SimpleType !txt_ =- (T_Type (case (({-# LINE 167 "src-ag/PrintOcamlCode.ag" #-}- text txt_- {-# LINE 2099 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) )-sem_Type_TEither :: T_Type ->- T_Type ->- T_Type -sem_Type_TEither !(T_Type left_ ) !(T_Type right_ ) =- (T_Type (case (({-# LINE 170 "src-ag/PrintOcamlCode.ag" #-}- error "pp of Type.TEither is not supported"- {-# LINE 2109 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) )-sem_Type_TIntMap :: T_Type ->- T_Type -sem_Type_TIntMap !(T_Type value_ ) =- (T_Type (case (({-# LINE 172 "src-ag/PrintOcamlCode.ag" #-}- error "pp of Type.TIntMap is not supported"- {-# LINE 2118 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) )-sem_Type_TMap :: T_Type ->- T_Type ->- T_Type -sem_Type_TMap !(T_Type key_ ) !(T_Type value_ ) =- (T_Type (case (({-# LINE 171 "src-ag/PrintOcamlCode.ag" #-}- error "pp of Type.TMap is not supported"- {-# LINE 2128 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) )-sem_Type_TMaybe :: T_Type ->- T_Type -sem_Type_TMaybe !(T_Type tp_ ) =- (T_Type (case (tp_ ) of- { ( !_tpIpp) ->- (case (({-# LINE 169 "src-ag/PrintOcamlCode.ag" #-}- _tpIpp >#< "opt"- {-# LINE 2139 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) )-sem_Type_TupleType :: T_Types ->- T_Type -sem_Type_TupleType !(T_Types tps_ ) =- (T_Type (case (tps_ ) of- { ( !_tpsIpps) ->- (case (({-# LINE 163 "src-ag/PrintOcamlCode.ag" #-}- pp_block "(" ")" "," _tpsIpps- {-# LINE 2150 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) )-sem_Type_TypeApp :: T_Type ->- T_Types ->- T_Type -sem_Type_TypeApp !(T_Type func_ ) !(T_Types args_ ) =- (T_Type (case (args_ ) of- { ( !_argsIpps) ->- (case (func_ ) of- { ( !_funcIpp) ->- (case (({-# LINE 162 "src-ag/PrintOcamlCode.ag" #-}- pp_parens (hv_sp (_argsIpps ++ [_funcIpp]))- {-# LINE 2164 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) )-sem_Type_UnboxedTupleType :: T_Types ->- T_Type -sem_Type_UnboxedTupleType !(T_Types tps_ ) =- (T_Type (case (({-# LINE 165 "src-ag/PrintOcamlCode.ag" #-}- error "pp of Type.UnboxedTupleType is not supported"- {-# LINE 2173 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpp ->- ( _lhsOpp) }) )--- Types --------------------------------------------------------{-- visit 0:- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : Type - child tl : Types - alternative Nil:--}--- cata-sem_Types :: Types ->- T_Types -sem_Types !list =- (Prelude.foldr sem_Types_Cons sem_Types_Nil (Prelude.map sem_Type list) )--- semantic domain-newtype T_Types = T_Types (( PP_Docs))-data Inh_Types = Inh_Types {}-data Syn_Types = Syn_Types {pps_Syn_Types :: !(PP_Docs)}-wrap_Types :: T_Types ->- Inh_Types ->- Syn_Types -wrap_Types !(T_Types sem ) !(Inh_Types ) =- (let ( !_lhsOpps) = sem - in (Syn_Types _lhsOpps ))-sem_Types_Cons :: T_Type ->- T_Types ->- T_Types -sem_Types_Cons !(T_Type hd_ ) !(T_Types tl_ ) =- (T_Types (case (tl_ ) of- { ( !_tlIpps) ->- (case (hd_ ) of- { ( !_hdIpp) ->- (case (({-# LINE 72 "src-ag/PrintOcamlCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 2213 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) )-sem_Types_Nil :: T_Types -sem_Types_Nil =- (T_Types (case (({-# LINE 73 "src-ag/PrintOcamlCode.ag" #-}- []- {-# LINE 2221 "src-ag/PrintOcamlCode.hs" #-}- )) of- { !_lhsOpps ->- ( _lhsOpps) }) )+-- UUAGC 0.9.40.1 (src-ag/PrintOcamlCode.ag)+module PrintOcamlCode where+{-# LINE 10 "src-ag/PrintOcamlCode.ag" #-}++import Pretty+import Code+import Patterns+import Options+import CommonTypes hiding (List,Type,Map,Maybe,IntMap,Either)+import Data.List(intersperse,intercalate)+import Data.Char(toLower)+{-# LINE 15 "dist/build/PrintOcamlCode.hs" #-}++{-# LINE 2 "src-ag/Code.ag" #-}++import Pretty+import Patterns+import Data.List(partition)+import Data.Set(Set)+import qualified Data.Set as Set+import Data.Map(Map)+import qualified Data.Map as Map+{-# LINE 26 "dist/build/PrintOcamlCode.hs" #-}++{-# LINE 2 "src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 33 "dist/build/PrintOcamlCode.hs" #-}+{-# LINE 21 "src-ag/PrintOcamlCode.ag" #-}++type PP_Docs = [PP_Doc]++ppMultiSeqH :: [PP_Doc] -> PP_Doc -> PP_Doc+ppMultiSeqH = ppMultiSeq' (>#<)++ppMultiSeqV :: [PP_Doc] -> PP_Doc -> PP_Doc+ppMultiSeqV = ppMultiSeq' (>-<)++ppMultiSeq' :: (PP_Doc -> PP_Doc -> PP_Doc) -> [PP_Doc] -> PP_Doc -> PP_Doc+ppMultiSeq' next strictArgs expr+ = foldr (\v r -> (v >#< "`seq`") `next` pp_parens r) expr strictArgs++ppTuple True pps = "(" >|< pp_block " " (replicate (length pps `max` 1) ')') ",(" pps+ppTuple False pps = "(" >|< pp_block " " ")" "," pps+{-# LINE 50 "dist/build/PrintOcamlCode.hs" #-}++{-# LINE 174 "src-ag/PrintOcamlCode.ag" #-}++toOcamlTC (c:cs) = toLower c : cs+toOcamlTC xs = xs+{-# LINE 56 "dist/build/PrintOcamlCode.hs" #-}++{-# LINE 146 "src-ag/Code.ag" #-}++-- Unboxed tuples+-- unbox Whether unboxed tuples are wanted or not+-- inh The inherited attributes.+-- If there are none, no unboxing can take place,+-- because in that case the semantic function (a top-level identifier) would have an unboxed type.+-- Of course we can't have an unboxed 1-tuple+mkTupleExpr :: Bool -> Bool -> Exprs -> Expr+mkTupleExpr unbox noInh exprs | not unbox || noInh || length exprs == 1 = TupleExpr exprs+ | otherwise = UnboxedTupleExpr exprs+mkTupleType :: Bool -> Bool -> Types -> Type+mkTupleType unbox noInh tps | not unbox || noInh || length tps == 1 = TupleType tps+ | otherwise = UnboxedTupleType tps+mkTupleLhs :: Bool -> Bool -> [String] -> Lhs+mkTupleLhs unbox noInh comps | not unbox || noInh || length comps == 1 = TupleLhs comps+ | otherwise = UnboxedTupleLhs comps+{-# LINE 75 "dist/build/PrintOcamlCode.hs" #-}+-- CaseAlt -----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative CaseAlt:+ child left : Lhs + child expr : Expr +-}+-- cata+sem_CaseAlt :: CaseAlt ->+ T_CaseAlt+sem_CaseAlt !(CaseAlt _left _expr) =+ (sem_CaseAlt_CaseAlt (sem_Lhs _left) (sem_Expr _expr))+-- semantic domain+newtype T_CaseAlt = T_CaseAlt (Options ->+ ( PP_Doc))+data Inh_CaseAlt = Inh_CaseAlt {options_Inh_CaseAlt :: !(Options)}+data Syn_CaseAlt = Syn_CaseAlt {pp_Syn_CaseAlt :: !(PP_Doc)}+wrap_CaseAlt :: T_CaseAlt ->+ Inh_CaseAlt ->+ Syn_CaseAlt+wrap_CaseAlt !(T_CaseAlt sem) !(Inh_CaseAlt _lhsIoptions) =+ (let ( !_lhsOpp) = sem _lhsIoptions+ in (Syn_CaseAlt _lhsOpp))+sem_CaseAlt_CaseAlt :: T_Lhs ->+ T_Expr ->+ T_CaseAlt+sem_CaseAlt_CaseAlt !(T_Lhs left_) !(T_Expr expr_) =+ (T_CaseAlt (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 111 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_exprOoptions ->+ (case (expr_ _exprOoptions) of+ { ( !_exprIpp) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 118 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_leftOoptions ->+ (case (left_ _leftOoptions) of+ { ( !_leftIpp) ->+ (case (({-# LINE 180 "src-ag/PrintOcamlCode.ag" #-}+ _leftIpp >#< "->" >#< _exprIpp+ {-# LINE 125 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })))+-- CaseAlts ----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : CaseAlt + child tl : CaseAlts + alternative Nil:+-}+-- cata+sem_CaseAlts :: CaseAlts ->+ T_CaseAlts+sem_CaseAlts !list =+ (Prelude.foldr sem_CaseAlts_Cons sem_CaseAlts_Nil (Prelude.map sem_CaseAlt list))+-- semantic domain+newtype T_CaseAlts = T_CaseAlts (Options ->+ ( PP_Docs))+data Inh_CaseAlts = Inh_CaseAlts {options_Inh_CaseAlts :: !(Options)}+data Syn_CaseAlts = Syn_CaseAlts {pps_Syn_CaseAlts :: !(PP_Docs)}+wrap_CaseAlts :: T_CaseAlts ->+ Inh_CaseAlts ->+ Syn_CaseAlts+wrap_CaseAlts !(T_CaseAlts sem) !(Inh_CaseAlts _lhsIoptions) =+ (let ( !_lhsOpps) = sem _lhsIoptions+ in (Syn_CaseAlts _lhsOpps))+sem_CaseAlts_Cons :: T_CaseAlt ->+ T_CaseAlts ->+ T_CaseAlts+sem_CaseAlts_Cons !(T_CaseAlt hd_) !(T_CaseAlts tl_) =+ (T_CaseAlts (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 165 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_tlOoptions ->+ (case (tl_ _tlOoptions) of+ { ( !_tlIpps) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 172 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_hdOoptions ->+ (case (hd_ _hdOoptions) of+ { ( !_hdIpp) ->+ (case (({-# LINE 64 "src-ag/PrintOcamlCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 179 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) })))+sem_CaseAlts_Nil :: T_CaseAlts+sem_CaseAlts_Nil =+ (T_CaseAlts (\ (!_lhsIoptions) ->+ (case (({-# LINE 65 "src-ag/PrintOcamlCode.ag" #-}+ []+ {-# LINE 188 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) })))+-- Chunk -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ isToplevel : Bool+ options : Options+ textBlockMap : Map BlockInfo PP_Doc+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Chunk:+ child name : {String}+ child comment : Decl + child info : Decls + child dataDef : Decls + child cataFun : Decls + child semDom : Decls + child semWrapper : Decls + child semFunctions : Decls + child semNames : {[String]}+-}+-- cata+sem_Chunk :: Chunk ->+ T_Chunk+sem_Chunk !(Chunk _name _comment _info _dataDef _cataFun _semDom _semWrapper _semFunctions _semNames) =+ (sem_Chunk_Chunk _name (sem_Decl _comment) (sem_Decls _info) (sem_Decls _dataDef) (sem_Decls _cataFun) (sem_Decls _semDom) (sem_Decls _semWrapper) (sem_Decls _semFunctions) _semNames)+-- semantic domain+newtype T_Chunk = T_Chunk (Bool ->+ Options ->+ (Map BlockInfo PP_Doc) ->+ ( PP_Docs))+data Inh_Chunk = Inh_Chunk {isToplevel_Inh_Chunk :: !(Bool),options_Inh_Chunk :: !(Options),textBlockMap_Inh_Chunk :: !((Map BlockInfo PP_Doc))}+data Syn_Chunk = Syn_Chunk {pps_Syn_Chunk :: !(PP_Docs)}+wrap_Chunk :: T_Chunk ->+ Inh_Chunk ->+ Syn_Chunk+wrap_Chunk !(T_Chunk sem) !(Inh_Chunk _lhsIisToplevel _lhsIoptions _lhsItextBlockMap) =+ (let ( !_lhsOpps) = sem _lhsIisToplevel _lhsIoptions _lhsItextBlockMap+ in (Syn_Chunk _lhsOpps))+sem_Chunk_Chunk :: String ->+ T_Decl ->+ T_Decls ->+ T_Decls ->+ T_Decls ->+ T_Decls ->+ T_Decls ->+ T_Decls ->+ ([String]) ->+ T_Chunk+sem_Chunk_Chunk !name_ !(T_Decl comment_) !(T_Decls info_) !(T_Decls dataDef_) !(T_Decls cataFun_) !(T_Decls semDom_) !(T_Decls semWrapper_) !(T_Decls semFunctions_) !semNames_ =+ (T_Chunk (\ (!_lhsIisToplevel)+ (!_lhsIoptions)+ (!_lhsItextBlockMap) ->+ (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 247 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_semFunctionsOisToplevel ->+ (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 252 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_semWrapperOisToplevel ->+ (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 257 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_semDomOisToplevel ->+ (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 262 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_cataFunOisToplevel ->+ (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 267 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_dataDefOisToplevel ->+ (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 272 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_infoOisToplevel ->+ (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 277 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_commentOisToplevel ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 282 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_semFunctionsOoptions ->+ (case (semFunctions_ _semFunctionsOisToplevel _semFunctionsOoptions) of+ { ( !_semFunctionsIpps) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 289 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_semWrapperOoptions ->+ (case (semWrapper_ _semWrapperOisToplevel _semWrapperOoptions) of+ { ( !_semWrapperIpps) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 296 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_semDomOoptions ->+ (case (semDom_ _semDomOisToplevel _semDomOoptions) of+ { ( !_semDomIpps) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 303 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_cataFunOoptions ->+ (case (cataFun_ _cataFunOisToplevel _cataFunOoptions) of+ { ( !_cataFunIpps) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 310 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_dataDefOoptions ->+ (case (dataDef_ _dataDefOisToplevel _dataDefOoptions) of+ { ( !_dataDefIpps) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 317 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_infoOoptions ->+ (case (info_ _infoOisToplevel _infoOoptions) of+ { ( !_infoIpps) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 324 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_commentOoptions ->+ (case (comment_ _commentOisToplevel _commentOoptions) of+ { ( !_commentIpp) ->+ (case (({-# LINE 96 "src-ag/PrintOcamlCode.ag" #-}+ _commentIpp+ : _infoIpps+ ++ _dataDefIpps+ ++ _semDomIpps+ ++ _semFunctionsIpps+ ++ _semWrapperIpps+ ++ _cataFunIpps+ ++ [Map.findWithDefault empty (BlockOther, Just $ identifier name_) _lhsItextBlockMap]+ {-# LINE 338 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })))+-- Chunks ------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ isToplevel : Bool+ options : Options+ textBlockMap : Map BlockInfo PP_Doc+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Chunk + child tl : Chunks + alternative Nil:+-}+-- cata+sem_Chunks :: Chunks ->+ T_Chunks+sem_Chunks !list =+ (Prelude.foldr sem_Chunks_Cons sem_Chunks_Nil (Prelude.map sem_Chunk list))+-- semantic domain+newtype T_Chunks = T_Chunks (Bool ->+ Options ->+ (Map BlockInfo PP_Doc) ->+ ( PP_Docs))+data Inh_Chunks = Inh_Chunks {isToplevel_Inh_Chunks :: !(Bool),options_Inh_Chunks :: !(Options),textBlockMap_Inh_Chunks :: !((Map BlockInfo PP_Doc))}+data Syn_Chunks = Syn_Chunks {pps_Syn_Chunks :: !(PP_Docs)}+wrap_Chunks :: T_Chunks ->+ Inh_Chunks ->+ Syn_Chunks+wrap_Chunks !(T_Chunks sem) !(Inh_Chunks _lhsIisToplevel _lhsIoptions _lhsItextBlockMap) =+ (let ( !_lhsOpps) = sem _lhsIisToplevel _lhsIoptions _lhsItextBlockMap+ in (Syn_Chunks _lhsOpps))+sem_Chunks_Cons :: T_Chunk ->+ T_Chunks ->+ T_Chunks+sem_Chunks_Cons !(T_Chunk hd_) !(T_Chunks tl_) =+ (T_Chunks (\ (!_lhsIisToplevel)+ (!_lhsIoptions)+ (!_lhsItextBlockMap) ->+ (case (({-# LINE 45 "src-ag/PrintOcamlCode.ag" #-}+ _lhsItextBlockMap+ {-# LINE 384 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_tlOtextBlockMap ->+ (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 389 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_tlOisToplevel ->+ (case (({-# LINE 45 "src-ag/PrintOcamlCode.ag" #-}+ _lhsItextBlockMap+ {-# LINE 394 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_hdOtextBlockMap ->+ (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 399 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_hdOisToplevel ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 404 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_tlOoptions ->+ (case (tl_ _tlOisToplevel _tlOoptions _tlOtextBlockMap) of+ { ( !_tlIpps) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 411 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_hdOoptions ->+ (case (hd_ _hdOisToplevel _hdOoptions _hdOtextBlockMap) of+ { ( !_hdIpps) ->+ (case (({-# LINE 84 "src-ag/PrintOcamlCode.ag" #-}+ _hdIpps ++ _tlIpps+ {-# LINE 418 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) }) }) }) }) })))+sem_Chunks_Nil :: T_Chunks+sem_Chunks_Nil =+ (T_Chunks (\ (!_lhsIisToplevel)+ (!_lhsIoptions)+ (!_lhsItextBlockMap) ->+ (case (({-# LINE 85 "src-ag/PrintOcamlCode.ag" #-}+ []+ {-# LINE 429 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) })))+-- DataAlt -----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative DataAlt:+ child name : {String}+ child args : Types + alternative Record:+ child name : {String}+ child args : NamedTypes +-}+-- cata+sem_DataAlt :: DataAlt ->+ T_DataAlt+sem_DataAlt !(DataAlt _name _args) =+ (sem_DataAlt_DataAlt _name (sem_Types _args))+sem_DataAlt !(Record _name _args) =+ (sem_DataAlt_Record _name (sem_NamedTypes _args))+-- semantic domain+newtype T_DataAlt = T_DataAlt (( PP_Doc))+data Inh_DataAlt = Inh_DataAlt {}+data Syn_DataAlt = Syn_DataAlt {pp_Syn_DataAlt :: !(PP_Doc)}+wrap_DataAlt :: T_DataAlt ->+ Inh_DataAlt ->+ Syn_DataAlt+wrap_DataAlt !(T_DataAlt sem) !(Inh_DataAlt) =+ (let ( !_lhsOpp) = sem+ in (Syn_DataAlt _lhsOpp))+sem_DataAlt_DataAlt :: String ->+ T_Types ->+ T_DataAlt+sem_DataAlt_DataAlt !name_ !(T_Types args_) =+ (T_DataAlt (case (args_) of+ { ( !_argsIpps) ->+ (case (({-# LINE 183 "src-ag/PrintOcamlCode.ag" #-}+ name_ >#< "of" >#< pp_block "" "" " * " (map pp_parens _argsIpps)+ {-# LINE 471 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }))+sem_DataAlt_Record :: String ->+ T_NamedTypes ->+ T_DataAlt+sem_DataAlt_Record !name_ !(T_NamedTypes args_) =+ (T_DataAlt (case (args_) of+ { ( !_argsIpps) ->+ (case (({-# LINE 184 "src-ag/PrintOcamlCode.ag" #-}+ pp_block "{" "}" ";" _argsIpps+ {-# LINE 483 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }))+-- DataAlts ----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : DataAlt + child tl : DataAlts + alternative Nil:+-}+-- cata+sem_DataAlts :: DataAlts ->+ T_DataAlts+sem_DataAlts !list =+ (Prelude.foldr sem_DataAlts_Cons sem_DataAlts_Nil (Prelude.map sem_DataAlt list))+-- semantic domain+newtype T_DataAlts = T_DataAlts (( PP_Docs))+data Inh_DataAlts = Inh_DataAlts {}+data Syn_DataAlts = Syn_DataAlts {pps_Syn_DataAlts :: !(PP_Docs)}+wrap_DataAlts :: T_DataAlts ->+ Inh_DataAlts ->+ Syn_DataAlts+wrap_DataAlts !(T_DataAlts sem) !(Inh_DataAlts) =+ (let ( !_lhsOpps) = sem+ in (Syn_DataAlts _lhsOpps))+sem_DataAlts_Cons :: T_DataAlt ->+ T_DataAlts ->+ T_DataAlts+sem_DataAlts_Cons !(T_DataAlt hd_) !(T_DataAlts tl_) =+ (T_DataAlts (case (tl_) of+ { ( !_tlIpps) ->+ (case (hd_) of+ { ( !_hdIpp) ->+ (case (({-# LINE 68 "src-ag/PrintOcamlCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 523 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }))+sem_DataAlts_Nil :: T_DataAlts+sem_DataAlts_Nil =+ (T_DataAlts (case (({-# LINE 69 "src-ag/PrintOcamlCode.ag" #-}+ []+ {-# LINE 531 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }))+-- Decl --------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ isToplevel : Bool+ options : Options+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative Bind:+ child left : Lhs + child rhs : Expr + alternative BindLet:+ child left : Lhs + child rhs : Expr + alternative Comment:+ child txt : {String}+ alternative Data:+ child name : {String}+ child params : {[String]}+ child alts : DataAlts + child strict : {Bool}+ child derivings : {[String]}+ alternative Decl:+ child left : Lhs + child rhs : Expr + child binds : {Set String}+ child uses : {Set String}+ alternative EvalDecl:+ child nt : {String}+ child left : Lhs + child rhs : Expr + alternative NewType:+ child name : {String}+ child params : {[String]}+ child con : {String}+ child tp : Type + alternative PragmaDecl:+ child txt : {String}+ alternative Resume:+ child monadic : {Bool}+ child nt : {String}+ child left : Lhs + child rhs : Expr + alternative TSig:+ child name : {String}+ child tp : Type + alternative Type:+ child name : {String}+ child params : {[String]}+ child tp : Type +-}+-- cata+sem_Decl :: Decl ->+ T_Decl+sem_Decl !(Bind _left _rhs) =+ (sem_Decl_Bind (sem_Lhs _left) (sem_Expr _rhs))+sem_Decl !(BindLet _left _rhs) =+ (sem_Decl_BindLet (sem_Lhs _left) (sem_Expr _rhs))+sem_Decl !(Comment _txt) =+ (sem_Decl_Comment _txt)+sem_Decl !(Data _name _params _alts _strict _derivings) =+ (sem_Decl_Data _name _params (sem_DataAlts _alts) _strict _derivings)+sem_Decl !(Decl _left _rhs _binds _uses) =+ (sem_Decl_Decl (sem_Lhs _left) (sem_Expr _rhs) _binds _uses)+sem_Decl !(EvalDecl _nt _left _rhs) =+ (sem_Decl_EvalDecl _nt (sem_Lhs _left) (sem_Expr _rhs))+sem_Decl !(NewType _name _params _con _tp) =+ (sem_Decl_NewType _name _params _con (sem_Type _tp))+sem_Decl !(PragmaDecl _txt) =+ (sem_Decl_PragmaDecl _txt)+sem_Decl !(Resume _monadic _nt _left _rhs) =+ (sem_Decl_Resume _monadic _nt (sem_Lhs _left) (sem_Expr _rhs))+sem_Decl !(TSig _name _tp) =+ (sem_Decl_TSig _name (sem_Type _tp))+sem_Decl !(Type _name _params _tp) =+ (sem_Decl_Type _name _params (sem_Type _tp))+-- semantic domain+newtype T_Decl = T_Decl (Bool ->+ Options ->+ ( PP_Doc))+data Inh_Decl = Inh_Decl {isToplevel_Inh_Decl :: !(Bool),options_Inh_Decl :: !(Options)}+data Syn_Decl = Syn_Decl {pp_Syn_Decl :: !(PP_Doc)}+wrap_Decl :: T_Decl ->+ Inh_Decl ->+ Syn_Decl+wrap_Decl !(T_Decl sem) !(Inh_Decl _lhsIisToplevel _lhsIoptions) =+ (let ( !_lhsOpp) = sem _lhsIisToplevel _lhsIoptions+ in (Syn_Decl _lhsOpp))+sem_Decl_Bind :: T_Lhs ->+ T_Expr ->+ T_Decl+sem_Decl_Bind !(T_Lhs left_) !(T_Expr rhs_) =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 111 "src-ag/PrintOcamlCode.ag" #-}+ error "pp of Decl.Bind not supported"+ {-# LINE 632 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) })))+sem_Decl_BindLet :: T_Lhs ->+ T_Expr ->+ T_Decl+sem_Decl_BindLet !(T_Lhs left_) !(T_Expr rhs_) =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 112 "src-ag/PrintOcamlCode.ag" #-}+ error "pp of Decl.BindLet not supported"+ {-# LINE 644 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) })))+sem_Decl_Comment :: String ->+ T_Decl+sem_Decl_Comment !txt_ =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 123 "src-ag/PrintOcamlCode.ag" #-}+ if '\n' `elem` txt_+ then "(* " >-< vlist (lines txt_) >-< "*)"+ else "(*" >#< txt_ >#< "*)"+ {-# LINE 657 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) })))+sem_Decl_Data :: String ->+ ([String]) ->+ T_DataAlts ->+ Bool ->+ ([String]) ->+ T_Decl+sem_Decl_Data !name_ !params_ !(T_DataAlts alts_) !strict_ !derivings_ =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (alts_) of+ { ( !_altsIpps) ->+ (case (({-# LINE 113 "src-ag/PrintOcamlCode.ag" #-}+ "type" >#< hv_sp (map (\p -> "'" >|< p) params_ ++ [text $ toOcamlTC name_])+ >#< ( case _altsIpps of+ [] -> empty+ (x:xs) -> "=" >#< x+ >-< vlist (map ("|" >#<) xs)+ )+ >#< ";;"+ {-# LINE 680 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) })))+sem_Decl_Decl :: T_Lhs ->+ T_Expr ->+ (Set String) ->+ (Set String) ->+ T_Decl+sem_Decl_Decl !(T_Lhs left_) !(T_Expr rhs_) !binds_ !uses_ =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 694 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_rhsOoptions ->+ (case (rhs_ _rhsOoptions) of+ { ( !_rhsIpp) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 701 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_leftOoptions ->+ (case (left_ _leftOoptions) of+ { ( !_leftIpp) ->+ (case (({-# LINE 106 "src-ag/PrintOcamlCode.ag" #-}+ if _lhsIisToplevel+ then "let" >#< _leftIpp >#< "="+ >-< indent 4 _rhsIpp >#< ";;"+ else "let" >#< _leftIpp >#< "="+ >-< indent 4 _rhsIpp >#< "in"+ {-# LINE 712 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })))+sem_Decl_EvalDecl :: String ->+ T_Lhs ->+ T_Expr ->+ T_Decl+sem_Decl_EvalDecl !nt_ !(T_Lhs left_) !(T_Expr rhs_) =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 725 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_rhsOoptions ->+ (case (rhs_ _rhsOoptions) of+ { ( !_rhsIpp) ->+ (case (({-# LINE 53 "src-ag/PrintOcamlCode.ag" #-}+ _rhsIpp+ {-# LINE 732 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+sem_Decl_NewType :: String ->+ ([String]) ->+ String ->+ T_Type ->+ T_Decl+sem_Decl_NewType !name_ !params_ !con_ !(T_Type tp_) =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 120 "src-ag/PrintOcamlCode.ag" #-}+ error "pp of Decl.NewType not supported"+ {-# LINE 746 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) })))+sem_Decl_PragmaDecl :: String ->+ T_Decl+sem_Decl_PragmaDecl !txt_ =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 126 "src-ag/PrintOcamlCode.ag" #-}+ error "pp of Decl.PragmaDecl not supported"+ {-# LINE 757 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) })))+sem_Decl_Resume :: Bool ->+ String ->+ T_Lhs ->+ T_Expr ->+ T_Decl+sem_Decl_Resume !monadic_ !nt_ !(T_Lhs left_) !(T_Expr rhs_) =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 771 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_rhsOoptions ->+ (case (rhs_ _rhsOoptions) of+ { ( !_rhsIpp) ->+ (case (({-# LINE 53 "src-ag/PrintOcamlCode.ag" #-}+ _rhsIpp+ {-# LINE 778 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+sem_Decl_TSig :: String ->+ T_Type ->+ T_Decl+sem_Decl_TSig !name_ !(T_Type tp_) =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (tp_) of+ { ( !_tpIpp) ->+ (case (({-# LINE 122 "src-ag/PrintOcamlCode.ag" #-}+ "(*" >#< name_ >#< ":" >#< _tpIpp >#< "*)"+ {-# LINE 792 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) })))+sem_Decl_Type :: String ->+ ([String]) ->+ T_Type ->+ T_Decl+sem_Decl_Type !name_ !params_ !(T_Type tp_) =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (tp_) of+ { ( !_tpIpp) ->+ (case (({-# LINE 121 "src-ag/PrintOcamlCode.ag" #-}+ "type" >#< hv_sp (map (\p -> "'" >|< p) params_ ++ [text $ toOcamlTC name_]) >#< "=" >#< _tpIpp >#< ";;"+ {-# LINE 807 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) })))+-- Decls -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ isToplevel : Bool+ options : Options+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Decl + child tl : Decls + alternative Nil:+-}+-- cata+sem_Decls :: Decls ->+ T_Decls+sem_Decls !list =+ (Prelude.foldr sem_Decls_Cons sem_Decls_Nil (Prelude.map sem_Decl list))+-- semantic domain+newtype T_Decls = T_Decls (Bool ->+ Options ->+ ( PP_Docs))+data Inh_Decls = Inh_Decls {isToplevel_Inh_Decls :: !(Bool),options_Inh_Decls :: !(Options)}+data Syn_Decls = Syn_Decls {pps_Syn_Decls :: !(PP_Docs)}+wrap_Decls :: T_Decls ->+ Inh_Decls ->+ Syn_Decls+wrap_Decls !(T_Decls sem) !(Inh_Decls _lhsIisToplevel _lhsIoptions) =+ (let ( !_lhsOpps) = sem _lhsIisToplevel _lhsIoptions+ in (Syn_Decls _lhsOpps))+sem_Decls_Cons :: T_Decl ->+ T_Decls ->+ T_Decls+sem_Decls_Cons !(T_Decl hd_) !(T_Decls tl_) =+ (T_Decls (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 850 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_tlOisToplevel ->+ (case (({-# LINE 209 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 855 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_hdOisToplevel ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 860 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_tlOoptions ->+ (case (tl_ _tlOisToplevel _tlOoptions) of+ { ( !_tlIpps) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 867 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_hdOoptions ->+ (case (hd_ _hdOisToplevel _hdOoptions) of+ { ( !_hdIpp) ->+ (case (({-# LINE 80 "src-ag/PrintOcamlCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 874 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) }) }) })))+sem_Decls_Nil :: T_Decls+sem_Decls_Nil =+ (T_Decls (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 81 "src-ag/PrintOcamlCode.ag" #-}+ []+ {-# LINE 884 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) })))+-- Expr --------------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative App:+ child name : {String}+ child args : Exprs + alternative Case:+ child expr : Expr + child alts : CaseAlts + alternative Do:+ child stmts : Decls + child body : Expr + alternative InvokeExpr:+ child nt : {String}+ child expr : Expr + child args : Exprs + alternative Lambda:+ child args : Exprs + child body : Expr + alternative Let:+ child decls : Decls + child body : Expr + alternative LineExpr:+ child expr : Expr + alternative PragmaExpr:+ child onLeftSide : {Bool}+ child onNewLine : {Bool}+ child txt : {String}+ child expr : Expr + alternative ResultExpr:+ child nt : {String}+ child expr : Expr + alternative ResumeExpr:+ child nt : {String}+ child expr : Expr + child left : Lhs + child rhs : Expr + alternative SemFun:+ child nt : {String}+ child args : Exprs + child body : Expr + alternative SimpleExpr:+ child txt : {String}+ alternative TextExpr:+ child lns : {[String]}+ alternative Trace:+ child txt : {String}+ child expr : Expr + alternative TupleExpr:+ child exprs : Exprs + alternative TypedExpr:+ child expr : Expr + child tp : Type + alternative UnboxedTupleExpr:+ child exprs : Exprs +-}+-- cata+sem_Expr :: Expr ->+ T_Expr+sem_Expr !(App _name _args) =+ (sem_Expr_App _name (sem_Exprs _args))+sem_Expr !(Case _expr _alts) =+ (sem_Expr_Case (sem_Expr _expr) (sem_CaseAlts _alts))+sem_Expr !(Do _stmts _body) =+ (sem_Expr_Do (sem_Decls _stmts) (sem_Expr _body))+sem_Expr !(InvokeExpr _nt _expr _args) =+ (sem_Expr_InvokeExpr _nt (sem_Expr _expr) (sem_Exprs _args))+sem_Expr !(Lambda _args _body) =+ (sem_Expr_Lambda (sem_Exprs _args) (sem_Expr _body))+sem_Expr !(Let _decls _body) =+ (sem_Expr_Let (sem_Decls _decls) (sem_Expr _body))+sem_Expr !(LineExpr _expr) =+ (sem_Expr_LineExpr (sem_Expr _expr))+sem_Expr !(PragmaExpr _onLeftSide _onNewLine _txt _expr) =+ (sem_Expr_PragmaExpr _onLeftSide _onNewLine _txt (sem_Expr _expr))+sem_Expr !(ResultExpr _nt _expr) =+ (sem_Expr_ResultExpr _nt (sem_Expr _expr))+sem_Expr !(ResumeExpr _nt _expr _left _rhs) =+ (sem_Expr_ResumeExpr _nt (sem_Expr _expr) (sem_Lhs _left) (sem_Expr _rhs))+sem_Expr !(SemFun _nt _args _body) =+ (sem_Expr_SemFun _nt (sem_Exprs _args) (sem_Expr _body))+sem_Expr !(SimpleExpr _txt) =+ (sem_Expr_SimpleExpr _txt)+sem_Expr !(TextExpr _lns) =+ (sem_Expr_TextExpr _lns)+sem_Expr !(Trace _txt _expr) =+ (sem_Expr_Trace _txt (sem_Expr _expr))+sem_Expr !(TupleExpr _exprs) =+ (sem_Expr_TupleExpr (sem_Exprs _exprs))+sem_Expr !(TypedExpr _expr _tp) =+ (sem_Expr_TypedExpr (sem_Expr _expr) (sem_Type _tp))+sem_Expr !(UnboxedTupleExpr _exprs) =+ (sem_Expr_UnboxedTupleExpr (sem_Exprs _exprs))+-- semantic domain+newtype T_Expr = T_Expr (Options ->+ ( PP_Doc))+data Inh_Expr = Inh_Expr {options_Inh_Expr :: !(Options)}+data Syn_Expr = Syn_Expr {pp_Syn_Expr :: !(PP_Doc)}+wrap_Expr :: T_Expr ->+ Inh_Expr ->+ Syn_Expr+wrap_Expr !(T_Expr sem) !(Inh_Expr _lhsIoptions) =+ (let ( !_lhsOpp) = sem _lhsIoptions+ in (Syn_Expr _lhsOpp))+sem_Expr_App :: String ->+ T_Exprs ->+ T_Expr+sem_Expr_App !name_ !(T_Exprs args_) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1004 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_argsOoptions ->+ (case (args_ _argsOoptions) of+ { ( !_argsIpps) ->+ (case (({-# LINE 143 "src-ag/PrintOcamlCode.ag" #-}+ pp_parens $ name_ >#< hv_sp _argsIpps+ {-# LINE 1011 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+sem_Expr_Case :: T_Expr ->+ T_CaseAlts ->+ T_Expr+sem_Expr_Case !(T_Expr expr_) !(T_CaseAlts alts_) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1022 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_altsOoptions ->+ (case (alts_ _altsOoptions) of+ { ( !_altsIpps) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1029 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_exprOoptions ->+ (case (expr_ _exprOoptions) of+ { ( !_exprIpp) ->+ (case (({-# LINE 131 "src-ag/PrintOcamlCode.ag" #-}+ pp_parens ( "match" >#< _exprIpp >#< "with"+ >-< indent 2 ( case _altsIpps of+ [] -> empty+ (x:xs) -> " " >#< x+ >-< vlist (map ("|" >#<) xs)+ )+ )+ {-# LINE 1042 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })))+sem_Expr_Do :: T_Decls ->+ T_Expr ->+ T_Expr+sem_Expr_Do !(T_Decls stmts_) !(T_Expr body_) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 138 "src-ag/PrintOcamlCode.ag" #-}+ error "pp of Expr.Do not supported"+ {-# LINE 1053 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) })))+sem_Expr_InvokeExpr :: String ->+ T_Expr ->+ T_Exprs ->+ T_Expr+sem_Expr_InvokeExpr !nt_ !(T_Expr expr_) !(T_Exprs args_) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1065 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_exprOoptions ->+ (case (expr_ _exprOoptions) of+ { ( !_exprIpp) ->+ (case (({-# LINE 53 "src-ag/PrintOcamlCode.ag" #-}+ _exprIpp+ {-# LINE 1072 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+sem_Expr_Lambda :: T_Exprs ->+ T_Expr ->+ T_Expr+sem_Expr_Lambda !(T_Exprs args_) !(T_Expr body_) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1083 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_bodyOoptions ->+ (case (body_ _bodyOoptions) of+ { ( !_bodyIpp) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1090 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_argsOoptions ->+ (case (args_ _argsOoptions) of+ { ( !_argsIpps) ->+ (case (({-# LINE 139 "src-ag/PrintOcamlCode.ag" #-}+ pp_parens ( pp "fun" >#< hv_sp _argsIpps >#< "->"+ >-< indent 2 _bodyIpp )+ {-# LINE 1098 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })))+sem_Expr_Let :: T_Decls ->+ T_Expr ->+ T_Expr+sem_Expr_Let !(T_Decls decls_) !(T_Expr body_) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 216 "src-ag/PrintOcamlCode.ag" #-}+ False+ {-# LINE 1109 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_declsOisToplevel ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1114 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_bodyOoptions ->+ (case (body_ _bodyOoptions) of+ { ( !_bodyIpp) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1121 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_declsOoptions ->+ (case (decls_ _declsOisToplevel _declsOoptions) of+ { ( !_declsIpps) ->+ (case (({-# LINE 130 "src-ag/PrintOcamlCode.ag" #-}+ pp_parens $ vlist (_declsIpps ++ [_bodyIpp])+ {-# LINE 1128 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) })))+sem_Expr_LineExpr :: T_Expr ->+ T_Expr+sem_Expr_LineExpr !(T_Expr expr_) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1138 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_exprOoptions ->+ (case (expr_ _exprOoptions) of+ { ( !_exprIpp) ->+ (case (({-# LINE 148 "src-ag/PrintOcamlCode.ag" #-}+ _exprIpp+ {-# LINE 1145 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+sem_Expr_PragmaExpr :: Bool ->+ Bool ->+ String ->+ T_Expr ->+ T_Expr+sem_Expr_PragmaExpr !onLeftSide_ !onNewLine_ !txt_ !(T_Expr expr_) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1158 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_exprOoptions ->+ (case (expr_ _exprOoptions) of+ { ( !_exprIpp) ->+ (case (({-# LINE 147 "src-ag/PrintOcamlCode.ag" #-}+ _exprIpp+ {-# LINE 1165 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+sem_Expr_ResultExpr :: String ->+ T_Expr ->+ T_Expr+sem_Expr_ResultExpr !nt_ !(T_Expr expr_) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1176 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_exprOoptions ->+ (case (expr_ _exprOoptions) of+ { ( !_exprIpp) ->+ (case (({-# LINE 53 "src-ag/PrintOcamlCode.ag" #-}+ _exprIpp+ {-# LINE 1183 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+sem_Expr_ResumeExpr :: String ->+ T_Expr ->+ T_Lhs ->+ T_Expr ->+ T_Expr+sem_Expr_ResumeExpr !nt_ !(T_Expr expr_) !(T_Lhs left_) !(T_Expr rhs_) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1196 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_rhsOoptions ->+ (case (rhs_ _rhsOoptions) of+ { ( !_rhsIpp) ->+ (case (({-# LINE 53 "src-ag/PrintOcamlCode.ag" #-}+ _rhsIpp+ {-# LINE 1203 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+sem_Expr_SemFun :: String ->+ T_Exprs ->+ T_Expr ->+ T_Expr+sem_Expr_SemFun !nt_ !(T_Exprs args_) !(T_Expr body_) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1215 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_bodyOoptions ->+ (case (body_ _bodyOoptions) of+ { ( !_bodyIpp) ->+ (case (({-# LINE 53 "src-ag/PrintOcamlCode.ag" #-}+ _bodyIpp+ {-# LINE 1222 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+sem_Expr_SimpleExpr :: String ->+ T_Expr+sem_Expr_SimpleExpr !txt_ =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 144 "src-ag/PrintOcamlCode.ag" #-}+ text txt_+ {-# LINE 1232 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) })))+sem_Expr_TextExpr :: ([String]) ->+ T_Expr+sem_Expr_TextExpr !lns_ =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 145 "src-ag/PrintOcamlCode.ag" #-}+ vlist (map text lns_)+ {-# LINE 1242 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) })))+sem_Expr_Trace :: String ->+ T_Expr ->+ T_Expr+sem_Expr_Trace !txt_ !(T_Expr expr_) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1253 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_exprOoptions ->+ (case (expr_ _exprOoptions) of+ { ( !_exprIpp) ->+ (case (({-# LINE 146 "src-ag/PrintOcamlCode.ag" #-}+ _exprIpp+ {-# LINE 1260 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+sem_Expr_TupleExpr :: T_Exprs ->+ T_Expr+sem_Expr_TupleExpr !(T_Exprs exprs_) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1270 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_exprsOoptions ->+ (case (exprs_ _exprsOoptions) of+ { ( !_exprsIpps) ->+ (case (({-# LINE 141 "src-ag/PrintOcamlCode.ag" #-}+ ppTuple False _exprsIpps+ {-# LINE 1277 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+sem_Expr_TypedExpr :: T_Expr ->+ T_Type ->+ T_Expr+sem_Expr_TypedExpr !(T_Expr expr_) !(T_Type tp_) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1288 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_exprOoptions ->+ (case (expr_ _exprOoptions) of+ { ( !_exprIpp) ->+ (case (({-# LINE 149 "src-ag/PrintOcamlCode.ag" #-}+ _exprIpp+ {-# LINE 1295 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+sem_Expr_UnboxedTupleExpr :: T_Exprs ->+ T_Expr+sem_Expr_UnboxedTupleExpr !(T_Exprs exprs_) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 142 "src-ag/PrintOcamlCode.ag" #-}+ error "pp of Expr.UnboxedTupleExpr not supported"+ {-# LINE 1305 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) })))+-- Exprs -------------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Expr + child tl : Exprs + alternative Nil:+-}+-- cata+sem_Exprs :: Exprs ->+ T_Exprs+sem_Exprs !list =+ (Prelude.foldr sem_Exprs_Cons sem_Exprs_Nil (Prelude.map sem_Expr list))+-- semantic domain+newtype T_Exprs = T_Exprs (Options ->+ ( PP_Docs))+data Inh_Exprs = Inh_Exprs {options_Inh_Exprs :: !(Options)}+data Syn_Exprs = Syn_Exprs {pps_Syn_Exprs :: !(PP_Docs)}+wrap_Exprs :: T_Exprs ->+ Inh_Exprs ->+ Syn_Exprs+wrap_Exprs !(T_Exprs sem) !(Inh_Exprs _lhsIoptions) =+ (let ( !_lhsOpps) = sem _lhsIoptions+ in (Syn_Exprs _lhsOpps))+sem_Exprs_Cons :: T_Expr ->+ T_Exprs ->+ T_Exprs+sem_Exprs_Cons !(T_Expr hd_) !(T_Exprs tl_) =+ (T_Exprs (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1345 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_tlOoptions ->+ (case (tl_ _tlOoptions) of+ { ( !_tlIpps) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1352 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_hdOoptions ->+ (case (hd_ _hdOoptions) of+ { ( !_hdIpp) ->+ (case (({-# LINE 60 "src-ag/PrintOcamlCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 1359 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) })))+sem_Exprs_Nil :: T_Exprs+sem_Exprs_Nil =+ (T_Exprs (\ (!_lhsIoptions) ->+ (case (({-# LINE 61 "src-ag/PrintOcamlCode.ag" #-}+ []+ {-# LINE 1368 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) })))+-- Lhs ---------------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative Fun:+ child name : {String}+ child args : Exprs + alternative Pattern3:+ child pat3 : Pattern + alternative Pattern3SM:+ child pat3 : Pattern + alternative TupleLhs:+ child comps : {[String]}+ alternative UnboxedTupleLhs:+ child comps : {[String]}+ alternative Unwrap:+ child name : {String}+ child sub : Lhs +-}+-- cata+sem_Lhs :: Lhs ->+ T_Lhs+sem_Lhs !(Fun _name _args) =+ (sem_Lhs_Fun _name (sem_Exprs _args))+sem_Lhs !(Pattern3 _pat3) =+ (sem_Lhs_Pattern3 (sem_Pattern _pat3))+sem_Lhs !(Pattern3SM _pat3) =+ (sem_Lhs_Pattern3SM (sem_Pattern _pat3))+sem_Lhs !(TupleLhs _comps) =+ (sem_Lhs_TupleLhs _comps)+sem_Lhs !(UnboxedTupleLhs _comps) =+ (sem_Lhs_UnboxedTupleLhs _comps)+sem_Lhs !(Unwrap _name _sub) =+ (sem_Lhs_Unwrap _name (sem_Lhs _sub))+-- semantic domain+newtype T_Lhs = T_Lhs (Options ->+ ( PP_Doc))+data Inh_Lhs = Inh_Lhs {options_Inh_Lhs :: !(Options)}+data Syn_Lhs = Syn_Lhs {pp_Syn_Lhs :: !(PP_Doc)}+wrap_Lhs :: T_Lhs ->+ Inh_Lhs ->+ Syn_Lhs+wrap_Lhs !(T_Lhs sem) !(Inh_Lhs _lhsIoptions) =+ (let ( !_lhsOpp) = sem _lhsIoptions+ in (Syn_Lhs _lhsOpp))+sem_Lhs_Fun :: String ->+ T_Exprs ->+ T_Lhs+sem_Lhs_Fun !name_ !(T_Exprs args_) =+ (T_Lhs (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1428 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_argsOoptions ->+ (case (args_ _argsOoptions) of+ { ( !_argsIpps) ->+ (case (({-# LINE 156 "src-ag/PrintOcamlCode.ag" #-}+ name_ >#< hv_sp _argsIpps+ {-# LINE 1435 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+sem_Lhs_Pattern3 :: T_Pattern ->+ T_Lhs+sem_Lhs_Pattern3 !(T_Pattern pat3_) =+ (T_Lhs (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1445 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_pat3Ooptions ->+ (case (pat3_ _pat3Ooptions) of+ { ( !_pat3Icopy,!_pat3IisUnderscore,!_pat3Ipp) ->+ (case (({-# LINE 152 "src-ag/PrintOcamlCode.ag" #-}+ _pat3Ipp+ {-# LINE 1452 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+sem_Lhs_Pattern3SM :: T_Pattern ->+ T_Lhs+sem_Lhs_Pattern3SM !(T_Pattern pat3_) =+ (T_Lhs (\ (!_lhsIoptions) ->+ (case (({-# LINE 153 "src-ag/PrintOcamlCode.ag" #-}+ error "pp of Lhs.Pattern3SM not supported"+ {-# LINE 1462 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) })))+sem_Lhs_TupleLhs :: ([String]) ->+ T_Lhs+sem_Lhs_TupleLhs !comps_ =+ (T_Lhs (\ (!_lhsIoptions) ->+ (case (({-# LINE 154 "src-ag/PrintOcamlCode.ag" #-}+ ppTuple False (map text comps_)+ {-# LINE 1472 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) })))+sem_Lhs_UnboxedTupleLhs :: ([String]) ->+ T_Lhs+sem_Lhs_UnboxedTupleLhs !comps_ =+ (T_Lhs (\ (!_lhsIoptions) ->+ (case (({-# LINE 155 "src-ag/PrintOcamlCode.ag" #-}+ error "pp of Lhs.UnboxedTupleLhs not supported"+ {-# LINE 1482 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) })))+sem_Lhs_Unwrap :: String ->+ T_Lhs ->+ T_Lhs+sem_Lhs_Unwrap !name_ !(T_Lhs sub_) =+ (T_Lhs (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1493 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_subOoptions ->+ (case (sub_ _subOoptions) of+ { ( !_subIpp) ->+ (case (({-# LINE 157 "src-ag/PrintOcamlCode.ag" #-}+ pp_parens (name_ >#< _subIpp)+ {-# LINE 1500 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })))+-- NamedType ---------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative Named:+ child strict : {Bool}+ child name : {String}+ child tp : Type +-}+-- cata+sem_NamedType :: NamedType ->+ T_NamedType+sem_NamedType !(Named _strict _name _tp) =+ (sem_NamedType_Named _strict _name (sem_Type _tp))+-- semantic domain+newtype T_NamedType = T_NamedType (( PP_Doc))+data Inh_NamedType = Inh_NamedType {}+data Syn_NamedType = Syn_NamedType {pp_Syn_NamedType :: !(PP_Doc)}+wrap_NamedType :: T_NamedType ->+ Inh_NamedType ->+ Syn_NamedType+wrap_NamedType !(T_NamedType sem) !(Inh_NamedType) =+ (let ( !_lhsOpp) = sem+ in (Syn_NamedType _lhsOpp))+sem_NamedType_Named :: Bool ->+ String ->+ T_Type ->+ T_NamedType+sem_NamedType_Named !strict_ !name_ !(T_Type tp_) =+ (T_NamedType (case (tp_) of+ { ( !_tpIpp) ->+ (case (({-# LINE 187 "src-ag/PrintOcamlCode.ag" #-}+ name_ >#< ":" >#< _tpIpp+ {-# LINE 1539 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }))+-- NamedTypes --------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : NamedType + child tl : NamedTypes + alternative Nil:+-}+-- cata+sem_NamedTypes :: NamedTypes ->+ T_NamedTypes+sem_NamedTypes !list =+ (Prelude.foldr sem_NamedTypes_Cons sem_NamedTypes_Nil (Prelude.map sem_NamedType list))+-- semantic domain+newtype T_NamedTypes = T_NamedTypes (( PP_Docs))+data Inh_NamedTypes = Inh_NamedTypes {}+data Syn_NamedTypes = Syn_NamedTypes {pps_Syn_NamedTypes :: !(PP_Docs)}+wrap_NamedTypes :: T_NamedTypes ->+ Inh_NamedTypes ->+ Syn_NamedTypes+wrap_NamedTypes !(T_NamedTypes sem) !(Inh_NamedTypes) =+ (let ( !_lhsOpps) = sem+ in (Syn_NamedTypes _lhsOpps))+sem_NamedTypes_Cons :: T_NamedType ->+ T_NamedTypes ->+ T_NamedTypes+sem_NamedTypes_Cons !(T_NamedType hd_) !(T_NamedTypes tl_) =+ (T_NamedTypes (case (tl_) of+ { ( !_tlIpps) ->+ (case (hd_) of+ { ( !_hdIpp) ->+ (case (({-# LINE 76 "src-ag/PrintOcamlCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 1579 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }))+sem_NamedTypes_Nil :: T_NamedTypes+sem_NamedTypes_Nil =+ (T_NamedTypes (case (({-# LINE 77 "src-ag/PrintOcamlCode.ag" #-}+ []+ {-# LINE 1587 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }))+-- Pattern -----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attributes:+ copy : Pattern + isUnderscore : Bool+ pp : PP_Doc+ alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + 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) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat))+sem_Pattern !(Constr _name _pats) =+ (sem_Pattern_Constr _name (sem_Patterns _pats))+sem_Pattern !(Irrefutable _pat) =+ (sem_Pattern_Irrefutable (sem_Pattern _pat))+sem_Pattern !(Product _pos _pats) =+ (sem_Pattern_Product _pos (sem_Patterns _pats))+sem_Pattern !(Underscore _pos) =+ (sem_Pattern_Underscore _pos)+-- semantic domain+newtype T_Pattern = T_Pattern (Options ->+ ( Pattern,Bool,PP_Doc))+data Inh_Pattern = Inh_Pattern {options_Inh_Pattern :: !(Options)}+data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: !(Pattern),isUnderscore_Syn_Pattern :: !(Bool),pp_Syn_Pattern :: !(PP_Doc)}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern+wrap_Pattern !(T_Pattern sem) !(Inh_Pattern _lhsIoptions) =+ (let ( !_lhsOcopy,!_lhsOisUnderscore,!_lhsOpp) = sem _lhsIoptions+ in (Syn_Pattern _lhsOcopy _lhsOisUnderscore _lhsOpp))+sem_Pattern_Alias :: Identifier ->+ Identifier ->+ T_Pattern ->+ T_Pattern+sem_Pattern_Alias !field_ !attr_ !(T_Pattern pat_) =+ (T_Pattern (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1658 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_patOoptions ->+ (case (pat_ _patOoptions) of+ { ( !_patIcopy,!_patIisUnderscore,!_patIpp) ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Alias field_ attr_ _patIcopy+ {-# LINE 1665 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1670 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 202 "src-ag/PrintOcamlCode.ag" #-}+ False+ {-# LINE 1675 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 193 "src-ag/PrintOcamlCode.ag" #-}+ if _patIisUnderscore+ then pp (attrname False field_ attr_)+ else error "pp of Pattern.Alias is only supported in the form (x@_)"+ {-# LINE 1682 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) }) }) })))+sem_Pattern_Constr :: ConstructorIdent ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Constr !name_ !(T_Patterns pats_) =+ (T_Pattern (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1693 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_patsOoptions ->+ (case (pats_ _patsOoptions) of+ { ( !_patsIcopy,!_patsIpps) ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 1700 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1705 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 200 "src-ag/PrintOcamlCode.ag" #-}+ False+ {-# LINE 1710 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 190 "src-ag/PrintOcamlCode.ag" #-}+ pp_parens $ name_ >#< hv_sp _patsIpps+ {-# LINE 1715 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) }) }) })))+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern+sem_Pattern_Irrefutable !(T_Pattern pat_) =+ (T_Pattern (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1725 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_patOoptions ->+ (case (pat_ _patOoptions) of+ { ( !_patIcopy,!_patIisUnderscore,!_patIpp) ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 1732 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1737 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 199 "src-ag/PrintOcamlCode.ag" #-}+ _patIisUnderscore+ {-# LINE 1742 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 196 "src-ag/PrintOcamlCode.ag" #-}+ error "pp of Pattern.Irrefutable not supported"+ {-# LINE 1747 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) }) }) })))+sem_Pattern_Product :: Pos ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Product !pos_ !(T_Patterns pats_) =+ (T_Pattern (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1758 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_patsOoptions ->+ (case (pats_ _patsOoptions) of+ { ( !_patsIcopy,!_patsIpps) ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 1765 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1770 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 201 "src-ag/PrintOcamlCode.ag" #-}+ False+ {-# LINE 1775 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 191 "src-ag/PrintOcamlCode.ag" #-}+ pp_block "(" ")" "," _patsIpps+ {-# LINE 1780 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) }) }) })))+sem_Pattern_Underscore :: Pos ->+ T_Pattern+sem_Pattern_Underscore !pos_ =+ (T_Pattern (\ (!_lhsIoptions) ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ Underscore pos_+ {-# LINE 1790 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1795 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 203 "src-ag/PrintOcamlCode.ag" #-}+ True+ {-# LINE 1800 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 197 "src-ag/PrintOcamlCode.ag" #-}+ text "_"+ {-# LINE 1805 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) })))+-- Patterns ----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attributes:+ copy : Patterns + pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Pattern + child tl : Patterns + visit 0:+ local copy : _+ alternative Nil:+ visit 0:+ local copy : _+-}+-- cata+sem_Patterns :: Patterns ->+ T_Patterns+sem_Patterns !list =+ (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list))+-- semantic domain+newtype T_Patterns = T_Patterns (Options ->+ ( Patterns,PP_Docs))+data Inh_Patterns = Inh_Patterns {options_Inh_Patterns :: !(Options)}+data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: !(Patterns),pps_Syn_Patterns :: !(PP_Docs)}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns+wrap_Patterns !(T_Patterns sem) !(Inh_Patterns _lhsIoptions) =+ (let ( !_lhsOcopy,!_lhsOpps) = sem _lhsIoptions+ in (Syn_Patterns _lhsOcopy _lhsOpps))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns+sem_Patterns_Cons !(T_Pattern hd_) !(T_Patterns tl_) =+ (T_Patterns (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1850 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_tlOoptions ->+ (case (tl_ _tlOoptions) of+ { ( !_tlIcopy,!_tlIpps) ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1857 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_hdOoptions ->+ (case (hd_ _hdOoptions) of+ { ( !_hdIcopy,!_hdIisUnderscore,!_hdIpp) ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 1864 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1869 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 88 "src-ag/PrintOcamlCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 1874 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOcopy,_lhsOpps) }) }) }) }) }) }) })))+sem_Patterns_Nil :: T_Patterns+sem_Patterns_Nil =+ (T_Patterns (\ (!_lhsIoptions) ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ []+ {-# LINE 1883 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_copy ->+ (case (({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1888 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOcopy ->+ (case (({-# LINE 89 "src-ag/PrintOcamlCode.ag" #-}+ []+ {-# LINE 1893 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOcopy,_lhsOpps) }) }) })))+-- Program -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ options : Options+ textBlockMap : Map BlockInfo PP_Doc+ synthesized attribute:+ output : PP_Docs+ alternatives:+ alternative Program:+ child chunks : Chunks + child ordered : {Bool}+-}+-- cata+sem_Program :: Program ->+ T_Program+sem_Program !(Program _chunks _ordered) =+ (sem_Program_Program (sem_Chunks _chunks) _ordered)+-- semantic domain+newtype T_Program = T_Program (Options ->+ (Map BlockInfo PP_Doc) ->+ ( PP_Docs))+data Inh_Program = Inh_Program {options_Inh_Program :: !(Options),textBlockMap_Inh_Program :: !((Map BlockInfo PP_Doc))}+data Syn_Program = Syn_Program {output_Syn_Program :: !(PP_Docs)}+wrap_Program :: T_Program ->+ Inh_Program ->+ Syn_Program+wrap_Program !(T_Program sem) !(Inh_Program _lhsIoptions _lhsItextBlockMap) =+ (let ( !_lhsOoutput) = sem _lhsIoptions _lhsItextBlockMap+ in (Syn_Program _lhsOoutput))+sem_Program_Program :: T_Chunks ->+ Bool ->+ T_Program+sem_Program_Program !(T_Chunks chunks_) !ordered_ =+ (T_Program (\ (!_lhsIoptions)+ (!_lhsItextBlockMap) ->+ (case (({-# LINE 45 "src-ag/PrintOcamlCode.ag" #-}+ _lhsItextBlockMap+ {-# LINE 1935 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_chunksOtextBlockMap ->+ (case (({-# LINE 212 "src-ag/PrintOcamlCode.ag" #-}+ True+ {-# LINE 1940 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_chunksOisToplevel ->+ (case (({-# LINE 43 "src-ag/PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1945 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_chunksOoptions ->+ (case (chunks_ _chunksOisToplevel _chunksOoptions _chunksOtextBlockMap) of+ { ( !_chunksIpps) ->+ (case (({-# LINE 57 "src-ag/PrintOcamlCode.ag" #-}+ _chunksIpps+ {-# LINE 1952 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOoutput ->+ ( _lhsOoutput) }) }) }) }) })))+-- Type --------------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative Arr:+ child left : Type + child right : Type + alternative CtxApp:+ child left : {[(String, [String])]}+ child right : Type + alternative List:+ child tp : Type + alternative NontermType:+ child name : {String}+ child params : {[String]}+ child deforested : {Bool}+ alternative QuantApp:+ child left : {String}+ child right : Type + alternative SimpleType:+ child txt : {String}+ alternative TEither:+ child left : Type + child right : Type + alternative TIntMap:+ child value : Type + alternative TMap:+ child key : Type + child value : Type + alternative TMaybe:+ child tp : Type + alternative TupleType:+ child tps : Types + alternative TypeApp:+ child func : Type + child args : Types + alternative UnboxedTupleType:+ child tps : Types +-}+-- cata+sem_Type :: Type ->+ T_Type+sem_Type !(Arr _left _right) =+ (sem_Type_Arr (sem_Type _left) (sem_Type _right))+sem_Type !(CtxApp _left _right) =+ (sem_Type_CtxApp _left (sem_Type _right))+sem_Type !(List _tp) =+ (sem_Type_List (sem_Type _tp))+sem_Type !(NontermType _name _params _deforested) =+ (sem_Type_NontermType _name _params _deforested)+sem_Type !(QuantApp _left _right) =+ (sem_Type_QuantApp _left (sem_Type _right))+sem_Type !(SimpleType _txt) =+ (sem_Type_SimpleType _txt)+sem_Type !(TEither _left _right) =+ (sem_Type_TEither (sem_Type _left) (sem_Type _right))+sem_Type !(TIntMap _value) =+ (sem_Type_TIntMap (sem_Type _value))+sem_Type !(TMap _key _value) =+ (sem_Type_TMap (sem_Type _key) (sem_Type _value))+sem_Type !(TMaybe _tp) =+ (sem_Type_TMaybe (sem_Type _tp))+sem_Type !(TupleType _tps) =+ (sem_Type_TupleType (sem_Types _tps))+sem_Type !(TypeApp _func _args) =+ (sem_Type_TypeApp (sem_Type _func) (sem_Types _args))+sem_Type !(UnboxedTupleType _tps) =+ (sem_Type_UnboxedTupleType (sem_Types _tps))+-- semantic domain+newtype T_Type = T_Type (( PP_Doc))+data Inh_Type = Inh_Type {}+data Syn_Type = Syn_Type {pp_Syn_Type :: !(PP_Doc)}+wrap_Type :: T_Type ->+ Inh_Type ->+ Syn_Type+wrap_Type !(T_Type sem) !(Inh_Type) =+ (let ( !_lhsOpp) = sem+ in (Syn_Type _lhsOpp))+sem_Type_Arr :: T_Type ->+ T_Type ->+ T_Type+sem_Type_Arr !(T_Type left_) !(T_Type right_) =+ (T_Type (case (right_) of+ { ( !_rightIpp) ->+ (case (left_) of+ { ( !_leftIpp) ->+ (case (({-# LINE 160 "src-ag/PrintOcamlCode.ag" #-}+ pp_parens (_leftIpp >#< "->" >#< _rightIpp)+ {-# LINE 2046 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }))+sem_Type_CtxApp :: ([(String, [String])]) ->+ T_Type ->+ T_Type+sem_Type_CtxApp !left_ !(T_Type right_) =+ (T_Type (case (({-# LINE 161 "src-ag/PrintOcamlCode.ag" #-}+ error "pp of Type.CtxApp not supported"+ {-# LINE 2056 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }))+sem_Type_List :: T_Type ->+ T_Type+sem_Type_List !(T_Type tp_) =+ (T_Type (case (tp_) of+ { ( !_tpIpp) ->+ (case (({-# LINE 166 "src-ag/PrintOcamlCode.ag" #-}+ _tpIpp >#< "list"+ {-# LINE 2067 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }))+sem_Type_NontermType :: String ->+ ([String]) ->+ Bool ->+ T_Type+sem_Type_NontermType !name_ !params_ !deforested_ =+ (T_Type (case (({-# LINE 168 "src-ag/PrintOcamlCode.ag" #-}+ pp_block "(" ")" " " (map text params_ ++ [text $ toOcamlTC name_])+ {-# LINE 2078 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }))+sem_Type_QuantApp :: String ->+ T_Type ->+ T_Type+sem_Type_QuantApp !left_ !(T_Type right_) =+ (T_Type (case (right_) of+ { ( !_rightIpp) ->+ (case (({-# LINE 53 "src-ag/PrintOcamlCode.ag" #-}+ _rightIpp+ {-# LINE 2090 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }))+sem_Type_SimpleType :: String ->+ T_Type+sem_Type_SimpleType !txt_ =+ (T_Type (case (({-# LINE 167 "src-ag/PrintOcamlCode.ag" #-}+ text txt_+ {-# LINE 2099 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }))+sem_Type_TEither :: T_Type ->+ T_Type ->+ T_Type+sem_Type_TEither !(T_Type left_) !(T_Type right_) =+ (T_Type (case (({-# LINE 170 "src-ag/PrintOcamlCode.ag" #-}+ error "pp of Type.TEither is not supported"+ {-# LINE 2109 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }))+sem_Type_TIntMap :: T_Type ->+ T_Type+sem_Type_TIntMap !(T_Type value_) =+ (T_Type (case (({-# LINE 172 "src-ag/PrintOcamlCode.ag" #-}+ error "pp of Type.TIntMap is not supported"+ {-# LINE 2118 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }))+sem_Type_TMap :: T_Type ->+ T_Type ->+ T_Type+sem_Type_TMap !(T_Type key_) !(T_Type value_) =+ (T_Type (case (({-# LINE 171 "src-ag/PrintOcamlCode.ag" #-}+ error "pp of Type.TMap is not supported"+ {-# LINE 2128 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }))+sem_Type_TMaybe :: T_Type ->+ T_Type+sem_Type_TMaybe !(T_Type tp_) =+ (T_Type (case (tp_) of+ { ( !_tpIpp) ->+ (case (({-# LINE 169 "src-ag/PrintOcamlCode.ag" #-}+ _tpIpp >#< "opt"+ {-# LINE 2139 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }))+sem_Type_TupleType :: T_Types ->+ T_Type+sem_Type_TupleType !(T_Types tps_) =+ (T_Type (case (tps_) of+ { ( !_tpsIpps) ->+ (case (({-# LINE 163 "src-ag/PrintOcamlCode.ag" #-}+ pp_block "(" ")" "," _tpsIpps+ {-# LINE 2150 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }))+sem_Type_TypeApp :: T_Type ->+ T_Types ->+ T_Type+sem_Type_TypeApp !(T_Type func_) !(T_Types args_) =+ (T_Type (case (args_) of+ { ( !_argsIpps) ->+ (case (func_) of+ { ( !_funcIpp) ->+ (case (({-# LINE 162 "src-ag/PrintOcamlCode.ag" #-}+ pp_parens (hv_sp (_argsIpps ++ [_funcIpp]))+ {-# LINE 2164 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }))+sem_Type_UnboxedTupleType :: T_Types ->+ T_Type+sem_Type_UnboxedTupleType !(T_Types tps_) =+ (T_Type (case (({-# LINE 165 "src-ag/PrintOcamlCode.ag" #-}+ error "pp of Type.UnboxedTupleType is not supported"+ {-# LINE 2173 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpp ->+ ( _lhsOpp) }))+-- Types -------------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Type + child tl : Types + alternative Nil:+-}+-- cata+sem_Types :: Types ->+ T_Types+sem_Types !list =+ (Prelude.foldr sem_Types_Cons sem_Types_Nil (Prelude.map sem_Type list))+-- semantic domain+newtype T_Types = T_Types (( PP_Docs))+data Inh_Types = Inh_Types {}+data Syn_Types = Syn_Types {pps_Syn_Types :: !(PP_Docs)}+wrap_Types :: T_Types ->+ Inh_Types ->+ Syn_Types+wrap_Types !(T_Types sem) !(Inh_Types) =+ (let ( !_lhsOpps) = sem+ in (Syn_Types _lhsOpps))+sem_Types_Cons :: T_Type ->+ T_Types ->+ T_Types+sem_Types_Cons !(T_Type hd_) !(T_Types tl_) =+ (T_Types (case (tl_) of+ { ( !_tlIpps) ->+ (case (hd_) of+ { ( !_hdIpp) ->+ (case (({-# LINE 72 "src-ag/PrintOcamlCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 2213 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }))+sem_Types_Nil :: T_Types+sem_Types_Nil =+ (T_Types (case (({-# LINE 73 "src-ag/PrintOcamlCode.ag" #-}+ []+ {-# LINE 2221 "dist/build/PrintOcamlCode" #-}+ )) of+ { !_lhsOpps ->+ ( _lhsOpps) }))
src-derived/PrintVisitCode.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.39.1.0 (src-ag/PrintVisitCode.ag)+-- UUAGC 0.9.40.1 (src-ag/PrintVisitCode.ag) module PrintVisitCode where {-# LINE 10 "src-ag/PrintVisitCode.ag" #-} @@ -23,7 +23,7 @@ import Data.List(partition,intersperse,intersect,(\\)) import Data.Maybe(fromJust,isJust)-{-# LINE 27 "dist/build/uuagc/uuagc-tmp/PrintVisitCode.hs" #-}+{-# LINE 27 "dist/build/PrintVisitCode.hs" #-} {-# LINE 2 "src-ag/CodeSyntax.ag" #-} @@ -31,19 +31,19 @@ import CommonTypes import Data.Map(Map) import Data.Set(Set)-{-# LINE 35 "dist/build/uuagc/uuagc-tmp/PrintVisitCode.hs" #-}+{-# LINE 35 "dist/build/PrintVisitCode.hs" #-} {-# LINE 2 "src-ag/Patterns.ag" #-} -- Patterns.ag imports import UU.Scanner.Position(Pos) import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 42 "dist/build/uuagc/uuagc-tmp/PrintVisitCode.hs" #-}+{-# LINE 42 "dist/build/PrintVisitCode.hs" #-} {-# LINE 2 "src-ag/DeclBlocks.ag" #-} import Code (Decl,Expr)-{-# LINE 47 "dist/build/uuagc/uuagc-tmp/PrintVisitCode.hs" #-}+{-# LINE 47 "dist/build/PrintVisitCode.hs" #-} {-# LINE 32 "src-ag/PrintVisitCode.ag" #-} type PP_Docs = [PP_Doc]@@ -57,7 +57,7 @@ ppMultiSeq' :: (PP_Doc -> PP_Doc -> PP_Doc) -> [PP_Doc] -> PP_Doc -> PP_Doc ppMultiSeq' next strictArgs expr = foldr (\v r -> (v >#< "`seq`") `next` pp_parens r) expr strictArgs-{-# LINE 61 "dist/build/uuagc/uuagc-tmp/PrintVisitCode.hs" #-}+{-# LINE 61 "dist/build/PrintVisitCode.hs" #-} -- CGrammar ---------------------------------------------------- {- visit 0:@@ -80,25 +80,25 @@ child multivisit : {Bool} -} -- cata-sem_CGrammar :: CGrammar ->- T_CGrammar -sem_CGrammar (CGrammar _typeSyns _derivings _wrappers _nonts _pragmas _paramMap _contextMap _quantMap _aroundsMap _mergeMap _multivisit ) =- (sem_CGrammar_CGrammar _typeSyns _derivings _wrappers (sem_CNonterminals _nonts ) _pragmas _paramMap _contextMap _quantMap _aroundsMap _mergeMap _multivisit )+sem_CGrammar :: CGrammar ->+ T_CGrammar+sem_CGrammar (CGrammar _typeSyns _derivings _wrappers _nonts _pragmas _paramMap _contextMap _quantMap _aroundsMap _mergeMap _multivisit) =+ (sem_CGrammar_CGrammar _typeSyns _derivings _wrappers (sem_CNonterminals _nonts) _pragmas _paramMap _contextMap _quantMap _aroundsMap _mergeMap _multivisit) -- semantic domain-newtype T_CGrammar = T_CGrammar (Options ->- ( PP_Docs))-data Inh_CGrammar = Inh_CGrammar {options_Inh_CGrammar :: !(Options)}-data Syn_CGrammar = Syn_CGrammar {output_Syn_CGrammar :: !(PP_Docs)}-wrap_CGrammar :: T_CGrammar ->- Inh_CGrammar ->- Syn_CGrammar -wrap_CGrammar (T_CGrammar sem ) (Inh_CGrammar _lhsIoptions ) =- (let ( _lhsOoutput) = sem _lhsIoptions - in (Syn_CGrammar _lhsOoutput ))+newtype T_CGrammar = T_CGrammar (Options ->+ ( PP_Docs))+data Inh_CGrammar = Inh_CGrammar {options_Inh_CGrammar :: !(Options)}+data Syn_CGrammar = Syn_CGrammar {output_Syn_CGrammar :: !(PP_Docs)}+wrap_CGrammar :: T_CGrammar ->+ Inh_CGrammar ->+ Syn_CGrammar+wrap_CGrammar (T_CGrammar sem) (Inh_CGrammar _lhsIoptions) =+ (let ( _lhsOoutput) = sem _lhsIoptions+ in (Syn_CGrammar _lhsOoutput)) sem_CGrammar_CGrammar :: TypeSyns -> Derivings -> (Set NontermIdent) ->- T_CNonterminals ->+ T_CNonterminals -> PragmaMap -> ParamMap -> ContextMap ->@@ -106,15 +106,15 @@ (Map NontermIdent (Map ConstructorIdent (Set Identifier))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) -> Bool ->- T_CGrammar -sem_CGrammar_CGrammar typeSyns_ derivings_ wrappers_ (T_CNonterminals nonts_ ) pragmas_ paramMap_ contextMap_ quantMap_ aroundsMap_ mergeMap_ multivisit_ =+ T_CGrammar+sem_CGrammar_CGrammar typeSyns_ derivings_ wrappers_ (T_CNonterminals nonts_) pragmas_ paramMap_ contextMap_ quantMap_ aroundsMap_ mergeMap_ multivisit_ = (T_CGrammar (\ _lhsIoptions -> (case (({-# LINE 53 "src-ag/PrintVisitCode.ag" #-} []- {-# LINE 115 "src-ag/PrintVisitCode.hs" #-}+ {-# LINE 115 "dist/build/PrintVisitCode" #-} )) of { _lhsOoutput ->- ( _lhsOoutput) })) )+ ( _lhsOoutput) }))) -- CInterface -------------------------------------------------- {- alternatives:@@ -122,24 +122,24 @@ child seg : CSegments -} -- cata-sem_CInterface :: CInterface ->- T_CInterface -sem_CInterface (CInterface _seg ) =- (sem_CInterface_CInterface (sem_CSegments _seg ) )+sem_CInterface :: CInterface ->+ T_CInterface+sem_CInterface (CInterface _seg) =+ (sem_CInterface_CInterface (sem_CSegments _seg)) -- semantic domain-newtype T_CInterface = T_CInterface (( ))-data Inh_CInterface = Inh_CInterface {}-data Syn_CInterface = Syn_CInterface {}-wrap_CInterface :: T_CInterface ->- Inh_CInterface ->- Syn_CInterface -wrap_CInterface (T_CInterface sem ) (Inh_CInterface ) =- (let ( ) = sem - in (Syn_CInterface ))-sem_CInterface_CInterface :: T_CSegments ->- T_CInterface -sem_CInterface_CInterface (T_CSegments seg_ ) =- (T_CInterface ( ) )+newtype T_CInterface = T_CInterface (( ))+data Inh_CInterface = Inh_CInterface {}+data Syn_CInterface = Syn_CInterface {}+wrap_CInterface :: T_CInterface ->+ Inh_CInterface ->+ Syn_CInterface+wrap_CInterface (T_CInterface sem) (Inh_CInterface) =+ (let ( ) = sem+ in (Syn_CInterface))+sem_CInterface_CInterface :: T_CSegments ->+ T_CInterface+sem_CInterface_CInterface (T_CSegments seg_) =+ (T_CInterface ( )) -- CNonterminal ------------------------------------------------ {- alternatives:@@ -152,29 +152,29 @@ child inter : CInterface -} -- cata-sem_CNonterminal :: CNonterminal ->- T_CNonterminal -sem_CNonterminal (CNonterminal _nt _params _inh _syn _prods _inter ) =- (sem_CNonterminal_CNonterminal _nt _params _inh _syn (sem_CProductions _prods ) (sem_CInterface _inter ) )+sem_CNonterminal :: CNonterminal ->+ T_CNonterminal+sem_CNonterminal (CNonterminal _nt _params _inh _syn _prods _inter) =+ (sem_CNonterminal_CNonterminal _nt _params _inh _syn (sem_CProductions _prods) (sem_CInterface _inter)) -- semantic domain-newtype T_CNonterminal = T_CNonterminal (( ))-data Inh_CNonterminal = Inh_CNonterminal {}-data Syn_CNonterminal = Syn_CNonterminal {}-wrap_CNonterminal :: T_CNonterminal ->- Inh_CNonterminal ->- Syn_CNonterminal -wrap_CNonterminal (T_CNonterminal sem ) (Inh_CNonterminal ) =- (let ( ) = sem - in (Syn_CNonterminal ))+newtype T_CNonterminal = T_CNonterminal (( ))+data Inh_CNonterminal = Inh_CNonterminal {}+data Syn_CNonterminal = Syn_CNonterminal {}+wrap_CNonterminal :: T_CNonterminal ->+ Inh_CNonterminal ->+ Syn_CNonterminal+wrap_CNonterminal (T_CNonterminal sem) (Inh_CNonterminal) =+ (let ( ) = sem+ in (Syn_CNonterminal)) sem_CNonterminal_CNonterminal :: NontermIdent -> ([Identifier]) -> Attributes -> Attributes ->- T_CProductions ->- T_CInterface ->- T_CNonterminal -sem_CNonterminal_CNonterminal nt_ params_ inh_ syn_ (T_CProductions prods_ ) (T_CInterface inter_ ) =- (T_CNonterminal ( ) )+ T_CProductions ->+ T_CInterface ->+ T_CNonterminal+sem_CNonterminal_CNonterminal nt_ params_ inh_ syn_ (T_CProductions prods_) (T_CInterface inter_) =+ (T_CNonterminal ( )) -- CNonterminals ----------------------------------------------- {- alternatives:@@ -184,28 +184,28 @@ alternative Nil: -} -- cata-sem_CNonterminals :: CNonterminals ->- T_CNonterminals -sem_CNonterminals list =- (Prelude.foldr sem_CNonterminals_Cons sem_CNonterminals_Nil (Prelude.map sem_CNonterminal list) )+sem_CNonterminals :: CNonterminals ->+ T_CNonterminals+sem_CNonterminals list =+ (Prelude.foldr sem_CNonterminals_Cons sem_CNonterminals_Nil (Prelude.map sem_CNonterminal list)) -- semantic domain-newtype T_CNonterminals = T_CNonterminals (( ))-data Inh_CNonterminals = Inh_CNonterminals {}-data Syn_CNonterminals = Syn_CNonterminals {}-wrap_CNonterminals :: T_CNonterminals ->- Inh_CNonterminals ->- Syn_CNonterminals -wrap_CNonterminals (T_CNonterminals sem ) (Inh_CNonterminals ) =- (let ( ) = sem - in (Syn_CNonterminals ))-sem_CNonterminals_Cons :: T_CNonterminal ->- T_CNonterminals ->- T_CNonterminals -sem_CNonterminals_Cons (T_CNonterminal hd_ ) (T_CNonterminals tl_ ) =- (T_CNonterminals ( ) )-sem_CNonterminals_Nil :: T_CNonterminals -sem_CNonterminals_Nil =- (T_CNonterminals ( ) )+newtype T_CNonterminals = T_CNonterminals (( ))+data Inh_CNonterminals = Inh_CNonterminals {}+data Syn_CNonterminals = Syn_CNonterminals {}+wrap_CNonterminals :: T_CNonterminals ->+ Inh_CNonterminals ->+ Syn_CNonterminals+wrap_CNonterminals (T_CNonterminals sem) (Inh_CNonterminals) =+ (let ( ) = sem+ in (Syn_CNonterminals))+sem_CNonterminals_Cons :: T_CNonterminal ->+ T_CNonterminals ->+ T_CNonterminals+sem_CNonterminals_Cons (T_CNonterminal hd_) (T_CNonterminals tl_) =+ (T_CNonterminals ( ))+sem_CNonterminals_Nil :: T_CNonterminals+sem_CNonterminals_Nil =+ (T_CNonterminals ( )) -- CProduction ------------------------------------------------- {- alternatives:@@ -216,27 +216,27 @@ child terminals : {[Identifier]} -} -- cata-sem_CProduction :: CProduction ->- T_CProduction -sem_CProduction (CProduction _con _visits _children _terminals ) =- (sem_CProduction_CProduction _con (sem_CVisits _visits ) _children _terminals )+sem_CProduction :: CProduction ->+ T_CProduction+sem_CProduction (CProduction _con _visits _children _terminals) =+ (sem_CProduction_CProduction _con (sem_CVisits _visits) _children _terminals) -- semantic domain-newtype T_CProduction = T_CProduction (( ))-data Inh_CProduction = Inh_CProduction {}-data Syn_CProduction = Syn_CProduction {}-wrap_CProduction :: T_CProduction ->- Inh_CProduction ->- Syn_CProduction -wrap_CProduction (T_CProduction sem ) (Inh_CProduction ) =- (let ( ) = sem - in (Syn_CProduction ))+newtype T_CProduction = T_CProduction (( ))+data Inh_CProduction = Inh_CProduction {}+data Syn_CProduction = Syn_CProduction {}+wrap_CProduction :: T_CProduction ->+ Inh_CProduction ->+ Syn_CProduction+wrap_CProduction (T_CProduction sem) (Inh_CProduction) =+ (let ( ) = sem+ in (Syn_CProduction)) sem_CProduction_CProduction :: ConstructorIdent ->- T_CVisits ->+ T_CVisits -> ([(Identifier,Type,ChildKind)]) -> ([Identifier]) ->- T_CProduction -sem_CProduction_CProduction con_ (T_CVisits visits_ ) children_ terminals_ =- (T_CProduction ( ) )+ T_CProduction+sem_CProduction_CProduction con_ (T_CVisits visits_) children_ terminals_ =+ (T_CProduction ( )) -- CProductions ------------------------------------------------ {- alternatives:@@ -246,28 +246,28 @@ alternative Nil: -} -- cata-sem_CProductions :: CProductions ->- T_CProductions -sem_CProductions list =- (Prelude.foldr sem_CProductions_Cons sem_CProductions_Nil (Prelude.map sem_CProduction list) )+sem_CProductions :: CProductions ->+ T_CProductions+sem_CProductions list =+ (Prelude.foldr sem_CProductions_Cons sem_CProductions_Nil (Prelude.map sem_CProduction list)) -- semantic domain-newtype T_CProductions = T_CProductions (( ))-data Inh_CProductions = Inh_CProductions {}-data Syn_CProductions = Syn_CProductions {}-wrap_CProductions :: T_CProductions ->- Inh_CProductions ->- Syn_CProductions -wrap_CProductions (T_CProductions sem ) (Inh_CProductions ) =- (let ( ) = sem - in (Syn_CProductions ))-sem_CProductions_Cons :: T_CProduction ->- T_CProductions ->- T_CProductions -sem_CProductions_Cons (T_CProduction hd_ ) (T_CProductions tl_ ) =- (T_CProductions ( ) )-sem_CProductions_Nil :: T_CProductions -sem_CProductions_Nil =- (T_CProductions ( ) )+newtype T_CProductions = T_CProductions (( ))+data Inh_CProductions = Inh_CProductions {}+data Syn_CProductions = Syn_CProductions {}+wrap_CProductions :: T_CProductions ->+ Inh_CProductions ->+ Syn_CProductions+wrap_CProductions (T_CProductions sem) (Inh_CProductions) =+ (let ( ) = sem+ in (Syn_CProductions))+sem_CProductions_Cons :: T_CProduction ->+ T_CProductions ->+ T_CProductions+sem_CProductions_Cons (T_CProduction hd_) (T_CProductions tl_) =+ (T_CProductions ( ))+sem_CProductions_Nil :: T_CProductions+sem_CProductions_Nil =+ (T_CProductions ( )) -- CRule ------------------------------------------------------- {- alternatives:@@ -297,31 +297,31 @@ child mbNamed : {Maybe Identifier} -} -- cata-sem_CRule :: CRule ->- T_CRule -sem_CRule (CChildVisit _name _nt _nr _inh _syn _isLast ) =- (sem_CRule_CChildVisit _name _nt _nr _inh _syn _isLast )-sem_CRule (CRule _name _isIn _hasCode _nt _con _field _childnt _tp _pattern _rhs _defines _owrt _origin _uses _explicit _mbNamed ) =- (sem_CRule_CRule _name _isIn _hasCode _nt _con _field _childnt _tp (sem_Pattern _pattern ) _rhs _defines _owrt _origin _uses _explicit _mbNamed )+sem_CRule :: CRule ->+ T_CRule+sem_CRule (CChildVisit _name _nt _nr _inh _syn _isLast) =+ (sem_CRule_CChildVisit _name _nt _nr _inh _syn _isLast)+sem_CRule (CRule _name _isIn _hasCode _nt _con _field _childnt _tp _pattern _rhs _defines _owrt _origin _uses _explicit _mbNamed) =+ (sem_CRule_CRule _name _isIn _hasCode _nt _con _field _childnt _tp (sem_Pattern _pattern) _rhs _defines _owrt _origin _uses _explicit _mbNamed) -- semantic domain-newtype T_CRule = T_CRule (( ))-data Inh_CRule = Inh_CRule {}-data Syn_CRule = Syn_CRule {}-wrap_CRule :: T_CRule ->- Inh_CRule ->- Syn_CRule -wrap_CRule (T_CRule sem ) (Inh_CRule ) =- (let ( ) = sem - in (Syn_CRule ))+newtype T_CRule = T_CRule (( ))+data Inh_CRule = Inh_CRule {}+data Syn_CRule = Syn_CRule {}+wrap_CRule :: T_CRule ->+ Inh_CRule ->+ Syn_CRule+wrap_CRule (T_CRule sem) (Inh_CRule) =+ (let ( ) = sem+ in (Syn_CRule)) sem_CRule_CChildVisit :: Identifier -> NontermIdent -> Int -> Attributes -> Attributes -> Bool ->- T_CRule -sem_CRule_CChildVisit name_ nt_ nr_ inh_ syn_ isLast_ =- (T_CRule ( ) )+ T_CRule+sem_CRule_CChildVisit name_ nt_ nr_ inh_ syn_ isLast_ =+ (T_CRule ( )) sem_CRule_CRule :: Identifier -> Bool -> Bool ->@@ -330,7 +330,7 @@ Identifier -> (Maybe NontermIdent) -> (Maybe Type) ->- T_Pattern ->+ T_Pattern -> ([String]) -> (Map Int (Identifier,Identifier,Maybe Type)) -> Bool ->@@ -338,9 +338,9 @@ (Set (Identifier, Identifier)) -> Bool -> (Maybe Identifier) ->- T_CRule -sem_CRule_CRule name_ isIn_ hasCode_ nt_ con_ field_ childnt_ tp_ (T_Pattern pattern_ ) rhs_ defines_ owrt_ origin_ uses_ explicit_ mbNamed_ =- (T_CRule ( ) )+ 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 ( )) -- CSegment ---------------------------------------------------- {- alternatives:@@ -349,25 +349,25 @@ child syn : {Attributes} -} -- cata-sem_CSegment :: CSegment ->- T_CSegment -sem_CSegment (CSegment _inh _syn ) =- (sem_CSegment_CSegment _inh _syn )+sem_CSegment :: CSegment ->+ T_CSegment+sem_CSegment (CSegment _inh _syn) =+ (sem_CSegment_CSegment _inh _syn) -- semantic domain-newtype T_CSegment = T_CSegment (( ))-data Inh_CSegment = Inh_CSegment {}-data Syn_CSegment = Syn_CSegment {}-wrap_CSegment :: T_CSegment ->- Inh_CSegment ->- Syn_CSegment -wrap_CSegment (T_CSegment sem ) (Inh_CSegment ) =- (let ( ) = sem - in (Syn_CSegment ))+newtype T_CSegment = T_CSegment (( ))+data Inh_CSegment = Inh_CSegment {}+data Syn_CSegment = Syn_CSegment {}+wrap_CSegment :: T_CSegment ->+ Inh_CSegment ->+ Syn_CSegment+wrap_CSegment (T_CSegment sem) (Inh_CSegment) =+ (let ( ) = sem+ in (Syn_CSegment)) sem_CSegment_CSegment :: Attributes -> Attributes ->- T_CSegment -sem_CSegment_CSegment inh_ syn_ =- (T_CSegment ( ) )+ T_CSegment+sem_CSegment_CSegment inh_ syn_ =+ (T_CSegment ( )) -- CSegments --------------------------------------------------- {- alternatives:@@ -377,28 +377,28 @@ alternative Nil: -} -- cata-sem_CSegments :: CSegments ->- T_CSegments -sem_CSegments list =- (Prelude.foldr sem_CSegments_Cons sem_CSegments_Nil (Prelude.map sem_CSegment list) )+sem_CSegments :: CSegments ->+ T_CSegments+sem_CSegments list =+ (Prelude.foldr sem_CSegments_Cons sem_CSegments_Nil (Prelude.map sem_CSegment list)) -- semantic domain-newtype T_CSegments = T_CSegments (( ))-data Inh_CSegments = Inh_CSegments {}-data Syn_CSegments = Syn_CSegments {}-wrap_CSegments :: T_CSegments ->- Inh_CSegments ->- Syn_CSegments -wrap_CSegments (T_CSegments sem ) (Inh_CSegments ) =- (let ( ) = sem - in (Syn_CSegments ))-sem_CSegments_Cons :: T_CSegment ->- T_CSegments ->- T_CSegments -sem_CSegments_Cons (T_CSegment hd_ ) (T_CSegments tl_ ) =- (T_CSegments ( ) )-sem_CSegments_Nil :: T_CSegments -sem_CSegments_Nil =- (T_CSegments ( ) )+newtype T_CSegments = T_CSegments (( ))+data Inh_CSegments = Inh_CSegments {}+data Syn_CSegments = Syn_CSegments {}+wrap_CSegments :: T_CSegments ->+ Inh_CSegments ->+ Syn_CSegments+wrap_CSegments (T_CSegments sem) (Inh_CSegments) =+ (let ( ) = sem+ in (Syn_CSegments))+sem_CSegments_Cons :: T_CSegment ->+ T_CSegments ->+ T_CSegments+sem_CSegments_Cons (T_CSegment hd_) (T_CSegments tl_) =+ (T_CSegments ( ))+sem_CSegments_Nil :: T_CSegments+sem_CSegments_Nil =+ (T_CSegments ( )) -- CVisit ------------------------------------------------------ {- alternatives:@@ -410,28 +410,28 @@ child ordered : {Bool} -} -- cata-sem_CVisit :: CVisit ->- T_CVisit -sem_CVisit (CVisit _inh _syn _vss _intra _ordered ) =- (sem_CVisit_CVisit _inh _syn (sem_Sequence _vss ) (sem_Sequence _intra ) _ordered )+sem_CVisit :: CVisit ->+ T_CVisit+sem_CVisit (CVisit _inh _syn _vss _intra _ordered) =+ (sem_CVisit_CVisit _inh _syn (sem_Sequence _vss) (sem_Sequence _intra) _ordered) -- semantic domain-newtype T_CVisit = T_CVisit (( ))-data Inh_CVisit = Inh_CVisit {}-data Syn_CVisit = Syn_CVisit {}-wrap_CVisit :: T_CVisit ->- Inh_CVisit ->- Syn_CVisit -wrap_CVisit (T_CVisit sem ) (Inh_CVisit ) =- (let ( ) = sem - in (Syn_CVisit ))+newtype T_CVisit = T_CVisit (( ))+data Inh_CVisit = Inh_CVisit {}+data Syn_CVisit = Syn_CVisit {}+wrap_CVisit :: T_CVisit ->+ Inh_CVisit ->+ Syn_CVisit+wrap_CVisit (T_CVisit sem) (Inh_CVisit) =+ (let ( ) = sem+ in (Syn_CVisit)) sem_CVisit_CVisit :: Attributes -> Attributes ->- T_Sequence ->- T_Sequence ->+ T_Sequence ->+ T_Sequence -> Bool ->- T_CVisit -sem_CVisit_CVisit inh_ syn_ (T_Sequence vss_ ) (T_Sequence intra_ ) ordered_ =- (T_CVisit ( ) )+ T_CVisit+sem_CVisit_CVisit inh_ syn_ (T_Sequence vss_) (T_Sequence intra_) ordered_ =+ (T_CVisit ( )) -- CVisits ----------------------------------------------------- {- alternatives:@@ -441,28 +441,28 @@ alternative Nil: -} -- cata-sem_CVisits :: CVisits ->- T_CVisits -sem_CVisits list =- (Prelude.foldr sem_CVisits_Cons sem_CVisits_Nil (Prelude.map sem_CVisit list) )+sem_CVisits :: CVisits ->+ T_CVisits+sem_CVisits list =+ (Prelude.foldr sem_CVisits_Cons sem_CVisits_Nil (Prelude.map sem_CVisit list)) -- semantic domain-newtype T_CVisits = T_CVisits (( ))-data Inh_CVisits = Inh_CVisits {}-data Syn_CVisits = Syn_CVisits {}-wrap_CVisits :: T_CVisits ->- Inh_CVisits ->- Syn_CVisits -wrap_CVisits (T_CVisits sem ) (Inh_CVisits ) =- (let ( ) = sem - in (Syn_CVisits ))-sem_CVisits_Cons :: T_CVisit ->- T_CVisits ->- T_CVisits -sem_CVisits_Cons (T_CVisit hd_ ) (T_CVisits tl_ ) =- (T_CVisits ( ) )-sem_CVisits_Nil :: T_CVisits -sem_CVisits_Nil =- (T_CVisits ( ) )+newtype T_CVisits = T_CVisits (( ))+data Inh_CVisits = Inh_CVisits {}+data Syn_CVisits = Syn_CVisits {}+wrap_CVisits :: T_CVisits ->+ Inh_CVisits ->+ Syn_CVisits+wrap_CVisits (T_CVisits sem) (Inh_CVisits) =+ (let ( ) = sem+ in (Syn_CVisits))+sem_CVisits_Cons :: T_CVisit ->+ T_CVisits ->+ T_CVisits+sem_CVisits_Cons (T_CVisit hd_) (T_CVisits tl_) =+ (T_CVisits ( ))+sem_CVisits_Nil :: T_CVisits+sem_CVisits_Nil =+ (T_CVisits ( )) -- DeclBlocks -------------------------------------------------- {- alternatives:@@ -475,33 +475,33 @@ child result : {Expr} -} -- cata-sem_DeclBlocks :: DeclBlocks ->- T_DeclBlocks -sem_DeclBlocks (DeclBlock _defs _visit _next ) =- (sem_DeclBlocks_DeclBlock _defs _visit (sem_DeclBlocks _next ) )-sem_DeclBlocks (DeclTerminator _defs _result ) =- (sem_DeclBlocks_DeclTerminator _defs _result )+sem_DeclBlocks :: DeclBlocks ->+ T_DeclBlocks+sem_DeclBlocks (DeclBlock _defs _visit _next) =+ (sem_DeclBlocks_DeclBlock _defs _visit (sem_DeclBlocks _next))+sem_DeclBlocks (DeclTerminator _defs _result) =+ (sem_DeclBlocks_DeclTerminator _defs _result) -- semantic domain-newtype T_DeclBlocks = T_DeclBlocks (( ))-data Inh_DeclBlocks = Inh_DeclBlocks {}-data Syn_DeclBlocks = Syn_DeclBlocks {}-wrap_DeclBlocks :: T_DeclBlocks ->- Inh_DeclBlocks ->- Syn_DeclBlocks -wrap_DeclBlocks (T_DeclBlocks sem ) (Inh_DeclBlocks ) =- (let ( ) = sem - in (Syn_DeclBlocks ))+newtype T_DeclBlocks = T_DeclBlocks (( ))+data Inh_DeclBlocks = Inh_DeclBlocks {}+data Syn_DeclBlocks = Syn_DeclBlocks {}+wrap_DeclBlocks :: T_DeclBlocks ->+ Inh_DeclBlocks ->+ Syn_DeclBlocks+wrap_DeclBlocks (T_DeclBlocks sem) (Inh_DeclBlocks) =+ (let ( ) = sem+ in (Syn_DeclBlocks)) sem_DeclBlocks_DeclBlock :: ([Decl]) -> Decl ->- T_DeclBlocks ->- T_DeclBlocks -sem_DeclBlocks_DeclBlock defs_ visit_ (T_DeclBlocks next_ ) =- (T_DeclBlocks ( ) )+ T_DeclBlocks ->+ T_DeclBlocks+sem_DeclBlocks_DeclBlock defs_ visit_ (T_DeclBlocks next_) =+ (T_DeclBlocks ( )) sem_DeclBlocks_DeclTerminator :: ([Decl]) -> Expr ->- T_DeclBlocks -sem_DeclBlocks_DeclTerminator defs_ result_ =- (T_DeclBlocks ( ) )+ T_DeclBlocks+sem_DeclBlocks_DeclTerminator defs_ result_ =+ (T_DeclBlocks ( )) -- DeclBlocksRoot ---------------------------------------------- {- alternatives:@@ -509,29 +509,29 @@ child blocks : DeclBlocks -} -- cata-sem_DeclBlocksRoot :: DeclBlocksRoot ->- T_DeclBlocksRoot -sem_DeclBlocksRoot (DeclBlocksRoot _blocks ) =- (sem_DeclBlocksRoot_DeclBlocksRoot (sem_DeclBlocks _blocks ) )+sem_DeclBlocksRoot :: DeclBlocksRoot ->+ T_DeclBlocksRoot+sem_DeclBlocksRoot (DeclBlocksRoot _blocks) =+ (sem_DeclBlocksRoot_DeclBlocksRoot (sem_DeclBlocks _blocks)) -- semantic domain-newtype T_DeclBlocksRoot = T_DeclBlocksRoot (( ))-data Inh_DeclBlocksRoot = Inh_DeclBlocksRoot {}-data Syn_DeclBlocksRoot = Syn_DeclBlocksRoot {}-wrap_DeclBlocksRoot :: T_DeclBlocksRoot ->- Inh_DeclBlocksRoot ->- Syn_DeclBlocksRoot -wrap_DeclBlocksRoot (T_DeclBlocksRoot sem ) (Inh_DeclBlocksRoot ) =- (let ( ) = sem - in (Syn_DeclBlocksRoot ))-sem_DeclBlocksRoot_DeclBlocksRoot :: T_DeclBlocks ->- T_DeclBlocksRoot -sem_DeclBlocksRoot_DeclBlocksRoot (T_DeclBlocks blocks_ ) =- (T_DeclBlocksRoot ( ) )+newtype T_DeclBlocksRoot = T_DeclBlocksRoot (( ))+data Inh_DeclBlocksRoot = Inh_DeclBlocksRoot {}+data Syn_DeclBlocksRoot = Syn_DeclBlocksRoot {}+wrap_DeclBlocksRoot :: T_DeclBlocksRoot ->+ Inh_DeclBlocksRoot ->+ Syn_DeclBlocksRoot+wrap_DeclBlocksRoot (T_DeclBlocksRoot sem) (Inh_DeclBlocksRoot) =+ (let ( ) = sem+ in (Syn_DeclBlocksRoot))+sem_DeclBlocksRoot_DeclBlocksRoot :: T_DeclBlocks ->+ T_DeclBlocksRoot+sem_DeclBlocksRoot_DeclBlocksRoot (T_DeclBlocks blocks_) =+ (T_DeclBlocksRoot ( )) -- Pattern ----------------------------------------------------- {- visit 0: synthesized attribute:- copy : SELF + copy : Pattern alternatives: alternative Alias: child field : {Identifier}@@ -559,115 +559,115 @@ local copy : _ -} -- cata-sem_Pattern :: Pattern ->- T_Pattern -sem_Pattern (Alias _field _attr _pat ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) )-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 )+sem_Pattern :: Pattern ->+ T_Pattern+sem_Pattern (Alias _field _attr _pat) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat))+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 ))-data Inh_Pattern = Inh_Pattern {}-data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: !(Pattern )}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern (T_Pattern sem ) (Inh_Pattern ) =- (let ( _lhsOcopy) = sem - in (Syn_Pattern _lhsOcopy ))+newtype T_Pattern = T_Pattern (( Pattern))+data Inh_Pattern = Inh_Pattern {}+data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: !(Pattern)}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern+wrap_Pattern (T_Pattern sem) (Inh_Pattern) =+ (let ( _lhsOcopy) = sem+ in (Syn_Pattern _lhsOcopy)) sem_Pattern_Alias :: Identifier -> Identifier ->- T_Pattern ->- T_Pattern -sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) =- (T_Pattern (case (pat_ ) of+ T_Pattern ->+ T_Pattern+sem_Pattern_Alias field_ attr_ (T_Pattern pat_) =+ (T_Pattern (case (pat_) of { ( _patIcopy) -> (case (({-# LINE 22 "src-ag/Patterns.ag" #-} Alias field_ attr_ _patIcopy- {-# LINE 594 "src-ag/PrintVisitCode.hs" #-}+ {-# LINE 594 "dist/build/PrintVisitCode" #-} )) of { _copy -> (case (({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 599 "src-ag/PrintVisitCode.hs" #-}+ {-# LINE 599 "dist/build/PrintVisitCode" #-} )) of { _lhsOcopy ->- ( _lhsOcopy) }) }) }) )+ ( _lhsOcopy) }) }) })) sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr name_ (T_Patterns pats_ ) =- (T_Pattern (case (pats_ ) of+ T_Patterns ->+ T_Pattern+sem_Pattern_Constr name_ (T_Patterns pats_) =+ (T_Pattern (case (pats_) of { ( _patsIcopy) -> (case (({-# LINE 22 "src-ag/Patterns.ag" #-} Constr name_ _patsIcopy- {-# LINE 611 "src-ag/PrintVisitCode.hs" #-}+ {-# LINE 611 "dist/build/PrintVisitCode" #-} )) of { _copy -> (case (({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 616 "src-ag/PrintVisitCode.hs" #-}+ {-# LINE 616 "dist/build/PrintVisitCode" #-} )) of { _lhsOcopy ->- ( _lhsOcopy) }) }) }) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable (T_Pattern pat_ ) =- (T_Pattern (case (pat_ ) of+ ( _lhsOcopy) }) }) }))+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern+sem_Pattern_Irrefutable (T_Pattern pat_) =+ (T_Pattern (case (pat_) of { ( _patIcopy) -> (case (({-# LINE 22 "src-ag/Patterns.ag" #-} Irrefutable _patIcopy- {-# LINE 627 "src-ag/PrintVisitCode.hs" #-}+ {-# LINE 627 "dist/build/PrintVisitCode" #-} )) of { _copy -> (case (({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 632 "src-ag/PrintVisitCode.hs" #-}+ {-# LINE 632 "dist/build/PrintVisitCode" #-} )) of { _lhsOcopy ->- ( _lhsOcopy) }) }) }) )+ ( _lhsOcopy) }) }) })) sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product pos_ (T_Patterns pats_ ) =- (T_Pattern (case (pats_ ) of+ T_Patterns ->+ T_Pattern+sem_Pattern_Product pos_ (T_Patterns pats_) =+ (T_Pattern (case (pats_) of { ( _patsIcopy) -> (case (({-# LINE 22 "src-ag/Patterns.ag" #-} Product pos_ _patsIcopy- {-# LINE 644 "src-ag/PrintVisitCode.hs" #-}+ {-# LINE 644 "dist/build/PrintVisitCode" #-} )) of { _copy -> (case (({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 649 "src-ag/PrintVisitCode.hs" #-}+ {-# LINE 649 "dist/build/PrintVisitCode" #-} )) of { _lhsOcopy ->- ( _lhsOcopy) }) }) }) )+ ( _lhsOcopy) }) }) })) sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore pos_ =+ T_Pattern+sem_Pattern_Underscore pos_ = (T_Pattern (case (({-# LINE 22 "src-ag/Patterns.ag" #-} Underscore pos_- {-# LINE 658 "src-ag/PrintVisitCode.hs" #-}+ {-# LINE 658 "dist/build/PrintVisitCode" #-} )) of { _copy -> (case (({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 663 "src-ag/PrintVisitCode.hs" #-}+ {-# LINE 663 "dist/build/PrintVisitCode" #-} )) of { _lhsOcopy ->- ( _lhsOcopy) }) }) )+ ( _lhsOcopy) }) })) -- Patterns ---------------------------------------------------- {- visit 0: synthesized attribute:- copy : SELF + copy : Patterns alternatives: alternative Cons: child hd : Pattern @@ -679,52 +679,52 @@ local copy : _ -} -- cata-sem_Patterns :: Patterns ->- T_Patterns -sem_Patterns list =- (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list) )+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 ))-data Inh_Patterns = Inh_Patterns {}-data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: !(Patterns )}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns (T_Patterns sem ) (Inh_Patterns ) =- (let ( _lhsOcopy) = sem - in (Syn_Patterns _lhsOcopy ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) =- (T_Patterns (case (tl_ ) of+newtype T_Patterns = T_Patterns (( Patterns))+data Inh_Patterns = Inh_Patterns {}+data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: !(Patterns)}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns+wrap_Patterns (T_Patterns sem) (Inh_Patterns) =+ (let ( _lhsOcopy) = sem+ in (Syn_Patterns _lhsOcopy))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns+sem_Patterns_Cons (T_Pattern hd_) (T_Patterns tl_) =+ (T_Patterns (case (tl_) of { ( _tlIcopy) ->- (case (hd_ ) of+ (case (hd_) of { ( _hdIcopy) -> (case (({-# LINE 22 "src-ag/Patterns.ag" #-} (:) _hdIcopy _tlIcopy- {-# LINE 707 "src-ag/PrintVisitCode.hs" #-}+ {-# LINE 707 "dist/build/PrintVisitCode" #-} )) of { _copy -> (case (({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 712 "src-ag/PrintVisitCode.hs" #-}+ {-# LINE 712 "dist/build/PrintVisitCode" #-} )) of { _lhsOcopy ->- ( _lhsOcopy) }) }) }) }) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =+ ( _lhsOcopy) }) }) }) }))+sem_Patterns_Nil :: T_Patterns+sem_Patterns_Nil = (T_Patterns (case (({-# LINE 22 "src-ag/Patterns.ag" #-} []- {-# LINE 720 "src-ag/PrintVisitCode.hs" #-}+ {-# LINE 720 "dist/build/PrintVisitCode" #-} )) of { _copy -> (case (({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 725 "src-ag/PrintVisitCode.hs" #-}+ {-# LINE 725 "dist/build/PrintVisitCode" #-} )) of { _lhsOcopy ->- ( _lhsOcopy) }) }) )+ ( _lhsOcopy) }) })) -- Sequence ---------------------------------------------------- {- alternatives:@@ -734,25 +734,25 @@ alternative Nil: -} -- cata-sem_Sequence :: Sequence ->- T_Sequence -sem_Sequence list =- (Prelude.foldr sem_Sequence_Cons sem_Sequence_Nil (Prelude.map sem_CRule list) )+sem_Sequence :: Sequence ->+ T_Sequence+sem_Sequence list =+ (Prelude.foldr sem_Sequence_Cons sem_Sequence_Nil (Prelude.map sem_CRule list)) -- semantic domain-newtype T_Sequence = T_Sequence (( ))-data Inh_Sequence = Inh_Sequence {}-data Syn_Sequence = Syn_Sequence {}-wrap_Sequence :: T_Sequence ->- Inh_Sequence ->- Syn_Sequence -wrap_Sequence (T_Sequence sem ) (Inh_Sequence ) =- (let ( ) = sem - in (Syn_Sequence ))-sem_Sequence_Cons :: T_CRule ->- T_Sequence ->- T_Sequence -sem_Sequence_Cons (T_CRule hd_ ) (T_Sequence tl_ ) =- (T_Sequence ( ) )-sem_Sequence_Nil :: T_Sequence -sem_Sequence_Nil =- (T_Sequence ( ) )+newtype T_Sequence = T_Sequence (( ))+data Inh_Sequence = Inh_Sequence {}+data Syn_Sequence = Syn_Sequence {}+wrap_Sequence :: T_Sequence ->+ Inh_Sequence ->+ Syn_Sequence+wrap_Sequence (T_Sequence sem) (Inh_Sequence) =+ (let ( ) = sem+ in (Syn_Sequence))+sem_Sequence_Cons :: T_CRule ->+ T_Sequence ->+ T_Sequence+sem_Sequence_Cons (T_CRule hd_) (T_Sequence tl_) =+ (T_Sequence ( ))+sem_Sequence_Nil :: T_Sequence+sem_Sequence_Nil =+ (T_Sequence ( ))
src-derived/ResolveLocals.hs view
@@ -1,2925 +1,2912 @@ --- UUAGC 0.9.39.1.0 (src-ag/ResolveLocals.ag)-module ResolveLocals where-{-# LINE 15 "src-ag/ResolveLocals.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 CommonTypes-import Patterns-import ErrorMessages-import AbstractSyntax-import Expression-import Options-import HsToken(HsTokensRoot(HsTokensRoot))-import HsTokenScanner(lexTokens)-import SemHsTokens(sem_HsTokensRoot,wrap_HsTokensRoot, Syn_HsTokensRoot(..),Inh_HsTokensRoot(..))-import Data.Maybe-{-# LINE 23 "dist/build/uuagc/uuagc-tmp/ResolveLocals.hs" #-}--{-# LINE 2 "src-ag/AbstractSyntax.ag" #-}---- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import Macro --marcos-import CommonTypes-import ErrorMessages-{-# LINE 35 "dist/build/uuagc/uuagc-tmp/ResolveLocals.hs" #-}--{-# LINE 2 "src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 42 "dist/build/uuagc/uuagc-tmp/ResolveLocals.hs" #-}--{-# LINE 2 "src-ag/Expression.ag" #-}--import UU.Scanner.Position(Pos)-import HsToken-{-# LINE 48 "dist/build/uuagc/uuagc-tmp/ResolveLocals.hs" #-}--- Child --------------------------------------------------------{-- visit 0:- inherited attributes:- allfields : [(Identifier,Type,ChildKind)]- allnts : [Identifier]- attrs : [(Identifier,Identifier)]- con : Identifier- inh : Attributes- inhMap : Map Identifier Attributes- mergeMap : Map Identifier (Identifier,[Identifier])- nt : Identifier- syn : Attributes- synMap : Map Identifier Attributes- synthesized attributes:- attributes : [(Identifier,Attributes,Attributes)]- field : (Identifier,Type,ChildKind)- output : SELF - alternatives:- alternative Child:- child name : {Identifier}- child tp : {Type}- child kind : {ChildKind}- visit 0:- local chnt : _- local inh : _- local syn : _- local output : _--}--- cata-sem_Child :: Child ->- T_Child -sem_Child (Child _name _tp _kind ) =- (sem_Child_Child _name _tp _kind )--- semantic domain-newtype T_Child = T_Child (([(Identifier,Type,ChildKind)]) ->- ([Identifier]) ->- ([(Identifier,Identifier)]) ->- Identifier ->- Attributes ->- (Map Identifier Attributes) ->- (Map Identifier (Identifier,[Identifier])) ->- Identifier ->- Attributes ->- (Map Identifier Attributes) ->- ( ([(Identifier,Attributes,Attributes)]),((Identifier,Type,ChildKind)),Child ))-data Inh_Child = Inh_Child {allfields_Inh_Child :: ([(Identifier,Type,ChildKind)]),allnts_Inh_Child :: ([Identifier]),attrs_Inh_Child :: ([(Identifier,Identifier)]),con_Inh_Child :: Identifier,inh_Inh_Child :: Attributes,inhMap_Inh_Child :: (Map Identifier Attributes),mergeMap_Inh_Child :: (Map Identifier (Identifier,[Identifier])),nt_Inh_Child :: Identifier,syn_Inh_Child :: Attributes,synMap_Inh_Child :: (Map Identifier Attributes)}-data Syn_Child = Syn_Child {attributes_Syn_Child :: ([(Identifier,Attributes,Attributes)]),field_Syn_Child :: ((Identifier,Type,ChildKind)),output_Syn_Child :: Child }-wrap_Child :: T_Child ->- Inh_Child ->- Syn_Child -wrap_Child (T_Child sem ) (Inh_Child _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIsyn _lhsIsynMap ) =- (let ( _lhsOattributes,_lhsOfield,_lhsOoutput) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIsyn _lhsIsynMap - in (Syn_Child _lhsOattributes _lhsOfield _lhsOoutput ))-sem_Child_Child :: Identifier ->- Type ->- ChildKind ->- T_Child -sem_Child_Child name_ tp_ kind_ =- (T_Child (\ _lhsIallfields- _lhsIallnts- _lhsIattrs- _lhsIcon- _lhsIinh- _lhsIinhMap- _lhsImergeMap- _lhsInt- _lhsIsyn- _lhsIsynMap ->- (let _lhsOattributes :: ([(Identifier,Attributes,Attributes)])- _lhsOfield :: ((Identifier,Type,ChildKind))- _lhsOoutput :: Child - -- "src-ag/ResolveLocals.ag"(line 84, column 11)- _lhsOattributes =- ({-# LINE 84 "src-ag/ResolveLocals.ag" #-}- [(name_, _inh , _syn )]- {-# LINE 125 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/ResolveLocals.ag"(line 87, column 11)- _lhsOfield =- ({-# LINE 87 "src-ag/ResolveLocals.ag" #-}- (name_, tp_, kind_)- {-# LINE 131 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 19, column 11)- _chnt =- ({-# LINE 19 "src-ag/DistChildAttr.ag" #-}- case tp_ of- NT nt _ _ -> nt- Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")- Haskell t -> identifier t- {-# LINE 140 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 23, column 11)- _inh =- ({-# LINE 23 "src-ag/DistChildAttr.ag" #-}- Map.findWithDefault Map.empty _chnt _lhsIinhMap- {-# LINE 146 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 24, column 11)- _syn =- ({-# LINE 24 "src-ag/DistChildAttr.ag" #-}- Map.findWithDefault Map.empty _chnt _lhsIsynMap- {-# LINE 152 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- Child name_ tp_ kind_- {-# LINE 158 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 164 "src-ag/ResolveLocals.hs" #-}- )- in ( _lhsOattributes,_lhsOfield,_lhsOoutput))) )--- Children -----------------------------------------------------{-- visit 0:- inherited attributes:- allfields : [(Identifier,Type,ChildKind)]- allnts : [Identifier]- attrs : [(Identifier,Identifier)]- con : Identifier- inh : Attributes- inhMap : Map Identifier Attributes- mergeMap : Map Identifier (Identifier,[Identifier])- nt : Identifier- syn : Attributes- synMap : Map Identifier Attributes- synthesized attributes:- attributes : [(Identifier,Attributes,Attributes)]- fields : [(Identifier,Type,ChildKind)]- 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,Type,ChildKind)]) ->- ([Identifier]) ->- ([(Identifier,Identifier)]) ->- Identifier ->- Attributes ->- (Map Identifier Attributes) ->- (Map Identifier (Identifier,[Identifier])) ->- Identifier ->- Attributes ->- (Map Identifier Attributes) ->- ( ([(Identifier,Attributes,Attributes)]),([(Identifier,Type,ChildKind)]),Children ))-data Inh_Children = Inh_Children {allfields_Inh_Children :: ([(Identifier,Type,ChildKind)]),allnts_Inh_Children :: ([Identifier]),attrs_Inh_Children :: ([(Identifier,Identifier)]),con_Inh_Children :: Identifier,inh_Inh_Children :: Attributes,inhMap_Inh_Children :: (Map Identifier Attributes),mergeMap_Inh_Children :: (Map Identifier (Identifier,[Identifier])),nt_Inh_Children :: Identifier,syn_Inh_Children :: Attributes,synMap_Inh_Children :: (Map Identifier Attributes)}-data Syn_Children = Syn_Children {attributes_Syn_Children :: ([(Identifier,Attributes,Attributes)]),fields_Syn_Children :: ([(Identifier,Type,ChildKind)]),output_Syn_Children :: Children }-wrap_Children :: T_Children ->- Inh_Children ->- Syn_Children -wrap_Children (T_Children sem ) (Inh_Children _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIsyn _lhsIsynMap ) =- (let ( _lhsOattributes,_lhsOfields,_lhsOoutput) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIsyn _lhsIsynMap - in (Syn_Children _lhsOattributes _lhsOfields _lhsOoutput ))-sem_Children_Cons :: T_Child ->- T_Children ->- T_Children -sem_Children_Cons (T_Child hd_ ) (T_Children tl_ ) =- (T_Children (\ _lhsIallfields- _lhsIallnts- _lhsIattrs- _lhsIcon- _lhsIinh- _lhsIinhMap- _lhsImergeMap- _lhsInt- _lhsIsyn- _lhsIsynMap ->- (let _lhsOfields :: ([(Identifier,Type,ChildKind)])- _lhsOattributes :: ([(Identifier,Attributes,Attributes)])- _lhsOoutput :: Children - _hdOallfields :: ([(Identifier,Type,ChildKind)])- _hdOallnts :: ([Identifier])- _hdOattrs :: ([(Identifier,Identifier)])- _hdOcon :: Identifier- _hdOinh :: Attributes- _hdOinhMap :: (Map Identifier Attributes)- _hdOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _hdOnt :: Identifier- _hdOsyn :: Attributes- _hdOsynMap :: (Map Identifier Attributes)- _tlOallfields :: ([(Identifier,Type,ChildKind)])- _tlOallnts :: ([Identifier])- _tlOattrs :: ([(Identifier,Identifier)])- _tlOcon :: Identifier- _tlOinh :: Attributes- _tlOinhMap :: (Map Identifier Attributes)- _tlOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _tlOnt :: Identifier- _tlOsyn :: Attributes- _tlOsynMap :: (Map Identifier Attributes)- _hdIattributes :: ([(Identifier,Attributes,Attributes)])- _hdIfield :: ((Identifier,Type,ChildKind))- _hdIoutput :: Child - _tlIattributes :: ([(Identifier,Attributes,Attributes)])- _tlIfields :: ([(Identifier,Type,ChildKind)])- _tlIoutput :: Children - -- "src-ag/ResolveLocals.ag"(line 90, column 11)- _lhsOfields =- ({-# LINE 90 "src-ag/ResolveLocals.ag" #-}- _hdIfield : _tlIfields- {-# LINE 267 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 82, column 32)- _lhsOattributes =- ({-# LINE 82 "src-ag/ResolveLocals.ag" #-}- _hdIattributes ++ _tlIattributes- {-# LINE 273 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 279 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 285 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOallfields =- ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}- _lhsIallfields- {-# LINE 291 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOallnts =- ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}- _lhsIallnts- {-# LINE 297 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOattrs =- ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}- _lhsIattrs- {-# LINE 303 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOcon =- ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}- _lhsIcon- {-# LINE 309 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOinh =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIinh- {-# LINE 315 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 321 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 131 "src-ag/ResolveLocals.ag" #-}- _lhsImergeMap- {-# LINE 327 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOnt =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsInt- {-# LINE 333 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOsyn =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIsyn- {-# LINE 339 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 345 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOallfields =- ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}- _lhsIallfields- {-# LINE 351 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOallnts =- ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}- _lhsIallnts- {-# LINE 357 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOattrs =- ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}- _lhsIattrs- {-# LINE 363 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOcon =- ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}- _lhsIcon- {-# LINE 369 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOinh =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIinh- {-# LINE 375 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 381 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 131 "src-ag/ResolveLocals.ag" #-}- _lhsImergeMap- {-# LINE 387 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOnt =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsInt- {-# LINE 393 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOsyn =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIsyn- {-# LINE 399 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 405 "src-ag/ResolveLocals.hs" #-}- )- ( _hdIattributes,_hdIfield,_hdIoutput) =- hd_ _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOinh _hdOinhMap _hdOmergeMap _hdOnt _hdOsyn _hdOsynMap - ( _tlIattributes,_tlIfields,_tlIoutput) =- tl_ _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOinh _tlOinhMap _tlOmergeMap _tlOnt _tlOsyn _tlOsynMap - in ( _lhsOattributes,_lhsOfields,_lhsOoutput))) )-sem_Children_Nil :: T_Children -sem_Children_Nil =- (T_Children (\ _lhsIallfields- _lhsIallnts- _lhsIattrs- _lhsIcon- _lhsIinh- _lhsIinhMap- _lhsImergeMap- _lhsInt- _lhsIsyn- _lhsIsynMap ->- (let _lhsOfields :: ([(Identifier,Type,ChildKind)])- _lhsOattributes :: ([(Identifier,Attributes,Attributes)])- _lhsOoutput :: Children - -- "src-ag/ResolveLocals.ag"(line 91, column 11)- _lhsOfields =- ({-# LINE 91 "src-ag/ResolveLocals.ag" #-}- []- {-# LINE 431 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 82, column 32)- _lhsOattributes =- ({-# LINE 82 "src-ag/ResolveLocals.ag" #-}- []- {-# LINE 437 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- []- {-# LINE 443 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 449 "src-ag/ResolveLocals.hs" #-}- )- in ( _lhsOattributes,_lhsOfields,_lhsOoutput))) )--- Expression ---------------------------------------------------{-- visit 0:- inherited attributes:- allfields : [(Identifier,Type,ChildKind)]- allnts : [Identifier]- attrs : [(Identifier,Identifier)]- con : Identifier- mergeMap : Map Identifier (Identifier,[Identifier])- nt : Identifier- options : Options- synthesized attributes:- errors : Seq Error- output : SELF - alternatives:- alternative Expression:- child pos : {Pos}- child tks : {[HsToken]}- visit 0:- local _tup1 : _- local errors : _- local newTks : _- local output : _--}--- cata-sem_Expression :: Expression ->- T_Expression -sem_Expression (Expression _pos _tks ) =- (sem_Expression_Expression _pos _tks )--- semantic domain-newtype T_Expression = T_Expression (([(Identifier,Type,ChildKind)]) ->- ([Identifier]) ->- ([(Identifier,Identifier)]) ->- Identifier ->- (Map Identifier (Identifier,[Identifier])) ->- Identifier ->- Options ->- ( (Seq Error),Expression ))-data Inh_Expression = Inh_Expression {allfields_Inh_Expression :: ([(Identifier,Type,ChildKind)]),allnts_Inh_Expression :: ([Identifier]),attrs_Inh_Expression :: ([(Identifier,Identifier)]),con_Inh_Expression :: Identifier,mergeMap_Inh_Expression :: (Map Identifier (Identifier,[Identifier])),nt_Inh_Expression :: Identifier,options_Inh_Expression :: Options}-data Syn_Expression = Syn_Expression {errors_Syn_Expression :: (Seq Error),output_Syn_Expression :: Expression }-wrap_Expression :: T_Expression ->- Inh_Expression ->- Syn_Expression -wrap_Expression (T_Expression sem ) (Inh_Expression _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt _lhsIoptions ) =- (let ( _lhsOerrors,_lhsOoutput) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt _lhsIoptions - in (Syn_Expression _lhsOerrors _lhsOoutput ))-sem_Expression_Expression :: Pos ->- ([HsToken]) ->- T_Expression -sem_Expression_Expression pos_ tks_ =- (T_Expression (\ _lhsIallfields- _lhsIallnts- _lhsIattrs- _lhsIcon- _lhsImergeMap- _lhsInt- _lhsIoptions ->- (let _lhsOoutput :: Expression - _lhsOerrors :: (Seq Error)- -- "src-ag/ResolveLocals.ag"(line 145, column 21)- __tup1 =- ({-# LINE 145 "src-ag/ResolveLocals.ag" #-}- let mergedChildren = [ x | (_,xs) <- Map.elems _lhsImergeMap, x <- xs ]- attrsIn = filter (\(fld,_) -> not (fld `elem` mergedChildren)) _lhsIattrs- inherited = Inh_HsTokensRoot- { attrs_Inh_HsTokensRoot = attrsIn- , con_Inh_HsTokensRoot = _lhsIcon- , allfields_Inh_HsTokensRoot = _lhsIallfields- , allnts_Inh_HsTokensRoot = _lhsIallnts- , nt_Inh_HsTokensRoot = _lhsInt- }- synthesized = wrap_HsTokensRoot (sem_HsTokensRoot (HsTokensRoot tks_)) inherited- in (errors_Syn_HsTokensRoot synthesized, output_Syn_HsTokensRoot synthesized)- {-# LINE 525 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/ResolveLocals.ag"(line 145, column 21)- (_errors,_) =- ({-# LINE 145 "src-ag/ResolveLocals.ag" #-}- __tup1- {-# LINE 531 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/ResolveLocals.ag"(line 145, column 21)- (_,_newTks) =- ({-# LINE 145 "src-ag/ResolveLocals.ag" #-}- __tup1- {-# LINE 537 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/ResolveLocals.ag"(line 157, column 17)- _lhsOoutput =- ({-# LINE 157 "src-ag/ResolveLocals.ag" #-}- Expression pos_ _newTks- {-# LINE 543 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- _errors- {-# LINE 549 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- Expression pos_ tks_- {-# LINE 555 "src-ag/ResolveLocals.hs" #-}- )- in ( _lhsOerrors,_lhsOoutput))) )--- Grammar ------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attributes:- errors : Seq Error- output : SELF - alternatives:- alternative Grammar:- child typeSyns : {TypeSyns}- child useMap : {UseMap}- child derivings : {Derivings}- child wrappers : {Set NontermIdent}- child nonts : Nonterminals - child pragmas : {PragmaMap}- child manualAttrOrderMap : {AttrOrderMap}- child paramMap : {ParamMap}- child contextMap : {ContextMap}- child quantMap : {QuantMap}- child uniqueMap : {UniqueMap}- child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}- visit 0:- local output : _--}--- cata-sem_Grammar :: Grammar ->- T_Grammar -sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap ) =- (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap )--- semantic domain-newtype T_Grammar = T_Grammar (Options ->- ( (Seq Error),Grammar ))-data Inh_Grammar = Inh_Grammar {options_Inh_Grammar :: Options}-data Syn_Grammar = Syn_Grammar {errors_Syn_Grammar :: (Seq Error),output_Syn_Grammar :: Grammar }-wrap_Grammar :: T_Grammar ->- Inh_Grammar ->- Syn_Grammar -wrap_Grammar (T_Grammar sem ) (Inh_Grammar _lhsIoptions ) =- (let ( _lhsOerrors,_lhsOoutput) = sem _lhsIoptions - in (Syn_Grammar _lhsOerrors _lhsOoutput ))-sem_Grammar_Grammar :: TypeSyns ->- UseMap ->- Derivings ->- (Set NontermIdent) ->- T_Nonterminals ->- PragmaMap ->- AttrOrderMap ->- ParamMap ->- ContextMap ->- QuantMap ->- UniqueMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->- T_Grammar -sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_ =- (T_Grammar (\ _lhsIoptions ->- (let _nontsOallnts :: ([Identifier])- _nontsOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))- _nontsOinhMap :: (Map Identifier Attributes)- _nontsOsynMap :: (Map Identifier Attributes)- _lhsOerrors :: (Seq Error)- _lhsOoutput :: Grammar - _nontsOoptions :: Options- _nontsIerrors :: (Seq Error)- _nontsIinhMap' :: (Map Identifier Attributes)- _nontsInonts :: ([(NontermIdent,[ConstructorIdent])])- _nontsIoutput :: Nonterminals - _nontsIsynMap' :: (Map Identifier Attributes)- -- "src-ag/ResolveLocals.ag"(line 60, column 13)- _nontsOallnts =- ({-# LINE 60 "src-ag/ResolveLocals.ag" #-}- map fst (_nontsInonts)- {-# LINE 634 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/ResolveLocals.ag"(line 120, column 14)- _nontsOmergeMap =- ({-# LINE 120 "src-ag/ResolveLocals.ag" #-}- Map.map (Map.map (Map.map (\(nt,srcs,_) -> (nt,srcs)))) mergeMap_- {-# LINE 640 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 15, column 13)- _nontsOinhMap =- ({-# LINE 15 "src-ag/DistChildAttr.ag" #-}- _nontsIinhMap'- {-# LINE 646 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 16, column 13)- _nontsOsynMap =- ({-# LINE 16 "src-ag/DistChildAttr.ag" #-}- _nontsIsynMap'- {-# LINE 652 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- _nontsIerrors- {-# LINE 658 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- Grammar typeSyns_ useMap_ derivings_ wrappers_ _nontsIoutput pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_- {-# LINE 664 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 670 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _nontsOoptions =- ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}- _lhsIoptions- {-# LINE 676 "src-ag/ResolveLocals.hs" #-}- )- ( _nontsIerrors,_nontsIinhMap',_nontsInonts,_nontsIoutput,_nontsIsynMap') =- nonts_ _nontsOallnts _nontsOinhMap _nontsOmergeMap _nontsOoptions _nontsOsynMap - in ( _lhsOerrors,_lhsOoutput))) )--- Nonterminal --------------------------------------------------{-- visit 0:- inherited attributes:- allnts : [Identifier]- inhMap : Map Identifier Attributes- mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))- options : Options- synMap : Map Identifier Attributes- synthesized attributes:- errors : Seq Error- inhMap' : Map Identifier Attributes- nonts : [(NontermIdent,[ConstructorIdent])]- output : SELF - synMap' : Map Identifier Attributes- alternatives:- alternative Nonterminal:- child nt : {NontermIdent}- child params : {[Identifier]}- child inh : {Attributes}- child syn : {Attributes}- child prods : Productions - visit 0:- local mergeMap : _- 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 (([Identifier]) ->- (Map Identifier Attributes) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->- Options ->- (Map Identifier Attributes) ->- ( (Seq Error),(Map Identifier Attributes),([(NontermIdent,[ConstructorIdent])]),Nonterminal ,(Map Identifier Attributes)))-data Inh_Nonterminal = Inh_Nonterminal {allnts_Inh_Nonterminal :: ([Identifier]),inhMap_Inh_Nonterminal :: (Map Identifier Attributes),mergeMap_Inh_Nonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))),options_Inh_Nonterminal :: Options,synMap_Inh_Nonterminal :: (Map Identifier Attributes)}-data Syn_Nonterminal = Syn_Nonterminal {errors_Syn_Nonterminal :: (Seq Error),inhMap'_Syn_Nonterminal :: (Map Identifier Attributes),nonts_Syn_Nonterminal :: ([(NontermIdent,[ConstructorIdent])]),output_Syn_Nonterminal :: Nonterminal ,synMap'_Syn_Nonterminal :: (Map Identifier Attributes)}-wrap_Nonterminal :: T_Nonterminal ->- Inh_Nonterminal ->- Syn_Nonterminal -wrap_Nonterminal (T_Nonterminal sem ) (Inh_Nonterminal _lhsIallnts _lhsIinhMap _lhsImergeMap _lhsIoptions _lhsIsynMap ) =- (let ( _lhsOerrors,_lhsOinhMap',_lhsOnonts,_lhsOoutput,_lhsOsynMap') = sem _lhsIallnts _lhsIinhMap _lhsImergeMap _lhsIoptions _lhsIsynMap - in (Syn_Nonterminal _lhsOerrors _lhsOinhMap' _lhsOnonts _lhsOoutput _lhsOsynMap' ))-sem_Nonterminal_Nonterminal :: NontermIdent ->- ([Identifier]) ->- Attributes ->- Attributes ->- T_Productions ->- T_Nonterminal -sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ (T_Productions prods_ ) =- (T_Nonterminal (\ _lhsIallnts- _lhsIinhMap- _lhsImergeMap- _lhsIoptions- _lhsIsynMap ->- (let _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])- _prodsOnt :: Identifier- _prodsOinh :: Attributes- _prodsOsyn :: Attributes- _lhsOinhMap' :: (Map Identifier Attributes)- _lhsOsynMap' :: (Map Identifier Attributes)- _lhsOerrors :: (Seq Error)- _lhsOoutput :: Nonterminal - _prodsOallnts :: ([Identifier])- _prodsOinhMap :: (Map Identifier Attributes)- _prodsOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))- _prodsOoptions :: Options- _prodsOsynMap :: (Map Identifier Attributes)- _prodsIcons :: ([ConstructorIdent])- _prodsIerrors :: (Seq Error)- _prodsIoutput :: Productions - -- "src-ag/ResolveLocals.ag"(line 64, column 19)- _lhsOnonts =- ({-# LINE 64 "src-ag/ResolveLocals.ag" #-}- [(nt_,_prodsIcons)]- {-# LINE 759 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/ResolveLocals.ag"(line 112, column 17)- _prodsOnt =- ({-# LINE 112 "src-ag/ResolveLocals.ag" #-}- nt_- {-# LINE 765 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/ResolveLocals.ag"(line 115, column 17)- _prodsOinh =- ({-# LINE 115 "src-ag/ResolveLocals.ag" #-}- inh_- {-# LINE 771 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/ResolveLocals.ag"(line 116, column 17)- _prodsOsyn =- ({-# LINE 116 "src-ag/ResolveLocals.ag" #-}- syn_- {-# LINE 777 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/ResolveLocals.ag"(line 128, column 32)- _mergeMap =- ({-# LINE 128 "src-ag/ResolveLocals.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsImergeMap- {-# LINE 783 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 7, column 18)- _lhsOinhMap' =- ({-# LINE 7 "src-ag/DistChildAttr.ag" #-}- Map.singleton nt_ inh_- {-# LINE 789 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/DistChildAttr.ag"(line 8, column 18)- _lhsOsynMap' =- ({-# LINE 8 "src-ag/DistChildAttr.ag" #-}- Map.singleton nt_ syn_- {-# LINE 795 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- _prodsIerrors- {-# LINE 801 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- Nonterminal nt_ params_ inh_ syn_ _prodsIoutput- {-# LINE 807 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 813 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _prodsOallnts =- ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}- _lhsIallnts- {-# LINE 819 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _prodsOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 825 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (from local)- _prodsOmergeMap =- ({-# LINE 126 "src-ag/ResolveLocals.ag" #-}- _mergeMap- {-# LINE 831 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _prodsOoptions =- ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}- _lhsIoptions- {-# LINE 837 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _prodsOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 843 "src-ag/ResolveLocals.hs" #-}- )- ( _prodsIcons,_prodsIerrors,_prodsIoutput) =- prods_ _prodsOallnts _prodsOinh _prodsOinhMap _prodsOmergeMap _prodsOnt _prodsOoptions _prodsOsyn _prodsOsynMap - in ( _lhsOerrors,_lhsOinhMap',_lhsOnonts,_lhsOoutput,_lhsOsynMap'))) )--- Nonterminals -------------------------------------------------{-- visit 0:- inherited attributes:- allnts : [Identifier]- inhMap : Map Identifier Attributes- mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))- options : Options- synMap : Map Identifier Attributes- synthesized attributes:- errors : Seq Error- inhMap' : Map Identifier Attributes- nonts : [(NontermIdent,[ConstructorIdent])]- output : SELF - synMap' : Map Identifier Attributes- 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 (([Identifier]) ->- (Map Identifier Attributes) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->- Options ->- (Map Identifier Attributes) ->- ( (Seq Error),(Map Identifier Attributes),([(NontermIdent,[ConstructorIdent])]),Nonterminals ,(Map Identifier Attributes)))-data Inh_Nonterminals = Inh_Nonterminals {allnts_Inh_Nonterminals :: ([Identifier]),inhMap_Inh_Nonterminals :: (Map Identifier Attributes),mergeMap_Inh_Nonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))),options_Inh_Nonterminals :: Options,synMap_Inh_Nonterminals :: (Map Identifier Attributes)}-data Syn_Nonterminals = Syn_Nonterminals {errors_Syn_Nonterminals :: (Seq Error),inhMap'_Syn_Nonterminals :: (Map Identifier Attributes),nonts_Syn_Nonterminals :: ([(NontermIdent,[ConstructorIdent])]),output_Syn_Nonterminals :: Nonterminals ,synMap'_Syn_Nonterminals :: (Map Identifier Attributes)}-wrap_Nonterminals :: T_Nonterminals ->- Inh_Nonterminals ->- Syn_Nonterminals -wrap_Nonterminals (T_Nonterminals sem ) (Inh_Nonterminals _lhsIallnts _lhsIinhMap _lhsImergeMap _lhsIoptions _lhsIsynMap ) =- (let ( _lhsOerrors,_lhsOinhMap',_lhsOnonts,_lhsOoutput,_lhsOsynMap') = sem _lhsIallnts _lhsIinhMap _lhsImergeMap _lhsIoptions _lhsIsynMap - in (Syn_Nonterminals _lhsOerrors _lhsOinhMap' _lhsOnonts _lhsOoutput _lhsOsynMap' ))-sem_Nonterminals_Cons :: T_Nonterminal ->- T_Nonterminals ->- T_Nonterminals -sem_Nonterminals_Cons (T_Nonterminal hd_ ) (T_Nonterminals tl_ ) =- (T_Nonterminals (\ _lhsIallnts- _lhsIinhMap- _lhsImergeMap- _lhsIoptions- _lhsIsynMap ->- (let _lhsOerrors :: (Seq Error)- _lhsOinhMap' :: (Map Identifier Attributes)- _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])- _lhsOsynMap' :: (Map Identifier Attributes)- _lhsOoutput :: Nonterminals - _hdOallnts :: ([Identifier])- _hdOinhMap :: (Map Identifier Attributes)- _hdOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))- _hdOoptions :: Options- _hdOsynMap :: (Map Identifier Attributes)- _tlOallnts :: ([Identifier])- _tlOinhMap :: (Map Identifier Attributes)- _tlOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))- _tlOoptions :: Options- _tlOsynMap :: (Map Identifier Attributes)- _hdIerrors :: (Seq Error)- _hdIinhMap' :: (Map Identifier Attributes)- _hdInonts :: ([(NontermIdent,[ConstructorIdent])])- _hdIoutput :: Nonterminal - _hdIsynMap' :: (Map Identifier Attributes)- _tlIerrors :: (Seq Error)- _tlIinhMap' :: (Map Identifier Attributes)- _tlInonts :: ([(NontermIdent,[ConstructorIdent])])- _tlIoutput :: Nonterminals - _tlIsynMap' :: (Map Identifier Attributes)- -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 931 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)- _lhsOinhMap' =- ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- _hdIinhMap' `Map.union` _tlIinhMap'- {-# LINE 937 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 62, column 43)- _lhsOnonts =- ({-# LINE 62 "src-ag/ResolveLocals.ag" #-}- _hdInonts ++ _tlInonts- {-# LINE 943 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)- _lhsOsynMap' =- ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- _hdIsynMap' `Map.union` _tlIsynMap'- {-# LINE 949 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 955 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 961 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOallnts =- ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}- _lhsIallnts- {-# LINE 967 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 973 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 123 "src-ag/ResolveLocals.ag" #-}- _lhsImergeMap- {-# LINE 979 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}- _lhsIoptions- {-# LINE 985 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 991 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOallnts =- ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}- _lhsIallnts- {-# LINE 997 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 1003 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 123 "src-ag/ResolveLocals.ag" #-}- _lhsImergeMap- {-# LINE 1009 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}- _lhsIoptions- {-# LINE 1015 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 1021 "src-ag/ResolveLocals.hs" #-}- )- ( _hdIerrors,_hdIinhMap',_hdInonts,_hdIoutput,_hdIsynMap') =- hd_ _hdOallnts _hdOinhMap _hdOmergeMap _hdOoptions _hdOsynMap - ( _tlIerrors,_tlIinhMap',_tlInonts,_tlIoutput,_tlIsynMap') =- tl_ _tlOallnts _tlOinhMap _tlOmergeMap _tlOoptions _tlOsynMap - in ( _lhsOerrors,_lhsOinhMap',_lhsOnonts,_lhsOoutput,_lhsOsynMap'))) )-sem_Nonterminals_Nil :: T_Nonterminals -sem_Nonterminals_Nil =- (T_Nonterminals (\ _lhsIallnts- _lhsIinhMap- _lhsImergeMap- _lhsIoptions- _lhsIsynMap ->- (let _lhsOerrors :: (Seq Error)- _lhsOinhMap' :: (Map Identifier Attributes)- _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])- _lhsOsynMap' :: (Map Identifier Attributes)- _lhsOoutput :: Nonterminals - -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- Seq.empty- {-# LINE 1044 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)- _lhsOinhMap' =- ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- Map.empty- {-# LINE 1050 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 62, column 43)- _lhsOnonts =- ({-# LINE 62 "src-ag/ResolveLocals.ag" #-}- []- {-# LINE 1056 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)- _lhsOsynMap' =- ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}- Map.empty- {-# LINE 1062 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- []- {-# LINE 1068 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 1074 "src-ag/ResolveLocals.hs" #-}- )- in ( _lhsOerrors,_lhsOinhMap',_lhsOnonts,_lhsOoutput,_lhsOsynMap'))) )--- Pattern ------------------------------------------------------{-- visit 0:- inherited attributes:- con : Identifier- inh : Attributes- nt : Identifier- syn : Attributes- synthesized attributes:- copy : SELF - errors : Seq Error- instVars : [Identifier]- locVars : [Identifier]- output : SELF - alternatives:- alternative Alias:- child field : {Identifier}- child attr : {Identifier}- child pat : Pattern - visit 0:- local copy : _- local output : _- alternative Constr:- child name : {ConstructorIdent}- child pats : Patterns - visit 0:- local copy : _- local output : _- alternative Irrefutable:- child pat : Pattern - visit 0:- local copy : _- local output : _- alternative Product:- child pos : {Pos}- child pats : Patterns - visit 0:- local copy : _- local output : _- alternative Underscore:- child pos : {Pos}- visit 0:- local copy : _- local output : _--}--- cata-sem_Pattern :: Pattern ->- T_Pattern -sem_Pattern (Alias _field _attr _pat ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) )-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 (Identifier ->- Attributes ->- Identifier ->- Attributes ->- ( Pattern ,(Seq Error),([Identifier]),([Identifier]),Pattern ))-data Inh_Pattern = Inh_Pattern {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),instVars_Syn_Pattern :: ([Identifier]),locVars_Syn_Pattern :: ([Identifier]),output_Syn_Pattern :: Pattern }-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern (T_Pattern sem ) (Inh_Pattern _lhsIcon _lhsIinh _lhsInt _lhsIsyn ) =- (let ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput) = sem _lhsIcon _lhsIinh _lhsInt _lhsIsyn - in (Syn_Pattern _lhsOcopy _lhsOerrors _lhsOinstVars _lhsOlocVars _lhsOoutput ))-sem_Pattern_Alias :: Identifier ->- Identifier ->- T_Pattern ->- T_Pattern -sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) =- (T_Pattern (\ _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOlocVars :: ([Identifier])- _lhsOinstVars :: ([Identifier])- _lhsOerrors :: (Seq Error)- _lhsOcopy :: Pattern - _lhsOoutput :: Pattern - _patOcon :: Identifier- _patOinh :: Attributes- _patOnt :: Identifier- _patOsyn :: Attributes- _patIcopy :: Pattern - _patIerrors :: (Seq Error)- _patIinstVars :: ([Identifier])- _patIlocVars :: ([Identifier])- _patIoutput :: Pattern - -- "src-ag/ResolveLocals.ag"(line 96, column 14)- _lhsOlocVars =- ({-# LINE 96 "src-ag/ResolveLocals.ag" #-}- if field_ == _LOC- then [attr_]- else []- {-# LINE 1178 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/ResolveLocals.ag"(line 99, column 14)- _lhsOinstVars =- ({-# LINE 99 "src-ag/ResolveLocals.ag" #-}- if field_ == _INST- then [attr_]- else []- {-# LINE 1186 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- _patIerrors- {-# LINE 1192 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Alias field_ attr_ _patIcopy- {-# LINE 1198 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- Alias field_ attr_ _patIoutput- {-# LINE 1204 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1210 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 1216 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patOcon =- ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}- _lhsIcon- {-# LINE 1222 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patOinh =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIinh- {-# LINE 1228 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patOnt =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsInt- {-# LINE 1234 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patOsyn =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIsyn- {-# LINE 1240 "src-ag/ResolveLocals.hs" #-}- )- ( _patIcopy,_patIerrors,_patIinstVars,_patIlocVars,_patIoutput) =- pat_ _patOcon _patOinh _patOnt _patOsyn - in ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))) )-sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr name_ (T_Patterns pats_ ) =- (T_Pattern (\ _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOcopy :: Pattern - _lhsOoutput :: Pattern - _patsOcon :: Identifier- _patsOinh :: Attributes- _patsOnt :: Identifier- _patsOsyn :: Attributes- _patsIcopy :: Patterns - _patsIerrors :: (Seq Error)- _patsIinstVars :: ([Identifier])- _patsIlocVars :: ([Identifier])- _patsIoutput :: Patterns - -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- _patsIerrors- {-# LINE 1271 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)- _lhsOinstVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- _patsIinstVars- {-# LINE 1277 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)- _lhsOlocVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- _patsIlocVars- {-# LINE 1283 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 1289 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- Constr name_ _patsIoutput- {-# LINE 1295 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1301 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 1307 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patsOcon =- ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}- _lhsIcon- {-# LINE 1313 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patsOinh =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIinh- {-# LINE 1319 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patsOnt =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsInt- {-# LINE 1325 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patsOsyn =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIsyn- {-# LINE 1331 "src-ag/ResolveLocals.hs" #-}- )- ( _patsIcopy,_patsIerrors,_patsIinstVars,_patsIlocVars,_patsIoutput) =- pats_ _patsOcon _patsOinh _patsOnt _patsOsyn - in ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable (T_Pattern pat_ ) =- (T_Pattern (\ _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOcopy :: Pattern - _lhsOoutput :: Pattern - _patOcon :: Identifier- _patOinh :: Attributes- _patOnt :: Identifier- _patOsyn :: Attributes- _patIcopy :: Pattern - _patIerrors :: (Seq Error)- _patIinstVars :: ([Identifier])- _patIlocVars :: ([Identifier])- _patIoutput :: Pattern - -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- _patIerrors- {-# LINE 1361 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)- _lhsOinstVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- _patIinstVars- {-# LINE 1367 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)- _lhsOlocVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- _patIlocVars- {-# LINE 1373 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 1379 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- Irrefutable _patIoutput- {-# LINE 1385 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1391 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 1397 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patOcon =- ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}- _lhsIcon- {-# LINE 1403 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patOinh =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIinh- {-# LINE 1409 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patOnt =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsInt- {-# LINE 1415 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patOsyn =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIsyn- {-# LINE 1421 "src-ag/ResolveLocals.hs" #-}- )- ( _patIcopy,_patIerrors,_patIinstVars,_patIlocVars,_patIoutput) =- pat_ _patOcon _patOinh _patOnt _patOsyn - in ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))) )-sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product pos_ (T_Patterns pats_ ) =- (T_Pattern (\ _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOcopy :: Pattern - _lhsOoutput :: Pattern - _patsOcon :: Identifier- _patsOinh :: Attributes- _patsOnt :: Identifier- _patsOsyn :: Attributes- _patsIcopy :: Patterns - _patsIerrors :: (Seq Error)- _patsIinstVars :: ([Identifier])- _patsIlocVars :: ([Identifier])- _patsIoutput :: Patterns - -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- _patsIerrors- {-# LINE 1452 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)- _lhsOinstVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- _patsIinstVars- {-# LINE 1458 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)- _lhsOlocVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- _patsIlocVars- {-# LINE 1464 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 1470 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- Product pos_ _patsIoutput- {-# LINE 1476 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1482 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 1488 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patsOcon =- ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}- _lhsIcon- {-# LINE 1494 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patsOinh =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIinh- {-# LINE 1500 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patsOnt =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsInt- {-# LINE 1506 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patsOsyn =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIsyn- {-# LINE 1512 "src-ag/ResolveLocals.hs" #-}- )- ( _patsIcopy,_patsIerrors,_patsIinstVars,_patsIlocVars,_patsIoutput) =- pats_ _patsOcon _patsOinh _patsOnt _patsOsyn - in ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))) )-sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore pos_ =- (T_Pattern (\ _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOcopy :: Pattern - _lhsOoutput :: Pattern - -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- Seq.empty- {-# LINE 1533 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)- _lhsOinstVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- []- {-# LINE 1539 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)- _lhsOlocVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- []- {-# LINE 1545 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Underscore pos_- {-# LINE 1551 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- Underscore pos_- {-# LINE 1557 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1563 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 1569 "src-ag/ResolveLocals.hs" #-}- )- in ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))) )--- Patterns -----------------------------------------------------{-- visit 0:- inherited attributes:- con : Identifier- inh : Attributes- nt : Identifier- syn : Attributes- synthesized attributes:- copy : SELF - errors : Seq Error- instVars : [Identifier]- locVars : [Identifier]- output : SELF - alternatives:- alternative Cons:- child hd : Pattern - child tl : Patterns - visit 0:- local copy : _- local output : _- alternative Nil:- visit 0:- local copy : _- local output : _--}--- cata-sem_Patterns :: Patterns ->- T_Patterns -sem_Patterns list =- (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list) )--- semantic domain-newtype T_Patterns = T_Patterns (Identifier ->- Attributes ->- Identifier ->- Attributes ->- ( Patterns ,(Seq Error),([Identifier]),([Identifier]),Patterns ))-data Inh_Patterns = Inh_Patterns {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),instVars_Syn_Patterns :: ([Identifier]),locVars_Syn_Patterns :: ([Identifier]),output_Syn_Patterns :: Patterns }-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns (T_Patterns sem ) (Inh_Patterns _lhsIcon _lhsIinh _lhsInt _lhsIsyn ) =- (let ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput) = sem _lhsIcon _lhsIinh _lhsInt _lhsIsyn - in (Syn_Patterns _lhsOcopy _lhsOerrors _lhsOinstVars _lhsOlocVars _lhsOoutput ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) =- (T_Patterns (\ _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOcopy :: Patterns - _lhsOoutput :: Patterns - _hdOcon :: Identifier- _hdOinh :: Attributes- _hdOnt :: Identifier- _hdOsyn :: Attributes- _tlOcon :: Identifier- _tlOinh :: Attributes- _tlOnt :: Identifier- _tlOsyn :: Attributes- _hdIcopy :: Pattern - _hdIerrors :: (Seq Error)- _hdIinstVars :: ([Identifier])- _hdIlocVars :: ([Identifier])- _hdIoutput :: Pattern - _tlIcopy :: Patterns - _tlIerrors :: (Seq Error)- _tlIinstVars :: ([Identifier])- _tlIlocVars :: ([Identifier])- _tlIoutput :: Patterns - -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 1652 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)- _lhsOinstVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- _hdIinstVars ++ _tlIinstVars- {-# LINE 1658 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)- _lhsOlocVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- _hdIlocVars ++ _tlIlocVars- {-# LINE 1664 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 1670 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 1676 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1682 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 1688 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOcon =- ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}- _lhsIcon- {-# LINE 1694 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOinh =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIinh- {-# LINE 1700 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOnt =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsInt- {-# LINE 1706 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOsyn =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIsyn- {-# LINE 1712 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOcon =- ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}- _lhsIcon- {-# LINE 1718 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOinh =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIinh- {-# LINE 1724 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOnt =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsInt- {-# LINE 1730 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOsyn =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIsyn- {-# LINE 1736 "src-ag/ResolveLocals.hs" #-}- )- ( _hdIcopy,_hdIerrors,_hdIinstVars,_hdIlocVars,_hdIoutput) =- hd_ _hdOcon _hdOinh _hdOnt _hdOsyn - ( _tlIcopy,_tlIerrors,_tlIinstVars,_tlIlocVars,_tlIoutput) =- tl_ _tlOcon _tlOinh _tlOnt _tlOsyn - in ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =- (T_Patterns (\ _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOcopy :: Patterns - _lhsOoutput :: Patterns - -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- Seq.empty- {-# LINE 1758 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)- _lhsOinstVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- []- {-# LINE 1764 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)- _lhsOlocVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- []- {-# LINE 1770 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- []- {-# LINE 1776 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- []- {-# LINE 1782 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 1788 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 1794 "src-ag/ResolveLocals.hs" #-}- )- in ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))) )--- Production ---------------------------------------------------{-- visit 0:- inherited attributes:- allnts : [Identifier]- inh : Attributes- inhMap : Map Identifier Attributes- mergeMap : Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))- nt : Identifier- options : Options- syn : Attributes- synMap : Map Identifier Attributes- synthesized attributes:- cons : [ConstructorIdent]- errors : Seq Error- output : SELF - alternatives:- alternative Production:- child con : {ConstructorIdent}- child params : {[Identifier]}- child constraints : {[Type]}- child children : Children - child rules : Rules - child typeSigs : TypeSigs - child macro : {MaybeMacro}- visit 0:- local allfields : _- local attrs : _- local inhnames : _- local synnames : _- local mergeMap : _- local output : _--}--- cata-sem_Production :: Production ->- T_Production -sem_Production (Production _con _params _constraints _children _rules _typeSigs _macro ) =- (sem_Production_Production _con _params _constraints (sem_Children _children ) (sem_Rules _rules ) (sem_TypeSigs _typeSigs ) _macro )--- semantic domain-newtype T_Production = T_Production (([Identifier]) ->- Attributes ->- (Map Identifier Attributes) ->- (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->- Identifier ->- Options ->- Attributes ->- (Map Identifier Attributes) ->- ( ([ConstructorIdent]),(Seq Error),Production ))-data Inh_Production = Inh_Production {allnts_Inh_Production :: ([Identifier]),inh_Inh_Production :: Attributes,inhMap_Inh_Production :: (Map Identifier Attributes),mergeMap_Inh_Production :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))),nt_Inh_Production :: Identifier,options_Inh_Production :: Options,syn_Inh_Production :: Attributes,synMap_Inh_Production :: (Map Identifier Attributes)}-data Syn_Production = Syn_Production {cons_Syn_Production :: ([ConstructorIdent]),errors_Syn_Production :: (Seq Error),output_Syn_Production :: Production }-wrap_Production :: T_Production ->- Inh_Production ->- Syn_Production -wrap_Production (T_Production sem ) (Inh_Production _lhsIallnts _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIoptions _lhsIsyn _lhsIsynMap ) =- (let ( _lhsOcons,_lhsOerrors,_lhsOoutput) = sem _lhsIallnts _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIoptions _lhsIsyn _lhsIsynMap - in (Syn_Production _lhsOcons _lhsOerrors _lhsOoutput ))-sem_Production_Production :: ConstructorIdent ->- ([Identifier]) ->- ([Type]) ->- T_Children ->- T_Rules ->- T_TypeSigs ->- MaybeMacro ->- T_Production -sem_Production_Production con_ params_ constraints_ (T_Children children_ ) (T_Rules rules_ ) (T_TypeSigs typeSigs_ ) macro_ =- (T_Production (\ _lhsIallnts- _lhsIinh- _lhsIinhMap- _lhsImergeMap- _lhsInt- _lhsIoptions- _lhsIsyn- _lhsIsynMap ->- (let _lhsOcons :: ([ConstructorIdent])- _childrenOcon :: Identifier- _rulesOcon :: Identifier- _lhsOerrors :: (Seq Error)- _lhsOoutput :: Production - _childrenOallfields :: ([(Identifier,Type,ChildKind)])- _childrenOallnts :: ([Identifier])- _childrenOattrs :: ([(Identifier,Identifier)])- _childrenOinh :: Attributes- _childrenOinhMap :: (Map Identifier Attributes)- _childrenOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _childrenOnt :: Identifier- _childrenOsyn :: Attributes- _childrenOsynMap :: (Map Identifier Attributes)- _rulesOallfields :: ([(Identifier,Type,ChildKind)])- _rulesOallnts :: ([Identifier])- _rulesOattrs :: ([(Identifier,Identifier)])- _rulesOinh :: Attributes- _rulesOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _rulesOnt :: Identifier- _rulesOoptions :: Options- _rulesOsyn :: Attributes- _childrenIattributes :: ([(Identifier,Attributes,Attributes)])- _childrenIfields :: ([(Identifier,Type,ChildKind)])- _childrenIoutput :: Children - _rulesIerrors :: (Seq Error)- _rulesIinstVars :: ([Identifier])- _rulesIlocVars :: ([Identifier])- _rulesIoutput :: Rules - _typeSigsIoutput :: TypeSigs - -- "src-ag/ResolveLocals.ag"(line 67, column 18)- _lhsOcons =- ({-# LINE 67 "src-ag/ResolveLocals.ag" #-}- [con_]- {-# LINE 1904 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/ResolveLocals.ag"(line 74, column 16)- _allfields =- ({-# LINE 74 "src-ag/ResolveLocals.ag" #-}- _childrenIfields- {-# LINE 1910 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/ResolveLocals.ag"(line 74, column 16)- _attrs =- ({-# LINE 75 "src-ag/ResolveLocals.ag" #-}- map ((,) _LOC) _rulesIlocVars ++- map ((,) _INST) _rulesIinstVars ++- map ((,) _LHS) _inhnames ++- concat [map ((,) nm) (Map.keys as) | (nm,_,as) <- _childrenIattributes]- {-# LINE 1919 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/ResolveLocals.ag"(line 74, column 16)- _inhnames =- ({-# LINE 79 "src-ag/ResolveLocals.ag" #-}- Map.keys _lhsIinh- {-# LINE 1925 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/ResolveLocals.ag"(line 74, column 16)- _synnames =- ({-# LINE 80 "src-ag/ResolveLocals.ag" #-}- Map.keys _lhsIsyn- {-# LINE 1931 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/ResolveLocals.ag"(line 108, column 16)- _childrenOcon =- ({-# LINE 108 "src-ag/ResolveLocals.ag" #-}- con_- {-# LINE 1937 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/ResolveLocals.ag"(line 110, column 16)- _rulesOcon =- ({-# LINE 110 "src-ag/ResolveLocals.ag" #-}- con_- {-# LINE 1943 "src-ag/ResolveLocals.hs" #-}- )- -- "src-ag/ResolveLocals.ag"(line 129, column 32)- _mergeMap =- ({-# LINE 129 "src-ag/ResolveLocals.ag" #-}- Map.findWithDefault Map.empty con_ _lhsImergeMap- {-# LINE 1949 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- _rulesIerrors- {-# LINE 1955 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- Production con_ params_ constraints_ _childrenIoutput _rulesIoutput _typeSigsIoutput macro_- {-# LINE 1961 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 1967 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (from local)- _childrenOallfields =- ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}- _allfields- {-# LINE 1973 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _childrenOallnts =- ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}- _lhsIallnts- {-# LINE 1979 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (from local)- _childrenOattrs =- ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}- _attrs- {-# LINE 1985 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _childrenOinh =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIinh- {-# LINE 1991 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _childrenOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 1997 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (from local)- _childrenOmergeMap =- ({-# LINE 131 "src-ag/ResolveLocals.ag" #-}- _mergeMap- {-# LINE 2003 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _childrenOnt =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsInt- {-# LINE 2009 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _childrenOsyn =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIsyn- {-# LINE 2015 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _childrenOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 2021 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (from local)- _rulesOallfields =- ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}- _allfields- {-# LINE 2027 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _rulesOallnts =- ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}- _lhsIallnts- {-# LINE 2033 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (from local)- _rulesOattrs =- ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}- _attrs- {-# LINE 2039 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _rulesOinh =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIinh- {-# LINE 2045 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (from local)- _rulesOmergeMap =- ({-# LINE 131 "src-ag/ResolveLocals.ag" #-}- _mergeMap- {-# LINE 2051 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _rulesOnt =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsInt- {-# LINE 2057 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _rulesOoptions =- ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}- _lhsIoptions- {-# LINE 2063 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _rulesOsyn =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIsyn- {-# LINE 2069 "src-ag/ResolveLocals.hs" #-}- )- ( _childrenIattributes,_childrenIfields,_childrenIoutput) =- children_ _childrenOallfields _childrenOallnts _childrenOattrs _childrenOcon _childrenOinh _childrenOinhMap _childrenOmergeMap _childrenOnt _childrenOsyn _childrenOsynMap - ( _rulesIerrors,_rulesIinstVars,_rulesIlocVars,_rulesIoutput) =- rules_ _rulesOallfields _rulesOallnts _rulesOattrs _rulesOcon _rulesOinh _rulesOmergeMap _rulesOnt _rulesOoptions _rulesOsyn - ( _typeSigsIoutput) =- typeSigs_ - in ( _lhsOcons,_lhsOerrors,_lhsOoutput))) )--- Productions --------------------------------------------------{-- visit 0:- inherited attributes:- allnts : [Identifier]- inh : Attributes- inhMap : Map Identifier Attributes- mergeMap : Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))- nt : Identifier- options : Options- syn : Attributes- synMap : Map Identifier Attributes- synthesized attributes:- cons : [ConstructorIdent]- 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 (([Identifier]) ->- Attributes ->- (Map Identifier Attributes) ->- (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->- Identifier ->- Options ->- Attributes ->- (Map Identifier Attributes) ->- ( ([ConstructorIdent]),(Seq Error),Productions ))-data Inh_Productions = Inh_Productions {allnts_Inh_Productions :: ([Identifier]),inh_Inh_Productions :: Attributes,inhMap_Inh_Productions :: (Map Identifier Attributes),mergeMap_Inh_Productions :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))),nt_Inh_Productions :: Identifier,options_Inh_Productions :: Options,syn_Inh_Productions :: Attributes,synMap_Inh_Productions :: (Map Identifier Attributes)}-data Syn_Productions = Syn_Productions {cons_Syn_Productions :: ([ConstructorIdent]),errors_Syn_Productions :: (Seq Error),output_Syn_Productions :: Productions }-wrap_Productions :: T_Productions ->- Inh_Productions ->- Syn_Productions -wrap_Productions (T_Productions sem ) (Inh_Productions _lhsIallnts _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIoptions _lhsIsyn _lhsIsynMap ) =- (let ( _lhsOcons,_lhsOerrors,_lhsOoutput) = sem _lhsIallnts _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIoptions _lhsIsyn _lhsIsynMap - in (Syn_Productions _lhsOcons _lhsOerrors _lhsOoutput ))-sem_Productions_Cons :: T_Production ->- T_Productions ->- T_Productions -sem_Productions_Cons (T_Production hd_ ) (T_Productions tl_ ) =- (T_Productions (\ _lhsIallnts- _lhsIinh- _lhsIinhMap- _lhsImergeMap- _lhsInt- _lhsIoptions- _lhsIsyn- _lhsIsynMap ->- (let _lhsOcons :: ([ConstructorIdent])- _lhsOerrors :: (Seq Error)- _lhsOoutput :: Productions - _hdOallnts :: ([Identifier])- _hdOinh :: Attributes- _hdOinhMap :: (Map Identifier Attributes)- _hdOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))- _hdOnt :: Identifier- _hdOoptions :: Options- _hdOsyn :: Attributes- _hdOsynMap :: (Map Identifier Attributes)- _tlOallnts :: ([Identifier])- _tlOinh :: Attributes- _tlOinhMap :: (Map Identifier Attributes)- _tlOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))- _tlOnt :: Identifier- _tlOoptions :: Options- _tlOsyn :: Attributes- _tlOsynMap :: (Map Identifier Attributes)- _hdIcons :: ([ConstructorIdent])- _hdIerrors :: (Seq Error)- _hdIoutput :: Production - _tlIcons :: ([ConstructorIdent])- _tlIerrors :: (Seq Error)- _tlIoutput :: Productions - -- use rule "src-ag/ResolveLocals.ag"(line 65, column 40)- _lhsOcons =- ({-# LINE 65 "src-ag/ResolveLocals.ag" #-}- _hdIcons ++ _tlIcons- {-# LINE 2168 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 2174 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 2180 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 2186 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOallnts =- ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}- _lhsIallnts- {-# LINE 2192 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOinh =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIinh- {-# LINE 2198 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 2204 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 126 "src-ag/ResolveLocals.ag" #-}- _lhsImergeMap- {-# LINE 2210 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOnt =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsInt- {-# LINE 2216 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}- _lhsIoptions- {-# LINE 2222 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOsyn =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIsyn- {-# LINE 2228 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 2234 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOallnts =- ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}- _lhsIallnts- {-# LINE 2240 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOinh =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIinh- {-# LINE 2246 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOinhMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIinhMap- {-# LINE 2252 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 126 "src-ag/ResolveLocals.ag" #-}- _lhsImergeMap- {-# LINE 2258 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOnt =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsInt- {-# LINE 2264 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}- _lhsIoptions- {-# LINE 2270 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOsyn =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIsyn- {-# LINE 2276 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOsynMap =- ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}- _lhsIsynMap- {-# LINE 2282 "src-ag/ResolveLocals.hs" #-}- )- ( _hdIcons,_hdIerrors,_hdIoutput) =- hd_ _hdOallnts _hdOinh _hdOinhMap _hdOmergeMap _hdOnt _hdOoptions _hdOsyn _hdOsynMap - ( _tlIcons,_tlIerrors,_tlIoutput) =- tl_ _tlOallnts _tlOinh _tlOinhMap _tlOmergeMap _tlOnt _tlOoptions _tlOsyn _tlOsynMap - in ( _lhsOcons,_lhsOerrors,_lhsOoutput))) )-sem_Productions_Nil :: T_Productions -sem_Productions_Nil =- (T_Productions (\ _lhsIallnts- _lhsIinh- _lhsIinhMap- _lhsImergeMap- _lhsInt- _lhsIoptions- _lhsIsyn- _lhsIsynMap ->- (let _lhsOcons :: ([ConstructorIdent])- _lhsOerrors :: (Seq Error)- _lhsOoutput :: Productions - -- use rule "src-ag/ResolveLocals.ag"(line 65, column 40)- _lhsOcons =- ({-# LINE 65 "src-ag/ResolveLocals.ag" #-}- []- {-# LINE 2306 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- Seq.empty- {-# LINE 2312 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- []- {-# LINE 2318 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 2324 "src-ag/ResolveLocals.hs" #-}- )- in ( _lhsOcons,_lhsOerrors,_lhsOoutput))) )--- Rule ---------------------------------------------------------{-- visit 0:- inherited attributes:- allfields : [(Identifier,Type,ChildKind)]- allnts : [Identifier]- attrs : [(Identifier,Identifier)]- con : Identifier- inh : Attributes- mergeMap : Map Identifier (Identifier,[Identifier])- nt : Identifier- options : Options- syn : Attributes- synthesized attributes:- errors : Seq Error- instVars : [Identifier]- locVars : [Identifier]- output : SELF - alternatives:- alternative Rule:- child mbName : {Maybe Identifier}- child pattern : Pattern - child rhs : Expression - child owrt : {Bool}- child origin : {String}- child explicit : {Bool}- child pure : {Bool}- child identity : {Bool}- child mbError : {Maybe Error}- child eager : {Bool}- visit 0:- local output : _--}--- cata-sem_Rule :: Rule ->- T_Rule -sem_Rule (Rule _mbName _pattern _rhs _owrt _origin _explicit _pure _identity _mbError _eager ) =- (sem_Rule_Rule _mbName (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin _explicit _pure _identity _mbError _eager )--- semantic domain-newtype T_Rule = T_Rule (([(Identifier,Type,ChildKind)]) ->- ([Identifier]) ->- ([(Identifier,Identifier)]) ->- Identifier ->- Attributes ->- (Map Identifier (Identifier,[Identifier])) ->- Identifier ->- Options ->- Attributes ->- ( (Seq Error),([Identifier]),([Identifier]),Rule ))-data Inh_Rule = Inh_Rule {allfields_Inh_Rule :: ([(Identifier,Type,ChildKind)]),allnts_Inh_Rule :: ([Identifier]),attrs_Inh_Rule :: ([(Identifier,Identifier)]),con_Inh_Rule :: Identifier,inh_Inh_Rule :: Attributes,mergeMap_Inh_Rule :: (Map Identifier (Identifier,[Identifier])),nt_Inh_Rule :: Identifier,options_Inh_Rule :: Options,syn_Inh_Rule :: Attributes}-data Syn_Rule = Syn_Rule {errors_Syn_Rule :: (Seq Error),instVars_Syn_Rule :: ([Identifier]),locVars_Syn_Rule :: ([Identifier]),output_Syn_Rule :: Rule }-wrap_Rule :: T_Rule ->- Inh_Rule ->- Syn_Rule -wrap_Rule (T_Rule sem ) (Inh_Rule _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsImergeMap _lhsInt _lhsIoptions _lhsIsyn ) =- (let ( _lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsImergeMap _lhsInt _lhsIoptions _lhsIsyn - in (Syn_Rule _lhsOerrors _lhsOinstVars _lhsOlocVars _lhsOoutput ))-sem_Rule_Rule :: (Maybe Identifier) ->- T_Pattern ->- T_Expression ->- Bool ->- String ->- Bool ->- Bool ->- Bool ->- (Maybe Error) ->- Bool ->- T_Rule -sem_Rule_Rule mbName_ (T_Pattern pattern_ ) (T_Expression rhs_ ) owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_ =- (T_Rule (\ _lhsIallfields- _lhsIallnts- _lhsIattrs- _lhsIcon- _lhsIinh- _lhsImergeMap- _lhsInt- _lhsIoptions- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOoutput :: Rule - _patternOcon :: Identifier- _patternOinh :: Attributes- _patternOnt :: Identifier- _patternOsyn :: Attributes- _rhsOallfields :: ([(Identifier,Type,ChildKind)])- _rhsOallnts :: ([Identifier])- _rhsOattrs :: ([(Identifier,Identifier)])- _rhsOcon :: Identifier- _rhsOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _rhsOnt :: Identifier- _rhsOoptions :: Options- _patternIcopy :: Pattern - _patternIerrors :: (Seq Error)- _patternIinstVars :: ([Identifier])- _patternIlocVars :: ([Identifier])- _patternIoutput :: Pattern - _rhsIerrors :: (Seq Error)- _rhsIoutput :: Expression - -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- _patternIerrors Seq.>< _rhsIerrors- {-# LINE 2431 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)- _lhsOinstVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- _patternIinstVars- {-# LINE 2437 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)- _lhsOlocVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- _patternIlocVars- {-# LINE 2443 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- Rule mbName_ _patternIoutput _rhsIoutput owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_- {-# LINE 2449 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 2455 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patternOcon =- ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}- _lhsIcon- {-# LINE 2461 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patternOinh =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIinh- {-# LINE 2467 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patternOnt =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsInt- {-# LINE 2473 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _patternOsyn =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIsyn- {-# LINE 2479 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _rhsOallfields =- ({-# LINE 139 "src-ag/ResolveLocals.ag" #-}- _lhsIallfields- {-# LINE 2485 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _rhsOallnts =- ({-# LINE 140 "src-ag/ResolveLocals.ag" #-}- _lhsIallnts- {-# LINE 2491 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _rhsOattrs =- ({-# LINE 141 "src-ag/ResolveLocals.ag" #-}- _lhsIattrs- {-# LINE 2497 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _rhsOcon =- ({-# LINE 138 "src-ag/ResolveLocals.ag" #-}- _lhsIcon- {-# LINE 2503 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _rhsOmergeMap =- ({-# LINE 131 "src-ag/ResolveLocals.ag" #-}- _lhsImergeMap- {-# LINE 2509 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _rhsOnt =- ({-# LINE 138 "src-ag/ResolveLocals.ag" #-}- _lhsInt- {-# LINE 2515 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _rhsOoptions =- ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}- _lhsIoptions- {-# LINE 2521 "src-ag/ResolveLocals.hs" #-}- )- ( _patternIcopy,_patternIerrors,_patternIinstVars,_patternIlocVars,_patternIoutput) =- pattern_ _patternOcon _patternOinh _patternOnt _patternOsyn - ( _rhsIerrors,_rhsIoutput) =- rhs_ _rhsOallfields _rhsOallnts _rhsOattrs _rhsOcon _rhsOmergeMap _rhsOnt _rhsOoptions - in ( _lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))) )--- Rules --------------------------------------------------------{-- visit 0:- inherited attributes:- allfields : [(Identifier,Type,ChildKind)]- allnts : [Identifier]- attrs : [(Identifier,Identifier)]- con : Identifier- inh : Attributes- mergeMap : Map Identifier (Identifier,[Identifier])- nt : Identifier- options : Options- syn : Attributes- synthesized attributes:- errors : Seq Error- instVars : [Identifier]- locVars : [Identifier]- output : SELF - alternatives:- alternative Cons:- child hd : Rule - child tl : Rules - visit 0:- local output : _- alternative Nil:- visit 0:- local output : _--}--- cata-sem_Rules :: Rules ->- T_Rules -sem_Rules list =- (Prelude.foldr sem_Rules_Cons sem_Rules_Nil (Prelude.map sem_Rule list) )--- semantic domain-newtype T_Rules = T_Rules (([(Identifier,Type,ChildKind)]) ->- ([Identifier]) ->- ([(Identifier,Identifier)]) ->- Identifier ->- Attributes ->- (Map Identifier (Identifier,[Identifier])) ->- Identifier ->- Options ->- Attributes ->- ( (Seq Error),([Identifier]),([Identifier]),Rules ))-data Inh_Rules = Inh_Rules {allfields_Inh_Rules :: ([(Identifier,Type,ChildKind)]),allnts_Inh_Rules :: ([Identifier]),attrs_Inh_Rules :: ([(Identifier,Identifier)]),con_Inh_Rules :: Identifier,inh_Inh_Rules :: Attributes,mergeMap_Inh_Rules :: (Map Identifier (Identifier,[Identifier])),nt_Inh_Rules :: Identifier,options_Inh_Rules :: Options,syn_Inh_Rules :: Attributes}-data Syn_Rules = Syn_Rules {errors_Syn_Rules :: (Seq Error),instVars_Syn_Rules :: ([Identifier]),locVars_Syn_Rules :: ([Identifier]),output_Syn_Rules :: Rules }-wrap_Rules :: T_Rules ->- Inh_Rules ->- Syn_Rules -wrap_Rules (T_Rules sem ) (Inh_Rules _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsImergeMap _lhsInt _lhsIoptions _lhsIsyn ) =- (let ( _lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsImergeMap _lhsInt _lhsIoptions _lhsIsyn - in (Syn_Rules _lhsOerrors _lhsOinstVars _lhsOlocVars _lhsOoutput ))-sem_Rules_Cons :: T_Rule ->- T_Rules ->- T_Rules -sem_Rules_Cons (T_Rule hd_ ) (T_Rules tl_ ) =- (T_Rules (\ _lhsIallfields- _lhsIallnts- _lhsIattrs- _lhsIcon- _lhsIinh- _lhsImergeMap- _lhsInt- _lhsIoptions- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOoutput :: Rules - _hdOallfields :: ([(Identifier,Type,ChildKind)])- _hdOallnts :: ([Identifier])- _hdOattrs :: ([(Identifier,Identifier)])- _hdOcon :: Identifier- _hdOinh :: Attributes- _hdOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _hdOnt :: Identifier- _hdOoptions :: Options- _hdOsyn :: Attributes- _tlOallfields :: ([(Identifier,Type,ChildKind)])- _tlOallnts :: ([Identifier])- _tlOattrs :: ([(Identifier,Identifier)])- _tlOcon :: Identifier- _tlOinh :: Attributes- _tlOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _tlOnt :: Identifier- _tlOoptions :: Options- _tlOsyn :: Attributes- _hdIerrors :: (Seq Error)- _hdIinstVars :: ([Identifier])- _hdIlocVars :: ([Identifier])- _hdIoutput :: Rule - _tlIerrors :: (Seq Error)- _tlIinstVars :: ([Identifier])- _tlIlocVars :: ([Identifier])- _tlIoutput :: Rules - -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 2627 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)- _lhsOinstVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- _hdIinstVars ++ _tlIinstVars- {-# LINE 2633 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)- _lhsOlocVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- _hdIlocVars ++ _tlIlocVars- {-# LINE 2639 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 2645 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 2651 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOallfields =- ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}- _lhsIallfields- {-# LINE 2657 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOallnts =- ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}- _lhsIallnts- {-# LINE 2663 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOattrs =- ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}- _lhsIattrs- {-# LINE 2669 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOcon =- ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}- _lhsIcon- {-# LINE 2675 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOinh =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIinh- {-# LINE 2681 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 131 "src-ag/ResolveLocals.ag" #-}- _lhsImergeMap- {-# LINE 2687 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOnt =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsInt- {-# LINE 2693 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}- _lhsIoptions- {-# LINE 2699 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _hdOsyn =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIsyn- {-# LINE 2705 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOallfields =- ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}- _lhsIallfields- {-# LINE 2711 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOallnts =- ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}- _lhsIallnts- {-# LINE 2717 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOattrs =- ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}- _lhsIattrs- {-# LINE 2723 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOcon =- ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}- _lhsIcon- {-# LINE 2729 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOinh =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIinh- {-# LINE 2735 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 131 "src-ag/ResolveLocals.ag" #-}- _lhsImergeMap- {-# LINE 2741 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOnt =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsInt- {-# LINE 2747 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}- _lhsIoptions- {-# LINE 2753 "src-ag/ResolveLocals.hs" #-}- )- -- copy rule (down)- _tlOsyn =- ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}- _lhsIsyn- {-# LINE 2759 "src-ag/ResolveLocals.hs" #-}- )- ( _hdIerrors,_hdIinstVars,_hdIlocVars,_hdIoutput) =- hd_ _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOinh _hdOmergeMap _hdOnt _hdOoptions _hdOsyn - ( _tlIerrors,_tlIinstVars,_tlIlocVars,_tlIoutput) =- tl_ _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOinh _tlOmergeMap _tlOnt _tlOoptions _tlOsyn - in ( _lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))) )-sem_Rules_Nil :: T_Rules -sem_Rules_Nil =- (T_Rules (\ _lhsIallfields- _lhsIallnts- _lhsIattrs- _lhsIcon- _lhsIinh- _lhsImergeMap- _lhsInt- _lhsIoptions- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOoutput :: Rules - -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)- _lhsOerrors =- ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}- Seq.empty- {-# LINE 2785 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)- _lhsOinstVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- []- {-# LINE 2791 "src-ag/ResolveLocals.hs" #-}- )- -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)- _lhsOlocVars =- ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}- []- {-# LINE 2797 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- []- {-# LINE 2803 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 2809 "src-ag/ResolveLocals.hs" #-}- )- in ( _lhsOerrors,_lhsOinstVars,_lhsOlocVars,_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 (let _lhsOoutput :: TypeSig - -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- TypeSig name_ tp_- {-# LINE 2848 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 2854 "src-ag/ResolveLocals.hs" #-}- )- in ( _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 (let _lhsOoutput :: TypeSigs - _hdIoutput :: TypeSig - _tlIoutput :: TypeSigs - -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 2898 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 2904 "src-ag/ResolveLocals.hs" #-}- )- ( _hdIoutput) =- hd_ - ( _tlIoutput) =- tl_ - in ( _lhsOoutput)) )-sem_TypeSigs_Nil :: T_TypeSigs -sem_TypeSigs_Nil =- (T_TypeSigs (let _lhsOoutput :: TypeSigs - -- self rule- _output =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- []- {-# LINE 2918 "src-ag/ResolveLocals.hs" #-}- )- -- self rule- _lhsOoutput =- ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}- _output- {-# LINE 2924 "src-ag/ResolveLocals.hs" #-}- )- in ( _lhsOoutput)) )+-- UUAGC 0.9.40.1 (src-ag/ResolveLocals.ag)+module ResolveLocals where+{-# LINE 15 "src-ag/ResolveLocals.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 CommonTypes+import Patterns+import ErrorMessages+import AbstractSyntax+import Expression+import Options+import HsToken(HsTokensRoot(HsTokensRoot))+import HsTokenScanner(lexTokens)+import SemHsTokens(sem_HsTokensRoot,wrap_HsTokensRoot, Syn_HsTokensRoot(..),Inh_HsTokensRoot(..))+import Data.Maybe+{-# LINE 23 "dist/build/ResolveLocals.hs" #-}++{-# LINE 2 "src-ag/AbstractSyntax.ag" #-}++-- AbstractSyntax.ag imports+import Data.Set(Set)+import Data.Map(Map)+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import Macro --marcos+import CommonTypes+import ErrorMessages+{-# LINE 35 "dist/build/ResolveLocals.hs" #-}++{-# LINE 2 "src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 42 "dist/build/ResolveLocals.hs" #-}++{-# LINE 2 "src-ag/Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken+{-# LINE 48 "dist/build/ResolveLocals.hs" #-}+-- Child -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allfields : [(Identifier,Type,ChildKind)]+ allnts : [Identifier]+ attrs : [(Identifier,Identifier)]+ con : Identifier+ inh : Attributes+ inhMap : Map Identifier Attributes+ mergeMap : Map Identifier (Identifier,[Identifier])+ nt : Identifier+ syn : Attributes+ synMap : Map Identifier Attributes+ synthesized attributes:+ attributes : [(Identifier,Attributes,Attributes)]+ field : (Identifier,Type,ChildKind)+ output : Child + alternatives:+ alternative Child:+ child name : {Identifier}+ child tp : {Type}+ child kind : {ChildKind}+ visit 0:+ local chnt : _+ local inh : _+ local syn : _+ local output : _+-}+-- cata+sem_Child :: Child ->+ T_Child+sem_Child (Child _name _tp _kind) =+ (sem_Child_Child _name _tp _kind)+-- semantic domain+newtype T_Child = T_Child (([(Identifier,Type,ChildKind)]) ->+ ([Identifier]) ->+ ([(Identifier,Identifier)]) ->+ Identifier ->+ Attributes ->+ (Map Identifier Attributes) ->+ (Map Identifier (Identifier,[Identifier])) ->+ Identifier ->+ Attributes ->+ (Map Identifier Attributes) ->+ ( ([(Identifier,Attributes,Attributes)]),((Identifier,Type,ChildKind)),Child))+data Inh_Child = Inh_Child {allfields_Inh_Child :: ([(Identifier,Type,ChildKind)]),allnts_Inh_Child :: ([Identifier]),attrs_Inh_Child :: ([(Identifier,Identifier)]),con_Inh_Child :: Identifier,inh_Inh_Child :: Attributes,inhMap_Inh_Child :: (Map Identifier Attributes),mergeMap_Inh_Child :: (Map Identifier (Identifier,[Identifier])),nt_Inh_Child :: Identifier,syn_Inh_Child :: Attributes,synMap_Inh_Child :: (Map Identifier Attributes)}+data Syn_Child = Syn_Child {attributes_Syn_Child :: ([(Identifier,Attributes,Attributes)]),field_Syn_Child :: ((Identifier,Type,ChildKind)),output_Syn_Child :: Child}+wrap_Child :: T_Child ->+ Inh_Child ->+ Syn_Child+wrap_Child (T_Child sem) (Inh_Child _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIsyn _lhsIsynMap) =+ (let ( _lhsOattributes,_lhsOfield,_lhsOoutput) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIsyn _lhsIsynMap+ in (Syn_Child _lhsOattributes _lhsOfield _lhsOoutput))+sem_Child_Child :: Identifier ->+ Type ->+ ChildKind ->+ T_Child+sem_Child_Child name_ tp_ kind_ =+ (T_Child (\ _lhsIallfields+ _lhsIallnts+ _lhsIattrs+ _lhsIcon+ _lhsIinh+ _lhsIinhMap+ _lhsImergeMap+ _lhsInt+ _lhsIsyn+ _lhsIsynMap ->+ (let _lhsOattributes :: ([(Identifier,Attributes,Attributes)])+ _lhsOfield :: ((Identifier,Type,ChildKind))+ _lhsOoutput :: Child+ -- "src-ag/ResolveLocals.ag"(line 84, column 11)+ _lhsOattributes =+ ({-# LINE 84 "src-ag/ResolveLocals.ag" #-}+ [(name_, _inh , _syn )]+ {-# LINE 125 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/ResolveLocals.ag"(line 87, column 11)+ _lhsOfield =+ ({-# LINE 87 "src-ag/ResolveLocals.ag" #-}+ (name_, tp_, kind_)+ {-# LINE 131 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 19, column 11)+ _chnt =+ ({-# LINE 19 "src-ag/DistChildAttr.ag" #-}+ case tp_ of+ NT nt _ _ -> nt+ Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")+ Haskell t -> identifier ""+ {-# LINE 140 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 23, column 11)+ _inh =+ ({-# LINE 23 "src-ag/DistChildAttr.ag" #-}+ Map.findWithDefault Map.empty _chnt _lhsIinhMap+ {-# LINE 146 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 24, column 11)+ _syn =+ ({-# LINE 24 "src-ag/DistChildAttr.ag" #-}+ Map.findWithDefault Map.empty _chnt _lhsIsynMap+ {-# LINE 152 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ Child name_ tp_ kind_+ {-# LINE 158 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 164 "dist/build/ResolveLocals" #-}+ )+ in ( _lhsOattributes,_lhsOfield,_lhsOoutput))))+-- Children ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allfields : [(Identifier,Type,ChildKind)]+ allnts : [Identifier]+ attrs : [(Identifier,Identifier)]+ con : Identifier+ inh : Attributes+ inhMap : Map Identifier Attributes+ mergeMap : Map Identifier (Identifier,[Identifier])+ nt : Identifier+ syn : Attributes+ synMap : Map Identifier Attributes+ synthesized attributes:+ attributes : [(Identifier,Attributes,Attributes)]+ fields : [(Identifier,Type,ChildKind)]+ output : Children + 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,Type,ChildKind)]) ->+ ([Identifier]) ->+ ([(Identifier,Identifier)]) ->+ Identifier ->+ Attributes ->+ (Map Identifier Attributes) ->+ (Map Identifier (Identifier,[Identifier])) ->+ Identifier ->+ Attributes ->+ (Map Identifier Attributes) ->+ ( ([(Identifier,Attributes,Attributes)]),([(Identifier,Type,ChildKind)]),Children))+data Inh_Children = Inh_Children {allfields_Inh_Children :: ([(Identifier,Type,ChildKind)]),allnts_Inh_Children :: ([Identifier]),attrs_Inh_Children :: ([(Identifier,Identifier)]),con_Inh_Children :: Identifier,inh_Inh_Children :: Attributes,inhMap_Inh_Children :: (Map Identifier Attributes),mergeMap_Inh_Children :: (Map Identifier (Identifier,[Identifier])),nt_Inh_Children :: Identifier,syn_Inh_Children :: Attributes,synMap_Inh_Children :: (Map Identifier Attributes)}+data Syn_Children = Syn_Children {attributes_Syn_Children :: ([(Identifier,Attributes,Attributes)]),fields_Syn_Children :: ([(Identifier,Type,ChildKind)]),output_Syn_Children :: Children}+wrap_Children :: T_Children ->+ Inh_Children ->+ Syn_Children+wrap_Children (T_Children sem) (Inh_Children _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIsyn _lhsIsynMap) =+ (let ( _lhsOattributes,_lhsOfields,_lhsOoutput) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIsyn _lhsIsynMap+ in (Syn_Children _lhsOattributes _lhsOfields _lhsOoutput))+sem_Children_Cons :: T_Child ->+ T_Children ->+ T_Children+sem_Children_Cons (T_Child hd_) (T_Children tl_) =+ (T_Children (\ _lhsIallfields+ _lhsIallnts+ _lhsIattrs+ _lhsIcon+ _lhsIinh+ _lhsIinhMap+ _lhsImergeMap+ _lhsInt+ _lhsIsyn+ _lhsIsynMap ->+ (let _lhsOfields :: ([(Identifier,Type,ChildKind)])+ _lhsOattributes :: ([(Identifier,Attributes,Attributes)])+ _lhsOoutput :: Children+ _hdOallfields :: ([(Identifier,Type,ChildKind)])+ _hdOallnts :: ([Identifier])+ _hdOattrs :: ([(Identifier,Identifier)])+ _hdOcon :: Identifier+ _hdOinh :: Attributes+ _hdOinhMap :: (Map Identifier Attributes)+ _hdOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _hdOnt :: Identifier+ _hdOsyn :: Attributes+ _hdOsynMap :: (Map Identifier Attributes)+ _tlOallfields :: ([(Identifier,Type,ChildKind)])+ _tlOallnts :: ([Identifier])+ _tlOattrs :: ([(Identifier,Identifier)])+ _tlOcon :: Identifier+ _tlOinh :: Attributes+ _tlOinhMap :: (Map Identifier Attributes)+ _tlOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _tlOnt :: Identifier+ _tlOsyn :: Attributes+ _tlOsynMap :: (Map Identifier Attributes)+ _hdIattributes :: ([(Identifier,Attributes,Attributes)])+ _hdIfield :: ((Identifier,Type,ChildKind))+ _hdIoutput :: Child+ _tlIattributes :: ([(Identifier,Attributes,Attributes)])+ _tlIfields :: ([(Identifier,Type,ChildKind)])+ _tlIoutput :: Children+ -- "src-ag/ResolveLocals.ag"(line 90, column 11)+ _lhsOfields =+ ({-# LINE 90 "src-ag/ResolveLocals.ag" #-}+ _hdIfield : _tlIfields+ {-# LINE 267 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 82, column 32)+ _lhsOattributes =+ ({-# LINE 82 "src-ag/ResolveLocals.ag" #-}+ _hdIattributes ++ _tlIattributes+ {-# LINE 273 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 279 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 285 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOallfields =+ ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}+ _lhsIallfields+ {-# LINE 291 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOallnts =+ ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}+ _lhsIallnts+ {-# LINE 297 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOattrs =+ ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}+ _lhsIattrs+ {-# LINE 303 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOcon =+ ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}+ _lhsIcon+ {-# LINE 309 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIinh+ {-# LINE 315 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 321 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 131 "src-ag/ResolveLocals.ag" #-}+ _lhsImergeMap+ {-# LINE 327 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsInt+ {-# LINE 333 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIsyn+ {-# LINE 339 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 345 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOallfields =+ ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}+ _lhsIallfields+ {-# LINE 351 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOallnts =+ ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}+ _lhsIallnts+ {-# LINE 357 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOattrs =+ ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}+ _lhsIattrs+ {-# LINE 363 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOcon =+ ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}+ _lhsIcon+ {-# LINE 369 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIinh+ {-# LINE 375 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 381 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 131 "src-ag/ResolveLocals.ag" #-}+ _lhsImergeMap+ {-# LINE 387 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsInt+ {-# LINE 393 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIsyn+ {-# LINE 399 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 405 "dist/build/ResolveLocals" #-}+ )+ ( _hdIattributes,_hdIfield,_hdIoutput) =+ hd_ _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOinh _hdOinhMap _hdOmergeMap _hdOnt _hdOsyn _hdOsynMap+ ( _tlIattributes,_tlIfields,_tlIoutput) =+ tl_ _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOinh _tlOinhMap _tlOmergeMap _tlOnt _tlOsyn _tlOsynMap+ in ( _lhsOattributes,_lhsOfields,_lhsOoutput))))+sem_Children_Nil :: T_Children+sem_Children_Nil =+ (T_Children (\ _lhsIallfields+ _lhsIallnts+ _lhsIattrs+ _lhsIcon+ _lhsIinh+ _lhsIinhMap+ _lhsImergeMap+ _lhsInt+ _lhsIsyn+ _lhsIsynMap ->+ (let _lhsOfields :: ([(Identifier,Type,ChildKind)])+ _lhsOattributes :: ([(Identifier,Attributes,Attributes)])+ _lhsOoutput :: Children+ -- "src-ag/ResolveLocals.ag"(line 91, column 11)+ _lhsOfields =+ ({-# LINE 91 "src-ag/ResolveLocals.ag" #-}+ []+ {-# LINE 431 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 82, column 32)+ _lhsOattributes =+ ({-# LINE 82 "src-ag/ResolveLocals.ag" #-}+ []+ {-# LINE 437 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ []+ {-# LINE 443 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 449 "dist/build/ResolveLocals" #-}+ )+ in ( _lhsOattributes,_lhsOfields,_lhsOoutput))))+-- Expression --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allfields : [(Identifier,Type,ChildKind)]+ allnts : [Identifier]+ attrs : [(Identifier,Identifier)]+ con : Identifier+ mergeMap : Map Identifier (Identifier,[Identifier])+ nt : Identifier+ options : Options+ synthesized attributes:+ errors : Seq Error+ output : Expression + alternatives:+ alternative Expression:+ child pos : {Pos}+ child tks : {[HsToken]}+ visit 0:+ local errors : _+ local newTks : _+ local output : _+-}+-- cata+sem_Expression :: Expression ->+ T_Expression+sem_Expression (Expression _pos _tks) =+ (sem_Expression_Expression _pos _tks)+-- semantic domain+newtype T_Expression = T_Expression (([(Identifier,Type,ChildKind)]) ->+ ([Identifier]) ->+ ([(Identifier,Identifier)]) ->+ Identifier ->+ (Map Identifier (Identifier,[Identifier])) ->+ Identifier ->+ Options ->+ ( (Seq Error),Expression))+data Inh_Expression = Inh_Expression {allfields_Inh_Expression :: ([(Identifier,Type,ChildKind)]),allnts_Inh_Expression :: ([Identifier]),attrs_Inh_Expression :: ([(Identifier,Identifier)]),con_Inh_Expression :: Identifier,mergeMap_Inh_Expression :: (Map Identifier (Identifier,[Identifier])),nt_Inh_Expression :: Identifier,options_Inh_Expression :: Options}+data Syn_Expression = Syn_Expression {errors_Syn_Expression :: (Seq Error),output_Syn_Expression :: Expression}+wrap_Expression :: T_Expression ->+ Inh_Expression ->+ Syn_Expression+wrap_Expression (T_Expression sem) (Inh_Expression _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt _lhsIoptions) =+ (let ( _lhsOerrors,_lhsOoutput) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt _lhsIoptions+ in (Syn_Expression _lhsOerrors _lhsOoutput))+sem_Expression_Expression :: Pos ->+ ([HsToken]) ->+ T_Expression+sem_Expression_Expression pos_ tks_ =+ (T_Expression (\ _lhsIallfields+ _lhsIallnts+ _lhsIattrs+ _lhsIcon+ _lhsImergeMap+ _lhsInt+ _lhsIoptions ->+ (let _lhsOoutput :: Expression+ _lhsOerrors :: (Seq Error)+ -- "src-ag/ResolveLocals.ag"(line 145, column 21)+ (_errors,_newTks) =+ ({-# LINE 145 "src-ag/ResolveLocals.ag" #-}+ let mergedChildren = [ x | (_,xs) <- Map.elems _lhsImergeMap, x <- xs ]+ attrsIn = filter (\(fld,_) -> not (fld `elem` mergedChildren)) _lhsIattrs+ inherited = Inh_HsTokensRoot+ { attrs_Inh_HsTokensRoot = attrsIn+ , con_Inh_HsTokensRoot = _lhsIcon+ , allfields_Inh_HsTokensRoot = _lhsIallfields+ , allnts_Inh_HsTokensRoot = _lhsIallnts+ , nt_Inh_HsTokensRoot = _lhsInt+ }+ synthesized = wrap_HsTokensRoot (sem_HsTokensRoot (HsTokensRoot tks_)) inherited+ in (errors_Syn_HsTokensRoot synthesized, output_Syn_HsTokensRoot synthesized)+ {-# LINE 524 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/ResolveLocals.ag"(line 157, column 17)+ _lhsOoutput =+ ({-# LINE 157 "src-ag/ResolveLocals.ag" #-}+ Expression pos_ _newTks+ {-# LINE 530 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ _errors+ {-# LINE 536 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ Expression pos_ tks_+ {-# LINE 542 "dist/build/ResolveLocals" #-}+ )+ in ( _lhsOerrors,_lhsOoutput))))+-- Grammar -----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attributes:+ errors : Seq Error+ output : Grammar + 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 quantMap : {QuantMap}+ child uniqueMap : {UniqueMap}+ child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}+ visit 0:+ local output : _+-}+-- cata+sem_Grammar :: Grammar ->+ T_Grammar+sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap) =+ (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts) _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap)+-- semantic domain+newtype T_Grammar = T_Grammar (Options ->+ ( (Seq Error),Grammar))+data Inh_Grammar = Inh_Grammar {options_Inh_Grammar :: Options}+data Syn_Grammar = Syn_Grammar {errors_Syn_Grammar :: (Seq Error),output_Syn_Grammar :: Grammar}+wrap_Grammar :: T_Grammar ->+ Inh_Grammar ->+ Syn_Grammar+wrap_Grammar (T_Grammar sem) (Inh_Grammar _lhsIoptions) =+ (let ( _lhsOerrors,_lhsOoutput) = sem _lhsIoptions+ in (Syn_Grammar _lhsOerrors _lhsOoutput))+sem_Grammar_Grammar :: TypeSyns ->+ UseMap ->+ Derivings ->+ (Set NontermIdent) ->+ T_Nonterminals ->+ PragmaMap ->+ AttrOrderMap ->+ ParamMap ->+ ContextMap ->+ QuantMap ->+ UniqueMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->+ T_Grammar+sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_ =+ (T_Grammar (\ _lhsIoptions ->+ (let _nontsOallnts :: ([Identifier])+ _nontsOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))+ _nontsOinhMap :: (Map Identifier Attributes)+ _nontsOsynMap :: (Map Identifier Attributes)+ _lhsOerrors :: (Seq Error)+ _lhsOoutput :: Grammar+ _nontsOoptions :: Options+ _nontsIerrors :: (Seq Error)+ _nontsIinhMap' :: (Map Identifier Attributes)+ _nontsInonts :: ([(NontermIdent,[ConstructorIdent])])+ _nontsIoutput :: Nonterminals+ _nontsIsynMap' :: (Map Identifier Attributes)+ -- "src-ag/ResolveLocals.ag"(line 60, column 13)+ _nontsOallnts =+ ({-# LINE 60 "src-ag/ResolveLocals.ag" #-}+ map fst (_nontsInonts)+ {-# LINE 621 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/ResolveLocals.ag"(line 120, column 14)+ _nontsOmergeMap =+ ({-# LINE 120 "src-ag/ResolveLocals.ag" #-}+ Map.map (Map.map (Map.map (\(nt,srcs,_) -> (nt,srcs)))) mergeMap_+ {-# LINE 627 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 15, column 13)+ _nontsOinhMap =+ ({-# LINE 15 "src-ag/DistChildAttr.ag" #-}+ _nontsIinhMap'+ {-# LINE 633 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 16, column 13)+ _nontsOsynMap =+ ({-# LINE 16 "src-ag/DistChildAttr.ag" #-}+ _nontsIsynMap'+ {-# LINE 639 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ _nontsIerrors+ {-# LINE 645 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ Grammar typeSyns_ useMap_ derivings_ wrappers_ _nontsIoutput pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_+ {-# LINE 651 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 657 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _nontsOoptions =+ ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}+ _lhsIoptions+ {-# LINE 663 "dist/build/ResolveLocals" #-}+ )+ ( _nontsIerrors,_nontsIinhMap',_nontsInonts,_nontsIoutput,_nontsIsynMap') =+ nonts_ _nontsOallnts _nontsOinhMap _nontsOmergeMap _nontsOoptions _nontsOsynMap+ in ( _lhsOerrors,_lhsOoutput))))+-- Nonterminal -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allnts : [Identifier]+ inhMap : Map Identifier Attributes+ mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))+ options : Options+ synMap : Map Identifier Attributes+ synthesized attributes:+ errors : Seq Error+ inhMap' : Map Identifier Attributes+ nonts : [(NontermIdent,[ConstructorIdent])]+ output : Nonterminal + synMap' : Map Identifier Attributes+ alternatives:+ alternative Nonterminal:+ child nt : {NontermIdent}+ child params : {[Identifier]}+ child inh : {Attributes}+ child syn : {Attributes}+ child prods : Productions + visit 0:+ local mergeMap : _+ 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 (([Identifier]) ->+ (Map Identifier Attributes) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->+ Options ->+ (Map Identifier Attributes) ->+ ( (Seq Error),(Map Identifier Attributes),([(NontermIdent,[ConstructorIdent])]),Nonterminal,(Map Identifier Attributes)))+data Inh_Nonterminal = Inh_Nonterminal {allnts_Inh_Nonterminal :: ([Identifier]),inhMap_Inh_Nonterminal :: (Map Identifier Attributes),mergeMap_Inh_Nonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))),options_Inh_Nonterminal :: Options,synMap_Inh_Nonterminal :: (Map Identifier Attributes)}+data Syn_Nonterminal = Syn_Nonterminal {errors_Syn_Nonterminal :: (Seq Error),inhMap'_Syn_Nonterminal :: (Map Identifier Attributes),nonts_Syn_Nonterminal :: ([(NontermIdent,[ConstructorIdent])]),output_Syn_Nonterminal :: Nonterminal,synMap'_Syn_Nonterminal :: (Map Identifier Attributes)}+wrap_Nonterminal :: T_Nonterminal ->+ Inh_Nonterminal ->+ Syn_Nonterminal+wrap_Nonterminal (T_Nonterminal sem) (Inh_Nonterminal _lhsIallnts _lhsIinhMap _lhsImergeMap _lhsIoptions _lhsIsynMap) =+ (let ( _lhsOerrors,_lhsOinhMap',_lhsOnonts,_lhsOoutput,_lhsOsynMap') = sem _lhsIallnts _lhsIinhMap _lhsImergeMap _lhsIoptions _lhsIsynMap+ in (Syn_Nonterminal _lhsOerrors _lhsOinhMap' _lhsOnonts _lhsOoutput _lhsOsynMap'))+sem_Nonterminal_Nonterminal :: NontermIdent ->+ ([Identifier]) ->+ Attributes ->+ Attributes ->+ T_Productions ->+ T_Nonterminal+sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ (T_Productions prods_) =+ (T_Nonterminal (\ _lhsIallnts+ _lhsIinhMap+ _lhsImergeMap+ _lhsIoptions+ _lhsIsynMap ->+ (let _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])+ _prodsOnt :: Identifier+ _prodsOinh :: Attributes+ _prodsOsyn :: Attributes+ _lhsOinhMap' :: (Map Identifier Attributes)+ _lhsOsynMap' :: (Map Identifier Attributes)+ _lhsOerrors :: (Seq Error)+ _lhsOoutput :: Nonterminal+ _prodsOallnts :: ([Identifier])+ _prodsOinhMap :: (Map Identifier Attributes)+ _prodsOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))+ _prodsOoptions :: Options+ _prodsOsynMap :: (Map Identifier Attributes)+ _prodsIcons :: ([ConstructorIdent])+ _prodsIerrors :: (Seq Error)+ _prodsIoutput :: Productions+ -- "src-ag/ResolveLocals.ag"(line 64, column 19)+ _lhsOnonts =+ ({-# LINE 64 "src-ag/ResolveLocals.ag" #-}+ [(nt_,_prodsIcons)]+ {-# LINE 746 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/ResolveLocals.ag"(line 112, column 17)+ _prodsOnt =+ ({-# LINE 112 "src-ag/ResolveLocals.ag" #-}+ nt_+ {-# LINE 752 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/ResolveLocals.ag"(line 115, column 17)+ _prodsOinh =+ ({-# LINE 115 "src-ag/ResolveLocals.ag" #-}+ inh_+ {-# LINE 758 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/ResolveLocals.ag"(line 116, column 17)+ _prodsOsyn =+ ({-# LINE 116 "src-ag/ResolveLocals.ag" #-}+ syn_+ {-# LINE 764 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/ResolveLocals.ag"(line 128, column 32)+ _mergeMap =+ ({-# LINE 128 "src-ag/ResolveLocals.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsImergeMap+ {-# LINE 770 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 7, column 18)+ _lhsOinhMap' =+ ({-# LINE 7 "src-ag/DistChildAttr.ag" #-}+ Map.singleton nt_ inh_+ {-# LINE 776 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/DistChildAttr.ag"(line 8, column 18)+ _lhsOsynMap' =+ ({-# LINE 8 "src-ag/DistChildAttr.ag" #-}+ Map.singleton nt_ syn_+ {-# LINE 782 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ _prodsIerrors+ {-# LINE 788 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ Nonterminal nt_ params_ inh_ syn_ _prodsIoutput+ {-# LINE 794 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 800 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _prodsOallnts =+ ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}+ _lhsIallnts+ {-# LINE 806 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _prodsOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 812 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (from local)+ _prodsOmergeMap =+ ({-# LINE 126 "src-ag/ResolveLocals.ag" #-}+ _mergeMap+ {-# LINE 818 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _prodsOoptions =+ ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}+ _lhsIoptions+ {-# LINE 824 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _prodsOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 830 "dist/build/ResolveLocals" #-}+ )+ ( _prodsIcons,_prodsIerrors,_prodsIoutput) =+ prods_ _prodsOallnts _prodsOinh _prodsOinhMap _prodsOmergeMap _prodsOnt _prodsOoptions _prodsOsyn _prodsOsynMap+ in ( _lhsOerrors,_lhsOinhMap',_lhsOnonts,_lhsOoutput,_lhsOsynMap'))))+-- Nonterminals ------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allnts : [Identifier]+ inhMap : Map Identifier Attributes+ mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))+ options : Options+ synMap : Map Identifier Attributes+ synthesized attributes:+ errors : Seq Error+ inhMap' : Map Identifier Attributes+ nonts : [(NontermIdent,[ConstructorIdent])]+ output : Nonterminals + synMap' : Map Identifier Attributes+ 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 (([Identifier]) ->+ (Map Identifier Attributes) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->+ Options ->+ (Map Identifier Attributes) ->+ ( (Seq Error),(Map Identifier Attributes),([(NontermIdent,[ConstructorIdent])]),Nonterminals,(Map Identifier Attributes)))+data Inh_Nonterminals = Inh_Nonterminals {allnts_Inh_Nonterminals :: ([Identifier]),inhMap_Inh_Nonterminals :: (Map Identifier Attributes),mergeMap_Inh_Nonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))),options_Inh_Nonterminals :: Options,synMap_Inh_Nonterminals :: (Map Identifier Attributes)}+data Syn_Nonterminals = Syn_Nonterminals {errors_Syn_Nonterminals :: (Seq Error),inhMap'_Syn_Nonterminals :: (Map Identifier Attributes),nonts_Syn_Nonterminals :: ([(NontermIdent,[ConstructorIdent])]),output_Syn_Nonterminals :: Nonterminals,synMap'_Syn_Nonterminals :: (Map Identifier Attributes)}+wrap_Nonterminals :: T_Nonterminals ->+ Inh_Nonterminals ->+ Syn_Nonterminals+wrap_Nonterminals (T_Nonterminals sem) (Inh_Nonterminals _lhsIallnts _lhsIinhMap _lhsImergeMap _lhsIoptions _lhsIsynMap) =+ (let ( _lhsOerrors,_lhsOinhMap',_lhsOnonts,_lhsOoutput,_lhsOsynMap') = sem _lhsIallnts _lhsIinhMap _lhsImergeMap _lhsIoptions _lhsIsynMap+ in (Syn_Nonterminals _lhsOerrors _lhsOinhMap' _lhsOnonts _lhsOoutput _lhsOsynMap'))+sem_Nonterminals_Cons :: T_Nonterminal ->+ T_Nonterminals ->+ T_Nonterminals+sem_Nonterminals_Cons (T_Nonterminal hd_) (T_Nonterminals tl_) =+ (T_Nonterminals (\ _lhsIallnts+ _lhsIinhMap+ _lhsImergeMap+ _lhsIoptions+ _lhsIsynMap ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOinhMap' :: (Map Identifier Attributes)+ _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])+ _lhsOsynMap' :: (Map Identifier Attributes)+ _lhsOoutput :: Nonterminals+ _hdOallnts :: ([Identifier])+ _hdOinhMap :: (Map Identifier Attributes)+ _hdOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))+ _hdOoptions :: Options+ _hdOsynMap :: (Map Identifier Attributes)+ _tlOallnts :: ([Identifier])+ _tlOinhMap :: (Map Identifier Attributes)+ _tlOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))+ _tlOoptions :: Options+ _tlOsynMap :: (Map Identifier Attributes)+ _hdIerrors :: (Seq Error)+ _hdIinhMap' :: (Map Identifier Attributes)+ _hdInonts :: ([(NontermIdent,[ConstructorIdent])])+ _hdIoutput :: Nonterminal+ _hdIsynMap' :: (Map Identifier Attributes)+ _tlIerrors :: (Seq Error)+ _tlIinhMap' :: (Map Identifier Attributes)+ _tlInonts :: ([(NontermIdent,[ConstructorIdent])])+ _tlIoutput :: Nonterminals+ _tlIsynMap' :: (Map Identifier Attributes)+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 918 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)+ _lhsOinhMap' =+ ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ _hdIinhMap' `Map.union` _tlIinhMap'+ {-# LINE 924 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 62, column 43)+ _lhsOnonts =+ ({-# LINE 62 "src-ag/ResolveLocals.ag" #-}+ _hdInonts ++ _tlInonts+ {-# LINE 930 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)+ _lhsOsynMap' =+ ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ _hdIsynMap' `Map.union` _tlIsynMap'+ {-# LINE 936 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 942 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 948 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOallnts =+ ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}+ _lhsIallnts+ {-# LINE 954 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 960 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 123 "src-ag/ResolveLocals.ag" #-}+ _lhsImergeMap+ {-# LINE 966 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}+ _lhsIoptions+ {-# LINE 972 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 978 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOallnts =+ ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}+ _lhsIallnts+ {-# LINE 984 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 990 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 123 "src-ag/ResolveLocals.ag" #-}+ _lhsImergeMap+ {-# LINE 996 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}+ _lhsIoptions+ {-# LINE 1002 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 1008 "dist/build/ResolveLocals" #-}+ )+ ( _hdIerrors,_hdIinhMap',_hdInonts,_hdIoutput,_hdIsynMap') =+ hd_ _hdOallnts _hdOinhMap _hdOmergeMap _hdOoptions _hdOsynMap+ ( _tlIerrors,_tlIinhMap',_tlInonts,_tlIoutput,_tlIsynMap') =+ tl_ _tlOallnts _tlOinhMap _tlOmergeMap _tlOoptions _tlOsynMap+ in ( _lhsOerrors,_lhsOinhMap',_lhsOnonts,_lhsOoutput,_lhsOsynMap'))))+sem_Nonterminals_Nil :: T_Nonterminals+sem_Nonterminals_Nil =+ (T_Nonterminals (\ _lhsIallnts+ _lhsIinhMap+ _lhsImergeMap+ _lhsIoptions+ _lhsIsynMap ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOinhMap' :: (Map Identifier Attributes)+ _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])+ _lhsOsynMap' :: (Map Identifier Attributes)+ _lhsOoutput :: Nonterminals+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ Seq.empty+ {-# LINE 1031 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)+ _lhsOinhMap' =+ ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ Map.empty+ {-# LINE 1037 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 62, column 43)+ _lhsOnonts =+ ({-# LINE 62 "src-ag/ResolveLocals.ag" #-}+ []+ {-# LINE 1043 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53)+ _lhsOsynMap' =+ ({-# LINE 4 "src-ag/DistChildAttr.ag" #-}+ Map.empty+ {-# LINE 1049 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ []+ {-# LINE 1055 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 1061 "dist/build/ResolveLocals" #-}+ )+ in ( _lhsOerrors,_lhsOinhMap',_lhsOnonts,_lhsOoutput,_lhsOsynMap'))))+-- Pattern -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ con : Identifier+ inh : Attributes+ nt : Identifier+ syn : Attributes+ synthesized attributes:+ copy : Pattern + errors : Seq Error+ instVars : [Identifier]+ locVars : [Identifier]+ output : Pattern + alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + visit 0:+ local copy : _+ local output : _+ alternative Constr:+ child name : {ConstructorIdent}+ child pats : Patterns + visit 0:+ local copy : _+ local output : _+ alternative Irrefutable:+ child pat : Pattern + visit 0:+ local copy : _+ local output : _+ alternative Product:+ child pos : {Pos}+ child pats : Patterns + visit 0:+ local copy : _+ local output : _+ alternative Underscore:+ child pos : {Pos}+ visit 0:+ local copy : _+ local output : _+-}+-- cata+sem_Pattern :: Pattern ->+ T_Pattern+sem_Pattern (Alias _field _attr _pat) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat))+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 (Identifier ->+ Attributes ->+ Identifier ->+ Attributes ->+ ( Pattern,(Seq Error),([Identifier]),([Identifier]),Pattern))+data Inh_Pattern = Inh_Pattern {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),instVars_Syn_Pattern :: ([Identifier]),locVars_Syn_Pattern :: ([Identifier]),output_Syn_Pattern :: Pattern}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern+wrap_Pattern (T_Pattern sem) (Inh_Pattern _lhsIcon _lhsIinh _lhsInt _lhsIsyn) =+ (let ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput) = sem _lhsIcon _lhsIinh _lhsInt _lhsIsyn+ in (Syn_Pattern _lhsOcopy _lhsOerrors _lhsOinstVars _lhsOlocVars _lhsOoutput))+sem_Pattern_Alias :: Identifier ->+ Identifier ->+ T_Pattern ->+ T_Pattern+sem_Pattern_Alias field_ attr_ (T_Pattern pat_) =+ (T_Pattern (\ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOlocVars :: ([Identifier])+ _lhsOinstVars :: ([Identifier])+ _lhsOerrors :: (Seq Error)+ _lhsOcopy :: Pattern+ _lhsOoutput :: Pattern+ _patOcon :: Identifier+ _patOinh :: Attributes+ _patOnt :: Identifier+ _patOsyn :: Attributes+ _patIcopy :: Pattern+ _patIerrors :: (Seq Error)+ _patIinstVars :: ([Identifier])+ _patIlocVars :: ([Identifier])+ _patIoutput :: Pattern+ -- "src-ag/ResolveLocals.ag"(line 96, column 14)+ _lhsOlocVars =+ ({-# LINE 96 "src-ag/ResolveLocals.ag" #-}+ if field_ == _LOC+ then [attr_]+ else []+ {-# LINE 1165 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/ResolveLocals.ag"(line 99, column 14)+ _lhsOinstVars =+ ({-# LINE 99 "src-ag/ResolveLocals.ag" #-}+ if field_ == _INST+ then [attr_]+ else []+ {-# LINE 1173 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ _patIerrors+ {-# LINE 1179 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Alias field_ attr_ _patIcopy+ {-# LINE 1185 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ Alias field_ attr_ _patIoutput+ {-# LINE 1191 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1197 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 1203 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patOcon =+ ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}+ _lhsIcon+ {-# LINE 1209 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patOinh =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIinh+ {-# LINE 1215 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patOnt =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsInt+ {-# LINE 1221 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patOsyn =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIsyn+ {-# LINE 1227 "dist/build/ResolveLocals" #-}+ )+ ( _patIcopy,_patIerrors,_patIinstVars,_patIlocVars,_patIoutput) =+ pat_ _patOcon _patOinh _patOnt _patOsyn+ in ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))))+sem_Pattern_Constr :: ConstructorIdent ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Constr name_ (T_Patterns pats_) =+ (T_Pattern (\ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOcopy :: Pattern+ _lhsOoutput :: Pattern+ _patsOcon :: Identifier+ _patsOinh :: Attributes+ _patsOnt :: Identifier+ _patsOsyn :: Attributes+ _patsIcopy :: Patterns+ _patsIerrors :: (Seq Error)+ _patsIinstVars :: ([Identifier])+ _patsIlocVars :: ([Identifier])+ _patsIoutput :: Patterns+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ _patsIerrors+ {-# LINE 1258 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)+ _lhsOinstVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ _patsIinstVars+ {-# LINE 1264 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)+ _lhsOlocVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ _patsIlocVars+ {-# LINE 1270 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 1276 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ Constr name_ _patsIoutput+ {-# LINE 1282 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1288 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 1294 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patsOcon =+ ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}+ _lhsIcon+ {-# LINE 1300 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patsOinh =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIinh+ {-# LINE 1306 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patsOnt =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsInt+ {-# LINE 1312 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patsOsyn =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIsyn+ {-# LINE 1318 "dist/build/ResolveLocals" #-}+ )+ ( _patsIcopy,_patsIerrors,_patsIinstVars,_patsIlocVars,_patsIoutput) =+ pats_ _patsOcon _patsOinh _patsOnt _patsOsyn+ in ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))))+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern+sem_Pattern_Irrefutable (T_Pattern pat_) =+ (T_Pattern (\ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOcopy :: Pattern+ _lhsOoutput :: Pattern+ _patOcon :: Identifier+ _patOinh :: Attributes+ _patOnt :: Identifier+ _patOsyn :: Attributes+ _patIcopy :: Pattern+ _patIerrors :: (Seq Error)+ _patIinstVars :: ([Identifier])+ _patIlocVars :: ([Identifier])+ _patIoutput :: Pattern+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ _patIerrors+ {-# LINE 1348 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)+ _lhsOinstVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ _patIinstVars+ {-# LINE 1354 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)+ _lhsOlocVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ _patIlocVars+ {-# LINE 1360 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 1366 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ Irrefutable _patIoutput+ {-# LINE 1372 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1378 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 1384 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patOcon =+ ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}+ _lhsIcon+ {-# LINE 1390 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patOinh =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIinh+ {-# LINE 1396 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patOnt =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsInt+ {-# LINE 1402 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patOsyn =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIsyn+ {-# LINE 1408 "dist/build/ResolveLocals" #-}+ )+ ( _patIcopy,_patIerrors,_patIinstVars,_patIlocVars,_patIoutput) =+ pat_ _patOcon _patOinh _patOnt _patOsyn+ in ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))))+sem_Pattern_Product :: Pos ->+ T_Patterns ->+ T_Pattern+sem_Pattern_Product pos_ (T_Patterns pats_) =+ (T_Pattern (\ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOcopy :: Pattern+ _lhsOoutput :: Pattern+ _patsOcon :: Identifier+ _patsOinh :: Attributes+ _patsOnt :: Identifier+ _patsOsyn :: Attributes+ _patsIcopy :: Patterns+ _patsIerrors :: (Seq Error)+ _patsIinstVars :: ([Identifier])+ _patsIlocVars :: ([Identifier])+ _patsIoutput :: Patterns+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ _patsIerrors+ {-# LINE 1439 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)+ _lhsOinstVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ _patsIinstVars+ {-# LINE 1445 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)+ _lhsOlocVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ _patsIlocVars+ {-# LINE 1451 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 1457 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ Product pos_ _patsIoutput+ {-# LINE 1463 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1469 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 1475 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patsOcon =+ ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}+ _lhsIcon+ {-# LINE 1481 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patsOinh =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIinh+ {-# LINE 1487 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patsOnt =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsInt+ {-# LINE 1493 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patsOsyn =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIsyn+ {-# LINE 1499 "dist/build/ResolveLocals" #-}+ )+ ( _patsIcopy,_patsIerrors,_patsIinstVars,_patsIlocVars,_patsIoutput) =+ pats_ _patsOcon _patsOinh _patsOnt _patsOsyn+ in ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))))+sem_Pattern_Underscore :: Pos ->+ T_Pattern+sem_Pattern_Underscore pos_ =+ (T_Pattern (\ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOcopy :: Pattern+ _lhsOoutput :: Pattern+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ Seq.empty+ {-# LINE 1520 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)+ _lhsOinstVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ []+ {-# LINE 1526 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)+ _lhsOlocVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ []+ {-# LINE 1532 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Underscore pos_+ {-# LINE 1538 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ Underscore pos_+ {-# LINE 1544 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1550 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 1556 "dist/build/ResolveLocals" #-}+ )+ in ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))))+-- Patterns ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ con : Identifier+ inh : Attributes+ nt : Identifier+ syn : Attributes+ synthesized attributes:+ copy : Patterns + errors : Seq Error+ instVars : [Identifier]+ locVars : [Identifier]+ output : Patterns + alternatives:+ alternative Cons:+ child hd : Pattern + child tl : Patterns + visit 0:+ local copy : _+ local output : _+ alternative Nil:+ visit 0:+ local copy : _+ local output : _+-}+-- cata+sem_Patterns :: Patterns ->+ T_Patterns+sem_Patterns list =+ (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list))+-- semantic domain+newtype T_Patterns = T_Patterns (Identifier ->+ Attributes ->+ Identifier ->+ Attributes ->+ ( Patterns,(Seq Error),([Identifier]),([Identifier]),Patterns))+data Inh_Patterns = Inh_Patterns {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),instVars_Syn_Patterns :: ([Identifier]),locVars_Syn_Patterns :: ([Identifier]),output_Syn_Patterns :: Patterns}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns+wrap_Patterns (T_Patterns sem) (Inh_Patterns _lhsIcon _lhsIinh _lhsInt _lhsIsyn) =+ (let ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput) = sem _lhsIcon _lhsIinh _lhsInt _lhsIsyn+ in (Syn_Patterns _lhsOcopy _lhsOerrors _lhsOinstVars _lhsOlocVars _lhsOoutput))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns+sem_Patterns_Cons (T_Pattern hd_) (T_Patterns tl_) =+ (T_Patterns (\ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOcopy :: Patterns+ _lhsOoutput :: Patterns+ _hdOcon :: Identifier+ _hdOinh :: Attributes+ _hdOnt :: Identifier+ _hdOsyn :: Attributes+ _tlOcon :: Identifier+ _tlOinh :: Attributes+ _tlOnt :: Identifier+ _tlOsyn :: Attributes+ _hdIcopy :: Pattern+ _hdIerrors :: (Seq Error)+ _hdIinstVars :: ([Identifier])+ _hdIlocVars :: ([Identifier])+ _hdIoutput :: Pattern+ _tlIcopy :: Patterns+ _tlIerrors :: (Seq Error)+ _tlIinstVars :: ([Identifier])+ _tlIlocVars :: ([Identifier])+ _tlIoutput :: Patterns+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 1639 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)+ _lhsOinstVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ _hdIinstVars ++ _tlIinstVars+ {-# LINE 1645 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)+ _lhsOlocVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ _hdIlocVars ++ _tlIlocVars+ {-# LINE 1651 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 1657 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 1663 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1669 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 1675 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOcon =+ ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}+ _lhsIcon+ {-# LINE 1681 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIinh+ {-# LINE 1687 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsInt+ {-# LINE 1693 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIsyn+ {-# LINE 1699 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOcon =+ ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}+ _lhsIcon+ {-# LINE 1705 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIinh+ {-# LINE 1711 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsInt+ {-# LINE 1717 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIsyn+ {-# LINE 1723 "dist/build/ResolveLocals" #-}+ )+ ( _hdIcopy,_hdIerrors,_hdIinstVars,_hdIlocVars,_hdIoutput) =+ hd_ _hdOcon _hdOinh _hdOnt _hdOsyn+ ( _tlIcopy,_tlIerrors,_tlIinstVars,_tlIlocVars,_tlIoutput) =+ tl_ _tlOcon _tlOinh _tlOnt _tlOsyn+ in ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))))+sem_Patterns_Nil :: T_Patterns+sem_Patterns_Nil =+ (T_Patterns (\ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOcopy :: Patterns+ _lhsOoutput :: Patterns+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ Seq.empty+ {-# LINE 1745 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)+ _lhsOinstVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ []+ {-# LINE 1751 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)+ _lhsOlocVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ []+ {-# LINE 1757 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ []+ {-# LINE 1763 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ []+ {-# LINE 1769 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 1775 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 1781 "dist/build/ResolveLocals" #-}+ )+ in ( _lhsOcopy,_lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))))+-- Production --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allnts : [Identifier]+ inh : Attributes+ inhMap : Map Identifier Attributes+ mergeMap : Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))+ nt : Identifier+ options : Options+ syn : Attributes+ synMap : Map Identifier Attributes+ synthesized attributes:+ cons : [ConstructorIdent]+ errors : Seq Error+ output : Production + alternatives:+ alternative Production:+ child con : {ConstructorIdent}+ child params : {[Identifier]}+ child constraints : {[Type]}+ child children : Children + child rules : Rules + child typeSigs : TypeSigs + child macro : {MaybeMacro}+ visit 0:+ local allfields : _+ local attrs : _+ local inhnames : _+ local synnames : _+ local mergeMap : _+ local output : _+-}+-- cata+sem_Production :: Production ->+ T_Production+sem_Production (Production _con _params _constraints _children _rules _typeSigs _macro) =+ (sem_Production_Production _con _params _constraints (sem_Children _children) (sem_Rules _rules) (sem_TypeSigs _typeSigs) _macro)+-- semantic domain+newtype T_Production = T_Production (([Identifier]) ->+ Attributes ->+ (Map Identifier Attributes) ->+ (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->+ Identifier ->+ Options ->+ Attributes ->+ (Map Identifier Attributes) ->+ ( ([ConstructorIdent]),(Seq Error),Production))+data Inh_Production = Inh_Production {allnts_Inh_Production :: ([Identifier]),inh_Inh_Production :: Attributes,inhMap_Inh_Production :: (Map Identifier Attributes),mergeMap_Inh_Production :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))),nt_Inh_Production :: Identifier,options_Inh_Production :: Options,syn_Inh_Production :: Attributes,synMap_Inh_Production :: (Map Identifier Attributes)}+data Syn_Production = Syn_Production {cons_Syn_Production :: ([ConstructorIdent]),errors_Syn_Production :: (Seq Error),output_Syn_Production :: Production}+wrap_Production :: T_Production ->+ Inh_Production ->+ Syn_Production+wrap_Production (T_Production sem) (Inh_Production _lhsIallnts _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIoptions _lhsIsyn _lhsIsynMap) =+ (let ( _lhsOcons,_lhsOerrors,_lhsOoutput) = sem _lhsIallnts _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIoptions _lhsIsyn _lhsIsynMap+ in (Syn_Production _lhsOcons _lhsOerrors _lhsOoutput))+sem_Production_Production :: ConstructorIdent ->+ ([Identifier]) ->+ ([Type]) ->+ T_Children ->+ T_Rules ->+ T_TypeSigs ->+ MaybeMacro ->+ T_Production+sem_Production_Production con_ params_ constraints_ (T_Children children_) (T_Rules rules_) (T_TypeSigs typeSigs_) macro_ =+ (T_Production (\ _lhsIallnts+ _lhsIinh+ _lhsIinhMap+ _lhsImergeMap+ _lhsInt+ _lhsIoptions+ _lhsIsyn+ _lhsIsynMap ->+ (let _lhsOcons :: ([ConstructorIdent])+ _childrenOcon :: Identifier+ _rulesOcon :: Identifier+ _lhsOerrors :: (Seq Error)+ _lhsOoutput :: Production+ _childrenOallfields :: ([(Identifier,Type,ChildKind)])+ _childrenOallnts :: ([Identifier])+ _childrenOattrs :: ([(Identifier,Identifier)])+ _childrenOinh :: Attributes+ _childrenOinhMap :: (Map Identifier Attributes)+ _childrenOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _childrenOnt :: Identifier+ _childrenOsyn :: Attributes+ _childrenOsynMap :: (Map Identifier Attributes)+ _rulesOallfields :: ([(Identifier,Type,ChildKind)])+ _rulesOallnts :: ([Identifier])+ _rulesOattrs :: ([(Identifier,Identifier)])+ _rulesOinh :: Attributes+ _rulesOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _rulesOnt :: Identifier+ _rulesOoptions :: Options+ _rulesOsyn :: Attributes+ _childrenIattributes :: ([(Identifier,Attributes,Attributes)])+ _childrenIfields :: ([(Identifier,Type,ChildKind)])+ _childrenIoutput :: Children+ _rulesIerrors :: (Seq Error)+ _rulesIinstVars :: ([Identifier])+ _rulesIlocVars :: ([Identifier])+ _rulesIoutput :: Rules+ _typeSigsIoutput :: TypeSigs+ -- "src-ag/ResolveLocals.ag"(line 67, column 18)+ _lhsOcons =+ ({-# LINE 67 "src-ag/ResolveLocals.ag" #-}+ [con_]+ {-# LINE 1891 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/ResolveLocals.ag"(line 74, column 16)+ _allfields =+ ({-# LINE 74 "src-ag/ResolveLocals.ag" #-}+ _childrenIfields+ {-# LINE 1897 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/ResolveLocals.ag"(line 74, column 16)+ _attrs =+ ({-# LINE 75 "src-ag/ResolveLocals.ag" #-}+ map ((,) _LOC) _rulesIlocVars +++ map ((,) _INST) _rulesIinstVars +++ map ((,) _LHS) _inhnames +++ concat [map ((,) nm) (Map.keys as) | (nm,_,as) <- _childrenIattributes]+ {-# LINE 1906 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/ResolveLocals.ag"(line 74, column 16)+ _inhnames =+ ({-# LINE 79 "src-ag/ResolveLocals.ag" #-}+ Map.keys _lhsIinh+ {-# LINE 1912 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/ResolveLocals.ag"(line 74, column 16)+ _synnames =+ ({-# LINE 80 "src-ag/ResolveLocals.ag" #-}+ Map.keys _lhsIsyn+ {-# LINE 1918 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/ResolveLocals.ag"(line 108, column 16)+ _childrenOcon =+ ({-# LINE 108 "src-ag/ResolveLocals.ag" #-}+ con_+ {-# LINE 1924 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/ResolveLocals.ag"(line 110, column 16)+ _rulesOcon =+ ({-# LINE 110 "src-ag/ResolveLocals.ag" #-}+ con_+ {-# LINE 1930 "dist/build/ResolveLocals" #-}+ )+ -- "src-ag/ResolveLocals.ag"(line 129, column 32)+ _mergeMap =+ ({-# LINE 129 "src-ag/ResolveLocals.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsImergeMap+ {-# LINE 1936 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ _rulesIerrors+ {-# LINE 1942 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ Production con_ params_ constraints_ _childrenIoutput _rulesIoutput _typeSigsIoutput macro_+ {-# LINE 1948 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 1954 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (from local)+ _childrenOallfields =+ ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}+ _allfields+ {-# LINE 1960 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _childrenOallnts =+ ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}+ _lhsIallnts+ {-# LINE 1966 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (from local)+ _childrenOattrs =+ ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}+ _attrs+ {-# LINE 1972 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _childrenOinh =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIinh+ {-# LINE 1978 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _childrenOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 1984 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (from local)+ _childrenOmergeMap =+ ({-# LINE 131 "src-ag/ResolveLocals.ag" #-}+ _mergeMap+ {-# LINE 1990 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _childrenOnt =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsInt+ {-# LINE 1996 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _childrenOsyn =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIsyn+ {-# LINE 2002 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _childrenOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 2008 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (from local)+ _rulesOallfields =+ ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}+ _allfields+ {-# LINE 2014 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _rulesOallnts =+ ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}+ _lhsIallnts+ {-# LINE 2020 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (from local)+ _rulesOattrs =+ ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}+ _attrs+ {-# LINE 2026 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _rulesOinh =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIinh+ {-# LINE 2032 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (from local)+ _rulesOmergeMap =+ ({-# LINE 131 "src-ag/ResolveLocals.ag" #-}+ _mergeMap+ {-# LINE 2038 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _rulesOnt =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsInt+ {-# LINE 2044 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _rulesOoptions =+ ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}+ _lhsIoptions+ {-# LINE 2050 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _rulesOsyn =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIsyn+ {-# LINE 2056 "dist/build/ResolveLocals" #-}+ )+ ( _childrenIattributes,_childrenIfields,_childrenIoutput) =+ children_ _childrenOallfields _childrenOallnts _childrenOattrs _childrenOcon _childrenOinh _childrenOinhMap _childrenOmergeMap _childrenOnt _childrenOsyn _childrenOsynMap+ ( _rulesIerrors,_rulesIinstVars,_rulesIlocVars,_rulesIoutput) =+ rules_ _rulesOallfields _rulesOallnts _rulesOattrs _rulesOcon _rulesOinh _rulesOmergeMap _rulesOnt _rulesOoptions _rulesOsyn+ ( _typeSigsIoutput) =+ typeSigs_+ in ( _lhsOcons,_lhsOerrors,_lhsOoutput))))+-- Productions -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allnts : [Identifier]+ inh : Attributes+ inhMap : Map Identifier Attributes+ mergeMap : Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))+ nt : Identifier+ options : Options+ syn : Attributes+ synMap : Map Identifier Attributes+ synthesized attributes:+ cons : [ConstructorIdent]+ errors : Seq Error+ output : Productions + 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 (([Identifier]) ->+ Attributes ->+ (Map Identifier Attributes) ->+ (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->+ Identifier ->+ Options ->+ Attributes ->+ (Map Identifier Attributes) ->+ ( ([ConstructorIdent]),(Seq Error),Productions))+data Inh_Productions = Inh_Productions {allnts_Inh_Productions :: ([Identifier]),inh_Inh_Productions :: Attributes,inhMap_Inh_Productions :: (Map Identifier Attributes),mergeMap_Inh_Productions :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))),nt_Inh_Productions :: Identifier,options_Inh_Productions :: Options,syn_Inh_Productions :: Attributes,synMap_Inh_Productions :: (Map Identifier Attributes)}+data Syn_Productions = Syn_Productions {cons_Syn_Productions :: ([ConstructorIdent]),errors_Syn_Productions :: (Seq Error),output_Syn_Productions :: Productions}+wrap_Productions :: T_Productions ->+ Inh_Productions ->+ Syn_Productions+wrap_Productions (T_Productions sem) (Inh_Productions _lhsIallnts _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIoptions _lhsIsyn _lhsIsynMap) =+ (let ( _lhsOcons,_lhsOerrors,_lhsOoutput) = sem _lhsIallnts _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIoptions _lhsIsyn _lhsIsynMap+ in (Syn_Productions _lhsOcons _lhsOerrors _lhsOoutput))+sem_Productions_Cons :: T_Production ->+ T_Productions ->+ T_Productions+sem_Productions_Cons (T_Production hd_) (T_Productions tl_) =+ (T_Productions (\ _lhsIallnts+ _lhsIinh+ _lhsIinhMap+ _lhsImergeMap+ _lhsInt+ _lhsIoptions+ _lhsIsyn+ _lhsIsynMap ->+ (let _lhsOcons :: ([ConstructorIdent])+ _lhsOerrors :: (Seq Error)+ _lhsOoutput :: Productions+ _hdOallnts :: ([Identifier])+ _hdOinh :: Attributes+ _hdOinhMap :: (Map Identifier Attributes)+ _hdOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))+ _hdOnt :: Identifier+ _hdOoptions :: Options+ _hdOsyn :: Attributes+ _hdOsynMap :: (Map Identifier Attributes)+ _tlOallnts :: ([Identifier])+ _tlOinh :: Attributes+ _tlOinhMap :: (Map Identifier Attributes)+ _tlOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))+ _tlOnt :: Identifier+ _tlOoptions :: Options+ _tlOsyn :: Attributes+ _tlOsynMap :: (Map Identifier Attributes)+ _hdIcons :: ([ConstructorIdent])+ _hdIerrors :: (Seq Error)+ _hdIoutput :: Production+ _tlIcons :: ([ConstructorIdent])+ _tlIerrors :: (Seq Error)+ _tlIoutput :: Productions+ -- use rule "src-ag/ResolveLocals.ag"(line 65, column 40)+ _lhsOcons =+ ({-# LINE 65 "src-ag/ResolveLocals.ag" #-}+ _hdIcons ++ _tlIcons+ {-# LINE 2155 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 2161 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 2167 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 2173 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOallnts =+ ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}+ _lhsIallnts+ {-# LINE 2179 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIinh+ {-# LINE 2185 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 2191 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 126 "src-ag/ResolveLocals.ag" #-}+ _lhsImergeMap+ {-# LINE 2197 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsInt+ {-# LINE 2203 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}+ _lhsIoptions+ {-# LINE 2209 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIsyn+ {-# LINE 2215 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 2221 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOallnts =+ ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}+ _lhsIallnts+ {-# LINE 2227 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIinh+ {-# LINE 2233 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOinhMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIinhMap+ {-# LINE 2239 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 126 "src-ag/ResolveLocals.ag" #-}+ _lhsImergeMap+ {-# LINE 2245 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsInt+ {-# LINE 2251 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}+ _lhsIoptions+ {-# LINE 2257 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIsyn+ {-# LINE 2263 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOsynMap =+ ({-# LINE 12 "src-ag/DistChildAttr.ag" #-}+ _lhsIsynMap+ {-# LINE 2269 "dist/build/ResolveLocals" #-}+ )+ ( _hdIcons,_hdIerrors,_hdIoutput) =+ hd_ _hdOallnts _hdOinh _hdOinhMap _hdOmergeMap _hdOnt _hdOoptions _hdOsyn _hdOsynMap+ ( _tlIcons,_tlIerrors,_tlIoutput) =+ tl_ _tlOallnts _tlOinh _tlOinhMap _tlOmergeMap _tlOnt _tlOoptions _tlOsyn _tlOsynMap+ in ( _lhsOcons,_lhsOerrors,_lhsOoutput))))+sem_Productions_Nil :: T_Productions+sem_Productions_Nil =+ (T_Productions (\ _lhsIallnts+ _lhsIinh+ _lhsIinhMap+ _lhsImergeMap+ _lhsInt+ _lhsIoptions+ _lhsIsyn+ _lhsIsynMap ->+ (let _lhsOcons :: ([ConstructorIdent])+ _lhsOerrors :: (Seq Error)+ _lhsOoutput :: Productions+ -- use rule "src-ag/ResolveLocals.ag"(line 65, column 40)+ _lhsOcons =+ ({-# LINE 65 "src-ag/ResolveLocals.ag" #-}+ []+ {-# LINE 2293 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ Seq.empty+ {-# LINE 2299 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ []+ {-# LINE 2305 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 2311 "dist/build/ResolveLocals" #-}+ )+ in ( _lhsOcons,_lhsOerrors,_lhsOoutput))))+-- Rule --------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allfields : [(Identifier,Type,ChildKind)]+ allnts : [Identifier]+ attrs : [(Identifier,Identifier)]+ con : Identifier+ inh : Attributes+ mergeMap : Map Identifier (Identifier,[Identifier])+ nt : Identifier+ options : Options+ syn : Attributes+ synthesized attributes:+ errors : Seq Error+ instVars : [Identifier]+ locVars : [Identifier]+ output : Rule + alternatives:+ alternative Rule:+ child mbName : {Maybe Identifier}+ child pattern : Pattern + child rhs : Expression + child owrt : {Bool}+ child origin : {String}+ child explicit : {Bool}+ child pure : {Bool}+ child identity : {Bool}+ child mbError : {Maybe Error}+ child eager : {Bool}+ visit 0:+ local output : _+-}+-- cata+sem_Rule :: Rule ->+ T_Rule+sem_Rule (Rule _mbName _pattern _rhs _owrt _origin _explicit _pure _identity _mbError _eager) =+ (sem_Rule_Rule _mbName (sem_Pattern _pattern) (sem_Expression _rhs) _owrt _origin _explicit _pure _identity _mbError _eager)+-- semantic domain+newtype T_Rule = T_Rule (([(Identifier,Type,ChildKind)]) ->+ ([Identifier]) ->+ ([(Identifier,Identifier)]) ->+ Identifier ->+ Attributes ->+ (Map Identifier (Identifier,[Identifier])) ->+ Identifier ->+ Options ->+ Attributes ->+ ( (Seq Error),([Identifier]),([Identifier]),Rule))+data Inh_Rule = Inh_Rule {allfields_Inh_Rule :: ([(Identifier,Type,ChildKind)]),allnts_Inh_Rule :: ([Identifier]),attrs_Inh_Rule :: ([(Identifier,Identifier)]),con_Inh_Rule :: Identifier,inh_Inh_Rule :: Attributes,mergeMap_Inh_Rule :: (Map Identifier (Identifier,[Identifier])),nt_Inh_Rule :: Identifier,options_Inh_Rule :: Options,syn_Inh_Rule :: Attributes}+data Syn_Rule = Syn_Rule {errors_Syn_Rule :: (Seq Error),instVars_Syn_Rule :: ([Identifier]),locVars_Syn_Rule :: ([Identifier]),output_Syn_Rule :: Rule}+wrap_Rule :: T_Rule ->+ Inh_Rule ->+ Syn_Rule+wrap_Rule (T_Rule sem) (Inh_Rule _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsImergeMap _lhsInt _lhsIoptions _lhsIsyn) =+ (let ( _lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsImergeMap _lhsInt _lhsIoptions _lhsIsyn+ in (Syn_Rule _lhsOerrors _lhsOinstVars _lhsOlocVars _lhsOoutput))+sem_Rule_Rule :: (Maybe Identifier) ->+ T_Pattern ->+ T_Expression ->+ Bool ->+ String ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Error) ->+ Bool ->+ T_Rule+sem_Rule_Rule mbName_ (T_Pattern pattern_) (T_Expression rhs_) owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_ =+ (T_Rule (\ _lhsIallfields+ _lhsIallnts+ _lhsIattrs+ _lhsIcon+ _lhsIinh+ _lhsImergeMap+ _lhsInt+ _lhsIoptions+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOoutput :: Rule+ _patternOcon :: Identifier+ _patternOinh :: Attributes+ _patternOnt :: Identifier+ _patternOsyn :: Attributes+ _rhsOallfields :: ([(Identifier,Type,ChildKind)])+ _rhsOallnts :: ([Identifier])+ _rhsOattrs :: ([(Identifier,Identifier)])+ _rhsOcon :: Identifier+ _rhsOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _rhsOnt :: Identifier+ _rhsOoptions :: Options+ _patternIcopy :: Pattern+ _patternIerrors :: (Seq Error)+ _patternIinstVars :: ([Identifier])+ _patternIlocVars :: ([Identifier])+ _patternIoutput :: Pattern+ _rhsIerrors :: (Seq Error)+ _rhsIoutput :: Expression+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ _patternIerrors Seq.>< _rhsIerrors+ {-# LINE 2418 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)+ _lhsOinstVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ _patternIinstVars+ {-# LINE 2424 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)+ _lhsOlocVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ _patternIlocVars+ {-# LINE 2430 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ Rule mbName_ _patternIoutput _rhsIoutput owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_+ {-# LINE 2436 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 2442 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patternOcon =+ ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}+ _lhsIcon+ {-# LINE 2448 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patternOinh =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIinh+ {-# LINE 2454 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patternOnt =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsInt+ {-# LINE 2460 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _patternOsyn =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIsyn+ {-# LINE 2466 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _rhsOallfields =+ ({-# LINE 139 "src-ag/ResolveLocals.ag" #-}+ _lhsIallfields+ {-# LINE 2472 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _rhsOallnts =+ ({-# LINE 140 "src-ag/ResolveLocals.ag" #-}+ _lhsIallnts+ {-# LINE 2478 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _rhsOattrs =+ ({-# LINE 141 "src-ag/ResolveLocals.ag" #-}+ _lhsIattrs+ {-# LINE 2484 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _rhsOcon =+ ({-# LINE 138 "src-ag/ResolveLocals.ag" #-}+ _lhsIcon+ {-# LINE 2490 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _rhsOmergeMap =+ ({-# LINE 131 "src-ag/ResolveLocals.ag" #-}+ _lhsImergeMap+ {-# LINE 2496 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _rhsOnt =+ ({-# LINE 138 "src-ag/ResolveLocals.ag" #-}+ _lhsInt+ {-# LINE 2502 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _rhsOoptions =+ ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}+ _lhsIoptions+ {-# LINE 2508 "dist/build/ResolveLocals" #-}+ )+ ( _patternIcopy,_patternIerrors,_patternIinstVars,_patternIlocVars,_patternIoutput) =+ pattern_ _patternOcon _patternOinh _patternOnt _patternOsyn+ ( _rhsIerrors,_rhsIoutput) =+ rhs_ _rhsOallfields _rhsOallnts _rhsOattrs _rhsOcon _rhsOmergeMap _rhsOnt _rhsOoptions+ in ( _lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))))+-- Rules -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allfields : [(Identifier,Type,ChildKind)]+ allnts : [Identifier]+ attrs : [(Identifier,Identifier)]+ con : Identifier+ inh : Attributes+ mergeMap : Map Identifier (Identifier,[Identifier])+ nt : Identifier+ options : Options+ syn : Attributes+ synthesized attributes:+ errors : Seq Error+ instVars : [Identifier]+ locVars : [Identifier]+ output : Rules + alternatives:+ alternative Cons:+ child hd : Rule + child tl : Rules + visit 0:+ local output : _+ alternative Nil:+ visit 0:+ local output : _+-}+-- cata+sem_Rules :: Rules ->+ T_Rules+sem_Rules list =+ (Prelude.foldr sem_Rules_Cons sem_Rules_Nil (Prelude.map sem_Rule list))+-- semantic domain+newtype T_Rules = T_Rules (([(Identifier,Type,ChildKind)]) ->+ ([Identifier]) ->+ ([(Identifier,Identifier)]) ->+ Identifier ->+ Attributes ->+ (Map Identifier (Identifier,[Identifier])) ->+ Identifier ->+ Options ->+ Attributes ->+ ( (Seq Error),([Identifier]),([Identifier]),Rules))+data Inh_Rules = Inh_Rules {allfields_Inh_Rules :: ([(Identifier,Type,ChildKind)]),allnts_Inh_Rules :: ([Identifier]),attrs_Inh_Rules :: ([(Identifier,Identifier)]),con_Inh_Rules :: Identifier,inh_Inh_Rules :: Attributes,mergeMap_Inh_Rules :: (Map Identifier (Identifier,[Identifier])),nt_Inh_Rules :: Identifier,options_Inh_Rules :: Options,syn_Inh_Rules :: Attributes}+data Syn_Rules = Syn_Rules {errors_Syn_Rules :: (Seq Error),instVars_Syn_Rules :: ([Identifier]),locVars_Syn_Rules :: ([Identifier]),output_Syn_Rules :: Rules}+wrap_Rules :: T_Rules ->+ Inh_Rules ->+ Syn_Rules+wrap_Rules (T_Rules sem) (Inh_Rules _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsImergeMap _lhsInt _lhsIoptions _lhsIsyn) =+ (let ( _lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsImergeMap _lhsInt _lhsIoptions _lhsIsyn+ in (Syn_Rules _lhsOerrors _lhsOinstVars _lhsOlocVars _lhsOoutput))+sem_Rules_Cons :: T_Rule ->+ T_Rules ->+ T_Rules+sem_Rules_Cons (T_Rule hd_) (T_Rules tl_) =+ (T_Rules (\ _lhsIallfields+ _lhsIallnts+ _lhsIattrs+ _lhsIcon+ _lhsIinh+ _lhsImergeMap+ _lhsInt+ _lhsIoptions+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOoutput :: Rules+ _hdOallfields :: ([(Identifier,Type,ChildKind)])+ _hdOallnts :: ([Identifier])+ _hdOattrs :: ([(Identifier,Identifier)])+ _hdOcon :: Identifier+ _hdOinh :: Attributes+ _hdOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _hdOnt :: Identifier+ _hdOoptions :: Options+ _hdOsyn :: Attributes+ _tlOallfields :: ([(Identifier,Type,ChildKind)])+ _tlOallnts :: ([Identifier])+ _tlOattrs :: ([(Identifier,Identifier)])+ _tlOcon :: Identifier+ _tlOinh :: Attributes+ _tlOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _tlOnt :: Identifier+ _tlOoptions :: Options+ _tlOsyn :: Attributes+ _hdIerrors :: (Seq Error)+ _hdIinstVars :: ([Identifier])+ _hdIlocVars :: ([Identifier])+ _hdIoutput :: Rule+ _tlIerrors :: (Seq Error)+ _tlIinstVars :: ([Identifier])+ _tlIlocVars :: ([Identifier])+ _tlIoutput :: Rules+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 2614 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)+ _lhsOinstVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ _hdIinstVars ++ _tlIinstVars+ {-# LINE 2620 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)+ _lhsOlocVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ _hdIlocVars ++ _tlIlocVars+ {-# LINE 2626 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 2632 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 2638 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOallfields =+ ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}+ _lhsIallfields+ {-# LINE 2644 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOallnts =+ ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}+ _lhsIallnts+ {-# LINE 2650 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOattrs =+ ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}+ _lhsIattrs+ {-# LINE 2656 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOcon =+ ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}+ _lhsIcon+ {-# LINE 2662 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIinh+ {-# LINE 2668 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 131 "src-ag/ResolveLocals.ag" #-}+ _lhsImergeMap+ {-# LINE 2674 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsInt+ {-# LINE 2680 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}+ _lhsIoptions+ {-# LINE 2686 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIsyn+ {-# LINE 2692 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOallfields =+ ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}+ _lhsIallfields+ {-# LINE 2698 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOallnts =+ ({-# LINE 57 "src-ag/ResolveLocals.ag" #-}+ _lhsIallnts+ {-# LINE 2704 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOattrs =+ ({-# LINE 71 "src-ag/ResolveLocals.ag" #-}+ _lhsIattrs+ {-# LINE 2710 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOcon =+ ({-# LINE 105 "src-ag/ResolveLocals.ag" #-}+ _lhsIcon+ {-# LINE 2716 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIinh+ {-# LINE 2722 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 131 "src-ag/ResolveLocals.ag" #-}+ _lhsImergeMap+ {-# LINE 2728 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsInt+ {-# LINE 2734 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 41 "src-ag/ResolveLocals.ag" #-}+ _lhsIoptions+ {-# LINE 2740 "dist/build/ResolveLocals" #-}+ )+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 104 "src-ag/ResolveLocals.ag" #-}+ _lhsIsyn+ {-# LINE 2746 "dist/build/ResolveLocals" #-}+ )+ ( _hdIerrors,_hdIinstVars,_hdIlocVars,_hdIoutput) =+ hd_ _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOinh _hdOmergeMap _hdOnt _hdOoptions _hdOsyn+ ( _tlIerrors,_tlIinstVars,_tlIlocVars,_tlIoutput) =+ tl_ _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOinh _tlOmergeMap _tlOnt _tlOoptions _tlOsyn+ in ( _lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))))+sem_Rules_Nil :: T_Rules+sem_Rules_Nil =+ (T_Rules (\ _lhsIallfields+ _lhsIallnts+ _lhsIattrs+ _lhsIcon+ _lhsIinh+ _lhsImergeMap+ _lhsInt+ _lhsIoptions+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOoutput :: Rules+ -- use rule "src-ag/ResolveLocals.ag"(line 44, column 16)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/ResolveLocals.ag" #-}+ Seq.empty+ {-# LINE 2772 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 86)+ _lhsOinstVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ []+ {-# LINE 2778 "dist/build/ResolveLocals" #-}+ )+ -- use rule "src-ag/ResolveLocals.ag"(line 93, column 48)+ _lhsOlocVars =+ ({-# LINE 93 "src-ag/ResolveLocals.ag" #-}+ []+ {-# LINE 2784 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ []+ {-# LINE 2790 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 2796 "dist/build/ResolveLocals" #-}+ )+ in ( _lhsOerrors,_lhsOinstVars,_lhsOlocVars,_lhsOoutput))))+-- TypeSig -----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ output : TypeSig + 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 (let _lhsOoutput :: TypeSig+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ TypeSig name_ tp_+ {-# LINE 2835 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 2841 "dist/build/ResolveLocals" #-}+ )+ in ( _lhsOoutput)))+-- TypeSigs ----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ output : TypeSigs + 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 (let _lhsOoutput :: TypeSigs+ _hdIoutput :: TypeSig+ _tlIoutput :: TypeSigs+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 2885 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 2891 "dist/build/ResolveLocals" #-}+ )+ ( _hdIoutput) =+ hd_+ ( _tlIoutput) =+ tl_+ in ( _lhsOoutput)))+sem_TypeSigs_Nil :: T_TypeSigs+sem_TypeSigs_Nil =+ (T_TypeSigs (let _lhsOoutput :: TypeSigs+ -- self rule+ _output =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ []+ {-# LINE 2905 "dist/build/ResolveLocals" #-}+ )+ -- self rule+ _lhsOoutput =+ ({-# LINE 47 "src-ag/ResolveLocals.ag" #-}+ _output+ {-# LINE 2911 "dist/build/ResolveLocals" #-}+ )+ in ( _lhsOoutput)))
src-derived/SemHsTokens.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.39.1.0 (src-ag/SemHsTokens.ag)+-- UUAGC 0.9.40.1 (src-ag/SemHsTokens.ag) module SemHsTokens where {-# LINE 4 "src-ag/SemHsTokens.ag" #-} @@ -12,18 +12,18 @@ import TokenDef import HsToken import ErrorMessages-{-# LINE 16 "dist/build/uuagc/uuagc-tmp/SemHsTokens.hs" #-}+{-# LINE 16 "dist/build/SemHsTokens.hs" #-} {-# LINE 2 "src-ag/HsToken.ag" #-} import CommonTypes import UU.Scanner.Position(Pos)-{-# LINE 22 "dist/build/uuagc/uuagc-tmp/SemHsTokens.hs" #-}+{-# LINE 22 "dist/build/SemHsTokens.hs" #-} {-# LINE 57 "src-ag/SemHsTokens.ag" #-} isNTname allnts (Just (NT nt _ _)) = nt `elem` allnts isNTname allnts _ = False-{-# LINE 27 "dist/build/uuagc/uuagc-tmp/SemHsTokens.hs" #-}+{-# LINE 27 "dist/build/SemHsTokens.hs" #-} -- HsToken ----------------------------------------------------- {- visit 0:@@ -36,7 +36,7 @@ nt : Identifier synthesized attributes: errors : Seq Error- output : SELF + output : HsToken tok : (Pos,String) usedAttrs : [(Identifier,Identifier)] usedFields : Seq Identifier@@ -57,7 +57,6 @@ visit 0: local tkAsLocal : _ local tkAsField : _- local _tup1 : _ local errors : _ local output : _ local tok : _@@ -84,42 +83,42 @@ local output : _ -} -- 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 )+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 (([(Identifier,Type,ChildKind)]) ->- ([Identifier]) ->- ([(Identifier,Identifier)]) ->- Identifier ->- ([Identifier]) ->- Identifier ->- ( (Seq Error),HsToken ,((Pos,String)),([(Identifier,Identifier)]),(Seq Identifier),([Identifier])))-data Inh_HsToken = Inh_HsToken {allfields_Inh_HsToken :: ([(Identifier,Type,ChildKind)]),allnts_Inh_HsToken :: ([Identifier]),attrs_Inh_HsToken :: ([(Identifier,Identifier)]),con_Inh_HsToken :: Identifier,fieldnames_Inh_HsToken :: ([Identifier]),nt_Inh_HsToken :: Identifier}-data Syn_HsToken = Syn_HsToken {errors_Syn_HsToken :: (Seq Error),output_Syn_HsToken :: HsToken ,tok_Syn_HsToken :: ((Pos,String)),usedAttrs_Syn_HsToken :: ([(Identifier,Identifier)]),usedFields_Syn_HsToken :: (Seq Identifier),usedLocals_Syn_HsToken :: ([Identifier])}-wrap_HsToken :: T_HsToken ->- Inh_HsToken ->- Syn_HsToken -wrap_HsToken (T_HsToken sem ) (Inh_HsToken _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt ) =- (let ( _lhsOerrors,_lhsOoutput,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt - in (Syn_HsToken _lhsOerrors _lhsOoutput _lhsOtok _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals ))+newtype T_HsToken = T_HsToken (([(Identifier,Type,ChildKind)]) ->+ ([Identifier]) ->+ ([(Identifier,Identifier)]) ->+ Identifier ->+ ([Identifier]) ->+ Identifier ->+ ( (Seq Error),HsToken,((Pos,String)),([(Identifier,Identifier)]),(Seq Identifier),([Identifier])))+data Inh_HsToken = Inh_HsToken {allfields_Inh_HsToken :: ([(Identifier,Type,ChildKind)]),allnts_Inh_HsToken :: ([Identifier]),attrs_Inh_HsToken :: ([(Identifier,Identifier)]),con_Inh_HsToken :: Identifier,fieldnames_Inh_HsToken :: ([Identifier]),nt_Inh_HsToken :: Identifier}+data Syn_HsToken = Syn_HsToken {errors_Syn_HsToken :: (Seq Error),output_Syn_HsToken :: HsToken,tok_Syn_HsToken :: ((Pos,String)),usedAttrs_Syn_HsToken :: ([(Identifier,Identifier)]),usedFields_Syn_HsToken :: (Seq Identifier),usedLocals_Syn_HsToken :: ([Identifier])}+wrap_HsToken :: T_HsToken ->+ Inh_HsToken ->+ Syn_HsToken+wrap_HsToken (T_HsToken sem) (Inh_HsToken _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt) =+ (let ( _lhsOerrors,_lhsOoutput,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt+ in (Syn_HsToken _lhsOerrors _lhsOoutput _lhsOtok _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals)) sem_HsToken_AGField :: Identifier -> Identifier -> Pos -> (Maybe String) ->- T_HsToken -sem_HsToken_AGField field_ attr_ pos_ rdesc_ =+ T_HsToken+sem_HsToken_AGField field_ attr_ pos_ rdesc_ = (T_HsToken (\ _lhsIallfields _lhsIallnts _lhsIattrs@@ -128,70 +127,66 @@ _lhsInt -> (let _lhsOerrors :: (Seq Error) _lhsOusedAttrs :: ([(Identifier,Identifier)])+ _lhsOusedLocals :: ([Identifier]) _lhsOtok :: ((Pos,String)) _lhsOusedFields :: (Seq Identifier)- _lhsOusedLocals :: ([Identifier])- _lhsOoutput :: HsToken - -- "src-ag/SemHsTokens.ag"(line 76, column 15)+ _lhsOoutput :: HsToken+ -- "src-ag/SemHsTokens.ag"(line 77, column 15) _lhsOerrors =- ({-# LINE 76 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 77 "src-ag/SemHsTokens.ag" #-} if (field_,attr_) `elem` _lhsIattrs- then Seq.empty- else if not(field_ `elem` (_LHS : _LOC: _lhsIfieldnames))- then Seq.singleton (UndefChild _lhsInt _lhsIcon field_)- else Seq.singleton (UndefAttr _lhsInt _lhsIcon field_ attr_ False)- {-# LINE 144 "src-ag/SemHsTokens.hs" #-}+ then Seq.empty+ else if not(field_ `elem` (_LHS : _LOC: _lhsIfieldnames))+ then Seq.singleton (UndefChild _lhsInt _lhsIcon field_)+ else Seq.singleton (UndefAttr _lhsInt _lhsIcon field_ attr_ False)+ {-# LINE 143 "dist/build/SemHsTokens" #-} )- -- "src-ag/SemHsTokens.ag"(line 90, column 13)- _lhsOusedAttrs =- ({-# LINE 90 "src-ag/SemHsTokens.ag" #-}- [(field_,attr_)]- {-# LINE 150 "src-ag/SemHsTokens.hs" #-}+ -- "src-ag/SemHsTokens.ag"(line 91, column 13)+ (_lhsOusedAttrs,_lhsOusedLocals) =+ ({-# LINE 91 "src-ag/SemHsTokens.ag" #-}+ if field_ == _LOC+ then ([], [attr_])+ else ([(field_,attr_)], [])+ {-# LINE 151 "dist/build/SemHsTokens" #-} )- -- "src-ag/SemHsTokens.ag"(line 117, column 8)+ -- "src-ag/SemHsTokens.ag"(line 122, column 8) _addTrace =- ({-# LINE 117 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 122 "src-ag/SemHsTokens.ag" #-} case rdesc_ of Just d -> \x -> "(trace " ++ show (d ++ " -> " ++ show field_ ++ "." ++ show attr_) ++ " (" ++ x ++ "))" Nothing -> id- {-# LINE 158 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 159 "dist/build/SemHsTokens" #-} )- -- "src-ag/SemHsTokens.ag"(line 120, column 8)+ -- "src-ag/SemHsTokens.ag"(line 125, column 8) _lhsOtok =- ({-# LINE 120 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 125 "src-ag/SemHsTokens.ag" #-} (pos_, _addTrace $ attrname True field_ attr_)- {-# LINE 164 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 165 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 95, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 100, column 40) _lhsOusedFields =- ({-# LINE 95 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 100 "src-ag/SemHsTokens.ag" #-} Seq.empty- {-# LINE 170 "src-ag/SemHsTokens.hs" #-}- )- -- use rule "src-ag/SemHsTokens.ag"(line 86, column 40)- _lhsOusedLocals =- ({-# LINE 86 "src-ag/SemHsTokens.ag" #-}- []- {-# LINE 176 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 171 "dist/build/SemHsTokens" #-} ) -- self rule _output =- ({-# LINE 137 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 142 "src-ag/SemHsTokens.ag" #-} AGField field_ attr_ pos_ rdesc_- {-# LINE 182 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 177 "dist/build/SemHsTokens" #-} ) -- self rule _lhsOoutput =- ({-# LINE 137 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 142 "src-ag/SemHsTokens.ag" #-} _output- {-# LINE 188 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 183 "dist/build/SemHsTokens" #-} )- in ( _lhsOerrors,_lhsOoutput,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) )+ in ( _lhsOerrors,_lhsOoutput,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals)))) sem_HsToken_AGLocal :: Identifier -> Pos -> (Maybe String) ->- T_HsToken -sem_HsToken_AGLocal var_ pos_ rdesc_ =+ T_HsToken+sem_HsToken_AGLocal var_ pos_ rdesc_ = (T_HsToken (\ _lhsIallfields _lhsIallnts _lhsIattrs@@ -202,99 +197,75 @@ _lhsOerrors :: (Seq Error) _lhsOusedAttrs :: ([(Identifier,Identifier)]) _lhsOusedLocals :: ([Identifier])- _lhsOoutput :: HsToken + _lhsOoutput :: HsToken _lhsOtok :: ((Pos,String))- -- "src-ag/SemHsTokens.ag"(line 64, column 15)+ -- "src-ag/SemHsTokens.ag"(line 65, column 15) _tkAsLocal =- ({-# LINE 64 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 65 "src-ag/SemHsTokens.ag" #-} AGLocal var_ pos_ rdesc_- {-# LINE 212 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 207 "dist/build/SemHsTokens" #-} )- -- "src-ag/SemHsTokens.ag"(line 65, column 15)+ -- "src-ag/SemHsTokens.ag"(line 66, column 15) _tkAsField =- ({-# LINE 65 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 66 "src-ag/SemHsTokens.ag" #-} AGField _LOC var_ pos_ rdesc_- {-# LINE 218 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 213 "dist/build/SemHsTokens" #-} )- -- "src-ag/SemHsTokens.ag"(line 66, column 19)- __tup1 =- ({-# LINE 66 "src-ag/SemHsTokens.ag" #-}+ -- "src-ag/SemHsTokens.ag"(line 67, column 19)+ (_errors,_output,_tok,_usedLocals) =+ ({-# LINE 67 "src-ag/SemHsTokens.ag" #-} if var_ `elem` _lhsIfieldnames then if isNTname _lhsIallnts (lookup var_ (map (\(n,t,_) -> (n,t)) _lhsIallfields)) then (Seq.singleton(ChildAsLocal _lhsInt _lhsIcon var_), _tkAsLocal ,(pos_,fieldname var_), [] ) else (Seq.empty, _tkAsLocal , (pos_,fieldname var_), [] ) else if (_LOC,var_) `elem` _lhsIattrs- then (Seq.empty , _tkAsField , (pos_,locname var_), [var_])- else (Seq.singleton(UndefLocal _lhsInt _lhsIcon var_), _tkAsField , (pos_,locname var_), [] )- {-# LINE 230 "src-ag/SemHsTokens.hs" #-}- )- -- "src-ag/SemHsTokens.ag"(line 66, column 19)- (_errors,_,_,_) =- ({-# LINE 66 "src-ag/SemHsTokens.ag" #-}- __tup1- {-# LINE 236 "src-ag/SemHsTokens.hs" #-}- )- -- "src-ag/SemHsTokens.ag"(line 66, column 19)- (_,_output,_,_) =- ({-# LINE 66 "src-ag/SemHsTokens.ag" #-}- __tup1- {-# LINE 242 "src-ag/SemHsTokens.hs" #-}- )- -- "src-ag/SemHsTokens.ag"(line 66, column 19)- (_,_,_tok,_) =- ({-# LINE 66 "src-ag/SemHsTokens.ag" #-}- __tup1- {-# LINE 248 "src-ag/SemHsTokens.hs" #-}- )- -- "src-ag/SemHsTokens.ag"(line 66, column 19)- (_,_,_,_usedLocals) =- ({-# LINE 66 "src-ag/SemHsTokens.ag" #-}- __tup1- {-# LINE 254 "src-ag/SemHsTokens.hs" #-}+ then (Seq.empty , _tkAsField , (pos_,locname var_), [var_])+ else (Seq.singleton(UndefLocal _lhsInt _lhsIcon var_), _tkAsField , (pos_,locname var_), [] )+ {-# LINE 225 "dist/build/SemHsTokens" #-} )- -- "src-ag/SemHsTokens.ag"(line 98, column 13)+ -- "src-ag/SemHsTokens.ag"(line 103, column 13) _lhsOusedFields =- ({-# LINE 98 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 103 "src-ag/SemHsTokens.ag" #-} if var_ `elem` _lhsIfieldnames then Seq.singleton var_ else Seq.empty- {-# LINE 262 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 233 "dist/build/SemHsTokens" #-} ) -- use rule "src-ag/SemHsTokens.ag"(line 43, column 37) _lhsOerrors = ({-# LINE 43 "src-ag/SemHsTokens.ag" #-} _errors- {-# LINE 268 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 239 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 87, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 88, column 40) _lhsOusedAttrs =- ({-# LINE 87 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 88 "src-ag/SemHsTokens.ag" #-} []- {-# LINE 274 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 245 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 86, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 87, column 40) _lhsOusedLocals =- ({-# LINE 86 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 87 "src-ag/SemHsTokens.ag" #-} _usedLocals- {-# LINE 280 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 251 "dist/build/SemHsTokens" #-} ) -- self rule _lhsOoutput =- ({-# LINE 137 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 142 "src-ag/SemHsTokens.ag" #-} _output- {-# LINE 286 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 257 "dist/build/SemHsTokens" #-} ) -- copy rule (from local) _lhsOtok =- ({-# LINE 115 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 120 "src-ag/SemHsTokens.ag" #-} _tok- {-# LINE 292 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 263 "dist/build/SemHsTokens" #-} )- in ( _lhsOerrors,_lhsOoutput,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) )+ in ( _lhsOerrors,_lhsOoutput,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals)))) sem_HsToken_CharToken :: String -> Pos ->- T_HsToken -sem_HsToken_CharToken value_ pos_ =+ T_HsToken+sem_HsToken_CharToken value_ pos_ = (T_HsToken (\ _lhsIallfields _lhsIallnts _lhsIattrs@@ -306,57 +277,57 @@ _lhsOusedAttrs :: ([(Identifier,Identifier)]) _lhsOusedFields :: (Seq Identifier) _lhsOusedLocals :: ([Identifier])- _lhsOoutput :: HsToken - -- "src-ag/SemHsTokens.ag"(line 124, column 16)+ _lhsOoutput :: HsToken+ -- "src-ag/SemHsTokens.ag"(line 129, column 16) _lhsOtok =- ({-# LINE 124 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 129 "src-ag/SemHsTokens.ag" #-} (pos_, if null value_ then "" else showCharShort (head value_) )- {-# LINE 318 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 289 "dist/build/SemHsTokens" #-} ) -- use rule "src-ag/SemHsTokens.ag"(line 43, column 37) _lhsOerrors = ({-# LINE 43 "src-ag/SemHsTokens.ag" #-} Seq.empty- {-# LINE 324 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 295 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 87, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 88, column 40) _lhsOusedAttrs =- ({-# LINE 87 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 88 "src-ag/SemHsTokens.ag" #-} []- {-# LINE 330 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 301 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 95, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 100, column 40) _lhsOusedFields =- ({-# LINE 95 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 100 "src-ag/SemHsTokens.ag" #-} Seq.empty- {-# LINE 336 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 307 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 86, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 87, column 40) _lhsOusedLocals =- ({-# LINE 86 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 87 "src-ag/SemHsTokens.ag" #-} []- {-# LINE 342 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 313 "dist/build/SemHsTokens" #-} ) -- self rule _output =- ({-# LINE 137 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 142 "src-ag/SemHsTokens.ag" #-} CharToken value_ pos_- {-# LINE 348 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 319 "dist/build/SemHsTokens" #-} ) -- self rule _lhsOoutput =- ({-# LINE 137 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 142 "src-ag/SemHsTokens.ag" #-} _output- {-# LINE 354 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 325 "dist/build/SemHsTokens" #-} )- in ( _lhsOerrors,_lhsOoutput,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) )+ in ( _lhsOerrors,_lhsOoutput,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals)))) sem_HsToken_Err :: String -> Pos ->- T_HsToken -sem_HsToken_Err mesg_ pos_ =+ T_HsToken+sem_HsToken_Err mesg_ pos_ = (T_HsToken (\ _lhsIallfields _lhsIallnts _lhsIattrs@@ -368,55 +339,55 @@ _lhsOusedAttrs :: ([(Identifier,Identifier)]) _lhsOusedFields :: (Seq Identifier) _lhsOusedLocals :: ([Identifier])- _lhsOoutput :: HsToken + _lhsOoutput :: HsToken -- "src-ag/SemHsTokens.ag"(line 50, column 9) _lhsOerrors = ({-# LINE 50 "src-ag/SemHsTokens.ag" #-} let m = text mesg_ in Seq.singleton (CustomError False pos_ m)- {-# LINE 378 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 349 "dist/build/SemHsTokens" #-} )- -- "src-ag/SemHsTokens.ag"(line 130, column 16)+ -- "src-ag/SemHsTokens.ag"(line 135, column 16) _lhsOtok =- ({-# LINE 130 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 135 "src-ag/SemHsTokens.ag" #-} (pos_, "")- {-# LINE 384 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 355 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 87, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 88, column 40) _lhsOusedAttrs =- ({-# LINE 87 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 88 "src-ag/SemHsTokens.ag" #-} []- {-# LINE 390 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 361 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 95, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 100, column 40) _lhsOusedFields =- ({-# LINE 95 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 100 "src-ag/SemHsTokens.ag" #-} Seq.empty- {-# LINE 396 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 367 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 86, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 87, column 40) _lhsOusedLocals =- ({-# LINE 86 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 87 "src-ag/SemHsTokens.ag" #-} []- {-# LINE 402 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 373 "dist/build/SemHsTokens" #-} ) -- self rule _output =- ({-# LINE 137 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 142 "src-ag/SemHsTokens.ag" #-} Err mesg_ pos_- {-# LINE 408 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 379 "dist/build/SemHsTokens" #-} ) -- self rule _lhsOoutput =- ({-# LINE 137 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 142 "src-ag/SemHsTokens.ag" #-} _output- {-# LINE 414 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 385 "dist/build/SemHsTokens" #-} )- in ( _lhsOerrors,_lhsOoutput,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) )+ in ( _lhsOerrors,_lhsOoutput,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals)))) sem_HsToken_HsToken :: String -> Pos ->- T_HsToken -sem_HsToken_HsToken value_ pos_ =+ T_HsToken+sem_HsToken_HsToken value_ pos_ = (T_HsToken (\ _lhsIallfields _lhsIallnts _lhsIattrs@@ -428,54 +399,54 @@ _lhsOusedAttrs :: ([(Identifier,Identifier)]) _lhsOusedFields :: (Seq Identifier) _lhsOusedLocals :: ([Identifier])- _lhsOoutput :: HsToken - -- "src-ag/SemHsTokens.ag"(line 122, column 14)+ _lhsOoutput :: HsToken+ -- "src-ag/SemHsTokens.ag"(line 127, column 14) _lhsOtok =- ({-# LINE 122 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 127 "src-ag/SemHsTokens.ag" #-} (pos_, value_)- {-# LINE 437 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 408 "dist/build/SemHsTokens" #-} ) -- use rule "src-ag/SemHsTokens.ag"(line 43, column 37) _lhsOerrors = ({-# LINE 43 "src-ag/SemHsTokens.ag" #-} Seq.empty- {-# LINE 443 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 414 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 87, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 88, column 40) _lhsOusedAttrs =- ({-# LINE 87 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 88 "src-ag/SemHsTokens.ag" #-} []- {-# LINE 449 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 420 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 95, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 100, column 40) _lhsOusedFields =- ({-# LINE 95 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 100 "src-ag/SemHsTokens.ag" #-} Seq.empty- {-# LINE 455 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 426 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 86, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 87, column 40) _lhsOusedLocals =- ({-# LINE 86 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 87 "src-ag/SemHsTokens.ag" #-} []- {-# LINE 461 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 432 "dist/build/SemHsTokens" #-} ) -- self rule _output =- ({-# LINE 137 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 142 "src-ag/SemHsTokens.ag" #-} HsToken value_ pos_- {-# LINE 467 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 438 "dist/build/SemHsTokens" #-} ) -- self rule _lhsOoutput =- ({-# LINE 137 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 142 "src-ag/SemHsTokens.ag" #-} _output- {-# LINE 473 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 444 "dist/build/SemHsTokens" #-} )- in ( _lhsOerrors,_lhsOoutput,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) )+ in ( _lhsOerrors,_lhsOoutput,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals)))) sem_HsToken_StrToken :: String -> Pos ->- T_HsToken -sem_HsToken_StrToken value_ pos_ =+ T_HsToken+sem_HsToken_StrToken value_ pos_ = (T_HsToken (\ _lhsIallfields _lhsIallnts _lhsIattrs@@ -487,50 +458,50 @@ _lhsOusedAttrs :: ([(Identifier,Identifier)]) _lhsOusedFields :: (Seq Identifier) _lhsOusedLocals :: ([Identifier])- _lhsOoutput :: HsToken - -- "src-ag/SemHsTokens.ag"(line 129, column 16)+ _lhsOoutput :: HsToken+ -- "src-ag/SemHsTokens.ag"(line 134, column 16) _lhsOtok =- ({-# LINE 129 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 134 "src-ag/SemHsTokens.ag" #-} (pos_, showStrShort value_)- {-# LINE 496 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 467 "dist/build/SemHsTokens" #-} ) -- use rule "src-ag/SemHsTokens.ag"(line 43, column 37) _lhsOerrors = ({-# LINE 43 "src-ag/SemHsTokens.ag" #-} Seq.empty- {-# LINE 502 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 473 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 87, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 88, column 40) _lhsOusedAttrs =- ({-# LINE 87 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 88 "src-ag/SemHsTokens.ag" #-} []- {-# LINE 508 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 479 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 95, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 100, column 40) _lhsOusedFields =- ({-# LINE 95 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 100 "src-ag/SemHsTokens.ag" #-} Seq.empty- {-# LINE 514 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 485 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 86, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 87, column 40) _lhsOusedLocals =- ({-# LINE 86 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 87 "src-ag/SemHsTokens.ag" #-} []- {-# LINE 520 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 491 "dist/build/SemHsTokens" #-} ) -- self rule _output =- ({-# LINE 137 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 142 "src-ag/SemHsTokens.ag" #-} StrToken value_ pos_- {-# LINE 526 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 497 "dist/build/SemHsTokens" #-} ) -- self rule _lhsOoutput =- ({-# LINE 137 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 142 "src-ag/SemHsTokens.ag" #-} _output- {-# LINE 532 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 503 "dist/build/SemHsTokens" #-} )- in ( _lhsOerrors,_lhsOoutput,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) )+ in ( _lhsOerrors,_lhsOoutput,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals)))) -- HsTokens ---------------------------------------------------- {- visit 0:@@ -543,7 +514,7 @@ nt : Identifier synthesized attributes: errors : Seq Error- output : SELF + output : HsTokens tks : [(Pos,String)] usedAttrs : [(Identifier,Identifier)] usedFields : Seq Identifier@@ -559,30 +530,30 @@ local output : _ -} -- cata-sem_HsTokens :: HsTokens ->- T_HsTokens -sem_HsTokens list =- (Prelude.foldr sem_HsTokens_Cons sem_HsTokens_Nil (Prelude.map sem_HsToken list) )+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 (([(Identifier,Type,ChildKind)]) ->- ([Identifier]) ->- ([(Identifier,Identifier)]) ->- Identifier ->- ([Identifier]) ->- Identifier ->- ( (Seq Error),HsTokens ,([(Pos,String)]),([(Identifier,Identifier)]),(Seq Identifier),([Identifier])))-data Inh_HsTokens = Inh_HsTokens {allfields_Inh_HsTokens :: ([(Identifier,Type,ChildKind)]),allnts_Inh_HsTokens :: ([Identifier]),attrs_Inh_HsTokens :: ([(Identifier,Identifier)]),con_Inh_HsTokens :: Identifier,fieldnames_Inh_HsTokens :: ([Identifier]),nt_Inh_HsTokens :: Identifier}-data Syn_HsTokens = Syn_HsTokens {errors_Syn_HsTokens :: (Seq Error),output_Syn_HsTokens :: HsTokens ,tks_Syn_HsTokens :: ([(Pos,String)]),usedAttrs_Syn_HsTokens :: ([(Identifier,Identifier)]),usedFields_Syn_HsTokens :: (Seq Identifier),usedLocals_Syn_HsTokens :: ([Identifier])}-wrap_HsTokens :: T_HsTokens ->- Inh_HsTokens ->- Syn_HsTokens -wrap_HsTokens (T_HsTokens sem ) (Inh_HsTokens _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt ) =- (let ( _lhsOerrors,_lhsOoutput,_lhsOtks,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt - in (Syn_HsTokens _lhsOerrors _lhsOoutput _lhsOtks _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals ))-sem_HsTokens_Cons :: T_HsToken ->- T_HsTokens ->- T_HsTokens -sem_HsTokens_Cons (T_HsToken hd_ ) (T_HsTokens tl_ ) =+newtype T_HsTokens = T_HsTokens (([(Identifier,Type,ChildKind)]) ->+ ([Identifier]) ->+ ([(Identifier,Identifier)]) ->+ Identifier ->+ ([Identifier]) ->+ Identifier ->+ ( (Seq Error),HsTokens,([(Pos,String)]),([(Identifier,Identifier)]),(Seq Identifier),([Identifier])))+data Inh_HsTokens = Inh_HsTokens {allfields_Inh_HsTokens :: ([(Identifier,Type,ChildKind)]),allnts_Inh_HsTokens :: ([Identifier]),attrs_Inh_HsTokens :: ([(Identifier,Identifier)]),con_Inh_HsTokens :: Identifier,fieldnames_Inh_HsTokens :: ([Identifier]),nt_Inh_HsTokens :: Identifier}+data Syn_HsTokens = Syn_HsTokens {errors_Syn_HsTokens :: (Seq Error),output_Syn_HsTokens :: HsTokens,tks_Syn_HsTokens :: ([(Pos,String)]),usedAttrs_Syn_HsTokens :: ([(Identifier,Identifier)]),usedFields_Syn_HsTokens :: (Seq Identifier),usedLocals_Syn_HsTokens :: ([Identifier])}+wrap_HsTokens :: T_HsTokens ->+ Inh_HsTokens ->+ Syn_HsTokens+wrap_HsTokens (T_HsTokens sem) (Inh_HsTokens _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt) =+ (let ( _lhsOerrors,_lhsOoutput,_lhsOtks,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt+ in (Syn_HsTokens _lhsOerrors _lhsOoutput _lhsOtks _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals))+sem_HsTokens_Cons :: T_HsToken ->+ T_HsTokens ->+ T_HsTokens+sem_HsTokens_Cons (T_HsToken hd_) (T_HsTokens tl_) = (T_HsTokens (\ _lhsIallfields _lhsIallnts _lhsIattrs@@ -594,7 +565,7 @@ _lhsOusedAttrs :: ([(Identifier,Identifier)]) _lhsOusedFields :: (Seq Identifier) _lhsOusedLocals :: ([Identifier])- _lhsOoutput :: HsTokens + _lhsOoutput :: HsTokens _hdOallfields :: ([(Identifier,Type,ChildKind)]) _hdOallnts :: ([Identifier]) _hdOattrs :: ([(Identifier,Identifier)])@@ -608,138 +579,138 @@ _tlOfieldnames :: ([Identifier]) _tlOnt :: Identifier _hdIerrors :: (Seq Error)- _hdIoutput :: HsToken + _hdIoutput :: HsToken _hdItok :: ((Pos,String)) _hdIusedAttrs :: ([(Identifier,Identifier)]) _hdIusedFields :: (Seq Identifier) _hdIusedLocals :: ([Identifier]) _tlIerrors :: (Seq Error)- _tlIoutput :: HsTokens + _tlIoutput :: HsTokens _tlItks :: ([(Pos,String)]) _tlIusedAttrs :: ([(Identifier,Identifier)]) _tlIusedFields :: (Seq Identifier) _tlIusedLocals :: ([Identifier])- -- "src-ag/SemHsTokens.ag"(line 112, column 10)+ -- "src-ag/SemHsTokens.ag"(line 117, column 10) _lhsOtks =- ({-# LINE 112 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 117 "src-ag/SemHsTokens.ag" #-} _hdItok : _tlItks- {-# LINE 627 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 598 "dist/build/SemHsTokens" #-} ) -- use rule "src-ag/SemHsTokens.ag"(line 43, column 37) _lhsOerrors = ({-# LINE 43 "src-ag/SemHsTokens.ag" #-} _hdIerrors Seq.>< _tlIerrors- {-# LINE 633 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 604 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 87, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 88, column 40) _lhsOusedAttrs =- ({-# LINE 87 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 88 "src-ag/SemHsTokens.ag" #-} _hdIusedAttrs ++ _tlIusedAttrs- {-# LINE 639 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 610 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 95, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 100, column 40) _lhsOusedFields =- ({-# LINE 95 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 100 "src-ag/SemHsTokens.ag" #-} _hdIusedFields Seq.>< _tlIusedFields- {-# LINE 645 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 616 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 86, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 87, column 40) _lhsOusedLocals =- ({-# LINE 86 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 87 "src-ag/SemHsTokens.ag" #-} _hdIusedLocals ++ _tlIusedLocals- {-# LINE 651 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 622 "dist/build/SemHsTokens" #-} ) -- self rule _output =- ({-# LINE 137 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 142 "src-ag/SemHsTokens.ag" #-} (:) _hdIoutput _tlIoutput- {-# LINE 657 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 628 "dist/build/SemHsTokens" #-} ) -- self rule _lhsOoutput =- ({-# LINE 137 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 142 "src-ag/SemHsTokens.ag" #-} _output- {-# LINE 663 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 634 "dist/build/SemHsTokens" #-} ) -- copy rule (down) _hdOallfields = ({-# LINE 30 "src-ag/SemHsTokens.ag" #-} _lhsIallfields- {-# LINE 669 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 640 "dist/build/SemHsTokens" #-} ) -- copy rule (down) _hdOallnts = ({-# LINE 31 "src-ag/SemHsTokens.ag" #-} _lhsIallnts- {-# LINE 675 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 646 "dist/build/SemHsTokens" #-} ) -- copy rule (down) _hdOattrs = ({-# LINE 32 "src-ag/SemHsTokens.ag" #-} _lhsIattrs- {-# LINE 681 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 652 "dist/build/SemHsTokens" #-} ) -- copy rule (down) _hdOcon = ({-# LINE 29 "src-ag/SemHsTokens.ag" #-} _lhsIcon- {-# LINE 687 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 658 "dist/build/SemHsTokens" #-} ) -- copy rule (down) _hdOfieldnames = ({-# LINE 36 "src-ag/SemHsTokens.ag" #-} _lhsIfieldnames- {-# LINE 693 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 664 "dist/build/SemHsTokens" #-} ) -- copy rule (down) _hdOnt = ({-# LINE 29 "src-ag/SemHsTokens.ag" #-} _lhsInt- {-# LINE 699 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 670 "dist/build/SemHsTokens" #-} ) -- copy rule (down) _tlOallfields = ({-# LINE 30 "src-ag/SemHsTokens.ag" #-} _lhsIallfields- {-# LINE 705 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 676 "dist/build/SemHsTokens" #-} ) -- copy rule (down) _tlOallnts = ({-# LINE 31 "src-ag/SemHsTokens.ag" #-} _lhsIallnts- {-# LINE 711 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 682 "dist/build/SemHsTokens" #-} ) -- copy rule (down) _tlOattrs = ({-# LINE 32 "src-ag/SemHsTokens.ag" #-} _lhsIattrs- {-# LINE 717 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 688 "dist/build/SemHsTokens" #-} ) -- copy rule (down) _tlOcon = ({-# LINE 29 "src-ag/SemHsTokens.ag" #-} _lhsIcon- {-# LINE 723 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 694 "dist/build/SemHsTokens" #-} ) -- copy rule (down) _tlOfieldnames = ({-# LINE 36 "src-ag/SemHsTokens.ag" #-} _lhsIfieldnames- {-# LINE 729 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 700 "dist/build/SemHsTokens" #-} ) -- copy rule (down) _tlOnt = ({-# LINE 29 "src-ag/SemHsTokens.ag" #-} _lhsInt- {-# LINE 735 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 706 "dist/build/SemHsTokens" #-} ) ( _hdIerrors,_hdIoutput,_hdItok,_hdIusedAttrs,_hdIusedFields,_hdIusedLocals) =- hd_ _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOfieldnames _hdOnt + hd_ _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOfieldnames _hdOnt ( _tlIerrors,_tlIoutput,_tlItks,_tlIusedAttrs,_tlIusedFields,_tlIusedLocals) =- tl_ _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOfieldnames _tlOnt - in ( _lhsOerrors,_lhsOoutput,_lhsOtks,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) )-sem_HsTokens_Nil :: T_HsTokens -sem_HsTokens_Nil =+ tl_ _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOfieldnames _tlOnt+ in ( _lhsOerrors,_lhsOoutput,_lhsOtks,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))))+sem_HsTokens_Nil :: T_HsTokens+sem_HsTokens_Nil = (T_HsTokens (\ _lhsIallfields _lhsIallnts _lhsIattrs@@ -751,50 +722,50 @@ _lhsOusedAttrs :: ([(Identifier,Identifier)]) _lhsOusedFields :: (Seq Identifier) _lhsOusedLocals :: ([Identifier])- _lhsOoutput :: HsTokens - -- "src-ag/SemHsTokens.ag"(line 113, column 10)+ _lhsOoutput :: HsTokens+ -- "src-ag/SemHsTokens.ag"(line 118, column 10) _lhsOtks =- ({-# LINE 113 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 118 "src-ag/SemHsTokens.ag" #-} []- {-# LINE 760 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 731 "dist/build/SemHsTokens" #-} ) -- use rule "src-ag/SemHsTokens.ag"(line 43, column 37) _lhsOerrors = ({-# LINE 43 "src-ag/SemHsTokens.ag" #-} Seq.empty- {-# LINE 766 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 737 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 87, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 88, column 40) _lhsOusedAttrs =- ({-# LINE 87 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 88 "src-ag/SemHsTokens.ag" #-} []- {-# LINE 772 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 743 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 95, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 100, column 40) _lhsOusedFields =- ({-# LINE 95 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 100 "src-ag/SemHsTokens.ag" #-} Seq.empty- {-# LINE 778 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 749 "dist/build/SemHsTokens" #-} )- -- use rule "src-ag/SemHsTokens.ag"(line 86, column 40)+ -- use rule "src-ag/SemHsTokens.ag"(line 87, column 40) _lhsOusedLocals =- ({-# LINE 86 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 87 "src-ag/SemHsTokens.ag" #-} []- {-# LINE 784 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 755 "dist/build/SemHsTokens" #-} ) -- self rule _output =- ({-# LINE 137 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 142 "src-ag/SemHsTokens.ag" #-} []- {-# LINE 790 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 761 "dist/build/SemHsTokens" #-} ) -- self rule _lhsOoutput =- ({-# LINE 137 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 142 "src-ag/SemHsTokens.ag" #-} _output- {-# LINE 796 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 767 "dist/build/SemHsTokens" #-} )- in ( _lhsOerrors,_lhsOoutput,_lhsOtks,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) )+ in ( _lhsOerrors,_lhsOoutput,_lhsOtks,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals)))) -- HsTokensRoot ------------------------------------------------ {- visit 0:@@ -816,28 +787,28 @@ child tokens : HsTokens -} -- cata-sem_HsTokensRoot :: HsTokensRoot ->- T_HsTokensRoot -sem_HsTokensRoot (HsTokensRoot _tokens ) =- (sem_HsTokensRoot_HsTokensRoot (sem_HsTokens _tokens ) )+sem_HsTokensRoot :: HsTokensRoot ->+ T_HsTokensRoot+sem_HsTokensRoot (HsTokensRoot _tokens) =+ (sem_HsTokensRoot_HsTokensRoot (sem_HsTokens _tokens)) -- semantic domain-newtype T_HsTokensRoot = T_HsTokensRoot (([(Identifier,Type,ChildKind)]) ->- ([Identifier]) ->- ([(Identifier,Identifier)]) ->- Identifier ->- Identifier ->- ( (Seq Error),([HsToken]),([String]),([(Identifier,Identifier)]),([Identifier]),([Identifier])))-data Inh_HsTokensRoot = Inh_HsTokensRoot {allfields_Inh_HsTokensRoot :: ([(Identifier,Type,ChildKind)]),allnts_Inh_HsTokensRoot :: ([Identifier]),attrs_Inh_HsTokensRoot :: ([(Identifier,Identifier)]),con_Inh_HsTokensRoot :: Identifier,nt_Inh_HsTokensRoot :: Identifier}-data Syn_HsTokensRoot = Syn_HsTokensRoot {errors_Syn_HsTokensRoot :: (Seq Error),output_Syn_HsTokensRoot :: ([HsToken]),textLines_Syn_HsTokensRoot :: ([String]),usedAttrs_Syn_HsTokensRoot :: ([(Identifier,Identifier)]),usedFields_Syn_HsTokensRoot :: ([Identifier]),usedLocals_Syn_HsTokensRoot :: ([Identifier])}-wrap_HsTokensRoot :: T_HsTokensRoot ->- Inh_HsTokensRoot ->- Syn_HsTokensRoot -wrap_HsTokensRoot (T_HsTokensRoot sem ) (Inh_HsTokensRoot _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsInt ) =- (let ( _lhsOerrors,_lhsOoutput,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsInt - in (Syn_HsTokensRoot _lhsOerrors _lhsOoutput _lhsOtextLines _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals ))-sem_HsTokensRoot_HsTokensRoot :: T_HsTokens ->- T_HsTokensRoot -sem_HsTokensRoot_HsTokensRoot (T_HsTokens tokens_ ) =+newtype T_HsTokensRoot = T_HsTokensRoot (([(Identifier,Type,ChildKind)]) ->+ ([Identifier]) ->+ ([(Identifier,Identifier)]) ->+ Identifier ->+ Identifier ->+ ( (Seq Error),([HsToken]),([String]),([(Identifier,Identifier)]),([Identifier]),([Identifier])))+data Inh_HsTokensRoot = Inh_HsTokensRoot {allfields_Inh_HsTokensRoot :: ([(Identifier,Type,ChildKind)]),allnts_Inh_HsTokensRoot :: ([Identifier]),attrs_Inh_HsTokensRoot :: ([(Identifier,Identifier)]),con_Inh_HsTokensRoot :: Identifier,nt_Inh_HsTokensRoot :: Identifier}+data Syn_HsTokensRoot = Syn_HsTokensRoot {errors_Syn_HsTokensRoot :: (Seq Error),output_Syn_HsTokensRoot :: ([HsToken]),textLines_Syn_HsTokensRoot :: ([String]),usedAttrs_Syn_HsTokensRoot :: ([(Identifier,Identifier)]),usedFields_Syn_HsTokensRoot :: ([Identifier]),usedLocals_Syn_HsTokensRoot :: ([Identifier])}+wrap_HsTokensRoot :: T_HsTokensRoot ->+ Inh_HsTokensRoot ->+ Syn_HsTokensRoot+wrap_HsTokensRoot (T_HsTokensRoot sem) (Inh_HsTokensRoot _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsInt) =+ (let ( _lhsOerrors,_lhsOoutput,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsInt+ in (Syn_HsTokensRoot _lhsOerrors _lhsOoutput _lhsOtextLines _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals))+sem_HsTokensRoot_HsTokensRoot :: T_HsTokens ->+ T_HsTokensRoot+sem_HsTokensRoot_HsTokensRoot (T_HsTokens tokens_) = (T_HsTokensRoot (\ _lhsIallfields _lhsIallnts _lhsIattrs@@ -856,7 +827,7 @@ _tokensOcon :: Identifier _tokensOnt :: Identifier _tokensIerrors :: (Seq Error)- _tokensIoutput :: HsTokens + _tokensIoutput :: HsTokens _tokensItks :: ([(Pos,String)]) _tokensIusedAttrs :: ([(Identifier,Identifier)]) _tokensIusedFields :: (Seq Identifier)@@ -865,74 +836,74 @@ _tokensOfieldnames = ({-# LINE 38 "src-ag/SemHsTokens.ag" #-} map (\(n,_,_) -> n) _lhsIallfields- {-# LINE 869 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 840 "dist/build/SemHsTokens" #-} )- -- "src-ag/SemHsTokens.ag"(line 102, column 18)+ -- "src-ag/SemHsTokens.ag"(line 107, column 18) _lhsOusedFields =- ({-# LINE 102 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 107 "src-ag/SemHsTokens.ag" #-} toList _tokensIusedFields- {-# LINE 875 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 846 "dist/build/SemHsTokens" #-} )- -- "src-ag/SemHsTokens.ag"(line 109, column 18)+ -- "src-ag/SemHsTokens.ag"(line 114, column 18) _lhsOtextLines =- ({-# LINE 109 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 114 "src-ag/SemHsTokens.ag" #-} showTokens _tokensItks- {-# LINE 881 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 852 "dist/build/SemHsTokens" #-} ) -- use rule "src-ag/SemHsTokens.ag"(line 18, column 18) _lhsOerrors = ({-# LINE 18 "src-ag/SemHsTokens.ag" #-} _tokensIerrors- {-# LINE 887 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 858 "dist/build/SemHsTokens" #-} ) -- copy rule (up) _lhsOoutput =- ({-# LINE 136 "src-ag/SemHsTokens.ag" #-}+ ({-# LINE 141 "src-ag/SemHsTokens.ag" #-} _tokensIoutput- {-# LINE 893 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 864 "dist/build/SemHsTokens" #-} ) -- copy rule (up) _lhsOusedAttrs = ({-# LINE 20 "src-ag/SemHsTokens.ag" #-} _tokensIusedAttrs- {-# LINE 899 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 870 "dist/build/SemHsTokens" #-} ) -- copy rule (up) _lhsOusedLocals = ({-# LINE 19 "src-ag/SemHsTokens.ag" #-} _tokensIusedLocals- {-# LINE 905 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 876 "dist/build/SemHsTokens" #-} ) -- copy rule (down) _tokensOallfields = ({-# LINE 30 "src-ag/SemHsTokens.ag" #-} _lhsIallfields- {-# LINE 911 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 882 "dist/build/SemHsTokens" #-} ) -- copy rule (down) _tokensOallnts = ({-# LINE 31 "src-ag/SemHsTokens.ag" #-} _lhsIallnts- {-# LINE 917 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 888 "dist/build/SemHsTokens" #-} ) -- copy rule (down) _tokensOattrs = ({-# LINE 32 "src-ag/SemHsTokens.ag" #-} _lhsIattrs- {-# LINE 923 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 894 "dist/build/SemHsTokens" #-} ) -- copy rule (down) _tokensOcon = ({-# LINE 29 "src-ag/SemHsTokens.ag" #-} _lhsIcon- {-# LINE 929 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 900 "dist/build/SemHsTokens" #-} ) -- copy rule (down) _tokensOnt = ({-# LINE 29 "src-ag/SemHsTokens.ag" #-} _lhsInt- {-# LINE 935 "src-ag/SemHsTokens.hs" #-}+ {-# LINE 906 "dist/build/SemHsTokens" #-} ) ( _tokensIerrors,_tokensIoutput,_tokensItks,_tokensIusedAttrs,_tokensIusedFields,_tokensIusedLocals) =- tokens_ _tokensOallfields _tokensOallnts _tokensOattrs _tokensOcon _tokensOfieldnames _tokensOnt - in ( _lhsOerrors,_lhsOoutput,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) )+ tokens_ _tokensOallfields _tokensOallnts _tokensOattrs _tokensOcon _tokensOfieldnames _tokensOnt+ in ( _lhsOerrors,_lhsOoutput,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))))
src-derived/TfmToVisage.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.39.1.0 (src-ag/TfmToVisage.ag)+-- UUAGC 0.9.40.1 (src-ag/TfmToVisage.ag) module TfmToVisage where {-# LINE 9 "src-ag/TfmToVisage.ag" #-} @@ -9,7 +9,7 @@ import VisageSyntax import qualified Data.Map as Map import Data.Map (Map)-{-# LINE 13 "dist/build/uuagc/uuagc-tmp/TfmToVisage.hs" #-}+{-# LINE 13 "dist/build/TfmToVisage.hs" #-} {-# LINE 2 "src-ag/AbstractSyntax.ag" #-} @@ -21,20 +21,20 @@ import Macro --marcos import CommonTypes import ErrorMessages-{-# LINE 25 "dist/build/uuagc/uuagc-tmp/TfmToVisage.hs" #-}+{-# LINE 25 "dist/build/TfmToVisage.hs" #-} {-# LINE 2 "src-ag/Patterns.ag" #-} -- Patterns.ag imports import UU.Scanner.Position(Pos) import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 32 "dist/build/uuagc/uuagc-tmp/TfmToVisage.hs" #-}+{-# LINE 32 "dist/build/TfmToVisage.hs" #-} {-# LINE 2 "src-ag/Expression.ag" #-} import UU.Scanner.Position(Pos) import HsToken-{-# LINE 38 "dist/build/uuagc/uuagc-tmp/TfmToVisage.hs" #-}+{-# LINE 38 "dist/build/TfmToVisage.hs" #-} {-# LINE 17 "src-ag/TfmToVisage.ag" #-} -- Maps a rule to a pair@@ -90,7 +90,7 @@ underScore field vp@(VUnderscore pos) = vp -}-{-# LINE 94 "dist/build/uuagc/uuagc-tmp/TfmToVisage.hs" #-}+{-# LINE 94 "dist/build/TfmToVisage.hs" #-} -- Child ------------------------------------------------------- {- visit 0:@@ -111,28 +111,28 @@ local syn : _ -} -- cata-sem_Child :: Child ->- T_Child -sem_Child (Child _name _tp _kind ) =- (sem_Child_Child _name _tp _kind )+sem_Child :: Child ->+ T_Child+sem_Child (Child _name _tp _kind) =+ (sem_Child_Child _name _tp _kind) -- semantic domain-newtype T_Child = T_Child ((Map Identifier Attributes) ->- VisageRuleMap ->- (Map Identifier Attributes) ->- ( VisageChild))-data Inh_Child = Inh_Child {inhMap_Inh_Child :: (Map Identifier Attributes),rulemap_Inh_Child :: VisageRuleMap,synMap_Inh_Child :: (Map Identifier Attributes)}-data Syn_Child = Syn_Child {vchild_Syn_Child :: VisageChild}-wrap_Child :: T_Child ->- Inh_Child ->- Syn_Child -wrap_Child (T_Child sem ) (Inh_Child _lhsIinhMap _lhsIrulemap _lhsIsynMap ) =- (let ( _lhsOvchild) = sem _lhsIinhMap _lhsIrulemap _lhsIsynMap - in (Syn_Child _lhsOvchild ))+newtype T_Child = T_Child ((Map Identifier Attributes) ->+ VisageRuleMap ->+ (Map Identifier Attributes) ->+ ( VisageChild))+data Inh_Child = Inh_Child {inhMap_Inh_Child :: (Map Identifier Attributes),rulemap_Inh_Child :: VisageRuleMap,synMap_Inh_Child :: (Map Identifier Attributes)}+data Syn_Child = Syn_Child {vchild_Syn_Child :: VisageChild}+wrap_Child :: T_Child ->+ Inh_Child ->+ Syn_Child+wrap_Child (T_Child sem) (Inh_Child _lhsIinhMap _lhsIrulemap _lhsIsynMap) =+ (let ( _lhsOvchild) = sem _lhsIinhMap _lhsIrulemap _lhsIsynMap+ in (Syn_Child _lhsOvchild)) sem_Child_Child :: Identifier -> Type -> ChildKind ->- T_Child -sem_Child_Child name_ tp_ kind_ =+ T_Child+sem_Child_Child name_ tp_ kind_ = (T_Child (\ _lhsIinhMap _lhsIrulemap _lhsIsynMap ->@@ -141,7 +141,7 @@ _lhsOvchild = ({-# LINE 121 "src-ag/TfmToVisage.ag" #-} VChild name_ tp_ _inh _syn (getForField (getName name_) _lhsIrulemap)- {-# LINE 145 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 145 "dist/build/TfmToVisage" #-} ) -- "src-ag/DistChildAttr.ag"(line 19, column 11) _chnt =@@ -149,22 +149,22 @@ case tp_ of NT nt _ _ -> nt Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")- Haskell t -> identifier t- {-# LINE 154 "src-ag/TfmToVisage.hs" #-}+ Haskell t -> identifier ""+ {-# LINE 154 "dist/build/TfmToVisage" #-} ) -- "src-ag/DistChildAttr.ag"(line 23, column 11) _inh = ({-# LINE 23 "src-ag/DistChildAttr.ag" #-} Map.findWithDefault Map.empty _chnt _lhsIinhMap- {-# LINE 160 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 160 "dist/build/TfmToVisage" #-} ) -- "src-ag/DistChildAttr.ag"(line 24, column 11) _syn = ({-# LINE 24 "src-ag/DistChildAttr.ag" #-} Map.findWithDefault Map.empty _chnt _lhsIsynMap- {-# LINE 166 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 166 "dist/build/TfmToVisage" #-} )- in ( _lhsOvchild))) )+ in ( _lhsOvchild)))) -- Children ---------------------------------------------------- {- visit 0:@@ -181,27 +181,27 @@ alternative Nil: -} -- cata-sem_Children :: Children ->- T_Children -sem_Children list =- (Prelude.foldr sem_Children_Cons sem_Children_Nil (Prelude.map sem_Child list) )+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 ((Map Identifier Attributes) ->- VisageRuleMap ->- (Map Identifier Attributes) ->- ( ([VisageChild])))-data Inh_Children = Inh_Children {inhMap_Inh_Children :: (Map Identifier Attributes),rulemap_Inh_Children :: VisageRuleMap,synMap_Inh_Children :: (Map Identifier Attributes)}-data Syn_Children = Syn_Children {vchildren_Syn_Children :: ([VisageChild])}-wrap_Children :: T_Children ->- Inh_Children ->- Syn_Children -wrap_Children (T_Children sem ) (Inh_Children _lhsIinhMap _lhsIrulemap _lhsIsynMap ) =- (let ( _lhsOvchildren) = sem _lhsIinhMap _lhsIrulemap _lhsIsynMap - in (Syn_Children _lhsOvchildren ))-sem_Children_Cons :: T_Child ->- T_Children ->- T_Children -sem_Children_Cons (T_Child hd_ ) (T_Children tl_ ) =+newtype T_Children = T_Children ((Map Identifier Attributes) ->+ VisageRuleMap ->+ (Map Identifier Attributes) ->+ ( ([VisageChild])))+data Inh_Children = Inh_Children {inhMap_Inh_Children :: (Map Identifier Attributes),rulemap_Inh_Children :: VisageRuleMap,synMap_Inh_Children :: (Map Identifier Attributes)}+data Syn_Children = Syn_Children {vchildren_Syn_Children :: ([VisageChild])}+wrap_Children :: T_Children ->+ Inh_Children ->+ Syn_Children+wrap_Children (T_Children sem) (Inh_Children _lhsIinhMap _lhsIrulemap _lhsIsynMap) =+ (let ( _lhsOvchildren) = sem _lhsIinhMap _lhsIrulemap _lhsIsynMap+ in (Syn_Children _lhsOvchildren))+sem_Children_Cons :: T_Child ->+ T_Children ->+ T_Children+sem_Children_Cons (T_Child hd_) (T_Children tl_) = (T_Children (\ _lhsIinhMap _lhsIrulemap _lhsIsynMap ->@@ -218,51 +218,51 @@ _lhsOvchildren = ({-# LINE 117 "src-ag/TfmToVisage.ag" #-} _hdIvchild : _tlIvchildren- {-# LINE 222 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 222 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _hdOinhMap = ({-# LINE 12 "src-ag/DistChildAttr.ag" #-} _lhsIinhMap- {-# LINE 228 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 228 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _hdOrulemap = ({-# LINE 83 "src-ag/TfmToVisage.ag" #-} _lhsIrulemap- {-# LINE 234 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 234 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _hdOsynMap = ({-# LINE 12 "src-ag/DistChildAttr.ag" #-} _lhsIsynMap- {-# LINE 240 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 240 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _tlOinhMap = ({-# LINE 12 "src-ag/DistChildAttr.ag" #-} _lhsIinhMap- {-# LINE 246 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 246 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _tlOrulemap = ({-# LINE 84 "src-ag/TfmToVisage.ag" #-} _lhsIrulemap- {-# LINE 252 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 252 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _tlOsynMap = ({-# LINE 12 "src-ag/DistChildAttr.ag" #-} _lhsIsynMap- {-# LINE 258 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 258 "dist/build/TfmToVisage" #-} ) ( _hdIvchild) =- hd_ _hdOinhMap _hdOrulemap _hdOsynMap + hd_ _hdOinhMap _hdOrulemap _hdOsynMap ( _tlIvchildren) =- tl_ _tlOinhMap _tlOrulemap _tlOsynMap - in ( _lhsOvchildren))) )-sem_Children_Nil :: T_Children -sem_Children_Nil =+ tl_ _tlOinhMap _tlOrulemap _tlOsynMap+ in ( _lhsOvchildren))))+sem_Children_Nil :: T_Children+sem_Children_Nil = (T_Children (\ _lhsIinhMap _lhsIrulemap _lhsIsynMap ->@@ -271,14 +271,14 @@ _lhsOvchildren = ({-# LINE 118 "src-ag/TfmToVisage.ag" #-} []- {-# LINE 275 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 275 "dist/build/TfmToVisage" #-} )- in ( _lhsOvchildren))) )+ in ( _lhsOvchildren)))) -- Expression -------------------------------------------------- {- visit 0: synthesized attribute:- self : SELF + self : Expression alternatives: alternative Expression: child pos : {Pos}@@ -287,38 +287,38 @@ local self : _ -} -- cata-sem_Expression :: Expression ->- T_Expression -sem_Expression (Expression _pos _tks ) =- (sem_Expression_Expression _pos _tks )+sem_Expression :: Expression ->+ T_Expression+sem_Expression (Expression _pos _tks) =+ (sem_Expression_Expression _pos _tks) -- semantic domain-newtype T_Expression = T_Expression (( Expression ))-data Inh_Expression = Inh_Expression {}-data Syn_Expression = Syn_Expression {self_Syn_Expression :: Expression }-wrap_Expression :: T_Expression ->- Inh_Expression ->- Syn_Expression -wrap_Expression (T_Expression sem ) (Inh_Expression ) =- (let ( _lhsOself) = sem - in (Syn_Expression _lhsOself ))+newtype T_Expression = T_Expression (( Expression))+data Inh_Expression = Inh_Expression {}+data Syn_Expression = Syn_Expression {self_Syn_Expression :: Expression}+wrap_Expression :: T_Expression ->+ Inh_Expression ->+ Syn_Expression+wrap_Expression (T_Expression sem) (Inh_Expression) =+ (let ( _lhsOself) = sem+ in (Syn_Expression _lhsOself)) sem_Expression_Expression :: Pos -> ([HsToken]) ->- T_Expression -sem_Expression_Expression pos_ tks_ =- (T_Expression (let _lhsOself :: Expression + T_Expression+sem_Expression_Expression pos_ tks_ =+ (T_Expression (let _lhsOself :: Expression -- self rule _self = ({-# LINE 74 "src-ag/TfmToVisage.ag" #-} Expression pos_ tks_- {-# LINE 314 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 314 "dist/build/TfmToVisage" #-} ) -- self rule _lhsOself = ({-# LINE 74 "src-ag/TfmToVisage.ag" #-} _self- {-# LINE 320 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 320 "dist/build/TfmToVisage" #-} )- in ( _lhsOself)) )+ in ( _lhsOself))) -- Grammar ----------------------------------------------------- {- visit 0:@@ -342,25 +342,25 @@ child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))} -} -- cata-sem_Grammar :: Grammar ->- T_Grammar -sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap ) =- (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap )+sem_Grammar :: Grammar ->+ T_Grammar+sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap) =+ (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts) _pragmas _manualAttrOrderMap _paramMap _contextMap _quantMap _uniqueMap _augmentsMap _aroundsMap _mergeMap) -- semantic domain-newtype T_Grammar = T_Grammar (( VisageGrammar))-data Inh_Grammar = Inh_Grammar {}-data Syn_Grammar = Syn_Grammar {visage_Syn_Grammar :: VisageGrammar}-wrap_Grammar :: T_Grammar ->- Inh_Grammar ->- Syn_Grammar -wrap_Grammar (T_Grammar sem ) (Inh_Grammar ) =- (let ( _lhsOvisage) = sem - in (Syn_Grammar _lhsOvisage ))+newtype T_Grammar = T_Grammar (( VisageGrammar))+data Inh_Grammar = Inh_Grammar {}+data Syn_Grammar = Syn_Grammar {visage_Syn_Grammar :: VisageGrammar}+wrap_Grammar :: T_Grammar ->+ Inh_Grammar ->+ Syn_Grammar+wrap_Grammar (T_Grammar sem) (Inh_Grammar) =+ (let ( _lhsOvisage) = sem+ in (Syn_Grammar _lhsOvisage)) sem_Grammar_Grammar :: TypeSyns -> UseMap -> Derivings -> (Set NontermIdent) ->- T_Nonterminals ->+ T_Nonterminals -> PragmaMap -> AttrOrderMap -> ParamMap ->@@ -370,8 +370,8 @@ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->- T_Grammar -sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_ =+ T_Grammar+sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_ = (T_Grammar (let _lhsOvisage :: VisageGrammar _nontsOinhMap :: (Map Identifier Attributes) _nontsOsynMap :: (Map Identifier Attributes)@@ -382,23 +382,23 @@ _lhsOvisage = ({-# LINE 90 "src-ag/TfmToVisage.ag" #-} VGrammar _nontsIvnonts- {-# LINE 386 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 386 "dist/build/TfmToVisage" #-} ) -- "src-ag/DistChildAttr.ag"(line 15, column 13) _nontsOinhMap = ({-# LINE 15 "src-ag/DistChildAttr.ag" #-} _nontsIinhMap'- {-# LINE 392 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 392 "dist/build/TfmToVisage" #-} ) -- "src-ag/DistChildAttr.ag"(line 16, column 13) _nontsOsynMap = ({-# LINE 16 "src-ag/DistChildAttr.ag" #-} _nontsIsynMap'- {-# LINE 398 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 398 "dist/build/TfmToVisage" #-} ) ( _nontsIinhMap',_nontsIsynMap',_nontsIvnonts) =- nonts_ _nontsOinhMap _nontsOsynMap - in ( _lhsOvisage)) )+ nonts_ _nontsOinhMap _nontsOsynMap+ in ( _lhsOvisage))) -- Nonterminal ------------------------------------------------- {- visit 0:@@ -418,29 +418,29 @@ child prods : Productions -} -- cata-sem_Nonterminal :: Nonterminal ->- T_Nonterminal -sem_Nonterminal (Nonterminal _nt _params _inh _syn _prods ) =- (sem_Nonterminal_Nonterminal _nt _params _inh _syn (sem_Productions _prods ) )+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 Identifier Attributes) ->- (Map Identifier Attributes) ->- ( (Map Identifier Attributes),(Map Identifier Attributes),VisageNonterminal))-data Inh_Nonterminal = Inh_Nonterminal {inhMap_Inh_Nonterminal :: (Map Identifier Attributes),synMap_Inh_Nonterminal :: (Map Identifier Attributes)}-data Syn_Nonterminal = Syn_Nonterminal {inhMap'_Syn_Nonterminal :: (Map Identifier Attributes),synMap'_Syn_Nonterminal :: (Map Identifier Attributes),vnont_Syn_Nonterminal :: VisageNonterminal}-wrap_Nonterminal :: T_Nonterminal ->- Inh_Nonterminal ->- Syn_Nonterminal -wrap_Nonterminal (T_Nonterminal sem ) (Inh_Nonterminal _lhsIinhMap _lhsIsynMap ) =- (let ( _lhsOinhMap',_lhsOsynMap',_lhsOvnont) = sem _lhsIinhMap _lhsIsynMap - in (Syn_Nonterminal _lhsOinhMap' _lhsOsynMap' _lhsOvnont ))+newtype T_Nonterminal = T_Nonterminal ((Map Identifier Attributes) ->+ (Map Identifier Attributes) ->+ ( (Map Identifier Attributes),(Map Identifier Attributes),VisageNonterminal))+data Inh_Nonterminal = Inh_Nonterminal {inhMap_Inh_Nonterminal :: (Map Identifier Attributes),synMap_Inh_Nonterminal :: (Map Identifier Attributes)}+data Syn_Nonterminal = Syn_Nonterminal {inhMap'_Syn_Nonterminal :: (Map Identifier Attributes),synMap'_Syn_Nonterminal :: (Map Identifier Attributes),vnont_Syn_Nonterminal :: VisageNonterminal}+wrap_Nonterminal :: T_Nonterminal ->+ Inh_Nonterminal ->+ Syn_Nonterminal+wrap_Nonterminal (T_Nonterminal sem) (Inh_Nonterminal _lhsIinhMap _lhsIsynMap) =+ (let ( _lhsOinhMap',_lhsOsynMap',_lhsOvnont) = sem _lhsIinhMap _lhsIsynMap+ in (Syn_Nonterminal _lhsOinhMap' _lhsOsynMap' _lhsOvnont)) sem_Nonterminal_Nonterminal :: NontermIdent -> ([Identifier]) -> Attributes -> Attributes ->- T_Productions ->- T_Nonterminal -sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ (T_Productions prods_ ) =+ T_Productions ->+ T_Nonterminal+sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ (T_Productions prods_) = (T_Nonterminal (\ _lhsIinhMap _lhsIsynMap -> (let _lhsOvnont :: VisageNonterminal@@ -453,35 +453,35 @@ _lhsOvnont = ({-# LINE 100 "src-ag/TfmToVisage.ag" #-} VNonterminal nt_ inh_ syn_ _prodsIvprods- {-# LINE 457 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 457 "dist/build/TfmToVisage" #-} ) -- "src-ag/DistChildAttr.ag"(line 7, column 18) _lhsOinhMap' = ({-# LINE 7 "src-ag/DistChildAttr.ag" #-} Map.singleton nt_ inh_- {-# LINE 463 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 463 "dist/build/TfmToVisage" #-} ) -- "src-ag/DistChildAttr.ag"(line 8, column 18) _lhsOsynMap' = ({-# LINE 8 "src-ag/DistChildAttr.ag" #-} Map.singleton nt_ syn_- {-# LINE 469 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 469 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _prodsOinhMap = ({-# LINE 12 "src-ag/DistChildAttr.ag" #-} _lhsIinhMap- {-# LINE 475 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 475 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _prodsOsynMap = ({-# LINE 12 "src-ag/DistChildAttr.ag" #-} _lhsIsynMap- {-# LINE 481 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 481 "dist/build/TfmToVisage" #-} ) ( _prodsIvprods) =- prods_ _prodsOinhMap _prodsOsynMap - in ( _lhsOinhMap',_lhsOsynMap',_lhsOvnont))) )+ prods_ _prodsOinhMap _prodsOsynMap+ in ( _lhsOinhMap',_lhsOsynMap',_lhsOvnont)))) -- Nonterminals ------------------------------------------------ {- visit 0:@@ -499,26 +499,26 @@ alternative Nil: -} -- cata-sem_Nonterminals :: Nonterminals ->- T_Nonterminals -sem_Nonterminals list =- (Prelude.foldr sem_Nonterminals_Cons sem_Nonterminals_Nil (Prelude.map sem_Nonterminal list) )+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 Identifier Attributes) ->- (Map Identifier Attributes) ->- ( (Map Identifier Attributes),(Map Identifier Attributes),([VisageNonterminal])))-data Inh_Nonterminals = Inh_Nonterminals {inhMap_Inh_Nonterminals :: (Map Identifier Attributes),synMap_Inh_Nonterminals :: (Map Identifier Attributes)}-data Syn_Nonterminals = Syn_Nonterminals {inhMap'_Syn_Nonterminals :: (Map Identifier Attributes),synMap'_Syn_Nonterminals :: (Map Identifier Attributes),vnonts_Syn_Nonterminals :: ([VisageNonterminal])}-wrap_Nonterminals :: T_Nonterminals ->- Inh_Nonterminals ->- Syn_Nonterminals -wrap_Nonterminals (T_Nonterminals sem ) (Inh_Nonterminals _lhsIinhMap _lhsIsynMap ) =- (let ( _lhsOinhMap',_lhsOsynMap',_lhsOvnonts) = sem _lhsIinhMap _lhsIsynMap - in (Syn_Nonterminals _lhsOinhMap' _lhsOsynMap' _lhsOvnonts ))-sem_Nonterminals_Cons :: T_Nonterminal ->- T_Nonterminals ->- T_Nonterminals -sem_Nonterminals_Cons (T_Nonterminal hd_ ) (T_Nonterminals tl_ ) =+newtype T_Nonterminals = T_Nonterminals ((Map Identifier Attributes) ->+ (Map Identifier Attributes) ->+ ( (Map Identifier Attributes),(Map Identifier Attributes),([VisageNonterminal])))+data Inh_Nonterminals = Inh_Nonterminals {inhMap_Inh_Nonterminals :: (Map Identifier Attributes),synMap_Inh_Nonterminals :: (Map Identifier Attributes)}+data Syn_Nonterminals = Syn_Nonterminals {inhMap'_Syn_Nonterminals :: (Map Identifier Attributes),synMap'_Syn_Nonterminals :: (Map Identifier Attributes),vnonts_Syn_Nonterminals :: ([VisageNonterminal])}+wrap_Nonterminals :: T_Nonterminals ->+ Inh_Nonterminals ->+ Syn_Nonterminals+wrap_Nonterminals (T_Nonterminals sem) (Inh_Nonterminals _lhsIinhMap _lhsIsynMap) =+ (let ( _lhsOinhMap',_lhsOsynMap',_lhsOvnonts) = sem _lhsIinhMap _lhsIsynMap+ in (Syn_Nonterminals _lhsOinhMap' _lhsOsynMap' _lhsOvnonts))+sem_Nonterminals_Cons :: T_Nonterminal ->+ T_Nonterminals ->+ T_Nonterminals+sem_Nonterminals_Cons (T_Nonterminal hd_) (T_Nonterminals tl_) = (T_Nonterminals (\ _lhsIinhMap _lhsIsynMap -> (let _lhsOvnonts :: ([VisageNonterminal])@@ -538,51 +538,51 @@ _lhsOvnonts = ({-# LINE 94 "src-ag/TfmToVisage.ag" #-} _hdIvnont : _tlIvnonts- {-# LINE 542 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 542 "dist/build/TfmToVisage" #-} ) -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53) _lhsOinhMap' = ({-# LINE 4 "src-ag/DistChildAttr.ag" #-} _hdIinhMap' `Map.union` _tlIinhMap'- {-# LINE 548 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 548 "dist/build/TfmToVisage" #-} ) -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53) _lhsOsynMap' = ({-# LINE 4 "src-ag/DistChildAttr.ag" #-} _hdIsynMap' `Map.union` _tlIsynMap'- {-# LINE 554 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 554 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _hdOinhMap = ({-# LINE 12 "src-ag/DistChildAttr.ag" #-} _lhsIinhMap- {-# LINE 560 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 560 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _hdOsynMap = ({-# LINE 12 "src-ag/DistChildAttr.ag" #-} _lhsIsynMap- {-# LINE 566 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 566 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _tlOinhMap = ({-# LINE 12 "src-ag/DistChildAttr.ag" #-} _lhsIinhMap- {-# LINE 572 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 572 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _tlOsynMap = ({-# LINE 12 "src-ag/DistChildAttr.ag" #-} _lhsIsynMap- {-# LINE 578 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 578 "dist/build/TfmToVisage" #-} ) ( _hdIinhMap',_hdIsynMap',_hdIvnont) =- hd_ _hdOinhMap _hdOsynMap + hd_ _hdOinhMap _hdOsynMap ( _tlIinhMap',_tlIsynMap',_tlIvnonts) =- tl_ _tlOinhMap _tlOsynMap - in ( _lhsOinhMap',_lhsOsynMap',_lhsOvnonts))) )-sem_Nonterminals_Nil :: T_Nonterminals -sem_Nonterminals_Nil =+ tl_ _tlOinhMap _tlOsynMap+ in ( _lhsOinhMap',_lhsOsynMap',_lhsOvnonts))))+sem_Nonterminals_Nil :: T_Nonterminals+sem_Nonterminals_Nil = (T_Nonterminals (\ _lhsIinhMap _lhsIsynMap -> (let _lhsOvnonts :: ([VisageNonterminal])@@ -592,28 +592,28 @@ _lhsOvnonts = ({-# LINE 96 "src-ag/TfmToVisage.ag" #-} []- {-# LINE 596 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 596 "dist/build/TfmToVisage" #-} ) -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53) _lhsOinhMap' = ({-# LINE 4 "src-ag/DistChildAttr.ag" #-} Map.empty- {-# LINE 602 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 602 "dist/build/TfmToVisage" #-} ) -- use rule "src-ag/DistChildAttr.ag"(line 4, column 53) _lhsOsynMap' = ({-# LINE 4 "src-ag/DistChildAttr.ag" #-} Map.empty- {-# LINE 608 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 608 "dist/build/TfmToVisage" #-} )- in ( _lhsOinhMap',_lhsOsynMap',_lhsOvnonts))) )+ in ( _lhsOinhMap',_lhsOsynMap',_lhsOvnonts)))) -- Pattern ----------------------------------------------------- {- visit 0: synthesized attributes:- copy : SELF + copy : Pattern fieldattrs : [(Identifier,Identifier)] - self : SELF + self : Pattern vpat : VisagePattern alternatives: alternative Alias:@@ -647,40 +647,40 @@ local self : _ -} -- cata-sem_Pattern :: Pattern ->- T_Pattern -sem_Pattern (Alias _field _attr _pat ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) )-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 )+sem_Pattern :: Pattern ->+ T_Pattern+sem_Pattern (Alias _field _attr _pat) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat))+sem_Pattern (Constr _name _pats) =+ (sem_Pattern_Constr _name (sem_Patterns _pats))+sem_Pattern (Irrefutable _pat) =+ (sem_Pattern_Irrefutable (sem_Pattern _pat))+sem_Pattern (Product _pos _pats) =+ (sem_Pattern_Product _pos (sem_Patterns _pats))+sem_Pattern (Underscore _pos) =+ (sem_Pattern_Underscore _pos) -- semantic domain-newtype T_Pattern = T_Pattern (( Pattern ,( [(Identifier,Identifier)] ),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}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern (T_Pattern sem ) (Inh_Pattern ) =- (let ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat) = sem - in (Syn_Pattern _lhsOcopy _lhsOfieldattrs _lhsOself _lhsOvpat ))+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}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern+wrap_Pattern (T_Pattern sem) (Inh_Pattern) =+ (let ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat) = sem+ in (Syn_Pattern _lhsOcopy _lhsOfieldattrs _lhsOself _lhsOvpat)) sem_Pattern_Alias :: Identifier -> Identifier ->- T_Pattern ->- T_Pattern -sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) =+ T_Pattern ->+ T_Pattern+sem_Pattern_Alias field_ attr_ (T_Pattern pat_) = (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 -- "src-ag/TfmToVisage.ag"(line 138, column 17) _lhsOvpat =@@ -688,244 +688,244 @@ if (isVar _self) then VVar field_ attr_ else VAlias field_ attr_ _patIvpat- {-# LINE 692 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 692 "dist/build/TfmToVisage" #-} ) -- "src-ag/TfmToVisage.ag"(line 147, column 17) _lhsOfieldattrs = ({-# LINE 147 "src-ag/TfmToVisage.ag" #-} [(field_, attr_)]- {-# LINE 698 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 698 "dist/build/TfmToVisage" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} Alias field_ attr_ _patIcopy- {-# LINE 704 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 704 "dist/build/TfmToVisage" #-} ) -- self rule _self = ({-# LINE 74 "src-ag/TfmToVisage.ag" #-} Alias field_ attr_ _patIself- {-# LINE 710 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 710 "dist/build/TfmToVisage" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 716 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 716 "dist/build/TfmToVisage" #-} ) -- self rule _lhsOself = ({-# LINE 74 "src-ag/TfmToVisage.ag" #-} _self- {-# LINE 722 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 722 "dist/build/TfmToVisage" #-} ) ( _patIcopy,_patIfieldattrs,_patIself,_patIvpat) =- pat_ - in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat)) )+ pat_+ in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat))) sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr name_ (T_Patterns pats_ ) =+ T_Patterns ->+ T_Pattern+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]) -- "src-ag/TfmToVisage.ag"(line 136, column 17) _lhsOvpat = ({-# LINE 136 "src-ag/TfmToVisage.ag" #-} VConstr name_ _patsIvpats- {-# LINE 743 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 743 "dist/build/TfmToVisage" #-} ) -- use rule "src-ag/TfmToVisage.ag"(line 144, column 43) _lhsOfieldattrs = ({-# LINE 144 "src-ag/TfmToVisage.ag" #-} _patsIfieldattrs- {-# LINE 749 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 749 "dist/build/TfmToVisage" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} Constr name_ _patsIcopy- {-# LINE 755 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 755 "dist/build/TfmToVisage" #-} ) -- self rule _self = ({-# LINE 74 "src-ag/TfmToVisage.ag" #-} Constr name_ _patsIself- {-# LINE 761 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 761 "dist/build/TfmToVisage" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 767 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 767 "dist/build/TfmToVisage" #-} ) -- self rule _lhsOself = ({-# LINE 74 "src-ag/TfmToVisage.ag" #-} _self- {-# LINE 773 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 773 "dist/build/TfmToVisage" #-} ) ( _patsIcopy,_patsIfieldattrs,_patsIself,_patsIvpats) =- pats_ - in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat)) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable (T_Pattern pat_ ) =+ pats_+ in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat)))+sem_Pattern_Irrefutable :: T_Pattern ->+ 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 "src-ag/TfmToVisage.ag"(line 144, column 43) _lhsOfieldattrs = ({-# LINE 144 "src-ag/TfmToVisage.ag" #-} _patIfieldattrs- {-# LINE 793 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 793 "dist/build/TfmToVisage" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} Irrefutable _patIcopy- {-# LINE 799 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 799 "dist/build/TfmToVisage" #-} ) -- self rule _self = ({-# LINE 74 "src-ag/TfmToVisage.ag" #-} Irrefutable _patIself- {-# LINE 805 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 805 "dist/build/TfmToVisage" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 811 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 811 "dist/build/TfmToVisage" #-} ) -- self rule _lhsOself = ({-# LINE 74 "src-ag/TfmToVisage.ag" #-} _self- {-# LINE 817 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 817 "dist/build/TfmToVisage" #-} ) -- copy rule (up) _lhsOvpat = ({-# LINE 85 "src-ag/TfmToVisage.ag" #-} _patIvpat- {-# LINE 823 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 823 "dist/build/TfmToVisage" #-} ) ( _patIcopy,_patIfieldattrs,_patIself,_patIvpat) =- pat_ - in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat)) )+ pat_+ in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat))) sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product pos_ (T_Patterns pats_ ) =+ T_Patterns ->+ T_Pattern+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]) -- "src-ag/TfmToVisage.ag"(line 137, column 17) _lhsOvpat = ({-# LINE 137 "src-ag/TfmToVisage.ag" #-} VProduct pos_ _patsIvpats- {-# LINE 844 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 844 "dist/build/TfmToVisage" #-} ) -- use rule "src-ag/TfmToVisage.ag"(line 144, column 43) _lhsOfieldattrs = ({-# LINE 144 "src-ag/TfmToVisage.ag" #-} _patsIfieldattrs- {-# LINE 850 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 850 "dist/build/TfmToVisage" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} Product pos_ _patsIcopy- {-# LINE 856 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 856 "dist/build/TfmToVisage" #-} ) -- self rule _self = ({-# LINE 74 "src-ag/TfmToVisage.ag" #-} Product pos_ _patsIself- {-# LINE 862 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 862 "dist/build/TfmToVisage" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 868 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 868 "dist/build/TfmToVisage" #-} ) -- self rule _lhsOself = ({-# LINE 74 "src-ag/TfmToVisage.ag" #-} _self- {-# LINE 874 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 874 "dist/build/TfmToVisage" #-} ) ( _patsIcopy,_patsIfieldattrs,_patsIself,_patsIvpats) =- pats_ - in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat)) )+ pats_+ in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat))) sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore pos_ =+ T_Pattern+sem_Pattern_Underscore pos_ = (T_Pattern (let _lhsOvpat :: VisagePattern _lhsOfieldattrs :: ( [(Identifier,Identifier)] )- _lhsOcopy :: Pattern - _lhsOself :: Pattern + _lhsOcopy :: Pattern+ _lhsOself :: Pattern -- "src-ag/TfmToVisage.ag"(line 141, column 17) _lhsOvpat = ({-# LINE 141 "src-ag/TfmToVisage.ag" #-} VUnderscore pos_- {-# LINE 890 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 890 "dist/build/TfmToVisage" #-} ) -- use rule "src-ag/TfmToVisage.ag"(line 144, column 43) _lhsOfieldattrs = ({-# LINE 144 "src-ag/TfmToVisage.ag" #-} []- {-# LINE 896 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 896 "dist/build/TfmToVisage" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} Underscore pos_- {-# LINE 902 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 902 "dist/build/TfmToVisage" #-} ) -- self rule _self = ({-# LINE 74 "src-ag/TfmToVisage.ag" #-} Underscore pos_- {-# LINE 908 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 908 "dist/build/TfmToVisage" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 914 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 914 "dist/build/TfmToVisage" #-} ) -- self rule _lhsOself = ({-# LINE 74 "src-ag/TfmToVisage.ag" #-} _self- {-# LINE 920 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 920 "dist/build/TfmToVisage" #-} )- in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat)) )+ in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat))) -- Patterns ---------------------------------------------------- {- visit 0: synthesized attributes:- copy : SELF + copy : Patterns fieldattrs : [(Identifier,Identifier)] - self : SELF + self : Patterns vpats : [VisagePattern] alternatives: alternative Cons:@@ -940,120 +940,120 @@ local self : _ -} -- cata-sem_Patterns :: Patterns ->- T_Patterns -sem_Patterns list =- (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list) )+sem_Patterns :: Patterns ->+ T_Patterns+sem_Patterns list =+ (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list)) -- semantic domain-newtype T_Patterns = T_Patterns (( Patterns ,( [(Identifier,Identifier)] ),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])}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns (T_Patterns sem ) (Inh_Patterns ) =- (let ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpats) = sem - in (Syn_Patterns _lhsOcopy _lhsOfieldattrs _lhsOself _lhsOvpats ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) =+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])}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns+wrap_Patterns (T_Patterns sem) (Inh_Patterns) =+ (let ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpats) = sem+ in (Syn_Patterns _lhsOcopy _lhsOfieldattrs _lhsOself _lhsOvpats))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns+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]) -- "src-ag/TfmToVisage.ag"(line 132, column 17) _lhsOvpats = ({-# LINE 132 "src-ag/TfmToVisage.ag" #-} _hdIvpat : _tlIvpats- {-# LINE 978 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 978 "dist/build/TfmToVisage" #-} ) -- use rule "src-ag/TfmToVisage.ag"(line 144, column 43) _lhsOfieldattrs = ({-# LINE 144 "src-ag/TfmToVisage.ag" #-} _hdIfieldattrs ++ _tlIfieldattrs- {-# LINE 984 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 984 "dist/build/TfmToVisage" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} (:) _hdIcopy _tlIcopy- {-# LINE 990 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 990 "dist/build/TfmToVisage" #-} ) -- self rule _self = ({-# LINE 74 "src-ag/TfmToVisage.ag" #-} (:) _hdIself _tlIself- {-# LINE 996 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 996 "dist/build/TfmToVisage" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 1002 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1002 "dist/build/TfmToVisage" #-} ) -- self rule _lhsOself = ({-# LINE 74 "src-ag/TfmToVisage.ag" #-} _self- {-# LINE 1008 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1008 "dist/build/TfmToVisage" #-} ) ( _hdIcopy,_hdIfieldattrs,_hdIself,_hdIvpat) =- hd_ + hd_ ( _tlIcopy,_tlIfieldattrs,_tlIself,_tlIvpats) =- tl_ - in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpats)) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =+ tl_+ in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpats)))+sem_Patterns_Nil :: T_Patterns+sem_Patterns_Nil = (T_Patterns (let _lhsOvpats :: ([VisagePattern]) _lhsOfieldattrs :: ( [(Identifier,Identifier)] )- _lhsOcopy :: Patterns - _lhsOself :: Patterns + _lhsOcopy :: Patterns+ _lhsOself :: Patterns -- "src-ag/TfmToVisage.ag"(line 133, column 17) _lhsOvpats = ({-# LINE 133 "src-ag/TfmToVisage.ag" #-} []- {-# LINE 1025 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1025 "dist/build/TfmToVisage" #-} ) -- use rule "src-ag/TfmToVisage.ag"(line 144, column 43) _lhsOfieldattrs = ({-# LINE 144 "src-ag/TfmToVisage.ag" #-} []- {-# LINE 1031 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1031 "dist/build/TfmToVisage" #-} ) -- self rule _copy = ({-# LINE 22 "src-ag/Patterns.ag" #-} []- {-# LINE 1037 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1037 "dist/build/TfmToVisage" #-} ) -- self rule _self = ({-# LINE 74 "src-ag/TfmToVisage.ag" #-} []- {-# LINE 1043 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1043 "dist/build/TfmToVisage" #-} ) -- self rule _lhsOcopy = ({-# LINE 22 "src-ag/Patterns.ag" #-} _copy- {-# LINE 1049 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1049 "dist/build/TfmToVisage" #-} ) -- self rule _lhsOself = ({-# LINE 74 "src-ag/TfmToVisage.ag" #-} _self- {-# LINE 1055 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1055 "dist/build/TfmToVisage" #-} )- in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpats)) )+ in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpats))) -- Production -------------------------------------------------- {- visit 0:@@ -1077,31 +1077,31 @@ local lhsrules : _ -} -- cata-sem_Production :: Production ->- T_Production -sem_Production (Production _con _params _constraints _children _rules _typeSigs _macro ) =- (sem_Production_Production _con _params _constraints (sem_Children _children ) (sem_Rules _rules ) (sem_TypeSigs _typeSigs ) _macro )+sem_Production :: Production ->+ T_Production+sem_Production (Production _con _params _constraints _children _rules _typeSigs _macro) =+ (sem_Production_Production _con _params _constraints (sem_Children _children) (sem_Rules _rules) (sem_TypeSigs _typeSigs) _macro) -- semantic domain-newtype T_Production = T_Production ((Map Identifier Attributes) ->- (Map Identifier Attributes) ->- ( VisageProduction))-data Inh_Production = Inh_Production {inhMap_Inh_Production :: (Map Identifier Attributes),synMap_Inh_Production :: (Map Identifier Attributes)}-data Syn_Production = Syn_Production {vprod_Syn_Production :: VisageProduction}-wrap_Production :: T_Production ->- Inh_Production ->- Syn_Production -wrap_Production (T_Production sem ) (Inh_Production _lhsIinhMap _lhsIsynMap ) =- (let ( _lhsOvprod) = sem _lhsIinhMap _lhsIsynMap - in (Syn_Production _lhsOvprod ))+newtype T_Production = T_Production ((Map Identifier Attributes) ->+ (Map Identifier Attributes) ->+ ( VisageProduction))+data Inh_Production = Inh_Production {inhMap_Inh_Production :: (Map Identifier Attributes),synMap_Inh_Production :: (Map Identifier Attributes)}+data Syn_Production = Syn_Production {vprod_Syn_Production :: VisageProduction}+wrap_Production :: T_Production ->+ Inh_Production ->+ Syn_Production+wrap_Production (T_Production sem) (Inh_Production _lhsIinhMap _lhsIsynMap) =+ (let ( _lhsOvprod) = sem _lhsIinhMap _lhsIsynMap+ in (Syn_Production _lhsOvprod)) sem_Production_Production :: ConstructorIdent -> ([Identifier]) -> ([Type]) ->- T_Children ->- T_Rules ->- T_TypeSigs ->+ T_Children ->+ T_Rules ->+ T_TypeSigs -> MaybeMacro ->- T_Production -sem_Production_Production con_ params_ constraints_ (T_Children children_ ) (T_Rules rules_ ) (T_TypeSigs typeSigs_ ) macro_ =+ T_Production+sem_Production_Production con_ params_ constraints_ (T_Children children_) (T_Rules rules_) (T_TypeSigs typeSigs_) macro_ = (T_Production (\ _lhsIinhMap _lhsIsynMap -> (let _lhsOvprod :: VisageProduction@@ -1114,49 +1114,49 @@ _lhsOvprod = ({-# LINE 110 "src-ag/TfmToVisage.ag" #-} VProduction con_ _childrenIvchildren _lhsrules _locrules- {-# LINE 1118 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1118 "dist/build/TfmToVisage" #-} ) -- "src-ag/TfmToVisage.ag"(line 111, column 7) _splitVRules = ({-# LINE 111 "src-ag/TfmToVisage.ag" #-} splitVRules _rulesIvrules- {-# LINE 1124 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1124 "dist/build/TfmToVisage" #-} ) -- "src-ag/TfmToVisage.ag"(line 112, column 7) _locrules = ({-# LINE 112 "src-ag/TfmToVisage.ag" #-} getForField "loc" _splitVRules- {-# LINE 1130 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1130 "dist/build/TfmToVisage" #-} ) -- "src-ag/TfmToVisage.ag"(line 113, column 7) _lhsrules = ({-# LINE 113 "src-ag/TfmToVisage.ag" #-} getForField "lhs" _splitVRules- {-# LINE 1136 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1136 "dist/build/TfmToVisage" #-} ) -- "src-ag/TfmToVisage.ag"(line 114, column 7) _childrenOrulemap = ({-# LINE 114 "src-ag/TfmToVisage.ag" #-} _splitVRules- {-# LINE 1142 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1142 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _childrenOinhMap = ({-# LINE 12 "src-ag/DistChildAttr.ag" #-} _lhsIinhMap- {-# LINE 1148 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1148 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _childrenOsynMap = ({-# LINE 12 "src-ag/DistChildAttr.ag" #-} _lhsIsynMap- {-# LINE 1154 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1154 "dist/build/TfmToVisage" #-} ) ( _childrenIvchildren) =- children_ _childrenOinhMap _childrenOrulemap _childrenOsynMap + children_ _childrenOinhMap _childrenOrulemap _childrenOsynMap ( _rulesIvrules) =- rules_ - in ( _lhsOvprod))) )+ rules_+ in ( _lhsOvprod)))) -- Productions ------------------------------------------------- {- visit 0:@@ -1172,26 +1172,26 @@ alternative Nil: -} -- cata-sem_Productions :: Productions ->- T_Productions -sem_Productions list =- (Prelude.foldr sem_Productions_Cons sem_Productions_Nil (Prelude.map sem_Production list) )+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 Identifier Attributes) ->- (Map Identifier Attributes) ->- ( ([VisageProduction])))-data Inh_Productions = Inh_Productions {inhMap_Inh_Productions :: (Map Identifier Attributes),synMap_Inh_Productions :: (Map Identifier Attributes)}-data Syn_Productions = Syn_Productions {vprods_Syn_Productions :: ([VisageProduction])}-wrap_Productions :: T_Productions ->- Inh_Productions ->- Syn_Productions -wrap_Productions (T_Productions sem ) (Inh_Productions _lhsIinhMap _lhsIsynMap ) =- (let ( _lhsOvprods) = sem _lhsIinhMap _lhsIsynMap - in (Syn_Productions _lhsOvprods ))-sem_Productions_Cons :: T_Production ->- T_Productions ->- T_Productions -sem_Productions_Cons (T_Production hd_ ) (T_Productions tl_ ) =+newtype T_Productions = T_Productions ((Map Identifier Attributes) ->+ (Map Identifier Attributes) ->+ ( ([VisageProduction])))+data Inh_Productions = Inh_Productions {inhMap_Inh_Productions :: (Map Identifier Attributes),synMap_Inh_Productions :: (Map Identifier Attributes)}+data Syn_Productions = Syn_Productions {vprods_Syn_Productions :: ([VisageProduction])}+wrap_Productions :: T_Productions ->+ Inh_Productions ->+ Syn_Productions+wrap_Productions (T_Productions sem) (Inh_Productions _lhsIinhMap _lhsIsynMap) =+ (let ( _lhsOvprods) = sem _lhsIinhMap _lhsIsynMap+ in (Syn_Productions _lhsOvprods))+sem_Productions_Cons :: T_Production ->+ T_Productions ->+ T_Productions+sem_Productions_Cons (T_Production hd_) (T_Productions tl_) = (T_Productions (\ _lhsIinhMap _lhsIsynMap -> (let _lhsOvprods :: ([VisageProduction])@@ -1205,39 +1205,39 @@ _lhsOvprods = ({-# LINE 104 "src-ag/TfmToVisage.ag" #-} _hdIvprod : _tlIvprods- {-# LINE 1209 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1209 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _hdOinhMap = ({-# LINE 12 "src-ag/DistChildAttr.ag" #-} _lhsIinhMap- {-# LINE 1215 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1215 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _hdOsynMap = ({-# LINE 12 "src-ag/DistChildAttr.ag" #-} _lhsIsynMap- {-# LINE 1221 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1221 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _tlOinhMap = ({-# LINE 12 "src-ag/DistChildAttr.ag" #-} _lhsIinhMap- {-# LINE 1227 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1227 "dist/build/TfmToVisage" #-} ) -- copy rule (down) _tlOsynMap = ({-# LINE 12 "src-ag/DistChildAttr.ag" #-} _lhsIsynMap- {-# LINE 1233 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1233 "dist/build/TfmToVisage" #-} ) ( _hdIvprod) =- hd_ _hdOinhMap _hdOsynMap + hd_ _hdOinhMap _hdOsynMap ( _tlIvprods) =- tl_ _tlOinhMap _tlOsynMap - in ( _lhsOvprods))) )-sem_Productions_Nil :: T_Productions -sem_Productions_Nil =+ tl_ _tlOinhMap _tlOsynMap+ in ( _lhsOvprods))))+sem_Productions_Nil :: T_Productions+sem_Productions_Nil = (T_Productions (\ _lhsIinhMap _lhsIsynMap -> (let _lhsOvprods :: ([VisageProduction])@@ -1245,9 +1245,9 @@ _lhsOvprods = ({-# LINE 106 "src-ag/TfmToVisage.ag" #-} []- {-# LINE 1249 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1249 "dist/build/TfmToVisage" #-} )- in ( _lhsOvprods))) )+ in ( _lhsOvprods)))) -- Rule -------------------------------------------------------- {- visit 0:@@ -1267,23 +1267,23 @@ child eager : {Bool} -} -- cata-sem_Rule :: Rule ->- T_Rule -sem_Rule (Rule _mbName _pattern _rhs _owrt _origin _explicit _pure _identity _mbError _eager ) =- (sem_Rule_Rule _mbName (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin _explicit _pure _identity _mbError _eager )+sem_Rule :: Rule ->+ T_Rule+sem_Rule (Rule _mbName _pattern _rhs _owrt _origin _explicit _pure _identity _mbError _eager) =+ (sem_Rule_Rule _mbName (sem_Pattern _pattern) (sem_Expression _rhs) _owrt _origin _explicit _pure _identity _mbError _eager) -- semantic domain-newtype T_Rule = T_Rule (( VisageRule))-data Inh_Rule = Inh_Rule {}-data Syn_Rule = Syn_Rule {vrule_Syn_Rule :: VisageRule}-wrap_Rule :: T_Rule ->- Inh_Rule ->- Syn_Rule -wrap_Rule (T_Rule sem ) (Inh_Rule ) =- (let ( _lhsOvrule) = sem - in (Syn_Rule _lhsOvrule ))+newtype T_Rule = T_Rule (( VisageRule))+data Inh_Rule = Inh_Rule {}+data Syn_Rule = Syn_Rule {vrule_Syn_Rule :: VisageRule}+wrap_Rule :: T_Rule ->+ Inh_Rule ->+ Syn_Rule+wrap_Rule (T_Rule sem) (Inh_Rule) =+ (let ( _lhsOvrule) = sem+ in (Syn_Rule _lhsOvrule)) sem_Rule_Rule :: (Maybe Identifier) ->- T_Pattern ->- T_Expression ->+ T_Pattern ->+ T_Expression -> Bool -> String -> Bool ->@@ -1291,25 +1291,25 @@ Bool -> (Maybe Error) -> Bool ->- T_Rule -sem_Rule_Rule mbName_ (T_Pattern pattern_ ) (T_Expression rhs_ ) owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_ =+ T_Rule+sem_Rule_Rule mbName_ (T_Pattern pattern_) (T_Expression rhs_) owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_ = (T_Rule (let _lhsOvrule :: VisageRule- _patternIcopy :: Pattern + _patternIcopy :: Pattern _patternIfieldattrs :: ( [(Identifier,Identifier)] )- _patternIself :: Pattern + _patternIself :: Pattern _patternIvpat :: VisagePattern- _rhsIself :: Expression + _rhsIself :: Expression -- "src-ag/TfmToVisage.ag"(line 129, column 11) _lhsOvrule = ({-# LINE 129 "src-ag/TfmToVisage.ag" #-} VRule _patternIfieldattrs undefined _patternIvpat _rhsIself owrt_- {-# LINE 1307 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1307 "dist/build/TfmToVisage" #-} ) ( _patternIcopy,_patternIfieldattrs,_patternIself,_patternIvpat) =- pattern_ + pattern_ ( _rhsIself) =- rhs_ - in ( _lhsOvrule)) )+ rhs_+ in ( _lhsOvrule))) -- Rules ------------------------------------------------------- {- visit 0:@@ -1322,24 +1322,24 @@ alternative Nil: -} -- cata-sem_Rules :: Rules ->- T_Rules -sem_Rules list =- (Prelude.foldr sem_Rules_Cons sem_Rules_Nil (Prelude.map sem_Rule list) )+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 (( ([VisageRule])))-data Inh_Rules = Inh_Rules {}-data Syn_Rules = Syn_Rules {vrules_Syn_Rules :: ([VisageRule])}-wrap_Rules :: T_Rules ->- Inh_Rules ->- Syn_Rules -wrap_Rules (T_Rules sem ) (Inh_Rules ) =- (let ( _lhsOvrules) = sem - in (Syn_Rules _lhsOvrules ))-sem_Rules_Cons :: T_Rule ->- T_Rules ->- T_Rules -sem_Rules_Cons (T_Rule hd_ ) (T_Rules tl_ ) =+newtype T_Rules = T_Rules (( ([VisageRule])))+data Inh_Rules = Inh_Rules {}+data Syn_Rules = Syn_Rules {vrules_Syn_Rules :: ([VisageRule])}+wrap_Rules :: T_Rules ->+ Inh_Rules ->+ Syn_Rules+wrap_Rules (T_Rules sem) (Inh_Rules) =+ (let ( _lhsOvrules) = sem+ in (Syn_Rules _lhsOvrules))+sem_Rules_Cons :: T_Rule ->+ T_Rules ->+ T_Rules+sem_Rules_Cons (T_Rule hd_) (T_Rules tl_) = (T_Rules (let _lhsOvrules :: ([VisageRule]) _hdIvrule :: VisageRule _tlIvrules :: ([VisageRule])@@ -1347,23 +1347,23 @@ _lhsOvrules = ({-# LINE 124 "src-ag/TfmToVisage.ag" #-} _hdIvrule : _tlIvrules- {-# LINE 1351 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1351 "dist/build/TfmToVisage" #-} ) ( _hdIvrule) =- hd_ + hd_ ( _tlIvrules) =- tl_ - in ( _lhsOvrules)) )-sem_Rules_Nil :: T_Rules -sem_Rules_Nil =+ tl_+ in ( _lhsOvrules)))+sem_Rules_Nil :: T_Rules+sem_Rules_Nil = (T_Rules (let _lhsOvrules :: ([VisageRule]) -- "src-ag/TfmToVisage.ag"(line 125, column 17) _lhsOvrules = ({-# LINE 125 "src-ag/TfmToVisage.ag" #-} []- {-# LINE 1365 "src-ag/TfmToVisage.hs" #-}+ {-# LINE 1365 "dist/build/TfmToVisage" #-} )- in ( _lhsOvrules)) )+ in ( _lhsOvrules))) -- TypeSig ----------------------------------------------------- {- alternatives:@@ -1372,26 +1372,26 @@ child tp : {Type} -} -- cata-sem_TypeSig :: TypeSig ->- T_TypeSig -sem_TypeSig (TypeSig _name _tp ) =- (sem_TypeSig_TypeSig _name _tp )+sem_TypeSig :: TypeSig ->+ T_TypeSig+sem_TypeSig (TypeSig _name _tp) =+ (sem_TypeSig_TypeSig _name _tp) -- semantic domain-newtype T_TypeSig = T_TypeSig (( ))-data Inh_TypeSig = Inh_TypeSig {}-data Syn_TypeSig = Syn_TypeSig {}-wrap_TypeSig :: T_TypeSig ->- Inh_TypeSig ->- Syn_TypeSig -wrap_TypeSig (T_TypeSig sem ) (Inh_TypeSig ) =- (let ( ) = sem - in (Syn_TypeSig ))+newtype T_TypeSig = T_TypeSig (( ))+data Inh_TypeSig = Inh_TypeSig {}+data Syn_TypeSig = Syn_TypeSig {}+wrap_TypeSig :: T_TypeSig ->+ Inh_TypeSig ->+ Syn_TypeSig+wrap_TypeSig (T_TypeSig sem) (Inh_TypeSig) =+ (let ( ) = sem+ in (Syn_TypeSig)) sem_TypeSig_TypeSig :: Identifier -> Type ->- T_TypeSig -sem_TypeSig_TypeSig name_ tp_ =- (T_TypeSig (let - in ( )) )+ T_TypeSig+sem_TypeSig_TypeSig name_ tp_ =+ (T_TypeSig (let+ in ( ))) -- TypeSigs ---------------------------------------------------- {- alternatives:@@ -1401,27 +1401,27 @@ alternative Nil: -} -- cata-sem_TypeSigs :: TypeSigs ->- T_TypeSigs -sem_TypeSigs list =- (Prelude.foldr sem_TypeSigs_Cons sem_TypeSigs_Nil (Prelude.map sem_TypeSig list) )+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 (( ))-data Inh_TypeSigs = Inh_TypeSigs {}-data Syn_TypeSigs = Syn_TypeSigs {}-wrap_TypeSigs :: T_TypeSigs ->- Inh_TypeSigs ->- Syn_TypeSigs -wrap_TypeSigs (T_TypeSigs sem ) (Inh_TypeSigs ) =- (let ( ) = sem - in (Syn_TypeSigs ))-sem_TypeSigs_Cons :: T_TypeSig ->- T_TypeSigs ->- T_TypeSigs -sem_TypeSigs_Cons (T_TypeSig hd_ ) (T_TypeSigs tl_ ) =- (T_TypeSigs (let - in ( )) )-sem_TypeSigs_Nil :: T_TypeSigs -sem_TypeSigs_Nil =- (T_TypeSigs (let - in ( )) )+newtype T_TypeSigs = T_TypeSigs (( ))+data Inh_TypeSigs = Inh_TypeSigs {}+data Syn_TypeSigs = Syn_TypeSigs {}+wrap_TypeSigs :: T_TypeSigs ->+ Inh_TypeSigs ->+ Syn_TypeSigs+wrap_TypeSigs (T_TypeSigs sem) (Inh_TypeSigs) =+ (let ( ) = sem+ in (Syn_TypeSigs))+sem_TypeSigs_Cons :: T_TypeSig ->+ T_TypeSigs ->+ T_TypeSigs+sem_TypeSigs_Cons (T_TypeSig hd_) (T_TypeSigs tl_) =+ (T_TypeSigs (let+ in ( )))+sem_TypeSigs_Nil :: T_TypeSigs+sem_TypeSigs_Nil =+ (T_TypeSigs (let+ in ( )))
src-derived/Transform.hs view
@@ -1,8061 +1,8003 @@ --- UUAGC 0.9.39.1.0 (src-ag/Transform.ag)-module Transform where-{-# LINE 8 "src-ag/Transform.ag" #-}--import Control.Monad(mplus,mzero)-import Data.List (partition, elem, nub,intersperse, union)-import Data.Maybe-import qualified Data.Map as Map-import Data.Map (Map)-import Data.Set as Set (Set, member, union, toList, fromList, empty, singleton, member, unions, size, fold, intersection, difference, insert, elems)-import qualified Data.Sequence as Seq-import Data.Sequence(Seq, empty, (><),fromList)-import Data.Foldable(toList)-import UU.Scanner.Position(noPos)--import ConcreteSyntax-import AbstractSyntax-import ErrorMessages-import Patterns (Patterns(..),Pattern(..))-import Expression (Expression(..))-import HsToken--import Options-import CommonTypes-import RhsCheck-import Debug.Trace-{-# LINE 30 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 2 "src-ag/ConcreteSyntax.ag" #-}--import UU.Scanner.Position (Pos)-import Patterns (Pattern)-import Expression (Expression)-import CommonTypes-import Macro --marcos-{-# LINE 39 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 2 "src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 46 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}-{-# LINE 106 "src-ag/Transform.ag" #-}-type DefinedSets = Map Identifier (Set NontermIdent) -{-# LINE 49 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 126 "src-ag/Transform.ag" #-}-type FieldMap = [(Identifier, Type)] -{-# LINE 53 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 127 "src-ag/Transform.ag" #-}-type DataTypes = Map.Map NontermIdent (Map.Map ConstructorIdent FieldMap) -{-# LINE 57 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 150 "src-ag/Transform.ag" #-}-type AttrName = (Identifier,Identifier) -{-# LINE 61 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 151 "src-ag/Transform.ag" #-}-type RuleInfo = (Maybe Identifier, [AttrName]->Pattern, Expression, [AttrName], Bool, String, Bool, Bool) -{-# LINE 65 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 152 "src-ag/Transform.ag" #-}-type SigInfo = (Identifier,Type) -{-# LINE 69 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 153 "src-ag/Transform.ag" #-}-type UniqueInfo = (Identifier,Identifier) -{-# LINE 73 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 154 "src-ag/Transform.ag" #-}-type AugmentInfo = (Identifier,Expression)-{-# LINE 77 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 155 "src-ag/Transform.ag" #-}-type AroundInfo = (Identifier,Expression)-{-# LINE 81 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 156 "src-ag/Transform.ag" #-}-type MergeInfo = (Identifier, Identifier, [Identifier], Expression)-{-# LINE 85 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 205 "src-ag/Transform.ag" #-}---checkDuplicate :: (Identifier -> Identifier -> Error)- -> Identifier -> val -> Map Identifier val -> (Map Identifier val,Seq Error)-checkDuplicate dupError key val m- = case Map.lookupIndex key m of- Just ix -> let (key',_) = Map.elemAt ix m- in (m,Seq.singleton (dupError key key'))- Nothing -> (Map.insert key val m,Seq.empty)--checkDuplicates :: (Identifier -> Identifier -> Error)- -> [(Identifier, val)] -> Map Identifier val -> (Map Identifier val,Seq Error)-checkDuplicates dupError new m = foldErrors check m new- where check = uncurry (checkDuplicate dupError)--foldErrors 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) = partition (equalId x) xs- in map (err x) same ++ checkForDuplicates err other--equalId :: Identifier -> Identifier -> Bool-equalId x y = getName x == getName y--{-# LINE 116 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 351 "src-ag/Transform.ag" #-}--type RulesAndErrors = ([Rule], Seq Error)-type SigsAndErrors = ([TypeSig], Seq Error)-type InstsAndErrors = ([(Identifier, Type)], Seq Error)-type UniquesAndErrors = (Map Identifier Identifier, Seq Error)-type AugmentsAndErrors = (Map Identifier [Expression], Seq Error)-type AroundsAndErrors = (Map Identifier [Expression], Seq Error)-type MergesAndErrors = (Map Identifier (Identifier, [Identifier], Expression), Seq Error)-type AttrOverwrite = Map AttrName Bool-type AccumRuleCheck = (RulesAndErrors, AttrOverwrite)-type AccumDefiCheck = (Seq Error, AttrOverwrite, [AttrName], [AttrName])--checkRules :: Map NontermIdent (Attributes, Attributes) -> Map NontermIdent (Map ConstructorIdent FieldMap) ->- Map NontermIdent (Map ConstructorIdent [Identifier]) -> Map NontermIdent (Map ConstructorIdent [SigInfo]) ->- Map NontermIdent (Map ConstructorIdent [MergeInfo]) ->- NontermIdent -> ConstructorIdent -> [RuleInfo] -> RulesAndErrors-checkRules attributes fields allinsts allsigs allmerges nt con rs- = let fieldmap :: FieldMap- fieldmap = (_LHS, NT nt [] False) : (_LOC, NT nullIdent [] False) : (_INST, NT nullIdent [] False) : (_FIRST, NT nullIdent [] False) : (_LAST, NT nullIdent [] False)- : Map.findWithDefault [] con (Map.findWithDefault Map.empty nt fields)- ++ mapMaybe (\instNm -> lookup instNm sigs >>= \tp -> return (instNm, tp)) (Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allinsts))- -- merged children are not allowed to have any inherited attrs defined: do not include-- sigs = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allsigs)-- hasAttrib f tp attr = Map.member attr (f (Map.findWithDefault (Map.empty,Map.empty) tp attributes))-- checkRule :: RuleInfo -> AccumRuleCheck -> AccumRuleCheck- checkRule (mbNm, pat,exp,as,owrt,str, pur, eager) ((r1,e1),m1)- = let (e2,m2,u2,b2) = foldr (checkDefi owrt) (e1,m1,[],[]) as- in ( (Rule mbNm (pat u2) exp owrt str True pur False Nothing eager : r1, e2), m2)-- checkDefi :: Bool -> AttrName -> AccumDefiCheck -> AccumDefiCheck- checkDefi owrt fa@(field,attr) (e,m,u,bs)- = case lookup field fieldmap- of Just (NT tp _ _) ->- let tp' = maybe tp id (deforestedNt tp)- in if field == _LOC || field == _INST || field == _FIRST || field == _LAST- || hasAttrib (if getName field==getName _LHS then snd else fst) tp' attr- then case Map.lookupIndex fa m of- Just ix -> let ((_,attr2),b) = Map.elemAt ix m- in if b && not (fa `elem` bs)- then ( e, Map.insert fa owrt m, fa:u, fa:bs)- else (((Seq.<|)) (DupRule nt con field attr2 attr) e, m, fa:u, bs)- Nothing -> ( e, Map.insert fa owrt m, u, fa:bs)- else (((Seq.<|)) (SuperfluousRule nt con field attr) e, m, fa:u, bs)- _ -> (((Seq.<|)) (UndefChild nt con field) e, m, fa:u, bs )-- in fst (foldr checkRule (([],Seq.empty),Map.empty) rs)--checkRuleNames :: NontermIdent -> ConstructorIdent -> [RuleInfo] -> Seq Error-checkRuleNames nt con- = fst . foldr checkRule (Seq.empty, Set.empty)- where- checkRule (Just nm,_,_,_,_,_,_,_) (errs, nms)- | nm `Set.member` nms = (DupRuleName nt con nm Seq.<| errs, nms)- | otherwise = (errs, Set.insert nm nms)- checkRule (Nothing,_,_,_,_,_,_,_) inp = inp--checkSigs :: NontermIdent -> ConstructorIdent -> [SigInfo] -> SigsAndErrors-checkSigs nt con sis- = let checkSig (ide,typ) (sigs,errs)- = if ide `elem` map (\(TypeSig n 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 args _) ->- case findInst k insts of- Just k' -> (insts, Seq.singleton (DupChild nt con k k') >< errs)- Nothing -> case nm `Set.member` allNts of- True -> (info : insts, errs)- False | take 2 (getName nm) == "T_" -> let nm' = Ident (drop 2 (getName nm)) (getPos nm)- info' = (k, NT nm' args True) -- this should be the only place at which 'for' with value True can be generated- in case nm' `Set.member` allNts of- True -> (info' : insts, errs)- False -> (insts, Seq.singleton (UndefNont nm') >< errs)- | otherwise -> (insts, Seq.singleton (UndefNont nm) >< errs)- )- $ findSig inst- ) ([], Seq.empty)- where- sigs = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt sigMap)-- findSig name- = do tp@(NT _ _ _) <- lookup name sigs- return (name, tp)-- findInst _ [] = Nothing- findInst k ((k', _): r)- | k == k' = Just k'- | otherwise = findInst k r--checkUniques :: Map NontermIdent (Attributes, Attributes) -> NontermIdent -> ConstructorIdent -> [UniqueInfo] -> UniquesAndErrors-checkUniques allAttrs nt con uniques- = let checkUnique (ident,ref) (us,errs)- = if ident `Map.member` us- then (us, ((Seq.<|)) (DupUnique nt con ident) errs)- else if Map.member ref inhs && Map.member ref syns- then (Map.insert ident ref us, errs)- else (us, ((Seq.<|)) (MissingUnique nt ref) errs)-- (inhs,syns) = Map.findWithDefault (Map.empty,Map.empty) nt allAttrs- in foldr checkUnique (Map.empty, Seq.empty) uniques--checkAugments :: Map NontermIdent (Attributes, Attributes) -> NontermIdent -> ConstructorIdent -> [AugmentInfo] -> AugmentsAndErrors-checkAugments allAttrs nt con augments- = let checkAugment (ident,expr) (as,errs)- = if ident `Map.member` as- then (Map.update (\vs -> Just (vs ++ [expr])) ident as, errs)- else if Map.member ident syns- then (Map.insert ident [expr] as, errs)- else (as, ((Seq.<|)) (MissingSyn nt ident) errs)-- (inhs,syns) = Map.findWithDefault (Map.empty,Map.empty) nt allAttrs- in foldr checkAugment (Map.empty, Seq.empty) augments--checkArounds :: Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> NontermIdent -> ConstructorIdent -> [AroundInfo] -> AroundsAndErrors-checkArounds fieldMap nt con arounds- = let checkAround (ident,expr) (as,errs)- = if ident `Map.member` as- then (Map.update (\vs -> Just (vs ++ [expr])) ident as, errs)- else case lookup ident fields of- Just (NT _ _ _) -> (Map.insert ident [expr] as, errs)- _ -> (as, ((Seq.<|)) (UndefChild nt con ident) errs)- fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt fieldMap)- in foldr checkAround (Map.empty, Seq.empty) arounds--checkMerges :: Set NontermIdent -> Map NontermIdent (Map ConstructorIdent [Identifier]) -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> NontermIdent -> ConstructorIdent -> [MergeInfo] -> MergesAndErrors-checkMerges allNts allInsts fieldMap nt con merges- = let checkMerge (target,nt,sources,expr) (m,errs)- = let fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt fieldMap)- insts = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allInsts)- allFields = insts ++ map fst fields -- note: sources of merge may not contain a target (for simplicity)- in if target `Map.member` m -- check for duplicate with self- then (m, DupChild nt con target (fst $ Map.elemAt (Map.findIndex target m) m) Seq.<| errs)- else if target `elem` allFields- then (m, DupChild nt con target (head $ filter (== target) allFields) Seq.<| errs)- else let missing = filter (\s -> not (s `elem` allFields)) sources- in if null missing- then if nt `Set.member` allNts -- check if the nonterm is defined- then (Map.insert target (nt, sources, expr) m, errs) -- all ok..- else (m, UndefNont nt Seq.<| errs)- else (m, (Seq.fromList $ map (UndefChild nt con) missing) Seq.>< errs)- in foldr checkMerge (Map.empty, Seq.empty) merges--unionunionplusplus = Map.unionWith (Map.unionWith (++))-{-# LINE 272 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 507 "src-ag/Transform.ag" #-}--mkUniqueRules :: Options -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> Map NontermIdent (Attributes,Attributes) -> NontermIdent -> ConstructorIdent -> Map Identifier Identifier -> [Rule]-mkUniqueRules opts allFields allInsts allAttrDecls nt con usMap- = map apply groups- where- fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allFields)- ++ Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allInsts)- -- may have duplicates-- groups = Map.assocs $ Map.foldrWithKey (\i r m -> Map.insertWith (++) r [i] m) Map.empty usMap- apply (ref,us) = mkRule ref (findOutField ref) us- findOutField ref = case [ chld | (chld, NT tp _ _) <- fields, tp `hasSyn` ref] of- [] -> _LHS- (x:_) -> x- hasSyn tp ref = Map.member ref $ snd $ Map.findWithDefault (Map.empty,Map.empty) tp allAttrDecls- mkRule ref outFld locAttrs- = let 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 True False Nothing 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 "let __cont = " ++ [AGField _LHS ref noPos Nothing] ++ h " in seq __cont ( " ++ inp ++ h " )"-{-# LINE 301 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 732 "src-ag/Transform.ag" #-}--flattenDatas :: DataTypes -> Map NontermIdent (Set NontermIdent)-flattenDatas ds = Map.map flatten ds- where flatten cs = Set.fromList [ nt | (_, NT nt _ _) <- concatMap snd (Map.toList cs)]--reachableFrom :: Map NontermIdent (Set NontermIdent) -> Set NontermIdent -> Set NontermIdent-reachableFrom table 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 326 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 857 "src-ag/Transform.ag" #-}--extract s = case dropWhile isSeparator s of- "" -> []- s' -> w : extract s''- where (w, s'') = break isSeparator s'-isSeparator x = x == '_'-{-# LINE 335 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 881 "src-ag/Transform.ag" #-}--pragmaMapUnion :: PragmaMap -> PragmaMap -> PragmaMap-pragmaMapUnion = Map.unionWith (Map.unionWith Set.union)--pragmaMapSingle :: NontermIdent -> ConstructorIdent -> Set Identifier -> PragmaMap-pragmaMapSingle nt con nms = Map.singleton nt (Map.singleton con nms)-{-# LINE 344 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 913 "src-ag/Transform.ag" #-}--orderMapUnion :: AttrOrderMap -> AttrOrderMap -> AttrOrderMap-orderMapUnion = Map.unionWith (Map.unionWith Set.union)--orderMapSingle :: NontermIdent -> ConstructorIdent -> Set Dependency -> AttrOrderMap-orderMapSingle nt con deps = Map.singleton nt (Map.singleton con deps)-{-# LINE 353 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 939 "src-ag/Transform.ag" #-}--mergeParams :: ParamMap -> ParamMap -> ParamMap-mergeParams = Map.unionWith (++)-{-# LINE 359 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 962 "src-ag/Transform.ag" #-}--mergeCtx :: ContextMap -> ContextMap -> ContextMap-mergeCtx- = Map.unionWith nubconcat- where nubconcat a b = nub (a ++ b)-{-# LINE 367 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 981 "src-ag/Transform.ag" #-}--mergeQuant :: QuantMap -> QuantMap -> QuantMap-mergeQuant = Map.unionWith (++)-{-# LINE 373 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 992 "src-ag/Transform.ag" #-}--mergeDerivings m1 m2 = foldr (\(n,cs) m -> Map.insertWith Set.union n cs m) m2 (Map.toList m1)-{-# LINE 378 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 1003 "src-ag/Transform.ag" #-}--merge x y = foldr f y (Map.toList x)- where f ~(k,v) m = Map.insertWith (Map.union) k v m-{-# LINE 384 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 1045 "src-ag/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 394 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 1056 "src-ag/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) Self eSyn)atMap-{-# LINE 400 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 1197 "src-ag/Transform.ag" #-}--makeType :: Set NontermIdent -> Type -> Type-makeType nts tp@(NT x _ _) | Set.member x nts = tp- | otherwise = Haskell (typeToHaskellString Nothing [] tp)-makeType _ tp = tp-{-# LINE 408 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 1203 "src-ag/Transform.ag" #-}--constructGrammar :: Set NontermIdent- -> ParamMap- -> Map NontermIdent (Map ConstructorIdent (Set Identifier))- -> DataTypes- -> Map NontermIdent (Map ConstructorIdent [Type])- -> Map NontermIdent (Attributes, Attributes)- -> Map NontermIdent (Map Identifier (String, String, String))- -> Derivings- -> Set NontermIdent- -> Map NontermIdent (Map ConstructorIdent [Rule])- -> Map NontermIdent (Map ConstructorIdent [TypeSig])- -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)])- -> TypeSyns- -> PragmaMap- -> AttrOrderMap- -> ContextMap- -> QuantMap- -> UniqueMap- -> Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- -> Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- -> Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))- -> Map NontermIdent (Map ConstructorIdent MaybeMacro)- -> Grammar--constructGrammar nts ntParams prodParams gram constraints attrs uses derivings wrappers allrules tsigs allinsts tsyns pragmaMap orderMap contextMap quantMap uniqueMap augmentsMap aroundsMap mergeMap macros =- let gr = [ (nt,Map.toList alts) | (nt,alts) <- Map.toList gram]- nonts = map nont gr- nont (nt,alts) = let (inh,syn) = Map.findWithDefault (Map.empty,Map.empty) nt attrs- rmap = Map.findWithDefault Map.empty nt allrules- tsmap = Map.findWithDefault Map.empty nt tsigs- instsmap = Map.findWithDefault Map.empty nt allinsts- params = Map.findWithDefault [] nt ntParams- mergemap = Map.findWithDefault Map.empty nt mergeMap- macromap = Map.findWithDefault Map.empty nt macros- csmap = Map.findWithDefault Map.empty nt constraints- psmap = Map.findWithDefault Map.empty nt prodParams- alt (con,flds) =- let rules = Map.findWithDefault [] con rmap- tsigs = Map.findWithDefault [] con tsmap- insts = Map.findWithDefault [] con instsmap- merges = [ (n, NT t [] False) | (n, (t, _, _)) <- Map.assocs $ maybe Map.empty id (Map.lookup con mergemap) ]- cs = Map.findWithDefault [] con csmap- ps = Set.elems $ Map.findWithDefault Set.empty con psmap- mbMacro = Map.findWithDefault Nothing con macromap-- -- important: keep order of children- cldrn = map child (flds ++ filter (not . existsAsField) insts ++ merges)- child (nm, tp) =- let tpI = if existsAsInst nm- then fromJust $ lookup nm insts- else tp- virt = if existsAsInst nm- then case lookup nm flds of- Just tp' -> ChildReplace tp'- Nothing -> ChildAttr- else if existsAsMerge nm- then ChildAttr- else ChildSyntax- in Child nm tpI virt- existsAsInst nm = maybe False (const True) (lookup nm insts)- existsAsField (nm,_) = maybe False (const True) (lookup nm flds)- existsAsMerge nm = maybe False (const True) (lookup nm merges)- in Production con ps cs cldrn rules tsigs mbMacro- in Nonterminal nt params inh syn (map alt alts)- in Grammar tsyns uses derivings wrappers nonts pragmaMap orderMap ntParams contextMap quantMap uniqueMap augmentsMap aroundsMap mergeMap-{-# LINE 477 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--{-# LINE 1271 "src-ag/Transform.ag" #-}--mapUnionWithSetUnion = Map.unionWith Set.union-mapUnionWithPlusPlus = Map.unionWith (++)-{-# LINE 483 "dist/build/uuagc/uuagc-tmp/Transform.hs" #-}--- AG -----------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attributes:- agi : (Set NontermIdent, DataTypes, Map NontermIdent (Attributes, 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 allConstraints : _- local allConParams : _- local allConstrs : _- local allRules : _- local allSigs : _- local allInsts : _- local allUniques : _- local allAugments : _- local allArounds : _- local allMerges : _- local augmentSigs : _- local allRulesErrs : _- local allNamesErrs : _- local allSigsErrs : _- local allInstsErrs : _- local allUniquesErrs : _- local allAugmentErrs : _- local allAroundsErrs : _- local allMergesErrs : _- local checkedRulesPre : _- local checkedSigs : _- local checkedInsts : _- local checkedUniques : _- local checkedAugments : _- local checkedArounds : _- local checkedRules : _- local checkedMerges : _- local errs1 : _- local errs2 : _- local errs3 : _- local errs4 : _- local errs5 : _- local errs6 : _- local errs7 : _- local errs8 : _- local errs9 : _- local errs10 : _- local errs11 : _- local allNonterminals : _- local allAttrDecls : _- local allMacros : _- local allAttrs : _--}--- cata-sem_AG :: AG ->- T_AG -sem_AG (AG _elems ) =- (sem_AG_AG (sem_Elems _elems ) )--- semantic domain-newtype T_AG = T_AG (Options ->- ( ((Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes))),Blocks,(Seq Error),(Maybe (String,String,String)),Grammar,(Options -> Options)))-data Inh_AG = Inh_AG {options_Inh_AG :: !(Options)}-data Syn_AG = Syn_AG {agi_Syn_AG :: !(((Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes)))),blocks_Syn_AG :: !(Blocks),errors_Syn_AG :: !((Seq Error)),moduleDecl_Syn_AG :: !((Maybe (String,String,String))),output_Syn_AG :: !(Grammar),pragmas_Syn_AG :: !((Options -> Options))}-wrap_AG :: T_AG ->- Inh_AG ->- Syn_AG -wrap_AG (T_AG sem ) (Inh_AG _lhsIoptions ) =- (let ( _lhsOagi,_lhsOblocks,_lhsOerrors,_lhsOmoduleDecl,_lhsOoutput,_lhsOpragmas) = sem _lhsIoptions - in (Syn_AG _lhsOagi _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))- _lhsOagi :: ((Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes)))- _elemsOattrs :: (Map NontermIdent (Attributes, Attributes))- _lhsOblocks :: Blocks- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOpragmas :: (Options -> Options)- _elemsOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))- _elemsOallAttrs :: (Map NontermIdent (Attributes, Attributes))- _elemsOallFields :: DataTypes- _elemsOallNonterminals :: (Set NontermIdent)- _elemsOoptions :: Options- _elemsIattrDecls :: (Map NontermIdent (Attributes, Attributes))- _elemsIattrOrderCollect :: AttrOrderMap- _elemsIattrs :: (Map NontermIdent (Attributes, Attributes))- _elemsIblocks :: Blocks- _elemsIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _elemsIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _elemsIcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _elemsIcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _elemsIcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _elemsIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _elemsIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _elemsIcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _elemsIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _elemsIcollectedNames :: (Set Identifier)- _elemsIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _elemsIcollectedSetNames :: (Set Identifier)- _elemsIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _elemsIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _elemsIctxCollect :: ContextMap- _elemsIdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _elemsIderivings :: Derivings- _elemsIerrors :: (Seq Error)- _elemsImoduleDecl :: (Maybe (String,String,String))- _elemsIparamsCollect :: ParamMap- _elemsIpragmas :: (Options -> Options)- _elemsIquantCollect :: QuantMap- _elemsIsemPragmasCollect :: PragmaMap- _elemsItypeSyns :: TypeSyns- _elemsIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _elemsIwrappers :: (Set NontermIdent)- -- "src-ag/Transform.ag"(line 53, column 8)- _lhsOoutput =- ({-# LINE 53 "src-ag/Transform.ag" #-}- constructGrammar _allNonterminals- _elemsIparamsCollect- _allConParams- _allFields- _allConstraints- _allAttrDecls- _elemsIuseMap- _elemsIderivings- (if wrappers _lhsIoptions then _allNonterminals else _elemsIwrappers)- _checkedRules- _checkedSigs- _checkedInsts- _elemsItypeSyns- _elemsIsemPragmasCollect- _elemsIattrOrderCollect- _elemsIctxCollect- _elemsIquantCollect- _checkedUniques- _checkedAugments- _checkedArounds- _checkedMerges- _allMacros- {-# LINE 635 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 260, column 10)- _allFields =- ({-# LINE 260 "src-ag/Transform.ag" #-}- let f (nt,con,fm) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con fm)- in foldr f (Map.empty) _elemsIcollectedFields- {-# LINE 642 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 263, column 10)- _allConstraints =- ({-# LINE 263 "src-ag/Transform.ag" #-}- let f (nt,con,fm) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con fm)- in foldr f (Map.empty) _elemsIcollectedConstraints- {-# LINE 649 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 266, column 10)- _allConParams =- ({-# LINE 266 "src-ag/Transform.ag" #-}- let f (nt,con,fm) = Map.insertWith (Map.unionWith Set.union) nt (Map.singleton con fm)- in foldr f (Map.empty) _elemsIcollectedConParams- {-# LINE 656 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 269, column 10)- _allConstrs =- ({-# LINE 269 "src-ag/Transform.ag" #-}- let f (nt,con,_) = Map.insertWith (++) nt [con]- in foldr f (Map.empty) _elemsIcollectedFields- {-# LINE 663 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 272, column 10)- _allRules =- ({-# LINE 272 "src-ag/Transform.ag" #-}- let f (nt,con,r) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con [r])- in foldr f (Map.empty) _elemsIcollectedRules- {-# LINE 670 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 275, column 10)- _allSigs =- ({-# LINE 275 "src-ag/Transform.ag" #-}- let f (nt,con,t) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con [t])- typeof nt r = Map.findWithDefault (Haskell "<unknown>") r $ fst $ Map.findWithDefault (Map.empty,Map.empty) nt _allAttrDecls- in foldr f (Map.empty) ( _elemsIcollectedSigs- ++ [ (nt, con, (ident,typeof nt ref)) | (nt, con, us) <- _elemsIcollectedUniques, (ident,ref) <- us ]- )- {-# LINE 680 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 281, column 10)- _allInsts =- ({-# LINE 281 "src-ag/Transform.ag" #-}- let f (nt,con,is) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con is)- in foldr f (Map.empty) _elemsIcollectedInsts- {-# LINE 687 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 284, column 10)- _allUniques =- ({-# LINE 284 "src-ag/Transform.ag" #-}- let f (nt,con,us) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con us)- in foldr f (Map.empty) _elemsIcollectedUniques- {-# LINE 694 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 286, column 10)- _allAugments =- ({-# LINE 286 "src-ag/Transform.ag" #-}- let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)- in foldr f Map.empty _elemsIcollectedAugments- {-# LINE 701 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 288, column 10)- _allArounds =- ({-# LINE 288 "src-ag/Transform.ag" #-}- let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)- in foldr f Map.empty _elemsIcollectedArounds- {-# LINE 708 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 290, column 10)- _allMerges =- ({-# LINE 290 "src-ag/Transform.ag" #-}- let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)- in foldr f Map.empty _elemsIcollectedMerges- {-# LINE 715 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 293, column 10)- _augmentSigs =- ({-# LINE 293 "src-ag/Transform.ag" #-}- let gen mp = []- in Map.map (Map.map gen) _allAugments- {-# LINE 722 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 296, column 10)- _allRulesErrs =- ({-# LINE 296 "src-ag/Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkRules _allAttrDecls _allFields _allInsts _allSigs _allMerges )) _allRules- {-# LINE 728 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 297, column 10)- _allNamesErrs =- ({-# LINE 297 "src-ag/Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . checkRuleNames) _allRules- {-# LINE 734 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 298, column 10)- _allSigsErrs =- ({-# LINE 298 "src-ag/Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkSigs )) _allSigs- {-# LINE 740 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 299, column 10)- _allInstsErrs =- ({-# LINE 299 "src-ag/Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkInsts _allNonterminals _allSigs _allFields )) _allInsts- {-# LINE 746 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 300, column 10)- _allUniquesErrs =- ({-# LINE 300 "src-ag/Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkUniques _allAttrDecls )) _allUniques- {-# LINE 752 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 301, column 10)- _allAugmentErrs =- ({-# LINE 301 "src-ag/Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkAugments _allAttrDecls )) _allAugments- {-# LINE 758 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 302, column 10)- _allAroundsErrs =- ({-# LINE 302 "src-ag/Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkArounds _allFields )) _allArounds- {-# LINE 764 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 303, column 10)- _allMergesErrs =- ({-# LINE 303 "src-ag/Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkMerges _allNonterminals _allInsts _allFields )) _allMerges- {-# LINE 770 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 305, column 10)- _checkedRulesPre =- ({-# LINE 305 "src-ag/Transform.ag" #-}- Map.map (Map.map fst) _allRulesErrs- {-# LINE 776 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 306, column 10)- _checkedSigs =- ({-# LINE 306 "src-ag/Transform.ag" #-}- Map.map (Map.map fst) _allSigsErrs `unionunionplusplus` _augmentSigs- {-# LINE 782 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 307, column 10)- _checkedInsts =- ({-# LINE 307 "src-ag/Transform.ag" #-}- Map.map (Map.map fst) _allInstsErrs- {-# LINE 788 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 308, column 10)- _checkedUniques =- ({-# LINE 308 "src-ag/Transform.ag" #-}- Map.map (Map.map fst) _allUniquesErrs- {-# LINE 794 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 309, column 10)- _checkedAugments =- ({-# LINE 309 "src-ag/Transform.ag" #-}- Map.map (Map.map fst) _allAugmentErrs- {-# LINE 800 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 310, column 10)- _checkedArounds =- ({-# LINE 310 "src-ag/Transform.ag" #-}- Map.map (Map.map fst) _allAroundsErrs- {-# LINE 806 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 311, column 10)- _checkedRules =- ({-# LINE 311 "src-ag/Transform.ag" #-}- Map.unionWith (Map.unionWith (++)) _checkedRulesPre (Map.mapWithKey (Map.mapWithKey . (mkUniqueRules _lhsIoptions _allFields _checkedInsts _allAttrDecls )) _checkedUniques )- {-# LINE 812 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 312, column 10)- _checkedMerges =- ({-# LINE 312 "src-ag/Transform.ag" #-}- Map.map (Map.map fst) _allMergesErrs- {-# LINE 818 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 314, column 10)- _errs1 =- ({-# LINE 314 "src-ag/Transform.ag" #-}- let f = checkForDuplicates (DupSynonym)- in Seq.fromList . f . map fst $ _elemsItypeSyns- {-# LINE 825 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 317, column 10)- _errs2 =- ({-# LINE 317 "src-ag/Transform.ag" #-}- let g nt (con,fm) = checkForDuplicates (DupChild nt con) (map fst fm)- f (nt,cfm) = concat . map (g nt) . Map.toList $ cfm- in Seq.fromList . concat . map f . Map.toList $ _allFields- {-# LINE 833 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 321, column 10)- _errs3 =- ({-# LINE 321 "src-ag/Transform.ag" #-}- let f (nt,cons) = checkForDuplicates (DupAlt nt) cons- in Seq.empty- {-# LINE 840 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 325, column 10)- _errs4 =- ({-# LINE 325 "src-ag/Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allRulesErrs- {-# LINE 847 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 328, column 10)- _errs5 =- ({-# LINE 328 "src-ag/Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allSigsErrs- {-# LINE 854 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 331, column 10)- _errs6 =- ({-# LINE 331 "src-ag/Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allInstsErrs- {-# LINE 861 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 334, column 10)- _errs7 =- ({-# LINE 334 "src-ag/Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allUniquesErrs- {-# LINE 868 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 337, column 10)- _errs8 =- ({-# LINE 337 "src-ag/Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allAugmentErrs- {-# LINE 875 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 340, column 10)- _errs9 =- ({-# LINE 340 "src-ag/Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allAroundsErrs- {-# LINE 882 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 343, column 10)- _errs10 =- ({-# LINE 343 "src-ag/Transform.ag" #-}- let f m s = Map.fold ((><)) s m- in Map.fold f Seq.empty _allNamesErrs- {-# LINE 889 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 346, column 10)- _errs11 =- ({-# LINE 346 "src-ag/Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allMergesErrs- {-# LINE 896 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 349, column 10)- _lhsOerrors =- ({-# LINE 349 "src-ag/Transform.ag" #-}- _elemsIerrors >< _errs1 >< _errs2 >< _errs3 >< _errs4 >< _errs5 >< _errs6 >< _errs7 >< _errs8 >< _errs9 >< _errs10 >< _errs11- {-# LINE 902 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 591, column 10)- _allNonterminals =- ({-# LINE 591 "src-ag/Transform.ag" #-}- _elemsIcollectedNames `Set.difference` _elemsIcollectedSetNames- {-# LINE 908 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 611, column 8)- _elemsOallConstructors =- ({-# LINE 611 "src-ag/Transform.ag" #-}- _elemsIcollectedConstructorsMap- {-# LINE 914 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 694, column 8)- _elemsOdefSets =- ({-# LINE 694 "src-ag/Transform.ag" #-}- Map.fromList (map (\x->(x,(Set.singleton x, Set.empty))) (Set.toList _allNonterminals ))- {-# LINE 920 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 695, column 8)- _elemsOdefinedSets =- ({-# LINE 695 "src-ag/Transform.ag" #-}- Map.map fst _elemsIdefSets- {-# LINE 926 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1009, column 8)- _elemsOattrDecls =- ({-# LINE 1009 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 932 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1063, column 9)- _allAttrDecls =- ({-# LINE 1063 "src-ag/Transform.ag" #-}- if withSelf _lhsIoptions- then foldr addSelf _elemsIattrDecls (Set.toList _allNonterminals )- else _elemsIattrDecls- {-# LINE 940 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1296, column 10)- _allMacros =- ({-# LINE 1296 "src-ag/Transform.ag" #-}- let f (nt,con,m) = Map.insertWith (Map.union) nt (Map.singleton con m)- in foldr f (Map.empty) _elemsIcollectedMacros- {-# LINE 947 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1309, column 8)- _lhsOagi =- ({-# LINE 1309 "src-ag/Transform.ag" #-}- (_allNonterminals ,_allFields ,_allAttrs )- {-# LINE 953 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1311, column 8)- _allAttrs =- ({-# LINE 1311 "src-ag/Transform.ag" #-}- if withSelf _lhsIoptions- then foldr addSelf _elemsIattrs (Set.toList _allNonterminals )- else _elemsIattrs- {-# LINE 961 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1319, column 9)- _elemsOattrs =- ({-# LINE 1319 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 967 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 46, column 19)- _lhsOblocks =- ({-# LINE 46 "src-ag/Transform.ag" #-}- _elemsIblocks- {-# LINE 973 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1187, column 37)- _lhsOmoduleDecl =- ({-# LINE 1187 "src-ag/Transform.ag" #-}- _elemsImoduleDecl- {-# LINE 979 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 787, column 34)- _lhsOpragmas =- ({-# LINE 787 "src-ag/Transform.ag" #-}- _elemsIpragmas- {-# LINE 985 "src-ag/Transform.hs" #-}- )- -- copy rule (from local)- _elemsOallAttrDecls =- ({-# LINE 894 "src-ag/Transform.ag" #-}- _allAttrDecls- {-# LINE 991 "src-ag/Transform.hs" #-}- )- -- copy rule (from local)- _elemsOallAttrs =- ({-# LINE 1306 "src-ag/Transform.ag" #-}- _allAttrs- {-# LINE 997 "src-ag/Transform.hs" #-}- )- -- copy rule (from local)- _elemsOallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _allFields- {-# LINE 1003 "src-ag/Transform.hs" #-}- )- -- copy rule (from local)- _elemsOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _allNonterminals- {-# LINE 1009 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _elemsOoptions =- ({-# LINE 40 "src-ag/Transform.ag" #-}- _lhsIoptions- {-# LINE 1015 "src-ag/Transform.hs" #-}- )- ( _elemsIattrDecls,_elemsIattrOrderCollect,_elemsIattrs,_elemsIblocks,_elemsIcollectedArounds,_elemsIcollectedAugments,_elemsIcollectedConParams,_elemsIcollectedConstraints,_elemsIcollectedConstructorsMap,_elemsIcollectedFields,_elemsIcollectedInsts,_elemsIcollectedMacros,_elemsIcollectedMerges,_elemsIcollectedNames,_elemsIcollectedRules,_elemsIcollectedSetNames,_elemsIcollectedSigs,_elemsIcollectedUniques,_elemsIctxCollect,_elemsIdefSets,_elemsIderivings,_elemsIerrors,_elemsImoduleDecl,_elemsIparamsCollect,_elemsIpragmas,_elemsIquantCollect,_elemsIsemPragmasCollect,_elemsItypeSyns,_elemsIuseMap,_elemsIwrappers) =- elems_ _elemsOallAttrDecls _elemsOallAttrs _elemsOallConstructors _elemsOallFields _elemsOallNonterminals _elemsOattrDecls _elemsOattrs _elemsOdefSets _elemsOdefinedSets _elemsOoptions - in ( _lhsOagi,_lhsOblocks,_lhsOerrors,_lhsOmoduleDecl,_lhsOoutput,_lhsOpragmas))) )--- Alt ----------------------------------------------------------{-- visit 0:- inherited attributes:- allConstructors : Map NontermIdent (Set ConstructorIdent)- allNonterminals : Set NontermIdent- nts : Set NontermIdent- synthesized attributes:- collectedConParams : [(NontermIdent, ConstructorIdent, Set Identifier)]- collectedConstraints : [(NontermIdent, ConstructorIdent, [Type])]- collectedConstructorNames : Set ConstructorIdent- collectedFields : [(NontermIdent, ConstructorIdent, FieldMap)]- collectedMacros : [(NontermIdent, ConstructorIdent, MaybeMacro)]- alternatives:- alternative Alt:- child pos : {Pos}- child names : ConstructorSet - child tyvars : {[Identifier]}- child fields : Fields - child macro : {MaybeMacro}--}--- cata-sem_Alt :: Alt ->- T_Alt -sem_Alt (Alt _pos _names _tyvars _fields _macro ) =- (sem_Alt_Alt _pos (sem_ConstructorSet _names ) _tyvars (sem_Fields _fields ) _macro )--- semantic domain-newtype T_Alt = T_Alt ((Map NontermIdent (Set ConstructorIdent)) ->- (Set NontermIdent) ->- (Set NontermIdent) ->- ( ([(NontermIdent, ConstructorIdent, Set Identifier)]),([(NontermIdent, ConstructorIdent, [Type])]),(Set ConstructorIdent),([(NontermIdent, ConstructorIdent, FieldMap)]),([(NontermIdent, ConstructorIdent, MaybeMacro)])))-data Inh_Alt = Inh_Alt {allConstructors_Inh_Alt :: !((Map NontermIdent (Set ConstructorIdent))),allNonterminals_Inh_Alt :: !((Set NontermIdent)),nts_Inh_Alt :: !((Set NontermIdent))}-data Syn_Alt = Syn_Alt {collectedConParams_Syn_Alt :: !(([(NontermIdent, ConstructorIdent, Set Identifier)])),collectedConstraints_Syn_Alt :: !(([(NontermIdent, ConstructorIdent, [Type])])),collectedConstructorNames_Syn_Alt :: !((Set ConstructorIdent)),collectedFields_Syn_Alt :: !(([(NontermIdent, ConstructorIdent, FieldMap)])),collectedMacros_Syn_Alt :: !(([(NontermIdent, ConstructorIdent, MaybeMacro)]))}-wrap_Alt :: T_Alt ->- Inh_Alt ->- Syn_Alt -wrap_Alt (T_Alt sem ) (Inh_Alt _lhsIallConstructors _lhsIallNonterminals _lhsInts ) =- (let ( _lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorNames,_lhsOcollectedFields,_lhsOcollectedMacros) = sem _lhsIallConstructors _lhsIallNonterminals _lhsInts - in (Syn_Alt _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros ))-sem_Alt_Alt :: Pos ->- T_ConstructorSet ->- ([Identifier]) ->- T_Fields ->- MaybeMacro ->- T_Alt -sem_Alt_Alt pos_ (T_ConstructorSet names_ ) tyvars_ (T_Fields fields_ ) macro_ =- (T_Alt (\ _lhsIallConstructors- _lhsIallNonterminals- _lhsInts ->- (let _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _lhsOcollectedConstructorNames :: (Set ConstructorIdent)- _fieldsOallNonterminals :: (Set NontermIdent)- _namesIcollectedConstructorNames :: (Set ConstructorIdent)- _namesIconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))- _namesIerrors :: (Seq Error)- _fieldsIcollectedConstraints :: ([Type])- _fieldsIcollectedFields :: ([(Identifier, Type)])- -- "src-ag/Transform.ag"(line 241, column 10)- _lhsOcollectedFields =- ({-# LINE 241 "src-ag/Transform.ag" #-}- [ (nt, con, _fieldsIcollectedFields)- | nt <- Set.toList _lhsInts- , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))- ]- {-# LINE 1087 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 245, column 10)- _lhsOcollectedConstraints =- ({-# LINE 245 "src-ag/Transform.ag" #-}- [ (nt, con, _fieldsIcollectedConstraints)- | nt <- Set.toList _lhsInts- , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))- ]- {-# LINE 1096 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 249, column 10)- _lhsOcollectedConParams =- ({-# LINE 249 "src-ag/Transform.ag" #-}- [ (nt, con, Set.fromList tyvars_)- | nt <- Set.toList _lhsInts- , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))- ]- {-# LINE 1105 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1287, column 10)- _lhsOcollectedMacros =- ({-# LINE 1287 "src-ag/Transform.ag" #-}- [ (nt, con, macro_)- | nt <- Set.toList _lhsInts- , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))- ]- {-# LINE 1114 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 98, column 62)- _lhsOcollectedConstructorNames =- ({-# LINE 98 "src-ag/Transform.ag" #-}- _namesIcollectedConstructorNames- {-# LINE 1120 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _fieldsOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 1126 "src-ag/Transform.hs" #-}- )- ( _namesIcollectedConstructorNames,_namesIconstructors,_namesIerrors) =- names_ - ( _fieldsIcollectedConstraints,_fieldsIcollectedFields) =- fields_ _fieldsOallNonterminals - in ( _lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorNames,_lhsOcollectedFields,_lhsOcollectedMacros))) )--- Alts ---------------------------------------------------------{-- visit 0:- inherited attributes:- allConstructors : Map NontermIdent (Set ConstructorIdent)- allNonterminals : Set NontermIdent- nts : Set NontermIdent- synthesized attributes:- collectedConParams : [(NontermIdent, ConstructorIdent, Set Identifier)]- collectedConstraints : [(NontermIdent, ConstructorIdent, [Type])]- collectedConstructorNames : Set ConstructorIdent- collectedFields : [(NontermIdent, ConstructorIdent, FieldMap)]- collectedMacros : [(NontermIdent, ConstructorIdent, MaybeMacro)]- 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) ->- ( ([(NontermIdent, ConstructorIdent, Set Identifier)]),([(NontermIdent, ConstructorIdent, [Type])]),(Set ConstructorIdent),([(NontermIdent, ConstructorIdent, FieldMap)]),([(NontermIdent, ConstructorIdent, MaybeMacro)])))-data Inh_Alts = Inh_Alts {allConstructors_Inh_Alts :: !((Map NontermIdent (Set ConstructorIdent))),allNonterminals_Inh_Alts :: !((Set NontermIdent)),nts_Inh_Alts :: !((Set NontermIdent))}-data Syn_Alts = Syn_Alts {collectedConParams_Syn_Alts :: !(([(NontermIdent, ConstructorIdent, Set Identifier)])),collectedConstraints_Syn_Alts :: !(([(NontermIdent, ConstructorIdent, [Type])])),collectedConstructorNames_Syn_Alts :: !((Set ConstructorIdent)),collectedFields_Syn_Alts :: !(([(NontermIdent, ConstructorIdent, FieldMap)])),collectedMacros_Syn_Alts :: !(([(NontermIdent, ConstructorIdent, MaybeMacro)]))}-wrap_Alts :: T_Alts ->- Inh_Alts ->- Syn_Alts -wrap_Alts (T_Alts sem ) (Inh_Alts _lhsIallConstructors _lhsIallNonterminals _lhsInts ) =- (let ( _lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorNames,_lhsOcollectedFields,_lhsOcollectedMacros) = sem _lhsIallConstructors _lhsIallNonterminals _lhsInts - in (Syn_Alts _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros ))-sem_Alts_Cons :: T_Alt ->- T_Alts ->- T_Alts -sem_Alts_Cons (T_Alt hd_ ) (T_Alts tl_ ) =- (T_Alts (\ _lhsIallConstructors- _lhsIallNonterminals- _lhsInts ->- (let _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _lhsOcollectedConstructorNames :: (Set ConstructorIdent)- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _hdOallConstructors :: (Map NontermIdent (Set ConstructorIdent))- _hdOallNonterminals :: (Set NontermIdent)- _hdOnts :: (Set NontermIdent)- _tlOallConstructors :: (Map NontermIdent (Set ConstructorIdent))- _tlOallNonterminals :: (Set NontermIdent)- _tlOnts :: (Set NontermIdent)- _hdIcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _hdIcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _hdIcollectedConstructorNames :: (Set ConstructorIdent)- _hdIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _hdIcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _tlIcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _tlIcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _tlIcollectedConstructorNames :: (Set ConstructorIdent)- _tlIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _tlIcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- -- use rule "src-ag/Transform.ag"(line 132, column 31)- _lhsOcollectedConParams =- ({-# LINE 132 "src-ag/Transform.ag" #-}- _hdIcollectedConParams ++ _tlIcollectedConParams- {-# LINE 1202 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 131, column 33)- _lhsOcollectedConstraints =- ({-# LINE 131 "src-ag/Transform.ag" #-}- _hdIcollectedConstraints ++ _tlIcollectedConstraints- {-# LINE 1208 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 98, column 62)- _lhsOcollectedConstructorNames =- ({-# LINE 98 "src-ag/Transform.ag" #-}- _hdIcollectedConstructorNames `Set.union` _tlIcollectedConstructorNames- {-# LINE 1214 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 130, column 28)- _lhsOcollectedFields =- ({-# LINE 130 "src-ag/Transform.ag" #-}- _hdIcollectedFields ++ _tlIcollectedFields- {-# LINE 1220 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1283, column 28)- _lhsOcollectedMacros =- ({-# LINE 1283 "src-ag/Transform.ag" #-}- _hdIcollectedMacros ++ _tlIcollectedMacros- {-# LINE 1226 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOallConstructors =- ({-# LINE 101 "src-ag/Transform.ag" #-}- _lhsIallConstructors- {-# LINE 1232 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 1238 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOnts =- ({-# LINE 175 "src-ag/Transform.ag" #-}- _lhsInts- {-# LINE 1244 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _tlOallConstructors =- ({-# LINE 101 "src-ag/Transform.ag" #-}- _lhsIallConstructors- {-# LINE 1250 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _tlOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 1256 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _tlOnts =- ({-# LINE 175 "src-ag/Transform.ag" #-}- _lhsInts- {-# LINE 1262 "src-ag/Transform.hs" #-}- )- ( _hdIcollectedConParams,_hdIcollectedConstraints,_hdIcollectedConstructorNames,_hdIcollectedFields,_hdIcollectedMacros) =- hd_ _hdOallConstructors _hdOallNonterminals _hdOnts - ( _tlIcollectedConParams,_tlIcollectedConstraints,_tlIcollectedConstructorNames,_tlIcollectedFields,_tlIcollectedMacros) =- tl_ _tlOallConstructors _tlOallNonterminals _tlOnts - in ( _lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorNames,_lhsOcollectedFields,_lhsOcollectedMacros))) )-sem_Alts_Nil :: T_Alts -sem_Alts_Nil =- (T_Alts (\ _lhsIallConstructors- _lhsIallNonterminals- _lhsInts ->- (let _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _lhsOcollectedConstructorNames :: (Set ConstructorIdent)- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- -- use rule "src-ag/Transform.ag"(line 132, column 31)- _lhsOcollectedConParams =- ({-# LINE 132 "src-ag/Transform.ag" #-}- []- {-# LINE 1283 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 131, column 33)- _lhsOcollectedConstraints =- ({-# LINE 131 "src-ag/Transform.ag" #-}- []- {-# LINE 1289 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 98, column 62)- _lhsOcollectedConstructorNames =- ({-# LINE 98 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 1295 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 130, column 28)- _lhsOcollectedFields =- ({-# LINE 130 "src-ag/Transform.ag" #-}- []- {-# LINE 1301 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1283, column 28)- _lhsOcollectedMacros =- ({-# LINE 1283 "src-ag/Transform.ag" #-}- []- {-# LINE 1307 "src-ag/Transform.hs" #-}- )- in ( _lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorNames,_lhsOcollectedFields,_lhsOcollectedMacros))) )--- Attrs --------------------------------------------------------{-- visit 0:- inherited attributes:- allFields : DataTypes- allNonterminals : Set NontermIdent- nts : Set NontermIdent- options : Options- chained attributes:- attrDecls : Map NontermIdent (Attributes, Attributes)- attrs : 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 : _- local errors1 : _--}--- 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)) ->- (Map NontermIdent (Attributes, Attributes)) ->- (Set NontermIdent) ->- Options ->- ( (Map NontermIdent (Attributes, Attributes)),(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))),attrs_Inh_Attrs :: !((Map NontermIdent (Attributes, Attributes))),nts_Inh_Attrs :: !((Set NontermIdent)),options_Inh_Attrs :: !(Options)}-data Syn_Attrs = Syn_Attrs {attrDecls_Syn_Attrs :: !((Map NontermIdent (Attributes, Attributes))),attrs_Syn_Attrs :: !((Map NontermIdent (Attributes, Attributes))),errors_Syn_Attrs :: !((Seq Error)),useMap_Syn_Attrs :: !((Map NontermIdent (Map Identifier (String,String,String))))}-wrap_Attrs :: T_Attrs ->- Inh_Attrs ->- Syn_Attrs -wrap_Attrs (T_Attrs sem ) (Inh_Attrs _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsInts _lhsIoptions ) =- (let ( _lhsOattrDecls,_lhsOattrs,_lhsOerrors,_lhsOuseMap) = sem _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsInts _lhsIoptions - in (Syn_Attrs _lhsOattrDecls _lhsOattrs _lhsOerrors _lhsOuseMap ))-sem_Attrs_Attrs :: Pos ->- AttrNames ->- AttrNames ->- AttrNames ->- T_Attrs -sem_Attrs_Attrs pos_ inh_ chn_ syn_ =- (T_Attrs (\ _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIattrs- _lhsInts- _lhsIoptions ->- (let _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOerrors :: (Seq Error)- _lhsOattrs :: (Map NontermIdent (Attributes, Attributes))- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- -- "src-ag/Transform.ag"(line 1018, column 15)- __tup1 =- ({-# LINE 1018 "src-ag/Transform.ag" #-}- checkAttrs _lhsIallFields (Set.toList _lhsInts) _inherited _synthesized _lhsIattrDecls- {-# LINE 1381 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1018, column 15)- (_attrDecls,_) =- ({-# LINE 1018 "src-ag/Transform.ag" #-}- __tup1- {-# LINE 1387 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1018, column 15)- (_,_errors) =- ({-# LINE 1018 "src-ag/Transform.ag" #-}- __tup1- {-# LINE 1393 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1020, column 15)- __tup2 =- ({-# LINE 1020 "src-ag/Transform.ag" #-}- let splitAttrs xs = unzip [ ((n,makeType _lhsIallNonterminals t),(n,ud))- | (n,t,ud) <- xs- ]- (inh,_) = splitAttrs inh_- (chn,uses1) = splitAttrs chn_- (syn,uses2) = splitAttrs syn_- isUse (n,(e1,e2,_)) = not (null e1 || null e2)- in (inh++chn,chn++syn, Map.fromList (Prelude.filter isUse (uses1++uses2)))- {-# LINE 1406 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1020, column 15)- (_inherited,_,_) =- ({-# LINE 1020 "src-ag/Transform.ag" #-}- __tup2- {-# LINE 1412 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1020, column 15)- (_,_synthesized,_) =- ({-# LINE 1020 "src-ag/Transform.ag" #-}- __tup2- {-# LINE 1418 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1020, column 15)- (_,_,_useMap) =- ({-# LINE 1020 "src-ag/Transform.ag" #-}- __tup2- {-# LINE 1424 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1028, column 11)- _lhsOuseMap =- ({-# LINE 1028 "src-ag/Transform.ag" #-}- Map.fromList (zip (Set.toList _lhsInts) (repeat _useMap))- {-# LINE 1430 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1030, column 11)- _errors1 =- ({-# LINE 1030 "src-ag/Transform.ag" #-}- if checkParseTy _lhsIoptions- then let attrs = inh_ ++ syn_ ++ chn_- items = map (\(ident,tp,_) -> (getPos ident, tp)) attrs- errs = map check items- check (pos,Haskell s) =- let exp = Expression pos tks- tks = [tk]- tk = HsToken s pos- in Seq.fromList $ checkTy exp- check _ = Seq.empty- in foldr (Seq.><) Seq.empty errs- else Seq.empty- {-# LINE 1447 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1042, column 11)- _lhsOerrors =- ({-# LINE 1042 "src-ag/Transform.ag" #-}- _errors Seq.>< _errors1- {-# LINE 1453 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1323, column 11)- _lhsOattrs =- ({-# LINE 1323 "src-ag/Transform.ag" #-}- let insert decls nt = if Map.member nt decls- then Map.update (\(inh,syn) -> Just ( Map.union inh $ Map.fromList _inherited- , Map.union syn $ Map.fromList _synthesized)) nt decls- else Map.insert nt (Map.fromList _inherited, Map.fromList _synthesized) decls- in foldl insert _lhsIattrs (Set.toList _lhsInts)- {-# LINE 1463 "src-ag/Transform.hs" #-}- )- -- copy rule (from local)- _lhsOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _attrDecls- {-# LINE 1469 "src-ag/Transform.hs" #-}- )- in ( _lhsOattrDecls,_lhsOattrs,_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)- -- "src-ag/Transform.ag"(line 765, column 17)- _lhsOconstructors =- ({-# LINE 765 "src-ag/Transform.ag" #-}- \ds -> ds- {-# LINE 1520 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 98, column 62)- _lhsOcollectedConstructorNames =- ({-# LINE 98 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 1526 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- Seq.empty- {-# LINE 1532 "src-ag/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)- -- "src-ag/Transform.ag"(line 764, column 17)- _lhsOconstructors =- ({-# LINE 764 "src-ag/Transform.ag" #-}- \ds -> _set1Iconstructors ds `Set.difference` _set2Iconstructors ds- {-# LINE 1552 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 98, column 62)- _lhsOcollectedConstructorNames =- ({-# LINE 98 "src-ag/Transform.ag" #-}- _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames- {-# LINE 1558 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- _set1Ierrors Seq.>< _set2Ierrors- {-# LINE 1564 "src-ag/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)- -- "src-ag/Transform.ag"(line 599, column 11)- _lhsOcollectedConstructorNames =- ({-# LINE 599 "src-ag/Transform.ag" #-}- Set.singleton name_- {-# LINE 1581 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 762, column 17)- _lhsOconstructors =- ({-# LINE 762 "src-ag/Transform.ag" #-}- \ds -> Set.singleton name_- {-# LINE 1587 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- Seq.empty- {-# LINE 1593 "src-ag/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)- -- "src-ag/Transform.ag"(line 763, column 17)- _lhsOconstructors =- ({-# LINE 763 "src-ag/Transform.ag" #-}- \ds -> _set1Iconstructors ds `Set.union` _set2Iconstructors ds- {-# LINE 1613 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 98, column 62)- _lhsOcollectedConstructorNames =- ({-# LINE 98 "src-ag/Transform.ag" #-}- _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames- {-# LINE 1619 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- _set1Ierrors Seq.>< _set2Ierrors- {-# LINE 1625 "src-ag/Transform.hs" #-}- )- ( _set1IcollectedConstructorNames,_set1Iconstructors,_set1Ierrors) =- set1_ - ( _set2IcollectedConstructorNames,_set2Iconstructors,_set2Ierrors) =- set2_ - in ( _lhsOcollectedConstructorNames,_lhsOconstructors,_lhsOerrors)) )--- Elem ---------------------------------------------------------{-- visit 0:- inherited attributes:- allAttrDecls : Map NontermIdent (Attributes, Attributes)- allAttrs : Map NontermIdent (Attributes, Attributes)- allConstructors : Map NontermIdent (Set ConstructorIdent)- allFields : DataTypes- allNonterminals : Set NontermIdent- definedSets : DefinedSets- options : Options- chained attributes:- attrDecls : Map NontermIdent (Attributes, Attributes)- attrs : 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]) ]- collectedConParams : [(NontermIdent, ConstructorIdent, Set Identifier)]- collectedConstraints : [(NontermIdent, ConstructorIdent, [Type])]- collectedConstructorsMap : Map NontermIdent (Set ConstructorIdent)- collectedFields : [(NontermIdent, ConstructorIdent, FieldMap)]- collectedInsts : [ (NontermIdent, ConstructorIdent, [Identifier]) ]- collectedMacros : [(NontermIdent, ConstructorIdent, MaybeMacro)]- collectedMerges : [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- collectedNames : Set Identifier- collectedRules : [ (NontermIdent, ConstructorIdent, RuleInfo)]- collectedSetNames : Set Identifier- collectedSigs : [ (NontermIdent, ConstructorIdent, SigInfo) ]- collectedUniques : [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- ctxCollect : ContextMap- derivings : Derivings- errors : Seq Error- moduleDecl : Maybe (String,String,String)- paramsCollect : ParamMap- pragmas : Options -> Options- quantCollect : QuantMap- 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 quants : {[String]}- 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 Nocatas:- child pos : {Pos}- child set : NontSet - alternative Pragma:- child pos : {Pos}- child names : {[NontermIdent]}- alternative Sem:- child pos : {Pos}- child ctx : {ClassContext}- child names : NontSet - child attrs : Attrs - child quants : {[String]}- child alts : SemAlts - alternative Set:- child pos : {Pos}- child name : {NontermIdent}- child merge : {Bool}- child set : NontSet - visit 0:- local _tup3 : _- local defSets2 : _- local errs : _- alternative Txt:- child pos : {Pos}- child kind : {BlockKind}- 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 _quants _attrs ) =- (sem_Elem_Attr _pos _ctx (sem_NontSet _names ) _quants (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 (Nocatas _pos _set ) =- (sem_Elem_Nocatas _pos (sem_NontSet _set ) )-sem_Elem (Pragma _pos _names ) =- (sem_Elem_Pragma _pos _names )-sem_Elem (Sem _pos _ctx _names _attrs _quants _alts ) =- (sem_Elem_Sem _pos _ctx (sem_NontSet _names ) (sem_Attrs _attrs ) _quants (sem_SemAlts _alts ) )-sem_Elem (Set _pos _name _merge _set ) =- (sem_Elem_Set _pos _name _merge (sem_NontSet _set ) )-sem_Elem (Txt _pos _kind _mbNt _lines ) =- (sem_Elem_Txt _pos _kind _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 (Attributes, Attributes)) ->- (Map NontermIdent (Set ConstructorIdent)) ->- DataTypes ->- (Set NontermIdent) ->- (Map NontermIdent (Attributes, Attributes)) ->- (Map NontermIdent (Attributes, Attributes)) ->- (Map Identifier (Set NontermIdent,Set Identifier)) ->- DefinedSets ->- Options ->- ( (Map NontermIdent (Attributes, Attributes)),AttrOrderMap,(Map NontermIdent (Attributes, Attributes)),Blocks,([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]),([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]),([(NontermIdent, ConstructorIdent, Set Identifier)]),([(NontermIdent, ConstructorIdent, [Type])]),(Map NontermIdent (Set ConstructorIdent)),([(NontermIdent, ConstructorIdent, FieldMap)]),([ (NontermIdent, ConstructorIdent, [Identifier]) ]),([(NontermIdent, ConstructorIdent, MaybeMacro)]),([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]),(Set Identifier),([ (NontermIdent, ConstructorIdent, RuleInfo)]),(Set Identifier),([ (NontermIdent, ConstructorIdent, SigInfo) ]),([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]),ContextMap,(Map Identifier (Set NontermIdent,Set Identifier)),Derivings,(Seq Error),(Maybe (String,String,String)),ParamMap,(Options -> Options),QuantMap,PragmaMap,TypeSyns,(Map NontermIdent (Map Identifier (String,String,String))),(Set NontermIdent)))-data Inh_Elem = Inh_Elem {allAttrDecls_Inh_Elem :: !((Map NontermIdent (Attributes, Attributes))),allAttrs_Inh_Elem :: !((Map NontermIdent (Attributes, Attributes))),allConstructors_Inh_Elem :: !((Map NontermIdent (Set ConstructorIdent))),allFields_Inh_Elem :: !(DataTypes),allNonterminals_Inh_Elem :: !((Set NontermIdent)),attrDecls_Inh_Elem :: !((Map NontermIdent (Attributes, Attributes))),attrs_Inh_Elem :: !((Map NontermIdent (Attributes, Attributes))),defSets_Inh_Elem :: !((Map Identifier (Set NontermIdent,Set Identifier))),definedSets_Inh_Elem :: !(DefinedSets),options_Inh_Elem :: !(Options)}-data Syn_Elem = Syn_Elem {attrDecls_Syn_Elem :: !((Map NontermIdent (Attributes, Attributes))),attrOrderCollect_Syn_Elem :: !(AttrOrderMap),attrs_Syn_Elem :: !((Map NontermIdent (Attributes, Attributes))),blocks_Syn_Elem :: !(Blocks),collectedArounds_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])),collectedAugments_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])),collectedConParams_Syn_Elem :: !(([(NontermIdent, ConstructorIdent, Set Identifier)])),collectedConstraints_Syn_Elem :: !(([(NontermIdent, ConstructorIdent, [Type])])),collectedConstructorsMap_Syn_Elem :: !((Map NontermIdent (Set ConstructorIdent))),collectedFields_Syn_Elem :: !(([(NontermIdent, ConstructorIdent, FieldMap)])),collectedInsts_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, [Identifier]) ])),collectedMacros_Syn_Elem :: !(([(NontermIdent, ConstructorIdent, MaybeMacro)])),collectedMerges_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])),collectedNames_Syn_Elem :: !((Set Identifier)),collectedRules_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, RuleInfo)])),collectedSetNames_Syn_Elem :: !((Set Identifier)),collectedSigs_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, SigInfo) ])),collectedUniques_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])),ctxCollect_Syn_Elem :: !(ContextMap),defSets_Syn_Elem :: !((Map Identifier (Set NontermIdent,Set Identifier))),derivings_Syn_Elem :: !(Derivings),errors_Syn_Elem :: !((Seq Error)),moduleDecl_Syn_Elem :: !((Maybe (String,String,String))),paramsCollect_Syn_Elem :: !(ParamMap),pragmas_Syn_Elem :: !((Options -> Options)),quantCollect_Syn_Elem :: !(QuantMap),semPragmasCollect_Syn_Elem :: !(PragmaMap),typeSyns_Syn_Elem :: !(TypeSyns),useMap_Syn_Elem :: !((Map NontermIdent (Map Identifier (String,String,String)))),wrappers_Syn_Elem :: !((Set NontermIdent))}-wrap_Elem :: T_Elem ->- Inh_Elem ->- Syn_Elem -wrap_Elem (T_Elem sem ) (Inh_Elem _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions ) =- (let ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers) = sem _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions - in (Syn_Elem _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers ))-sem_Elem_Attr :: Pos ->- ClassContext ->- T_NontSet ->- ([String]) ->- T_Attrs ->- T_Elem -sem_Elem_Attr pos_ ctx_ (T_NontSet names_ ) quants_ (T_Attrs attrs_ ) =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallAttrs- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIattrs- _lhsIdefSets- _lhsIdefinedSets- _lhsIoptions ->- (let _lhsOctxCollect :: ContextMap- _lhsOquantCollect :: QuantMap- _attrsOnts :: (Set NontermIdent)- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOattrs :: (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))- _attrsOattrs :: (Map NontermIdent (Attributes, Attributes))- _attrsOoptions :: Options- _namesIcollectedNames :: (Set Identifier)- _namesIerrors :: (Seq Error)- _namesInontSet :: (Set NontermIdent)- _attrsIattrDecls :: (Map NontermIdent (Attributes, Attributes))- _attrsIattrs :: (Map NontermIdent (Attributes, Attributes))- _attrsIerrors :: (Seq Error)- _attrsIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- -- "src-ag/Transform.ag"(line 952, column 7)- _lhsOctxCollect =- ({-# LINE 952 "src-ag/Transform.ag" #-}- if null ctx_- then Map.empty- else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]- {-# LINE 1856 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 977, column 7)- _lhsOquantCollect =- ({-# LINE 977 "src-ag/Transform.ag" #-}- if null quants_- then Map.empty- else Map.fromList [(nt, quants_) | nt <- Set.toList _namesInontSet]- {-# LINE 1864 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1013, column 10)- _attrsOnts =- ({-# LINE 1013 "src-ag/Transform.ag" #-}- _namesInontSet- {-# LINE 1870 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 893, column 55)- _lhsOattrOrderCollect =- ({-# LINE 893 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 1876 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 46, column 19)- _lhsOblocks =- ({-# LINE 46 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 1882 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 164, column 32)- _lhsOcollectedArounds =- ({-# LINE 164 "src-ag/Transform.ag" #-}- []- {-# LINE 1888 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 163, column 32)- _lhsOcollectedAugments =- ({-# LINE 163 "src-ag/Transform.ag" #-}- []- {-# LINE 1894 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 132, column 31)- _lhsOcollectedConParams =- ({-# LINE 132 "src-ag/Transform.ag" #-}- []- {-# LINE 1900 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 131, column 33)- _lhsOcollectedConstraints =- ({-# LINE 131 "src-ag/Transform.ag" #-}- []- {-# LINE 1906 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 99, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 99 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 1912 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 130, column 28)- _lhsOcollectedFields =- ({-# LINE 130 "src-ag/Transform.ag" #-}- []- {-# LINE 1918 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 161, column 32)- _lhsOcollectedInsts =- ({-# LINE 161 "src-ag/Transform.ag" #-}- []- {-# LINE 1924 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1283, column 28)- _lhsOcollectedMacros =- ({-# LINE 1283 "src-ag/Transform.ag" #-}- []- {-# LINE 1930 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 165, column 32)- _lhsOcollectedMerges =- ({-# LINE 165 "src-ag/Transform.ag" #-}- []- {-# LINE 1936 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 91, column 50)- _lhsOcollectedNames =- ({-# LINE 91 "src-ag/Transform.ag" #-}- _namesIcollectedNames- {-# LINE 1942 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 159, column 32)- _lhsOcollectedRules =- ({-# LINE 159 "src-ag/Transform.ag" #-}- []- {-# LINE 1948 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 90, column 50)- _lhsOcollectedSetNames =- ({-# LINE 90 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 1954 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 160, column 32)- _lhsOcollectedSigs =- ({-# LINE 160 "src-ag/Transform.ag" #-}- []- {-# LINE 1960 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 162, column 32)- _lhsOcollectedUniques =- ({-# LINE 162 "src-ag/Transform.ag" #-}- []- {-# LINE 1966 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 990, column 33)- _lhsOderivings =- ({-# LINE 990 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 1972 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- _namesIerrors Seq.>< _attrsIerrors- {-# LINE 1978 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1187, column 37)- _lhsOmoduleDecl =- ({-# LINE 1187 "src-ag/Transform.ag" #-}- mzero- {-# LINE 1984 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 925, column 37)- _lhsOparamsCollect =- ({-# LINE 925 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 1990 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 787, column 34)- _lhsOpragmas =- ({-# LINE 787 "src-ag/Transform.ag" #-}- id- {-# LINE 1996 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 865, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 865 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2002 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 626, column 32)- _lhsOtypeSyns =- ({-# LINE 626 "src-ag/Transform.ag" #-}- []- {-# LINE 2008 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 145, column 15)- _lhsOuseMap =- ({-# LINE 145 "src-ag/Transform.ag" #-}- _attrsIuseMap- {-# LINE 2014 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 771, column 32)- _lhsOwrappers =- ({-# LINE 771 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 2020 "src-ag/Transform.hs" #-}- )- -- copy rule (up)- _lhsOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _attrsIattrDecls- {-# LINE 2026 "src-ag/Transform.hs" #-}- )- -- copy rule (up)- _lhsOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _attrsIattrs- {-# LINE 2032 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 109 "src-ag/Transform.ag" #-}- _lhsIdefSets- {-# LINE 2038 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _namesOallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 2044 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _namesOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 2050 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _namesOdefinedSets =- ({-# LINE 112 "src-ag/Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 2056 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _attrsOallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 2062 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _attrsOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 2068 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _attrsOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _lhsIattrDecls- {-# LINE 2074 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _attrsOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _lhsIattrs- {-# LINE 2080 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _attrsOoptions =- ({-# LINE 40 "src-ag/Transform.ag" #-}- _lhsIoptions- {-# LINE 2086 "src-ag/Transform.hs" #-}- )- ( _namesIcollectedNames,_namesIerrors,_namesInontSet) =- names_ _namesOallFields _namesOallNonterminals _namesOdefinedSets - ( _attrsIattrDecls,_attrsIattrs,_attrsIerrors,_attrsIuseMap) =- attrs_ _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOattrs _attrsOnts _attrsOoptions - in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-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- _lhsIallAttrs- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIattrs- _lhsIdefSets- _lhsIdefinedSets- _lhsIoptions ->- (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]) ])- _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOpragmas :: (Options -> Options)- _lhsOquantCollect :: QuantMap- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOattrs :: (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))- _attrsOattrs :: (Map NontermIdent (Attributes, Attributes))- _attrsOoptions :: Options- _altsOallConstructors :: (Map NontermIdent (Set ConstructorIdent))- _altsOallNonterminals :: (Set NontermIdent)- _namesIcollectedNames :: (Set Identifier)- _namesIerrors :: (Seq Error)- _namesInontSet :: (Set NontermIdent)- _attrsIattrDecls :: (Map NontermIdent (Attributes, Attributes))- _attrsIattrs :: (Map NontermIdent (Attributes, Attributes))- _attrsIerrors :: (Seq Error)- _attrsIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _altsIcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _altsIcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _altsIcollectedConstructorNames :: (Set ConstructorIdent)- _altsIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _altsIcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- -- "src-ag/Transform.ag"(line 178, column 10)- _altsOnts =- ({-# LINE 178 "src-ag/Transform.ag" #-}- _namesInontSet- {-# LINE 2170 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 605, column 11)- _lhsOcollectedConstructorsMap =- ({-# LINE 605 "src-ag/Transform.ag" #-}- Map.fromList- [ (n, _altsIcollectedConstructorNames)- | n <- Set.toList _namesInontSet- ]- {-# LINE 2179 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 929, column 7)- _lhsOparamsCollect =- ({-# LINE 929 "src-ag/Transform.ag" #-}- if null params_- then Map.empty- else Map.fromList [(nt, params_) | nt <- Set.toList _namesInontSet]- {-# LINE 2187 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 952, column 7)- _lhsOctxCollect =- ({-# LINE 952 "src-ag/Transform.ag" #-}- if null ctx_- then Map.empty- else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]- {-# LINE 2195 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1012, column 10)- _attrsOnts =- ({-# LINE 1012 "src-ag/Transform.ag" #-}- _namesInontSet- {-# LINE 2201 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 893, column 55)- _lhsOattrOrderCollect =- ({-# LINE 893 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2207 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 46, column 19)- _lhsOblocks =- ({-# LINE 46 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2213 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 164, column 32)- _lhsOcollectedArounds =- ({-# LINE 164 "src-ag/Transform.ag" #-}- []- {-# LINE 2219 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 163, column 32)- _lhsOcollectedAugments =- ({-# LINE 163 "src-ag/Transform.ag" #-}- []- {-# LINE 2225 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 132, column 31)- _lhsOcollectedConParams =- ({-# LINE 132 "src-ag/Transform.ag" #-}- _altsIcollectedConParams- {-# LINE 2231 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 131, column 33)- _lhsOcollectedConstraints =- ({-# LINE 131 "src-ag/Transform.ag" #-}- _altsIcollectedConstraints- {-# LINE 2237 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 130, column 28)- _lhsOcollectedFields =- ({-# LINE 130 "src-ag/Transform.ag" #-}- _altsIcollectedFields- {-# LINE 2243 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 161, column 32)- _lhsOcollectedInsts =- ({-# LINE 161 "src-ag/Transform.ag" #-}- []- {-# LINE 2249 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1283, column 28)- _lhsOcollectedMacros =- ({-# LINE 1283 "src-ag/Transform.ag" #-}- _altsIcollectedMacros- {-# LINE 2255 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 165, column 32)- _lhsOcollectedMerges =- ({-# LINE 165 "src-ag/Transform.ag" #-}- []- {-# LINE 2261 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 91, column 50)- _lhsOcollectedNames =- ({-# LINE 91 "src-ag/Transform.ag" #-}- _namesIcollectedNames- {-# LINE 2267 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 159, column 32)- _lhsOcollectedRules =- ({-# LINE 159 "src-ag/Transform.ag" #-}- []- {-# LINE 2273 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 90, column 50)- _lhsOcollectedSetNames =- ({-# LINE 90 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 2279 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 160, column 32)- _lhsOcollectedSigs =- ({-# LINE 160 "src-ag/Transform.ag" #-}- []- {-# LINE 2285 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 162, column 32)- _lhsOcollectedUniques =- ({-# LINE 162 "src-ag/Transform.ag" #-}- []- {-# LINE 2291 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 990, column 33)- _lhsOderivings =- ({-# LINE 990 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2297 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- _namesIerrors Seq.>< _attrsIerrors- {-# LINE 2303 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1187, column 37)- _lhsOmoduleDecl =- ({-# LINE 1187 "src-ag/Transform.ag" #-}- mzero- {-# LINE 2309 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 787, column 34)- _lhsOpragmas =- ({-# LINE 787 "src-ag/Transform.ag" #-}- id- {-# LINE 2315 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 973, column 36)- _lhsOquantCollect =- ({-# LINE 973 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2321 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 865, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 865 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2327 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 626, column 32)- _lhsOtypeSyns =- ({-# LINE 626 "src-ag/Transform.ag" #-}- []- {-# LINE 2333 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 145, column 15)- _lhsOuseMap =- ({-# LINE 145 "src-ag/Transform.ag" #-}- _attrsIuseMap- {-# LINE 2339 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 771, column 32)- _lhsOwrappers =- ({-# LINE 771 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 2345 "src-ag/Transform.hs" #-}- )- -- copy rule (up)- _lhsOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _attrsIattrDecls- {-# LINE 2351 "src-ag/Transform.hs" #-}- )- -- copy rule (up)- _lhsOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _attrsIattrs- {-# LINE 2357 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 109 "src-ag/Transform.ag" #-}- _lhsIdefSets- {-# LINE 2363 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _namesOallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 2369 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _namesOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 2375 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _namesOdefinedSets =- ({-# LINE 112 "src-ag/Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 2381 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _attrsOallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 2387 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _attrsOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 2393 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _attrsOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _lhsIattrDecls- {-# LINE 2399 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _attrsOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _lhsIattrs- {-# LINE 2405 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _attrsOoptions =- ({-# LINE 40 "src-ag/Transform.ag" #-}- _lhsIoptions- {-# LINE 2411 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _altsOallConstructors =- ({-# LINE 101 "src-ag/Transform.ag" #-}- _lhsIallConstructors- {-# LINE 2417 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _altsOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 2423 "src-ag/Transform.hs" #-}- )- ( _namesIcollectedNames,_namesIerrors,_namesInontSet) =- names_ _namesOallFields _namesOallNonterminals _namesOdefinedSets - ( _attrsIattrDecls,_attrsIattrs,_attrsIerrors,_attrsIuseMap) =- attrs_ _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOattrs _attrsOnts _attrsOoptions - ( _altsIcollectedConParams,_altsIcollectedConstraints,_altsIcollectedConstructorNames,_altsIcollectedFields,_altsIcollectedMacros) =- alts_ _altsOallConstructors _altsOallNonterminals _altsOnts - in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Deriving :: Pos ->- T_NontSet ->- ([NontermIdent]) ->- T_Elem -sem_Elem_Deriving pos_ (T_NontSet set_ ) classes_ =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallAttrs- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIattrs- _lhsIdefSets- _lhsIdefinedSets- _lhsIoptions ->- (let _lhsOderivings :: Derivings- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOctxCollect :: ContextMap- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOquantCollect :: QuantMap- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOattrs :: (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)- -- "src-ag/Transform.ag"(line 997, column 14)- _lhsOderivings =- ({-# LINE 997 "src-ag/Transform.ag" #-}- Map.fromList [(nt,Set.fromList classes_) | nt <- Set.toList _setInontSet]- {-# LINE 2487 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 893, column 55)- _lhsOattrOrderCollect =- ({-# LINE 893 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2493 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 46, column 19)- _lhsOblocks =- ({-# LINE 46 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2499 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 164, column 32)- _lhsOcollectedArounds =- ({-# LINE 164 "src-ag/Transform.ag" #-}- []- {-# LINE 2505 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 163, column 32)- _lhsOcollectedAugments =- ({-# LINE 163 "src-ag/Transform.ag" #-}- []- {-# LINE 2511 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 132, column 31)- _lhsOcollectedConParams =- ({-# LINE 132 "src-ag/Transform.ag" #-}- []- {-# LINE 2517 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 131, column 33)- _lhsOcollectedConstraints =- ({-# LINE 131 "src-ag/Transform.ag" #-}- []- {-# LINE 2523 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 99, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 99 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2529 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 130, column 28)- _lhsOcollectedFields =- ({-# LINE 130 "src-ag/Transform.ag" #-}- []- {-# LINE 2535 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 161, column 32)- _lhsOcollectedInsts =- ({-# LINE 161 "src-ag/Transform.ag" #-}- []- {-# LINE 2541 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1283, column 28)- _lhsOcollectedMacros =- ({-# LINE 1283 "src-ag/Transform.ag" #-}- []- {-# LINE 2547 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 165, column 32)- _lhsOcollectedMerges =- ({-# LINE 165 "src-ag/Transform.ag" #-}- []- {-# LINE 2553 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 91, column 50)- _lhsOcollectedNames =- ({-# LINE 91 "src-ag/Transform.ag" #-}- _setIcollectedNames- {-# LINE 2559 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 159, column 32)- _lhsOcollectedRules =- ({-# LINE 159 "src-ag/Transform.ag" #-}- []- {-# LINE 2565 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 90, column 50)- _lhsOcollectedSetNames =- ({-# LINE 90 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 2571 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 160, column 32)- _lhsOcollectedSigs =- ({-# LINE 160 "src-ag/Transform.ag" #-}- []- {-# LINE 2577 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 162, column 32)- _lhsOcollectedUniques =- ({-# LINE 162 "src-ag/Transform.ag" #-}- []- {-# LINE 2583 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 948, column 34)- _lhsOctxCollect =- ({-# LINE 948 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2589 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- _setIerrors- {-# LINE 2595 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1187, column 37)- _lhsOmoduleDecl =- ({-# LINE 1187 "src-ag/Transform.ag" #-}- mzero- {-# LINE 2601 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 925, column 37)- _lhsOparamsCollect =- ({-# LINE 925 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2607 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 787, column 34)- _lhsOpragmas =- ({-# LINE 787 "src-ag/Transform.ag" #-}- id- {-# LINE 2613 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 973, column 36)- _lhsOquantCollect =- ({-# LINE 973 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2619 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 865, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 865 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2625 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 626, column 32)- _lhsOtypeSyns =- ({-# LINE 626 "src-ag/Transform.ag" #-}- []- {-# LINE 2631 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 145, column 15)- _lhsOuseMap =- ({-# LINE 145 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2637 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 771, column 32)- _lhsOwrappers =- ({-# LINE 771 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 2643 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _lhsIattrDecls- {-# LINE 2649 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _lhsIattrs- {-# LINE 2655 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 109 "src-ag/Transform.ag" #-}- _lhsIdefSets- {-# LINE 2661 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _setOallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 2667 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _setOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 2673 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _setOdefinedSets =- ({-# LINE 112 "src-ag/Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 2679 "src-ag/Transform.hs" #-}- )- ( _setIcollectedNames,_setIerrors,_setInontSet) =- set_ _setOallFields _setOallNonterminals _setOdefinedSets - in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Module :: Pos ->- String ->- String ->- String ->- T_Elem -sem_Elem_Module pos_ name_ exports_ imports_ =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallAttrs- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIattrs- _lhsIdefSets- _lhsIdefinedSets- _lhsIoptions ->- (let _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOctxCollect :: ContextMap- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOquantCollect :: QuantMap- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOattrs :: (Map NontermIdent (Attributes, Attributes))- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- -- "src-ag/Transform.ag"(line 1191, column 7)- _lhsOmoduleDecl =- ({-# LINE 1191 "src-ag/Transform.ag" #-}- Just (name_, exports_, imports_)- {-# LINE 2734 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 893, column 55)- _lhsOattrOrderCollect =- ({-# LINE 893 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2740 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 46, column 19)- _lhsOblocks =- ({-# LINE 46 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2746 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 164, column 32)- _lhsOcollectedArounds =- ({-# LINE 164 "src-ag/Transform.ag" #-}- []- {-# LINE 2752 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 163, column 32)- _lhsOcollectedAugments =- ({-# LINE 163 "src-ag/Transform.ag" #-}- []- {-# LINE 2758 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 132, column 31)- _lhsOcollectedConParams =- ({-# LINE 132 "src-ag/Transform.ag" #-}- []- {-# LINE 2764 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 131, column 33)- _lhsOcollectedConstraints =- ({-# LINE 131 "src-ag/Transform.ag" #-}- []- {-# LINE 2770 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 99, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 99 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2776 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 130, column 28)- _lhsOcollectedFields =- ({-# LINE 130 "src-ag/Transform.ag" #-}- []- {-# LINE 2782 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 161, column 32)- _lhsOcollectedInsts =- ({-# LINE 161 "src-ag/Transform.ag" #-}- []- {-# LINE 2788 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1283, column 28)- _lhsOcollectedMacros =- ({-# LINE 1283 "src-ag/Transform.ag" #-}- []- {-# LINE 2794 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 165, column 32)- _lhsOcollectedMerges =- ({-# LINE 165 "src-ag/Transform.ag" #-}- []- {-# LINE 2800 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 91, column 50)- _lhsOcollectedNames =- ({-# LINE 91 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 2806 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 159, column 32)- _lhsOcollectedRules =- ({-# LINE 159 "src-ag/Transform.ag" #-}- []- {-# LINE 2812 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 90, column 50)- _lhsOcollectedSetNames =- ({-# LINE 90 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 2818 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 160, column 32)- _lhsOcollectedSigs =- ({-# LINE 160 "src-ag/Transform.ag" #-}- []- {-# LINE 2824 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 162, column 32)- _lhsOcollectedUniques =- ({-# LINE 162 "src-ag/Transform.ag" #-}- []- {-# LINE 2830 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 948, column 34)- _lhsOctxCollect =- ({-# LINE 948 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2836 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 990, column 33)- _lhsOderivings =- ({-# LINE 990 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2842 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- Seq.empty- {-# LINE 2848 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 925, column 37)- _lhsOparamsCollect =- ({-# LINE 925 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2854 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 787, column 34)- _lhsOpragmas =- ({-# LINE 787 "src-ag/Transform.ag" #-}- id- {-# LINE 2860 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 973, column 36)- _lhsOquantCollect =- ({-# LINE 973 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2866 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 865, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 865 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2872 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 626, column 32)- _lhsOtypeSyns =- ({-# LINE 626 "src-ag/Transform.ag" #-}- []- {-# LINE 2878 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 145, column 15)- _lhsOuseMap =- ({-# LINE 145 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2884 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 771, column 32)- _lhsOwrappers =- ({-# LINE 771 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 2890 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _lhsIattrDecls- {-# LINE 2896 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _lhsIattrs- {-# LINE 2902 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 109 "src-ag/Transform.ag" #-}- _lhsIdefSets- {-# LINE 2908 "src-ag/Transform.hs" #-}- )- in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Nocatas :: Pos ->- T_NontSet ->- T_Elem -sem_Elem_Nocatas pos_ (T_NontSet set_ ) =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallAttrs- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIattrs- _lhsIdefSets- _lhsIdefinedSets- _lhsIoptions ->- (let _lhsOpragmas :: (Options -> Options)- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOctxCollect :: ContextMap- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOquantCollect :: QuantMap- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOattrs :: (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)- -- "src-ag/Transform.ag"(line 781, column 14)- _lhsOpragmas =- ({-# LINE 781 "src-ag/Transform.ag" #-}- \o -> o { nocatas = _setInontSet `Set.union` nocatas o }- {-# LINE 2965 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 893, column 55)- _lhsOattrOrderCollect =- ({-# LINE 893 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2971 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 46, column 19)- _lhsOblocks =- ({-# LINE 46 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 2977 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 164, column 32)- _lhsOcollectedArounds =- ({-# LINE 164 "src-ag/Transform.ag" #-}- []- {-# LINE 2983 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 163, column 32)- _lhsOcollectedAugments =- ({-# LINE 163 "src-ag/Transform.ag" #-}- []- {-# LINE 2989 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 132, column 31)- _lhsOcollectedConParams =- ({-# LINE 132 "src-ag/Transform.ag" #-}- []- {-# LINE 2995 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 131, column 33)- _lhsOcollectedConstraints =- ({-# LINE 131 "src-ag/Transform.ag" #-}- []- {-# LINE 3001 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 99, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 99 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3007 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 130, column 28)- _lhsOcollectedFields =- ({-# LINE 130 "src-ag/Transform.ag" #-}- []- {-# LINE 3013 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 161, column 32)- _lhsOcollectedInsts =- ({-# LINE 161 "src-ag/Transform.ag" #-}- []- {-# LINE 3019 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1283, column 28)- _lhsOcollectedMacros =- ({-# LINE 1283 "src-ag/Transform.ag" #-}- []- {-# LINE 3025 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 165, column 32)- _lhsOcollectedMerges =- ({-# LINE 165 "src-ag/Transform.ag" #-}- []- {-# LINE 3031 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 91, column 50)- _lhsOcollectedNames =- ({-# LINE 91 "src-ag/Transform.ag" #-}- _setIcollectedNames- {-# LINE 3037 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 159, column 32)- _lhsOcollectedRules =- ({-# LINE 159 "src-ag/Transform.ag" #-}- []- {-# LINE 3043 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 90, column 50)- _lhsOcollectedSetNames =- ({-# LINE 90 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 3049 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 160, column 32)- _lhsOcollectedSigs =- ({-# LINE 160 "src-ag/Transform.ag" #-}- []- {-# LINE 3055 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 162, column 32)- _lhsOcollectedUniques =- ({-# LINE 162 "src-ag/Transform.ag" #-}- []- {-# LINE 3061 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 948, column 34)- _lhsOctxCollect =- ({-# LINE 948 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3067 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 990, column 33)- _lhsOderivings =- ({-# LINE 990 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3073 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- _setIerrors- {-# LINE 3079 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1187, column 37)- _lhsOmoduleDecl =- ({-# LINE 1187 "src-ag/Transform.ag" #-}- mzero- {-# LINE 3085 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 925, column 37)- _lhsOparamsCollect =- ({-# LINE 925 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3091 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 973, column 36)- _lhsOquantCollect =- ({-# LINE 973 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3097 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 865, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 865 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3103 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 626, column 32)- _lhsOtypeSyns =- ({-# LINE 626 "src-ag/Transform.ag" #-}- []- {-# LINE 3109 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 145, column 15)- _lhsOuseMap =- ({-# LINE 145 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3115 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 771, column 32)- _lhsOwrappers =- ({-# LINE 771 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 3121 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _lhsIattrDecls- {-# LINE 3127 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _lhsIattrs- {-# LINE 3133 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 109 "src-ag/Transform.ag" #-}- _lhsIdefSets- {-# LINE 3139 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _setOallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 3145 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _setOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 3151 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _setOdefinedSets =- ({-# LINE 112 "src-ag/Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 3157 "src-ag/Transform.hs" #-}- )- ( _setIcollectedNames,_setIerrors,_setInontSet) =- set_ _setOallFields _setOallNonterminals _setOdefinedSets - in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Pragma :: Pos ->- ([NontermIdent]) ->- T_Elem -sem_Elem_Pragma pos_ names_ =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallAttrs- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIattrs- _lhsIdefSets- _lhsIdefinedSets- _lhsIoptions ->- (let _lhsOpragmas :: (Options -> Options)- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOctxCollect :: ContextMap- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOquantCollect :: QuantMap- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOattrs :: (Map NontermIdent (Attributes, Attributes))- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- -- "src-ag/Transform.ag"(line 790, column 13)- _lhsOpragmas =- ({-# LINE 790 "src-ag/Transform.ag" #-}- let mk n o = case getName n of- "gencatas" -> o { folds = True }- "nogencatas" -> o { folds = False }- "gendatas" -> o { dataTypes = True }- "datarecords" -> o { dataRecords = True }- "nogendatas" -> o { dataTypes = False }- "gensems" -> o { semfuns = True }- "nogensems" -> o { semfuns = False }- "gentypesigs" -> o { typeSigs = True }- "nogentypesigs"-> o { typeSigs = False }- "nocycle" -> o { withCycle = False }- "cycle" -> o { withCycle = True }- "nostrictdata" -> o { strictData = False }- "strictdata" -> o { strictData = True }- "nostrictcase" -> o { strictCases = False }- "strictcase" -> o { strictCases = True }- "strictercase" -> o { strictCases = True, stricterCases = True }- "nostrictwrap" -> o { strictWrap = False }- "strictwrap" -> o { strictWrap = True }- "novisit" -> o { visit = False }- "visit" -> o { visit = True }- "nocase" -> o { cases = False }- "case" -> o { cases = True }- "noseq" -> o { withSeq = False }- "seq" -> o { withSeq = True }- "nounbox" -> o { unbox = False }- "unbox" -> o { unbox = True }- "bangpats" -> o { bangpats = True }- "breadthfirst" -> o { breadthFirst = True }- "breadthfirstStrict" -> o { breadthFirstStrict = True }- "nooptimize" -> o { cases = False , visit = False }- "optimize" -> o { cases = True , visit = True }- "strictsem" -> o { strictSems = True }- "gentraces" -> o { genTraces = True }- "genusetraces" -> o { genUseTraces = True }- "splitsems" -> o { splitSems = True }- "gencostcentres" -> o { genCostCentres = True }- "sepsemmods" -> o { sepSemMods = True }- "genlinepragmas" -> o { genLinePragmas = True }- "newtypes" -> o { newtypes = True }- "nonewtypes" -> o { newtypes = False }- "nooptimizations" -> o { noOptimizations = True }- "kennedywarren" -> o { kennedyWarren = True }- "aspectag" -> o { genAspectAG = True }- 'n':'o':'g':'r':'o':'u':'p':'_':atts- -> o { noGroup = extract atts ++ noGroup o }- "rename" -> o { rename = True }- "parallel" -> o { parallelInvoke = True }- "monadicwrappers" -> o { monadicWrappers = True }- "dummytokenvisit" -> o { dummyTokenVisit = True }- "tupleasdummytoken" -> o { tupleAsDummyToken = True }- "stateasdummytoken" -> o { tupleAsDummyToken = False }- "strictdummytoken" -> o { strictDummyToken = True }- "noperruletypesigs" -> o { noPerRuleTypeSigs = True }- "noperstatetypesigs" -> o { noPerStateTypeSigs = True }- "noeagerblackholing" -> o { noEagerBlackholing = True }- "noperrulecostcentres" -> o { noPerRuleCostCentres = True }- "nopervisitcostcentres" -> o { noPerVisitCostCentres = True }- "helpinlining" -> o { helpInlining = True }- "noinlinepragmas" -> o { noInlinePragmas = True }- "aggressiveinlinepragmas" -> o { aggressiveInlinePragmas = True }- "latehigherorderbindings" -> o { lateHigherOrderBinding = True }- s -> trace ("uuagc: ignoring unknown pragma: " ++ s) o- in \o -> foldr mk o names_- {-# LINE 3273 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 893, column 55)- _lhsOattrOrderCollect =- ({-# LINE 893 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3279 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 46, column 19)- _lhsOblocks =- ({-# LINE 46 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3285 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 164, column 32)- _lhsOcollectedArounds =- ({-# LINE 164 "src-ag/Transform.ag" #-}- []- {-# LINE 3291 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 163, column 32)- _lhsOcollectedAugments =- ({-# LINE 163 "src-ag/Transform.ag" #-}- []- {-# LINE 3297 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 132, column 31)- _lhsOcollectedConParams =- ({-# LINE 132 "src-ag/Transform.ag" #-}- []- {-# LINE 3303 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 131, column 33)- _lhsOcollectedConstraints =- ({-# LINE 131 "src-ag/Transform.ag" #-}- []- {-# LINE 3309 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 99, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 99 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3315 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 130, column 28)- _lhsOcollectedFields =- ({-# LINE 130 "src-ag/Transform.ag" #-}- []- {-# LINE 3321 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 161, column 32)- _lhsOcollectedInsts =- ({-# LINE 161 "src-ag/Transform.ag" #-}- []- {-# LINE 3327 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1283, column 28)- _lhsOcollectedMacros =- ({-# LINE 1283 "src-ag/Transform.ag" #-}- []- {-# LINE 3333 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 165, column 32)- _lhsOcollectedMerges =- ({-# LINE 165 "src-ag/Transform.ag" #-}- []- {-# LINE 3339 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 91, column 50)- _lhsOcollectedNames =- ({-# LINE 91 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 3345 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 159, column 32)- _lhsOcollectedRules =- ({-# LINE 159 "src-ag/Transform.ag" #-}- []- {-# LINE 3351 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 90, column 50)- _lhsOcollectedSetNames =- ({-# LINE 90 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 3357 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 160, column 32)- _lhsOcollectedSigs =- ({-# LINE 160 "src-ag/Transform.ag" #-}- []- {-# LINE 3363 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 162, column 32)- _lhsOcollectedUniques =- ({-# LINE 162 "src-ag/Transform.ag" #-}- []- {-# LINE 3369 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 948, column 34)- _lhsOctxCollect =- ({-# LINE 948 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3375 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 990, column 33)- _lhsOderivings =- ({-# LINE 990 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3381 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- Seq.empty- {-# LINE 3387 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1187, column 37)- _lhsOmoduleDecl =- ({-# LINE 1187 "src-ag/Transform.ag" #-}- mzero- {-# LINE 3393 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 925, column 37)- _lhsOparamsCollect =- ({-# LINE 925 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3399 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 973, column 36)- _lhsOquantCollect =- ({-# LINE 973 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3405 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 865, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 865 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3411 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 626, column 32)- _lhsOtypeSyns =- ({-# LINE 626 "src-ag/Transform.ag" #-}- []- {-# LINE 3417 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 145, column 15)- _lhsOuseMap =- ({-# LINE 145 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3423 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 771, column 32)- _lhsOwrappers =- ({-# LINE 771 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 3429 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _lhsIattrDecls- {-# LINE 3435 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _lhsIattrs- {-# LINE 3441 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 109 "src-ag/Transform.ag" #-}- _lhsIdefSets- {-# LINE 3447 "src-ag/Transform.hs" #-}- )- in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Sem :: Pos ->- ClassContext ->- T_NontSet ->- T_Attrs ->- ([String]) ->- T_SemAlts ->- T_Elem -sem_Elem_Sem pos_ ctx_ (T_NontSet names_ ) (T_Attrs attrs_ ) quants_ (T_SemAlts alts_ ) =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallAttrs- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIattrs- _lhsIdefSets- _lhsIdefinedSets- _lhsIoptions ->- (let _altsOnts :: (Set NontermIdent)- _lhsOctxCollect :: ContextMap- _lhsOquantCollect :: QuantMap- _attrsOnts :: (Set NontermIdent)- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOattrs :: (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))- _attrsOattrs :: (Map NontermIdent (Attributes, Attributes))- _attrsOoptions :: Options- _altsOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))- _altsOallAttrs :: (Map NontermIdent (Attributes, Attributes))- _altsOallFields :: DataTypes- _altsOoptions :: Options- _namesIcollectedNames :: (Set Identifier)- _namesIerrors :: (Seq Error)- _namesInontSet :: (Set NontermIdent)- _attrsIattrDecls :: (Map NontermIdent (Attributes, Attributes))- _attrsIattrs :: (Map NontermIdent (Attributes, Attributes))- _attrsIerrors :: (Seq Error)- _attrsIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _altsIattrOrderCollect :: AttrOrderMap- _altsIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _altsIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _altsIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _altsIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _altsIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _altsIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _altsIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _altsIerrors :: (Seq Error)- _altsIsemPragmasCollect :: PragmaMap- -- "src-ag/Transform.ag"(line 179, column 10)- _altsOnts =- ({-# LINE 179 "src-ag/Transform.ag" #-}- _namesInontSet- {-# LINE 3533 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 952, column 7)- _lhsOctxCollect =- ({-# LINE 952 "src-ag/Transform.ag" #-}- if null ctx_- then Map.empty- else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]- {-# LINE 3541 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 977, column 7)- _lhsOquantCollect =- ({-# LINE 977 "src-ag/Transform.ag" #-}- if null quants_- then Map.empty- else Map.fromList [(nt, quants_) | nt <- Set.toList _namesInontSet]- {-# LINE 3549 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1014, column 10)- _attrsOnts =- ({-# LINE 1014 "src-ag/Transform.ag" #-}- _namesInontSet- {-# LINE 3555 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 893, column 55)- _lhsOattrOrderCollect =- ({-# LINE 893 "src-ag/Transform.ag" #-}- _altsIattrOrderCollect- {-# LINE 3561 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 46, column 19)- _lhsOblocks =- ({-# LINE 46 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3567 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 164, column 32)- _lhsOcollectedArounds =- ({-# LINE 164 "src-ag/Transform.ag" #-}- _altsIcollectedArounds- {-# LINE 3573 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 163, column 32)- _lhsOcollectedAugments =- ({-# LINE 163 "src-ag/Transform.ag" #-}- _altsIcollectedAugments- {-# LINE 3579 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 132, column 31)- _lhsOcollectedConParams =- ({-# LINE 132 "src-ag/Transform.ag" #-}- []- {-# LINE 3585 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 131, column 33)- _lhsOcollectedConstraints =- ({-# LINE 131 "src-ag/Transform.ag" #-}- []- {-# LINE 3591 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 99, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 99 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3597 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 130, column 28)- _lhsOcollectedFields =- ({-# LINE 130 "src-ag/Transform.ag" #-}- []- {-# LINE 3603 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 161, column 32)- _lhsOcollectedInsts =- ({-# LINE 161 "src-ag/Transform.ag" #-}- _altsIcollectedInsts- {-# LINE 3609 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1283, column 28)- _lhsOcollectedMacros =- ({-# LINE 1283 "src-ag/Transform.ag" #-}- []- {-# LINE 3615 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 165, column 32)- _lhsOcollectedMerges =- ({-# LINE 165 "src-ag/Transform.ag" #-}- _altsIcollectedMerges- {-# LINE 3621 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 91, column 50)- _lhsOcollectedNames =- ({-# LINE 91 "src-ag/Transform.ag" #-}- _namesIcollectedNames- {-# LINE 3627 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 159, column 32)- _lhsOcollectedRules =- ({-# LINE 159 "src-ag/Transform.ag" #-}- _altsIcollectedRules- {-# LINE 3633 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 90, column 50)- _lhsOcollectedSetNames =- ({-# LINE 90 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 3639 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 160, column 32)- _lhsOcollectedSigs =- ({-# LINE 160 "src-ag/Transform.ag" #-}- _altsIcollectedSigs- {-# LINE 3645 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 162, column 32)- _lhsOcollectedUniques =- ({-# LINE 162 "src-ag/Transform.ag" #-}- _altsIcollectedUniques- {-# LINE 3651 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 990, column 33)- _lhsOderivings =- ({-# LINE 990 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3657 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- _namesIerrors Seq.>< _attrsIerrors Seq.>< _altsIerrors- {-# LINE 3663 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1187, column 37)- _lhsOmoduleDecl =- ({-# LINE 1187 "src-ag/Transform.ag" #-}- mzero- {-# LINE 3669 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 925, column 37)- _lhsOparamsCollect =- ({-# LINE 925 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3675 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 787, column 34)- _lhsOpragmas =- ({-# LINE 787 "src-ag/Transform.ag" #-}- id- {-# LINE 3681 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 865, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 865 "src-ag/Transform.ag" #-}- _altsIsemPragmasCollect- {-# LINE 3687 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 626, column 32)- _lhsOtypeSyns =- ({-# LINE 626 "src-ag/Transform.ag" #-}- []- {-# LINE 3693 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 145, column 15)- _lhsOuseMap =- ({-# LINE 145 "src-ag/Transform.ag" #-}- _attrsIuseMap- {-# LINE 3699 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 771, column 32)- _lhsOwrappers =- ({-# LINE 771 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 3705 "src-ag/Transform.hs" #-}- )- -- copy rule (up)- _lhsOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _attrsIattrDecls- {-# LINE 3711 "src-ag/Transform.hs" #-}- )- -- copy rule (up)- _lhsOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _attrsIattrs- {-# LINE 3717 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 109 "src-ag/Transform.ag" #-}- _lhsIdefSets- {-# LINE 3723 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _namesOallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 3729 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _namesOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 3735 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _namesOdefinedSets =- ({-# LINE 112 "src-ag/Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 3741 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _attrsOallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 3747 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _attrsOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 3753 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _attrsOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _lhsIattrDecls- {-# LINE 3759 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _attrsOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _lhsIattrs- {-# LINE 3765 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _attrsOoptions =- ({-# LINE 40 "src-ag/Transform.ag" #-}- _lhsIoptions- {-# LINE 3771 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _altsOallAttrDecls =- ({-# LINE 894 "src-ag/Transform.ag" #-}- _lhsIallAttrDecls- {-# LINE 3777 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _altsOallAttrs =- ({-# LINE 1306 "src-ag/Transform.ag" #-}- _lhsIallAttrs- {-# LINE 3783 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _altsOallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 3789 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _altsOoptions =- ({-# LINE 40 "src-ag/Transform.ag" #-}- _lhsIoptions- {-# LINE 3795 "src-ag/Transform.hs" #-}- )- ( _namesIcollectedNames,_namesIerrors,_namesInontSet) =- names_ _namesOallFields _namesOallNonterminals _namesOdefinedSets - ( _attrsIattrDecls,_attrsIattrs,_attrsIerrors,_attrsIuseMap) =- attrs_ _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOattrs _attrsOnts _attrsOoptions - ( _altsIattrOrderCollect,_altsIcollectedArounds,_altsIcollectedAugments,_altsIcollectedInsts,_altsIcollectedMerges,_altsIcollectedRules,_altsIcollectedSigs,_altsIcollectedUniques,_altsIerrors,_altsIsemPragmasCollect) =- alts_ _altsOallAttrDecls _altsOallAttrs _altsOallFields _altsOnts _altsOoptions - in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Set :: Pos ->- NontermIdent ->- Bool ->- T_NontSet ->- T_Elem -sem_Elem_Set pos_ name_ merge_ (T_NontSet set_ ) =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallAttrs- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIattrs- _lhsIdefSets- _lhsIdefinedSets- _lhsIoptions ->- (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]) ])- _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOctxCollect :: ContextMap- _lhsOderivings :: Derivings- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOquantCollect :: QuantMap- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOattrs :: (Map NontermIdent (Attributes, Attributes))- _setOallFields :: DataTypes- _setOallNonterminals :: (Set NontermIdent)- _setOdefinedSets :: DefinedSets- _setIcollectedNames :: (Set Identifier)- _setIerrors :: (Seq Error)- _setInontSet :: (Set NontermIdent)- -- "src-ag/Transform.ag"(line 582, column 10)- _lhsOcollectedSetNames =- ({-# LINE 582 "src-ag/Transform.ag" #-}- Set.singleton name_- {-# LINE 3860 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 699, column 13)- __tup3 =- ({-# LINE 699 "src-ag/Transform.ag" #-}- let allUsedNames = Set.unions [ maybe (Set.singleton n)- snd- (Map.lookup n _lhsIdefSets)- | n <- Set.toList _setIcollectedNames- ]- (nontSet,e1) | Set.member name_ allUsedNames- = (Set.empty, Seq.singleton(CyclicSet name_))- | otherwise = (_setInontSet, Seq.empty)- (res, e2) = let toAdd = (nontSet,Set.insert name_ allUsedNames)- union (a,b) (c,d) = (a `Set.union` c, b `Set.union` d)- in if Set.member name_ _lhsIallNonterminals || not merge_- then checkDuplicate DupSet name_ toAdd _lhsIdefSets- else (Map.insertWith union name_ toAdd _lhsIdefSets, Seq.empty)- in (res, e1 Seq.>< e2)- {-# LINE 3879 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 699, column 13)- (_defSets2,_) =- ({-# LINE 699 "src-ag/Transform.ag" #-}- __tup3- {-# LINE 3885 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 699, column 13)- (_,_errs) =- ({-# LINE 699 "src-ag/Transform.ag" #-}- __tup3- {-# LINE 3891 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 713, column 9)- _lhsOdefSets =- ({-# LINE 713 "src-ag/Transform.ag" #-}- _defSets2- {-# LINE 3897 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 713, column 9)- _lhsOerrors =- ({-# LINE 714 "src-ag/Transform.ag" #-}- _errs >< _setIerrors- {-# LINE 3903 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 893, column 55)- _lhsOattrOrderCollect =- ({-# LINE 893 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3909 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 46, column 19)- _lhsOblocks =- ({-# LINE 46 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3915 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 164, column 32)- _lhsOcollectedArounds =- ({-# LINE 164 "src-ag/Transform.ag" #-}- []- {-# LINE 3921 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 163, column 32)- _lhsOcollectedAugments =- ({-# LINE 163 "src-ag/Transform.ag" #-}- []- {-# LINE 3927 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 132, column 31)- _lhsOcollectedConParams =- ({-# LINE 132 "src-ag/Transform.ag" #-}- []- {-# LINE 3933 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 131, column 33)- _lhsOcollectedConstraints =- ({-# LINE 131 "src-ag/Transform.ag" #-}- []- {-# LINE 3939 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 99, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 99 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3945 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 130, column 28)- _lhsOcollectedFields =- ({-# LINE 130 "src-ag/Transform.ag" #-}- []- {-# LINE 3951 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 161, column 32)- _lhsOcollectedInsts =- ({-# LINE 161 "src-ag/Transform.ag" #-}- []- {-# LINE 3957 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1283, column 28)- _lhsOcollectedMacros =- ({-# LINE 1283 "src-ag/Transform.ag" #-}- []- {-# LINE 3963 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 165, column 32)- _lhsOcollectedMerges =- ({-# LINE 165 "src-ag/Transform.ag" #-}- []- {-# LINE 3969 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 91, column 50)- _lhsOcollectedNames =- ({-# LINE 91 "src-ag/Transform.ag" #-}- _setIcollectedNames- {-# LINE 3975 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 159, column 32)- _lhsOcollectedRules =- ({-# LINE 159 "src-ag/Transform.ag" #-}- []- {-# LINE 3981 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 160, column 32)- _lhsOcollectedSigs =- ({-# LINE 160 "src-ag/Transform.ag" #-}- []- {-# LINE 3987 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 162, column 32)- _lhsOcollectedUniques =- ({-# LINE 162 "src-ag/Transform.ag" #-}- []- {-# LINE 3993 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 948, column 34)- _lhsOctxCollect =- ({-# LINE 948 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 3999 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 990, column 33)- _lhsOderivings =- ({-# LINE 990 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4005 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1187, column 37)- _lhsOmoduleDecl =- ({-# LINE 1187 "src-ag/Transform.ag" #-}- mzero- {-# LINE 4011 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 925, column 37)- _lhsOparamsCollect =- ({-# LINE 925 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4017 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 787, column 34)- _lhsOpragmas =- ({-# LINE 787 "src-ag/Transform.ag" #-}- id- {-# LINE 4023 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 973, column 36)- _lhsOquantCollect =- ({-# LINE 973 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4029 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 865, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 865 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4035 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 626, column 32)- _lhsOtypeSyns =- ({-# LINE 626 "src-ag/Transform.ag" #-}- []- {-# LINE 4041 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 145, column 15)- _lhsOuseMap =- ({-# LINE 145 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4047 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 771, column 32)- _lhsOwrappers =- ({-# LINE 771 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 4053 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _lhsIattrDecls- {-# LINE 4059 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _lhsIattrs- {-# LINE 4065 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _setOallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 4071 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _setOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 4077 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _setOdefinedSets =- ({-# LINE 112 "src-ag/Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 4083 "src-ag/Transform.hs" #-}- )- ( _setIcollectedNames,_setIerrors,_setInontSet) =- set_ _setOallFields _setOallNonterminals _setOdefinedSets - in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Txt :: Pos ->- BlockKind ->- (Maybe NontermIdent) ->- ([String]) ->- T_Elem -sem_Elem_Txt pos_ kind_ mbNt_ lines_ =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallAttrs- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIattrs- _lhsIdefSets- _lhsIdefinedSets- _lhsIoptions ->- (let _lhsOblocks :: Blocks- _lhsOerrors :: (Seq Error)- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOctxCollect :: ContextMap- _lhsOderivings :: Derivings- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOquantCollect :: QuantMap- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOattrs :: (Map NontermIdent (Attributes, Attributes))- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- -- "src-ag/Transform.ag"(line 188, column 10)- _blockInfo =- ({-# LINE 188 "src-ag/Transform.ag" #-}- ( kind_- , mbNt_- )- {-# LINE 4140 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 191, column 10)- _blockValue =- ({-# LINE 191 "src-ag/Transform.ag" #-}- [(lines_, pos_)]- {-# LINE 4146 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 192, column 10)- _lhsOblocks =- ({-# LINE 192 "src-ag/Transform.ag" #-}- Map.singleton _blockInfo _blockValue- {-# LINE 4152 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 193, column 10)- _lhsOerrors =- ({-# LINE 193 "src-ag/Transform.ag" #-}- if checkParseBlock _lhsIoptions- then let exp = Expression pos_ tks- tks = [tk]- tk = HsToken (unlines lines_) pos_- in Seq.fromList $ checkBlock $ exp- else Seq.empty- {-# LINE 4163 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 893, column 55)- _lhsOattrOrderCollect =- ({-# LINE 893 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4169 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 164, column 32)- _lhsOcollectedArounds =- ({-# LINE 164 "src-ag/Transform.ag" #-}- []- {-# LINE 4175 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 163, column 32)- _lhsOcollectedAugments =- ({-# LINE 163 "src-ag/Transform.ag" #-}- []- {-# LINE 4181 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 132, column 31)- _lhsOcollectedConParams =- ({-# LINE 132 "src-ag/Transform.ag" #-}- []- {-# LINE 4187 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 131, column 33)- _lhsOcollectedConstraints =- ({-# LINE 131 "src-ag/Transform.ag" #-}- []- {-# LINE 4193 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 99, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 99 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4199 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 130, column 28)- _lhsOcollectedFields =- ({-# LINE 130 "src-ag/Transform.ag" #-}- []- {-# LINE 4205 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 161, column 32)- _lhsOcollectedInsts =- ({-# LINE 161 "src-ag/Transform.ag" #-}- []- {-# LINE 4211 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1283, column 28)- _lhsOcollectedMacros =- ({-# LINE 1283 "src-ag/Transform.ag" #-}- []- {-# LINE 4217 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 165, column 32)- _lhsOcollectedMerges =- ({-# LINE 165 "src-ag/Transform.ag" #-}- []- {-# LINE 4223 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 91, column 50)- _lhsOcollectedNames =- ({-# LINE 91 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 4229 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 159, column 32)- _lhsOcollectedRules =- ({-# LINE 159 "src-ag/Transform.ag" #-}- []- {-# LINE 4235 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 90, column 50)- _lhsOcollectedSetNames =- ({-# LINE 90 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 4241 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 160, column 32)- _lhsOcollectedSigs =- ({-# LINE 160 "src-ag/Transform.ag" #-}- []- {-# LINE 4247 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 162, column 32)- _lhsOcollectedUniques =- ({-# LINE 162 "src-ag/Transform.ag" #-}- []- {-# LINE 4253 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 948, column 34)- _lhsOctxCollect =- ({-# LINE 948 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4259 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 990, column 33)- _lhsOderivings =- ({-# LINE 990 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4265 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1187, column 37)- _lhsOmoduleDecl =- ({-# LINE 1187 "src-ag/Transform.ag" #-}- mzero- {-# LINE 4271 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 925, column 37)- _lhsOparamsCollect =- ({-# LINE 925 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4277 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 787, column 34)- _lhsOpragmas =- ({-# LINE 787 "src-ag/Transform.ag" #-}- id- {-# LINE 4283 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 973, column 36)- _lhsOquantCollect =- ({-# LINE 973 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4289 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 865, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 865 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4295 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 626, column 32)- _lhsOtypeSyns =- ({-# LINE 626 "src-ag/Transform.ag" #-}- []- {-# LINE 4301 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 145, column 15)- _lhsOuseMap =- ({-# LINE 145 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4307 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 771, column 32)- _lhsOwrappers =- ({-# LINE 771 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 4313 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _lhsIattrDecls- {-# LINE 4319 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _lhsIattrs- {-# LINE 4325 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 109 "src-ag/Transform.ag" #-}- _lhsIdefSets- {-# LINE 4331 "src-ag/Transform.hs" #-}- )- in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Type :: Pos ->- ClassContext ->- NontermIdent ->- ([Identifier]) ->- ComplexType ->- T_Elem -sem_Elem_Type pos_ ctx_ name_ params_ type_ =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallAttrs- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIattrs- _lhsIdefSets- _lhsIdefinedSets- _lhsIoptions ->- (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]) ])- _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOpragmas :: (Options -> Options)- _lhsOquantCollect :: QuantMap- _lhsOsemPragmasCollect :: PragmaMap- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOattrs :: (Map NontermIdent (Attributes, Attributes))- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- -- "src-ag/Transform.ag"(line 255, column 10)- _lhsOcollectedFields =- ({-# LINE 255 "src-ag/Transform.ag" #-}- map (\(x,y)->(name_, x, y)) _expanded- {-# LINE 4385 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 585, column 11)- _lhsOcollectedNames =- ({-# LINE 585 "src-ag/Transform.ag" #-}- Set.singleton name_- {-# LINE 4391 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 639, column 11)- _expanded =- ({-# LINE 639 "src-ag/Transform.ag" #-}- case _argType of- List tp -> [(Ident "Cons" pos_, [(Ident "hd" pos_, tp)- ,(Ident "tl" pos_, NT name_ (map getName params_) False)- ]- )- ,(Ident "Nil" pos_, [])- ]- Maybe tp -> [(Ident "Just" pos_, [(Ident "just" pos_, tp)- ]- )- ,(Ident "Nothing" pos_, [])- ]- Either tp1 tp2 -> [- (Ident "Left" pos_, [(Ident "left" pos_, tp1) ])- , (Ident "Right" pos_, [(Ident "right" pos_, tp2) ])- ]- Map tp1 tp2 -> [ (Ident "Entry" pos_, [ (Ident "key" pos_, tp1)- , (Ident "val" pos_, tp2)- , (Ident "tl" pos_, NT name_ (map getName params_) False)- ])- , (Ident "Nil" pos_, [])- ]- IntMap tp -> [ (Ident "Entry" pos_, [ (Ident "key" pos_, Haskell "Int")- , (Ident "val" pos_, tp)- , (Ident "tl" pos_, NT name_ (map getName params_) False)- ])- , (Ident "Nil" pos_, [])- ]- OrdSet tp -> [ (Ident "Entry" pos_, [ (Ident "val" pos_, tp)- , (Ident "tl" pos_, NT name_ (map getName params_) False) ])- , (Ident "Nil" pos_, [])- ]- IntSet -> [ (Ident "Entry" pos_, [ (Ident "val" pos_, Haskell "Int")- , (Ident "tl" pos_, NT name_ (map getName params_) False) ])- , (Ident "Nil" pos_, [])- ]- Tuple xs -> [(Ident "Tuple" pos_, xs)]- {-# LINE 4433 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 676, column 11)- _argType =- ({-# LINE 676 "src-ag/Transform.ag" #-}- case type_ of- Maybe tp -> Maybe ( makeType _lhsIallNonterminals tp)- Either tp1 tp2 -> Either ( makeType _lhsIallNonterminals tp1) (makeType _lhsIallNonterminals tp2)- List tp -> List ( makeType _lhsIallNonterminals tp)- Tuple xs -> Tuple [(f,makeType _lhsIallNonterminals tp) | (f,tp) <- xs]- Map tp1 tp2 -> Map ( makeType _lhsIallNonterminals tp1) (makeType _lhsIallNonterminals tp2)- IntMap tp -> IntMap ( makeType _lhsIallNonterminals tp)- OrdSet tp -> OrdSet ( makeType _lhsIallNonterminals tp)- IntSet -> IntSet- {-# LINE 4447 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 685, column 11)- _lhsOtypeSyns =- ({-# LINE 685 "src-ag/Transform.ag" #-}- [(name_,_argType)]- {-# LINE 4453 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 935, column 7)- _lhsOparamsCollect =- ({-# LINE 935 "src-ag/Transform.ag" #-}- if null params_- then Map.empty- else Map.singleton name_ params_- {-# LINE 4461 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 958, column 7)- _lhsOctxCollect =- ({-# LINE 958 "src-ag/Transform.ag" #-}- if null ctx_- then Map.empty- else Map.singleton name_ ctx_- {-# LINE 4469 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 893, column 55)- _lhsOattrOrderCollect =- ({-# LINE 893 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4475 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 46, column 19)- _lhsOblocks =- ({-# LINE 46 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4481 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 164, column 32)- _lhsOcollectedArounds =- ({-# LINE 164 "src-ag/Transform.ag" #-}- []- {-# LINE 4487 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 163, column 32)- _lhsOcollectedAugments =- ({-# LINE 163 "src-ag/Transform.ag" #-}- []- {-# LINE 4493 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 132, column 31)- _lhsOcollectedConParams =- ({-# LINE 132 "src-ag/Transform.ag" #-}- []- {-# LINE 4499 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 131, column 33)- _lhsOcollectedConstraints =- ({-# LINE 131 "src-ag/Transform.ag" #-}- []- {-# LINE 4505 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 99, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 99 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4511 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 161, column 32)- _lhsOcollectedInsts =- ({-# LINE 161 "src-ag/Transform.ag" #-}- []- {-# LINE 4517 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1283, column 28)- _lhsOcollectedMacros =- ({-# LINE 1283 "src-ag/Transform.ag" #-}- []- {-# LINE 4523 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 165, column 32)- _lhsOcollectedMerges =- ({-# LINE 165 "src-ag/Transform.ag" #-}- []- {-# LINE 4529 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 159, column 32)- _lhsOcollectedRules =- ({-# LINE 159 "src-ag/Transform.ag" #-}- []- {-# LINE 4535 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 90, column 50)- _lhsOcollectedSetNames =- ({-# LINE 90 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 4541 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 160, column 32)- _lhsOcollectedSigs =- ({-# LINE 160 "src-ag/Transform.ag" #-}- []- {-# LINE 4547 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 162, column 32)- _lhsOcollectedUniques =- ({-# LINE 162 "src-ag/Transform.ag" #-}- []- {-# LINE 4553 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 990, column 33)- _lhsOderivings =- ({-# LINE 990 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4559 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- Seq.empty- {-# LINE 4565 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1187, column 37)- _lhsOmoduleDecl =- ({-# LINE 1187 "src-ag/Transform.ag" #-}- mzero- {-# LINE 4571 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 787, column 34)- _lhsOpragmas =- ({-# LINE 787 "src-ag/Transform.ag" #-}- id- {-# LINE 4577 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 973, column 36)- _lhsOquantCollect =- ({-# LINE 973 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4583 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 865, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 865 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4589 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 145, column 15)- _lhsOuseMap =- ({-# LINE 145 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4595 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 771, column 32)- _lhsOwrappers =- ({-# LINE 771 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 4601 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _lhsIattrDecls- {-# LINE 4607 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _lhsIattrs- {-# LINE 4613 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 109 "src-ag/Transform.ag" #-}- _lhsIdefSets- {-# LINE 4619 "src-ag/Transform.hs" #-}- )- in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Wrapper :: Pos ->- T_NontSet ->- T_Elem -sem_Elem_Wrapper pos_ (T_NontSet set_ ) =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallAttrs- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIattrs- _lhsIdefSets- _lhsIdefinedSets- _lhsIoptions ->- (let _lhsOwrappers :: (Set NontermIdent)- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOctxCollect :: ContextMap- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOquantCollect :: QuantMap- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOattrs :: (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)- -- "src-ag/Transform.ag"(line 774, column 13)- _lhsOwrappers =- ({-# LINE 774 "src-ag/Transform.ag" #-}- _setInontSet- {-# LINE 4676 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 893, column 55)- _lhsOattrOrderCollect =- ({-# LINE 893 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4682 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 46, column 19)- _lhsOblocks =- ({-# LINE 46 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4688 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 164, column 32)- _lhsOcollectedArounds =- ({-# LINE 164 "src-ag/Transform.ag" #-}- []- {-# LINE 4694 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 163, column 32)- _lhsOcollectedAugments =- ({-# LINE 163 "src-ag/Transform.ag" #-}- []- {-# LINE 4700 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 132, column 31)- _lhsOcollectedConParams =- ({-# LINE 132 "src-ag/Transform.ag" #-}- []- {-# LINE 4706 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 131, column 33)- _lhsOcollectedConstraints =- ({-# LINE 131 "src-ag/Transform.ag" #-}- []- {-# LINE 4712 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 99, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 99 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4718 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 130, column 28)- _lhsOcollectedFields =- ({-# LINE 130 "src-ag/Transform.ag" #-}- []- {-# LINE 4724 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 161, column 32)- _lhsOcollectedInsts =- ({-# LINE 161 "src-ag/Transform.ag" #-}- []- {-# LINE 4730 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1283, column 28)- _lhsOcollectedMacros =- ({-# LINE 1283 "src-ag/Transform.ag" #-}- []- {-# LINE 4736 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 165, column 32)- _lhsOcollectedMerges =- ({-# LINE 165 "src-ag/Transform.ag" #-}- []- {-# LINE 4742 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 91, column 50)- _lhsOcollectedNames =- ({-# LINE 91 "src-ag/Transform.ag" #-}- _setIcollectedNames- {-# LINE 4748 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 159, column 32)- _lhsOcollectedRules =- ({-# LINE 159 "src-ag/Transform.ag" #-}- []- {-# LINE 4754 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 90, column 50)- _lhsOcollectedSetNames =- ({-# LINE 90 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 4760 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 160, column 32)- _lhsOcollectedSigs =- ({-# LINE 160 "src-ag/Transform.ag" #-}- []- {-# LINE 4766 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 162, column 32)- _lhsOcollectedUniques =- ({-# LINE 162 "src-ag/Transform.ag" #-}- []- {-# LINE 4772 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 948, column 34)- _lhsOctxCollect =- ({-# LINE 948 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4778 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 990, column 33)- _lhsOderivings =- ({-# LINE 990 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4784 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- _setIerrors- {-# LINE 4790 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1187, column 37)- _lhsOmoduleDecl =- ({-# LINE 1187 "src-ag/Transform.ag" #-}- mzero- {-# LINE 4796 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 925, column 37)- _lhsOparamsCollect =- ({-# LINE 925 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4802 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 787, column 34)- _lhsOpragmas =- ({-# LINE 787 "src-ag/Transform.ag" #-}- id- {-# LINE 4808 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 973, column 36)- _lhsOquantCollect =- ({-# LINE 973 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4814 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 865, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 865 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4820 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 626, column 32)- _lhsOtypeSyns =- ({-# LINE 626 "src-ag/Transform.ag" #-}- []- {-# LINE 4826 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 145, column 15)- _lhsOuseMap =- ({-# LINE 145 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 4832 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _lhsIattrDecls- {-# LINE 4838 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _lhsIattrs- {-# LINE 4844 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 109 "src-ag/Transform.ag" #-}- _lhsIdefSets- {-# LINE 4850 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _setOallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 4856 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _setOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 4862 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _setOdefinedSets =- ({-# LINE 112 "src-ag/Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 4868 "src-ag/Transform.hs" #-}- )- ( _setIcollectedNames,_setIerrors,_setInontSet) =- set_ _setOallFields _setOallNonterminals _setOdefinedSets - in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )--- Elems --------------------------------------------------------{-- visit 0:- inherited attributes:- allAttrDecls : Map NontermIdent (Attributes, Attributes)- allAttrs : Map NontermIdent (Attributes, Attributes)- allConstructors : Map NontermIdent (Set ConstructorIdent)- allFields : DataTypes- allNonterminals : Set NontermIdent- definedSets : DefinedSets- options : Options- chained attributes:- attrDecls : Map NontermIdent (Attributes, Attributes)- attrs : 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]) ]- collectedConParams : [(NontermIdent, ConstructorIdent, Set Identifier)]- collectedConstraints : [(NontermIdent, ConstructorIdent, [Type])]- collectedConstructorsMap : Map NontermIdent (Set ConstructorIdent)- collectedFields : [(NontermIdent, ConstructorIdent, FieldMap)]- collectedInsts : [ (NontermIdent, ConstructorIdent, [Identifier]) ]- collectedMacros : [(NontermIdent, ConstructorIdent, MaybeMacro)]- collectedMerges : [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- collectedNames : Set Identifier- collectedRules : [ (NontermIdent, ConstructorIdent, RuleInfo)]- collectedSetNames : Set Identifier- collectedSigs : [ (NontermIdent, ConstructorIdent, SigInfo) ]- collectedUniques : [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- ctxCollect : ContextMap- derivings : Derivings- errors : Seq Error- moduleDecl : Maybe (String,String,String)- paramsCollect : ParamMap- pragmas : Options -> Options- quantCollect : QuantMap- 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 (Attributes, Attributes)) ->- (Map NontermIdent (Set ConstructorIdent)) ->- DataTypes ->- (Set NontermIdent) ->- (Map NontermIdent (Attributes, Attributes)) ->- (Map NontermIdent (Attributes, Attributes)) ->- (Map Identifier (Set NontermIdent,Set Identifier)) ->- DefinedSets ->- Options ->- ( (Map NontermIdent (Attributes, Attributes)),AttrOrderMap,(Map NontermIdent (Attributes, Attributes)),Blocks,([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]),([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]),([(NontermIdent, ConstructorIdent, Set Identifier)]),([(NontermIdent, ConstructorIdent, [Type])]),(Map NontermIdent (Set ConstructorIdent)),([(NontermIdent, ConstructorIdent, FieldMap)]),([ (NontermIdent, ConstructorIdent, [Identifier]) ]),([(NontermIdent, ConstructorIdent, MaybeMacro)]),([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]),(Set Identifier),([ (NontermIdent, ConstructorIdent, RuleInfo)]),(Set Identifier),([ (NontermIdent, ConstructorIdent, SigInfo) ]),([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]),ContextMap,(Map Identifier (Set NontermIdent,Set Identifier)),Derivings,(Seq Error),(Maybe (String,String,String)),ParamMap,(Options -> Options),QuantMap,PragmaMap,TypeSyns,(Map NontermIdent (Map Identifier (String,String,String))),(Set NontermIdent)))-data Inh_Elems = Inh_Elems {allAttrDecls_Inh_Elems :: !((Map NontermIdent (Attributes, Attributes))),allAttrs_Inh_Elems :: !((Map NontermIdent (Attributes, Attributes))),allConstructors_Inh_Elems :: !((Map NontermIdent (Set ConstructorIdent))),allFields_Inh_Elems :: !(DataTypes),allNonterminals_Inh_Elems :: !((Set NontermIdent)),attrDecls_Inh_Elems :: !((Map NontermIdent (Attributes, Attributes))),attrs_Inh_Elems :: !((Map NontermIdent (Attributes, Attributes))),defSets_Inh_Elems :: !((Map Identifier (Set NontermIdent,Set Identifier))),definedSets_Inh_Elems :: !(DefinedSets),options_Inh_Elems :: !(Options)}-data Syn_Elems = Syn_Elems {attrDecls_Syn_Elems :: !((Map NontermIdent (Attributes, Attributes))),attrOrderCollect_Syn_Elems :: !(AttrOrderMap),attrs_Syn_Elems :: !((Map NontermIdent (Attributes, Attributes))),blocks_Syn_Elems :: !(Blocks),collectedArounds_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])),collectedAugments_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])),collectedConParams_Syn_Elems :: !(([(NontermIdent, ConstructorIdent, Set Identifier)])),collectedConstraints_Syn_Elems :: !(([(NontermIdent, ConstructorIdent, [Type])])),collectedConstructorsMap_Syn_Elems :: !((Map NontermIdent (Set ConstructorIdent))),collectedFields_Syn_Elems :: !(([(NontermIdent, ConstructorIdent, FieldMap)])),collectedInsts_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, [Identifier]) ])),collectedMacros_Syn_Elems :: !(([(NontermIdent, ConstructorIdent, MaybeMacro)])),collectedMerges_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])),collectedNames_Syn_Elems :: !((Set Identifier)),collectedRules_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, RuleInfo)])),collectedSetNames_Syn_Elems :: !((Set Identifier)),collectedSigs_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, SigInfo) ])),collectedUniques_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])),ctxCollect_Syn_Elems :: !(ContextMap),defSets_Syn_Elems :: !((Map Identifier (Set NontermIdent,Set Identifier))),derivings_Syn_Elems :: !(Derivings),errors_Syn_Elems :: !((Seq Error)),moduleDecl_Syn_Elems :: !((Maybe (String,String,String))),paramsCollect_Syn_Elems :: !(ParamMap),pragmas_Syn_Elems :: !((Options -> Options)),quantCollect_Syn_Elems :: !(QuantMap),semPragmasCollect_Syn_Elems :: !(PragmaMap),typeSyns_Syn_Elems :: !(TypeSyns),useMap_Syn_Elems :: !((Map NontermIdent (Map Identifier (String,String,String)))),wrappers_Syn_Elems :: !((Set NontermIdent))}-wrap_Elems :: T_Elems ->- Inh_Elems ->- Syn_Elems -wrap_Elems (T_Elems sem ) (Inh_Elems _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions ) =- (let ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers) = sem _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions - in (Syn_Elems _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers ))-sem_Elems_Cons :: T_Elem ->- T_Elems ->- T_Elems -sem_Elems_Cons (T_Elem hd_ ) (T_Elems tl_ ) =- (T_Elems (\ _lhsIallAttrDecls- _lhsIallAttrs- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIattrs- _lhsIdefSets- _lhsIdefinedSets- _lhsIoptions ->- (let _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOctxCollect :: ContextMap- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOquantCollect :: QuantMap- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOattrs :: (Map NontermIdent (Attributes, Attributes))- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _hdOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))- _hdOallAttrs :: (Map NontermIdent (Attributes, Attributes))- _hdOallConstructors :: (Map NontermIdent (Set ConstructorIdent))- _hdOallFields :: DataTypes- _hdOallNonterminals :: (Set NontermIdent)- _hdOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _hdOattrs :: (Map NontermIdent (Attributes, Attributes))- _hdOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _hdOdefinedSets :: DefinedSets- _hdOoptions :: Options- _tlOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))- _tlOallAttrs :: (Map NontermIdent (Attributes, Attributes))- _tlOallConstructors :: (Map NontermIdent (Set ConstructorIdent))- _tlOallFields :: DataTypes- _tlOallNonterminals :: (Set NontermIdent)- _tlOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _tlOattrs :: (Map NontermIdent (Attributes, Attributes))- _tlOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _tlOdefinedSets :: DefinedSets- _tlOoptions :: Options- _hdIattrDecls :: (Map NontermIdent (Attributes, Attributes))- _hdIattrOrderCollect :: AttrOrderMap- _hdIattrs :: (Map NontermIdent (Attributes, Attributes))- _hdIblocks :: Blocks- _hdIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _hdIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _hdIcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _hdIcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _hdIcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _hdIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _hdIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _hdIcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _hdIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _hdIcollectedNames :: (Set Identifier)- _hdIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _hdIcollectedSetNames :: (Set Identifier)- _hdIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _hdIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _hdIctxCollect :: ContextMap- _hdIdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _hdIderivings :: Derivings- _hdIerrors :: (Seq Error)- _hdImoduleDecl :: (Maybe (String,String,String))- _hdIparamsCollect :: ParamMap- _hdIpragmas :: (Options -> Options)- _hdIquantCollect :: QuantMap- _hdIsemPragmasCollect :: PragmaMap- _hdItypeSyns :: TypeSyns- _hdIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _hdIwrappers :: (Set NontermIdent)- _tlIattrDecls :: (Map NontermIdent (Attributes, Attributes))- _tlIattrOrderCollect :: AttrOrderMap- _tlIattrs :: (Map NontermIdent (Attributes, Attributes))- _tlIblocks :: Blocks- _tlIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _tlIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _tlIcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _tlIcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _tlIcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _tlIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _tlIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _tlIcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _tlIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _tlIcollectedNames :: (Set Identifier)- _tlIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _tlIcollectedSetNames :: (Set Identifier)- _tlIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _tlIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _tlIctxCollect :: ContextMap- _tlIdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _tlIderivings :: Derivings- _tlIerrors :: (Seq Error)- _tlImoduleDecl :: (Maybe (String,String,String))- _tlIparamsCollect :: ParamMap- _tlIpragmas :: (Options -> Options)- _tlIquantCollect :: QuantMap- _tlIsemPragmasCollect :: PragmaMap- _tlItypeSyns :: TypeSyns- _tlIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _tlIwrappers :: (Set NontermIdent)- -- use rule "src-ag/Transform.ag"(line 893, column 55)- _lhsOattrOrderCollect =- ({-# LINE 893 "src-ag/Transform.ag" #-}- _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect- {-# LINE 5075 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 46, column 19)- _lhsOblocks =- ({-# LINE 46 "src-ag/Transform.ag" #-}- _hdIblocks `mapUnionWithPlusPlus` _tlIblocks- {-# LINE 5081 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 164, column 32)- _lhsOcollectedArounds =- ({-# LINE 164 "src-ag/Transform.ag" #-}- _hdIcollectedArounds ++ _tlIcollectedArounds- {-# LINE 5087 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 163, column 32)- _lhsOcollectedAugments =- ({-# LINE 163 "src-ag/Transform.ag" #-}- _hdIcollectedAugments ++ _tlIcollectedAugments- {-# LINE 5093 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 132, column 31)- _lhsOcollectedConParams =- ({-# LINE 132 "src-ag/Transform.ag" #-}- _hdIcollectedConParams ++ _tlIcollectedConParams- {-# LINE 5099 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 131, column 33)- _lhsOcollectedConstraints =- ({-# LINE 131 "src-ag/Transform.ag" #-}- _hdIcollectedConstraints ++ _tlIcollectedConstraints- {-# LINE 5105 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 99, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 99 "src-ag/Transform.ag" #-}- _hdIcollectedConstructorsMap `mapUnionWithSetUnion` _tlIcollectedConstructorsMap- {-# LINE 5111 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 130, column 28)- _lhsOcollectedFields =- ({-# LINE 130 "src-ag/Transform.ag" #-}- _hdIcollectedFields ++ _tlIcollectedFields- {-# LINE 5117 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 161, column 32)- _lhsOcollectedInsts =- ({-# LINE 161 "src-ag/Transform.ag" #-}- _hdIcollectedInsts ++ _tlIcollectedInsts- {-# LINE 5123 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1283, column 28)- _lhsOcollectedMacros =- ({-# LINE 1283 "src-ag/Transform.ag" #-}- _hdIcollectedMacros ++ _tlIcollectedMacros- {-# LINE 5129 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 165, column 32)- _lhsOcollectedMerges =- ({-# LINE 165 "src-ag/Transform.ag" #-}- _hdIcollectedMerges ++ _tlIcollectedMerges- {-# LINE 5135 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 91, column 50)- _lhsOcollectedNames =- ({-# LINE 91 "src-ag/Transform.ag" #-}- _hdIcollectedNames `Set.union` _tlIcollectedNames- {-# LINE 5141 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 159, column 32)- _lhsOcollectedRules =- ({-# LINE 159 "src-ag/Transform.ag" #-}- _hdIcollectedRules ++ _tlIcollectedRules- {-# LINE 5147 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 90, column 50)- _lhsOcollectedSetNames =- ({-# LINE 90 "src-ag/Transform.ag" #-}- _hdIcollectedSetNames `Set.union` _tlIcollectedSetNames- {-# LINE 5153 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 160, column 32)- _lhsOcollectedSigs =- ({-# LINE 160 "src-ag/Transform.ag" #-}- _hdIcollectedSigs ++ _tlIcollectedSigs- {-# LINE 5159 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 162, column 32)- _lhsOcollectedUniques =- ({-# LINE 162 "src-ag/Transform.ag" #-}- _hdIcollectedUniques ++ _tlIcollectedUniques- {-# LINE 5165 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 948, column 34)- _lhsOctxCollect =- ({-# LINE 948 "src-ag/Transform.ag" #-}- _hdIctxCollect `mergeCtx` _tlIctxCollect- {-# LINE 5171 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 990, column 33)- _lhsOderivings =- ({-# LINE 990 "src-ag/Transform.ag" #-}- _hdIderivings `mergeDerivings` _tlIderivings- {-# LINE 5177 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 5183 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1187, column 37)- _lhsOmoduleDecl =- ({-# LINE 1187 "src-ag/Transform.ag" #-}- _hdImoduleDecl `mplus` _tlImoduleDecl- {-# LINE 5189 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 925, column 37)- _lhsOparamsCollect =- ({-# LINE 925 "src-ag/Transform.ag" #-}- _hdIparamsCollect `mergeParams` _tlIparamsCollect- {-# LINE 5195 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 787, column 34)- _lhsOpragmas =- ({-# LINE 787 "src-ag/Transform.ag" #-}- _hdIpragmas . _tlIpragmas- {-# LINE 5201 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 973, column 36)- _lhsOquantCollect =- ({-# LINE 973 "src-ag/Transform.ag" #-}- _hdIquantCollect `mergeQuant` _tlIquantCollect- {-# LINE 5207 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 865, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 865 "src-ag/Transform.ag" #-}- _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect- {-# LINE 5213 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 626, column 32)- _lhsOtypeSyns =- ({-# LINE 626 "src-ag/Transform.ag" #-}- _hdItypeSyns ++ _tlItypeSyns- {-# LINE 5219 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 145, column 15)- _lhsOuseMap =- ({-# LINE 145 "src-ag/Transform.ag" #-}- _hdIuseMap `merge` _tlIuseMap- {-# LINE 5225 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 771, column 32)- _lhsOwrappers =- ({-# LINE 771 "src-ag/Transform.ag" #-}- _hdIwrappers `Set.union` _tlIwrappers- {-# LINE 5231 "src-ag/Transform.hs" #-}- )- -- copy rule (up)- _lhsOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _tlIattrDecls- {-# LINE 5237 "src-ag/Transform.hs" #-}- )- -- copy rule (up)- _lhsOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _tlIattrs- {-# LINE 5243 "src-ag/Transform.hs" #-}- )- -- copy rule (up)- _lhsOdefSets =- ({-# LINE 109 "src-ag/Transform.ag" #-}- _tlIdefSets- {-# LINE 5249 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOallAttrDecls =- ({-# LINE 894 "src-ag/Transform.ag" #-}- _lhsIallAttrDecls- {-# LINE 5255 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOallAttrs =- ({-# LINE 1306 "src-ag/Transform.ag" #-}- _lhsIallAttrs- {-# LINE 5261 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOallConstructors =- ({-# LINE 101 "src-ag/Transform.ag" #-}- _lhsIallConstructors- {-# LINE 5267 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 5273 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 5279 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _lhsIattrDecls- {-# LINE 5285 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _lhsIattrs- {-# LINE 5291 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOdefSets =- ({-# LINE 109 "src-ag/Transform.ag" #-}- _lhsIdefSets- {-# LINE 5297 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOdefinedSets =- ({-# LINE 112 "src-ag/Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 5303 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 40 "src-ag/Transform.ag" #-}- _lhsIoptions- {-# LINE 5309 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _tlOallAttrDecls =- ({-# LINE 894 "src-ag/Transform.ag" #-}- _lhsIallAttrDecls- {-# LINE 5315 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _tlOallAttrs =- ({-# LINE 1306 "src-ag/Transform.ag" #-}- _lhsIallAttrs- {-# LINE 5321 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _tlOallConstructors =- ({-# LINE 101 "src-ag/Transform.ag" #-}- _lhsIallConstructors- {-# LINE 5327 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _tlOallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 5333 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _tlOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 5339 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _tlOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _hdIattrDecls- {-# LINE 5345 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _tlOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _hdIattrs- {-# LINE 5351 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _tlOdefSets =- ({-# LINE 109 "src-ag/Transform.ag" #-}- _hdIdefSets- {-# LINE 5357 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _tlOdefinedSets =- ({-# LINE 112 "src-ag/Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 5363 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 40 "src-ag/Transform.ag" #-}- _lhsIoptions- {-# LINE 5369 "src-ag/Transform.hs" #-}- )- ( _hdIattrDecls,_hdIattrOrderCollect,_hdIattrs,_hdIblocks,_hdIcollectedArounds,_hdIcollectedAugments,_hdIcollectedConParams,_hdIcollectedConstraints,_hdIcollectedConstructorsMap,_hdIcollectedFields,_hdIcollectedInsts,_hdIcollectedMacros,_hdIcollectedMerges,_hdIcollectedNames,_hdIcollectedRules,_hdIcollectedSetNames,_hdIcollectedSigs,_hdIcollectedUniques,_hdIctxCollect,_hdIdefSets,_hdIderivings,_hdIerrors,_hdImoduleDecl,_hdIparamsCollect,_hdIpragmas,_hdIquantCollect,_hdIsemPragmasCollect,_hdItypeSyns,_hdIuseMap,_hdIwrappers) =- hd_ _hdOallAttrDecls _hdOallAttrs _hdOallConstructors _hdOallFields _hdOallNonterminals _hdOattrDecls _hdOattrs _hdOdefSets _hdOdefinedSets _hdOoptions - ( _tlIattrDecls,_tlIattrOrderCollect,_tlIattrs,_tlIblocks,_tlIcollectedArounds,_tlIcollectedAugments,_tlIcollectedConParams,_tlIcollectedConstraints,_tlIcollectedConstructorsMap,_tlIcollectedFields,_tlIcollectedInsts,_tlIcollectedMacros,_tlIcollectedMerges,_tlIcollectedNames,_tlIcollectedRules,_tlIcollectedSetNames,_tlIcollectedSigs,_tlIcollectedUniques,_tlIctxCollect,_tlIdefSets,_tlIderivings,_tlIerrors,_tlImoduleDecl,_tlIparamsCollect,_tlIpragmas,_tlIquantCollect,_tlIsemPragmasCollect,_tlItypeSyns,_tlIuseMap,_tlIwrappers) =- tl_ _tlOallAttrDecls _tlOallAttrs _tlOallConstructors _tlOallFields _tlOallNonterminals _tlOattrDecls _tlOattrs _tlOdefSets _tlOdefinedSets _tlOoptions - in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elems_Nil :: T_Elems -sem_Elems_Nil =- (T_Elems (\ _lhsIallAttrDecls- _lhsIallAttrs- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIattrs- _lhsIdefSets- _lhsIdefinedSets- _lhsIoptions ->- (let _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])- _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOctxCollect :: ContextMap- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOquantCollect :: QuantMap- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOattrs :: (Map NontermIdent (Attributes, Attributes))- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- -- use rule "src-ag/Transform.ag"(line 893, column 55)- _lhsOattrOrderCollect =- ({-# LINE 893 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 5422 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 46, column 19)- _lhsOblocks =- ({-# LINE 46 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 5428 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 164, column 32)- _lhsOcollectedArounds =- ({-# LINE 164 "src-ag/Transform.ag" #-}- []- {-# LINE 5434 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 163, column 32)- _lhsOcollectedAugments =- ({-# LINE 163 "src-ag/Transform.ag" #-}- []- {-# LINE 5440 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 132, column 31)- _lhsOcollectedConParams =- ({-# LINE 132 "src-ag/Transform.ag" #-}- []- {-# LINE 5446 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 131, column 33)- _lhsOcollectedConstraints =- ({-# LINE 131 "src-ag/Transform.ag" #-}- []- {-# LINE 5452 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 99, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 99 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 5458 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 130, column 28)- _lhsOcollectedFields =- ({-# LINE 130 "src-ag/Transform.ag" #-}- []- {-# LINE 5464 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 161, column 32)- _lhsOcollectedInsts =- ({-# LINE 161 "src-ag/Transform.ag" #-}- []- {-# LINE 5470 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1283, column 28)- _lhsOcollectedMacros =- ({-# LINE 1283 "src-ag/Transform.ag" #-}- []- {-# LINE 5476 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 165, column 32)- _lhsOcollectedMerges =- ({-# LINE 165 "src-ag/Transform.ag" #-}- []- {-# LINE 5482 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 91, column 50)- _lhsOcollectedNames =- ({-# LINE 91 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 5488 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 159, column 32)- _lhsOcollectedRules =- ({-# LINE 159 "src-ag/Transform.ag" #-}- []- {-# LINE 5494 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 90, column 50)- _lhsOcollectedSetNames =- ({-# LINE 90 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 5500 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 160, column 32)- _lhsOcollectedSigs =- ({-# LINE 160 "src-ag/Transform.ag" #-}- []- {-# LINE 5506 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 162, column 32)- _lhsOcollectedUniques =- ({-# LINE 162 "src-ag/Transform.ag" #-}- []- {-# LINE 5512 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 948, column 34)- _lhsOctxCollect =- ({-# LINE 948 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 5518 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 990, column 33)- _lhsOderivings =- ({-# LINE 990 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 5524 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- Seq.empty- {-# LINE 5530 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1187, column 37)- _lhsOmoduleDecl =- ({-# LINE 1187 "src-ag/Transform.ag" #-}- mzero- {-# LINE 5536 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 925, column 37)- _lhsOparamsCollect =- ({-# LINE 925 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 5542 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 787, column 34)- _lhsOpragmas =- ({-# LINE 787 "src-ag/Transform.ag" #-}- id- {-# LINE 5548 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 973, column 36)- _lhsOquantCollect =- ({-# LINE 973 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 5554 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 865, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 865 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 5560 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 626, column 32)- _lhsOtypeSyns =- ({-# LINE 626 "src-ag/Transform.ag" #-}- []- {-# LINE 5566 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 145, column 15)- _lhsOuseMap =- ({-# LINE 145 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 5572 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 771, column 32)- _lhsOwrappers =- ({-# LINE 771 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 5578 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 144 "src-ag/Transform.ag" #-}- _lhsIattrDecls- {-# LINE 5584 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOattrs =- ({-# LINE 1316 "src-ag/Transform.ag" #-}- _lhsIattrs- {-# LINE 5590 "src-ag/Transform.hs" #-}- )- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 109 "src-ag/Transform.ag" #-}- _lhsIdefSets- {-# LINE 5596 "src-ag/Transform.hs" #-}- )- in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )--- Field --------------------------------------------------------{-- visit 0:- inherited attribute:- allNonterminals : Set NontermIdent- synthesized attributes:- collectedConstraints : [Type]- collectedFields : [(Identifier, Type)]- alternatives:- alternative FChild:- child name : {Identifier}- child tp : {Type}- alternative FCtx:- child tps : {[Type]}--}--- cata-sem_Field :: Field ->- T_Field -sem_Field (FChild _name _tp ) =- (sem_Field_FChild _name _tp )-sem_Field (FCtx _tps ) =- (sem_Field_FCtx _tps )--- semantic domain-newtype T_Field = T_Field ((Set NontermIdent) ->- ( ([Type]),([(Identifier, Type)])))-data Inh_Field = Inh_Field {allNonterminals_Inh_Field :: !((Set NontermIdent))}-data Syn_Field = Syn_Field {collectedConstraints_Syn_Field :: !(([Type])),collectedFields_Syn_Field :: !(([(Identifier, Type)]))}-wrap_Field :: T_Field ->- Inh_Field ->- Syn_Field -wrap_Field (T_Field sem ) (Inh_Field _lhsIallNonterminals ) =- (let ( _lhsOcollectedConstraints,_lhsOcollectedFields) = sem _lhsIallNonterminals - in (Syn_Field _lhsOcollectedConstraints _lhsOcollectedFields ))-sem_Field_FChild :: Identifier ->- Type ->- T_Field -sem_Field_FChild name_ tp_ =- (T_Field (\ _lhsIallNonterminals ->- (let _lhsOcollectedFields :: ([(Identifier, Type)])- _lhsOcollectedConstraints :: ([Type])- -- "src-ag/Transform.ag"(line 564, column 3)- _lhsOcollectedFields =- ({-# LINE 564 "src-ag/Transform.ag" #-}- [(name_, makeType _lhsIallNonterminals tp_)]- {-# LINE 5643 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 570, column 46)- _lhsOcollectedConstraints =- ({-# LINE 570 "src-ag/Transform.ag" #-}- []- {-# LINE 5649 "src-ag/Transform.hs" #-}- )- in ( _lhsOcollectedConstraints,_lhsOcollectedFields))) )-sem_Field_FCtx :: ([Type]) ->- T_Field -sem_Field_FCtx tps_ =- (T_Field (\ _lhsIallNonterminals ->- (let _lhsOcollectedConstraints :: ([Type])- _lhsOcollectedFields :: ([(Identifier, Type)])- -- "src-ag/Transform.ag"(line 573, column 3)- _lhsOcollectedConstraints =- ({-# LINE 573 "src-ag/Transform.ag" #-}- tps_- {-# LINE 5662 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 561, column 41)- _lhsOcollectedFields =- ({-# LINE 561 "src-ag/Transform.ag" #-}- []- {-# LINE 5668 "src-ag/Transform.hs" #-}- )- in ( _lhsOcollectedConstraints,_lhsOcollectedFields))) )--- Fields -------------------------------------------------------{-- visit 0:- inherited attribute:- allNonterminals : Set NontermIdent- synthesized attributes:- collectedConstraints : [Type]- collectedFields : [(Identifier, Type)]- alternatives:- alternative Cons:- child hd : Field - child tl : Fields - alternative Nil:--}--- cata-sem_Fields :: Fields ->- T_Fields -sem_Fields list =- (Prelude.foldr sem_Fields_Cons sem_Fields_Nil (Prelude.map sem_Field list) )--- semantic domain-newtype T_Fields = T_Fields ((Set NontermIdent) ->- ( ([Type]),([(Identifier, Type)])))-data Inh_Fields = Inh_Fields {allNonterminals_Inh_Fields :: !((Set NontermIdent))}-data Syn_Fields = Syn_Fields {collectedConstraints_Syn_Fields :: !(([Type])),collectedFields_Syn_Fields :: !(([(Identifier, Type)]))}-wrap_Fields :: T_Fields ->- Inh_Fields ->- Syn_Fields -wrap_Fields (T_Fields sem ) (Inh_Fields _lhsIallNonterminals ) =- (let ( _lhsOcollectedConstraints,_lhsOcollectedFields) = sem _lhsIallNonterminals - in (Syn_Fields _lhsOcollectedConstraints _lhsOcollectedFields ))-sem_Fields_Cons :: T_Field ->- T_Fields ->- T_Fields -sem_Fields_Cons (T_Field hd_ ) (T_Fields tl_ ) =- (T_Fields (\ _lhsIallNonterminals ->- (let _lhsOcollectedConstraints :: ([Type])- _lhsOcollectedFields :: ([(Identifier, Type)])- _hdOallNonterminals :: (Set NontermIdent)- _tlOallNonterminals :: (Set NontermIdent)- _hdIcollectedConstraints :: ([Type])- _hdIcollectedFields :: ([(Identifier, Type)])- _tlIcollectedConstraints :: ([Type])- _tlIcollectedFields :: ([(Identifier, Type)])- -- use rule "src-ag/Transform.ag"(line 570, column 46)- _lhsOcollectedConstraints =- ({-# LINE 570 "src-ag/Transform.ag" #-}- _hdIcollectedConstraints ++ _tlIcollectedConstraints- {-# LINE 5718 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 561, column 41)- _lhsOcollectedFields =- ({-# LINE 561 "src-ag/Transform.ag" #-}- _hdIcollectedFields ++ _tlIcollectedFields- {-# LINE 5724 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 5730 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _tlOallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 5736 "src-ag/Transform.hs" #-}- )- ( _hdIcollectedConstraints,_hdIcollectedFields) =- hd_ _hdOallNonterminals - ( _tlIcollectedConstraints,_tlIcollectedFields) =- tl_ _tlOallNonterminals - in ( _lhsOcollectedConstraints,_lhsOcollectedFields))) )-sem_Fields_Nil :: T_Fields -sem_Fields_Nil =- (T_Fields (\ _lhsIallNonterminals ->- (let _lhsOcollectedConstraints :: ([Type])- _lhsOcollectedFields :: ([(Identifier, Type)])- -- use rule "src-ag/Transform.ag"(line 570, column 46)- _lhsOcollectedConstraints =- ({-# LINE 570 "src-ag/Transform.ag" #-}- []- {-# LINE 5752 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 561, column 41)- _lhsOcollectedFields =- ({-# LINE 561 "src-ag/Transform.ag" #-}- []- {-# LINE 5758 "src-ag/Transform.hs" #-}- )- in ( _lhsOcollectedConstraints,_lhsOcollectedFields))) )--- 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)- -- "src-ag/Transform.ag"(line 717, column 16)- _lhsOnontSet =- ({-# LINE 717 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 5833 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 91, column 50)- _lhsOcollectedNames =- ({-# LINE 91 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 5839 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- Seq.empty- {-# LINE 5845 "src-ag/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)- -- "src-ag/Transform.ag"(line 723, column 16)- _lhsOnontSet =- ({-# LINE 723 "src-ag/Transform.ag" #-}- Set.difference _set1InontSet _set2InontSet- {-# LINE 5874 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 91, column 50)- _lhsOcollectedNames =- ({-# LINE 91 "src-ag/Transform.ag" #-}- _set1IcollectedNames `Set.union` _set2IcollectedNames- {-# LINE 5880 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- _set1Ierrors Seq.>< _set2Ierrors- {-# LINE 5886 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set1OallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 5892 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set1OallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 5898 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set1OdefinedSets =- ({-# LINE 112 "src-ag/Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 5904 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set2OallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 5910 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set2OallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 5916 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set2OdefinedSets =- ({-# LINE 112 "src-ag/Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 5922 "src-ag/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)- -- "src-ag/Transform.ag"(line 722, column 16)- _lhsOnontSet =- ({-# LINE 722 "src-ag/Transform.ag" #-}- Set.intersection _set1InontSet _set2InontSet- {-# LINE 5955 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 91, column 50)- _lhsOcollectedNames =- ({-# LINE 91 "src-ag/Transform.ag" #-}- _set1IcollectedNames `Set.union` _set2IcollectedNames- {-# LINE 5961 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- _set1Ierrors Seq.>< _set2Ierrors- {-# LINE 5967 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set1OallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 5973 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set1OallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 5979 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set1OdefinedSets =- ({-# LINE 112 "src-ag/Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 5985 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set2OallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 5991 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set2OallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 5997 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set2OdefinedSets =- ({-# LINE 112 "src-ag/Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 6003 "src-ag/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)- -- "src-ag/Transform.ag"(line 588, column 14)- _lhsOcollectedNames =- ({-# LINE 588 "src-ag/Transform.ag" #-}- Set.singleton name_- {-# LINE 6023 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 718, column 20)- __tup4 =- ({-# LINE 718 "src-ag/Transform.ag" #-}- case Map.lookup name_ _lhsIdefinedSets of- Nothing -> (Set.empty, Seq.singleton (UndefNont name_))- Just set -> (set, Seq.empty)- {-# LINE 6031 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 718, column 20)- (_nontSet,_) =- ({-# LINE 718 "src-ag/Transform.ag" #-}- __tup4- {-# LINE 6037 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 718, column 20)- (_,_errors) =- ({-# LINE 718 "src-ag/Transform.ag" #-}- __tup4- {-# LINE 6043 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- _errors- {-# LINE 6049 "src-ag/Transform.hs" #-}- )- -- copy rule (from local)- _lhsOnontSet =- ({-# LINE 117 "src-ag/Transform.ag" #-}- _nontSet- {-# LINE 6055 "src-ag/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)- -- "src-ag/Transform.ag"(line 724, column 16)- _lhsOnontSet =- ({-# LINE 724 "src-ag/Transform.ag" #-}- let table = flattenDatas _lhsIallFields- in path table from_ to_- {-# LINE 6073 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 726, column 16)- _lhsOerrors =- ({-# LINE 726 "src-ag/Transform.ag" #-}- let check name | Set.member name _lhsIallNonterminals- = Seq.empty- | otherwise = Seq.singleton (UndefNont name)- in check from_ >< check to_- {-# LINE 6082 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 91, column 50)- _lhsOcollectedNames =- ({-# LINE 91 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 6088 "src-ag/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)- -- "src-ag/Transform.ag"(line 721, column 16)- _lhsOnontSet =- ({-# LINE 721 "src-ag/Transform.ag" #-}- Set.union _set1InontSet _set2InontSet- {-# LINE 6117 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 91, column 50)- _lhsOcollectedNames =- ({-# LINE 91 "src-ag/Transform.ag" #-}- _set1IcollectedNames `Set.union` _set2IcollectedNames- {-# LINE 6123 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- _set1Ierrors Seq.>< _set2Ierrors- {-# LINE 6129 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set1OallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 6135 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set1OallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 6141 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set1OdefinedSets =- ({-# LINE 112 "src-ag/Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 6147 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set2OallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 6153 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set2OallNonterminals =- ({-# LINE 93 "src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 6159 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _set2OdefinedSets =- ({-# LINE 112 "src-ag/Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 6165 "src-ag/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 - 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 ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) )-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_Pattern -sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) =- (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- -- "src-ag/Transform.ag"(line 1163, column 11)- _lhsOdefinedAttrs =- ({-# LINE 1163 "src-ag/Transform.ag" #-}- (field_, attr_) : _patIdefinedAttrs- {-# LINE 6249 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1164, column 11)- _lhsOpatunder =- ({-# LINE 1164 "src-ag/Transform.ag" #-}- \us -> if ((field_,attr_) `elem` us) then Underscore noPos else _copy- {-# LINE 6255 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1165, column 11)- _lhsOdefinedInsts =- ({-# LINE 1165 "src-ag/Transform.ag" #-}- (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts- {-# LINE 6261 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1180, column 16)- _lhsOstpos =- ({-# LINE 1180 "src-ag/Transform.ag" #-}- getPos field_- {-# LINE 6267 "src-ag/Transform.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Alias field_ attr_ _patIcopy- {-# LINE 6273 "src-ag/Transform.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 6279 "src-ag/Transform.hs" #-}- )- ( _patIcopy,_patIdefinedAttrs,_patIdefinedInsts,_patIpatunder,_patIstpos) =- pat_ - 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)- -- "src-ag/Transform.ag"(line 1167, column 12)- _lhsOpatunder =- ({-# LINE 1167 "src-ag/Transform.ag" #-}- \us -> Constr name_ (_patsIpatunder us)- {-# LINE 6301 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1178, column 16)- _lhsOstpos =- ({-# LINE 1178 "src-ag/Transform.ag" #-}- getPos name_- {-# LINE 6307 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1158, column 42)- _lhsOdefinedAttrs =- ({-# LINE 1158 "src-ag/Transform.ag" #-}- _patsIdefinedAttrs- {-# LINE 6313 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1157, column 55)- _lhsOdefinedInsts =- ({-# LINE 1157 "src-ag/Transform.ag" #-}- _patsIdefinedInsts- {-# LINE 6319 "src-ag/Transform.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 6325 "src-ag/Transform.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 6331 "src-ag/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- -- "src-ag/Transform.ag"(line 1169, column 17)- _lhsOpatunder =- ({-# LINE 1169 "src-ag/Transform.ag" #-}- \us -> Irrefutable (_patIpatunder us)- {-# LINE 6353 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1158, column 42)- _lhsOdefinedAttrs =- ({-# LINE 1158 "src-ag/Transform.ag" #-}- _patIdefinedAttrs- {-# LINE 6359 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1157, column 55)- _lhsOdefinedInsts =- ({-# LINE 1157 "src-ag/Transform.ag" #-}- _patIdefinedInsts- {-# LINE 6365 "src-ag/Transform.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 6371 "src-ag/Transform.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 6377 "src-ag/Transform.hs" #-}- )- -- copy rule (up)- _lhsOstpos =- ({-# LINE 1175 "src-ag/Transform.ag" #-}- _patIstpos- {-# LINE 6383 "src-ag/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)- -- "src-ag/Transform.ag"(line 1168, column 13)- _lhsOpatunder =- ({-# LINE 1168 "src-ag/Transform.ag" #-}- \us -> Product pos_ (_patsIpatunder us)- {-# LINE 6405 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1179, column 16)- _lhsOstpos =- ({-# LINE 1179 "src-ag/Transform.ag" #-}- pos_- {-# LINE 6411 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1158, column 42)- _lhsOdefinedAttrs =- ({-# LINE 1158 "src-ag/Transform.ag" #-}- _patsIdefinedAttrs- {-# LINE 6417 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1157, column 55)- _lhsOdefinedInsts =- ({-# LINE 1157 "src-ag/Transform.ag" #-}- _patsIdefinedInsts- {-# LINE 6423 "src-ag/Transform.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 6429 "src-ag/Transform.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 6435 "src-ag/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 - -- "src-ag/Transform.ag"(line 1166, column 16)- _lhsOpatunder =- ({-# LINE 1166 "src-ag/Transform.ag" #-}- \us -> _copy- {-# LINE 6452 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1181, column 16)- _lhsOstpos =- ({-# LINE 1181 "src-ag/Transform.ag" #-}- pos_- {-# LINE 6458 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1158, column 42)- _lhsOdefinedAttrs =- ({-# LINE 1158 "src-ag/Transform.ag" #-}- []- {-# LINE 6464 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1157, column 55)- _lhsOdefinedInsts =- ({-# LINE 1157 "src-ag/Transform.ag" #-}- []- {-# LINE 6470 "src-ag/Transform.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- Underscore pos_- {-# LINE 6476 "src-ag/Transform.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 6482 "src-ag/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)- -- "src-ag/Transform.ag"(line 1173, column 10)- _lhsOpatunder =- ({-# LINE 1173 "src-ag/Transform.ag" #-}- \us -> (_hdIpatunder us) : (_tlIpatunder us)- {-# LINE 6539 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1158, column 42)- _lhsOdefinedAttrs =- ({-# LINE 1158 "src-ag/Transform.ag" #-}- _hdIdefinedAttrs ++ _tlIdefinedAttrs- {-# LINE 6545 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1157, column 55)- _lhsOdefinedInsts =- ({-# LINE 1157 "src-ag/Transform.ag" #-}- _hdIdefinedInsts ++ _tlIdefinedInsts- {-# LINE 6551 "src-ag/Transform.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 6557 "src-ag/Transform.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 6563 "src-ag/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 - -- "src-ag/Transform.ag"(line 1172, column 9)- _lhsOpatunder =- ({-# LINE 1172 "src-ag/Transform.ag" #-}- \us -> []- {-# LINE 6580 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1158, column 42)- _lhsOdefinedAttrs =- ({-# LINE 1158 "src-ag/Transform.ag" #-}- []- {-# LINE 6586 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1157, column 55)- _lhsOdefinedInsts =- ({-# LINE 1157 "src-ag/Transform.ag" #-}- []- {-# LINE 6592 "src-ag/Transform.hs" #-}- )- -- self rule- _copy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- []- {-# LINE 6598 "src-ag/Transform.hs" #-}- )- -- self rule- _lhsOcopy =- ({-# LINE 22 "src-ag/Patterns.ag" #-}- _copy- {-# LINE 6604 "src-ag/Transform.hs" #-}- )- in ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder)) )--- SemAlt -------------------------------------------------------{-- visit 0:- inherited attributes:- allAttrDecls : Map NontermIdent (Attributes, Attributes)- allAttrs : Map NontermIdent (Attributes, Attributes)- allFields : DataTypes- nts : Set NontermIdent- options : Options- synthesized attributes:- attrOrderCollect : AttrOrderMap- collectedArounds : [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- collectedAugments : [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- collectedInsts : [ (NontermIdent, ConstructorIdent, [Identifier]) ]- collectedMerges : [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- collectedRules : [ (NontermIdent, ConstructorIdent, RuleInfo)]- collectedSigs : [ (NontermIdent, ConstructorIdent, SigInfo) ]- collectedUniques : [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- errors : Seq Error- semPragmasCollect : PragmaMap- alternatives:- alternative SemAlt:- child pos : {Pos}- child constructorSet : ConstructorSet - child rules : SemDefs - visit 0:- local pragmaNames : _- local attrOrders : _- local coninfo : _--}--- cata-sem_SemAlt :: SemAlt ->- T_SemAlt -sem_SemAlt (SemAlt _pos _constructorSet _rules ) =- (sem_SemAlt_SemAlt _pos (sem_ConstructorSet _constructorSet ) (sem_SemDefs _rules ) )--- semantic domain-newtype T_SemAlt = T_SemAlt ((Map NontermIdent (Attributes, Attributes)) ->- (Map NontermIdent (Attributes, Attributes)) ->- DataTypes ->- (Set NontermIdent) ->- Options ->- ( AttrOrderMap,([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]),([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]),([ (NontermIdent, ConstructorIdent, [Identifier]) ]),([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]),([ (NontermIdent, ConstructorIdent, RuleInfo)]),([ (NontermIdent, ConstructorIdent, SigInfo) ]),([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]),(Seq Error),PragmaMap))-data Inh_SemAlt = Inh_SemAlt {allAttrDecls_Inh_SemAlt :: !((Map NontermIdent (Attributes, Attributes))),allAttrs_Inh_SemAlt :: !((Map NontermIdent (Attributes, Attributes))),allFields_Inh_SemAlt :: !(DataTypes),nts_Inh_SemAlt :: !((Set NontermIdent)),options_Inh_SemAlt :: !(Options)}-data Syn_SemAlt = Syn_SemAlt {attrOrderCollect_Syn_SemAlt :: !(AttrOrderMap),collectedArounds_Syn_SemAlt :: !(([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])),collectedAugments_Syn_SemAlt :: !(([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])),collectedInsts_Syn_SemAlt :: !(([ (NontermIdent, ConstructorIdent, [Identifier]) ])),collectedMerges_Syn_SemAlt :: !(([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])),collectedRules_Syn_SemAlt :: !(([ (NontermIdent, ConstructorIdent, RuleInfo)])),collectedSigs_Syn_SemAlt :: !(([ (NontermIdent, ConstructorIdent, SigInfo) ])),collectedUniques_Syn_SemAlt :: !(([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])),errors_Syn_SemAlt :: !((Seq Error)),semPragmasCollect_Syn_SemAlt :: !(PragmaMap)}-wrap_SemAlt :: T_SemAlt ->- Inh_SemAlt ->- Syn_SemAlt -wrap_SemAlt (T_SemAlt sem ) (Inh_SemAlt _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions ) =- (let ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect) = sem _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions - in (Syn_SemAlt _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect ))-sem_SemAlt_SemAlt :: Pos ->- T_ConstructorSet ->- T_SemDefs ->- T_SemAlt -sem_SemAlt_SemAlt pos_ (T_ConstructorSet constructorSet_ ) (T_SemDefs rules_ ) =- (T_SemAlt (\ _lhsIallAttrDecls- _lhsIallAttrs- _lhsIallFields- _lhsInts- _lhsIoptions ->- (let _lhsOsemPragmasCollect :: PragmaMap- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOerrors :: (Seq Error)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _rulesOoptions :: Options- _constructorSetIcollectedConstructorNames :: (Set ConstructorIdent)- _constructorSetIconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))- _constructorSetIerrors :: (Seq Error)- _rulesIaroundInfos :: ([AroundInfo])- _rulesIaugmentInfos :: ([AugmentInfo])- _rulesIdefinedInsts :: ([Identifier])- _rulesIerrors :: (Seq Error)- _rulesImergeInfos :: ([MergeInfo])- _rulesIorderDepsCollect :: (Set Dependency)- _rulesIpragmaNamesCollect :: ([Identifier])- _rulesIruleInfos :: ([RuleInfo])- _rulesIsigInfos :: ([SigInfo])- _rulesIuniqueInfos :: ([UniqueInfo])- -- "src-ag/Transform.ag"(line 869, column 7)- _pragmaNames =- ({-# LINE 869 "src-ag/Transform.ag" #-}- Set.fromList _rulesIpragmaNamesCollect- {-# LINE 6695 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 870, column 7)- _lhsOsemPragmasCollect =- ({-# LINE 870 "src-ag/Transform.ag" #-}- foldr pragmaMapUnion Map.empty [ pragmaMapSingle nt con _pragmaNames- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 6704 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 898, column 7)- _attrOrders =- ({-# LINE 898 "src-ag/Transform.ag" #-}- [ orderMapSingle nt con _rulesIorderDepsCollect- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 6713 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 904, column 7)- _lhsOattrOrderCollect =- ({-# LINE 904 "src-ag/Transform.ag" #-}- foldr orderMapUnion Map.empty _attrOrders- {-# LINE 6719 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1082, column 12)- _coninfo =- ({-# LINE 1082 "src-ag/Transform.ag" #-}- [ (nt, conset, conkeys)- | nt <- Set.toList _lhsInts- , let conmap = Map.findWithDefault Map.empty nt _lhsIallFields- , let conkeys = Set.fromList (Map.keys conmap)- , let conset = _constructorSetIconstructors conkeys- ]- {-# LINE 6730 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1089, column 12)- _lhsOerrors =- ({-# LINE 1089 "src-ag/Transform.ag" #-}- Seq.fromList- [ UndefAlt nt con- | (nt, conset, conkeys) <- _coninfo- , con <- Set.toList (Set.difference conset conkeys)- ]- Seq.>< _rulesIerrors- {-# LINE 6741 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1095, column 12)- _lhsOcollectedRules =- ({-# LINE 1095 "src-ag/Transform.ag" #-}- [ (nt,con,r)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- , r <- _rulesIruleInfos- ]- {-# LINE 6751 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1101, column 12)- _lhsOcollectedSigs =- ({-# LINE 1101 "src-ag/Transform.ag" #-}- [ (nt,con,ts)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- , ts <- _rulesIsigInfos- ]- {-# LINE 6761 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1108, column 12)- _lhsOcollectedInsts =- ({-# LINE 1108 "src-ag/Transform.ag" #-}- [ (nt,con,_rulesIdefinedInsts)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 6770 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1114, column 12)- _lhsOcollectedUniques =- ({-# LINE 1114 "src-ag/Transform.ag" #-}- [ (nt,con,_rulesIuniqueInfos)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 6779 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1120, column 12)- _lhsOcollectedAugments =- ({-# LINE 1120 "src-ag/Transform.ag" #-}- [ (nt, con, _rulesIaugmentInfos)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 6788 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1126, column 12)- _lhsOcollectedArounds =- ({-# LINE 1126 "src-ag/Transform.ag" #-}- [ (nt, con, _rulesIaroundInfos)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 6797 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1132, column 12)- _lhsOcollectedMerges =- ({-# LINE 1132 "src-ag/Transform.ag" #-}- [ (nt, con, _rulesImergeInfos)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 6806 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _rulesOoptions =- ({-# LINE 40 "src-ag/Transform.ag" #-}- _lhsIoptions- {-# LINE 6812 "src-ag/Transform.hs" #-}- )- ( _constructorSetIcollectedConstructorNames,_constructorSetIconstructors,_constructorSetIerrors) =- constructorSet_ - ( _rulesIaroundInfos,_rulesIaugmentInfos,_rulesIdefinedInsts,_rulesIerrors,_rulesImergeInfos,_rulesIorderDepsCollect,_rulesIpragmaNamesCollect,_rulesIruleInfos,_rulesIsigInfos,_rulesIuniqueInfos) =- rules_ _rulesOoptions - in ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect))) )--- SemAlts ------------------------------------------------------{-- visit 0:- inherited attributes:- allAttrDecls : Map NontermIdent (Attributes, Attributes)- allAttrs : Map NontermIdent (Attributes, Attributes)- allFields : DataTypes- nts : Set NontermIdent- options : Options- synthesized attributes:- attrOrderCollect : AttrOrderMap- collectedArounds : [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- collectedAugments : [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- collectedInsts : [ (NontermIdent, ConstructorIdent, [Identifier]) ]- collectedMerges : [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- collectedRules : [ (NontermIdent, ConstructorIdent, RuleInfo)]- collectedSigs : [ (NontermIdent, ConstructorIdent, SigInfo) ]- collectedUniques : [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- errors : Seq Error- semPragmasCollect : PragmaMap- alternatives:- alternative Cons:- child hd : SemAlt - child tl : SemAlts - alternative Nil:--}--- cata-sem_SemAlts :: SemAlts ->- T_SemAlts -sem_SemAlts list =- (Prelude.foldr sem_SemAlts_Cons sem_SemAlts_Nil (Prelude.map sem_SemAlt list) )--- semantic domain-newtype T_SemAlts = T_SemAlts ((Map NontermIdent (Attributes, Attributes)) ->- (Map NontermIdent (Attributes, Attributes)) ->- DataTypes ->- (Set NontermIdent) ->- Options ->- ( AttrOrderMap,([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]),([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]),([ (NontermIdent, ConstructorIdent, [Identifier]) ]),([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]),([ (NontermIdent, ConstructorIdent, RuleInfo)]),([ (NontermIdent, ConstructorIdent, SigInfo) ]),([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]),(Seq Error),PragmaMap))-data Inh_SemAlts = Inh_SemAlts {allAttrDecls_Inh_SemAlts :: !((Map NontermIdent (Attributes, Attributes))),allAttrs_Inh_SemAlts :: !((Map NontermIdent (Attributes, Attributes))),allFields_Inh_SemAlts :: !(DataTypes),nts_Inh_SemAlts :: !((Set NontermIdent)),options_Inh_SemAlts :: !(Options)}-data Syn_SemAlts = Syn_SemAlts {attrOrderCollect_Syn_SemAlts :: !(AttrOrderMap),collectedArounds_Syn_SemAlts :: !(([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])),collectedAugments_Syn_SemAlts :: !(([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])),collectedInsts_Syn_SemAlts :: !(([ (NontermIdent, ConstructorIdent, [Identifier]) ])),collectedMerges_Syn_SemAlts :: !(([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])),collectedRules_Syn_SemAlts :: !(([ (NontermIdent, ConstructorIdent, RuleInfo)])),collectedSigs_Syn_SemAlts :: !(([ (NontermIdent, ConstructorIdent, SigInfo) ])),collectedUniques_Syn_SemAlts :: !(([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])),errors_Syn_SemAlts :: !((Seq Error)),semPragmasCollect_Syn_SemAlts :: !(PragmaMap)}-wrap_SemAlts :: T_SemAlts ->- Inh_SemAlts ->- Syn_SemAlts -wrap_SemAlts (T_SemAlts sem ) (Inh_SemAlts _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions ) =- (let ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect) = sem _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions - in (Syn_SemAlts _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect ))-sem_SemAlts_Cons :: T_SemAlt ->- T_SemAlts ->- T_SemAlts -sem_SemAlts_Cons (T_SemAlt hd_ ) (T_SemAlts tl_ ) =- (T_SemAlts (\ _lhsIallAttrDecls- _lhsIallAttrs- _lhsIallFields- _lhsInts- _lhsIoptions ->- (let _lhsOattrOrderCollect :: AttrOrderMap- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOerrors :: (Seq Error)- _lhsOsemPragmasCollect :: PragmaMap- _hdOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))- _hdOallAttrs :: (Map NontermIdent (Attributes, Attributes))- _hdOallFields :: DataTypes- _hdOnts :: (Set NontermIdent)- _hdOoptions :: Options- _tlOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))- _tlOallAttrs :: (Map NontermIdent (Attributes, Attributes))- _tlOallFields :: DataTypes- _tlOnts :: (Set NontermIdent)- _tlOoptions :: Options- _hdIattrOrderCollect :: AttrOrderMap- _hdIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _hdIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _hdIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _hdIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _hdIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _hdIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _hdIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _hdIerrors :: (Seq Error)- _hdIsemPragmasCollect :: PragmaMap- _tlIattrOrderCollect :: AttrOrderMap- _tlIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _tlIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _tlIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _tlIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _tlIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _tlIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _tlIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _tlIerrors :: (Seq Error)- _tlIsemPragmasCollect :: PragmaMap- -- use rule "src-ag/Transform.ag"(line 893, column 55)- _lhsOattrOrderCollect =- ({-# LINE 893 "src-ag/Transform.ag" #-}- _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect- {-# LINE 6918 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 164, column 32)- _lhsOcollectedArounds =- ({-# LINE 164 "src-ag/Transform.ag" #-}- _hdIcollectedArounds ++ _tlIcollectedArounds- {-# LINE 6924 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 163, column 32)- _lhsOcollectedAugments =- ({-# LINE 163 "src-ag/Transform.ag" #-}- _hdIcollectedAugments ++ _tlIcollectedAugments- {-# LINE 6930 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 161, column 32)- _lhsOcollectedInsts =- ({-# LINE 161 "src-ag/Transform.ag" #-}- _hdIcollectedInsts ++ _tlIcollectedInsts- {-# LINE 6936 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 165, column 32)- _lhsOcollectedMerges =- ({-# LINE 165 "src-ag/Transform.ag" #-}- _hdIcollectedMerges ++ _tlIcollectedMerges- {-# LINE 6942 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 159, column 32)- _lhsOcollectedRules =- ({-# LINE 159 "src-ag/Transform.ag" #-}- _hdIcollectedRules ++ _tlIcollectedRules- {-# LINE 6948 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 160, column 32)- _lhsOcollectedSigs =- ({-# LINE 160 "src-ag/Transform.ag" #-}- _hdIcollectedSigs ++ _tlIcollectedSigs- {-# LINE 6954 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 162, column 32)- _lhsOcollectedUniques =- ({-# LINE 162 "src-ag/Transform.ag" #-}- _hdIcollectedUniques ++ _tlIcollectedUniques- {-# LINE 6960 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 6966 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 865, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 865 "src-ag/Transform.ag" #-}- _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect- {-# LINE 6972 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOallAttrDecls =- ({-# LINE 894 "src-ag/Transform.ag" #-}- _lhsIallAttrDecls- {-# LINE 6978 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOallAttrs =- ({-# LINE 1306 "src-ag/Transform.ag" #-}- _lhsIallAttrs- {-# LINE 6984 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 6990 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOnts =- ({-# LINE 175 "src-ag/Transform.ag" #-}- _lhsInts- {-# LINE 6996 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 40 "src-ag/Transform.ag" #-}- _lhsIoptions- {-# LINE 7002 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _tlOallAttrDecls =- ({-# LINE 894 "src-ag/Transform.ag" #-}- _lhsIallAttrDecls- {-# LINE 7008 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _tlOallAttrs =- ({-# LINE 1306 "src-ag/Transform.ag" #-}- _lhsIallAttrs- {-# LINE 7014 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _tlOallFields =- ({-# LINE 136 "src-ag/Transform.ag" #-}- _lhsIallFields- {-# LINE 7020 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _tlOnts =- ({-# LINE 175 "src-ag/Transform.ag" #-}- _lhsInts- {-# LINE 7026 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 40 "src-ag/Transform.ag" #-}- _lhsIoptions- {-# LINE 7032 "src-ag/Transform.hs" #-}- )- ( _hdIattrOrderCollect,_hdIcollectedArounds,_hdIcollectedAugments,_hdIcollectedInsts,_hdIcollectedMerges,_hdIcollectedRules,_hdIcollectedSigs,_hdIcollectedUniques,_hdIerrors,_hdIsemPragmasCollect) =- hd_ _hdOallAttrDecls _hdOallAttrs _hdOallFields _hdOnts _hdOoptions - ( _tlIattrOrderCollect,_tlIcollectedArounds,_tlIcollectedAugments,_tlIcollectedInsts,_tlIcollectedMerges,_tlIcollectedRules,_tlIcollectedSigs,_tlIcollectedUniques,_tlIerrors,_tlIsemPragmasCollect) =- tl_ _tlOallAttrDecls _tlOallAttrs _tlOallFields _tlOnts _tlOoptions - in ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect))) )-sem_SemAlts_Nil :: T_SemAlts -sem_SemAlts_Nil =- (T_SemAlts (\ _lhsIallAttrDecls- _lhsIallAttrs- _lhsIallFields- _lhsInts- _lhsIoptions ->- (let _lhsOattrOrderCollect :: AttrOrderMap- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOerrors :: (Seq Error)- _lhsOsemPragmasCollect :: PragmaMap- -- use rule "src-ag/Transform.ag"(line 893, column 55)- _lhsOattrOrderCollect =- ({-# LINE 893 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 7060 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 164, column 32)- _lhsOcollectedArounds =- ({-# LINE 164 "src-ag/Transform.ag" #-}- []- {-# LINE 7066 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 163, column 32)- _lhsOcollectedAugments =- ({-# LINE 163 "src-ag/Transform.ag" #-}- []- {-# LINE 7072 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 161, column 32)- _lhsOcollectedInsts =- ({-# LINE 161 "src-ag/Transform.ag" #-}- []- {-# LINE 7078 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 165, column 32)- _lhsOcollectedMerges =- ({-# LINE 165 "src-ag/Transform.ag" #-}- []- {-# LINE 7084 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 159, column 32)- _lhsOcollectedRules =- ({-# LINE 159 "src-ag/Transform.ag" #-}- []- {-# LINE 7090 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 160, column 32)- _lhsOcollectedSigs =- ({-# LINE 160 "src-ag/Transform.ag" #-}- []- {-# LINE 7096 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 162, column 32)- _lhsOcollectedUniques =- ({-# LINE 162 "src-ag/Transform.ag" #-}- []- {-# LINE 7102 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- Seq.empty- {-# LINE 7108 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 865, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 865 "src-ag/Transform.ag" #-}- Map.empty- {-# LINE 7114 "src-ag/Transform.hs" #-}- )- in ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect))) )--- SemDef -------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attributes:- aroundInfos : [AroundInfo]- augmentInfos : [AugmentInfo]- definedInsts : [Identifier]- errors : Seq Error- mergeInfos : [MergeInfo]- orderDepsCollect : Set Dependency- pragmaNamesCollect : [Identifier]- ruleInfos : [RuleInfo]- sigInfos : [SigInfo]- uniqueInfos : [UniqueInfo]- alternatives:- alternative AroundDef:- child ident : {Identifier}- child rhs : {Expression}- alternative AttrOrderBefore:- child before : {[Occurrence]}- child after : {[Occurrence]}- visit 0:- local dependency : _- alternative AugmentDef:- child ident : {Identifier}- child rhs : {Expression}- alternative Def:- child pos : {Pos}- child mbName : {Maybe Identifier}- child pattern : Pattern - child rhs : {Expression}- child owrt : {Bool}- child pure : {Bool}- child eager : {Bool}- alternative MergeDef:- child target : {Identifier}- child nt : {Identifier}- child sources : {[Identifier]}- child rhs : {Expression}- alternative SemPragma:- child names : {[NontermIdent]}- alternative TypeDef:- child pos : {Pos}- 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 _pure _eager ) =- (sem_SemDef_Def _pos _mbName (sem_Pattern _pattern ) _rhs _owrt _pure _eager )-sem_SemDef (MergeDef _target _nt _sources _rhs ) =- (sem_SemDef_MergeDef _target _nt _sources _rhs )-sem_SemDef (SemPragma _names ) =- (sem_SemDef_SemPragma _names )-sem_SemDef (TypeDef _pos _ident _tp ) =- (sem_SemDef_TypeDef _pos _ident _tp )-sem_SemDef (UniqueDef _ident _ref ) =- (sem_SemDef_UniqueDef _ident _ref )--- semantic domain-newtype T_SemDef = T_SemDef (Options ->- ( ([AroundInfo]),([AugmentInfo]),([Identifier]),(Seq Error),([MergeInfo]),(Set Dependency),([Identifier]),([RuleInfo]),([SigInfo]),([UniqueInfo])))-data Inh_SemDef = Inh_SemDef {options_Inh_SemDef :: !(Options)}-data Syn_SemDef = Syn_SemDef {aroundInfos_Syn_SemDef :: !(([AroundInfo])),augmentInfos_Syn_SemDef :: !(([AugmentInfo])),definedInsts_Syn_SemDef :: !(([Identifier])),errors_Syn_SemDef :: !((Seq Error)),mergeInfos_Syn_SemDef :: !(([MergeInfo])),orderDepsCollect_Syn_SemDef :: !((Set Dependency)),pragmaNamesCollect_Syn_SemDef :: !(([Identifier])),ruleInfos_Syn_SemDef :: !(([RuleInfo])),sigInfos_Syn_SemDef :: !(([SigInfo])),uniqueInfos_Syn_SemDef :: !(([UniqueInfo]))}-wrap_SemDef :: T_SemDef ->- Inh_SemDef ->- Syn_SemDef -wrap_SemDef (T_SemDef sem ) (Inh_SemDef _lhsIoptions ) =- (let ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos) = sem _lhsIoptions - in (Syn_SemDef _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos ))-sem_SemDef_AroundDef :: Identifier ->- Expression ->- T_SemDef -sem_SemDef_AroundDef ident_ rhs_ =- (T_SemDef (\ _lhsIoptions ->- (let _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOerrors :: (Seq Error)- _lhsOmergeInfos :: ([MergeInfo])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOruleInfos :: ([RuleInfo])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- -- "src-ag/Transform.ag"(line 1151, column 17)- _lhsOaroundInfos =- ({-# LINE 1151 "src-ag/Transform.ag" #-}- [ (ident_, rhs_) ]- {-# LINE 7217 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1075, column 40)- _lhsOaugmentInfos =- ({-# LINE 1075 "src-ag/Transform.ag" #-}- []- {-# LINE 7223 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1157, column 55)- _lhsOdefinedInsts =- ({-# LINE 1157 "src-ag/Transform.ag" #-}- []- {-# LINE 7229 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- Seq.empty- {-# LINE 7235 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1077, column 40)- _lhsOmergeInfos =- ({-# LINE 1077 "src-ag/Transform.ag" #-}- []- {-# LINE 7241 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 906, column 44)- _lhsOorderDepsCollect =- ({-# LINE 906 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 7247 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 875, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 875 "src-ag/Transform.ag" #-}- []- {-# LINE 7253 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1072, column 40)- _lhsOruleInfos =- ({-# LINE 1072 "src-ag/Transform.ag" #-}- []- {-# LINE 7259 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1073, column 40)- _lhsOsigInfos =- ({-# LINE 1073 "src-ag/Transform.ag" #-}- []- {-# LINE 7265 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1074, column 40)- _lhsOuniqueInfos =- ({-# LINE 1074 "src-ag/Transform.ag" #-}- []- {-# LINE 7271 "src-ag/Transform.hs" #-}- )- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))) )-sem_SemDef_AttrOrderBefore :: ([Occurrence]) ->- ([Occurrence]) ->- T_SemDef -sem_SemDef_AttrOrderBefore before_ after_ =- (T_SemDef (\ _lhsIoptions ->- (let _lhsOorderDepsCollect :: (Set Dependency)- _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOerrors :: (Seq Error)- _lhsOmergeInfos :: ([MergeInfo])- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOruleInfos :: ([RuleInfo])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- -- "src-ag/Transform.ag"(line 910, column 7)- _dependency =- ({-# LINE 910 "src-ag/Transform.ag" #-}- [ Dependency b a | b <- before_, a <- after_ ]- {-# LINE 7293 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 911, column 7)- _lhsOorderDepsCollect =- ({-# LINE 911 "src-ag/Transform.ag" #-}- Set.fromList _dependency- {-# LINE 7299 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1076, column 40)- _lhsOaroundInfos =- ({-# LINE 1076 "src-ag/Transform.ag" #-}- []- {-# LINE 7305 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1075, column 40)- _lhsOaugmentInfos =- ({-# LINE 1075 "src-ag/Transform.ag" #-}- []- {-# LINE 7311 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1157, column 55)- _lhsOdefinedInsts =- ({-# LINE 1157 "src-ag/Transform.ag" #-}- []- {-# LINE 7317 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- Seq.empty- {-# LINE 7323 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1077, column 40)- _lhsOmergeInfos =- ({-# LINE 1077 "src-ag/Transform.ag" #-}- []- {-# LINE 7329 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 875, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 875 "src-ag/Transform.ag" #-}- []- {-# LINE 7335 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1072, column 40)- _lhsOruleInfos =- ({-# LINE 1072 "src-ag/Transform.ag" #-}- []- {-# LINE 7341 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1073, column 40)- _lhsOsigInfos =- ({-# LINE 1073 "src-ag/Transform.ag" #-}- []- {-# LINE 7347 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1074, column 40)- _lhsOuniqueInfos =- ({-# LINE 1074 "src-ag/Transform.ag" #-}- []- {-# LINE 7353 "src-ag/Transform.hs" #-}- )- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))) )-sem_SemDef_AugmentDef :: Identifier ->- Expression ->- T_SemDef -sem_SemDef_AugmentDef ident_ rhs_ =- (T_SemDef (\ _lhsIoptions ->- (let _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOaroundInfos :: ([AroundInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOerrors :: (Seq Error)- _lhsOmergeInfos :: ([MergeInfo])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOruleInfos :: ([RuleInfo])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- -- "src-ag/Transform.ag"(line 1148, column 17)- _lhsOaugmentInfos =- ({-# LINE 1148 "src-ag/Transform.ag" #-}- [ (ident_, rhs_) ]- {-# LINE 7375 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1076, column 40)- _lhsOaroundInfos =- ({-# LINE 1076 "src-ag/Transform.ag" #-}- []- {-# LINE 7381 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1157, column 55)- _lhsOdefinedInsts =- ({-# LINE 1157 "src-ag/Transform.ag" #-}- []- {-# LINE 7387 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- Seq.empty- {-# LINE 7393 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1077, column 40)- _lhsOmergeInfos =- ({-# LINE 1077 "src-ag/Transform.ag" #-}- []- {-# LINE 7399 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 906, column 44)- _lhsOorderDepsCollect =- ({-# LINE 906 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 7405 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 875, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 875 "src-ag/Transform.ag" #-}- []- {-# LINE 7411 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1072, column 40)- _lhsOruleInfos =- ({-# LINE 1072 "src-ag/Transform.ag" #-}- []- {-# LINE 7417 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1073, column 40)- _lhsOsigInfos =- ({-# LINE 1073 "src-ag/Transform.ag" #-}- []- {-# LINE 7423 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1074, column 40)- _lhsOuniqueInfos =- ({-# LINE 1074 "src-ag/Transform.ag" #-}- []- {-# LINE 7429 "src-ag/Transform.hs" #-}- )- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))) )-sem_SemDef_Def :: Pos ->- (Maybe Identifier) ->- T_Pattern ->- Expression ->- Bool ->- Bool ->- Bool ->- T_SemDef -sem_SemDef_Def pos_ mbName_ (T_Pattern pattern_ ) rhs_ owrt_ pure_ eager_ =- (T_SemDef (\ _lhsIoptions ->- (let _lhsOerrors :: (Seq Error)- _lhsOruleInfos :: ([RuleInfo])- _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOmergeInfos :: ([MergeInfo])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- _patternIcopy :: Pattern - _patternIdefinedAttrs :: ([AttrName])- _patternIdefinedInsts :: ([Identifier])- _patternIpatunder :: ([AttrName]->Pattern)- _patternIstpos :: Pos- -- "src-ag/Transform.ag"(line 541, column 3)- _lhsOerrors =- ({-# LINE 541 "src-ag/Transform.ag" #-}- if checkParseRhs _lhsIoptions- then Seq.fromList $ checkRhs rhs_- else Seq.empty- {-# LINE 7463 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1139, column 10)- _lhsOruleInfos =- ({-# LINE 1139 "src-ag/Transform.ag" #-}- [ (mbName_, _patternIpatunder, rhs_, _patternIdefinedAttrs, owrt_, show _patternIstpos, pure_, eager_) ]- {-# LINE 7469 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1076, column 40)- _lhsOaroundInfos =- ({-# LINE 1076 "src-ag/Transform.ag" #-}- []- {-# LINE 7475 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1075, column 40)- _lhsOaugmentInfos =- ({-# LINE 1075 "src-ag/Transform.ag" #-}- []- {-# LINE 7481 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1157, column 55)- _lhsOdefinedInsts =- ({-# LINE 1157 "src-ag/Transform.ag" #-}- _patternIdefinedInsts- {-# LINE 7487 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1077, column 40)- _lhsOmergeInfos =- ({-# LINE 1077 "src-ag/Transform.ag" #-}- []- {-# LINE 7493 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 906, column 44)- _lhsOorderDepsCollect =- ({-# LINE 906 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 7499 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 875, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 875 "src-ag/Transform.ag" #-}- []- {-# LINE 7505 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1073, column 40)- _lhsOsigInfos =- ({-# LINE 1073 "src-ag/Transform.ag" #-}- []- {-# LINE 7511 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1074, column 40)- _lhsOuniqueInfos =- ({-# LINE 1074 "src-ag/Transform.ag" #-}- []- {-# LINE 7517 "src-ag/Transform.hs" #-}- )- ( _patternIcopy,_patternIdefinedAttrs,_patternIdefinedInsts,_patternIpatunder,_patternIstpos) =- pattern_ - in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))) )-sem_SemDef_MergeDef :: Identifier ->- Identifier ->- ([Identifier]) ->- Expression ->- T_SemDef -sem_SemDef_MergeDef target_ nt_ sources_ rhs_ =- (T_SemDef (\ _lhsIoptions ->- (let _lhsOerrors :: (Seq Error)- _lhsOmergeInfos :: ([MergeInfo])- _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOruleInfos :: ([RuleInfo])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- -- "src-ag/Transform.ag"(line 541, column 3)- _lhsOerrors =- ({-# LINE 541 "src-ag/Transform.ag" #-}- if checkParseRhs _lhsIoptions- then Seq.fromList $ checkRhs rhs_- else Seq.empty- {-# LINE 7545 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1154, column 17)- _lhsOmergeInfos =- ({-# LINE 1154 "src-ag/Transform.ag" #-}- [ (target_, nt_, sources_, rhs_) ]- {-# LINE 7551 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1076, column 40)- _lhsOaroundInfos =- ({-# LINE 1076 "src-ag/Transform.ag" #-}- []- {-# LINE 7557 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1075, column 40)- _lhsOaugmentInfos =- ({-# LINE 1075 "src-ag/Transform.ag" #-}- []- {-# LINE 7563 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1157, column 55)- _lhsOdefinedInsts =- ({-# LINE 1157 "src-ag/Transform.ag" #-}- []- {-# LINE 7569 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 906, column 44)- _lhsOorderDepsCollect =- ({-# LINE 906 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 7575 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 875, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 875 "src-ag/Transform.ag" #-}- []- {-# LINE 7581 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1072, column 40)- _lhsOruleInfos =- ({-# LINE 1072 "src-ag/Transform.ag" #-}- []- {-# LINE 7587 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1073, column 40)- _lhsOsigInfos =- ({-# LINE 1073 "src-ag/Transform.ag" #-}- []- {-# LINE 7593 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1074, column 40)- _lhsOuniqueInfos =- ({-# LINE 1074 "src-ag/Transform.ag" #-}- []- {-# LINE 7599 "src-ag/Transform.hs" #-}- )- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))) )-sem_SemDef_SemPragma :: ([NontermIdent]) ->- T_SemDef -sem_SemDef_SemPragma names_ =- (T_SemDef (\ _lhsIoptions ->- (let _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOerrors :: (Seq Error)- _lhsOmergeInfos :: ([MergeInfo])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOruleInfos :: ([RuleInfo])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- -- "src-ag/Transform.ag"(line 879, column 7)- _lhsOpragmaNamesCollect =- ({-# LINE 879 "src-ag/Transform.ag" #-}- names_- {-# LINE 7620 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1076, column 40)- _lhsOaroundInfos =- ({-# LINE 1076 "src-ag/Transform.ag" #-}- []- {-# LINE 7626 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1075, column 40)- _lhsOaugmentInfos =- ({-# LINE 1075 "src-ag/Transform.ag" #-}- []- {-# LINE 7632 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1157, column 55)- _lhsOdefinedInsts =- ({-# LINE 1157 "src-ag/Transform.ag" #-}- []- {-# LINE 7638 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- Seq.empty- {-# LINE 7644 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1077, column 40)- _lhsOmergeInfos =- ({-# LINE 1077 "src-ag/Transform.ag" #-}- []- {-# LINE 7650 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 906, column 44)- _lhsOorderDepsCollect =- ({-# LINE 906 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 7656 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1072, column 40)- _lhsOruleInfos =- ({-# LINE 1072 "src-ag/Transform.ag" #-}- []- {-# LINE 7662 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1073, column 40)- _lhsOsigInfos =- ({-# LINE 1073 "src-ag/Transform.ag" #-}- []- {-# LINE 7668 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1074, column 40)- _lhsOuniqueInfos =- ({-# LINE 1074 "src-ag/Transform.ag" #-}- []- {-# LINE 7674 "src-ag/Transform.hs" #-}- )- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))) )-sem_SemDef_TypeDef :: Pos ->- Identifier ->- Type ->- T_SemDef -sem_SemDef_TypeDef pos_ ident_ tp_ =- (T_SemDef (\ _lhsIoptions ->- (let _lhsOerrors :: (Seq Error)- _lhsOsigInfos :: ([SigInfo])- _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOmergeInfos :: ([MergeInfo])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOruleInfos :: ([RuleInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- -- "src-ag/Transform.ag"(line 548, column 3)- _lhsOerrors =- ({-# LINE 548 "src-ag/Transform.ag" #-}- if checkParseTy _lhsIoptions- then case tp_ of- Haskell s -> let exp = Expression pos_ tks- tks = [tk]- tk = HsToken s pos_- in Seq.fromList $ checkTy exp- _ -> Seq.empty- else Seq.empty- {-# LINE 7704 "src-ag/Transform.hs" #-}- )- -- "src-ag/Transform.ag"(line 1142, column 14)- _lhsOsigInfos =- ({-# LINE 1142 "src-ag/Transform.ag" #-}- [ (ident_, tp_) ]- {-# LINE 7710 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1076, column 40)- _lhsOaroundInfos =- ({-# LINE 1076 "src-ag/Transform.ag" #-}- []- {-# LINE 7716 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1075, column 40)- _lhsOaugmentInfos =- ({-# LINE 1075 "src-ag/Transform.ag" #-}- []- {-# LINE 7722 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1157, column 55)- _lhsOdefinedInsts =- ({-# LINE 1157 "src-ag/Transform.ag" #-}- []- {-# LINE 7728 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1077, column 40)- _lhsOmergeInfos =- ({-# LINE 1077 "src-ag/Transform.ag" #-}- []- {-# LINE 7734 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 906, column 44)- _lhsOorderDepsCollect =- ({-# LINE 906 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 7740 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 875, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 875 "src-ag/Transform.ag" #-}- []- {-# LINE 7746 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1072, column 40)- _lhsOruleInfos =- ({-# LINE 1072 "src-ag/Transform.ag" #-}- []- {-# LINE 7752 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1074, column 40)- _lhsOuniqueInfos =- ({-# LINE 1074 "src-ag/Transform.ag" #-}- []- {-# LINE 7758 "src-ag/Transform.hs" #-}- )- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))) )-sem_SemDef_UniqueDef :: Identifier ->- Identifier ->- T_SemDef -sem_SemDef_UniqueDef ident_ ref_ =- (T_SemDef (\ _lhsIoptions ->- (let _lhsOuniqueInfos :: ([UniqueInfo])- _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOerrors :: (Seq Error)- _lhsOmergeInfos :: ([MergeInfo])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOruleInfos :: ([RuleInfo])- _lhsOsigInfos :: ([SigInfo])- -- "src-ag/Transform.ag"(line 1145, column 16)- _lhsOuniqueInfos =- ({-# LINE 1145 "src-ag/Transform.ag" #-}- [ (ident_, ref_) ]- {-# LINE 7780 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1076, column 40)- _lhsOaroundInfos =- ({-# LINE 1076 "src-ag/Transform.ag" #-}- []- {-# LINE 7786 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1075, column 40)- _lhsOaugmentInfos =- ({-# LINE 1075 "src-ag/Transform.ag" #-}- []- {-# LINE 7792 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1157, column 55)- _lhsOdefinedInsts =- ({-# LINE 1157 "src-ag/Transform.ag" #-}- []- {-# LINE 7798 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- Seq.empty- {-# LINE 7804 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1077, column 40)- _lhsOmergeInfos =- ({-# LINE 1077 "src-ag/Transform.ag" #-}- []- {-# LINE 7810 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 906, column 44)- _lhsOorderDepsCollect =- ({-# LINE 906 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 7816 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 875, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 875 "src-ag/Transform.ag" #-}- []- {-# LINE 7822 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1072, column 40)- _lhsOruleInfos =- ({-# LINE 1072 "src-ag/Transform.ag" #-}- []- {-# LINE 7828 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1073, column 40)- _lhsOsigInfos =- ({-# LINE 1073 "src-ag/Transform.ag" #-}- []- {-# LINE 7834 "src-ag/Transform.hs" #-}- )- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))) )--- SemDefs ------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attributes:- aroundInfos : [AroundInfo]- augmentInfos : [AugmentInfo]- definedInsts : [Identifier]- errors : Seq Error- mergeInfos : [MergeInfo]- orderDepsCollect : Set Dependency- pragmaNamesCollect : [Identifier]- ruleInfos : [RuleInfo]- sigInfos : [SigInfo]- uniqueInfos : [UniqueInfo]- alternatives:- alternative Cons:- child hd : SemDef - child tl : SemDefs - alternative Nil:--}--- cata-sem_SemDefs :: SemDefs ->- T_SemDefs -sem_SemDefs list =- (Prelude.foldr sem_SemDefs_Cons sem_SemDefs_Nil (Prelude.map sem_SemDef list) )--- semantic domain-newtype T_SemDefs = T_SemDefs (Options ->- ( ([AroundInfo]),([AugmentInfo]),([Identifier]),(Seq Error),([MergeInfo]),(Set Dependency),([Identifier]),([RuleInfo]),([SigInfo]),([UniqueInfo])))-data Inh_SemDefs = Inh_SemDefs {options_Inh_SemDefs :: !(Options)}-data Syn_SemDefs = Syn_SemDefs {aroundInfos_Syn_SemDefs :: !(([AroundInfo])),augmentInfos_Syn_SemDefs :: !(([AugmentInfo])),definedInsts_Syn_SemDefs :: !(([Identifier])),errors_Syn_SemDefs :: !((Seq Error)),mergeInfos_Syn_SemDefs :: !(([MergeInfo])),orderDepsCollect_Syn_SemDefs :: !((Set Dependency)),pragmaNamesCollect_Syn_SemDefs :: !(([Identifier])),ruleInfos_Syn_SemDefs :: !(([RuleInfo])),sigInfos_Syn_SemDefs :: !(([SigInfo])),uniqueInfos_Syn_SemDefs :: !(([UniqueInfo]))}-wrap_SemDefs :: T_SemDefs ->- Inh_SemDefs ->- Syn_SemDefs -wrap_SemDefs (T_SemDefs sem ) (Inh_SemDefs _lhsIoptions ) =- (let ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos) = sem _lhsIoptions - in (Syn_SemDefs _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos ))-sem_SemDefs_Cons :: T_SemDef ->- T_SemDefs ->- T_SemDefs -sem_SemDefs_Cons (T_SemDef hd_ ) (T_SemDefs tl_ ) =- (T_SemDefs (\ _lhsIoptions ->- (let _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOerrors :: (Seq Error)- _lhsOmergeInfos :: ([MergeInfo])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOruleInfos :: ([RuleInfo])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- _hdOoptions :: Options- _tlOoptions :: Options- _hdIaroundInfos :: ([AroundInfo])- _hdIaugmentInfos :: ([AugmentInfo])- _hdIdefinedInsts :: ([Identifier])- _hdIerrors :: (Seq Error)- _hdImergeInfos :: ([MergeInfo])- _hdIorderDepsCollect :: (Set Dependency)- _hdIpragmaNamesCollect :: ([Identifier])- _hdIruleInfos :: ([RuleInfo])- _hdIsigInfos :: ([SigInfo])- _hdIuniqueInfos :: ([UniqueInfo])- _tlIaroundInfos :: ([AroundInfo])- _tlIaugmentInfos :: ([AugmentInfo])- _tlIdefinedInsts :: ([Identifier])- _tlIerrors :: (Seq Error)- _tlImergeInfos :: ([MergeInfo])- _tlIorderDepsCollect :: (Set Dependency)- _tlIpragmaNamesCollect :: ([Identifier])- _tlIruleInfos :: ([RuleInfo])- _tlIsigInfos :: ([SigInfo])- _tlIuniqueInfos :: ([UniqueInfo])- -- use rule "src-ag/Transform.ag"(line 1076, column 40)- _lhsOaroundInfos =- ({-# LINE 1076 "src-ag/Transform.ag" #-}- _hdIaroundInfos ++ _tlIaroundInfos- {-# LINE 7916 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1075, column 40)- _lhsOaugmentInfos =- ({-# LINE 1075 "src-ag/Transform.ag" #-}- _hdIaugmentInfos ++ _tlIaugmentInfos- {-# LINE 7922 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1157, column 55)- _lhsOdefinedInsts =- ({-# LINE 1157 "src-ag/Transform.ag" #-}- _hdIdefinedInsts ++ _tlIdefinedInsts- {-# LINE 7928 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 7934 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1077, column 40)- _lhsOmergeInfos =- ({-# LINE 1077 "src-ag/Transform.ag" #-}- _hdImergeInfos ++ _tlImergeInfos- {-# LINE 7940 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 906, column 44)- _lhsOorderDepsCollect =- ({-# LINE 906 "src-ag/Transform.ag" #-}- _hdIorderDepsCollect `Set.union` _tlIorderDepsCollect- {-# LINE 7946 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 875, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 875 "src-ag/Transform.ag" #-}- _hdIpragmaNamesCollect ++ _tlIpragmaNamesCollect- {-# LINE 7952 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1072, column 40)- _lhsOruleInfos =- ({-# LINE 1072 "src-ag/Transform.ag" #-}- _hdIruleInfos ++ _tlIruleInfos- {-# LINE 7958 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1073, column 40)- _lhsOsigInfos =- ({-# LINE 1073 "src-ag/Transform.ag" #-}- _hdIsigInfos ++ _tlIsigInfos- {-# LINE 7964 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1074, column 40)- _lhsOuniqueInfos =- ({-# LINE 1074 "src-ag/Transform.ag" #-}- _hdIuniqueInfos ++ _tlIuniqueInfos- {-# LINE 7970 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _hdOoptions =- ({-# LINE 40 "src-ag/Transform.ag" #-}- _lhsIoptions- {-# LINE 7976 "src-ag/Transform.hs" #-}- )- -- copy rule (down)- _tlOoptions =- ({-# LINE 40 "src-ag/Transform.ag" #-}- _lhsIoptions- {-# LINE 7982 "src-ag/Transform.hs" #-}- )- ( _hdIaroundInfos,_hdIaugmentInfos,_hdIdefinedInsts,_hdIerrors,_hdImergeInfos,_hdIorderDepsCollect,_hdIpragmaNamesCollect,_hdIruleInfos,_hdIsigInfos,_hdIuniqueInfos) =- hd_ _hdOoptions - ( _tlIaroundInfos,_tlIaugmentInfos,_tlIdefinedInsts,_tlIerrors,_tlImergeInfos,_tlIorderDepsCollect,_tlIpragmaNamesCollect,_tlIruleInfos,_tlIsigInfos,_tlIuniqueInfos) =- tl_ _tlOoptions - in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))) )-sem_SemDefs_Nil :: T_SemDefs -sem_SemDefs_Nil =- (T_SemDefs (\ _lhsIoptions ->- (let _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOerrors :: (Seq Error)- _lhsOmergeInfos :: ([MergeInfo])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOruleInfos :: ([RuleInfo])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- -- use rule "src-ag/Transform.ag"(line 1076, column 40)- _lhsOaroundInfos =- ({-# LINE 1076 "src-ag/Transform.ag" #-}- []- {-# LINE 8006 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1075, column 40)- _lhsOaugmentInfos =- ({-# LINE 1075 "src-ag/Transform.ag" #-}- []- {-# LINE 8012 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1157, column 55)- _lhsOdefinedInsts =- ({-# LINE 1157 "src-ag/Transform.ag" #-}- []- {-# LINE 8018 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 44, column 19)- _lhsOerrors =- ({-# LINE 44 "src-ag/Transform.ag" #-}- Seq.empty- {-# LINE 8024 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1077, column 40)- _lhsOmergeInfos =- ({-# LINE 1077 "src-ag/Transform.ag" #-}- []- {-# LINE 8030 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 906, column 44)- _lhsOorderDepsCollect =- ({-# LINE 906 "src-ag/Transform.ag" #-}- Set.empty- {-# LINE 8036 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 875, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 875 "src-ag/Transform.ag" #-}- []- {-# LINE 8042 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1072, column 40)- _lhsOruleInfos =- ({-# LINE 1072 "src-ag/Transform.ag" #-}- []- {-# LINE 8048 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1073, column 40)- _lhsOsigInfos =- ({-# LINE 1073 "src-ag/Transform.ag" #-}- []- {-# LINE 8054 "src-ag/Transform.hs" #-}- )- -- use rule "src-ag/Transform.ag"(line 1074, column 40)- _lhsOuniqueInfos =- ({-# LINE 1074 "src-ag/Transform.ag" #-}- []- {-# LINE 8060 "src-ag/Transform.hs" #-}- )- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))) )+-- UUAGC 0.9.40.1 (src-ag/Transform.ag)+module Transform where+{-# LINE 8 "src-ag/Transform.ag" #-}++import Control.Monad(mplus,mzero)+import Data.List (partition, elem, nub,intersperse, union)+import Data.Maybe+import qualified Data.Map as Map+import Data.Map (Map)+import Data.Set as Set (Set, member, union, toList, fromList, empty, singleton, member, unions, size, fold, intersection, difference, insert, elems)+import qualified Data.Sequence as Seq+import Data.Sequence(Seq, empty, (><),fromList)+import Data.Foldable(toList)+import UU.Scanner.Position(noPos)++import ConcreteSyntax+import AbstractSyntax+import ErrorMessages+import Patterns (Patterns(..),Pattern(..))+import Expression (Expression(..))+import HsToken++import Options+import CommonTypes+import RhsCheck+import Debug.Trace+{-# LINE 30 "dist/build/Transform.hs" #-}++{-# LINE 2 "src-ag/ConcreteSyntax.ag" #-}++import UU.Scanner.Position (Pos)+import Patterns (Pattern)+import Expression (Expression)+import CommonTypes+import Macro --marcos+{-# LINE 39 "dist/build/Transform.hs" #-}++{-# LINE 2 "src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 46 "dist/build/Transform.hs" #-}+{-# LINE 106 "src-ag/Transform.ag" #-}+type DefinedSets = Map Identifier (Set NontermIdent) +{-# LINE 49 "dist/build/Transform.hs" #-}++{-# LINE 126 "src-ag/Transform.ag" #-}+type FieldMap = [(Identifier, Type)] +{-# LINE 53 "dist/build/Transform.hs" #-}++{-# LINE 127 "src-ag/Transform.ag" #-}+type DataTypes = Map.Map NontermIdent (Map.Map ConstructorIdent FieldMap) +{-# LINE 57 "dist/build/Transform.hs" #-}++{-# LINE 150 "src-ag/Transform.ag" #-}+type AttrName = (Identifier,Identifier) +{-# LINE 61 "dist/build/Transform.hs" #-}++{-# LINE 151 "src-ag/Transform.ag" #-}+type RuleInfo = (Maybe Identifier, [AttrName]->Pattern, Expression, [AttrName], Bool, String, Bool, Bool) +{-# LINE 65 "dist/build/Transform.hs" #-}++{-# LINE 152 "src-ag/Transform.ag" #-}+type SigInfo = (Identifier,Type) +{-# LINE 69 "dist/build/Transform.hs" #-}++{-# LINE 153 "src-ag/Transform.ag" #-}+type UniqueInfo = (Identifier,Identifier) +{-# LINE 73 "dist/build/Transform.hs" #-}++{-# LINE 154 "src-ag/Transform.ag" #-}+type AugmentInfo = (Identifier,Expression)+{-# LINE 77 "dist/build/Transform.hs" #-}++{-# LINE 155 "src-ag/Transform.ag" #-}+type AroundInfo = (Identifier,Expression)+{-# LINE 81 "dist/build/Transform.hs" #-}++{-# LINE 156 "src-ag/Transform.ag" #-}+type MergeInfo = (Identifier, Identifier, [Identifier], Expression)+{-# LINE 85 "dist/build/Transform.hs" #-}++{-# LINE 205 "src-ag/Transform.ag" #-}+++checkDuplicate :: (Identifier -> Identifier -> Error)+ -> Identifier -> val -> Map Identifier val -> (Map Identifier val,Seq Error)+checkDuplicate dupError key val m+ = case Map.lookupIndex key m of+ Just ix -> let (key',_) = Map.elemAt ix m+ in (m,Seq.singleton (dupError key key'))+ Nothing -> (Map.insert key val m,Seq.empty)++checkDuplicates :: (Identifier -> Identifier -> Error)+ -> [(Identifier, val)] -> Map Identifier val -> (Map Identifier val,Seq Error)+checkDuplicates dupError new m = foldErrors check m new+ where check = uncurry (checkDuplicate dupError)++foldErrors 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) = partition (equalId x) xs+ in map (err x) same ++ checkForDuplicates err other++equalId :: Identifier -> Identifier -> Bool+equalId x y = getName x == getName y++{-# LINE 116 "dist/build/Transform.hs" #-}++{-# LINE 351 "src-ag/Transform.ag" #-}++type RulesAndErrors = ([Rule], Seq Error)+type SigsAndErrors = ([TypeSig], Seq Error)+type InstsAndErrors = ([(Identifier, Type)], Seq Error)+type UniquesAndErrors = (Map Identifier Identifier, Seq Error)+type AugmentsAndErrors = (Map Identifier [Expression], Seq Error)+type AroundsAndErrors = (Map Identifier [Expression], Seq Error)+type MergesAndErrors = (Map Identifier (Identifier, [Identifier], Expression), Seq Error)+type AttrOverwrite = Map AttrName Bool+type AccumRuleCheck = (RulesAndErrors, AttrOverwrite)+type AccumDefiCheck = (Seq Error, AttrOverwrite, [AttrName], [AttrName])++checkRules :: Map NontermIdent (Attributes, Attributes) -> Map NontermIdent (Map ConstructorIdent FieldMap) ->+ Map NontermIdent (Map ConstructorIdent [Identifier]) -> Map NontermIdent (Map ConstructorIdent [SigInfo]) ->+ Map NontermIdent (Map ConstructorIdent [MergeInfo]) ->+ NontermIdent -> ConstructorIdent -> [RuleInfo] -> RulesAndErrors+checkRules attributes fields allinsts allsigs allmerges nt con rs+ = let fieldmap :: FieldMap+ fieldmap = (_LHS, NT nt [] False) : (_LOC, NT nullIdent [] False) : (_INST, NT nullIdent [] False) : (_FIRST, NT nullIdent [] False) : (_LAST, NT nullIdent [] False)+ : Map.findWithDefault [] con (Map.findWithDefault Map.empty nt fields)+ ++ mapMaybe (\instNm -> lookup instNm sigs >>= \tp -> return (instNm, tp)) (Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allinsts))+ -- merged children are not allowed to have any inherited attrs defined: do not include++ sigs = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allsigs)++ hasAttrib f tp attr = Map.member attr (f (Map.findWithDefault (Map.empty,Map.empty) tp attributes))++ checkRule :: RuleInfo -> AccumRuleCheck -> AccumRuleCheck+ checkRule (mbNm, pat,exp,as,owrt,str, pur, eager) ((r1,e1),m1)+ = let (e2,m2,u2,b2) = foldr (checkDefi owrt) (e1,m1,[],[]) as+ in ( (Rule mbNm (pat u2) exp owrt str True pur False Nothing eager : r1, e2), m2)++ checkDefi :: Bool -> AttrName -> AccumDefiCheck -> AccumDefiCheck+ checkDefi owrt fa@(field,attr) (e,m,u,bs)+ = case lookup field fieldmap+ of Just (NT tp _ _) ->+ let tp' = maybe tp id (deforestedNt tp)+ in if field == _LOC || field == _INST || field == _FIRST || field == _LAST+ || hasAttrib (if getName field==getName _LHS then snd else fst) tp' attr+ then case Map.lookupIndex fa m of+ Just ix -> let ((_,attr2),b) = Map.elemAt ix m+ in if b && not (fa `elem` bs)+ then ( e, Map.insert fa owrt m, fa:u, fa:bs)+ else (((Seq.<|)) (DupRule nt con field attr2 attr) e, m, fa:u, bs)+ Nothing -> ( e, Map.insert fa owrt m, u, fa:bs)+ else (((Seq.<|)) (SuperfluousRule nt con field attr) e, m, fa:u, bs)+ _ -> (((Seq.<|)) (UndefChild nt con field) e, m, fa:u, bs )++ in fst (foldr checkRule (([],Seq.empty),Map.empty) rs)++checkRuleNames :: NontermIdent -> ConstructorIdent -> [RuleInfo] -> Seq Error+checkRuleNames nt con+ = fst . foldr checkRule (Seq.empty, Set.empty)+ where+ checkRule (Just nm,_,_,_,_,_,_,_) (errs, nms)+ | nm `Set.member` nms = (DupRuleName nt con nm Seq.<| errs, nms)+ | otherwise = (errs, Set.insert nm nms)+ checkRule (Nothing,_,_,_,_,_,_,_) inp = inp++checkSigs :: NontermIdent -> ConstructorIdent -> [SigInfo] -> SigsAndErrors+checkSigs nt con sis+ = let checkSig (ide,typ) (sigs,errs)+ = if ide `elem` map (\(TypeSig n 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 args _) ->+ case findInst k insts of+ Just k' -> (insts, Seq.singleton (DupChild nt con k k') >< errs)+ Nothing -> case nm `Set.member` allNts of+ True -> (info : insts, errs)+ False | take 2 (getName nm) == "T_" -> let nm' = Ident (drop 2 (getName nm)) (getPos nm)+ info' = (k, NT nm' args True) -- this should be the only place at which 'for' with value True can be generated+ in case nm' `Set.member` allNts of+ True -> (info' : insts, errs)+ False -> (insts, Seq.singleton (UndefNont nm') >< errs)+ | otherwise -> (insts, Seq.singleton (UndefNont nm) >< errs)+ )+ $ findSig inst+ ) ([], Seq.empty)+ where+ sigs = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt sigMap)++ findSig name+ = do tp@(NT _ _ _) <- lookup name sigs+ return (name, tp)++ findInst _ [] = Nothing+ findInst k ((k', _): r)+ | k == k' = Just k'+ | otherwise = findInst k r++checkUniques :: Map NontermIdent (Attributes, Attributes) -> NontermIdent -> ConstructorIdent -> [UniqueInfo] -> UniquesAndErrors+checkUniques allAttrs nt con uniques+ = let checkUnique (ident,ref) (us,errs)+ = if ident `Map.member` us+ then (us, ((Seq.<|)) (DupUnique nt con ident) errs)+ else if Map.member ref inhs && Map.member ref syns+ then (Map.insert ident ref us, errs)+ else (us, ((Seq.<|)) (MissingUnique nt ref) errs)++ (inhs,syns) = Map.findWithDefault (Map.empty,Map.empty) nt allAttrs+ in foldr checkUnique (Map.empty, Seq.empty) uniques++checkAugments :: Map NontermIdent (Attributes, Attributes) -> NontermIdent -> ConstructorIdent -> [AugmentInfo] -> AugmentsAndErrors+checkAugments allAttrs nt con augments+ = let checkAugment (ident,expr) (as,errs)+ = if ident `Map.member` as+ then (Map.update (\vs -> Just (vs ++ [expr])) ident as, errs)+ else if Map.member ident syns+ then (Map.insert ident [expr] as, errs)+ else (as, ((Seq.<|)) (MissingSyn nt ident) errs)++ (inhs,syns) = Map.findWithDefault (Map.empty,Map.empty) nt allAttrs+ in foldr checkAugment (Map.empty, Seq.empty) augments++checkArounds :: Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> NontermIdent -> ConstructorIdent -> [AroundInfo] -> AroundsAndErrors+checkArounds fieldMap nt con arounds+ = let checkAround (ident,expr) (as,errs)+ = if ident `Map.member` as+ then (Map.update (\vs -> Just (vs ++ [expr])) ident as, errs)+ else case lookup ident fields of+ Just (NT _ _ _) -> (Map.insert ident [expr] as, errs)+ _ -> (as, ((Seq.<|)) (UndefChild nt con ident) errs)+ fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt fieldMap)+ in foldr checkAround (Map.empty, Seq.empty) arounds++checkMerges :: Set NontermIdent -> Map NontermIdent (Map ConstructorIdent [Identifier]) -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> NontermIdent -> ConstructorIdent -> [MergeInfo] -> MergesAndErrors+checkMerges allNts allInsts fieldMap nt con merges+ = let checkMerge (target,nt,sources,expr) (m,errs)+ = let fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt fieldMap)+ insts = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allInsts)+ allFields = insts ++ map fst fields -- note: sources of merge may not contain a target (for simplicity)+ in if target `Map.member` m -- check for duplicate with self+ then (m, DupChild nt con target (fst $ Map.elemAt (Map.findIndex target m) m) Seq.<| errs)+ else if target `elem` allFields+ then (m, DupChild nt con target (head $ filter (== target) allFields) Seq.<| errs)+ else let missing = filter (\s -> not (s `elem` allFields)) sources+ in if null missing+ then if nt `Set.member` allNts -- check if the nonterm is defined+ then (Map.insert target (nt, sources, expr) m, errs) -- all ok..+ else (m, UndefNont nt Seq.<| errs)+ else (m, (Seq.fromList $ map (UndefChild nt con) missing) Seq.>< errs)+ in foldr checkMerge (Map.empty, Seq.empty) merges++unionunionplusplus = Map.unionWith (Map.unionWith (++))+{-# LINE 272 "dist/build/Transform.hs" #-}++{-# LINE 507 "src-ag/Transform.ag" #-}++mkUniqueRules :: Options -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> Map NontermIdent (Attributes,Attributes) -> NontermIdent -> ConstructorIdent -> Map Identifier Identifier -> [Rule]+mkUniqueRules opts allFields allInsts allAttrDecls nt con usMap+ = map apply groups+ where+ fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allFields)+ ++ Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allInsts)+ -- may have duplicates++ groups = Map.assocs $ Map.foldrWithKey (\i r m -> Map.insertWith (++) r [i] m) Map.empty usMap+ apply (ref,us) = mkRule ref (findOutField ref) us+ findOutField ref = case [ chld | (chld, NT tp _ _) <- fields, tp `hasSyn` ref] of+ [] -> _LHS+ (x:_) -> x+ hasSyn tp ref = Map.member ref $ snd $ Map.findWithDefault (Map.empty,Map.empty) tp allAttrDecls+ mkRule ref outFld locAttrs+ = let 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 True False Nothing 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 "let __cont = " ++ [AGField _LHS ref noPos Nothing] ++ h " in seq __cont ( " ++ inp ++ h " )"+{-# LINE 301 "dist/build/Transform.hs" #-}++{-# LINE 732 "src-ag/Transform.ag" #-}++flattenDatas :: DataTypes -> Map NontermIdent (Set NontermIdent)+flattenDatas ds = Map.map flatten ds+ where flatten cs = Set.fromList [ nt | (_, NT nt _ _) <- concatMap snd (Map.toList cs)]++reachableFrom :: Map NontermIdent (Set NontermIdent) -> Set NontermIdent -> Set NontermIdent+reachableFrom table 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 326 "dist/build/Transform.hs" #-}++{-# LINE 857 "src-ag/Transform.ag" #-}++extract s = case dropWhile isSeparator s of+ "" -> []+ s' -> w : extract s''+ where (w, s'') = break isSeparator s'+isSeparator x = x == '_'+{-# LINE 335 "dist/build/Transform.hs" #-}++{-# LINE 881 "src-ag/Transform.ag" #-}++pragmaMapUnion :: PragmaMap -> PragmaMap -> PragmaMap+pragmaMapUnion = Map.unionWith (Map.unionWith Set.union)++pragmaMapSingle :: NontermIdent -> ConstructorIdent -> Set Identifier -> PragmaMap+pragmaMapSingle nt con nms = Map.singleton nt (Map.singleton con nms)+{-# LINE 344 "dist/build/Transform.hs" #-}++{-# LINE 913 "src-ag/Transform.ag" #-}++orderMapUnion :: AttrOrderMap -> AttrOrderMap -> AttrOrderMap+orderMapUnion = Map.unionWith (Map.unionWith Set.union)++orderMapSingle :: NontermIdent -> ConstructorIdent -> Set Dependency -> AttrOrderMap+orderMapSingle nt con deps = Map.singleton nt (Map.singleton con deps)+{-# LINE 353 "dist/build/Transform.hs" #-}++{-# LINE 939 "src-ag/Transform.ag" #-}++mergeParams :: ParamMap -> ParamMap -> ParamMap+mergeParams = Map.unionWith (++)+{-# LINE 359 "dist/build/Transform.hs" #-}++{-# LINE 962 "src-ag/Transform.ag" #-}++mergeCtx :: ContextMap -> ContextMap -> ContextMap+mergeCtx+ = Map.unionWith nubconcat+ where nubconcat a b = nub (a ++ b)+{-# LINE 367 "dist/build/Transform.hs" #-}++{-# LINE 981 "src-ag/Transform.ag" #-}++mergeQuant :: QuantMap -> QuantMap -> QuantMap+mergeQuant = Map.unionWith (++)+{-# LINE 373 "dist/build/Transform.hs" #-}++{-# LINE 992 "src-ag/Transform.ag" #-}++mergeDerivings m1 m2 = foldr (\(n,cs) m -> Map.insertWith Set.union n cs m) m2 (Map.toList m1)+{-# LINE 378 "dist/build/Transform.hs" #-}++{-# LINE 1003 "src-ag/Transform.ag" #-}++merge x y = foldr f y (Map.toList x)+ where f ~(k,v) m = Map.insertWith (Map.union) k v m+{-# LINE 384 "dist/build/Transform.hs" #-}++{-# LINE 1045 "src-ag/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 394 "dist/build/Transform.hs" #-}++{-# LINE 1056 "src-ag/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) Self eSyn)atMap+{-# LINE 400 "dist/build/Transform.hs" #-}++{-# LINE 1197 "src-ag/Transform.ag" #-}++makeType :: Set NontermIdent -> Type -> Type+makeType nts tp@(NT x _ _) | Set.member x nts = tp+ | otherwise = Haskell (typeToHaskellString Nothing [] tp)+makeType _ tp = tp+{-# LINE 408 "dist/build/Transform.hs" #-}++{-# LINE 1203 "src-ag/Transform.ag" #-}++constructGrammar :: Set NontermIdent+ -> ParamMap+ -> Map NontermIdent (Map ConstructorIdent (Set Identifier))+ -> DataTypes+ -> Map NontermIdent (Map ConstructorIdent [Type])+ -> Map NontermIdent (Attributes, Attributes)+ -> Map NontermIdent (Map Identifier (String, String, String))+ -> Derivings+ -> Set NontermIdent+ -> Map NontermIdent (Map ConstructorIdent [Rule])+ -> Map NontermIdent (Map ConstructorIdent [TypeSig])+ -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)])+ -> TypeSyns+ -> PragmaMap+ -> AttrOrderMap+ -> ContextMap+ -> QuantMap+ -> UniqueMap+ -> Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ -> Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ -> Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))+ -> Map NontermIdent (Map ConstructorIdent MaybeMacro)+ -> Grammar++constructGrammar nts ntParams prodParams gram constraints attrs uses derivings wrappers allrules tsigs allinsts tsyns pragmaMap orderMap contextMap quantMap uniqueMap augmentsMap aroundsMap mergeMap macros =+ let gr = [ (nt,Map.toList alts) | (nt,alts) <- Map.toList gram]+ nonts = map nont gr+ nont (nt,alts) = let (inh,syn) = Map.findWithDefault (Map.empty,Map.empty) nt attrs+ rmap = Map.findWithDefault Map.empty nt allrules+ tsmap = Map.findWithDefault Map.empty nt tsigs+ instsmap = Map.findWithDefault Map.empty nt allinsts+ params = Map.findWithDefault [] nt ntParams+ mergemap = Map.findWithDefault Map.empty nt mergeMap+ macromap = Map.findWithDefault Map.empty nt macros+ csmap = Map.findWithDefault Map.empty nt constraints+ psmap = Map.findWithDefault Map.empty nt prodParams+ alt (con,flds) =+ let rules = Map.findWithDefault [] con rmap+ tsigs = Map.findWithDefault [] con tsmap+ insts = Map.findWithDefault [] con instsmap+ merges = [ (n, NT t [] False) | (n, (t, _, _)) <- Map.assocs $ maybe Map.empty id (Map.lookup con mergemap) ]+ cs = Map.findWithDefault [] con csmap+ ps = Set.elems $ Map.findWithDefault Set.empty con psmap+ mbMacro = Map.findWithDefault Nothing con macromap++ -- important: keep order of children+ cldrn = map child (flds ++ filter (not . existsAsField) insts ++ merges)+ child (nm, tp) =+ let tpI = if existsAsInst nm+ then fromJust $ lookup nm insts+ else tp+ virt = if existsAsInst nm+ then case lookup nm flds of+ Just tp' -> ChildReplace tp'+ Nothing -> ChildAttr+ else if existsAsMerge nm+ then ChildAttr+ else ChildSyntax+ in Child nm tpI virt+ existsAsInst nm = maybe False (const True) (lookup nm insts)+ existsAsField (nm,_) = maybe False (const True) (lookup nm flds)+ existsAsMerge nm = maybe False (const True) (lookup nm merges)+ in Production con ps cs cldrn rules tsigs mbMacro+ in Nonterminal nt params inh syn (map alt alts)+ in Grammar tsyns uses derivings wrappers nonts pragmaMap orderMap ntParams contextMap quantMap uniqueMap augmentsMap aroundsMap mergeMap+{-# LINE 477 "dist/build/Transform.hs" #-}++{-# LINE 1271 "src-ag/Transform.ag" #-}++mapUnionWithSetUnion = Map.unionWith Set.union+mapUnionWithPlusPlus = Map.unionWith (++)+{-# LINE 483 "dist/build/Transform.hs" #-}+-- AG ----------------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attributes:+ agi : (Set NontermIdent, DataTypes, Map NontermIdent (Attributes, 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 allConstraints : _+ local allConParams : _+ local allConstrs : _+ local allRules : _+ local allSigs : _+ local allInsts : _+ local allUniques : _+ local allAugments : _+ local allArounds : _+ local allMerges : _+ local augmentSigs : _+ local allRulesErrs : _+ local allNamesErrs : _+ local allSigsErrs : _+ local allInstsErrs : _+ local allUniquesErrs : _+ local allAugmentErrs : _+ local allAroundsErrs : _+ local allMergesErrs : _+ local checkedRulesPre : _+ local checkedSigs : _+ local checkedInsts : _+ local checkedUniques : _+ local checkedAugments : _+ local checkedArounds : _+ local checkedRules : _+ local checkedMerges : _+ local errs1 : _+ local errs2 : _+ local errs3 : _+ local errs4 : _+ local errs5 : _+ local errs6 : _+ local errs7 : _+ local errs8 : _+ local errs9 : _+ local errs10 : _+ local errs11 : _+ local allNonterminals : _+ local allAttrDecls : _+ local allMacros : _+ local allAttrs : _+-}+-- cata+sem_AG :: AG ->+ T_AG+sem_AG (AG _elems) =+ (sem_AG_AG (sem_Elems _elems))+-- semantic domain+newtype T_AG = T_AG (Options ->+ ( ((Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes))),Blocks,(Seq Error),(Maybe (String,String,String)),Grammar,(Options -> Options)))+data Inh_AG = Inh_AG {options_Inh_AG :: !(Options)}+data Syn_AG = Syn_AG {agi_Syn_AG :: !(((Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes)))),blocks_Syn_AG :: !(Blocks),errors_Syn_AG :: !((Seq Error)),moduleDecl_Syn_AG :: !((Maybe (String,String,String))),output_Syn_AG :: !(Grammar),pragmas_Syn_AG :: !((Options -> Options))}+wrap_AG :: T_AG ->+ Inh_AG ->+ Syn_AG+wrap_AG (T_AG sem) (Inh_AG _lhsIoptions) =+ (let ( _lhsOagi,_lhsOblocks,_lhsOerrors,_lhsOmoduleDecl,_lhsOoutput,_lhsOpragmas) = sem _lhsIoptions+ in (Syn_AG _lhsOagi _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))+ _lhsOagi :: ((Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes)))+ _elemsOattrs :: (Map NontermIdent (Attributes, Attributes))+ _lhsOblocks :: Blocks+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOpragmas :: (Options -> Options)+ _elemsOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))+ _elemsOallAttrs :: (Map NontermIdent (Attributes, Attributes))+ _elemsOallFields :: DataTypes+ _elemsOallNonterminals :: (Set NontermIdent)+ _elemsOoptions :: Options+ _elemsIattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _elemsIattrOrderCollect :: AttrOrderMap+ _elemsIattrs :: (Map NontermIdent (Attributes, Attributes))+ _elemsIblocks :: Blocks+ _elemsIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _elemsIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _elemsIcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _elemsIcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _elemsIcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _elemsIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _elemsIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _elemsIcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _elemsIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _elemsIcollectedNames :: (Set Identifier)+ _elemsIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _elemsIcollectedSetNames :: (Set Identifier)+ _elemsIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _elemsIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _elemsIctxCollect :: ContextMap+ _elemsIdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _elemsIderivings :: Derivings+ _elemsIerrors :: (Seq Error)+ _elemsImoduleDecl :: (Maybe (String,String,String))+ _elemsIparamsCollect :: ParamMap+ _elemsIpragmas :: (Options -> Options)+ _elemsIquantCollect :: QuantMap+ _elemsIsemPragmasCollect :: PragmaMap+ _elemsItypeSyns :: TypeSyns+ _elemsIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _elemsIwrappers :: (Set NontermIdent)+ -- "src-ag/Transform.ag"(line 53, column 8)+ _lhsOoutput =+ ({-# LINE 53 "src-ag/Transform.ag" #-}+ constructGrammar _allNonterminals+ _elemsIparamsCollect+ _allConParams+ _allFields+ _allConstraints+ _allAttrDecls+ _elemsIuseMap+ _elemsIderivings+ (if wrappers _lhsIoptions then _allNonterminals else _elemsIwrappers)+ _checkedRules+ _checkedSigs+ _checkedInsts+ _elemsItypeSyns+ _elemsIsemPragmasCollect+ _elemsIattrOrderCollect+ _elemsIctxCollect+ _elemsIquantCollect+ _checkedUniques+ _checkedAugments+ _checkedArounds+ _checkedMerges+ _allMacros+ {-# LINE 635 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 260, column 10)+ _allFields =+ ({-# LINE 260 "src-ag/Transform.ag" #-}+ let f (nt,con,fm) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con fm)+ in foldr f (Map.empty) _elemsIcollectedFields+ {-# LINE 642 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 263, column 10)+ _allConstraints =+ ({-# LINE 263 "src-ag/Transform.ag" #-}+ let f (nt,con,fm) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con fm)+ in foldr f (Map.empty) _elemsIcollectedConstraints+ {-# LINE 649 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 266, column 10)+ _allConParams =+ ({-# LINE 266 "src-ag/Transform.ag" #-}+ let f (nt,con,fm) = Map.insertWith (Map.unionWith Set.union) nt (Map.singleton con fm)+ in foldr f (Map.empty) _elemsIcollectedConParams+ {-# LINE 656 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 269, column 10)+ _allConstrs =+ ({-# LINE 269 "src-ag/Transform.ag" #-}+ let f (nt,con,_) = Map.insertWith (++) nt [con]+ in foldr f (Map.empty) _elemsIcollectedFields+ {-# LINE 663 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 272, column 10)+ _allRules =+ ({-# LINE 272 "src-ag/Transform.ag" #-}+ let f (nt,con,r) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con [r])+ in foldr f (Map.empty) _elemsIcollectedRules+ {-# LINE 670 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 275, column 10)+ _allSigs =+ ({-# LINE 275 "src-ag/Transform.ag" #-}+ let f (nt,con,t) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con [t])+ typeof nt r = Map.findWithDefault (Haskell "<unknown>") r $ fst $ Map.findWithDefault (Map.empty,Map.empty) nt _allAttrDecls+ in foldr f (Map.empty) ( _elemsIcollectedSigs+ ++ [ (nt, con, (ident,typeof nt ref)) | (nt, con, us) <- _elemsIcollectedUniques, (ident,ref) <- us ]+ )+ {-# LINE 680 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 281, column 10)+ _allInsts =+ ({-# LINE 281 "src-ag/Transform.ag" #-}+ let f (nt,con,is) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con is)+ in foldr f (Map.empty) _elemsIcollectedInsts+ {-# LINE 687 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 284, column 10)+ _allUniques =+ ({-# LINE 284 "src-ag/Transform.ag" #-}+ let f (nt,con,us) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con us)+ in foldr f (Map.empty) _elemsIcollectedUniques+ {-# LINE 694 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 286, column 10)+ _allAugments =+ ({-# LINE 286 "src-ag/Transform.ag" #-}+ let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)+ in foldr f Map.empty _elemsIcollectedAugments+ {-# LINE 701 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 288, column 10)+ _allArounds =+ ({-# LINE 288 "src-ag/Transform.ag" #-}+ let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)+ in foldr f Map.empty _elemsIcollectedArounds+ {-# LINE 708 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 290, column 10)+ _allMerges =+ ({-# LINE 290 "src-ag/Transform.ag" #-}+ let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)+ in foldr f Map.empty _elemsIcollectedMerges+ {-# LINE 715 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 293, column 10)+ _augmentSigs =+ ({-# LINE 293 "src-ag/Transform.ag" #-}+ let gen mp = []+ in Map.map (Map.map gen) _allAugments+ {-# LINE 722 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 296, column 10)+ _allRulesErrs =+ ({-# LINE 296 "src-ag/Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkRules _allAttrDecls _allFields _allInsts _allSigs _allMerges )) _allRules+ {-# LINE 728 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 297, column 10)+ _allNamesErrs =+ ({-# LINE 297 "src-ag/Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . checkRuleNames) _allRules+ {-# LINE 734 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 298, column 10)+ _allSigsErrs =+ ({-# LINE 298 "src-ag/Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkSigs )) _allSigs+ {-# LINE 740 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 299, column 10)+ _allInstsErrs =+ ({-# LINE 299 "src-ag/Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkInsts _allNonterminals _allSigs _allFields )) _allInsts+ {-# LINE 746 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 300, column 10)+ _allUniquesErrs =+ ({-# LINE 300 "src-ag/Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkUniques _allAttrDecls )) _allUniques+ {-# LINE 752 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 301, column 10)+ _allAugmentErrs =+ ({-# LINE 301 "src-ag/Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkAugments _allAttrDecls )) _allAugments+ {-# LINE 758 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 302, column 10)+ _allAroundsErrs =+ ({-# LINE 302 "src-ag/Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkArounds _allFields )) _allArounds+ {-# LINE 764 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 303, column 10)+ _allMergesErrs =+ ({-# LINE 303 "src-ag/Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkMerges _allNonterminals _allInsts _allFields )) _allMerges+ {-# LINE 770 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 305, column 10)+ _checkedRulesPre =+ ({-# LINE 305 "src-ag/Transform.ag" #-}+ Map.map (Map.map fst) _allRulesErrs+ {-# LINE 776 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 306, column 10)+ _checkedSigs =+ ({-# LINE 306 "src-ag/Transform.ag" #-}+ Map.map (Map.map fst) _allSigsErrs `unionunionplusplus` _augmentSigs+ {-# LINE 782 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 307, column 10)+ _checkedInsts =+ ({-# LINE 307 "src-ag/Transform.ag" #-}+ Map.map (Map.map fst) _allInstsErrs+ {-# LINE 788 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 308, column 10)+ _checkedUniques =+ ({-# LINE 308 "src-ag/Transform.ag" #-}+ Map.map (Map.map fst) _allUniquesErrs+ {-# LINE 794 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 309, column 10)+ _checkedAugments =+ ({-# LINE 309 "src-ag/Transform.ag" #-}+ Map.map (Map.map fst) _allAugmentErrs+ {-# LINE 800 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 310, column 10)+ _checkedArounds =+ ({-# LINE 310 "src-ag/Transform.ag" #-}+ Map.map (Map.map fst) _allAroundsErrs+ {-# LINE 806 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 311, column 10)+ _checkedRules =+ ({-# LINE 311 "src-ag/Transform.ag" #-}+ Map.unionWith (Map.unionWith (++)) _checkedRulesPre (Map.mapWithKey (Map.mapWithKey . (mkUniqueRules _lhsIoptions _allFields _checkedInsts _allAttrDecls )) _checkedUniques )+ {-# LINE 812 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 312, column 10)+ _checkedMerges =+ ({-# LINE 312 "src-ag/Transform.ag" #-}+ Map.map (Map.map fst) _allMergesErrs+ {-# LINE 818 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 314, column 10)+ _errs1 =+ ({-# LINE 314 "src-ag/Transform.ag" #-}+ let f = checkForDuplicates (DupSynonym)+ in Seq.fromList . f . map fst $ _elemsItypeSyns+ {-# LINE 825 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 317, column 10)+ _errs2 =+ ({-# LINE 317 "src-ag/Transform.ag" #-}+ let g nt (con,fm) = checkForDuplicates (DupChild nt con) (map fst fm)+ f (nt,cfm) = concat . map (g nt) . Map.toList $ cfm+ in Seq.fromList . concat . map f . Map.toList $ _allFields+ {-# LINE 833 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 321, column 10)+ _errs3 =+ ({-# LINE 321 "src-ag/Transform.ag" #-}+ let f (nt,cons) = checkForDuplicates (DupAlt nt) cons+ in Seq.empty+ {-# LINE 840 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 325, column 10)+ _errs4 =+ ({-# LINE 325 "src-ag/Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allRulesErrs+ {-# LINE 847 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 328, column 10)+ _errs5 =+ ({-# LINE 328 "src-ag/Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allSigsErrs+ {-# LINE 854 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 331, column 10)+ _errs6 =+ ({-# LINE 331 "src-ag/Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allInstsErrs+ {-# LINE 861 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 334, column 10)+ _errs7 =+ ({-# LINE 334 "src-ag/Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allUniquesErrs+ {-# LINE 868 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 337, column 10)+ _errs8 =+ ({-# LINE 337 "src-ag/Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allAugmentErrs+ {-# LINE 875 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 340, column 10)+ _errs9 =+ ({-# LINE 340 "src-ag/Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allAroundsErrs+ {-# LINE 882 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 343, column 10)+ _errs10 =+ ({-# LINE 343 "src-ag/Transform.ag" #-}+ let f m s = Map.fold ((><)) s m+ in Map.fold f Seq.empty _allNamesErrs+ {-# LINE 889 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 346, column 10)+ _errs11 =+ ({-# LINE 346 "src-ag/Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allMergesErrs+ {-# LINE 896 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 349, column 10)+ _lhsOerrors =+ ({-# LINE 349 "src-ag/Transform.ag" #-}+ _elemsIerrors >< _errs1 >< _errs2 >< _errs3 >< _errs4 >< _errs5 >< _errs6 >< _errs7 >< _errs8 >< _errs9 >< _errs10 >< _errs11+ {-# LINE 902 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 591, column 10)+ _allNonterminals =+ ({-# LINE 591 "src-ag/Transform.ag" #-}+ _elemsIcollectedNames `Set.difference` _elemsIcollectedSetNames+ {-# LINE 908 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 611, column 8)+ _elemsOallConstructors =+ ({-# LINE 611 "src-ag/Transform.ag" #-}+ _elemsIcollectedConstructorsMap+ {-# LINE 914 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 694, column 8)+ _elemsOdefSets =+ ({-# LINE 694 "src-ag/Transform.ag" #-}+ Map.fromList (map (\x->(x,(Set.singleton x, Set.empty))) (Set.toList _allNonterminals ))+ {-# LINE 920 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 695, column 8)+ _elemsOdefinedSets =+ ({-# LINE 695 "src-ag/Transform.ag" #-}+ Map.map fst _elemsIdefSets+ {-# LINE 926 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1009, column 8)+ _elemsOattrDecls =+ ({-# LINE 1009 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 932 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1063, column 9)+ _allAttrDecls =+ ({-# LINE 1063 "src-ag/Transform.ag" #-}+ if withSelf _lhsIoptions+ then foldr addSelf _elemsIattrDecls (Set.toList _allNonterminals )+ else _elemsIattrDecls+ {-# LINE 940 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1296, column 10)+ _allMacros =+ ({-# LINE 1296 "src-ag/Transform.ag" #-}+ let f (nt,con,m) = Map.insertWith (Map.union) nt (Map.singleton con m)+ in foldr f (Map.empty) _elemsIcollectedMacros+ {-# LINE 947 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1309, column 8)+ _lhsOagi =+ ({-# LINE 1309 "src-ag/Transform.ag" #-}+ (_allNonterminals ,_allFields ,_allAttrs )+ {-# LINE 953 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1311, column 8)+ _allAttrs =+ ({-# LINE 1311 "src-ag/Transform.ag" #-}+ if withSelf _lhsIoptions+ then foldr addSelf _elemsIattrs (Set.toList _allNonterminals )+ else _elemsIattrs+ {-# LINE 961 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1319, column 9)+ _elemsOattrs =+ ({-# LINE 1319 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 967 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 46, column 19)+ _lhsOblocks =+ ({-# LINE 46 "src-ag/Transform.ag" #-}+ _elemsIblocks+ {-# LINE 973 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1187, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1187 "src-ag/Transform.ag" #-}+ _elemsImoduleDecl+ {-# LINE 979 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 787, column 34)+ _lhsOpragmas =+ ({-# LINE 787 "src-ag/Transform.ag" #-}+ _elemsIpragmas+ {-# LINE 985 "dist/build/Transform" #-}+ )+ -- copy rule (from local)+ _elemsOallAttrDecls =+ ({-# LINE 894 "src-ag/Transform.ag" #-}+ _allAttrDecls+ {-# LINE 991 "dist/build/Transform" #-}+ )+ -- copy rule (from local)+ _elemsOallAttrs =+ ({-# LINE 1306 "src-ag/Transform.ag" #-}+ _allAttrs+ {-# LINE 997 "dist/build/Transform" #-}+ )+ -- copy rule (from local)+ _elemsOallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _allFields+ {-# LINE 1003 "dist/build/Transform" #-}+ )+ -- copy rule (from local)+ _elemsOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _allNonterminals+ {-# LINE 1009 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _elemsOoptions =+ ({-# LINE 40 "src-ag/Transform.ag" #-}+ _lhsIoptions+ {-# LINE 1015 "dist/build/Transform" #-}+ )+ ( _elemsIattrDecls,_elemsIattrOrderCollect,_elemsIattrs,_elemsIblocks,_elemsIcollectedArounds,_elemsIcollectedAugments,_elemsIcollectedConParams,_elemsIcollectedConstraints,_elemsIcollectedConstructorsMap,_elemsIcollectedFields,_elemsIcollectedInsts,_elemsIcollectedMacros,_elemsIcollectedMerges,_elemsIcollectedNames,_elemsIcollectedRules,_elemsIcollectedSetNames,_elemsIcollectedSigs,_elemsIcollectedUniques,_elemsIctxCollect,_elemsIdefSets,_elemsIderivings,_elemsIerrors,_elemsImoduleDecl,_elemsIparamsCollect,_elemsIpragmas,_elemsIquantCollect,_elemsIsemPragmasCollect,_elemsItypeSyns,_elemsIuseMap,_elemsIwrappers) =+ elems_ _elemsOallAttrDecls _elemsOallAttrs _elemsOallConstructors _elemsOallFields _elemsOallNonterminals _elemsOattrDecls _elemsOattrs _elemsOdefSets _elemsOdefinedSets _elemsOoptions+ in ( _lhsOagi,_lhsOblocks,_lhsOerrors,_lhsOmoduleDecl,_lhsOoutput,_lhsOpragmas))))+-- Alt ---------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allConstructors : Map NontermIdent (Set ConstructorIdent)+ allNonterminals : Set NontermIdent+ nts : Set NontermIdent+ synthesized attributes:+ collectedConParams : [(NontermIdent, ConstructorIdent, Set Identifier)]+ collectedConstraints : [(NontermIdent, ConstructorIdent, [Type])]+ collectedConstructorNames : Set ConstructorIdent+ collectedFields : [(NontermIdent, ConstructorIdent, FieldMap)]+ collectedMacros : [(NontermIdent, ConstructorIdent, MaybeMacro)]+ alternatives:+ alternative Alt:+ child pos : {Pos}+ child names : ConstructorSet + child tyvars : {[Identifier]}+ child fields : Fields + child macro : {MaybeMacro}+-}+-- cata+sem_Alt :: Alt ->+ T_Alt+sem_Alt (Alt _pos _names _tyvars _fields _macro) =+ (sem_Alt_Alt _pos (sem_ConstructorSet _names) _tyvars (sem_Fields _fields) _macro)+-- semantic domain+newtype T_Alt = T_Alt ((Map NontermIdent (Set ConstructorIdent)) ->+ (Set NontermIdent) ->+ (Set NontermIdent) ->+ ( ([(NontermIdent, ConstructorIdent, Set Identifier)]),([(NontermIdent, ConstructorIdent, [Type])]),(Set ConstructorIdent),([(NontermIdent, ConstructorIdent, FieldMap)]),([(NontermIdent, ConstructorIdent, MaybeMacro)])))+data Inh_Alt = Inh_Alt {allConstructors_Inh_Alt :: !((Map NontermIdent (Set ConstructorIdent))),allNonterminals_Inh_Alt :: !((Set NontermIdent)),nts_Inh_Alt :: !((Set NontermIdent))}+data Syn_Alt = Syn_Alt {collectedConParams_Syn_Alt :: !(([(NontermIdent, ConstructorIdent, Set Identifier)])),collectedConstraints_Syn_Alt :: !(([(NontermIdent, ConstructorIdent, [Type])])),collectedConstructorNames_Syn_Alt :: !((Set ConstructorIdent)),collectedFields_Syn_Alt :: !(([(NontermIdent, ConstructorIdent, FieldMap)])),collectedMacros_Syn_Alt :: !(([(NontermIdent, ConstructorIdent, MaybeMacro)]))}+wrap_Alt :: T_Alt ->+ Inh_Alt ->+ Syn_Alt+wrap_Alt (T_Alt sem) (Inh_Alt _lhsIallConstructors _lhsIallNonterminals _lhsInts) =+ (let ( _lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorNames,_lhsOcollectedFields,_lhsOcollectedMacros) = sem _lhsIallConstructors _lhsIallNonterminals _lhsInts+ in (Syn_Alt _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros))+sem_Alt_Alt :: Pos ->+ T_ConstructorSet ->+ ([Identifier]) ->+ T_Fields ->+ MaybeMacro ->+ T_Alt+sem_Alt_Alt pos_ (T_ConstructorSet names_) tyvars_ (T_Fields fields_) macro_ =+ (T_Alt (\ _lhsIallConstructors+ _lhsIallNonterminals+ _lhsInts ->+ (let _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _lhsOcollectedConstructorNames :: (Set ConstructorIdent)+ _fieldsOallNonterminals :: (Set NontermIdent)+ _namesIcollectedConstructorNames :: (Set ConstructorIdent)+ _namesIconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))+ _namesIerrors :: (Seq Error)+ _fieldsIcollectedConstraints :: ([Type])+ _fieldsIcollectedFields :: ([(Identifier, Type)])+ -- "src-ag/Transform.ag"(line 241, column 10)+ _lhsOcollectedFields =+ ({-# LINE 241 "src-ag/Transform.ag" #-}+ [ (nt, con, _fieldsIcollectedFields)+ | nt <- Set.toList _lhsInts+ , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))+ ]+ {-# LINE 1087 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 245, column 10)+ _lhsOcollectedConstraints =+ ({-# LINE 245 "src-ag/Transform.ag" #-}+ [ (nt, con, _fieldsIcollectedConstraints)+ | nt <- Set.toList _lhsInts+ , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))+ ]+ {-# LINE 1096 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 249, column 10)+ _lhsOcollectedConParams =+ ({-# LINE 249 "src-ag/Transform.ag" #-}+ [ (nt, con, Set.fromList tyvars_)+ | nt <- Set.toList _lhsInts+ , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))+ ]+ {-# LINE 1105 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1287, column 10)+ _lhsOcollectedMacros =+ ({-# LINE 1287 "src-ag/Transform.ag" #-}+ [ (nt, con, macro_)+ | nt <- Set.toList _lhsInts+ , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))+ ]+ {-# LINE 1114 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 98, column 62)+ _lhsOcollectedConstructorNames =+ ({-# LINE 98 "src-ag/Transform.ag" #-}+ _namesIcollectedConstructorNames+ {-# LINE 1120 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _fieldsOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 1126 "dist/build/Transform" #-}+ )+ ( _namesIcollectedConstructorNames,_namesIconstructors,_namesIerrors) =+ names_+ ( _fieldsIcollectedConstraints,_fieldsIcollectedFields) =+ fields_ _fieldsOallNonterminals+ in ( _lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorNames,_lhsOcollectedFields,_lhsOcollectedMacros))))+-- Alts --------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allConstructors : Map NontermIdent (Set ConstructorIdent)+ allNonterminals : Set NontermIdent+ nts : Set NontermIdent+ synthesized attributes:+ collectedConParams : [(NontermIdent, ConstructorIdent, Set Identifier)]+ collectedConstraints : [(NontermIdent, ConstructorIdent, [Type])]+ collectedConstructorNames : Set ConstructorIdent+ collectedFields : [(NontermIdent, ConstructorIdent, FieldMap)]+ collectedMacros : [(NontermIdent, ConstructorIdent, MaybeMacro)]+ 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) ->+ ( ([(NontermIdent, ConstructorIdent, Set Identifier)]),([(NontermIdent, ConstructorIdent, [Type])]),(Set ConstructorIdent),([(NontermIdent, ConstructorIdent, FieldMap)]),([(NontermIdent, ConstructorIdent, MaybeMacro)])))+data Inh_Alts = Inh_Alts {allConstructors_Inh_Alts :: !((Map NontermIdent (Set ConstructorIdent))),allNonterminals_Inh_Alts :: !((Set NontermIdent)),nts_Inh_Alts :: !((Set NontermIdent))}+data Syn_Alts = Syn_Alts {collectedConParams_Syn_Alts :: !(([(NontermIdent, ConstructorIdent, Set Identifier)])),collectedConstraints_Syn_Alts :: !(([(NontermIdent, ConstructorIdent, [Type])])),collectedConstructorNames_Syn_Alts :: !((Set ConstructorIdent)),collectedFields_Syn_Alts :: !(([(NontermIdent, ConstructorIdent, FieldMap)])),collectedMacros_Syn_Alts :: !(([(NontermIdent, ConstructorIdent, MaybeMacro)]))}+wrap_Alts :: T_Alts ->+ Inh_Alts ->+ Syn_Alts+wrap_Alts (T_Alts sem) (Inh_Alts _lhsIallConstructors _lhsIallNonterminals _lhsInts) =+ (let ( _lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorNames,_lhsOcollectedFields,_lhsOcollectedMacros) = sem _lhsIallConstructors _lhsIallNonterminals _lhsInts+ in (Syn_Alts _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros))+sem_Alts_Cons :: T_Alt ->+ T_Alts ->+ T_Alts+sem_Alts_Cons (T_Alt hd_) (T_Alts tl_) =+ (T_Alts (\ _lhsIallConstructors+ _lhsIallNonterminals+ _lhsInts ->+ (let _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _lhsOcollectedConstructorNames :: (Set ConstructorIdent)+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _hdOallConstructors :: (Map NontermIdent (Set ConstructorIdent))+ _hdOallNonterminals :: (Set NontermIdent)+ _hdOnts :: (Set NontermIdent)+ _tlOallConstructors :: (Map NontermIdent (Set ConstructorIdent))+ _tlOallNonterminals :: (Set NontermIdent)+ _tlOnts :: (Set NontermIdent)+ _hdIcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _hdIcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _hdIcollectedConstructorNames :: (Set ConstructorIdent)+ _hdIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _hdIcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _tlIcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _tlIcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _tlIcollectedConstructorNames :: (Set ConstructorIdent)+ _tlIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _tlIcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ -- use rule "src-ag/Transform.ag"(line 132, column 31)+ _lhsOcollectedConParams =+ ({-# LINE 132 "src-ag/Transform.ag" #-}+ _hdIcollectedConParams ++ _tlIcollectedConParams+ {-# LINE 1202 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 131, column 33)+ _lhsOcollectedConstraints =+ ({-# LINE 131 "src-ag/Transform.ag" #-}+ _hdIcollectedConstraints ++ _tlIcollectedConstraints+ {-# LINE 1208 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 98, column 62)+ _lhsOcollectedConstructorNames =+ ({-# LINE 98 "src-ag/Transform.ag" #-}+ _hdIcollectedConstructorNames `Set.union` _tlIcollectedConstructorNames+ {-# LINE 1214 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 130, column 28)+ _lhsOcollectedFields =+ ({-# LINE 130 "src-ag/Transform.ag" #-}+ _hdIcollectedFields ++ _tlIcollectedFields+ {-# LINE 1220 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1283, column 28)+ _lhsOcollectedMacros =+ ({-# LINE 1283 "src-ag/Transform.ag" #-}+ _hdIcollectedMacros ++ _tlIcollectedMacros+ {-# LINE 1226 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOallConstructors =+ ({-# LINE 101 "src-ag/Transform.ag" #-}+ _lhsIallConstructors+ {-# LINE 1232 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 1238 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOnts =+ ({-# LINE 175 "src-ag/Transform.ag" #-}+ _lhsInts+ {-# LINE 1244 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _tlOallConstructors =+ ({-# LINE 101 "src-ag/Transform.ag" #-}+ _lhsIallConstructors+ {-# LINE 1250 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _tlOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 1256 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _tlOnts =+ ({-# LINE 175 "src-ag/Transform.ag" #-}+ _lhsInts+ {-# LINE 1262 "dist/build/Transform" #-}+ )+ ( _hdIcollectedConParams,_hdIcollectedConstraints,_hdIcollectedConstructorNames,_hdIcollectedFields,_hdIcollectedMacros) =+ hd_ _hdOallConstructors _hdOallNonterminals _hdOnts+ ( _tlIcollectedConParams,_tlIcollectedConstraints,_tlIcollectedConstructorNames,_tlIcollectedFields,_tlIcollectedMacros) =+ tl_ _tlOallConstructors _tlOallNonterminals _tlOnts+ in ( _lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorNames,_lhsOcollectedFields,_lhsOcollectedMacros))))+sem_Alts_Nil :: T_Alts+sem_Alts_Nil =+ (T_Alts (\ _lhsIallConstructors+ _lhsIallNonterminals+ _lhsInts ->+ (let _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _lhsOcollectedConstructorNames :: (Set ConstructorIdent)+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ -- use rule "src-ag/Transform.ag"(line 132, column 31)+ _lhsOcollectedConParams =+ ({-# LINE 132 "src-ag/Transform.ag" #-}+ []+ {-# LINE 1283 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 131, column 33)+ _lhsOcollectedConstraints =+ ({-# LINE 131 "src-ag/Transform.ag" #-}+ []+ {-# LINE 1289 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 98, column 62)+ _lhsOcollectedConstructorNames =+ ({-# LINE 98 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 1295 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 130, column 28)+ _lhsOcollectedFields =+ ({-# LINE 130 "src-ag/Transform.ag" #-}+ []+ {-# LINE 1301 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1283, column 28)+ _lhsOcollectedMacros =+ ({-# LINE 1283 "src-ag/Transform.ag" #-}+ []+ {-# LINE 1307 "dist/build/Transform" #-}+ )+ in ( _lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorNames,_lhsOcollectedFields,_lhsOcollectedMacros))))+-- Attrs -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allFields : DataTypes+ allNonterminals : Set NontermIdent+ nts : Set NontermIdent+ options : Options+ chained attributes:+ attrDecls : Map NontermIdent (Attributes, Attributes)+ attrs : 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 attrDecls : _+ local errors : _+ local inherited : _+ local synthesized : _+ local useMap : _+ local errors1 : _+-}+-- 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)) ->+ (Map NontermIdent (Attributes, Attributes)) ->+ (Set NontermIdent) ->+ Options ->+ ( (Map NontermIdent (Attributes, Attributes)),(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))),attrs_Inh_Attrs :: !((Map NontermIdent (Attributes, Attributes))),nts_Inh_Attrs :: !((Set NontermIdent)),options_Inh_Attrs :: !(Options)}+data Syn_Attrs = Syn_Attrs {attrDecls_Syn_Attrs :: !((Map NontermIdent (Attributes, Attributes))),attrs_Syn_Attrs :: !((Map NontermIdent (Attributes, Attributes))),errors_Syn_Attrs :: !((Seq Error)),useMap_Syn_Attrs :: !((Map NontermIdent (Map Identifier (String,String,String))))}+wrap_Attrs :: T_Attrs ->+ Inh_Attrs ->+ Syn_Attrs+wrap_Attrs (T_Attrs sem) (Inh_Attrs _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsInts _lhsIoptions) =+ (let ( _lhsOattrDecls,_lhsOattrs,_lhsOerrors,_lhsOuseMap) = sem _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsInts _lhsIoptions+ in (Syn_Attrs _lhsOattrDecls _lhsOattrs _lhsOerrors _lhsOuseMap))+sem_Attrs_Attrs :: Pos ->+ AttrNames ->+ AttrNames ->+ AttrNames ->+ T_Attrs+sem_Attrs_Attrs pos_ inh_ chn_ syn_ =+ (T_Attrs (\ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIattrs+ _lhsInts+ _lhsIoptions ->+ (let _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOerrors :: (Seq Error)+ _lhsOattrs :: (Map NontermIdent (Attributes, Attributes))+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ -- "src-ag/Transform.ag"(line 1018, column 15)+ (_attrDecls,_errors) =+ ({-# LINE 1018 "src-ag/Transform.ag" #-}+ checkAttrs _lhsIallFields (Set.toList _lhsInts) _inherited _synthesized _lhsIattrDecls+ {-# LINE 1379 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1020, column 15)+ (_inherited,_synthesized,_useMap) =+ ({-# LINE 1020 "src-ag/Transform.ag" #-}+ let splitAttrs xs = unzip [ ((n,makeType _lhsIallNonterminals t),(n,ud))+ | (n,t,ud) <- xs+ ]+ (inh,_) = splitAttrs inh_+ (chn,uses1) = splitAttrs chn_+ (syn,uses2) = splitAttrs syn_+ isUse (n,(e1,e2,_)) = not (null e1 || null e2)+ in (inh++chn,chn++syn, Map.fromList (Prelude.filter isUse (uses1++uses2)))+ {-# LINE 1392 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1028, column 11)+ _lhsOuseMap =+ ({-# LINE 1028 "src-ag/Transform.ag" #-}+ Map.fromList (zip (Set.toList _lhsInts) (repeat _useMap))+ {-# LINE 1398 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1030, column 11)+ _errors1 =+ ({-# LINE 1030 "src-ag/Transform.ag" #-}+ if checkParseTy _lhsIoptions+ then let attrs = inh_ ++ syn_ ++ chn_+ items = map (\(ident,tp,_) -> (getPos ident, tp)) attrs+ errs = map check items+ check (pos,Haskell s) =+ let exp = Expression pos tks+ tks = [tk]+ tk = HsToken s pos+ in Seq.fromList $ checkTy exp+ check _ = Seq.empty+ in foldr (Seq.><) Seq.empty errs+ else Seq.empty+ {-# LINE 1415 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1042, column 11)+ _lhsOerrors =+ ({-# LINE 1042 "src-ag/Transform.ag" #-}+ _errors Seq.>< _errors1+ {-# LINE 1421 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1323, column 11)+ _lhsOattrs =+ ({-# LINE 1323 "src-ag/Transform.ag" #-}+ let insert decls nt = if Map.member nt decls+ then Map.update (\(inh,syn) -> Just ( Map.union inh $ Map.fromList _inherited+ , Map.union syn $ Map.fromList _synthesized)) nt decls+ else Map.insert nt (Map.fromList _inherited, Map.fromList _synthesized) decls+ in foldl insert _lhsIattrs (Set.toList _lhsInts)+ {-# LINE 1431 "dist/build/Transform" #-}+ )+ -- copy rule (from local)+ _lhsOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _attrDecls+ {-# LINE 1437 "dist/build/Transform" #-}+ )+ in ( _lhsOattrDecls,_lhsOattrs,_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)+ -- "src-ag/Transform.ag"(line 765, column 17)+ _lhsOconstructors =+ ({-# LINE 765 "src-ag/Transform.ag" #-}+ \ds -> ds+ {-# LINE 1488 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 98, column 62)+ _lhsOcollectedConstructorNames =+ ({-# LINE 98 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 1494 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ Seq.empty+ {-# LINE 1500 "dist/build/Transform" #-}+ )+ 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)+ -- "src-ag/Transform.ag"(line 764, column 17)+ _lhsOconstructors =+ ({-# LINE 764 "src-ag/Transform.ag" #-}+ \ds -> _set1Iconstructors ds `Set.difference` _set2Iconstructors ds+ {-# LINE 1520 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 98, column 62)+ _lhsOcollectedConstructorNames =+ ({-# LINE 98 "src-ag/Transform.ag" #-}+ _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames+ {-# LINE 1526 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ _set1Ierrors Seq.>< _set2Ierrors+ {-# LINE 1532 "dist/build/Transform" #-}+ )+ ( _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)+ -- "src-ag/Transform.ag"(line 599, column 11)+ _lhsOcollectedConstructorNames =+ ({-# LINE 599 "src-ag/Transform.ag" #-}+ Set.singleton name_+ {-# LINE 1549 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 762, column 17)+ _lhsOconstructors =+ ({-# LINE 762 "src-ag/Transform.ag" #-}+ \ds -> Set.singleton name_+ {-# LINE 1555 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ Seq.empty+ {-# LINE 1561 "dist/build/Transform" #-}+ )+ 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)+ -- "src-ag/Transform.ag"(line 763, column 17)+ _lhsOconstructors =+ ({-# LINE 763 "src-ag/Transform.ag" #-}+ \ds -> _set1Iconstructors ds `Set.union` _set2Iconstructors ds+ {-# LINE 1581 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 98, column 62)+ _lhsOcollectedConstructorNames =+ ({-# LINE 98 "src-ag/Transform.ag" #-}+ _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames+ {-# LINE 1587 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ _set1Ierrors Seq.>< _set2Ierrors+ {-# LINE 1593 "dist/build/Transform" #-}+ )+ ( _set1IcollectedConstructorNames,_set1Iconstructors,_set1Ierrors) =+ set1_+ ( _set2IcollectedConstructorNames,_set2Iconstructors,_set2Ierrors) =+ set2_+ in ( _lhsOcollectedConstructorNames,_lhsOconstructors,_lhsOerrors)))+-- Elem --------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allAttrDecls : Map NontermIdent (Attributes, Attributes)+ allAttrs : Map NontermIdent (Attributes, Attributes)+ allConstructors : Map NontermIdent (Set ConstructorIdent)+ allFields : DataTypes+ allNonterminals : Set NontermIdent+ definedSets : DefinedSets+ options : Options+ chained attributes:+ attrDecls : Map NontermIdent (Attributes, Attributes)+ attrs : 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]) ]+ collectedConParams : [(NontermIdent, ConstructorIdent, Set Identifier)]+ collectedConstraints : [(NontermIdent, ConstructorIdent, [Type])]+ collectedConstructorsMap : Map NontermIdent (Set ConstructorIdent)+ collectedFields : [(NontermIdent, ConstructorIdent, FieldMap)]+ collectedInsts : [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ collectedMacros : [(NontermIdent, ConstructorIdent, MaybeMacro)]+ collectedMerges : [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ collectedNames : Set Identifier+ collectedRules : [ (NontermIdent, ConstructorIdent, RuleInfo)]+ collectedSetNames : Set Identifier+ collectedSigs : [ (NontermIdent, ConstructorIdent, SigInfo) ]+ collectedUniques : [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ ctxCollect : ContextMap+ derivings : Derivings+ errors : Seq Error+ moduleDecl : Maybe (String,String,String)+ paramsCollect : ParamMap+ pragmas : Options -> Options+ quantCollect : QuantMap+ 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 quants : {[String]}+ 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 Nocatas:+ child pos : {Pos}+ child set : NontSet + alternative Pragma:+ child pos : {Pos}+ child names : {[NontermIdent]}+ alternative Sem:+ child pos : {Pos}+ child ctx : {ClassContext}+ child names : NontSet + child attrs : Attrs + child quants : {[String]}+ child alts : SemAlts + alternative Set:+ child pos : {Pos}+ child name : {NontermIdent}+ child merge : {Bool}+ child set : NontSet + visit 0:+ local defSets2 : _+ local errs : _+ alternative Txt:+ child pos : {Pos}+ child kind : {BlockKind}+ 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 _quants _attrs) =+ (sem_Elem_Attr _pos _ctx (sem_NontSet _names) _quants (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 (Nocatas _pos _set) =+ (sem_Elem_Nocatas _pos (sem_NontSet _set))+sem_Elem (Pragma _pos _names) =+ (sem_Elem_Pragma _pos _names)+sem_Elem (Sem _pos _ctx _names _attrs _quants _alts) =+ (sem_Elem_Sem _pos _ctx (sem_NontSet _names) (sem_Attrs _attrs) _quants (sem_SemAlts _alts))+sem_Elem (Set _pos _name _merge _set) =+ (sem_Elem_Set _pos _name _merge (sem_NontSet _set))+sem_Elem (Txt _pos _kind _mbNt _lines) =+ (sem_Elem_Txt _pos _kind _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 (Attributes, Attributes)) ->+ (Map NontermIdent (Set ConstructorIdent)) ->+ DataTypes ->+ (Set NontermIdent) ->+ (Map NontermIdent (Attributes, Attributes)) ->+ (Map NontermIdent (Attributes, Attributes)) ->+ (Map Identifier (Set NontermIdent,Set Identifier)) ->+ DefinedSets ->+ Options ->+ ( (Map NontermIdent (Attributes, Attributes)),AttrOrderMap,(Map NontermIdent (Attributes, Attributes)),Blocks,([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]),([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]),([(NontermIdent, ConstructorIdent, Set Identifier)]),([(NontermIdent, ConstructorIdent, [Type])]),(Map NontermIdent (Set ConstructorIdent)),([(NontermIdent, ConstructorIdent, FieldMap)]),([ (NontermIdent, ConstructorIdent, [Identifier]) ]),([(NontermIdent, ConstructorIdent, MaybeMacro)]),([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]),(Set Identifier),([ (NontermIdent, ConstructorIdent, RuleInfo)]),(Set Identifier),([ (NontermIdent, ConstructorIdent, SigInfo) ]),([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]),ContextMap,(Map Identifier (Set NontermIdent,Set Identifier)),Derivings,(Seq Error),(Maybe (String,String,String)),ParamMap,(Options -> Options),QuantMap,PragmaMap,TypeSyns,(Map NontermIdent (Map Identifier (String,String,String))),(Set NontermIdent)))+data Inh_Elem = Inh_Elem {allAttrDecls_Inh_Elem :: !((Map NontermIdent (Attributes, Attributes))),allAttrs_Inh_Elem :: !((Map NontermIdent (Attributes, Attributes))),allConstructors_Inh_Elem :: !((Map NontermIdent (Set ConstructorIdent))),allFields_Inh_Elem :: !(DataTypes),allNonterminals_Inh_Elem :: !((Set NontermIdent)),attrDecls_Inh_Elem :: !((Map NontermIdent (Attributes, Attributes))),attrs_Inh_Elem :: !((Map NontermIdent (Attributes, Attributes))),defSets_Inh_Elem :: !((Map Identifier (Set NontermIdent,Set Identifier))),definedSets_Inh_Elem :: !(DefinedSets),options_Inh_Elem :: !(Options)}+data Syn_Elem = Syn_Elem {attrDecls_Syn_Elem :: !((Map NontermIdent (Attributes, Attributes))),attrOrderCollect_Syn_Elem :: !(AttrOrderMap),attrs_Syn_Elem :: !((Map NontermIdent (Attributes, Attributes))),blocks_Syn_Elem :: !(Blocks),collectedArounds_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])),collectedAugments_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])),collectedConParams_Syn_Elem :: !(([(NontermIdent, ConstructorIdent, Set Identifier)])),collectedConstraints_Syn_Elem :: !(([(NontermIdent, ConstructorIdent, [Type])])),collectedConstructorsMap_Syn_Elem :: !((Map NontermIdent (Set ConstructorIdent))),collectedFields_Syn_Elem :: !(([(NontermIdent, ConstructorIdent, FieldMap)])),collectedInsts_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, [Identifier]) ])),collectedMacros_Syn_Elem :: !(([(NontermIdent, ConstructorIdent, MaybeMacro)])),collectedMerges_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])),collectedNames_Syn_Elem :: !((Set Identifier)),collectedRules_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, RuleInfo)])),collectedSetNames_Syn_Elem :: !((Set Identifier)),collectedSigs_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, SigInfo) ])),collectedUniques_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])),ctxCollect_Syn_Elem :: !(ContextMap),defSets_Syn_Elem :: !((Map Identifier (Set NontermIdent,Set Identifier))),derivings_Syn_Elem :: !(Derivings),errors_Syn_Elem :: !((Seq Error)),moduleDecl_Syn_Elem :: !((Maybe (String,String,String))),paramsCollect_Syn_Elem :: !(ParamMap),pragmas_Syn_Elem :: !((Options -> Options)),quantCollect_Syn_Elem :: !(QuantMap),semPragmasCollect_Syn_Elem :: !(PragmaMap),typeSyns_Syn_Elem :: !(TypeSyns),useMap_Syn_Elem :: !((Map NontermIdent (Map Identifier (String,String,String)))),wrappers_Syn_Elem :: !((Set NontermIdent))}+wrap_Elem :: T_Elem ->+ Inh_Elem ->+ Syn_Elem+wrap_Elem (T_Elem sem) (Inh_Elem _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) =+ (let ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers) = sem _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions+ in (Syn_Elem _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers))+sem_Elem_Attr :: Pos ->+ ClassContext ->+ T_NontSet ->+ ([String]) ->+ T_Attrs ->+ T_Elem+sem_Elem_Attr pos_ ctx_ (T_NontSet names_) quants_ (T_Attrs attrs_) =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallAttrs+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIattrs+ _lhsIdefSets+ _lhsIdefinedSets+ _lhsIoptions ->+ (let _lhsOctxCollect :: ContextMap+ _lhsOquantCollect :: QuantMap+ _attrsOnts :: (Set NontermIdent)+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOattrs :: (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))+ _attrsOattrs :: (Map NontermIdent (Attributes, Attributes))+ _attrsOoptions :: Options+ _namesIcollectedNames :: (Set Identifier)+ _namesIerrors :: (Seq Error)+ _namesInontSet :: (Set NontermIdent)+ _attrsIattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _attrsIattrs :: (Map NontermIdent (Attributes, Attributes))+ _attrsIerrors :: (Seq Error)+ _attrsIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ -- "src-ag/Transform.ag"(line 952, column 7)+ _lhsOctxCollect =+ ({-# LINE 952 "src-ag/Transform.ag" #-}+ if null ctx_+ then Map.empty+ else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]+ {-# LINE 1823 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 977, column 7)+ _lhsOquantCollect =+ ({-# LINE 977 "src-ag/Transform.ag" #-}+ if null quants_+ then Map.empty+ else Map.fromList [(nt, quants_) | nt <- Set.toList _namesInontSet]+ {-# LINE 1831 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1013, column 10)+ _attrsOnts =+ ({-# LINE 1013 "src-ag/Transform.ag" #-}+ _namesInontSet+ {-# LINE 1837 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 893, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 893 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 1843 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 46, column 19)+ _lhsOblocks =+ ({-# LINE 46 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 1849 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 164, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 164 "src-ag/Transform.ag" #-}+ []+ {-# LINE 1855 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 163, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 163 "src-ag/Transform.ag" #-}+ []+ {-# LINE 1861 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 132, column 31)+ _lhsOcollectedConParams =+ ({-# LINE 132 "src-ag/Transform.ag" #-}+ []+ {-# LINE 1867 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 131, column 33)+ _lhsOcollectedConstraints =+ ({-# LINE 131 "src-ag/Transform.ag" #-}+ []+ {-# LINE 1873 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 99, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 99 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 1879 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 130, column 28)+ _lhsOcollectedFields =+ ({-# LINE 130 "src-ag/Transform.ag" #-}+ []+ {-# LINE 1885 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 161, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 161 "src-ag/Transform.ag" #-}+ []+ {-# LINE 1891 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1283, column 28)+ _lhsOcollectedMacros =+ ({-# LINE 1283 "src-ag/Transform.ag" #-}+ []+ {-# LINE 1897 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 165, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 165 "src-ag/Transform.ag" #-}+ []+ {-# LINE 1903 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 91, column 50)+ _lhsOcollectedNames =+ ({-# LINE 91 "src-ag/Transform.ag" #-}+ _namesIcollectedNames+ {-# LINE 1909 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 159, column 32)+ _lhsOcollectedRules =+ ({-# LINE 159 "src-ag/Transform.ag" #-}+ []+ {-# LINE 1915 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 90, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 90 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 1921 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 160, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 160 "src-ag/Transform.ag" #-}+ []+ {-# LINE 1927 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 162, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 162 "src-ag/Transform.ag" #-}+ []+ {-# LINE 1933 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 990, column 33)+ _lhsOderivings =+ ({-# LINE 990 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 1939 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ _namesIerrors Seq.>< _attrsIerrors+ {-# LINE 1945 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1187, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1187 "src-ag/Transform.ag" #-}+ mzero+ {-# LINE 1951 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 925, column 37)+ _lhsOparamsCollect =+ ({-# LINE 925 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 1957 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 787, column 34)+ _lhsOpragmas =+ ({-# LINE 787 "src-ag/Transform.ag" #-}+ id+ {-# LINE 1963 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 865, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 865 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 1969 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 626, column 32)+ _lhsOtypeSyns =+ ({-# LINE 626 "src-ag/Transform.ag" #-}+ []+ {-# LINE 1975 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 145, column 15)+ _lhsOuseMap =+ ({-# LINE 145 "src-ag/Transform.ag" #-}+ _attrsIuseMap+ {-# LINE 1981 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 771, column 32)+ _lhsOwrappers =+ ({-# LINE 771 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 1987 "dist/build/Transform" #-}+ )+ -- copy rule (up)+ _lhsOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _attrsIattrDecls+ {-# LINE 1993 "dist/build/Transform" #-}+ )+ -- copy rule (up)+ _lhsOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _attrsIattrs+ {-# LINE 1999 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 109 "src-ag/Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 2005 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _namesOallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 2011 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _namesOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 2017 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _namesOdefinedSets =+ ({-# LINE 112 "src-ag/Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 2023 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _attrsOallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 2029 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _attrsOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 2035 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _attrsOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 2041 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _attrsOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _lhsIattrs+ {-# LINE 2047 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _attrsOoptions =+ ({-# LINE 40 "src-ag/Transform.ag" #-}+ _lhsIoptions+ {-# LINE 2053 "dist/build/Transform" #-}+ )+ ( _namesIcollectedNames,_namesIerrors,_namesInontSet) =+ names_ _namesOallFields _namesOallNonterminals _namesOdefinedSets+ ( _attrsIattrDecls,_attrsIattrs,_attrsIerrors,_attrsIuseMap) =+ attrs_ _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOattrs _attrsOnts _attrsOoptions+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))))+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+ _lhsIallAttrs+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIattrs+ _lhsIdefSets+ _lhsIdefinedSets+ _lhsIoptions ->+ (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]) ])+ _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOpragmas :: (Options -> Options)+ _lhsOquantCollect :: QuantMap+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOattrs :: (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))+ _attrsOattrs :: (Map NontermIdent (Attributes, Attributes))+ _attrsOoptions :: Options+ _altsOallConstructors :: (Map NontermIdent (Set ConstructorIdent))+ _altsOallNonterminals :: (Set NontermIdent)+ _namesIcollectedNames :: (Set Identifier)+ _namesIerrors :: (Seq Error)+ _namesInontSet :: (Set NontermIdent)+ _attrsIattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _attrsIattrs :: (Map NontermIdent (Attributes, Attributes))+ _attrsIerrors :: (Seq Error)+ _attrsIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _altsIcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _altsIcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _altsIcollectedConstructorNames :: (Set ConstructorIdent)+ _altsIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _altsIcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ -- "src-ag/Transform.ag"(line 178, column 10)+ _altsOnts =+ ({-# LINE 178 "src-ag/Transform.ag" #-}+ _namesInontSet+ {-# LINE 2137 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 605, column 11)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 605 "src-ag/Transform.ag" #-}+ Map.fromList+ [ (n, _altsIcollectedConstructorNames)+ | n <- Set.toList _namesInontSet+ ]+ {-# LINE 2146 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 929, column 7)+ _lhsOparamsCollect =+ ({-# LINE 929 "src-ag/Transform.ag" #-}+ if null params_+ then Map.empty+ else Map.fromList [(nt, params_) | nt <- Set.toList _namesInontSet]+ {-# LINE 2154 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 952, column 7)+ _lhsOctxCollect =+ ({-# LINE 952 "src-ag/Transform.ag" #-}+ if null ctx_+ then Map.empty+ else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]+ {-# LINE 2162 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1012, column 10)+ _attrsOnts =+ ({-# LINE 1012 "src-ag/Transform.ag" #-}+ _namesInontSet+ {-# LINE 2168 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 893, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 893 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2174 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 46, column 19)+ _lhsOblocks =+ ({-# LINE 46 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2180 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 164, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 164 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2186 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 163, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 163 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2192 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 132, column 31)+ _lhsOcollectedConParams =+ ({-# LINE 132 "src-ag/Transform.ag" #-}+ _altsIcollectedConParams+ {-# LINE 2198 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 131, column 33)+ _lhsOcollectedConstraints =+ ({-# LINE 131 "src-ag/Transform.ag" #-}+ _altsIcollectedConstraints+ {-# LINE 2204 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 130, column 28)+ _lhsOcollectedFields =+ ({-# LINE 130 "src-ag/Transform.ag" #-}+ _altsIcollectedFields+ {-# LINE 2210 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 161, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 161 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2216 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1283, column 28)+ _lhsOcollectedMacros =+ ({-# LINE 1283 "src-ag/Transform.ag" #-}+ _altsIcollectedMacros+ {-# LINE 2222 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 165, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 165 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2228 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 91, column 50)+ _lhsOcollectedNames =+ ({-# LINE 91 "src-ag/Transform.ag" #-}+ _namesIcollectedNames+ {-# LINE 2234 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 159, column 32)+ _lhsOcollectedRules =+ ({-# LINE 159 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2240 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 90, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 90 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 2246 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 160, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 160 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2252 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 162, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 162 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2258 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 990, column 33)+ _lhsOderivings =+ ({-# LINE 990 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2264 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ _namesIerrors Seq.>< _attrsIerrors+ {-# LINE 2270 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1187, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1187 "src-ag/Transform.ag" #-}+ mzero+ {-# LINE 2276 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 787, column 34)+ _lhsOpragmas =+ ({-# LINE 787 "src-ag/Transform.ag" #-}+ id+ {-# LINE 2282 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 973, column 36)+ _lhsOquantCollect =+ ({-# LINE 973 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2288 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 865, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 865 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2294 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 626, column 32)+ _lhsOtypeSyns =+ ({-# LINE 626 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2300 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 145, column 15)+ _lhsOuseMap =+ ({-# LINE 145 "src-ag/Transform.ag" #-}+ _attrsIuseMap+ {-# LINE 2306 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 771, column 32)+ _lhsOwrappers =+ ({-# LINE 771 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 2312 "dist/build/Transform" #-}+ )+ -- copy rule (up)+ _lhsOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _attrsIattrDecls+ {-# LINE 2318 "dist/build/Transform" #-}+ )+ -- copy rule (up)+ _lhsOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _attrsIattrs+ {-# LINE 2324 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 109 "src-ag/Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 2330 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _namesOallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 2336 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _namesOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 2342 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _namesOdefinedSets =+ ({-# LINE 112 "src-ag/Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 2348 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _attrsOallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 2354 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _attrsOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 2360 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _attrsOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 2366 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _attrsOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _lhsIattrs+ {-# LINE 2372 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _attrsOoptions =+ ({-# LINE 40 "src-ag/Transform.ag" #-}+ _lhsIoptions+ {-# LINE 2378 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _altsOallConstructors =+ ({-# LINE 101 "src-ag/Transform.ag" #-}+ _lhsIallConstructors+ {-# LINE 2384 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _altsOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 2390 "dist/build/Transform" #-}+ )+ ( _namesIcollectedNames,_namesIerrors,_namesInontSet) =+ names_ _namesOallFields _namesOallNonterminals _namesOdefinedSets+ ( _attrsIattrDecls,_attrsIattrs,_attrsIerrors,_attrsIuseMap) =+ attrs_ _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOattrs _attrsOnts _attrsOoptions+ ( _altsIcollectedConParams,_altsIcollectedConstraints,_altsIcollectedConstructorNames,_altsIcollectedFields,_altsIcollectedMacros) =+ alts_ _altsOallConstructors _altsOallNonterminals _altsOnts+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))))+sem_Elem_Deriving :: Pos ->+ T_NontSet ->+ ([NontermIdent]) ->+ T_Elem+sem_Elem_Deriving pos_ (T_NontSet set_) classes_ =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallAttrs+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIattrs+ _lhsIdefSets+ _lhsIdefinedSets+ _lhsIoptions ->+ (let _lhsOderivings :: Derivings+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOctxCollect :: ContextMap+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOquantCollect :: QuantMap+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOattrs :: (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)+ -- "src-ag/Transform.ag"(line 997, column 14)+ _lhsOderivings =+ ({-# LINE 997 "src-ag/Transform.ag" #-}+ Map.fromList [(nt,Set.fromList classes_) | nt <- Set.toList _setInontSet]+ {-# LINE 2454 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 893, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 893 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2460 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 46, column 19)+ _lhsOblocks =+ ({-# LINE 46 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2466 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 164, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 164 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2472 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 163, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 163 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2478 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 132, column 31)+ _lhsOcollectedConParams =+ ({-# LINE 132 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2484 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 131, column 33)+ _lhsOcollectedConstraints =+ ({-# LINE 131 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2490 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 99, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 99 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2496 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 130, column 28)+ _lhsOcollectedFields =+ ({-# LINE 130 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2502 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 161, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 161 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2508 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1283, column 28)+ _lhsOcollectedMacros =+ ({-# LINE 1283 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2514 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 165, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 165 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2520 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 91, column 50)+ _lhsOcollectedNames =+ ({-# LINE 91 "src-ag/Transform.ag" #-}+ _setIcollectedNames+ {-# LINE 2526 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 159, column 32)+ _lhsOcollectedRules =+ ({-# LINE 159 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2532 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 90, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 90 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 2538 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 160, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 160 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2544 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 162, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 162 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2550 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 948, column 34)+ _lhsOctxCollect =+ ({-# LINE 948 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2556 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ _setIerrors+ {-# LINE 2562 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1187, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1187 "src-ag/Transform.ag" #-}+ mzero+ {-# LINE 2568 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 925, column 37)+ _lhsOparamsCollect =+ ({-# LINE 925 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2574 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 787, column 34)+ _lhsOpragmas =+ ({-# LINE 787 "src-ag/Transform.ag" #-}+ id+ {-# LINE 2580 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 973, column 36)+ _lhsOquantCollect =+ ({-# LINE 973 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2586 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 865, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 865 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2592 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 626, column 32)+ _lhsOtypeSyns =+ ({-# LINE 626 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2598 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 145, column 15)+ _lhsOuseMap =+ ({-# LINE 145 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2604 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 771, column 32)+ _lhsOwrappers =+ ({-# LINE 771 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 2610 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 2616 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _lhsIattrs+ {-# LINE 2622 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 109 "src-ag/Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 2628 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _setOallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 2634 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _setOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 2640 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _setOdefinedSets =+ ({-# LINE 112 "src-ag/Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 2646 "dist/build/Transform" #-}+ )+ ( _setIcollectedNames,_setIerrors,_setInontSet) =+ set_ _setOallFields _setOallNonterminals _setOdefinedSets+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))))+sem_Elem_Module :: Pos ->+ String ->+ String ->+ String ->+ T_Elem+sem_Elem_Module pos_ name_ exports_ imports_ =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallAttrs+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIattrs+ _lhsIdefSets+ _lhsIdefinedSets+ _lhsIoptions ->+ (let _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOctxCollect :: ContextMap+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOquantCollect :: QuantMap+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOattrs :: (Map NontermIdent (Attributes, Attributes))+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ -- "src-ag/Transform.ag"(line 1191, column 7)+ _lhsOmoduleDecl =+ ({-# LINE 1191 "src-ag/Transform.ag" #-}+ Just (name_, exports_, imports_)+ {-# LINE 2701 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 893, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 893 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2707 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 46, column 19)+ _lhsOblocks =+ ({-# LINE 46 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2713 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 164, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 164 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2719 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 163, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 163 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2725 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 132, column 31)+ _lhsOcollectedConParams =+ ({-# LINE 132 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2731 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 131, column 33)+ _lhsOcollectedConstraints =+ ({-# LINE 131 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2737 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 99, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 99 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2743 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 130, column 28)+ _lhsOcollectedFields =+ ({-# LINE 130 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2749 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 161, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 161 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2755 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1283, column 28)+ _lhsOcollectedMacros =+ ({-# LINE 1283 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2761 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 165, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 165 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2767 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 91, column 50)+ _lhsOcollectedNames =+ ({-# LINE 91 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 2773 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 159, column 32)+ _lhsOcollectedRules =+ ({-# LINE 159 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2779 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 90, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 90 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 2785 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 160, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 160 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2791 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 162, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 162 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2797 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 948, column 34)+ _lhsOctxCollect =+ ({-# LINE 948 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2803 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 990, column 33)+ _lhsOderivings =+ ({-# LINE 990 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2809 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ Seq.empty+ {-# LINE 2815 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 925, column 37)+ _lhsOparamsCollect =+ ({-# LINE 925 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2821 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 787, column 34)+ _lhsOpragmas =+ ({-# LINE 787 "src-ag/Transform.ag" #-}+ id+ {-# LINE 2827 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 973, column 36)+ _lhsOquantCollect =+ ({-# LINE 973 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2833 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 865, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 865 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2839 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 626, column 32)+ _lhsOtypeSyns =+ ({-# LINE 626 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2845 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 145, column 15)+ _lhsOuseMap =+ ({-# LINE 145 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2851 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 771, column 32)+ _lhsOwrappers =+ ({-# LINE 771 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 2857 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 2863 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _lhsIattrs+ {-# LINE 2869 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 109 "src-ag/Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 2875 "dist/build/Transform" #-}+ )+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))))+sem_Elem_Nocatas :: Pos ->+ T_NontSet ->+ T_Elem+sem_Elem_Nocatas pos_ (T_NontSet set_) =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallAttrs+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIattrs+ _lhsIdefSets+ _lhsIdefinedSets+ _lhsIoptions ->+ (let _lhsOpragmas :: (Options -> Options)+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOctxCollect :: ContextMap+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOquantCollect :: QuantMap+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOattrs :: (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)+ -- "src-ag/Transform.ag"(line 781, column 14)+ _lhsOpragmas =+ ({-# LINE 781 "src-ag/Transform.ag" #-}+ \o -> o { nocatas = _setInontSet `Set.union` nocatas o }+ {-# LINE 2932 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 893, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 893 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2938 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 46, column 19)+ _lhsOblocks =+ ({-# LINE 46 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2944 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 164, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 164 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2950 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 163, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 163 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2956 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 132, column 31)+ _lhsOcollectedConParams =+ ({-# LINE 132 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2962 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 131, column 33)+ _lhsOcollectedConstraints =+ ({-# LINE 131 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2968 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 99, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 99 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 2974 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 130, column 28)+ _lhsOcollectedFields =+ ({-# LINE 130 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2980 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 161, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 161 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2986 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1283, column 28)+ _lhsOcollectedMacros =+ ({-# LINE 1283 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2992 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 165, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 165 "src-ag/Transform.ag" #-}+ []+ {-# LINE 2998 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 91, column 50)+ _lhsOcollectedNames =+ ({-# LINE 91 "src-ag/Transform.ag" #-}+ _setIcollectedNames+ {-# LINE 3004 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 159, column 32)+ _lhsOcollectedRules =+ ({-# LINE 159 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3010 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 90, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 90 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 3016 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 160, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 160 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3022 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 162, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 162 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3028 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 948, column 34)+ _lhsOctxCollect =+ ({-# LINE 948 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3034 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 990, column 33)+ _lhsOderivings =+ ({-# LINE 990 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3040 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ _setIerrors+ {-# LINE 3046 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1187, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1187 "src-ag/Transform.ag" #-}+ mzero+ {-# LINE 3052 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 925, column 37)+ _lhsOparamsCollect =+ ({-# LINE 925 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3058 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 973, column 36)+ _lhsOquantCollect =+ ({-# LINE 973 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3064 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 865, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 865 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3070 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 626, column 32)+ _lhsOtypeSyns =+ ({-# LINE 626 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3076 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 145, column 15)+ _lhsOuseMap =+ ({-# LINE 145 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3082 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 771, column 32)+ _lhsOwrappers =+ ({-# LINE 771 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 3088 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 3094 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _lhsIattrs+ {-# LINE 3100 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 109 "src-ag/Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 3106 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _setOallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 3112 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _setOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 3118 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _setOdefinedSets =+ ({-# LINE 112 "src-ag/Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 3124 "dist/build/Transform" #-}+ )+ ( _setIcollectedNames,_setIerrors,_setInontSet) =+ set_ _setOallFields _setOallNonterminals _setOdefinedSets+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))))+sem_Elem_Pragma :: Pos ->+ ([NontermIdent]) ->+ T_Elem+sem_Elem_Pragma pos_ names_ =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallAttrs+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIattrs+ _lhsIdefSets+ _lhsIdefinedSets+ _lhsIoptions ->+ (let _lhsOpragmas :: (Options -> Options)+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOctxCollect :: ContextMap+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOquantCollect :: QuantMap+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOattrs :: (Map NontermIdent (Attributes, Attributes))+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ -- "src-ag/Transform.ag"(line 790, column 13)+ _lhsOpragmas =+ ({-# LINE 790 "src-ag/Transform.ag" #-}+ let mk n o = case getName n of+ "gencatas" -> o { folds = True }+ "nogencatas" -> o { folds = False }+ "gendatas" -> o { dataTypes = True }+ "datarecords" -> o { dataRecords = True }+ "nogendatas" -> o { dataTypes = False }+ "gensems" -> o { semfuns = True }+ "nogensems" -> o { semfuns = False }+ "gentypesigs" -> o { typeSigs = True }+ "nogentypesigs"-> o { typeSigs = False }+ "nocycle" -> o { withCycle = False }+ "cycle" -> o { withCycle = True }+ "nostrictdata" -> o { strictData = False }+ "strictdata" -> o { strictData = True }+ "nostrictcase" -> o { strictCases = False }+ "strictcase" -> o { strictCases = True }+ "strictercase" -> o { strictCases = True, stricterCases = True }+ "nostrictwrap" -> o { strictWrap = False }+ "strictwrap" -> o { strictWrap = True }+ "novisit" -> o { visit = False }+ "visit" -> o { visit = True }+ "nocase" -> o { cases = False }+ "case" -> o { cases = True }+ "noseq" -> o { withSeq = False }+ "seq" -> o { withSeq = True }+ "nounbox" -> o { unbox = False }+ "unbox" -> o { unbox = True }+ "bangpats" -> o { bangpats = True }+ "breadthfirst" -> o { breadthFirst = True }+ "breadthfirstStrict" -> o { breadthFirstStrict = True }+ "nooptimize" -> o { cases = False , visit = False }+ "optimize" -> o { cases = True , visit = True }+ "strictsem" -> o { strictSems = True }+ "gentraces" -> o { genTraces = True }+ "genusetraces" -> o { genUseTraces = True }+ "splitsems" -> o { splitSems = True }+ "gencostcentres" -> o { genCostCentres = True }+ "sepsemmods" -> o { sepSemMods = True }+ "genlinepragmas" -> o { genLinePragmas = True }+ "newtypes" -> o { newtypes = True }+ "nonewtypes" -> o { newtypes = False }+ "nooptimizations" -> o { noOptimizations = True }+ "kennedywarren" -> o { kennedyWarren = True }+ "aspectag" -> o { genAspectAG = True }+ 'n':'o':'g':'r':'o':'u':'p':'_':atts+ -> o { noGroup = extract atts ++ noGroup o }+ "rename" -> o { rename = True }+ "parallel" -> o { parallelInvoke = True }+ "monadicwrappers" -> o { monadicWrappers = True }+ "dummytokenvisit" -> o { dummyTokenVisit = True }+ "tupleasdummytoken" -> o { tupleAsDummyToken = True }+ "stateasdummytoken" -> o { tupleAsDummyToken = False }+ "strictdummytoken" -> o { strictDummyToken = True }+ "noperruletypesigs" -> o { noPerRuleTypeSigs = True }+ "noperstatetypesigs" -> o { noPerStateTypeSigs = True }+ "noeagerblackholing" -> o { noEagerBlackholing = True }+ "noperrulecostcentres" -> o { noPerRuleCostCentres = True }+ "nopervisitcostcentres" -> o { noPerVisitCostCentres = True }+ "helpinlining" -> o { helpInlining = True }+ "noinlinepragmas" -> o { noInlinePragmas = True }+ "aggressiveinlinepragmas" -> o { aggressiveInlinePragmas = True }+ "latehigherorderbindings" -> o { lateHigherOrderBinding = True }+ s -> trace ("uuagc: ignoring unknown pragma: " ++ s) o+ in \o -> foldr mk o names_+ {-# LINE 3240 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 893, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 893 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3246 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 46, column 19)+ _lhsOblocks =+ ({-# LINE 46 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3252 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 164, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 164 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3258 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 163, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 163 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3264 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 132, column 31)+ _lhsOcollectedConParams =+ ({-# LINE 132 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3270 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 131, column 33)+ _lhsOcollectedConstraints =+ ({-# LINE 131 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3276 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 99, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 99 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3282 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 130, column 28)+ _lhsOcollectedFields =+ ({-# LINE 130 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3288 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 161, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 161 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3294 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1283, column 28)+ _lhsOcollectedMacros =+ ({-# LINE 1283 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3300 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 165, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 165 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3306 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 91, column 50)+ _lhsOcollectedNames =+ ({-# LINE 91 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 3312 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 159, column 32)+ _lhsOcollectedRules =+ ({-# LINE 159 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3318 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 90, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 90 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 3324 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 160, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 160 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3330 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 162, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 162 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3336 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 948, column 34)+ _lhsOctxCollect =+ ({-# LINE 948 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3342 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 990, column 33)+ _lhsOderivings =+ ({-# LINE 990 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3348 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ Seq.empty+ {-# LINE 3354 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1187, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1187 "src-ag/Transform.ag" #-}+ mzero+ {-# LINE 3360 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 925, column 37)+ _lhsOparamsCollect =+ ({-# LINE 925 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3366 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 973, column 36)+ _lhsOquantCollect =+ ({-# LINE 973 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3372 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 865, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 865 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3378 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 626, column 32)+ _lhsOtypeSyns =+ ({-# LINE 626 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3384 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 145, column 15)+ _lhsOuseMap =+ ({-# LINE 145 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3390 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 771, column 32)+ _lhsOwrappers =+ ({-# LINE 771 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 3396 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 3402 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _lhsIattrs+ {-# LINE 3408 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 109 "src-ag/Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 3414 "dist/build/Transform" #-}+ )+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))))+sem_Elem_Sem :: Pos ->+ ClassContext ->+ T_NontSet ->+ T_Attrs ->+ ([String]) ->+ T_SemAlts ->+ T_Elem+sem_Elem_Sem pos_ ctx_ (T_NontSet names_) (T_Attrs attrs_) quants_ (T_SemAlts alts_) =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallAttrs+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIattrs+ _lhsIdefSets+ _lhsIdefinedSets+ _lhsIoptions ->+ (let _altsOnts :: (Set NontermIdent)+ _lhsOctxCollect :: ContextMap+ _lhsOquantCollect :: QuantMap+ _attrsOnts :: (Set NontermIdent)+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOattrs :: (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))+ _attrsOattrs :: (Map NontermIdent (Attributes, Attributes))+ _attrsOoptions :: Options+ _altsOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))+ _altsOallAttrs :: (Map NontermIdent (Attributes, Attributes))+ _altsOallFields :: DataTypes+ _altsOoptions :: Options+ _namesIcollectedNames :: (Set Identifier)+ _namesIerrors :: (Seq Error)+ _namesInontSet :: (Set NontermIdent)+ _attrsIattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _attrsIattrs :: (Map NontermIdent (Attributes, Attributes))+ _attrsIerrors :: (Seq Error)+ _attrsIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _altsIattrOrderCollect :: AttrOrderMap+ _altsIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _altsIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _altsIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _altsIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _altsIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _altsIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _altsIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _altsIerrors :: (Seq Error)+ _altsIsemPragmasCollect :: PragmaMap+ -- "src-ag/Transform.ag"(line 179, column 10)+ _altsOnts =+ ({-# LINE 179 "src-ag/Transform.ag" #-}+ _namesInontSet+ {-# LINE 3500 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 952, column 7)+ _lhsOctxCollect =+ ({-# LINE 952 "src-ag/Transform.ag" #-}+ if null ctx_+ then Map.empty+ else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]+ {-# LINE 3508 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 977, column 7)+ _lhsOquantCollect =+ ({-# LINE 977 "src-ag/Transform.ag" #-}+ if null quants_+ then Map.empty+ else Map.fromList [(nt, quants_) | nt <- Set.toList _namesInontSet]+ {-# LINE 3516 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1014, column 10)+ _attrsOnts =+ ({-# LINE 1014 "src-ag/Transform.ag" #-}+ _namesInontSet+ {-# LINE 3522 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 893, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 893 "src-ag/Transform.ag" #-}+ _altsIattrOrderCollect+ {-# LINE 3528 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 46, column 19)+ _lhsOblocks =+ ({-# LINE 46 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3534 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 164, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 164 "src-ag/Transform.ag" #-}+ _altsIcollectedArounds+ {-# LINE 3540 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 163, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 163 "src-ag/Transform.ag" #-}+ _altsIcollectedAugments+ {-# LINE 3546 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 132, column 31)+ _lhsOcollectedConParams =+ ({-# LINE 132 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3552 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 131, column 33)+ _lhsOcollectedConstraints =+ ({-# LINE 131 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3558 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 99, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 99 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3564 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 130, column 28)+ _lhsOcollectedFields =+ ({-# LINE 130 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3570 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 161, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 161 "src-ag/Transform.ag" #-}+ _altsIcollectedInsts+ {-# LINE 3576 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1283, column 28)+ _lhsOcollectedMacros =+ ({-# LINE 1283 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3582 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 165, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 165 "src-ag/Transform.ag" #-}+ _altsIcollectedMerges+ {-# LINE 3588 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 91, column 50)+ _lhsOcollectedNames =+ ({-# LINE 91 "src-ag/Transform.ag" #-}+ _namesIcollectedNames+ {-# LINE 3594 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 159, column 32)+ _lhsOcollectedRules =+ ({-# LINE 159 "src-ag/Transform.ag" #-}+ _altsIcollectedRules+ {-# LINE 3600 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 90, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 90 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 3606 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 160, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 160 "src-ag/Transform.ag" #-}+ _altsIcollectedSigs+ {-# LINE 3612 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 162, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 162 "src-ag/Transform.ag" #-}+ _altsIcollectedUniques+ {-# LINE 3618 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 990, column 33)+ _lhsOderivings =+ ({-# LINE 990 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3624 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ _namesIerrors Seq.>< _attrsIerrors Seq.>< _altsIerrors+ {-# LINE 3630 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1187, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1187 "src-ag/Transform.ag" #-}+ mzero+ {-# LINE 3636 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 925, column 37)+ _lhsOparamsCollect =+ ({-# LINE 925 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3642 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 787, column 34)+ _lhsOpragmas =+ ({-# LINE 787 "src-ag/Transform.ag" #-}+ id+ {-# LINE 3648 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 865, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 865 "src-ag/Transform.ag" #-}+ _altsIsemPragmasCollect+ {-# LINE 3654 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 626, column 32)+ _lhsOtypeSyns =+ ({-# LINE 626 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3660 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 145, column 15)+ _lhsOuseMap =+ ({-# LINE 145 "src-ag/Transform.ag" #-}+ _attrsIuseMap+ {-# LINE 3666 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 771, column 32)+ _lhsOwrappers =+ ({-# LINE 771 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 3672 "dist/build/Transform" #-}+ )+ -- copy rule (up)+ _lhsOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _attrsIattrDecls+ {-# LINE 3678 "dist/build/Transform" #-}+ )+ -- copy rule (up)+ _lhsOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _attrsIattrs+ {-# LINE 3684 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 109 "src-ag/Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 3690 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _namesOallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 3696 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _namesOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 3702 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _namesOdefinedSets =+ ({-# LINE 112 "src-ag/Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 3708 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _attrsOallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 3714 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _attrsOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 3720 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _attrsOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 3726 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _attrsOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _lhsIattrs+ {-# LINE 3732 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _attrsOoptions =+ ({-# LINE 40 "src-ag/Transform.ag" #-}+ _lhsIoptions+ {-# LINE 3738 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _altsOallAttrDecls =+ ({-# LINE 894 "src-ag/Transform.ag" #-}+ _lhsIallAttrDecls+ {-# LINE 3744 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _altsOallAttrs =+ ({-# LINE 1306 "src-ag/Transform.ag" #-}+ _lhsIallAttrs+ {-# LINE 3750 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _altsOallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 3756 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _altsOoptions =+ ({-# LINE 40 "src-ag/Transform.ag" #-}+ _lhsIoptions+ {-# LINE 3762 "dist/build/Transform" #-}+ )+ ( _namesIcollectedNames,_namesIerrors,_namesInontSet) =+ names_ _namesOallFields _namesOallNonterminals _namesOdefinedSets+ ( _attrsIattrDecls,_attrsIattrs,_attrsIerrors,_attrsIuseMap) =+ attrs_ _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOattrs _attrsOnts _attrsOoptions+ ( _altsIattrOrderCollect,_altsIcollectedArounds,_altsIcollectedAugments,_altsIcollectedInsts,_altsIcollectedMerges,_altsIcollectedRules,_altsIcollectedSigs,_altsIcollectedUniques,_altsIerrors,_altsIsemPragmasCollect) =+ alts_ _altsOallAttrDecls _altsOallAttrs _altsOallFields _altsOnts _altsOoptions+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))))+sem_Elem_Set :: Pos ->+ NontermIdent ->+ Bool ->+ T_NontSet ->+ T_Elem+sem_Elem_Set pos_ name_ merge_ (T_NontSet set_) =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallAttrs+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIattrs+ _lhsIdefSets+ _lhsIdefinedSets+ _lhsIoptions ->+ (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]) ])+ _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOctxCollect :: ContextMap+ _lhsOderivings :: Derivings+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOquantCollect :: QuantMap+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOattrs :: (Map NontermIdent (Attributes, Attributes))+ _setOallFields :: DataTypes+ _setOallNonterminals :: (Set NontermIdent)+ _setOdefinedSets :: DefinedSets+ _setIcollectedNames :: (Set Identifier)+ _setIerrors :: (Seq Error)+ _setInontSet :: (Set NontermIdent)+ -- "src-ag/Transform.ag"(line 582, column 10)+ _lhsOcollectedSetNames =+ ({-# LINE 582 "src-ag/Transform.ag" #-}+ Set.singleton name_+ {-# LINE 3827 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 699, column 13)+ (_defSets2,_errs) =+ ({-# LINE 699 "src-ag/Transform.ag" #-}+ let allUsedNames = Set.unions [ maybe (Set.singleton n)+ snd+ (Map.lookup n _lhsIdefSets)+ | n <- Set.toList _setIcollectedNames+ ]+ (nontSet,e1) | Set.member name_ allUsedNames+ = (Set.empty, Seq.singleton(CyclicSet name_))+ | otherwise = (_setInontSet, Seq.empty)+ (res, e2) = let toAdd = (nontSet,Set.insert name_ allUsedNames)+ union (a,b) (c,d) = (a `Set.union` c, b `Set.union` d)+ in if Set.member name_ _lhsIallNonterminals || not merge_+ then checkDuplicate DupSet name_ toAdd _lhsIdefSets+ else (Map.insertWith union name_ toAdd _lhsIdefSets, Seq.empty)+ in (res, e1 Seq.>< e2)+ {-# LINE 3846 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 713, column 9)+ _lhsOdefSets =+ ({-# LINE 713 "src-ag/Transform.ag" #-}+ _defSets2+ {-# LINE 3852 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 713, column 9)+ _lhsOerrors =+ ({-# LINE 714 "src-ag/Transform.ag" #-}+ _errs >< _setIerrors+ {-# LINE 3858 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 893, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 893 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3864 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 46, column 19)+ _lhsOblocks =+ ({-# LINE 46 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3870 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 164, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 164 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3876 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 163, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 163 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3882 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 132, column 31)+ _lhsOcollectedConParams =+ ({-# LINE 132 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3888 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 131, column 33)+ _lhsOcollectedConstraints =+ ({-# LINE 131 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3894 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 99, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 99 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3900 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 130, column 28)+ _lhsOcollectedFields =+ ({-# LINE 130 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3906 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 161, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 161 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3912 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1283, column 28)+ _lhsOcollectedMacros =+ ({-# LINE 1283 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3918 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 165, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 165 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3924 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 91, column 50)+ _lhsOcollectedNames =+ ({-# LINE 91 "src-ag/Transform.ag" #-}+ _setIcollectedNames+ {-# LINE 3930 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 159, column 32)+ _lhsOcollectedRules =+ ({-# LINE 159 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3936 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 160, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 160 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3942 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 162, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 162 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3948 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 948, column 34)+ _lhsOctxCollect =+ ({-# LINE 948 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3954 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 990, column 33)+ _lhsOderivings =+ ({-# LINE 990 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3960 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1187, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1187 "src-ag/Transform.ag" #-}+ mzero+ {-# LINE 3966 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 925, column 37)+ _lhsOparamsCollect =+ ({-# LINE 925 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3972 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 787, column 34)+ _lhsOpragmas =+ ({-# LINE 787 "src-ag/Transform.ag" #-}+ id+ {-# LINE 3978 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 973, column 36)+ _lhsOquantCollect =+ ({-# LINE 973 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3984 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 865, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 865 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 3990 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 626, column 32)+ _lhsOtypeSyns =+ ({-# LINE 626 "src-ag/Transform.ag" #-}+ []+ {-# LINE 3996 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 145, column 15)+ _lhsOuseMap =+ ({-# LINE 145 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4002 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 771, column 32)+ _lhsOwrappers =+ ({-# LINE 771 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 4008 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 4014 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _lhsIattrs+ {-# LINE 4020 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _setOallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 4026 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _setOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 4032 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _setOdefinedSets =+ ({-# LINE 112 "src-ag/Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 4038 "dist/build/Transform" #-}+ )+ ( _setIcollectedNames,_setIerrors,_setInontSet) =+ set_ _setOallFields _setOallNonterminals _setOdefinedSets+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))))+sem_Elem_Txt :: Pos ->+ BlockKind ->+ (Maybe NontermIdent) ->+ ([String]) ->+ T_Elem+sem_Elem_Txt pos_ kind_ mbNt_ lines_ =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallAttrs+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIattrs+ _lhsIdefSets+ _lhsIdefinedSets+ _lhsIoptions ->+ (let _lhsOblocks :: Blocks+ _lhsOerrors :: (Seq Error)+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOctxCollect :: ContextMap+ _lhsOderivings :: Derivings+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOquantCollect :: QuantMap+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOattrs :: (Map NontermIdent (Attributes, Attributes))+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ -- "src-ag/Transform.ag"(line 188, column 10)+ _blockInfo =+ ({-# LINE 188 "src-ag/Transform.ag" #-}+ ( kind_+ , mbNt_+ )+ {-# LINE 4095 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 191, column 10)+ _blockValue =+ ({-# LINE 191 "src-ag/Transform.ag" #-}+ [(lines_, pos_)]+ {-# LINE 4101 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 192, column 10)+ _lhsOblocks =+ ({-# LINE 192 "src-ag/Transform.ag" #-}+ Map.singleton _blockInfo _blockValue+ {-# LINE 4107 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 193, column 10)+ _lhsOerrors =+ ({-# LINE 193 "src-ag/Transform.ag" #-}+ if checkParseBlock _lhsIoptions+ then let exp = Expression pos_ tks+ tks = [tk]+ tk = HsToken (unlines lines_) pos_+ in Seq.fromList $ checkBlock $ exp+ else Seq.empty+ {-# LINE 4118 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 893, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 893 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4124 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 164, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 164 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4130 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 163, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 163 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4136 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 132, column 31)+ _lhsOcollectedConParams =+ ({-# LINE 132 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4142 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 131, column 33)+ _lhsOcollectedConstraints =+ ({-# LINE 131 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4148 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 99, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 99 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4154 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 130, column 28)+ _lhsOcollectedFields =+ ({-# LINE 130 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4160 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 161, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 161 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4166 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1283, column 28)+ _lhsOcollectedMacros =+ ({-# LINE 1283 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4172 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 165, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 165 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4178 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 91, column 50)+ _lhsOcollectedNames =+ ({-# LINE 91 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 4184 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 159, column 32)+ _lhsOcollectedRules =+ ({-# LINE 159 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4190 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 90, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 90 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 4196 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 160, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 160 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4202 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 162, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 162 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4208 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 948, column 34)+ _lhsOctxCollect =+ ({-# LINE 948 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4214 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 990, column 33)+ _lhsOderivings =+ ({-# LINE 990 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4220 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1187, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1187 "src-ag/Transform.ag" #-}+ mzero+ {-# LINE 4226 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 925, column 37)+ _lhsOparamsCollect =+ ({-# LINE 925 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4232 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 787, column 34)+ _lhsOpragmas =+ ({-# LINE 787 "src-ag/Transform.ag" #-}+ id+ {-# LINE 4238 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 973, column 36)+ _lhsOquantCollect =+ ({-# LINE 973 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4244 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 865, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 865 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4250 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 626, column 32)+ _lhsOtypeSyns =+ ({-# LINE 626 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4256 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 145, column 15)+ _lhsOuseMap =+ ({-# LINE 145 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4262 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 771, column 32)+ _lhsOwrappers =+ ({-# LINE 771 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 4268 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 4274 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _lhsIattrs+ {-# LINE 4280 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 109 "src-ag/Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 4286 "dist/build/Transform" #-}+ )+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))))+sem_Elem_Type :: Pos ->+ ClassContext ->+ NontermIdent ->+ ([Identifier]) ->+ ComplexType ->+ T_Elem+sem_Elem_Type pos_ ctx_ name_ params_ type_ =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallAttrs+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIattrs+ _lhsIdefSets+ _lhsIdefinedSets+ _lhsIoptions ->+ (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]) ])+ _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOpragmas :: (Options -> Options)+ _lhsOquantCollect :: QuantMap+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOattrs :: (Map NontermIdent (Attributes, Attributes))+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ -- "src-ag/Transform.ag"(line 255, column 10)+ _lhsOcollectedFields =+ ({-# LINE 255 "src-ag/Transform.ag" #-}+ map (\(x,y)->(name_, x, y)) _expanded+ {-# LINE 4340 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 585, column 11)+ _lhsOcollectedNames =+ ({-# LINE 585 "src-ag/Transform.ag" #-}+ Set.singleton name_+ {-# LINE 4346 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 639, column 11)+ _expanded =+ ({-# LINE 639 "src-ag/Transform.ag" #-}+ case _argType of+ List tp -> [(Ident "Cons" pos_, [(Ident "hd" pos_, tp)+ ,(Ident "tl" pos_, NT name_ (map getName params_) False)+ ]+ )+ ,(Ident "Nil" pos_, [])+ ]+ Maybe tp -> [(Ident "Just" pos_, [(Ident "just" pos_, tp)+ ]+ )+ ,(Ident "Nothing" pos_, [])+ ]+ Either tp1 tp2 -> [+ (Ident "Left" pos_, [(Ident "left" pos_, tp1) ])+ , (Ident "Right" pos_, [(Ident "right" pos_, tp2) ])+ ]+ Map tp1 tp2 -> [ (Ident "Entry" pos_, [ (Ident "key" pos_, tp1)+ , (Ident "val" pos_, tp2)+ , (Ident "tl" pos_, NT name_ (map getName params_) False)+ ])+ , (Ident "Nil" pos_, [])+ ]+ IntMap tp -> [ (Ident "Entry" pos_, [ (Ident "key" pos_, Haskell "Int")+ , (Ident "val" pos_, tp)+ , (Ident "tl" pos_, NT name_ (map getName params_) False)+ ])+ , (Ident "Nil" pos_, [])+ ]+ OrdSet tp -> [ (Ident "Entry" pos_, [ (Ident "val" pos_, tp)+ , (Ident "tl" pos_, NT name_ (map getName params_) False) ])+ , (Ident "Nil" pos_, [])+ ]+ IntSet -> [ (Ident "Entry" pos_, [ (Ident "val" pos_, Haskell "Int")+ , (Ident "tl" pos_, NT name_ (map getName params_) False) ])+ , (Ident "Nil" pos_, [])+ ]+ Tuple xs -> [(Ident "Tuple" pos_, xs)]+ {-# LINE 4388 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 676, column 11)+ _argType =+ ({-# LINE 676 "src-ag/Transform.ag" #-}+ case type_ of+ Maybe tp -> Maybe ( makeType _lhsIallNonterminals tp)+ Either tp1 tp2 -> Either ( makeType _lhsIallNonterminals tp1) (makeType _lhsIallNonterminals tp2)+ List tp -> List ( makeType _lhsIallNonterminals tp)+ Tuple xs -> Tuple [(f,makeType _lhsIallNonterminals tp) | (f,tp) <- xs]+ Map tp1 tp2 -> Map ( makeType _lhsIallNonterminals tp1) (makeType _lhsIallNonterminals tp2)+ IntMap tp -> IntMap ( makeType _lhsIallNonterminals tp)+ OrdSet tp -> OrdSet ( makeType _lhsIallNonterminals tp)+ IntSet -> IntSet+ {-# LINE 4402 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 685, column 11)+ _lhsOtypeSyns =+ ({-# LINE 685 "src-ag/Transform.ag" #-}+ [(name_,_argType)]+ {-# LINE 4408 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 935, column 7)+ _lhsOparamsCollect =+ ({-# LINE 935 "src-ag/Transform.ag" #-}+ if null params_+ then Map.empty+ else Map.singleton name_ params_+ {-# LINE 4416 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 958, column 7)+ _lhsOctxCollect =+ ({-# LINE 958 "src-ag/Transform.ag" #-}+ if null ctx_+ then Map.empty+ else Map.singleton name_ ctx_+ {-# LINE 4424 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 893, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 893 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4430 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 46, column 19)+ _lhsOblocks =+ ({-# LINE 46 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4436 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 164, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 164 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4442 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 163, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 163 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4448 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 132, column 31)+ _lhsOcollectedConParams =+ ({-# LINE 132 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4454 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 131, column 33)+ _lhsOcollectedConstraints =+ ({-# LINE 131 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4460 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 99, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 99 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4466 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 161, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 161 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4472 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1283, column 28)+ _lhsOcollectedMacros =+ ({-# LINE 1283 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4478 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 165, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 165 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4484 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 159, column 32)+ _lhsOcollectedRules =+ ({-# LINE 159 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4490 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 90, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 90 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 4496 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 160, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 160 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4502 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 162, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 162 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4508 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 990, column 33)+ _lhsOderivings =+ ({-# LINE 990 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4514 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ Seq.empty+ {-# LINE 4520 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1187, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1187 "src-ag/Transform.ag" #-}+ mzero+ {-# LINE 4526 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 787, column 34)+ _lhsOpragmas =+ ({-# LINE 787 "src-ag/Transform.ag" #-}+ id+ {-# LINE 4532 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 973, column 36)+ _lhsOquantCollect =+ ({-# LINE 973 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4538 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 865, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 865 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4544 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 145, column 15)+ _lhsOuseMap =+ ({-# LINE 145 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4550 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 771, column 32)+ _lhsOwrappers =+ ({-# LINE 771 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 4556 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 4562 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _lhsIattrs+ {-# LINE 4568 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 109 "src-ag/Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 4574 "dist/build/Transform" #-}+ )+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))))+sem_Elem_Wrapper :: Pos ->+ T_NontSet ->+ T_Elem+sem_Elem_Wrapper pos_ (T_NontSet set_) =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallAttrs+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIattrs+ _lhsIdefSets+ _lhsIdefinedSets+ _lhsIoptions ->+ (let _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOctxCollect :: ContextMap+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOquantCollect :: QuantMap+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOattrs :: (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)+ -- "src-ag/Transform.ag"(line 774, column 13)+ _lhsOwrappers =+ ({-# LINE 774 "src-ag/Transform.ag" #-}+ _setInontSet+ {-# LINE 4631 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 893, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 893 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4637 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 46, column 19)+ _lhsOblocks =+ ({-# LINE 46 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4643 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 164, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 164 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4649 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 163, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 163 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4655 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 132, column 31)+ _lhsOcollectedConParams =+ ({-# LINE 132 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4661 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 131, column 33)+ _lhsOcollectedConstraints =+ ({-# LINE 131 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4667 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 99, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 99 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4673 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 130, column 28)+ _lhsOcollectedFields =+ ({-# LINE 130 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4679 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 161, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 161 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4685 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1283, column 28)+ _lhsOcollectedMacros =+ ({-# LINE 1283 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4691 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 165, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 165 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4697 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 91, column 50)+ _lhsOcollectedNames =+ ({-# LINE 91 "src-ag/Transform.ag" #-}+ _setIcollectedNames+ {-# LINE 4703 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 159, column 32)+ _lhsOcollectedRules =+ ({-# LINE 159 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4709 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 90, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 90 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 4715 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 160, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 160 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4721 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 162, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 162 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4727 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 948, column 34)+ _lhsOctxCollect =+ ({-# LINE 948 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4733 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 990, column 33)+ _lhsOderivings =+ ({-# LINE 990 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4739 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ _setIerrors+ {-# LINE 4745 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1187, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1187 "src-ag/Transform.ag" #-}+ mzero+ {-# LINE 4751 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 925, column 37)+ _lhsOparamsCollect =+ ({-# LINE 925 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4757 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 787, column 34)+ _lhsOpragmas =+ ({-# LINE 787 "src-ag/Transform.ag" #-}+ id+ {-# LINE 4763 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 973, column 36)+ _lhsOquantCollect =+ ({-# LINE 973 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4769 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 865, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 865 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4775 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 626, column 32)+ _lhsOtypeSyns =+ ({-# LINE 626 "src-ag/Transform.ag" #-}+ []+ {-# LINE 4781 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 145, column 15)+ _lhsOuseMap =+ ({-# LINE 145 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 4787 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 4793 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _lhsIattrs+ {-# LINE 4799 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 109 "src-ag/Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 4805 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _setOallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 4811 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _setOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 4817 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _setOdefinedSets =+ ({-# LINE 112 "src-ag/Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 4823 "dist/build/Transform" #-}+ )+ ( _setIcollectedNames,_setIerrors,_setInontSet) =+ set_ _setOallFields _setOallNonterminals _setOdefinedSets+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))))+-- Elems -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allAttrDecls : Map NontermIdent (Attributes, Attributes)+ allAttrs : Map NontermIdent (Attributes, Attributes)+ allConstructors : Map NontermIdent (Set ConstructorIdent)+ allFields : DataTypes+ allNonterminals : Set NontermIdent+ definedSets : DefinedSets+ options : Options+ chained attributes:+ attrDecls : Map NontermIdent (Attributes, Attributes)+ attrs : 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]) ]+ collectedConParams : [(NontermIdent, ConstructorIdent, Set Identifier)]+ collectedConstraints : [(NontermIdent, ConstructorIdent, [Type])]+ collectedConstructorsMap : Map NontermIdent (Set ConstructorIdent)+ collectedFields : [(NontermIdent, ConstructorIdent, FieldMap)]+ collectedInsts : [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ collectedMacros : [(NontermIdent, ConstructorIdent, MaybeMacro)]+ collectedMerges : [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ collectedNames : Set Identifier+ collectedRules : [ (NontermIdent, ConstructorIdent, RuleInfo)]+ collectedSetNames : Set Identifier+ collectedSigs : [ (NontermIdent, ConstructorIdent, SigInfo) ]+ collectedUniques : [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ ctxCollect : ContextMap+ derivings : Derivings+ errors : Seq Error+ moduleDecl : Maybe (String,String,String)+ paramsCollect : ParamMap+ pragmas : Options -> Options+ quantCollect : QuantMap+ 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 (Attributes, Attributes)) ->+ (Map NontermIdent (Set ConstructorIdent)) ->+ DataTypes ->+ (Set NontermIdent) ->+ (Map NontermIdent (Attributes, Attributes)) ->+ (Map NontermIdent (Attributes, Attributes)) ->+ (Map Identifier (Set NontermIdent,Set Identifier)) ->+ DefinedSets ->+ Options ->+ ( (Map NontermIdent (Attributes, Attributes)),AttrOrderMap,(Map NontermIdent (Attributes, Attributes)),Blocks,([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]),([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]),([(NontermIdent, ConstructorIdent, Set Identifier)]),([(NontermIdent, ConstructorIdent, [Type])]),(Map NontermIdent (Set ConstructorIdent)),([(NontermIdent, ConstructorIdent, FieldMap)]),([ (NontermIdent, ConstructorIdent, [Identifier]) ]),([(NontermIdent, ConstructorIdent, MaybeMacro)]),([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]),(Set Identifier),([ (NontermIdent, ConstructorIdent, RuleInfo)]),(Set Identifier),([ (NontermIdent, ConstructorIdent, SigInfo) ]),([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]),ContextMap,(Map Identifier (Set NontermIdent,Set Identifier)),Derivings,(Seq Error),(Maybe (String,String,String)),ParamMap,(Options -> Options),QuantMap,PragmaMap,TypeSyns,(Map NontermIdent (Map Identifier (String,String,String))),(Set NontermIdent)))+data Inh_Elems = Inh_Elems {allAttrDecls_Inh_Elems :: !((Map NontermIdent (Attributes, Attributes))),allAttrs_Inh_Elems :: !((Map NontermIdent (Attributes, Attributes))),allConstructors_Inh_Elems :: !((Map NontermIdent (Set ConstructorIdent))),allFields_Inh_Elems :: !(DataTypes),allNonterminals_Inh_Elems :: !((Set NontermIdent)),attrDecls_Inh_Elems :: !((Map NontermIdent (Attributes, Attributes))),attrs_Inh_Elems :: !((Map NontermIdent (Attributes, Attributes))),defSets_Inh_Elems :: !((Map Identifier (Set NontermIdent,Set Identifier))),definedSets_Inh_Elems :: !(DefinedSets),options_Inh_Elems :: !(Options)}+data Syn_Elems = Syn_Elems {attrDecls_Syn_Elems :: !((Map NontermIdent (Attributes, Attributes))),attrOrderCollect_Syn_Elems :: !(AttrOrderMap),attrs_Syn_Elems :: !((Map NontermIdent (Attributes, Attributes))),blocks_Syn_Elems :: !(Blocks),collectedArounds_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])),collectedAugments_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])),collectedConParams_Syn_Elems :: !(([(NontermIdent, ConstructorIdent, Set Identifier)])),collectedConstraints_Syn_Elems :: !(([(NontermIdent, ConstructorIdent, [Type])])),collectedConstructorsMap_Syn_Elems :: !((Map NontermIdent (Set ConstructorIdent))),collectedFields_Syn_Elems :: !(([(NontermIdent, ConstructorIdent, FieldMap)])),collectedInsts_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, [Identifier]) ])),collectedMacros_Syn_Elems :: !(([(NontermIdent, ConstructorIdent, MaybeMacro)])),collectedMerges_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])),collectedNames_Syn_Elems :: !((Set Identifier)),collectedRules_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, RuleInfo)])),collectedSetNames_Syn_Elems :: !((Set Identifier)),collectedSigs_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, SigInfo) ])),collectedUniques_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])),ctxCollect_Syn_Elems :: !(ContextMap),defSets_Syn_Elems :: !((Map Identifier (Set NontermIdent,Set Identifier))),derivings_Syn_Elems :: !(Derivings),errors_Syn_Elems :: !((Seq Error)),moduleDecl_Syn_Elems :: !((Maybe (String,String,String))),paramsCollect_Syn_Elems :: !(ParamMap),pragmas_Syn_Elems :: !((Options -> Options)),quantCollect_Syn_Elems :: !(QuantMap),semPragmasCollect_Syn_Elems :: !(PragmaMap),typeSyns_Syn_Elems :: !(TypeSyns),useMap_Syn_Elems :: !((Map NontermIdent (Map Identifier (String,String,String)))),wrappers_Syn_Elems :: !((Set NontermIdent))}+wrap_Elems :: T_Elems ->+ Inh_Elems ->+ Syn_Elems+wrap_Elems (T_Elems sem) (Inh_Elems _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) =+ (let ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers) = sem _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions+ in (Syn_Elems _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers))+sem_Elems_Cons :: T_Elem ->+ T_Elems ->+ T_Elems+sem_Elems_Cons (T_Elem hd_) (T_Elems tl_) =+ (T_Elems (\ _lhsIallAttrDecls+ _lhsIallAttrs+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIattrs+ _lhsIdefSets+ _lhsIdefinedSets+ _lhsIoptions ->+ (let _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOctxCollect :: ContextMap+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOquantCollect :: QuantMap+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOattrs :: (Map NontermIdent (Attributes, Attributes))+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _hdOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))+ _hdOallAttrs :: (Map NontermIdent (Attributes, Attributes))+ _hdOallConstructors :: (Map NontermIdent (Set ConstructorIdent))+ _hdOallFields :: DataTypes+ _hdOallNonterminals :: (Set NontermIdent)+ _hdOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _hdOattrs :: (Map NontermIdent (Attributes, Attributes))+ _hdOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _hdOdefinedSets :: DefinedSets+ _hdOoptions :: Options+ _tlOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))+ _tlOallAttrs :: (Map NontermIdent (Attributes, Attributes))+ _tlOallConstructors :: (Map NontermIdent (Set ConstructorIdent))+ _tlOallFields :: DataTypes+ _tlOallNonterminals :: (Set NontermIdent)+ _tlOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _tlOattrs :: (Map NontermIdent (Attributes, Attributes))+ _tlOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _tlOdefinedSets :: DefinedSets+ _tlOoptions :: Options+ _hdIattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _hdIattrOrderCollect :: AttrOrderMap+ _hdIattrs :: (Map NontermIdent (Attributes, Attributes))+ _hdIblocks :: Blocks+ _hdIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _hdIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _hdIcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _hdIcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _hdIcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _hdIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _hdIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _hdIcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _hdIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _hdIcollectedNames :: (Set Identifier)+ _hdIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _hdIcollectedSetNames :: (Set Identifier)+ _hdIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _hdIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _hdIctxCollect :: ContextMap+ _hdIdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _hdIderivings :: Derivings+ _hdIerrors :: (Seq Error)+ _hdImoduleDecl :: (Maybe (String,String,String))+ _hdIparamsCollect :: ParamMap+ _hdIpragmas :: (Options -> Options)+ _hdIquantCollect :: QuantMap+ _hdIsemPragmasCollect :: PragmaMap+ _hdItypeSyns :: TypeSyns+ _hdIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _hdIwrappers :: (Set NontermIdent)+ _tlIattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _tlIattrOrderCollect :: AttrOrderMap+ _tlIattrs :: (Map NontermIdent (Attributes, Attributes))+ _tlIblocks :: Blocks+ _tlIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _tlIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _tlIcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _tlIcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _tlIcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _tlIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _tlIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _tlIcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _tlIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _tlIcollectedNames :: (Set Identifier)+ _tlIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _tlIcollectedSetNames :: (Set Identifier)+ _tlIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _tlIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _tlIctxCollect :: ContextMap+ _tlIdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _tlIderivings :: Derivings+ _tlIerrors :: (Seq Error)+ _tlImoduleDecl :: (Maybe (String,String,String))+ _tlIparamsCollect :: ParamMap+ _tlIpragmas :: (Options -> Options)+ _tlIquantCollect :: QuantMap+ _tlIsemPragmasCollect :: PragmaMap+ _tlItypeSyns :: TypeSyns+ _tlIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _tlIwrappers :: (Set NontermIdent)+ -- use rule "src-ag/Transform.ag"(line 893, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 893 "src-ag/Transform.ag" #-}+ _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect+ {-# LINE 5030 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 46, column 19)+ _lhsOblocks =+ ({-# LINE 46 "src-ag/Transform.ag" #-}+ _hdIblocks `mapUnionWithPlusPlus` _tlIblocks+ {-# LINE 5036 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 164, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 164 "src-ag/Transform.ag" #-}+ _hdIcollectedArounds ++ _tlIcollectedArounds+ {-# LINE 5042 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 163, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 163 "src-ag/Transform.ag" #-}+ _hdIcollectedAugments ++ _tlIcollectedAugments+ {-# LINE 5048 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 132, column 31)+ _lhsOcollectedConParams =+ ({-# LINE 132 "src-ag/Transform.ag" #-}+ _hdIcollectedConParams ++ _tlIcollectedConParams+ {-# LINE 5054 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 131, column 33)+ _lhsOcollectedConstraints =+ ({-# LINE 131 "src-ag/Transform.ag" #-}+ _hdIcollectedConstraints ++ _tlIcollectedConstraints+ {-# LINE 5060 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 99, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 99 "src-ag/Transform.ag" #-}+ _hdIcollectedConstructorsMap `mapUnionWithSetUnion` _tlIcollectedConstructorsMap+ {-# LINE 5066 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 130, column 28)+ _lhsOcollectedFields =+ ({-# LINE 130 "src-ag/Transform.ag" #-}+ _hdIcollectedFields ++ _tlIcollectedFields+ {-# LINE 5072 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 161, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 161 "src-ag/Transform.ag" #-}+ _hdIcollectedInsts ++ _tlIcollectedInsts+ {-# LINE 5078 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1283, column 28)+ _lhsOcollectedMacros =+ ({-# LINE 1283 "src-ag/Transform.ag" #-}+ _hdIcollectedMacros ++ _tlIcollectedMacros+ {-# LINE 5084 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 165, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 165 "src-ag/Transform.ag" #-}+ _hdIcollectedMerges ++ _tlIcollectedMerges+ {-# LINE 5090 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 91, column 50)+ _lhsOcollectedNames =+ ({-# LINE 91 "src-ag/Transform.ag" #-}+ _hdIcollectedNames `Set.union` _tlIcollectedNames+ {-# LINE 5096 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 159, column 32)+ _lhsOcollectedRules =+ ({-# LINE 159 "src-ag/Transform.ag" #-}+ _hdIcollectedRules ++ _tlIcollectedRules+ {-# LINE 5102 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 90, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 90 "src-ag/Transform.ag" #-}+ _hdIcollectedSetNames `Set.union` _tlIcollectedSetNames+ {-# LINE 5108 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 160, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 160 "src-ag/Transform.ag" #-}+ _hdIcollectedSigs ++ _tlIcollectedSigs+ {-# LINE 5114 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 162, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 162 "src-ag/Transform.ag" #-}+ _hdIcollectedUniques ++ _tlIcollectedUniques+ {-# LINE 5120 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 948, column 34)+ _lhsOctxCollect =+ ({-# LINE 948 "src-ag/Transform.ag" #-}+ _hdIctxCollect `mergeCtx` _tlIctxCollect+ {-# LINE 5126 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 990, column 33)+ _lhsOderivings =+ ({-# LINE 990 "src-ag/Transform.ag" #-}+ _hdIderivings `mergeDerivings` _tlIderivings+ {-# LINE 5132 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 5138 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1187, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1187 "src-ag/Transform.ag" #-}+ _hdImoduleDecl `mplus` _tlImoduleDecl+ {-# LINE 5144 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 925, column 37)+ _lhsOparamsCollect =+ ({-# LINE 925 "src-ag/Transform.ag" #-}+ _hdIparamsCollect `mergeParams` _tlIparamsCollect+ {-# LINE 5150 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 787, column 34)+ _lhsOpragmas =+ ({-# LINE 787 "src-ag/Transform.ag" #-}+ _hdIpragmas . _tlIpragmas+ {-# LINE 5156 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 973, column 36)+ _lhsOquantCollect =+ ({-# LINE 973 "src-ag/Transform.ag" #-}+ _hdIquantCollect `mergeQuant` _tlIquantCollect+ {-# LINE 5162 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 865, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 865 "src-ag/Transform.ag" #-}+ _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect+ {-# LINE 5168 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 626, column 32)+ _lhsOtypeSyns =+ ({-# LINE 626 "src-ag/Transform.ag" #-}+ _hdItypeSyns ++ _tlItypeSyns+ {-# LINE 5174 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 145, column 15)+ _lhsOuseMap =+ ({-# LINE 145 "src-ag/Transform.ag" #-}+ _hdIuseMap `merge` _tlIuseMap+ {-# LINE 5180 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 771, column 32)+ _lhsOwrappers =+ ({-# LINE 771 "src-ag/Transform.ag" #-}+ _hdIwrappers `Set.union` _tlIwrappers+ {-# LINE 5186 "dist/build/Transform" #-}+ )+ -- copy rule (up)+ _lhsOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _tlIattrDecls+ {-# LINE 5192 "dist/build/Transform" #-}+ )+ -- copy rule (up)+ _lhsOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _tlIattrs+ {-# LINE 5198 "dist/build/Transform" #-}+ )+ -- copy rule (up)+ _lhsOdefSets =+ ({-# LINE 109 "src-ag/Transform.ag" #-}+ _tlIdefSets+ {-# LINE 5204 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOallAttrDecls =+ ({-# LINE 894 "src-ag/Transform.ag" #-}+ _lhsIallAttrDecls+ {-# LINE 5210 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOallAttrs =+ ({-# LINE 1306 "src-ag/Transform.ag" #-}+ _lhsIallAttrs+ {-# LINE 5216 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOallConstructors =+ ({-# LINE 101 "src-ag/Transform.ag" #-}+ _lhsIallConstructors+ {-# LINE 5222 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 5228 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 5234 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 5240 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _lhsIattrs+ {-# LINE 5246 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOdefSets =+ ({-# LINE 109 "src-ag/Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 5252 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOdefinedSets =+ ({-# LINE 112 "src-ag/Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 5258 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 40 "src-ag/Transform.ag" #-}+ _lhsIoptions+ {-# LINE 5264 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _tlOallAttrDecls =+ ({-# LINE 894 "src-ag/Transform.ag" #-}+ _lhsIallAttrDecls+ {-# LINE 5270 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _tlOallAttrs =+ ({-# LINE 1306 "src-ag/Transform.ag" #-}+ _lhsIallAttrs+ {-# LINE 5276 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _tlOallConstructors =+ ({-# LINE 101 "src-ag/Transform.ag" #-}+ _lhsIallConstructors+ {-# LINE 5282 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _tlOallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 5288 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _tlOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 5294 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _tlOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _hdIattrDecls+ {-# LINE 5300 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _tlOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _hdIattrs+ {-# LINE 5306 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _tlOdefSets =+ ({-# LINE 109 "src-ag/Transform.ag" #-}+ _hdIdefSets+ {-# LINE 5312 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _tlOdefinedSets =+ ({-# LINE 112 "src-ag/Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 5318 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 40 "src-ag/Transform.ag" #-}+ _lhsIoptions+ {-# LINE 5324 "dist/build/Transform" #-}+ )+ ( _hdIattrDecls,_hdIattrOrderCollect,_hdIattrs,_hdIblocks,_hdIcollectedArounds,_hdIcollectedAugments,_hdIcollectedConParams,_hdIcollectedConstraints,_hdIcollectedConstructorsMap,_hdIcollectedFields,_hdIcollectedInsts,_hdIcollectedMacros,_hdIcollectedMerges,_hdIcollectedNames,_hdIcollectedRules,_hdIcollectedSetNames,_hdIcollectedSigs,_hdIcollectedUniques,_hdIctxCollect,_hdIdefSets,_hdIderivings,_hdIerrors,_hdImoduleDecl,_hdIparamsCollect,_hdIpragmas,_hdIquantCollect,_hdIsemPragmasCollect,_hdItypeSyns,_hdIuseMap,_hdIwrappers) =+ hd_ _hdOallAttrDecls _hdOallAttrs _hdOallConstructors _hdOallFields _hdOallNonterminals _hdOattrDecls _hdOattrs _hdOdefSets _hdOdefinedSets _hdOoptions+ ( _tlIattrDecls,_tlIattrOrderCollect,_tlIattrs,_tlIblocks,_tlIcollectedArounds,_tlIcollectedAugments,_tlIcollectedConParams,_tlIcollectedConstraints,_tlIcollectedConstructorsMap,_tlIcollectedFields,_tlIcollectedInsts,_tlIcollectedMacros,_tlIcollectedMerges,_tlIcollectedNames,_tlIcollectedRules,_tlIcollectedSetNames,_tlIcollectedSigs,_tlIcollectedUniques,_tlIctxCollect,_tlIdefSets,_tlIderivings,_tlIerrors,_tlImoduleDecl,_tlIparamsCollect,_tlIpragmas,_tlIquantCollect,_tlIsemPragmasCollect,_tlItypeSyns,_tlIuseMap,_tlIwrappers) =+ tl_ _tlOallAttrDecls _tlOallAttrs _tlOallConstructors _tlOallFields _tlOallNonterminals _tlOattrDecls _tlOattrs _tlOdefSets _tlOdefinedSets _tlOoptions+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))))+sem_Elems_Nil :: T_Elems+sem_Elems_Nil =+ (T_Elems (\ _lhsIallAttrDecls+ _lhsIallAttrs+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIattrs+ _lhsIdefSets+ _lhsIdefinedSets+ _lhsIoptions ->+ (let _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConParams :: ([(NontermIdent, ConstructorIdent, Set Identifier)])+ _lhsOcollectedConstraints :: ([(NontermIdent, ConstructorIdent, [Type])])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMacros :: ([(NontermIdent, ConstructorIdent, MaybeMacro)])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOctxCollect :: ContextMap+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOquantCollect :: QuantMap+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOattrs :: (Map NontermIdent (Attributes, Attributes))+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ -- use rule "src-ag/Transform.ag"(line 893, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 893 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 5377 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 46, column 19)+ _lhsOblocks =+ ({-# LINE 46 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 5383 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 164, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 164 "src-ag/Transform.ag" #-}+ []+ {-# LINE 5389 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 163, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 163 "src-ag/Transform.ag" #-}+ []+ {-# LINE 5395 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 132, column 31)+ _lhsOcollectedConParams =+ ({-# LINE 132 "src-ag/Transform.ag" #-}+ []+ {-# LINE 5401 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 131, column 33)+ _lhsOcollectedConstraints =+ ({-# LINE 131 "src-ag/Transform.ag" #-}+ []+ {-# LINE 5407 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 99, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 99 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 5413 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 130, column 28)+ _lhsOcollectedFields =+ ({-# LINE 130 "src-ag/Transform.ag" #-}+ []+ {-# LINE 5419 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 161, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 161 "src-ag/Transform.ag" #-}+ []+ {-# LINE 5425 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1283, column 28)+ _lhsOcollectedMacros =+ ({-# LINE 1283 "src-ag/Transform.ag" #-}+ []+ {-# LINE 5431 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 165, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 165 "src-ag/Transform.ag" #-}+ []+ {-# LINE 5437 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 91, column 50)+ _lhsOcollectedNames =+ ({-# LINE 91 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 5443 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 159, column 32)+ _lhsOcollectedRules =+ ({-# LINE 159 "src-ag/Transform.ag" #-}+ []+ {-# LINE 5449 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 90, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 90 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 5455 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 160, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 160 "src-ag/Transform.ag" #-}+ []+ {-# LINE 5461 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 162, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 162 "src-ag/Transform.ag" #-}+ []+ {-# LINE 5467 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 948, column 34)+ _lhsOctxCollect =+ ({-# LINE 948 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 5473 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 990, column 33)+ _lhsOderivings =+ ({-# LINE 990 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 5479 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ Seq.empty+ {-# LINE 5485 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1187, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1187 "src-ag/Transform.ag" #-}+ mzero+ {-# LINE 5491 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 925, column 37)+ _lhsOparamsCollect =+ ({-# LINE 925 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 5497 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 787, column 34)+ _lhsOpragmas =+ ({-# LINE 787 "src-ag/Transform.ag" #-}+ id+ {-# LINE 5503 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 973, column 36)+ _lhsOquantCollect =+ ({-# LINE 973 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 5509 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 865, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 865 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 5515 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 626, column 32)+ _lhsOtypeSyns =+ ({-# LINE 626 "src-ag/Transform.ag" #-}+ []+ {-# LINE 5521 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 145, column 15)+ _lhsOuseMap =+ ({-# LINE 145 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 5527 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 771, column 32)+ _lhsOwrappers =+ ({-# LINE 771 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 5533 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 144 "src-ag/Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 5539 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOattrs =+ ({-# LINE 1316 "src-ag/Transform.ag" #-}+ _lhsIattrs+ {-# LINE 5545 "dist/build/Transform" #-}+ )+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 109 "src-ag/Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 5551 "dist/build/Transform" #-}+ )+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOattrs,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConParams,_lhsOcollectedConstraints,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMacros,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOquantCollect,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))))+-- Field -------------------------------------------------------+{-+ visit 0:+ inherited attribute:+ allNonterminals : Set NontermIdent+ synthesized attributes:+ collectedConstraints : [Type]+ collectedFields : [(Identifier, Type)]+ alternatives:+ alternative FChild:+ child name : {Identifier}+ child tp : {Type}+ alternative FCtx:+ child tps : {[Type]}+-}+-- cata+sem_Field :: Field ->+ T_Field+sem_Field (FChild _name _tp) =+ (sem_Field_FChild _name _tp)+sem_Field (FCtx _tps) =+ (sem_Field_FCtx _tps)+-- semantic domain+newtype T_Field = T_Field ((Set NontermIdent) ->+ ( ([Type]),([(Identifier, Type)])))+data Inh_Field = Inh_Field {allNonterminals_Inh_Field :: !((Set NontermIdent))}+data Syn_Field = Syn_Field {collectedConstraints_Syn_Field :: !(([Type])),collectedFields_Syn_Field :: !(([(Identifier, Type)]))}+wrap_Field :: T_Field ->+ Inh_Field ->+ Syn_Field+wrap_Field (T_Field sem) (Inh_Field _lhsIallNonterminals) =+ (let ( _lhsOcollectedConstraints,_lhsOcollectedFields) = sem _lhsIallNonterminals+ in (Syn_Field _lhsOcollectedConstraints _lhsOcollectedFields))+sem_Field_FChild :: Identifier ->+ Type ->+ T_Field+sem_Field_FChild name_ tp_ =+ (T_Field (\ _lhsIallNonterminals ->+ (let _lhsOcollectedFields :: ([(Identifier, Type)])+ _lhsOcollectedConstraints :: ([Type])+ -- "src-ag/Transform.ag"(line 564, column 3)+ _lhsOcollectedFields =+ ({-# LINE 564 "src-ag/Transform.ag" #-}+ [(name_, makeType _lhsIallNonterminals tp_)]+ {-# LINE 5598 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 570, column 46)+ _lhsOcollectedConstraints =+ ({-# LINE 570 "src-ag/Transform.ag" #-}+ []+ {-# LINE 5604 "dist/build/Transform" #-}+ )+ in ( _lhsOcollectedConstraints,_lhsOcollectedFields))))+sem_Field_FCtx :: ([Type]) ->+ T_Field+sem_Field_FCtx tps_ =+ (T_Field (\ _lhsIallNonterminals ->+ (let _lhsOcollectedConstraints :: ([Type])+ _lhsOcollectedFields :: ([(Identifier, Type)])+ -- "src-ag/Transform.ag"(line 573, column 3)+ _lhsOcollectedConstraints =+ ({-# LINE 573 "src-ag/Transform.ag" #-}+ tps_+ {-# LINE 5617 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 561, column 41)+ _lhsOcollectedFields =+ ({-# LINE 561 "src-ag/Transform.ag" #-}+ []+ {-# LINE 5623 "dist/build/Transform" #-}+ )+ in ( _lhsOcollectedConstraints,_lhsOcollectedFields))))+-- Fields ------------------------------------------------------+{-+ visit 0:+ inherited attribute:+ allNonterminals : Set NontermIdent+ synthesized attributes:+ collectedConstraints : [Type]+ collectedFields : [(Identifier, Type)]+ alternatives:+ alternative Cons:+ child hd : Field + child tl : Fields + alternative Nil:+-}+-- cata+sem_Fields :: Fields ->+ T_Fields+sem_Fields list =+ (Prelude.foldr sem_Fields_Cons sem_Fields_Nil (Prelude.map sem_Field list))+-- semantic domain+newtype T_Fields = T_Fields ((Set NontermIdent) ->+ ( ([Type]),([(Identifier, Type)])))+data Inh_Fields = Inh_Fields {allNonterminals_Inh_Fields :: !((Set NontermIdent))}+data Syn_Fields = Syn_Fields {collectedConstraints_Syn_Fields :: !(([Type])),collectedFields_Syn_Fields :: !(([(Identifier, Type)]))}+wrap_Fields :: T_Fields ->+ Inh_Fields ->+ Syn_Fields+wrap_Fields (T_Fields sem) (Inh_Fields _lhsIallNonterminals) =+ (let ( _lhsOcollectedConstraints,_lhsOcollectedFields) = sem _lhsIallNonterminals+ in (Syn_Fields _lhsOcollectedConstraints _lhsOcollectedFields))+sem_Fields_Cons :: T_Field ->+ T_Fields ->+ T_Fields+sem_Fields_Cons (T_Field hd_) (T_Fields tl_) =+ (T_Fields (\ _lhsIallNonterminals ->+ (let _lhsOcollectedConstraints :: ([Type])+ _lhsOcollectedFields :: ([(Identifier, Type)])+ _hdOallNonterminals :: (Set NontermIdent)+ _tlOallNonterminals :: (Set NontermIdent)+ _hdIcollectedConstraints :: ([Type])+ _hdIcollectedFields :: ([(Identifier, Type)])+ _tlIcollectedConstraints :: ([Type])+ _tlIcollectedFields :: ([(Identifier, Type)])+ -- use rule "src-ag/Transform.ag"(line 570, column 46)+ _lhsOcollectedConstraints =+ ({-# LINE 570 "src-ag/Transform.ag" #-}+ _hdIcollectedConstraints ++ _tlIcollectedConstraints+ {-# LINE 5673 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 561, column 41)+ _lhsOcollectedFields =+ ({-# LINE 561 "src-ag/Transform.ag" #-}+ _hdIcollectedFields ++ _tlIcollectedFields+ {-# LINE 5679 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 5685 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _tlOallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 5691 "dist/build/Transform" #-}+ )+ ( _hdIcollectedConstraints,_hdIcollectedFields) =+ hd_ _hdOallNonterminals+ ( _tlIcollectedConstraints,_tlIcollectedFields) =+ tl_ _tlOallNonterminals+ in ( _lhsOcollectedConstraints,_lhsOcollectedFields))))+sem_Fields_Nil :: T_Fields+sem_Fields_Nil =+ (T_Fields (\ _lhsIallNonterminals ->+ (let _lhsOcollectedConstraints :: ([Type])+ _lhsOcollectedFields :: ([(Identifier, Type)])+ -- use rule "src-ag/Transform.ag"(line 570, column 46)+ _lhsOcollectedConstraints =+ ({-# LINE 570 "src-ag/Transform.ag" #-}+ []+ {-# LINE 5707 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 561, column 41)+ _lhsOcollectedFields =+ ({-# LINE 561 "src-ag/Transform.ag" #-}+ []+ {-# LINE 5713 "dist/build/Transform" #-}+ )+ in ( _lhsOcollectedConstraints,_lhsOcollectedFields))))+-- 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 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)+ -- "src-ag/Transform.ag"(line 717, column 16)+ _lhsOnontSet =+ ({-# LINE 717 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 5787 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 91, column 50)+ _lhsOcollectedNames =+ ({-# LINE 91 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 5793 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ Seq.empty+ {-# LINE 5799 "dist/build/Transform" #-}+ )+ 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)+ -- "src-ag/Transform.ag"(line 723, column 16)+ _lhsOnontSet =+ ({-# LINE 723 "src-ag/Transform.ag" #-}+ Set.difference _set1InontSet _set2InontSet+ {-# LINE 5828 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 91, column 50)+ _lhsOcollectedNames =+ ({-# LINE 91 "src-ag/Transform.ag" #-}+ _set1IcollectedNames `Set.union` _set2IcollectedNames+ {-# LINE 5834 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ _set1Ierrors Seq.>< _set2Ierrors+ {-# LINE 5840 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set1OallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 5846 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set1OallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 5852 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set1OdefinedSets =+ ({-# LINE 112 "src-ag/Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 5858 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set2OallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 5864 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set2OallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 5870 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set2OdefinedSets =+ ({-# LINE 112 "src-ag/Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 5876 "dist/build/Transform" #-}+ )+ ( _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)+ -- "src-ag/Transform.ag"(line 722, column 16)+ _lhsOnontSet =+ ({-# LINE 722 "src-ag/Transform.ag" #-}+ Set.intersection _set1InontSet _set2InontSet+ {-# LINE 5909 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 91, column 50)+ _lhsOcollectedNames =+ ({-# LINE 91 "src-ag/Transform.ag" #-}+ _set1IcollectedNames `Set.union` _set2IcollectedNames+ {-# LINE 5915 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ _set1Ierrors Seq.>< _set2Ierrors+ {-# LINE 5921 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set1OallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 5927 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set1OallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 5933 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set1OdefinedSets =+ ({-# LINE 112 "src-ag/Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 5939 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set2OallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 5945 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set2OallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 5951 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set2OdefinedSets =+ ({-# LINE 112 "src-ag/Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 5957 "dist/build/Transform" #-}+ )+ ( _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)+ -- "src-ag/Transform.ag"(line 588, column 14)+ _lhsOcollectedNames =+ ({-# LINE 588 "src-ag/Transform.ag" #-}+ Set.singleton name_+ {-# LINE 5977 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 718, column 20)+ (_nontSet,_errors) =+ ({-# LINE 718 "src-ag/Transform.ag" #-}+ case Map.lookup name_ _lhsIdefinedSets of+ Nothing -> (Set.empty, Seq.singleton (UndefNont name_))+ Just set -> (set, Seq.empty)+ {-# LINE 5985 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ _errors+ {-# LINE 5991 "dist/build/Transform" #-}+ )+ -- copy rule (from local)+ _lhsOnontSet =+ ({-# LINE 117 "src-ag/Transform.ag" #-}+ _nontSet+ {-# LINE 5997 "dist/build/Transform" #-}+ )+ 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)+ -- "src-ag/Transform.ag"(line 724, column 16)+ _lhsOnontSet =+ ({-# LINE 724 "src-ag/Transform.ag" #-}+ let table = flattenDatas _lhsIallFields+ in path table from_ to_+ {-# LINE 6015 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 726, column 16)+ _lhsOerrors =+ ({-# LINE 726 "src-ag/Transform.ag" #-}+ let check name | Set.member name _lhsIallNonterminals+ = Seq.empty+ | otherwise = Seq.singleton (UndefNont name)+ in check from_ >< check to_+ {-# LINE 6024 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 91, column 50)+ _lhsOcollectedNames =+ ({-# LINE 91 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 6030 "dist/build/Transform" #-}+ )+ 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)+ -- "src-ag/Transform.ag"(line 721, column 16)+ _lhsOnontSet =+ ({-# LINE 721 "src-ag/Transform.ag" #-}+ Set.union _set1InontSet _set2InontSet+ {-# LINE 6059 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 91, column 50)+ _lhsOcollectedNames =+ ({-# LINE 91 "src-ag/Transform.ag" #-}+ _set1IcollectedNames `Set.union` _set2IcollectedNames+ {-# LINE 6065 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ _set1Ierrors Seq.>< _set2Ierrors+ {-# LINE 6071 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set1OallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 6077 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set1OallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 6083 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set1OdefinedSets =+ ({-# LINE 112 "src-ag/Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 6089 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set2OallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 6095 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set2OallNonterminals =+ ({-# LINE 93 "src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 6101 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _set2OdefinedSets =+ ({-# LINE 112 "src-ag/Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 6107 "dist/build/Transform" #-}+ )+ ( _set1IcollectedNames,_set1Ierrors,_set1InontSet) =+ set1_ _set1OallFields _set1OallNonterminals _set1OdefinedSets+ ( _set2IcollectedNames,_set2Ierrors,_set2InontSet) =+ set2_ _set2OallFields _set2OallNonterminals _set2OdefinedSets+ in ( _lhsOcollectedNames,_lhsOerrors,_lhsOnontSet))))+-- Pattern -----------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ copy : Pattern + definedAttrs : [AttrName]+ definedInsts : [Identifier]+ patunder : [AttrName]->Pattern+ stpos : Pos+ alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + 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) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat))+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_Pattern+sem_Pattern_Alias field_ attr_ (T_Pattern pat_) =+ (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+ -- "src-ag/Transform.ag"(line 1163, column 11)+ _lhsOdefinedAttrs =+ ({-# LINE 1163 "src-ag/Transform.ag" #-}+ (field_, attr_) : _patIdefinedAttrs+ {-# LINE 6191 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1164, column 11)+ _lhsOpatunder =+ ({-# LINE 1164 "src-ag/Transform.ag" #-}+ \us -> if ((field_,attr_) `elem` us) then Underscore noPos else _copy+ {-# LINE 6197 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1165, column 11)+ _lhsOdefinedInsts =+ ({-# LINE 1165 "src-ag/Transform.ag" #-}+ (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts+ {-# LINE 6203 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1180, column 16)+ _lhsOstpos =+ ({-# LINE 1180 "src-ag/Transform.ag" #-}+ getPos field_+ {-# LINE 6209 "dist/build/Transform" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Alias field_ attr_ _patIcopy+ {-# LINE 6215 "dist/build/Transform" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 6221 "dist/build/Transform" #-}+ )+ ( _patIcopy,_patIdefinedAttrs,_patIdefinedInsts,_patIpatunder,_patIstpos) =+ pat_+ 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)+ -- "src-ag/Transform.ag"(line 1167, column 12)+ _lhsOpatunder =+ ({-# LINE 1167 "src-ag/Transform.ag" #-}+ \us -> Constr name_ (_patsIpatunder us)+ {-# LINE 6243 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1178, column 16)+ _lhsOstpos =+ ({-# LINE 1178 "src-ag/Transform.ag" #-}+ getPos name_+ {-# LINE 6249 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1158, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 1158 "src-ag/Transform.ag" #-}+ _patsIdefinedAttrs+ {-# LINE 6255 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1157, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1157 "src-ag/Transform.ag" #-}+ _patsIdefinedInsts+ {-# LINE 6261 "dist/build/Transform" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 6267 "dist/build/Transform" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 6273 "dist/build/Transform" #-}+ )+ ( _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+ -- "src-ag/Transform.ag"(line 1169, column 17)+ _lhsOpatunder =+ ({-# LINE 1169 "src-ag/Transform.ag" #-}+ \us -> Irrefutable (_patIpatunder us)+ {-# LINE 6295 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1158, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 1158 "src-ag/Transform.ag" #-}+ _patIdefinedAttrs+ {-# LINE 6301 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1157, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1157 "src-ag/Transform.ag" #-}+ _patIdefinedInsts+ {-# LINE 6307 "dist/build/Transform" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 6313 "dist/build/Transform" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 6319 "dist/build/Transform" #-}+ )+ -- copy rule (up)+ _lhsOstpos =+ ({-# LINE 1175 "src-ag/Transform.ag" #-}+ _patIstpos+ {-# LINE 6325 "dist/build/Transform" #-}+ )+ ( _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)+ -- "src-ag/Transform.ag"(line 1168, column 13)+ _lhsOpatunder =+ ({-# LINE 1168 "src-ag/Transform.ag" #-}+ \us -> Product pos_ (_patsIpatunder us)+ {-# LINE 6347 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1179, column 16)+ _lhsOstpos =+ ({-# LINE 1179 "src-ag/Transform.ag" #-}+ pos_+ {-# LINE 6353 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1158, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 1158 "src-ag/Transform.ag" #-}+ _patsIdefinedAttrs+ {-# LINE 6359 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1157, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1157 "src-ag/Transform.ag" #-}+ _patsIdefinedInsts+ {-# LINE 6365 "dist/build/Transform" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 6371 "dist/build/Transform" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 6377 "dist/build/Transform" #-}+ )+ ( _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+ -- "src-ag/Transform.ag"(line 1166, column 16)+ _lhsOpatunder =+ ({-# LINE 1166 "src-ag/Transform.ag" #-}+ \us -> _copy+ {-# LINE 6394 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1181, column 16)+ _lhsOstpos =+ ({-# LINE 1181 "src-ag/Transform.ag" #-}+ pos_+ {-# LINE 6400 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1158, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 1158 "src-ag/Transform.ag" #-}+ []+ {-# LINE 6406 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1157, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1157 "src-ag/Transform.ag" #-}+ []+ {-# LINE 6412 "dist/build/Transform" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ Underscore pos_+ {-# LINE 6418 "dist/build/Transform" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 6424 "dist/build/Transform" #-}+ )+ in ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder,_lhsOstpos)))+-- Patterns ----------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ copy : Patterns + 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)+ -- "src-ag/Transform.ag"(line 1173, column 10)+ _lhsOpatunder =+ ({-# LINE 1173 "src-ag/Transform.ag" #-}+ \us -> (_hdIpatunder us) : (_tlIpatunder us)+ {-# LINE 6481 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1158, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 1158 "src-ag/Transform.ag" #-}+ _hdIdefinedAttrs ++ _tlIdefinedAttrs+ {-# LINE 6487 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1157, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1157 "src-ag/Transform.ag" #-}+ _hdIdefinedInsts ++ _tlIdefinedInsts+ {-# LINE 6493 "dist/build/Transform" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 6499 "dist/build/Transform" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 6505 "dist/build/Transform" #-}+ )+ ( _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+ -- "src-ag/Transform.ag"(line 1172, column 9)+ _lhsOpatunder =+ ({-# LINE 1172 "src-ag/Transform.ag" #-}+ \us -> []+ {-# LINE 6522 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1158, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 1158 "src-ag/Transform.ag" #-}+ []+ {-# LINE 6528 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1157, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1157 "src-ag/Transform.ag" #-}+ []+ {-# LINE 6534 "dist/build/Transform" #-}+ )+ -- self rule+ _copy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ []+ {-# LINE 6540 "dist/build/Transform" #-}+ )+ -- self rule+ _lhsOcopy =+ ({-# LINE 22 "src-ag/Patterns.ag" #-}+ _copy+ {-# LINE 6546 "dist/build/Transform" #-}+ )+ in ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder)))+-- SemAlt ------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allAttrDecls : Map NontermIdent (Attributes, Attributes)+ allAttrs : Map NontermIdent (Attributes, Attributes)+ allFields : DataTypes+ nts : Set NontermIdent+ options : Options+ synthesized attributes:+ attrOrderCollect : AttrOrderMap+ collectedArounds : [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ collectedAugments : [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ collectedInsts : [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ collectedMerges : [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ collectedRules : [ (NontermIdent, ConstructorIdent, RuleInfo)]+ collectedSigs : [ (NontermIdent, ConstructorIdent, SigInfo) ]+ collectedUniques : [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ errors : Seq Error+ semPragmasCollect : PragmaMap+ alternatives:+ alternative SemAlt:+ child pos : {Pos}+ child constructorSet : ConstructorSet + child rules : SemDefs + visit 0:+ local pragmaNames : _+ local attrOrders : _+ local coninfo : _+-}+-- cata+sem_SemAlt :: SemAlt ->+ T_SemAlt+sem_SemAlt (SemAlt _pos _constructorSet _rules) =+ (sem_SemAlt_SemAlt _pos (sem_ConstructorSet _constructorSet) (sem_SemDefs _rules))+-- semantic domain+newtype T_SemAlt = T_SemAlt ((Map NontermIdent (Attributes, Attributes)) ->+ (Map NontermIdent (Attributes, Attributes)) ->+ DataTypes ->+ (Set NontermIdent) ->+ Options ->+ ( AttrOrderMap,([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]),([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]),([ (NontermIdent, ConstructorIdent, [Identifier]) ]),([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]),([ (NontermIdent, ConstructorIdent, RuleInfo)]),([ (NontermIdent, ConstructorIdent, SigInfo) ]),([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]),(Seq Error),PragmaMap))+data Inh_SemAlt = Inh_SemAlt {allAttrDecls_Inh_SemAlt :: !((Map NontermIdent (Attributes, Attributes))),allAttrs_Inh_SemAlt :: !((Map NontermIdent (Attributes, Attributes))),allFields_Inh_SemAlt :: !(DataTypes),nts_Inh_SemAlt :: !((Set NontermIdent)),options_Inh_SemAlt :: !(Options)}+data Syn_SemAlt = Syn_SemAlt {attrOrderCollect_Syn_SemAlt :: !(AttrOrderMap),collectedArounds_Syn_SemAlt :: !(([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])),collectedAugments_Syn_SemAlt :: !(([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])),collectedInsts_Syn_SemAlt :: !(([ (NontermIdent, ConstructorIdent, [Identifier]) ])),collectedMerges_Syn_SemAlt :: !(([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])),collectedRules_Syn_SemAlt :: !(([ (NontermIdent, ConstructorIdent, RuleInfo)])),collectedSigs_Syn_SemAlt :: !(([ (NontermIdent, ConstructorIdent, SigInfo) ])),collectedUniques_Syn_SemAlt :: !(([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])),errors_Syn_SemAlt :: !((Seq Error)),semPragmasCollect_Syn_SemAlt :: !(PragmaMap)}+wrap_SemAlt :: T_SemAlt ->+ Inh_SemAlt ->+ Syn_SemAlt+wrap_SemAlt (T_SemAlt sem) (Inh_SemAlt _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions) =+ (let ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect) = sem _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions+ in (Syn_SemAlt _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect))+sem_SemAlt_SemAlt :: Pos ->+ T_ConstructorSet ->+ T_SemDefs ->+ T_SemAlt+sem_SemAlt_SemAlt pos_ (T_ConstructorSet constructorSet_) (T_SemDefs rules_) =+ (T_SemAlt (\ _lhsIallAttrDecls+ _lhsIallAttrs+ _lhsIallFields+ _lhsInts+ _lhsIoptions ->+ (let _lhsOsemPragmasCollect :: PragmaMap+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOerrors :: (Seq Error)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _rulesOoptions :: Options+ _constructorSetIcollectedConstructorNames :: (Set ConstructorIdent)+ _constructorSetIconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))+ _constructorSetIerrors :: (Seq Error)+ _rulesIaroundInfos :: ([AroundInfo])+ _rulesIaugmentInfos :: ([AugmentInfo])+ _rulesIdefinedInsts :: ([Identifier])+ _rulesIerrors :: (Seq Error)+ _rulesImergeInfos :: ([MergeInfo])+ _rulesIorderDepsCollect :: (Set Dependency)+ _rulesIpragmaNamesCollect :: ([Identifier])+ _rulesIruleInfos :: ([RuleInfo])+ _rulesIsigInfos :: ([SigInfo])+ _rulesIuniqueInfos :: ([UniqueInfo])+ -- "src-ag/Transform.ag"(line 869, column 7)+ _pragmaNames =+ ({-# LINE 869 "src-ag/Transform.ag" #-}+ Set.fromList _rulesIpragmaNamesCollect+ {-# LINE 6637 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 870, column 7)+ _lhsOsemPragmasCollect =+ ({-# LINE 870 "src-ag/Transform.ag" #-}+ foldr pragmaMapUnion Map.empty [ pragmaMapSingle nt con _pragmaNames+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 6646 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 898, column 7)+ _attrOrders =+ ({-# LINE 898 "src-ag/Transform.ag" #-}+ [ orderMapSingle nt con _rulesIorderDepsCollect+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 6655 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 904, column 7)+ _lhsOattrOrderCollect =+ ({-# LINE 904 "src-ag/Transform.ag" #-}+ foldr orderMapUnion Map.empty _attrOrders+ {-# LINE 6661 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1082, column 12)+ _coninfo =+ ({-# LINE 1082 "src-ag/Transform.ag" #-}+ [ (nt, conset, conkeys)+ | nt <- Set.toList _lhsInts+ , let conmap = Map.findWithDefault Map.empty nt _lhsIallFields+ , let conkeys = Set.fromList (Map.keys conmap)+ , let conset = _constructorSetIconstructors conkeys+ ]+ {-# LINE 6672 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1089, column 12)+ _lhsOerrors =+ ({-# LINE 1089 "src-ag/Transform.ag" #-}+ Seq.fromList+ [ UndefAlt nt con+ | (nt, conset, conkeys) <- _coninfo+ , con <- Set.toList (Set.difference conset conkeys)+ ]+ Seq.>< _rulesIerrors+ {-# LINE 6683 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1095, column 12)+ _lhsOcollectedRules =+ ({-# LINE 1095 "src-ag/Transform.ag" #-}+ [ (nt,con,r)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ , r <- _rulesIruleInfos+ ]+ {-# LINE 6693 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1101, column 12)+ _lhsOcollectedSigs =+ ({-# LINE 1101 "src-ag/Transform.ag" #-}+ [ (nt,con,ts)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ , ts <- _rulesIsigInfos+ ]+ {-# LINE 6703 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1108, column 12)+ _lhsOcollectedInsts =+ ({-# LINE 1108 "src-ag/Transform.ag" #-}+ [ (nt,con,_rulesIdefinedInsts)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 6712 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1114, column 12)+ _lhsOcollectedUniques =+ ({-# LINE 1114 "src-ag/Transform.ag" #-}+ [ (nt,con,_rulesIuniqueInfos)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 6721 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1120, column 12)+ _lhsOcollectedAugments =+ ({-# LINE 1120 "src-ag/Transform.ag" #-}+ [ (nt, con, _rulesIaugmentInfos)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 6730 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1126, column 12)+ _lhsOcollectedArounds =+ ({-# LINE 1126 "src-ag/Transform.ag" #-}+ [ (nt, con, _rulesIaroundInfos)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 6739 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1132, column 12)+ _lhsOcollectedMerges =+ ({-# LINE 1132 "src-ag/Transform.ag" #-}+ [ (nt, con, _rulesImergeInfos)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 6748 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _rulesOoptions =+ ({-# LINE 40 "src-ag/Transform.ag" #-}+ _lhsIoptions+ {-# LINE 6754 "dist/build/Transform" #-}+ )+ ( _constructorSetIcollectedConstructorNames,_constructorSetIconstructors,_constructorSetIerrors) =+ constructorSet_+ ( _rulesIaroundInfos,_rulesIaugmentInfos,_rulesIdefinedInsts,_rulesIerrors,_rulesImergeInfos,_rulesIorderDepsCollect,_rulesIpragmaNamesCollect,_rulesIruleInfos,_rulesIsigInfos,_rulesIuniqueInfos) =+ rules_ _rulesOoptions+ in ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect))))+-- SemAlts -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allAttrDecls : Map NontermIdent (Attributes, Attributes)+ allAttrs : Map NontermIdent (Attributes, Attributes)+ allFields : DataTypes+ nts : Set NontermIdent+ options : Options+ synthesized attributes:+ attrOrderCollect : AttrOrderMap+ collectedArounds : [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ collectedAugments : [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ collectedInsts : [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ collectedMerges : [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ collectedRules : [ (NontermIdent, ConstructorIdent, RuleInfo)]+ collectedSigs : [ (NontermIdent, ConstructorIdent, SigInfo) ]+ collectedUniques : [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ errors : Seq Error+ semPragmasCollect : PragmaMap+ alternatives:+ alternative Cons:+ child hd : SemAlt + child tl : SemAlts + alternative Nil:+-}+-- cata+sem_SemAlts :: SemAlts ->+ T_SemAlts+sem_SemAlts list =+ (Prelude.foldr sem_SemAlts_Cons sem_SemAlts_Nil (Prelude.map sem_SemAlt list))+-- semantic domain+newtype T_SemAlts = T_SemAlts ((Map NontermIdent (Attributes, Attributes)) ->+ (Map NontermIdent (Attributes, Attributes)) ->+ DataTypes ->+ (Set NontermIdent) ->+ Options ->+ ( AttrOrderMap,([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]),([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]),([ (NontermIdent, ConstructorIdent, [Identifier]) ]),([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]),([ (NontermIdent, ConstructorIdent, RuleInfo)]),([ (NontermIdent, ConstructorIdent, SigInfo) ]),([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]),(Seq Error),PragmaMap))+data Inh_SemAlts = Inh_SemAlts {allAttrDecls_Inh_SemAlts :: !((Map NontermIdent (Attributes, Attributes))),allAttrs_Inh_SemAlts :: !((Map NontermIdent (Attributes, Attributes))),allFields_Inh_SemAlts :: !(DataTypes),nts_Inh_SemAlts :: !((Set NontermIdent)),options_Inh_SemAlts :: !(Options)}+data Syn_SemAlts = Syn_SemAlts {attrOrderCollect_Syn_SemAlts :: !(AttrOrderMap),collectedArounds_Syn_SemAlts :: !(([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])),collectedAugments_Syn_SemAlts :: !(([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])),collectedInsts_Syn_SemAlts :: !(([ (NontermIdent, ConstructorIdent, [Identifier]) ])),collectedMerges_Syn_SemAlts :: !(([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])),collectedRules_Syn_SemAlts :: !(([ (NontermIdent, ConstructorIdent, RuleInfo)])),collectedSigs_Syn_SemAlts :: !(([ (NontermIdent, ConstructorIdent, SigInfo) ])),collectedUniques_Syn_SemAlts :: !(([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])),errors_Syn_SemAlts :: !((Seq Error)),semPragmasCollect_Syn_SemAlts :: !(PragmaMap)}+wrap_SemAlts :: T_SemAlts ->+ Inh_SemAlts ->+ Syn_SemAlts+wrap_SemAlts (T_SemAlts sem) (Inh_SemAlts _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions) =+ (let ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect) = sem _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions+ in (Syn_SemAlts _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect))+sem_SemAlts_Cons :: T_SemAlt ->+ T_SemAlts ->+ T_SemAlts+sem_SemAlts_Cons (T_SemAlt hd_) (T_SemAlts tl_) =+ (T_SemAlts (\ _lhsIallAttrDecls+ _lhsIallAttrs+ _lhsIallFields+ _lhsInts+ _lhsIoptions ->+ (let _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOerrors :: (Seq Error)+ _lhsOsemPragmasCollect :: PragmaMap+ _hdOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))+ _hdOallAttrs :: (Map NontermIdent (Attributes, Attributes))+ _hdOallFields :: DataTypes+ _hdOnts :: (Set NontermIdent)+ _hdOoptions :: Options+ _tlOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))+ _tlOallAttrs :: (Map NontermIdent (Attributes, Attributes))+ _tlOallFields :: DataTypes+ _tlOnts :: (Set NontermIdent)+ _tlOoptions :: Options+ _hdIattrOrderCollect :: AttrOrderMap+ _hdIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _hdIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _hdIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _hdIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _hdIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _hdIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _hdIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _hdIerrors :: (Seq Error)+ _hdIsemPragmasCollect :: PragmaMap+ _tlIattrOrderCollect :: AttrOrderMap+ _tlIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _tlIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _tlIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _tlIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _tlIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _tlIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _tlIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _tlIerrors :: (Seq Error)+ _tlIsemPragmasCollect :: PragmaMap+ -- use rule "src-ag/Transform.ag"(line 893, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 893 "src-ag/Transform.ag" #-}+ _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect+ {-# LINE 6860 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 164, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 164 "src-ag/Transform.ag" #-}+ _hdIcollectedArounds ++ _tlIcollectedArounds+ {-# LINE 6866 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 163, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 163 "src-ag/Transform.ag" #-}+ _hdIcollectedAugments ++ _tlIcollectedAugments+ {-# LINE 6872 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 161, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 161 "src-ag/Transform.ag" #-}+ _hdIcollectedInsts ++ _tlIcollectedInsts+ {-# LINE 6878 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 165, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 165 "src-ag/Transform.ag" #-}+ _hdIcollectedMerges ++ _tlIcollectedMerges+ {-# LINE 6884 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 159, column 32)+ _lhsOcollectedRules =+ ({-# LINE 159 "src-ag/Transform.ag" #-}+ _hdIcollectedRules ++ _tlIcollectedRules+ {-# LINE 6890 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 160, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 160 "src-ag/Transform.ag" #-}+ _hdIcollectedSigs ++ _tlIcollectedSigs+ {-# LINE 6896 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 162, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 162 "src-ag/Transform.ag" #-}+ _hdIcollectedUniques ++ _tlIcollectedUniques+ {-# LINE 6902 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 6908 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 865, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 865 "src-ag/Transform.ag" #-}+ _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect+ {-# LINE 6914 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOallAttrDecls =+ ({-# LINE 894 "src-ag/Transform.ag" #-}+ _lhsIallAttrDecls+ {-# LINE 6920 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOallAttrs =+ ({-# LINE 1306 "src-ag/Transform.ag" #-}+ _lhsIallAttrs+ {-# LINE 6926 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 6932 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOnts =+ ({-# LINE 175 "src-ag/Transform.ag" #-}+ _lhsInts+ {-# LINE 6938 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 40 "src-ag/Transform.ag" #-}+ _lhsIoptions+ {-# LINE 6944 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _tlOallAttrDecls =+ ({-# LINE 894 "src-ag/Transform.ag" #-}+ _lhsIallAttrDecls+ {-# LINE 6950 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _tlOallAttrs =+ ({-# LINE 1306 "src-ag/Transform.ag" #-}+ _lhsIallAttrs+ {-# LINE 6956 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _tlOallFields =+ ({-# LINE 136 "src-ag/Transform.ag" #-}+ _lhsIallFields+ {-# LINE 6962 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _tlOnts =+ ({-# LINE 175 "src-ag/Transform.ag" #-}+ _lhsInts+ {-# LINE 6968 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 40 "src-ag/Transform.ag" #-}+ _lhsIoptions+ {-# LINE 6974 "dist/build/Transform" #-}+ )+ ( _hdIattrOrderCollect,_hdIcollectedArounds,_hdIcollectedAugments,_hdIcollectedInsts,_hdIcollectedMerges,_hdIcollectedRules,_hdIcollectedSigs,_hdIcollectedUniques,_hdIerrors,_hdIsemPragmasCollect) =+ hd_ _hdOallAttrDecls _hdOallAttrs _hdOallFields _hdOnts _hdOoptions+ ( _tlIattrOrderCollect,_tlIcollectedArounds,_tlIcollectedAugments,_tlIcollectedInsts,_tlIcollectedMerges,_tlIcollectedRules,_tlIcollectedSigs,_tlIcollectedUniques,_tlIerrors,_tlIsemPragmasCollect) =+ tl_ _tlOallAttrDecls _tlOallAttrs _tlOallFields _tlOnts _tlOoptions+ in ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect))))+sem_SemAlts_Nil :: T_SemAlts+sem_SemAlts_Nil =+ (T_SemAlts (\ _lhsIallAttrDecls+ _lhsIallAttrs+ _lhsIallFields+ _lhsInts+ _lhsIoptions ->+ (let _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOerrors :: (Seq Error)+ _lhsOsemPragmasCollect :: PragmaMap+ -- use rule "src-ag/Transform.ag"(line 893, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 893 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 7002 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 164, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 164 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7008 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 163, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 163 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7014 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 161, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 161 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7020 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 165, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 165 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7026 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 159, column 32)+ _lhsOcollectedRules =+ ({-# LINE 159 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7032 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 160, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 160 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7038 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 162, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 162 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7044 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ Seq.empty+ {-# LINE 7050 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 865, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 865 "src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 7056 "dist/build/Transform" #-}+ )+ in ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect))))+-- SemDef ------------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attributes:+ aroundInfos : [AroundInfo]+ augmentInfos : [AugmentInfo]+ definedInsts : [Identifier]+ errors : Seq Error+ mergeInfos : [MergeInfo]+ orderDepsCollect : Set Dependency+ pragmaNamesCollect : [Identifier]+ ruleInfos : [RuleInfo]+ sigInfos : [SigInfo]+ uniqueInfos : [UniqueInfo]+ alternatives:+ alternative AroundDef:+ child ident : {Identifier}+ child rhs : {Expression}+ alternative AttrOrderBefore:+ child before : {[Occurrence]}+ child after : {[Occurrence]}+ visit 0:+ local dependency : _+ alternative AugmentDef:+ child ident : {Identifier}+ child rhs : {Expression}+ alternative Def:+ child pos : {Pos}+ child mbName : {Maybe Identifier}+ child pattern : Pattern + child rhs : {Expression}+ child owrt : {Bool}+ child pure : {Bool}+ child eager : {Bool}+ alternative MergeDef:+ child target : {Identifier}+ child nt : {Identifier}+ child sources : {[Identifier]}+ child rhs : {Expression}+ alternative SemPragma:+ child names : {[NontermIdent]}+ alternative TypeDef:+ child pos : {Pos}+ 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 _pure _eager) =+ (sem_SemDef_Def _pos _mbName (sem_Pattern _pattern) _rhs _owrt _pure _eager)+sem_SemDef (MergeDef _target _nt _sources _rhs) =+ (sem_SemDef_MergeDef _target _nt _sources _rhs)+sem_SemDef (SemPragma _names) =+ (sem_SemDef_SemPragma _names)+sem_SemDef (TypeDef _pos _ident _tp) =+ (sem_SemDef_TypeDef _pos _ident _tp)+sem_SemDef (UniqueDef _ident _ref) =+ (sem_SemDef_UniqueDef _ident _ref)+-- semantic domain+newtype T_SemDef = T_SemDef (Options ->+ ( ([AroundInfo]),([AugmentInfo]),([Identifier]),(Seq Error),([MergeInfo]),(Set Dependency),([Identifier]),([RuleInfo]),([SigInfo]),([UniqueInfo])))+data Inh_SemDef = Inh_SemDef {options_Inh_SemDef :: !(Options)}+data Syn_SemDef = Syn_SemDef {aroundInfos_Syn_SemDef :: !(([AroundInfo])),augmentInfos_Syn_SemDef :: !(([AugmentInfo])),definedInsts_Syn_SemDef :: !(([Identifier])),errors_Syn_SemDef :: !((Seq Error)),mergeInfos_Syn_SemDef :: !(([MergeInfo])),orderDepsCollect_Syn_SemDef :: !((Set Dependency)),pragmaNamesCollect_Syn_SemDef :: !(([Identifier])),ruleInfos_Syn_SemDef :: !(([RuleInfo])),sigInfos_Syn_SemDef :: !(([SigInfo])),uniqueInfos_Syn_SemDef :: !(([UniqueInfo]))}+wrap_SemDef :: T_SemDef ->+ Inh_SemDef ->+ Syn_SemDef+wrap_SemDef (T_SemDef sem) (Inh_SemDef _lhsIoptions) =+ (let ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos) = sem _lhsIoptions+ in (Syn_SemDef _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos))+sem_SemDef_AroundDef :: Identifier ->+ Expression ->+ T_SemDef+sem_SemDef_AroundDef ident_ rhs_ =+ (T_SemDef (\ _lhsIoptions ->+ (let _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOerrors :: (Seq Error)+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ -- "src-ag/Transform.ag"(line 1151, column 17)+ _lhsOaroundInfos =+ ({-# LINE 1151 "src-ag/Transform.ag" #-}+ [ (ident_, rhs_) ]+ {-# LINE 7159 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1075, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 1075 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7165 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1157, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1157 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7171 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ Seq.empty+ {-# LINE 7177 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1077, column 40)+ _lhsOmergeInfos =+ ({-# LINE 1077 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7183 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 906, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 906 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 7189 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 875, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 875 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7195 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1072, column 40)+ _lhsOruleInfos =+ ({-# LINE 1072 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7201 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1073, column 40)+ _lhsOsigInfos =+ ({-# LINE 1073 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7207 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1074, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 1074 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7213 "dist/build/Transform" #-}+ )+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))))+sem_SemDef_AttrOrderBefore :: ([Occurrence]) ->+ ([Occurrence]) ->+ T_SemDef+sem_SemDef_AttrOrderBefore before_ after_ =+ (T_SemDef (\ _lhsIoptions ->+ (let _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOerrors :: (Seq Error)+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ -- "src-ag/Transform.ag"(line 910, column 7)+ _dependency =+ ({-# LINE 910 "src-ag/Transform.ag" #-}+ [ Dependency b a | b <- before_, a <- after_ ]+ {-# LINE 7235 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 911, column 7)+ _lhsOorderDepsCollect =+ ({-# LINE 911 "src-ag/Transform.ag" #-}+ Set.fromList _dependency+ {-# LINE 7241 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1076, column 40)+ _lhsOaroundInfos =+ ({-# LINE 1076 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7247 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1075, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 1075 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7253 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1157, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1157 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7259 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ Seq.empty+ {-# LINE 7265 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1077, column 40)+ _lhsOmergeInfos =+ ({-# LINE 1077 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7271 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 875, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 875 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7277 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1072, column 40)+ _lhsOruleInfos =+ ({-# LINE 1072 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7283 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1073, column 40)+ _lhsOsigInfos =+ ({-# LINE 1073 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7289 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1074, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 1074 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7295 "dist/build/Transform" #-}+ )+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))))+sem_SemDef_AugmentDef :: Identifier ->+ Expression ->+ T_SemDef+sem_SemDef_AugmentDef ident_ rhs_ =+ (T_SemDef (\ _lhsIoptions ->+ (let _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOaroundInfos :: ([AroundInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOerrors :: (Seq Error)+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ -- "src-ag/Transform.ag"(line 1148, column 17)+ _lhsOaugmentInfos =+ ({-# LINE 1148 "src-ag/Transform.ag" #-}+ [ (ident_, rhs_) ]+ {-# LINE 7317 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1076, column 40)+ _lhsOaroundInfos =+ ({-# LINE 1076 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7323 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1157, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1157 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7329 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ Seq.empty+ {-# LINE 7335 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1077, column 40)+ _lhsOmergeInfos =+ ({-# LINE 1077 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7341 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 906, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 906 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 7347 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 875, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 875 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7353 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1072, column 40)+ _lhsOruleInfos =+ ({-# LINE 1072 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7359 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1073, column 40)+ _lhsOsigInfos =+ ({-# LINE 1073 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7365 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1074, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 1074 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7371 "dist/build/Transform" #-}+ )+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))))+sem_SemDef_Def :: Pos ->+ (Maybe Identifier) ->+ T_Pattern ->+ Expression ->+ Bool ->+ Bool ->+ Bool ->+ T_SemDef+sem_SemDef_Def pos_ mbName_ (T_Pattern pattern_) rhs_ owrt_ pure_ eager_ =+ (T_SemDef (\ _lhsIoptions ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ _patternIcopy :: Pattern+ _patternIdefinedAttrs :: ([AttrName])+ _patternIdefinedInsts :: ([Identifier])+ _patternIpatunder :: ([AttrName]->Pattern)+ _patternIstpos :: Pos+ -- "src-ag/Transform.ag"(line 541, column 3)+ _lhsOerrors =+ ({-# LINE 541 "src-ag/Transform.ag" #-}+ if checkParseRhs _lhsIoptions+ then Seq.fromList $ checkRhs rhs_+ else Seq.empty+ {-# LINE 7405 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1139, column 10)+ _lhsOruleInfos =+ ({-# LINE 1139 "src-ag/Transform.ag" #-}+ [ (mbName_, _patternIpatunder, rhs_, _patternIdefinedAttrs, owrt_, show _patternIstpos, pure_, eager_) ]+ {-# LINE 7411 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1076, column 40)+ _lhsOaroundInfos =+ ({-# LINE 1076 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7417 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1075, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 1075 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7423 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1157, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1157 "src-ag/Transform.ag" #-}+ _patternIdefinedInsts+ {-# LINE 7429 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1077, column 40)+ _lhsOmergeInfos =+ ({-# LINE 1077 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7435 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 906, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 906 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 7441 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 875, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 875 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7447 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1073, column 40)+ _lhsOsigInfos =+ ({-# LINE 1073 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7453 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1074, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 1074 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7459 "dist/build/Transform" #-}+ )+ ( _patternIcopy,_patternIdefinedAttrs,_patternIdefinedInsts,_patternIpatunder,_patternIstpos) =+ pattern_+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))))+sem_SemDef_MergeDef :: Identifier ->+ Identifier ->+ ([Identifier]) ->+ Expression ->+ T_SemDef+sem_SemDef_MergeDef target_ nt_ sources_ rhs_ =+ (T_SemDef (\ _lhsIoptions ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ -- "src-ag/Transform.ag"(line 541, column 3)+ _lhsOerrors =+ ({-# LINE 541 "src-ag/Transform.ag" #-}+ if checkParseRhs _lhsIoptions+ then Seq.fromList $ checkRhs rhs_+ else Seq.empty+ {-# LINE 7487 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1154, column 17)+ _lhsOmergeInfos =+ ({-# LINE 1154 "src-ag/Transform.ag" #-}+ [ (target_, nt_, sources_, rhs_) ]+ {-# LINE 7493 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1076, column 40)+ _lhsOaroundInfos =+ ({-# LINE 1076 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7499 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1075, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 1075 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7505 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1157, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1157 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7511 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 906, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 906 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 7517 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 875, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 875 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7523 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1072, column 40)+ _lhsOruleInfos =+ ({-# LINE 1072 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7529 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1073, column 40)+ _lhsOsigInfos =+ ({-# LINE 1073 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7535 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1074, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 1074 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7541 "dist/build/Transform" #-}+ )+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))))+sem_SemDef_SemPragma :: ([NontermIdent]) ->+ T_SemDef+sem_SemDef_SemPragma names_ =+ (T_SemDef (\ _lhsIoptions ->+ (let _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOerrors :: (Seq Error)+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ -- "src-ag/Transform.ag"(line 879, column 7)+ _lhsOpragmaNamesCollect =+ ({-# LINE 879 "src-ag/Transform.ag" #-}+ names_+ {-# LINE 7562 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1076, column 40)+ _lhsOaroundInfos =+ ({-# LINE 1076 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7568 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1075, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 1075 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7574 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1157, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1157 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7580 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ Seq.empty+ {-# LINE 7586 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1077, column 40)+ _lhsOmergeInfos =+ ({-# LINE 1077 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7592 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 906, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 906 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 7598 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1072, column 40)+ _lhsOruleInfos =+ ({-# LINE 1072 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7604 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1073, column 40)+ _lhsOsigInfos =+ ({-# LINE 1073 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7610 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1074, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 1074 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7616 "dist/build/Transform" #-}+ )+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))))+sem_SemDef_TypeDef :: Pos ->+ Identifier ->+ Type ->+ T_SemDef+sem_SemDef_TypeDef pos_ ident_ tp_ =+ (T_SemDef (\ _lhsIoptions ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOsigInfos :: ([SigInfo])+ _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ -- "src-ag/Transform.ag"(line 548, column 3)+ _lhsOerrors =+ ({-# LINE 548 "src-ag/Transform.ag" #-}+ if checkParseTy _lhsIoptions+ then case tp_ of+ Haskell s -> let exp = Expression pos_ tks+ tks = [tk]+ tk = HsToken s pos_+ in Seq.fromList $ checkTy exp+ _ -> Seq.empty+ else Seq.empty+ {-# LINE 7646 "dist/build/Transform" #-}+ )+ -- "src-ag/Transform.ag"(line 1142, column 14)+ _lhsOsigInfos =+ ({-# LINE 1142 "src-ag/Transform.ag" #-}+ [ (ident_, tp_) ]+ {-# LINE 7652 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1076, column 40)+ _lhsOaroundInfos =+ ({-# LINE 1076 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7658 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1075, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 1075 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7664 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1157, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1157 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7670 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1077, column 40)+ _lhsOmergeInfos =+ ({-# LINE 1077 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7676 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 906, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 906 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 7682 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 875, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 875 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7688 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1072, column 40)+ _lhsOruleInfos =+ ({-# LINE 1072 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7694 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1074, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 1074 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7700 "dist/build/Transform" #-}+ )+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))))+sem_SemDef_UniqueDef :: Identifier ->+ Identifier ->+ T_SemDef+sem_SemDef_UniqueDef ident_ ref_ =+ (T_SemDef (\ _lhsIoptions ->+ (let _lhsOuniqueInfos :: ([UniqueInfo])+ _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOerrors :: (Seq Error)+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOsigInfos :: ([SigInfo])+ -- "src-ag/Transform.ag"(line 1145, column 16)+ _lhsOuniqueInfos =+ ({-# LINE 1145 "src-ag/Transform.ag" #-}+ [ (ident_, ref_) ]+ {-# LINE 7722 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1076, column 40)+ _lhsOaroundInfos =+ ({-# LINE 1076 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7728 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1075, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 1075 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7734 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1157, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1157 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7740 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ Seq.empty+ {-# LINE 7746 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1077, column 40)+ _lhsOmergeInfos =+ ({-# LINE 1077 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7752 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 906, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 906 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 7758 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 875, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 875 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7764 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1072, column 40)+ _lhsOruleInfos =+ ({-# LINE 1072 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7770 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1073, column 40)+ _lhsOsigInfos =+ ({-# LINE 1073 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7776 "dist/build/Transform" #-}+ )+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))))+-- SemDefs -----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attributes:+ aroundInfos : [AroundInfo]+ augmentInfos : [AugmentInfo]+ definedInsts : [Identifier]+ errors : Seq Error+ mergeInfos : [MergeInfo]+ orderDepsCollect : Set Dependency+ pragmaNamesCollect : [Identifier]+ ruleInfos : [RuleInfo]+ sigInfos : [SigInfo]+ uniqueInfos : [UniqueInfo]+ alternatives:+ alternative Cons:+ child hd : SemDef + child tl : SemDefs + alternative Nil:+-}+-- cata+sem_SemDefs :: SemDefs ->+ T_SemDefs+sem_SemDefs list =+ (Prelude.foldr sem_SemDefs_Cons sem_SemDefs_Nil (Prelude.map sem_SemDef list))+-- semantic domain+newtype T_SemDefs = T_SemDefs (Options ->+ ( ([AroundInfo]),([AugmentInfo]),([Identifier]),(Seq Error),([MergeInfo]),(Set Dependency),([Identifier]),([RuleInfo]),([SigInfo]),([UniqueInfo])))+data Inh_SemDefs = Inh_SemDefs {options_Inh_SemDefs :: !(Options)}+data Syn_SemDefs = Syn_SemDefs {aroundInfos_Syn_SemDefs :: !(([AroundInfo])),augmentInfos_Syn_SemDefs :: !(([AugmentInfo])),definedInsts_Syn_SemDefs :: !(([Identifier])),errors_Syn_SemDefs :: !((Seq Error)),mergeInfos_Syn_SemDefs :: !(([MergeInfo])),orderDepsCollect_Syn_SemDefs :: !((Set Dependency)),pragmaNamesCollect_Syn_SemDefs :: !(([Identifier])),ruleInfos_Syn_SemDefs :: !(([RuleInfo])),sigInfos_Syn_SemDefs :: !(([SigInfo])),uniqueInfos_Syn_SemDefs :: !(([UniqueInfo]))}+wrap_SemDefs :: T_SemDefs ->+ Inh_SemDefs ->+ Syn_SemDefs+wrap_SemDefs (T_SemDefs sem) (Inh_SemDefs _lhsIoptions) =+ (let ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos) = sem _lhsIoptions+ in (Syn_SemDefs _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos))+sem_SemDefs_Cons :: T_SemDef ->+ T_SemDefs ->+ T_SemDefs+sem_SemDefs_Cons (T_SemDef hd_) (T_SemDefs tl_) =+ (T_SemDefs (\ _lhsIoptions ->+ (let _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOerrors :: (Seq Error)+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ _hdOoptions :: Options+ _tlOoptions :: Options+ _hdIaroundInfos :: ([AroundInfo])+ _hdIaugmentInfos :: ([AugmentInfo])+ _hdIdefinedInsts :: ([Identifier])+ _hdIerrors :: (Seq Error)+ _hdImergeInfos :: ([MergeInfo])+ _hdIorderDepsCollect :: (Set Dependency)+ _hdIpragmaNamesCollect :: ([Identifier])+ _hdIruleInfos :: ([RuleInfo])+ _hdIsigInfos :: ([SigInfo])+ _hdIuniqueInfos :: ([UniqueInfo])+ _tlIaroundInfos :: ([AroundInfo])+ _tlIaugmentInfos :: ([AugmentInfo])+ _tlIdefinedInsts :: ([Identifier])+ _tlIerrors :: (Seq Error)+ _tlImergeInfos :: ([MergeInfo])+ _tlIorderDepsCollect :: (Set Dependency)+ _tlIpragmaNamesCollect :: ([Identifier])+ _tlIruleInfos :: ([RuleInfo])+ _tlIsigInfos :: ([SigInfo])+ _tlIuniqueInfos :: ([UniqueInfo])+ -- use rule "src-ag/Transform.ag"(line 1076, column 40)+ _lhsOaroundInfos =+ ({-# LINE 1076 "src-ag/Transform.ag" #-}+ _hdIaroundInfos ++ _tlIaroundInfos+ {-# LINE 7858 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1075, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 1075 "src-ag/Transform.ag" #-}+ _hdIaugmentInfos ++ _tlIaugmentInfos+ {-# LINE 7864 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1157, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1157 "src-ag/Transform.ag" #-}+ _hdIdefinedInsts ++ _tlIdefinedInsts+ {-# LINE 7870 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 7876 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1077, column 40)+ _lhsOmergeInfos =+ ({-# LINE 1077 "src-ag/Transform.ag" #-}+ _hdImergeInfos ++ _tlImergeInfos+ {-# LINE 7882 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 906, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 906 "src-ag/Transform.ag" #-}+ _hdIorderDepsCollect `Set.union` _tlIorderDepsCollect+ {-# LINE 7888 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 875, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 875 "src-ag/Transform.ag" #-}+ _hdIpragmaNamesCollect ++ _tlIpragmaNamesCollect+ {-# LINE 7894 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1072, column 40)+ _lhsOruleInfos =+ ({-# LINE 1072 "src-ag/Transform.ag" #-}+ _hdIruleInfos ++ _tlIruleInfos+ {-# LINE 7900 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1073, column 40)+ _lhsOsigInfos =+ ({-# LINE 1073 "src-ag/Transform.ag" #-}+ _hdIsigInfos ++ _tlIsigInfos+ {-# LINE 7906 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1074, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 1074 "src-ag/Transform.ag" #-}+ _hdIuniqueInfos ++ _tlIuniqueInfos+ {-# LINE 7912 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 40 "src-ag/Transform.ag" #-}+ _lhsIoptions+ {-# LINE 7918 "dist/build/Transform" #-}+ )+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 40 "src-ag/Transform.ag" #-}+ _lhsIoptions+ {-# LINE 7924 "dist/build/Transform" #-}+ )+ ( _hdIaroundInfos,_hdIaugmentInfos,_hdIdefinedInsts,_hdIerrors,_hdImergeInfos,_hdIorderDepsCollect,_hdIpragmaNamesCollect,_hdIruleInfos,_hdIsigInfos,_hdIuniqueInfos) =+ hd_ _hdOoptions+ ( _tlIaroundInfos,_tlIaugmentInfos,_tlIdefinedInsts,_tlIerrors,_tlImergeInfos,_tlIorderDepsCollect,_tlIpragmaNamesCollect,_tlIruleInfos,_tlIsigInfos,_tlIuniqueInfos) =+ tl_ _tlOoptions+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))))+sem_SemDefs_Nil :: T_SemDefs+sem_SemDefs_Nil =+ (T_SemDefs (\ _lhsIoptions ->+ (let _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOerrors :: (Seq Error)+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ -- use rule "src-ag/Transform.ag"(line 1076, column 40)+ _lhsOaroundInfos =+ ({-# LINE 1076 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7948 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1075, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 1075 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7954 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1157, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1157 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7960 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 44, column 19)+ _lhsOerrors =+ ({-# LINE 44 "src-ag/Transform.ag" #-}+ Seq.empty+ {-# LINE 7966 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1077, column 40)+ _lhsOmergeInfos =+ ({-# LINE 1077 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7972 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 906, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 906 "src-ag/Transform.ag" #-}+ Set.empty+ {-# LINE 7978 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 875, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 875 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7984 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1072, column 40)+ _lhsOruleInfos =+ ({-# LINE 1072 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7990 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1073, column 40)+ _lhsOsigInfos =+ ({-# LINE 1073 "src-ag/Transform.ag" #-}+ []+ {-# LINE 7996 "dist/build/Transform" #-}+ )+ -- use rule "src-ag/Transform.ag"(line 1074, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 1074 "src-ag/Transform.ag" #-}+ []+ {-# LINE 8002 "dist/build/Transform" #-}+ )+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOerrors,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos))))
src-derived/Visage.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.39.1.0 (src-ag/Visage.ag)+-- UUAGC 0.9.40.1 (src-ag/Visage.ag) module Visage where {-# LINE 6 "src-ag/Visage.ag" #-} @@ -14,7 +14,7 @@ import Data.Map(Map) import Data.List(intersperse) import TokenDef-{-# LINE 18 "dist/build/uuagc/uuagc-tmp/Visage.hs" #-}+{-# LINE 18 "dist/build/Visage.hs" #-} {-# LINE 2 "src-ag/VisageSyntax.ag" #-} @@ -23,19 +23,19 @@ import AbstractSyntax import VisagePatterns import Expression-{-# LINE 27 "dist/build/uuagc/uuagc-tmp/Visage.hs" #-}+{-# LINE 27 "dist/build/Visage.hs" #-} {-# LINE 2 "src-ag/VisagePatterns.ag" #-} import UU.Scanner.Position(Pos) import CommonTypes-{-# LINE 33 "dist/build/uuagc/uuagc-tmp/Visage.hs" #-}+{-# LINE 33 "dist/build/Visage.hs" #-} {-# LINE 2 "src-ag/Expression.ag" #-} import UU.Scanner.Position(Pos) import HsToken-{-# LINE 39 "dist/build/uuagc/uuagc-tmp/Visage.hs" #-}+{-# LINE 39 "dist/build/Visage.hs" #-} {-# LINE 19 "src-ag/Visage.ag" #-} convert :: String -> String@@ -61,7 +61,7 @@ where braces s = "{" ++ s ++ "}" assign a b = show a ++ ":=" ++ show b-{-# LINE 65 "dist/build/uuagc/uuagc-tmp/Visage.hs" #-}+{-# LINE 65 "dist/build/Visage.hs" #-} -- Expression -------------------------------------------------- {- visit 0:@@ -73,32 +73,32 @@ child tks : {[HsToken]} -} -- cata-sem_Expression :: Expression ->- T_Expression -sem_Expression (Expression _pos _tks ) =- (sem_Expression_Expression _pos _tks )+sem_Expression :: Expression ->+ T_Expression+sem_Expression (Expression _pos _tks) =+ (sem_Expression_Expression _pos _tks) -- semantic domain-newtype T_Expression = T_Expression (( ATerm))-data Inh_Expression = Inh_Expression {}-data Syn_Expression = Syn_Expression {aterm_Syn_Expression :: ATerm}-wrap_Expression :: T_Expression ->- Inh_Expression ->- Syn_Expression -wrap_Expression (T_Expression sem ) (Inh_Expression ) =- (let ( _lhsOaterm) = sem - in (Syn_Expression _lhsOaterm ))+newtype T_Expression = T_Expression (( ATerm))+data Inh_Expression = Inh_Expression {}+data Syn_Expression = Syn_Expression {aterm_Syn_Expression :: ATerm}+wrap_Expression :: T_Expression ->+ Inh_Expression ->+ Syn_Expression+wrap_Expression (T_Expression sem) (Inh_Expression) =+ (let ( _lhsOaterm) = sem+ in (Syn_Expression _lhsOaterm)) sem_Expression_Expression :: Pos -> ([HsToken]) ->- T_Expression -sem_Expression_Expression pos_ tks_ =+ T_Expression+sem_Expression_Expression pos_ tks_ = (T_Expression (let _lhsOaterm :: ATerm -- "src-ag/Visage.ag"(line 103, column 17) _lhsOaterm = ({-# LINE 103 "src-ag/Visage.ag" #-} AAppl "Expression" [AString (sQ (showAGPos pos_)), AString (sQ (unlines . showTokens . tokensToStrings $ tks_))]- {-# LINE 100 "src-ag/Visage.hs" #-}+ {-# LINE 100 "dist/build/Visage" #-} )- in ( _lhsOaterm)) )+ in ( _lhsOaterm))) -- VisageChild ------------------------------------------------- {- visit 0:@@ -113,27 +113,27 @@ child rules : VisageRules -} -- cata-sem_VisageChild :: VisageChild ->- T_VisageChild -sem_VisageChild (VChild _name _tp _inh _syn _rules ) =- (sem_VisageChild_VChild _name _tp _inh _syn (sem_VisageRules _rules ) )+sem_VisageChild :: VisageChild ->+ T_VisageChild+sem_VisageChild (VChild _name _tp _inh _syn _rules) =+ (sem_VisageChild_VChild _name _tp _inh _syn (sem_VisageRules _rules)) -- semantic domain-newtype T_VisageChild = T_VisageChild (( ATerm))-data Inh_VisageChild = Inh_VisageChild {}-data Syn_VisageChild = Syn_VisageChild {aterm_Syn_VisageChild :: ATerm}-wrap_VisageChild :: T_VisageChild ->- Inh_VisageChild ->- Syn_VisageChild -wrap_VisageChild (T_VisageChild sem ) (Inh_VisageChild ) =- (let ( _lhsOaterm) = sem - in (Syn_VisageChild _lhsOaterm ))+newtype T_VisageChild = T_VisageChild (( ATerm))+data Inh_VisageChild = Inh_VisageChild {}+data Syn_VisageChild = Syn_VisageChild {aterm_Syn_VisageChild :: ATerm}+wrap_VisageChild :: T_VisageChild ->+ Inh_VisageChild ->+ Syn_VisageChild+wrap_VisageChild (T_VisageChild sem) (Inh_VisageChild) =+ (let ( _lhsOaterm) = sem+ in (Syn_VisageChild _lhsOaterm)) sem_VisageChild_VChild :: Identifier -> Type -> Attributes -> Attributes ->- T_VisageRules ->- T_VisageChild -sem_VisageChild_VChild name_ tp_ inh_ syn_ (T_VisageRules rules_ ) =+ T_VisageRules ->+ T_VisageChild+sem_VisageChild_VChild name_ tp_ inh_ syn_ (T_VisageRules rules_) = (T_VisageChild (let _lhsOaterm :: ATerm _rulesOisLoc :: Bool _rulesIaterms :: ([ATerm])@@ -144,17 +144,17 @@ AString (sQ (showMap inh_)), AString (sQ (showMap syn_)), AAppl "Rules" _rulesIaterms]- {-# LINE 148 "src-ag/Visage.hs" #-}+ {-# LINE 148 "dist/build/Visage" #-} ) -- "src-ag/Visage.ag"(line 89, column 18) _rulesOisLoc = ({-# LINE 89 "src-ag/Visage.ag" #-} False- {-# LINE 154 "src-ag/Visage.hs" #-}+ {-# LINE 154 "dist/build/Visage" #-} ) ( _rulesIaterms) =- rules_ _rulesOisLoc - in ( _lhsOaterm)) )+ rules_ _rulesOisLoc+ in ( _lhsOaterm))) -- VisageChildren ---------------------------------------------- {- visit 0:@@ -167,24 +167,24 @@ alternative Nil: -} -- cata-sem_VisageChildren :: VisageChildren ->- T_VisageChildren -sem_VisageChildren list =- (Prelude.foldr sem_VisageChildren_Cons sem_VisageChildren_Nil (Prelude.map sem_VisageChild list) )+sem_VisageChildren :: VisageChildren ->+ T_VisageChildren+sem_VisageChildren list =+ (Prelude.foldr sem_VisageChildren_Cons sem_VisageChildren_Nil (Prelude.map sem_VisageChild list)) -- semantic domain-newtype T_VisageChildren = T_VisageChildren (( ([ATerm])))-data Inh_VisageChildren = Inh_VisageChildren {}-data Syn_VisageChildren = Syn_VisageChildren {aterms_Syn_VisageChildren :: ([ATerm])}-wrap_VisageChildren :: T_VisageChildren ->- Inh_VisageChildren ->- Syn_VisageChildren -wrap_VisageChildren (T_VisageChildren sem ) (Inh_VisageChildren ) =- (let ( _lhsOaterms) = sem - in (Syn_VisageChildren _lhsOaterms ))-sem_VisageChildren_Cons :: T_VisageChild ->- T_VisageChildren ->- T_VisageChildren -sem_VisageChildren_Cons (T_VisageChild hd_ ) (T_VisageChildren tl_ ) =+newtype T_VisageChildren = T_VisageChildren (( ([ATerm])))+data Inh_VisageChildren = Inh_VisageChildren {}+data Syn_VisageChildren = Syn_VisageChildren {aterms_Syn_VisageChildren :: ([ATerm])}+wrap_VisageChildren :: T_VisageChildren ->+ Inh_VisageChildren ->+ Syn_VisageChildren+wrap_VisageChildren (T_VisageChildren sem) (Inh_VisageChildren) =+ (let ( _lhsOaterms) = sem+ in (Syn_VisageChildren _lhsOaterms))+sem_VisageChildren_Cons :: T_VisageChild ->+ T_VisageChildren ->+ T_VisageChildren+sem_VisageChildren_Cons (T_VisageChild hd_) (T_VisageChildren tl_) = (T_VisageChildren (let _lhsOaterms :: ([ATerm]) _hdIaterm :: ATerm _tlIaterms :: ([ATerm])@@ -192,23 +192,23 @@ _lhsOaterms = ({-# LINE 80 "src-ag/Visage.ag" #-} _hdIaterm : _tlIaterms- {-# LINE 196 "src-ag/Visage.hs" #-}+ {-# LINE 196 "dist/build/Visage" #-} ) ( _hdIaterm) =- hd_ + hd_ ( _tlIaterms) =- tl_ - in ( _lhsOaterms)) )-sem_VisageChildren_Nil :: T_VisageChildren -sem_VisageChildren_Nil =+ tl_+ in ( _lhsOaterms)))+sem_VisageChildren_Nil :: T_VisageChildren+sem_VisageChildren_Nil = (T_VisageChildren (let _lhsOaterms :: ([ATerm]) -- "src-ag/Visage.ag"(line 81, column 17) _lhsOaterms = ({-# LINE 81 "src-ag/Visage.ag" #-} []- {-# LINE 210 "src-ag/Visage.hs" #-}+ {-# LINE 210 "dist/build/Visage" #-} )- in ( _lhsOaterms)) )+ in ( _lhsOaterms))) -- VisageGrammar ----------------------------------------------- {- visit 0:@@ -219,34 +219,34 @@ child nonts : VisageNonterminals -} -- cata-sem_VisageGrammar :: VisageGrammar ->- T_VisageGrammar -sem_VisageGrammar (VGrammar _nonts ) =- (sem_VisageGrammar_VGrammar (sem_VisageNonterminals _nonts ) )+sem_VisageGrammar :: VisageGrammar ->+ T_VisageGrammar+sem_VisageGrammar (VGrammar _nonts) =+ (sem_VisageGrammar_VGrammar (sem_VisageNonterminals _nonts)) -- semantic domain-newtype T_VisageGrammar = T_VisageGrammar (( ATerm))-data Inh_VisageGrammar = Inh_VisageGrammar {}-data Syn_VisageGrammar = Syn_VisageGrammar {aterm_Syn_VisageGrammar :: ATerm}-wrap_VisageGrammar :: T_VisageGrammar ->- Inh_VisageGrammar ->- Syn_VisageGrammar -wrap_VisageGrammar (T_VisageGrammar sem ) (Inh_VisageGrammar ) =- (let ( _lhsOaterm) = sem - in (Syn_VisageGrammar _lhsOaterm ))-sem_VisageGrammar_VGrammar :: T_VisageNonterminals ->- T_VisageGrammar -sem_VisageGrammar_VGrammar (T_VisageNonterminals nonts_ ) =+newtype T_VisageGrammar = T_VisageGrammar (( ATerm))+data Inh_VisageGrammar = Inh_VisageGrammar {}+data Syn_VisageGrammar = Syn_VisageGrammar {aterm_Syn_VisageGrammar :: ATerm}+wrap_VisageGrammar :: T_VisageGrammar ->+ Inh_VisageGrammar ->+ Syn_VisageGrammar+wrap_VisageGrammar (T_VisageGrammar sem) (Inh_VisageGrammar) =+ (let ( _lhsOaterm) = sem+ in (Syn_VisageGrammar _lhsOaterm))+sem_VisageGrammar_VGrammar :: T_VisageNonterminals ->+ T_VisageGrammar+sem_VisageGrammar_VGrammar (T_VisageNonterminals nonts_) = (T_VisageGrammar (let _lhsOaterm :: ATerm _nontsIaterms :: ([ATerm]) -- "src-ag/Visage.ag"(line 54, column 18) _lhsOaterm = ({-# LINE 54 "src-ag/Visage.ag" #-} AAppl "Productions" _nontsIaterms- {-# LINE 246 "src-ag/Visage.hs" #-}+ {-# LINE 246 "dist/build/Visage" #-} ) ( _nontsIaterms) =- nonts_ - in ( _lhsOaterm)) )+ nonts_+ in ( _lhsOaterm))) -- VisageNonterminal ------------------------------------------- {- visit 0:@@ -260,26 +260,26 @@ child alts : VisageProductions -} -- cata-sem_VisageNonterminal :: VisageNonterminal ->- T_VisageNonterminal -sem_VisageNonterminal (VNonterminal _nt _inh _syn _alts ) =- (sem_VisageNonterminal_VNonterminal _nt _inh _syn (sem_VisageProductions _alts ) )+sem_VisageNonterminal :: VisageNonterminal ->+ T_VisageNonterminal+sem_VisageNonterminal (VNonterminal _nt _inh _syn _alts) =+ (sem_VisageNonterminal_VNonterminal _nt _inh _syn (sem_VisageProductions _alts)) -- semantic domain-newtype T_VisageNonterminal = T_VisageNonterminal (( ATerm))-data Inh_VisageNonterminal = Inh_VisageNonterminal {}-data Syn_VisageNonterminal = Syn_VisageNonterminal {aterm_Syn_VisageNonterminal :: ATerm}-wrap_VisageNonterminal :: T_VisageNonterminal ->- Inh_VisageNonterminal ->- Syn_VisageNonterminal -wrap_VisageNonterminal (T_VisageNonterminal sem ) (Inh_VisageNonterminal ) =- (let ( _lhsOaterm) = sem - in (Syn_VisageNonterminal _lhsOaterm ))+newtype T_VisageNonterminal = T_VisageNonterminal (( ATerm))+data Inh_VisageNonterminal = Inh_VisageNonterminal {}+data Syn_VisageNonterminal = Syn_VisageNonterminal {aterm_Syn_VisageNonterminal :: ATerm}+wrap_VisageNonterminal :: T_VisageNonterminal ->+ Inh_VisageNonterminal ->+ Syn_VisageNonterminal+wrap_VisageNonterminal (T_VisageNonterminal sem) (Inh_VisageNonterminal) =+ (let ( _lhsOaterm) = sem+ in (Syn_VisageNonterminal _lhsOaterm)) sem_VisageNonterminal_VNonterminal :: NontermIdent -> Attributes -> Attributes ->- T_VisageProductions ->- T_VisageNonterminal -sem_VisageNonterminal_VNonterminal nt_ inh_ syn_ (T_VisageProductions alts_ ) =+ T_VisageProductions ->+ T_VisageNonterminal+sem_VisageNonterminal_VNonterminal nt_ inh_ syn_ (T_VisageProductions alts_) = (T_VisageNonterminal (let _lhsOaterm :: ATerm _altsIaterms :: ([ATerm]) -- "src-ag/Visage.ag"(line 63, column 19)@@ -287,11 +287,11 @@ ({-# LINE 63 "src-ag/Visage.ag" #-} AAppl "Production" [AString (sQ (getName nt_)), AString (sQ(showMap inh_)), AString (sQ(showMap syn_)), AAppl "Alternatives" _altsIaterms]- {-# LINE 291 "src-ag/Visage.hs" #-}+ {-# LINE 291 "dist/build/Visage" #-} ) ( _altsIaterms) =- alts_ - in ( _lhsOaterm)) )+ alts_+ in ( _lhsOaterm))) -- VisageNonterminals ------------------------------------------ {- visit 0:@@ -304,24 +304,24 @@ alternative Nil: -} -- cata-sem_VisageNonterminals :: VisageNonterminals ->- T_VisageNonterminals -sem_VisageNonterminals list =- (Prelude.foldr sem_VisageNonterminals_Cons sem_VisageNonterminals_Nil (Prelude.map sem_VisageNonterminal list) )+sem_VisageNonterminals :: VisageNonterminals ->+ T_VisageNonterminals+sem_VisageNonterminals list =+ (Prelude.foldr sem_VisageNonterminals_Cons sem_VisageNonterminals_Nil (Prelude.map sem_VisageNonterminal list)) -- semantic domain-newtype T_VisageNonterminals = T_VisageNonterminals (( ([ATerm])))-data Inh_VisageNonterminals = Inh_VisageNonterminals {}-data Syn_VisageNonterminals = Syn_VisageNonterminals {aterms_Syn_VisageNonterminals :: ([ATerm])}-wrap_VisageNonterminals :: T_VisageNonterminals ->- Inh_VisageNonterminals ->- Syn_VisageNonterminals -wrap_VisageNonterminals (T_VisageNonterminals sem ) (Inh_VisageNonterminals ) =- (let ( _lhsOaterms) = sem - in (Syn_VisageNonterminals _lhsOaterms ))-sem_VisageNonterminals_Cons :: T_VisageNonterminal ->- T_VisageNonterminals ->- T_VisageNonterminals -sem_VisageNonterminals_Cons (T_VisageNonterminal hd_ ) (T_VisageNonterminals tl_ ) =+newtype T_VisageNonterminals = T_VisageNonterminals (( ([ATerm])))+data Inh_VisageNonterminals = Inh_VisageNonterminals {}+data Syn_VisageNonterminals = Syn_VisageNonterminals {aterms_Syn_VisageNonterminals :: ([ATerm])}+wrap_VisageNonterminals :: T_VisageNonterminals ->+ Inh_VisageNonterminals ->+ Syn_VisageNonterminals+wrap_VisageNonterminals (T_VisageNonterminals sem) (Inh_VisageNonterminals) =+ (let ( _lhsOaterms) = sem+ in (Syn_VisageNonterminals _lhsOaterms))+sem_VisageNonterminals_Cons :: T_VisageNonterminal ->+ T_VisageNonterminals ->+ T_VisageNonterminals+sem_VisageNonterminals_Cons (T_VisageNonterminal hd_) (T_VisageNonterminals tl_) = (T_VisageNonterminals (let _lhsOaterms :: ([ATerm]) _hdIaterm :: ATerm _tlIaterms :: ([ATerm])@@ -329,23 +329,23 @@ _lhsOaterms = ({-# LINE 58 "src-ag/Visage.ag" #-} _hdIaterm : _tlIaterms- {-# LINE 333 "src-ag/Visage.hs" #-}+ {-# LINE 333 "dist/build/Visage" #-} ) ( _hdIaterm) =- hd_ + hd_ ( _tlIaterms) =- tl_ - in ( _lhsOaterms)) )-sem_VisageNonterminals_Nil :: T_VisageNonterminals -sem_VisageNonterminals_Nil =+ tl_+ in ( _lhsOaterms)))+sem_VisageNonterminals_Nil :: T_VisageNonterminals+sem_VisageNonterminals_Nil = (T_VisageNonterminals (let _lhsOaterms :: ([ATerm]) -- "src-ag/Visage.ag"(line 59, column 17) _lhsOaterms = ({-# LINE 59 "src-ag/Visage.ag" #-} []- {-# LINE 347 "src-ag/Visage.hs" #-}+ {-# LINE 347 "dist/build/Visage" #-} )- in ( _lhsOaterms)) )+ in ( _lhsOaterms))) -- VisagePattern ----------------------------------------------- {- visit 0:@@ -369,33 +369,33 @@ child attr : {Identifier} -} -- cata-sem_VisagePattern :: VisagePattern ->- T_VisagePattern -sem_VisagePattern (VAlias _field _attr _pat ) =- (sem_VisagePattern_VAlias _field _attr (sem_VisagePattern _pat ) )-sem_VisagePattern (VConstr _name _pats ) =- (sem_VisagePattern_VConstr _name (sem_VisagePatterns _pats ) )-sem_VisagePattern (VProduct _pos _pats ) =- (sem_VisagePattern_VProduct _pos (sem_VisagePatterns _pats ) )-sem_VisagePattern (VUnderscore _pos ) =- (sem_VisagePattern_VUnderscore _pos )-sem_VisagePattern (VVar _field _attr ) =- (sem_VisagePattern_VVar _field _attr )+sem_VisagePattern :: VisagePattern ->+ T_VisagePattern+sem_VisagePattern (VAlias _field _attr _pat) =+ (sem_VisagePattern_VAlias _field _attr (sem_VisagePattern _pat))+sem_VisagePattern (VConstr _name _pats) =+ (sem_VisagePattern_VConstr _name (sem_VisagePatterns _pats))+sem_VisagePattern (VProduct _pos _pats) =+ (sem_VisagePattern_VProduct _pos (sem_VisagePatterns _pats))+sem_VisagePattern (VUnderscore _pos) =+ (sem_VisagePattern_VUnderscore _pos)+sem_VisagePattern (VVar _field _attr) =+ (sem_VisagePattern_VVar _field _attr) -- semantic domain-newtype T_VisagePattern = T_VisagePattern (( ATerm))-data Inh_VisagePattern = Inh_VisagePattern {}-data Syn_VisagePattern = Syn_VisagePattern {aterm_Syn_VisagePattern :: ATerm}-wrap_VisagePattern :: T_VisagePattern ->- Inh_VisagePattern ->- Syn_VisagePattern -wrap_VisagePattern (T_VisagePattern sem ) (Inh_VisagePattern ) =- (let ( _lhsOaterm) = sem - in (Syn_VisagePattern _lhsOaterm ))+newtype T_VisagePattern = T_VisagePattern (( ATerm))+data Inh_VisagePattern = Inh_VisagePattern {}+data Syn_VisagePattern = Syn_VisagePattern {aterm_Syn_VisagePattern :: ATerm}+wrap_VisagePattern :: T_VisagePattern ->+ Inh_VisagePattern ->+ Syn_VisagePattern+wrap_VisagePattern (T_VisagePattern sem) (Inh_VisagePattern) =+ (let ( _lhsOaterm) = sem+ in (Syn_VisagePattern _lhsOaterm)) sem_VisagePattern_VAlias :: Identifier -> Identifier ->- T_VisagePattern ->- T_VisagePattern -sem_VisagePattern_VAlias field_ attr_ (T_VisagePattern pat_ ) =+ T_VisagePattern ->+ T_VisagePattern+sem_VisagePattern_VAlias field_ attr_ (T_VisagePattern pat_) = (T_VisagePattern (let _lhsOaterm :: ATerm _patIaterm :: ATerm -- "src-ag/Visage.ag"(line 119, column 18)@@ -403,15 +403,15 @@ ({-# LINE 119 "src-ag/Visage.ag" #-} AAppl "Pattern" [AAppl "Alias" [AString (sQ (showAGPos (getPos field_))), AString (sQ (getName field_ ++ "." ++ getName attr_)), _patIaterm]]- {-# LINE 407 "src-ag/Visage.hs" #-}+ {-# LINE 407 "dist/build/Visage" #-} ) ( _patIaterm) =- pat_ - in ( _lhsOaterm)) )+ pat_+ in ( _lhsOaterm))) sem_VisagePattern_VConstr :: ConstructorIdent ->- T_VisagePatterns ->- T_VisagePattern -sem_VisagePattern_VConstr name_ (T_VisagePatterns pats_ ) =+ T_VisagePatterns ->+ T_VisagePattern+sem_VisagePattern_VConstr name_ (T_VisagePatterns pats_) = (T_VisagePattern (let _lhsOaterm :: ATerm _patsIaterms :: ([ATerm]) -- "src-ag/Visage.ag"(line 112, column 18)@@ -420,15 +420,15 @@ AAppl "Pattern" [AAppl "Constr" [AString (sQ (showAGPos (getPos name_))), AString (sQ (getName name_)), AAppl "Patterns" _patsIaterms]]- {-# LINE 424 "src-ag/Visage.hs" #-}+ {-# LINE 424 "dist/build/Visage" #-} ) ( _patsIaterms) =- pats_ - in ( _lhsOaterm)) )+ pats_+ in ( _lhsOaterm))) sem_VisagePattern_VProduct :: Pos ->- T_VisagePatterns ->- T_VisagePattern -sem_VisagePattern_VProduct pos_ (T_VisagePatterns pats_ ) =+ T_VisagePatterns ->+ T_VisagePattern+sem_VisagePattern_VProduct pos_ (T_VisagePatterns pats_) = (T_VisagePattern (let _lhsOaterm :: ATerm _patsIaterms :: ([ATerm]) -- "src-ag/Visage.ag"(line 115, column 18)@@ -436,35 +436,35 @@ ({-# LINE 115 "src-ag/Visage.ag" #-} AAppl "Pattern" [AAppl "Product" [AString (sQ (showAGPos pos_)), AAppl "Patterns" _patsIaterms]]- {-# LINE 440 "src-ag/Visage.hs" #-}+ {-# LINE 440 "dist/build/Visage" #-} ) ( _patsIaterms) =- pats_ - in ( _lhsOaterm)) )+ pats_+ in ( _lhsOaterm))) sem_VisagePattern_VUnderscore :: Pos ->- T_VisagePattern -sem_VisagePattern_VUnderscore pos_ =+ T_VisagePattern+sem_VisagePattern_VUnderscore pos_ = (T_VisagePattern (let _lhsOaterm :: ATerm -- "src-ag/Visage.ag"(line 121, column 18) _lhsOaterm = ({-# LINE 121 "src-ag/Visage.ag" #-} AAppl "Pattern" [AAppl "Underscore" [AString (sQ (showAGPos pos_))]]- {-# LINE 453 "src-ag/Visage.hs" #-}+ {-# LINE 453 "dist/build/Visage" #-} )- in ( _lhsOaterm)) )+ in ( _lhsOaterm))) sem_VisagePattern_VVar :: Identifier -> Identifier ->- T_VisagePattern -sem_VisagePattern_VVar field_ attr_ =+ T_VisagePattern+sem_VisagePattern_VVar field_ attr_ = (T_VisagePattern (let _lhsOaterm :: ATerm -- "src-ag/Visage.ag"(line 117, column 18) _lhsOaterm = ({-# LINE 117 "src-ag/Visage.ag" #-} AAppl "Pattern" [AAppl "Var" [AString (sQ (showAGPos (getPos field_))), AString (sQ (getName field_ ++ "." ++ getName attr_))]]- {-# LINE 466 "src-ag/Visage.hs" #-}+ {-# LINE 466 "dist/build/Visage" #-} )- in ( _lhsOaterm)) )+ in ( _lhsOaterm))) -- VisagePatterns ---------------------------------------------- {- visit 0:@@ -477,24 +477,24 @@ alternative Nil: -} -- cata-sem_VisagePatterns :: VisagePatterns ->- T_VisagePatterns -sem_VisagePatterns list =- (Prelude.foldr sem_VisagePatterns_Cons sem_VisagePatterns_Nil (Prelude.map sem_VisagePattern list) )+sem_VisagePatterns :: VisagePatterns ->+ T_VisagePatterns+sem_VisagePatterns list =+ (Prelude.foldr sem_VisagePatterns_Cons sem_VisagePatterns_Nil (Prelude.map sem_VisagePattern list)) -- semantic domain-newtype T_VisagePatterns = T_VisagePatterns (( ([ATerm])))-data Inh_VisagePatterns = Inh_VisagePatterns {}-data Syn_VisagePatterns = Syn_VisagePatterns {aterms_Syn_VisagePatterns :: ([ATerm])}-wrap_VisagePatterns :: T_VisagePatterns ->- Inh_VisagePatterns ->- Syn_VisagePatterns -wrap_VisagePatterns (T_VisagePatterns sem ) (Inh_VisagePatterns ) =- (let ( _lhsOaterms) = sem - in (Syn_VisagePatterns _lhsOaterms ))-sem_VisagePatterns_Cons :: T_VisagePattern ->- T_VisagePatterns ->- T_VisagePatterns -sem_VisagePatterns_Cons (T_VisagePattern hd_ ) (T_VisagePatterns tl_ ) =+newtype T_VisagePatterns = T_VisagePatterns (( ([ATerm])))+data Inh_VisagePatterns = Inh_VisagePatterns {}+data Syn_VisagePatterns = Syn_VisagePatterns {aterms_Syn_VisagePatterns :: ([ATerm])}+wrap_VisagePatterns :: T_VisagePatterns ->+ Inh_VisagePatterns ->+ Syn_VisagePatterns+wrap_VisagePatterns (T_VisagePatterns sem) (Inh_VisagePatterns) =+ (let ( _lhsOaterms) = sem+ in (Syn_VisagePatterns _lhsOaterms))+sem_VisagePatterns_Cons :: T_VisagePattern ->+ T_VisagePatterns ->+ T_VisagePatterns+sem_VisagePatterns_Cons (T_VisagePattern hd_) (T_VisagePatterns tl_) = (T_VisagePatterns (let _lhsOaterms :: ([ATerm]) _hdIaterm :: ATerm _tlIaterms :: ([ATerm])@@ -502,23 +502,23 @@ _lhsOaterms = ({-# LINE 107 "src-ag/Visage.ag" #-} _hdIaterm : _tlIaterms- {-# LINE 506 "src-ag/Visage.hs" #-}+ {-# LINE 506 "dist/build/Visage" #-} ) ( _hdIaterm) =- hd_ + hd_ ( _tlIaterms) =- tl_ - in ( _lhsOaterms)) )-sem_VisagePatterns_Nil :: T_VisagePatterns -sem_VisagePatterns_Nil =+ tl_+ in ( _lhsOaterms)))+sem_VisagePatterns_Nil :: T_VisagePatterns+sem_VisagePatterns_Nil = (T_VisagePatterns (let _lhsOaterms :: ([ATerm]) -- "src-ag/Visage.ag"(line 108, column 17) _lhsOaterms = ({-# LINE 108 "src-ag/Visage.ag" #-} []- {-# LINE 520 "src-ag/Visage.hs" #-}+ {-# LINE 520 "dist/build/Visage" #-} )- in ( _lhsOaterms)) )+ in ( _lhsOaterms))) -- VisageProduction -------------------------------------------- {- visit 0:@@ -532,26 +532,26 @@ child locrules : VisageRules -} -- cata-sem_VisageProduction :: VisageProduction ->- T_VisageProduction -sem_VisageProduction (VProduction _con _children _rules _locrules ) =- (sem_VisageProduction_VProduction _con (sem_VisageChildren _children ) (sem_VisageRules _rules ) (sem_VisageRules _locrules ) )+sem_VisageProduction :: VisageProduction ->+ T_VisageProduction+sem_VisageProduction (VProduction _con _children _rules _locrules) =+ (sem_VisageProduction_VProduction _con (sem_VisageChildren _children) (sem_VisageRules _rules) (sem_VisageRules _locrules)) -- semantic domain-newtype T_VisageProduction = T_VisageProduction (( ATerm))-data Inh_VisageProduction = Inh_VisageProduction {}-data Syn_VisageProduction = Syn_VisageProduction {aterm_Syn_VisageProduction :: ATerm}-wrap_VisageProduction :: T_VisageProduction ->- Inh_VisageProduction ->- Syn_VisageProduction -wrap_VisageProduction (T_VisageProduction sem ) (Inh_VisageProduction ) =- (let ( _lhsOaterm) = sem - in (Syn_VisageProduction _lhsOaterm ))+newtype T_VisageProduction = T_VisageProduction (( ATerm))+data Inh_VisageProduction = Inh_VisageProduction {}+data Syn_VisageProduction = Syn_VisageProduction {aterm_Syn_VisageProduction :: ATerm}+wrap_VisageProduction :: T_VisageProduction ->+ Inh_VisageProduction ->+ Syn_VisageProduction+wrap_VisageProduction (T_VisageProduction sem) (Inh_VisageProduction) =+ (let ( _lhsOaterm) = sem+ in (Syn_VisageProduction _lhsOaterm)) sem_VisageProduction_VProduction :: ConstructorIdent ->- T_VisageChildren ->- T_VisageRules ->- T_VisageRules ->- T_VisageProduction -sem_VisageProduction_VProduction con_ (T_VisageChildren children_ ) (T_VisageRules rules_ ) (T_VisageRules locrules_ ) =+ T_VisageChildren ->+ T_VisageRules ->+ T_VisageRules ->+ T_VisageProduction+sem_VisageProduction_VProduction con_ (T_VisageChildren children_) (T_VisageRules rules_) (T_VisageRules locrules_) = (T_VisageProduction (let _lhsOaterm :: ATerm _locrulesOisLoc :: Bool _rulesOisLoc :: Bool@@ -564,27 +564,27 @@ AAppl "Alternative" [AString (sQ (getName con_)), AAppl "Children" _childrenIaterms, AAppl "Rules" _rulesIaterms, AAppl "LocRules" _locrulesIaterms]- {-# LINE 568 "src-ag/Visage.hs" #-}+ {-# LINE 568 "dist/build/Visage" #-} ) -- "src-ag/Visage.ag"(line 76, column 18) _locrulesOisLoc = ({-# LINE 76 "src-ag/Visage.ag" #-} True- {-# LINE 574 "src-ag/Visage.hs" #-}+ {-# LINE 574 "dist/build/Visage" #-} ) -- "src-ag/Visage.ag"(line 77, column 18) _rulesOisLoc = ({-# LINE 77 "src-ag/Visage.ag" #-} False- {-# LINE 580 "src-ag/Visage.hs" #-}+ {-# LINE 580 "dist/build/Visage" #-} ) ( _childrenIaterms) =- children_ + children_ ( _rulesIaterms) =- rules_ _rulesOisLoc + rules_ _rulesOisLoc ( _locrulesIaterms) =- locrules_ _locrulesOisLoc - in ( _lhsOaterm)) )+ locrules_ _locrulesOisLoc+ in ( _lhsOaterm))) -- VisageProductions ------------------------------------------- {- visit 0:@@ -597,24 +597,24 @@ alternative Nil: -} -- cata-sem_VisageProductions :: VisageProductions ->- T_VisageProductions -sem_VisageProductions list =- (Prelude.foldr sem_VisageProductions_Cons sem_VisageProductions_Nil (Prelude.map sem_VisageProduction list) )+sem_VisageProductions :: VisageProductions ->+ T_VisageProductions+sem_VisageProductions list =+ (Prelude.foldr sem_VisageProductions_Cons sem_VisageProductions_Nil (Prelude.map sem_VisageProduction list)) -- semantic domain-newtype T_VisageProductions = T_VisageProductions (( ([ATerm])))-data Inh_VisageProductions = Inh_VisageProductions {}-data Syn_VisageProductions = Syn_VisageProductions {aterms_Syn_VisageProductions :: ([ATerm])}-wrap_VisageProductions :: T_VisageProductions ->- Inh_VisageProductions ->- Syn_VisageProductions -wrap_VisageProductions (T_VisageProductions sem ) (Inh_VisageProductions ) =- (let ( _lhsOaterms) = sem - in (Syn_VisageProductions _lhsOaterms ))-sem_VisageProductions_Cons :: T_VisageProduction ->- T_VisageProductions ->- T_VisageProductions -sem_VisageProductions_Cons (T_VisageProduction hd_ ) (T_VisageProductions tl_ ) =+newtype T_VisageProductions = T_VisageProductions (( ([ATerm])))+data Inh_VisageProductions = Inh_VisageProductions {}+data Syn_VisageProductions = Syn_VisageProductions {aterms_Syn_VisageProductions :: ([ATerm])}+wrap_VisageProductions :: T_VisageProductions ->+ Inh_VisageProductions ->+ Syn_VisageProductions+wrap_VisageProductions (T_VisageProductions sem) (Inh_VisageProductions) =+ (let ( _lhsOaterms) = sem+ in (Syn_VisageProductions _lhsOaterms))+sem_VisageProductions_Cons :: T_VisageProduction ->+ T_VisageProductions ->+ T_VisageProductions+sem_VisageProductions_Cons (T_VisageProduction hd_) (T_VisageProductions tl_) = (T_VisageProductions (let _lhsOaterms :: ([ATerm]) _hdIaterm :: ATerm _tlIaterms :: ([ATerm])@@ -622,23 +622,23 @@ _lhsOaterms = ({-# LINE 68 "src-ag/Visage.ag" #-} _hdIaterm : _tlIaterms- {-# LINE 626 "src-ag/Visage.hs" #-}+ {-# LINE 626 "dist/build/Visage" #-} ) ( _hdIaterm) =- hd_ + hd_ ( _tlIaterms) =- tl_ - in ( _lhsOaterms)) )-sem_VisageProductions_Nil :: T_VisageProductions -sem_VisageProductions_Nil =+ tl_+ in ( _lhsOaterms)))+sem_VisageProductions_Nil :: T_VisageProductions+sem_VisageProductions_Nil = (T_VisageProductions (let _lhsOaterms :: ([ATerm]) -- "src-ag/Visage.ag"(line 69, column 17) _lhsOaterms = ({-# LINE 69 "src-ag/Visage.ag" #-} []- {-# LINE 640 "src-ag/Visage.hs" #-}+ {-# LINE 640 "dist/build/Visage" #-} )- in ( _lhsOaterms)) )+ in ( _lhsOaterms))) -- VisageRule -------------------------------------------------- {- visit 0:@@ -655,28 +655,28 @@ child owrt : {Bool} -} -- cata-sem_VisageRule :: VisageRule ->- T_VisageRule -sem_VisageRule (VRule _fieldattrs _attr _pat _rhs _owrt ) =- (sem_VisageRule_VRule _fieldattrs _attr (sem_VisagePattern _pat ) (sem_Expression _rhs ) _owrt )+sem_VisageRule :: VisageRule ->+ T_VisageRule+sem_VisageRule (VRule _fieldattrs _attr _pat _rhs _owrt) =+ (sem_VisageRule_VRule _fieldattrs _attr (sem_VisagePattern _pat) (sem_Expression _rhs) _owrt) -- semantic domain-newtype T_VisageRule = T_VisageRule (Bool ->- ( ATerm))-data Inh_VisageRule = Inh_VisageRule {isLoc_Inh_VisageRule :: Bool}-data Syn_VisageRule = Syn_VisageRule {aterm_Syn_VisageRule :: ATerm}-wrap_VisageRule :: T_VisageRule ->- Inh_VisageRule ->- Syn_VisageRule -wrap_VisageRule (T_VisageRule sem ) (Inh_VisageRule _lhsIisLoc ) =- (let ( _lhsOaterm) = sem _lhsIisLoc - in (Syn_VisageRule _lhsOaterm ))+newtype T_VisageRule = T_VisageRule (Bool ->+ ( ATerm))+data Inh_VisageRule = Inh_VisageRule {isLoc_Inh_VisageRule :: Bool}+data Syn_VisageRule = Syn_VisageRule {aterm_Syn_VisageRule :: ATerm}+wrap_VisageRule :: T_VisageRule ->+ Inh_VisageRule ->+ Syn_VisageRule+wrap_VisageRule (T_VisageRule sem) (Inh_VisageRule _lhsIisLoc) =+ (let ( _lhsOaterm) = sem _lhsIisLoc+ in (Syn_VisageRule _lhsOaterm)) sem_VisageRule_VRule :: ([(Identifier,Identifier)]) -> Identifier ->- T_VisagePattern ->- T_Expression ->+ T_VisagePattern ->+ T_Expression -> Bool ->- T_VisageRule -sem_VisageRule_VRule fieldattrs_ attr_ (T_VisagePattern pat_ ) (T_Expression rhs_ ) owrt_ =+ T_VisageRule+sem_VisageRule_VRule fieldattrs_ attr_ (T_VisagePattern pat_) (T_Expression rhs_) owrt_ = (T_VisageRule (\ _lhsIisLoc -> (let _lhsOaterm :: ATerm _patIaterm :: ATerm@@ -686,13 +686,13 @@ ({-# LINE 97 "src-ag/Visage.ag" #-} AAppl (if _lhsIisLoc then "LocRule" else "Rule") ([AString (sQ (getName attr_)), _patIaterm, _rhsIaterm] ++ if _lhsIisLoc then [AString (sQ (show owrt_))] else [])- {-# LINE 690 "src-ag/Visage.hs" #-}+ {-# LINE 690 "dist/build/Visage" #-} ) ( _patIaterm) =- pat_ + pat_ ( _rhsIaterm) =- rhs_ - in ( _lhsOaterm))) )+ rhs_+ in ( _lhsOaterm)))) -- VisageRules ------------------------------------------------- {- visit 0:@@ -707,25 +707,25 @@ alternative Nil: -} -- cata-sem_VisageRules :: VisageRules ->- T_VisageRules -sem_VisageRules list =- (Prelude.foldr sem_VisageRules_Cons sem_VisageRules_Nil (Prelude.map sem_VisageRule list) )+sem_VisageRules :: VisageRules ->+ T_VisageRules+sem_VisageRules list =+ (Prelude.foldr sem_VisageRules_Cons sem_VisageRules_Nil (Prelude.map sem_VisageRule list)) -- semantic domain-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])}-wrap_VisageRules :: T_VisageRules ->- Inh_VisageRules ->- Syn_VisageRules -wrap_VisageRules (T_VisageRules sem ) (Inh_VisageRules _lhsIisLoc ) =- (let ( _lhsOaterms) = sem _lhsIisLoc - in (Syn_VisageRules _lhsOaterms ))-sem_VisageRules_Cons :: T_VisageRule ->- T_VisageRules ->- T_VisageRules -sem_VisageRules_Cons (T_VisageRule hd_ ) (T_VisageRules tl_ ) =+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])}+wrap_VisageRules :: T_VisageRules ->+ Inh_VisageRules ->+ Syn_VisageRules+wrap_VisageRules (T_VisageRules sem) (Inh_VisageRules _lhsIisLoc) =+ (let ( _lhsOaterms) = sem _lhsIisLoc+ in (Syn_VisageRules _lhsOaterms))+sem_VisageRules_Cons :: T_VisageRule ->+ T_VisageRules ->+ T_VisageRules+sem_VisageRules_Cons (T_VisageRule hd_) (T_VisageRules tl_) = (T_VisageRules (\ _lhsIisLoc -> (let _lhsOaterms :: ([ATerm]) _hdOisLoc :: Bool@@ -736,33 +736,33 @@ _lhsOaterms = ({-# LINE 92 "src-ag/Visage.ag" #-} _hdIaterm : _tlIaterms- {-# LINE 740 "src-ag/Visage.hs" #-}+ {-# LINE 740 "dist/build/Visage" #-} ) -- copy rule (down) _hdOisLoc = ({-# LINE 51 "src-ag/Visage.ag" #-} _lhsIisLoc- {-# LINE 746 "src-ag/Visage.hs" #-}+ {-# LINE 746 "dist/build/Visage" #-} ) -- copy rule (down) _tlOisLoc = ({-# LINE 51 "src-ag/Visage.ag" #-} _lhsIisLoc- {-# LINE 752 "src-ag/Visage.hs" #-}+ {-# LINE 752 "dist/build/Visage" #-} ) ( _hdIaterm) =- hd_ _hdOisLoc + hd_ _hdOisLoc ( _tlIaterms) =- tl_ _tlOisLoc - in ( _lhsOaterms))) )-sem_VisageRules_Nil :: T_VisageRules -sem_VisageRules_Nil =+ tl_ _tlOisLoc+ in ( _lhsOaterms))))+sem_VisageRules_Nil :: T_VisageRules+sem_VisageRules_Nil = (T_VisageRules (\ _lhsIisLoc -> (let _lhsOaterms :: ([ATerm]) -- "src-ag/Visage.ag"(line 93, column 17) _lhsOaterms = ({-# LINE 93 "src-ag/Visage.ag" #-} []- {-# LINE 767 "src-ag/Visage.hs" #-}+ {-# LINE 767 "dist/build/Visage" #-} )- in ( _lhsOaterms))) )+ in ( _lhsOaterms))))
src-derived/VisagePatterns.hs view
@@ -1,12 +1,12 @@ --- UUAGC 0.9.39.1.0 (src-ag/VisagePatterns.ag)+-- UUAGC 0.9.40.1 (src-ag/VisagePatterns.ag) module VisagePatterns where {-# LINE 2 "src-ag/VisagePatterns.ag" #-} import UU.Scanner.Position(Pos) import CommonTypes-{-# LINE 10 "dist/build/uuagc/uuagc-tmp/VisagePatterns.hs" #-}+{-# LINE 10 "dist/build/VisagePatterns.hs" #-} -- VisagePattern ----------------------------------------------- {- alternatives:@@ -26,11 +26,11 @@ child field : {Identifier} child attr : {Identifier} -}-data VisagePattern = VAlias (Identifier) (Identifier) (VisagePattern ) - | VConstr (ConstructorIdent) (VisagePatterns ) - | VProduct (Pos) (VisagePatterns ) - | VUnderscore (Pos) - | VVar (Identifier) (Identifier) +data VisagePattern = VAlias (Identifier) (Identifier) (VisagePattern)+ | VConstr (ConstructorIdent) (VisagePatterns)+ | VProduct (Pos) (VisagePatterns)+ | VUnderscore (Pos)+ | VVar (Identifier) (Identifier) -- VisagePatterns ---------------------------------------------- {- alternatives:@@ -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.39.1.0 (src-ag/VisageSyntax.ag)+-- UUAGC 0.9.40.1 (src-ag/VisageSyntax.ag) module VisageSyntax where {-# LINE 2 "src-ag/VisageSyntax.ag" #-} @@ -9,7 +9,7 @@ import AbstractSyntax import VisagePatterns import Expression-{-# LINE 13 "dist/build/uuagc/uuagc-tmp/VisageSyntax.hs" #-}+{-# LINE 13 "dist/build/VisageSyntax.hs" #-} -- VisageChild ------------------------------------------------- {- alternatives:@@ -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-main/Main.hs view
@@ -0,0 +1,6 @@+module Main where++import UU.UUAGC.Bootstrap (uuagcBootstrapMain)++main :: IO ()+main = uuagcBootstrapMain
+ src-options/Options.hs view
@@ -0,0 +1,494 @@+module Options where++import System.Console.GetOpt+import Data.Set(Set)+import UU.Scanner.Position(Pos,noPos)+import Data.List(intercalate)+import qualified Data.Set as Set++-- From CommonTypes+data Identifier = Ident { getName::String, getPos::Pos }+type NontermIdent = Identifier+identifier x = Ident x noPos++instance Eq Identifier where+ Ident x _ == Ident y _ = x == y++instance Ord Identifier where+ compare (Ident x _) (Ident y _) = compare x y++instance Show Identifier where+ show ident = getName ident+ +-- Make options serializable+data MyOptDescr = MyOpt [Char] [String] (ArgDescr (Options -> Options)) (Options -> String -> [String]) String++fromMyOpt :: MyOptDescr -> OptDescr (Options -> Options)+fromMyOpt (MyOpt sh ln desc _ s) = Option sh ln desc s++noOpt :: Options -> String -> [String]+noOpt _ _ = []++boolOpt :: (Options -> Bool) -> Options -> String -> [String]+boolOpt get opt strArg = let oldVal = get noOptions+ newVal = get opt+ in if oldVal /= newVal+ then [strArg]+ else []++stringOpt :: (Options -> String) -> Options -> String -> [String]+stringOpt get opt strArg = let oldVal = get noOptions+ newVal = get opt+ in if oldVal /= newVal+ then [strArg, newVal]+ else []++mbStringOpt :: (Options -> Maybe String) -> Options -> String -> [String]+mbStringOpt get opts nm = maybe [] (\s -> [nm, s]) (get opts)++serializeOption :: Options -> MyOptDescr -> [String]+serializeOption opt (MyOpt sh ln _ get _) = get opt strArg+ where+ strArg = if null sh+ then '-' : '-' : head ln+ else '-' : head sh : []++-- All options+allOptions :: [MyOptDescr]+allOptions = + [ MyOpt ['m'] [] (NoArg (moduleOpt Nothing)) noOpt "generate default module header"+ , MyOpt [] ["module"] (OptArg moduleOpt "name") moduleOptGet "generate module header, specify module name"+ , MyOpt ['d'] ["data"] (NoArg dataOpt) (boolOpt dataTypes) "generate data type definition"+ , MyOpt [] ["datarecords"] (NoArg dataRecOpt) (boolOpt dataRecords) "generate record data types"+ , MyOpt [] ["strictdata"] (NoArg strictDataOpt) (boolOpt strictData) "generate strict data fields (when data is generated)"+ , MyOpt [] ["strictwrap"] (NoArg strictWrapOpt) (boolOpt strictWrap) "generate strict wrap fields for WRAPPER generated data"+ , MyOpt ['c'] ["catas"] (NoArg cataOpt) (boolOpt folds) "generate catamorphisms"+ , MyOpt ['f'] ["semfuns"] (NoArg semfunsOpt) (boolOpt semfuns) "generate semantic functions"+ , MyOpt ['s'] ["signatures"] (NoArg signaturesOpt) (boolOpt typeSigs) "generate signatures for semantic functions"+ , MyOpt [] ["newtypes"] (NoArg newtypesOpt) (boolOpt newtypes) "use newtypes instead of type synonyms"+ , MyOpt ['p'] ["pretty"] (NoArg prettyOpt) (boolOpt attrInfo) "generate pretty printed list of attributes"+ , MyOpt ['w'] ["wrappers"] (NoArg wrappersOpt) (boolOpt wrappers) "generate wappers for semantic domains"+ , MyOpt ['r'] ["rename"] (NoArg renameOpt) (boolOpt rename) "rename data constructors"+ , MyOpt [] ["modcopy"] (NoArg modcopyOpt) (boolOpt modcopy) "use modified copy rule"+ , MyOpt [] ["nest"] (NoArg nestOpt) (boolOpt nest) "use nested tuples"+ , MyOpt [] ["syntaxmacro"] (NoArg smacroOpt) (boolOpt smacro) "experimental: generate syntax macro code (using knit catas)"+ , MyOpt ['o'] ["output"] (ReqArg outputOpt "file") outputOptGet "specify output file"+ , MyOpt ['v'] ["verbose"] (NoArg verboseOpt) (boolOpt verbose) "verbose error message format"+ , MyOpt ['h','?'] ["help"] (NoArg helpOpt) (boolOpt showHelp) "get (this) usage information"+ , MyOpt ['a'] ["all"] (NoArg allOpt) noOpt ("do everything (-" ++ allc ++ ")")+ , MyOpt ['P'] [""] (ReqArg searchPathOpt "search path") searchPathOptGet ("specify seach path")+ , MyOpt [] ["prefix"] (ReqArg prefixOpt "prefix") (stringOpt prefix) "set prefix for semantic functions"+ , MyOpt [] ["self"] (NoArg selfOpt) (boolOpt withSelf) "generate self attribute"+ , MyOpt [] ["cycle"] (NoArg cycleOpt) (boolOpt withCycle) "check for cyclic definitions"+ , MyOpt [] ["version"] (NoArg versionOpt) (boolOpt showVersion) "get version information"+ , MyOpt ['O'] ["optimize"] (NoArg optimizeOpt) noOpt "optimize generated code (--visit --case)"+ , MyOpt [] ["visit"] (NoArg visitOpt) (boolOpt visit) "try generating visit functions"+ , MyOpt [] ["seq"] (NoArg seqOpt) (boolOpt withSeq) "force evaluation using function seq (visit functions only)"+ , MyOpt [] ["unbox"] (NoArg unboxOpt) (boolOpt unbox) "use unboxed tuples"+ , MyOpt [] ["bangpats"] (NoArg bangpatsOpt) (boolOpt bangpats) "use bang patterns (visit functions only)"+ , MyOpt [] ["case"] (NoArg casesOpt) (boolOpt cases) "Use nested cases instead of let (visit functions only)"+ , MyOpt [] ["strictcase"] (NoArg strictCasesOpt) (boolOpt strictCases) "Force evaluation of the scrutinee of cases (in generated code, visit functions only)"+ , MyOpt [] ["strictercase"] (NoArg stricterCasesOpt) (boolOpt stricterCases) "Force evaluation of all variables bound by a case statement (in generated code)"+ , MyOpt [] ["strictsem"] (NoArg strictSemOpt) (boolOpt strictSems) "Force evaluation of sem-function arguments (in generated code)"+ , MyOpt [] ["localcps"] (NoArg localCpsOpt) (boolOpt localCps) "Apply a local CPS transformation (in generated code, visit functions only)"+ , MyOpt [] ["splitsems"] (NoArg splitSemsOpt) (boolOpt splitSems) "Split semantic functions into smaller pieces"+ , MyOpt [] ["Werrors"] (NoArg werrorsOpt) (boolOpt werrors) "Turn warnings into fatal errors"+ , MyOpt [] ["Wignore"] (NoArg wignoreOpt) (boolOpt wignore) "Ignore warnings"+ , MyOpt [] ["Wmax"] (ReqArg wmaxErrsOpt "<max errs reported>") wmaxErrsOptGet "Sets the maximum number of errors that are reported"+ , MyOpt [] ["dumpgrammar"] (NoArg dumpgrammarOpt) (boolOpt dumpgrammar) "Dump internal grammar representation (in generated code)"+ , MyOpt [] ["dumpcgrammar"] (NoArg dumpcgrammarOpt) (boolOpt dumpcgrammar)"Dump internal cgrammar representation (in generated code)"+ , MyOpt [] ["gentraces"] (NoArg genTracesOpt) (boolOpt genTraces) "Generate trace expressions (in generated code)"+ , MyOpt [] ["genusetraces"] (NoArg genUseTracesOpt) (boolOpt genUseTraces)"Generate trace expressions at attribute use sites (in generated code)"+ , MyOpt [] ["gencostcentres"] (NoArg genCostCentresOpt) (boolOpt genCostCentres) "Generate cost centre pragmas (in generated code)"+ , MyOpt [] ["genlinepragmas"] (NoArg genLinePragmasOpt) (boolOpt genLinePragmas) "Generate GHC LINE pragmas (in generated code)"+ , MyOpt [] ["sepsemmods"] (NoArg sepSemModsOpt) (boolOpt sepSemMods) "Generate separate modules for semantic functions (in generated code)"+ , MyOpt ['M'] ["genfiledeps"] (NoArg genFileDepsOpt) (boolOpt genFileDeps) "Generate a list of dependencies on the input AG files"+ , MyOpt [] ["genvisage"] (NoArg genVisageOpt) (boolOpt genvisage) "Generate output for the AG visualizer Visage"+ , MyOpt [] ["aspectag"] (NoArg genAspectAGOpt) (boolOpt genAspectAG) "Generate AspectAG file"+ , MyOpt [] ["nogroup"] (ReqArg noGroupOpt "attributes") noGroupOptGet "specify the attributes that won't be grouped in AspectAG"+ , MyOpt [] ["extends"] (ReqArg extendsOpt "module") (mbStringOpt extends) "specify a module to be extended"+ , MyOpt [] ["genattrlist"] (NoArg genAttrListOpt) (boolOpt genAttributeList) "Generate a list of all explicitly defined attributes (outside irrefutable patterns)"+ , MyOpt [] ["forceirrefutable"] (OptArg forceIrrefutableOpt "file") (mbStringOpt forceIrrefutables) "Force a set of explicitly defined attributes to be irrefutable, specify file containing the attribute set"+ , MyOpt [] ["uniquedispenser"] (ReqArg uniqueDispenserOpt "name") (stringOpt uniqueDispenser) "The Haskell function to call in the generated code"+ , MyOpt [] ["lckeywords"] (NoArg lcKeywordsOpt) (boolOpt lcKeywords) "Use lowercase keywords (sem, attr) instead of the uppercase ones (SEM, ATTR)"+ , MyOpt [] ["doublecolons"] (NoArg doubleColonsOpt) (boolOpt doubleColons)"Use double colons for type signatures instead of single colons"+ , MyOpt ['H'] ["haskellsyntax"] (NoArg haskellSyntaxOpt) noOpt "Use Haskell like syntax (equivalent to --lckeywords and --doublecolons --genlinepragmas)"+ , MyOpt [] ["reference"] (NoArg referenceOpt) (boolOpt reference) "Use reference attributes"+ , MyOpt [] ["monadic"] (NoArg monadicOpt) (boolOpt monadic) "Experimental: generate monadic code"+ , MyOpt [] ["ocaml"] (NoArg ocamlOpt) (boolOpt ocaml) "Experimental: generate Ocaml code"+ , MyOpt [] ["breadthfirst"] (NoArg breadthfirstOpt) (boolOpt breadthFirst)"Experimental: generate breadth-first code"+ , MyOpt [] ["breadthfirst-strict"] (NoArg breadthfirstStrictOpt) (boolOpt breadthFirstStrict) "Experimental: outermost breadth-first evaluator is strict instead of lazy"+ , MyOpt [] ["visitcode"] (NoArg visitorsOutputOpt) (boolOpt visitorsOutput) "Experimental: generate visitors code"+ , MyOpt [] ["kennedywarren"] (NoArg kennedyWarrenOpt) (boolOpt kennedyWarren) "Experimental: use Kennedy-Warren's algorithm for ordering"+ , MyOpt [] ["statistics"] (ReqArg statisticsOpt "FILE to append to") (mbStringOpt statsFile) "Append statistics to FILE"+ , MyOpt [] ["checkParseRhs"] (NoArg parseHsRhsOpt) (boolOpt checkParseRhs) "Parse RHS of rules with Haskell parser"+ , MyOpt [] ["checkParseTys"] (NoArg parseHsTpOpt) (boolOpt checkParseTy) "Parse types of attrs with Haskell parser"+ , MyOpt [] ["checkParseBlocks"] (NoArg parseHsBlockOpt) (boolOpt checkParseBlock) "Parse blocks with Haskell parser"+ , MyOpt [] ["checkParseHaskell"] (NoArg parseHsOpt) noOpt "Parse Haskell code (recognizer)"+ , MyOpt [] ["nocatas"] (ReqArg nocatasOpt "list of nonterms") nocatasOptGet "Nonterminals not to generate catas for"+ , MyOpt [] ["nooptimize"] (NoArg noOptimizeOpt) (boolOpt noOptimizations) "Disable optimizations"+ , MyOpt [] ["parallel"] (NoArg parallelOpt) (boolOpt parallelInvoke) "Generate a parallel evaluator (if possible)"+ , MyOpt [] ["monadicwrapper"] (NoArg monadicWrappersOpt) (boolOpt monadicWrappers) "Generate monadic wrappers"+ , MyOpt [] ["helpinlining"] (NoArg helpInliningOpt) (boolOpt helpInlining) "Generate inline directives for GHC"+ , MyOpt [] ["dummytokenvisit"] (NoArg dummyTokenVisitOpt) (boolOpt dummyTokenVisit) "Add an additional dummy parameter to visit functions"+ , MyOpt [] ["tupleasdummytoken"] (NoArg tupleAsDummyTokenOpt) (boolOpt tupleAsDummyToken) "Use conventional tuples as dummy parameter instead of a RealWorld state token"+ , MyOpt [] ["stateasdummytoken"] (NoArg stateAsDummyTokenOpt) noOpt "Use RealWorld state token as dummy parameter instead of conventional tuples (default)"+ , MyOpt [] ["strictdummytoken"] (NoArg strictDummyTokenOpt) (boolOpt strictDummyToken) "Strictify the dummy token that makes states and rules functions"+ , MyOpt [] ["noperruletypesigs"] (NoArg noPerRuleTypeSigsOpt) (boolOpt noPerRuleTypeSigs) "Do not generate type sigs for attrs passed to rules"+ , MyOpt [] ["noperstatetypesigs"] (NoArg noPerStateTypeSigsOpt) (boolOpt noPerStateTypeSigs) "Do not generate type sigs for attrs saved in node states"+ , MyOpt [] ["noeagerblackholing"] (NoArg noEagerBlackholingOpt) (boolOpt noEagerBlackholing) "Do not automatically add the eager blackholing feature for parallel programs"+ , MyOpt [] ["noperrulecostcentres"] (NoArg noPerRuleCostCentresOpt) (boolOpt noPerRuleCostCentres) "Do not generate cost centres for rules"+ , MyOpt [] ["nopervisitcostcentres"] (NoArg noPerVisitCostCentresOpt) (boolOpt noPerVisitCostCentres) "Do not generate cost centres for visits"+ , MyOpt [] ["noinlinepragmas"] (NoArg noInlinePragmasOpt) (boolOpt noInlinePragmas) "Definitely not generate inline directives"+ , MyOpt [] ["aggressiveinlinepragmas"] (NoArg aggressiveInlinePragmasOpt) (boolOpt aggressiveInlinePragmas) "Generate more aggressive inline directives"+ , MyOpt [] ["latehigherorderbinding"] (NoArg lateHigherOrderBindingOpt) (boolOpt lateHigherOrderBinding) "Generate an attribute and wrapper for late binding of higher-order attributes"+ ]++-- For compatibility+options :: [OptDescr (Options -> Options)]+options = map fromMyOpt allOptions++allc = "dcfsprm"++data ModuleHeader = NoName+ | Name String+ | Default deriving (Eq, Show)++data Options = Options{ moduleName :: ModuleHeader+ , dataTypes :: Bool+ , dataRecords :: Bool+ , strictData :: Bool+ , strictWrap :: Bool+ , folds :: Bool+ , semfuns :: Bool+ , typeSigs :: Bool+ , attrInfo :: Bool+ , rename :: Bool+ , wrappers :: Bool+ , modcopy :: Bool+ , newtypes :: Bool+ , nest :: Bool+ , smacro :: Bool+ , outputFiles :: [String]+ , searchPath :: [String]+ , verbose :: Bool+ , prefix :: String+ , withSelf :: Bool+ , withCycle :: Bool+ , showHelp :: Bool+ , showVersion :: Bool+ , visit :: Bool+ , withSeq :: Bool+ , unbox :: Bool+ , bangpats :: Bool+ , cases :: Bool+ , strictCases :: Bool+ , stricterCases :: Bool+ , strictSems :: Bool+ , localCps :: Bool+ , splitSems :: Bool+ , werrors :: Bool+ , wignore :: Bool+ , wmaxerrs :: Int+ , dumpgrammar :: Bool+ , dumpcgrammar :: Bool+ , sepSemMods :: Bool+ , genFileDeps :: Bool+ , genLinePragmas :: Bool+ , genvisage :: Bool+ , genAspectAG :: Bool+ , noGroup :: [String]+ , extends :: Maybe String+ , genAttributeList :: Bool+ , forceIrrefutables :: Maybe String+ , uniqueDispenser :: String+ , lcKeywords :: Bool+ , doubleColons :: Bool+ , monadic :: Bool+ , ocaml :: Bool+ , visitorsOutput :: Bool+ , statsFile :: Maybe String+ , breadthFirst :: Bool+ , breadthFirstStrict :: Bool+ , checkParseRhs :: Bool+ , checkParseTy :: Bool+ , checkParseBlock :: Bool+ , nocatas :: Set NontermIdent+ , noOptimizations :: Bool+ , reference :: Bool++ -- KW code path+ , kennedyWarren :: Bool+ , parallelInvoke :: Bool+ , tupleAsDummyToken :: Bool -- use the empty tuple as dummy token instead of State# RealWorld (Lambda State Hack GHC?)+ , dummyTokenVisit :: Bool -- add a dummy argument/pass dummy extra token to visits (should not really have an effect ... Lambda State Hack GHC?)+ , strictDummyToken :: Bool -- make the dummy token strict (to prevent its removal -- should not really have an effect)+ , noPerRuleTypeSigs :: Bool -- do not print type signatures for attributes of rules+ , noPerStateTypeSigs :: Bool -- do not print type signatures for attributes contained in the state+ , noEagerBlackholing :: Bool -- disable the use of eager black holing in the parallel evaluator code+ , lateHigherOrderBinding :: Bool -- generate code to allow late binding of higher-order children semantics+ , monadicWrappers :: Bool++ -- tracing+ , genTraces :: Bool+ , genUseTraces :: Bool+ , genCostCentres :: Bool+ , noPerRuleCostCentres :: Bool+ , noPerVisitCostCentres :: Bool++ -- inline pragma generation+ , helpInlining :: Bool+ , noInlinePragmas :: Bool+ , aggressiveInlinePragmas :: Bool+ } deriving (Eq, Show)++noOptions = Options { moduleName = NoName+ , dataTypes = False+ , dataRecords = False+ , strictData = False+ , strictWrap = False+ , folds = False+ , semfuns = False+ , typeSigs = False+ , attrInfo = False+ , rename = False+ , wrappers = False+ , modcopy = False+ , newtypes = False+ , nest = False+ , smacro = False+ , outputFiles = []+ , searchPath = []+ , verbose = False+ , showHelp = False+ , showVersion = False+ , prefix = "sem_"+ , withSelf = False+ , withCycle = False+ , visit = False+ , withSeq = False+ , unbox = False+ , bangpats = False+ , cases = False+ , strictCases = False+ , stricterCases = False+ , strictSems = False+ , localCps = False+ , splitSems = False+ , werrors = False+ , wignore = False+ , wmaxerrs = 99999+ , dumpgrammar = False+ , dumpcgrammar = False+ , sepSemMods = False+ , genFileDeps = False+ , genLinePragmas = False+ , genvisage = False+ , genAspectAG = False+ , noGroup = []+ , extends = Nothing+ , genAttributeList = False+ , forceIrrefutables = Nothing+ , uniqueDispenser = "nextUnique"+ , lcKeywords = False+ , doubleColons = False+ , monadic = False+ , ocaml = False+ , visitorsOutput = False+ , statsFile = Nothing+ , breadthFirst = False+ , breadthFirstStrict = False+ , checkParseRhs = False+ , checkParseTy = False+ , checkParseBlock = False+ , nocatas = Set.empty+ , noOptimizations = False+ , reference = False++ -- defaults for the KW-code path+ , kennedyWarren = False+ , parallelInvoke = False+ , tupleAsDummyToken = True+ , dummyTokenVisit = False+ , strictDummyToken = False+ , noPerRuleTypeSigs = False+ , noPerStateTypeSigs = False+ , noEagerBlackholing = False+ , lateHigherOrderBinding = False+ , monadicWrappers = False++ -- defaults for tracing+ , genTraces = False+ , genUseTraces = False+ , genCostCentres = False+ , noPerRuleCostCentres = False+ , noPerVisitCostCentres = False++ -- defaults for inline pragma generation+ , helpInlining = False+ , noInlinePragmas = False+ , aggressiveInlinePragmas = False+ }++--Options -> String -> [String]+moduleOpt nm opts = opts{moduleName = maybe Default Name nm}+moduleOptGet opts nm = case moduleName opts of+ NoName -> []+ Name s -> [nm,s]+ Default -> [nm]+dataOpt opts = opts{dataTypes = True}+dataRecOpt opts = opts{dataRecords = True}+strictDataOpt opts = opts{strictData = True}+strictWrapOpt opts = opts{strictWrap = True}+cataOpt opts = opts{folds = True}+semfunsOpt opts = opts{semfuns = True}+signaturesOpt opts = opts{typeSigs = True}+prettyOpt opts = opts{attrInfo = True}+renameOpt opts = opts{rename = True}+wrappersOpt opts = opts{wrappers = True}+modcopyOpt opts = opts{modcopy = True}+newtypesOpt opts = opts{newtypes = True}+nestOpt opts = opts{nest = True}+smacroOpt opts = opts{smacro = True}+verboseOpt opts = opts{verbose = True}+helpOpt opts = opts{showHelp = True}+versionOpt opts = opts{showVersion = True}+prefixOpt pre opts = opts{prefix = pre }+selfOpt opts = opts{withSelf = True}+cycleOpt opts = opts{withCycle = True}+visitOpt opts = opts{visit = True, withCycle = True}+seqOpt opts = opts{withSeq = True}+unboxOpt opts = opts{unbox = True}+bangpatsOpt opts = opts{bangpats = True}+casesOpt opts = opts{cases = True}+strictCasesOpt opts = opts{strictCases = True}+stricterCasesOpt opts = opts{strictCases = True, stricterCases = True}+strictSemOpt opts = opts{strictSems = True}+localCpsOpt opts = opts{localCps = True}+splitSemsOpt opts = opts{splitSems = True}+werrorsOpt opts = opts{werrors = True}+wignoreOpt opts = opts{wignore = True}+wmaxErrsOpt n opts = opts{wmaxerrs = read n}+wmaxErrsOptGet opts nm = if wmaxerrs opts /= wmaxerrs noOptions+ then [nm,show (wmaxerrs opts)]+ else []+dumpgrammarOpt opts = opts{dumpgrammar = True}+dumpcgrammarOpt opts = opts{dumpcgrammar = True}+genTracesOpt opts = opts{genTraces = True}+genUseTracesOpt opts = opts{genUseTraces = True}+genCostCentresOpt opts = opts{genCostCentres = True}+sepSemModsOpt opts = opts{sepSemMods = True}+genFileDepsOpt opts = opts{genFileDeps = True}+genLinePragmasOpt opts = opts{genLinePragmas = True}+genVisageOpt opts = opts{genvisage = True }+genAspectAGOpt opts = opts{genAspectAG = True}++dummyTokenVisitOpt opts = opts { dummyTokenVisit = True }+tupleAsDummyTokenOpt opts = opts { tupleAsDummyToken = True }+stateAsDummyTokenOpt opts = opts { tupleAsDummyToken = False }+strictDummyTokenOpt opts = opts { strictDummyToken = True }+noPerRuleTypeSigsOpt opts = opts { noPerRuleTypeSigs = True }+noPerStateTypeSigsOpt opts = opts { noPerStateTypeSigs = True }+noEagerBlackholingOpt opts = opts { noEagerBlackholing = True }+noPerRuleCostCentresOpt opts = opts { noPerRuleCostCentres = True }+noPerVisitCostCentresOpt opts = opts { noPerVisitCostCentres = True }+helpInliningOpt opts = opts { helpInlining = True }+noInlinePragmasOpt opts = opts { noInlinePragmas = True }+aggressiveInlinePragmasOpt opts = opts { aggressiveInlinePragmas = True }+lateHigherOrderBindingOpt opts = opts { lateHigherOrderBinding = True }+monadicWrappersOpt opts = opts { monadicWrappers = True }+referenceOpt opts = opts { reference = True }++noGroupOpt att opts = opts{noGroup = extract att ++ noGroup opts}+ where extract s = case dropWhile isSeparator s of+ "" -> []+ s' -> w : extract s''+ where (w, s'') =+ break isSeparator s'+ isSeparator x = x == ':'+noGroupOptGet opts nm = if null (noGroup opts)+ then []+ else [nm, intercalate ":" (noGroup opts)]++extendsOpt m opts = opts{extends = Just m }++genAttrListOpt opts = opts { genAttributeList = True }+forceIrrefutableOpt mbNm opts = opts { forceIrrefutables = mbNm }+uniqueDispenserOpt nm opts = opts { uniqueDispenser = nm }+lcKeywordsOpt opts = opts { lcKeywords = True }+doubleColonsOpt opts = opts { doubleColons = True }+haskellSyntaxOpt = lcKeywordsOpt . doubleColonsOpt . genLinePragmasOpt+monadicOpt opts = opts { monadic = True }+parallelOpt opts = opts { parallelInvoke = True }+ocamlOpt opts = opts { ocaml = True }+visitorsOutputOpt opts = opts { visitorsOutput = True }+statisticsOpt nm opts = opts { statsFile = Just nm }+breadthfirstOpt opts = opts { breadthFirst = True }+breadthfirstStrictOpt opts = opts { breadthFirstStrict = True }+parseHsRhsOpt opts = opts { checkParseRhs = True }+parseHsTpOpt opts = opts { checkParseTy = True }+parseHsBlockOpt opts = opts { checkParseBlock = True }+parseHsOpt = parseHsRhsOpt . parseHsTpOpt . parseHsBlockOpt+kennedyWarrenOpt opts = opts { kennedyWarren = True }+noOptimizeOpt opts = opts { noOptimizations = True }+nocatasOpt str opts = opts { nocatas = set `Set.union` nocatas opts } where+ set = Set.fromList ids+ ids = map identifier lst+ lst = split str++ split str | null p = []+ | otherwise = p : split ps+ where (p,ps) = break (== ',') str+nocatasOptGet opts nm = if Set.null (nocatas opts)+ then []+ else [nm, intercalate "," . map getName . Set.toList . nocatas $ opts]++outputOpt file opts = opts{outputFiles = file : outputFiles opts}+outputOptGet opts nm = concat [ [nm, file] | file <- outputFiles opts]+searchPathOpt path opts = opts{searchPath = extract path ++ searchPath opts}+ where extract xs = let (p,ps) = break (\x -> x == ';' || x == ':') xs+ in if null p then [] else p : extract ps+searchPathOptGet opts nm = if null (searchPath opts)+ then []+ else [nm, intercalate ":" (searchPath opts)]+allOpt = moduleOpt Nothing . dataOpt . cataOpt . semfunsOpt . signaturesOpt . prettyOpt . renameOpt . dataRecOpt+optimizeOpt = visitOpt . casesOpt++condDisableOptimizations opts+ | noOptimizations opts =+ opts { strictData = False+ , strictWrap = False+ , withSeq = False+ , unbox = False+ , bangpats = False+ , cases = False+ , strictCases = False+ , stricterCases = False+ , strictSems = False+ , localCps = False+ , splitSems = False+ , breadthFirstStrict = False+ }+ | otherwise = opts+ +-- | Use all parsed options to generate real options+constructOptions :: [Options -> Options] -> Options+constructOptions = foldl (flip ($)) noOptions++-- | Create Options type from string arguments+getOptions :: [String] -> (Options,[String],[String])+getOptions args = let (flags,files,errors) = getOpt Permute options args+ appliedOpts = constructOptions flags+ finOpts = condDisableOptimizations appliedOpts+ in (finOpts,files,errors)++-- | Convert options back to commandline string+optionsToString :: Options -> [String]+optionsToString opt = concatMap (serializeOption opt) allOptions++-- | Combine 2 sets of options+combineOptions :: Options -> Options -> Options+combineOptions o1 o2 = let str1 = optionsToString o1+ str2 = optionsToString o2+ (opt,_,_) = getOptions (str1 ++ str2)+ in opt
src/Ag.hs view
@@ -1,9 +1,9 @@-module Main where+module Ag (uuagcLib, uuagcExe) where import System.Environment (getArgs, getProgName) import System.Exit (exitFailure) import System.Console.GetOpt (usageInfo)-import Data.List (isSuffixOf,nub)+import Data.List (isSuffixOf,nub,partition) import Control.Monad (zipWithM_) import Data.Maybe import System.FilePath@@ -44,9 +44,28 @@ import CommonTypes import ATermWrite +-- Library version+import System.Exit (ExitCode(..)) -main :: IO ()-main+uuagcLib :: [String] -> FilePath -> IO (ExitCode, [FilePath])+uuagcLib args file+ = do let (flags,_,errs) = getOptions args+ if showVersion flags || showHelp flags+ then do putStrLn "Cannot display help or version in library mode."+ return (ExitFailure 1, [])+ else if (not.null) errs+ then do putStrLn "One or more errors occured:"+ mapM_ putStrLn errs+ return (ExitFailure 2, [])+ else if genFileDeps flags+ then do deps <- getDeps flags [file]+ return (ExitSuccess, deps)+ else do compile flags file (head $ outputFiles flags++repeat "")+ return (ExitSuccess, [])++-- Executable version+uuagcExe :: IO ()+uuagcExe = do args <- getArgs progName <- getProgName @@ -112,7 +131,7 @@ errorList = if null parseErrorList then mainErrors- ++ if null mainErrors || null (filter (PrErr.isError flags') mainErrors)+ ++ if null (filter (PrErr.isError flags') mainErrors) then furtherErrors else [] else [head parseErrorList]@@ -193,7 +212,7 @@ then putStr $ "\nPlus " ++ show additionalWarnings ++ " more warning" ++ pluralS additionalWarnings ++ ".\n" else return () - if not (null fatalErrorList)+ if not (null errorsToStopOn) -- note: this may already run quite a part of the compilation... then exitFailure else do@@ -331,8 +350,8 @@ Other ms -> ms errorsToFront :: Options -> [Error] -> [Error]-errorsToFront flags mesgs = filter (PrErr.isError flags) mesgs ++ filter (not.(PrErr.isError flags)) mesgs-+errorsToFront flags mesgs = errs ++ warnings+ where (errs,warnings) = partition (PrErr.isError flags) mesgs moduleHeader :: Options -> String -> String moduleHeader flags input@@ -382,12 +401,17 @@ reportDeps :: Options -> [String] -> IO () reportDeps flags files+ = do deps <- getDeps flags files+ mapM_ putStrLn deps++getDeps :: Options -> [String] -> IO [String]+getDeps flags files = do results <- mapM (depsAG flags (searchPath flags)) files let (fs, mesgs) = foldr combine ([],[]) results 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, PrErr.dups_Inh_Errors = []} if null errs- then mapM_ putStrLn fs+ then return fs else do putStr . formatErrors $ PrErr.pp_Syn_Errors ppErrs exitFailure where
src/CommonTypes.hs view
@@ -1,6 +1,7 @@-module CommonTypes where+module CommonTypes (module Options, module CommonTypes) where import Pretty+import Options import UU.Scanner.Position(Pos,noPos) import qualified Data.Map as Map import Data.Map(Map)@@ -18,17 +19,6 @@ | BlockOther deriving (Eq, Ord, Show) -data Identifier = Ident { getName::String, getPos::Pos }--instance Eq Identifier where- Ident x _ == Ident y _ = x == y--instance Ord Identifier where- compare (Ident x _) (Ident y _) = compare x y--instance Show Identifier where- show ident = getName ident- instance PP Identifier where pp = text . getName @@ -73,7 +63,6 @@ type ContextMap = Map NontermIdent ClassContext type QuantMap = Map NontermIdent [String] type Strings = [String]-type NontermIdent = Identifier type ConstructorIdent = Identifier type AttrOrderMap = Map NontermIdent (Map ConstructorIdent (Set Dependency)) type VisitIdentifier = Int@@ -88,7 +77,6 @@ , [(Identifier,Identifier)] ) -identifier x = Ident x noPos nullIdent = identifier "" _LHS = identifier "lhs" _SELF = identifier "SELF"
− src/Options.hs
@@ -1,402 +0,0 @@-module Options where--import System.Console.GetOpt-import CommonTypes-import Data.Set(Set)-import qualified Data.Set as Set--options :: [OptDescr (Options -> Options)]-options = [ Option ['m'] [] (NoArg (moduleOpt Nothing)) "generate default module header"- , Option [] ["module"] (OptArg moduleOpt "name") "generate module header, specify module name"- , Option ['d'] ["data"] (NoArg dataOpt) "generate data type definition"- , Option [] ["datarecords"] (NoArg dataRecOpt) "generate record data types"- , Option [] ["strictdata"] (NoArg strictDataOpt) "generate strict data fields (when data is generated)"- , Option [] ["strictwrap"] (NoArg strictWrapOpt) "generate strict wrap fields for WRAPPER generated data"- , Option ['c'] ["catas"] (NoArg cataOpt) "generate catamorphisms"- , Option ['f'] ["semfuns"] (NoArg semfunsOpt) "generate semantic functions"- , Option ['s'] ["signatures"] (NoArg signaturesOpt) "generate signatures for semantic functions"- , Option [] ["newtypes"] (NoArg newtypesOpt) "use newtypes instead of type synonyms"- , Option ['p'] ["pretty"] (NoArg prettyOpt) "generate pretty printed list of attributes"- , Option ['w'] ["wrappers"] (NoArg wrappersOpt) "generate wappers for semantic domains"- , Option ['r'] ["rename"] (NoArg renameOpt) "rename data constructors"- , Option [] ["modcopy"] (NoArg modcopyOpt) "use modified copy rule"- , Option [] ["nest"] (NoArg nestOpt) "use nested tuples"- , Option [] ["syntaxmacro"] (NoArg smacroOpt) "experimental: generate syntax macro code (using knit catas)"- , Option ['o'] ["output"] (ReqArg outputOpt "file") "specify output file"- , Option ['v'] ["verbose"] (NoArg verboseOpt) "verbose error message format"- , Option ['h','?'] ["help"] (NoArg helpOpt) "get (this) usage information"- , Option ['a'] ["all"] (NoArg allOpt) ("do everything (-" ++ allc ++ ")")- , Option ['P'] [""] (ReqArg searchPathOpt "search path") ("specify seach path")- , Option [] ["prefix"] (ReqArg prefixOpt "prefix") "set prefix for semantic functions"- , Option [] ["self"] (NoArg selfOpt) "generate self attribute"- , Option [] ["cycle"] (NoArg cycleOpt) "check for cyclic definitions"- , Option [] ["version"] (NoArg versionOpt) "get version information"- , Option ['O'] ["optimize"] (NoArg optimizeOpt) "optimize generated code (--visit --case)"- , Option [] ["visit"] (NoArg visitOpt) "try generating visit functions"- , Option [] ["seq"] (NoArg seqOpt) "force evaluation using function seq (visit functions only)"- , Option [] ["unbox"] (NoArg unboxOpt) "use unboxed tuples"- , Option [] ["bangpats"] (NoArg bangpatsOpt) "use bang patterns (visit functions only)"- , Option [] ["case"] (NoArg casesOpt) "Use nested cases instead of let (visit functions only)"- , Option [] ["strictcase"] (NoArg strictCasesOpt) "Force evaluation of the scrutinee of cases (in generated code, visit functions only)"- , Option [] ["strictercase"] (NoArg stricterCasesOpt) "Force evaluation of all variables bound by a case statement (in generated code)"- , Option [] ["strictsem"] (NoArg strictSemOpt) "Force evaluation of sem-function arguments (in generated code)"- , Option [] ["localcps"] (NoArg localCpsOpt) "Apply a local CPS transformation (in generated code, visit functions only)"- , Option [] ["splitsems"] (NoArg splitSemsOpt) "Split semantic functions into smaller pieces"- , Option [] ["Werrors"] (NoArg werrorsOpt) "Turn warnings into fatal errors"- , Option [] ["Wignore"] (NoArg wignoreOpt) "Ignore warnings"- , Option [] ["Wmax"] (ReqArg wmaxErrsOpt "<max errs reported>") "Sets the maximum number of errors that are reported"- , Option [] ["dumpgrammar"] (NoArg dumpgrammarOpt) "Dump internal grammar representation (in generated code)"- , Option [] ["dumpcgrammar"] (NoArg dumpcgrammarOpt) "Dump internal cgrammar representation (in generated code)"- , Option [] ["gentraces"] (NoArg genTracesOpt) "Generate trace expressions (in generated code)"- , Option [] ["genusetraces"] (NoArg genUseTracesOpt) "Generate trace expressions at attribute use sites (in generated code)"- , Option [] ["gencostcentres"] (NoArg genCostCentresOpt) "Generate cost centre pragmas (in generated code)"- , Option [] ["genlinepragmas"] (NoArg genLinePragmasOpt) "Generate GHC LINE pragmas (in generated code)"- , Option [] ["sepsemmods"] (NoArg sepSemModsOpt) "Generate separate modules for semantic functions (in generated code)"- , Option ['M'] ["genfiledeps"] (NoArg genFileDepsOpt) "Generate a list of dependencies on the input AG files"- , Option [] ["genvisage"] (NoArg genVisageOpt) "Generate output for the AG visualizer Visage"- , Option [] ["aspectag"] (NoArg genAspectAGOpt) "Generate AspectAG file"- , Option [] ["nogroup"] (ReqArg noGroupOpt "attributes") "specify the attributes that won't be grouped in AspectAG"- , Option [] ["extends"] (ReqArg extendsOpt "module") "specify a module to be extended"- , Option [] ["genattrlist"] (NoArg genAttrListOpt) "Generate a list of all explicitly defined attributes (outside irrefutable patterns)"- , Option [] ["forceirrefutable"] (OptArg forceIrrefutableOpt "file") "Force a set of explicitly defined attributes to be irrefutable, specify file containing the attribute set"- , Option [] ["uniquedispenser"] (ReqArg uniqueDispenserOpt "name") "The Haskell function to call in the generated code"- , Option [] ["lckeywords"] (NoArg lcKeywordsOpt) "Use lowercase keywords (sem, attr) instead of the uppercase ones (SEM, ATTR)"- , Option [] ["doublecolons"] (NoArg doubleColonsOpt) "Use double colons for type signatures instead of single colons"- , Option ['H'] ["haskellsyntax"] (NoArg haskellSyntaxOpt) "Use Haskell like syntax (equivalent to --lckeywords and --doublecolons --genlinepragmas)"- , Option [] ["monadic"] (NoArg monadicOpt) "Experimental: generate monadic code"- , Option [] ["ocaml"] (NoArg ocamlOpt) "Experimental: generate Ocaml code"- , Option [] ["breadthfirst"] (NoArg breadthfirstOpt) "Experimental: generate breadth-first code"- , Option [] ["breadthfirst-strict"] (NoArg breadthfirstStrictOpt) "Experimental: outermost breadth-first evaluator is strict instead of lazy"- , Option [] ["visitcode"] (NoArg visitorsOutputOpt) "Experimental: generate visitors code"- , Option [] ["kennedywarren"] (NoArg kennedyWarrenOpt) "Experimental: use Kennedy-Warren's algorithm for ordering"- , Option [] ["statistics"] (ReqArg statisticsOpt "FILE to append to") "Append statistics to FILE"- , Option [] ["checkParseRhs"] (NoArg parseHsRhsOpt) "Parse RHS of rules with Haskell parser"- , Option [] ["checkParseTys"] (NoArg parseHsTpOpt) "Parse types of attrs with Haskell parser"- , Option [] ["checkParseBlocks"] (NoArg parseHsBlockOpt) "Parse blocks with Haskell parser"- , Option [] ["checkParseHaskell"] (NoArg parseHsOpt) "Parse Haskell code (recognizer)"- , Option [] ["nocatas"] (ReqArg nocatasOpt "list of nonterms") "Nonterminals not to generate catas for"- , Option [] ["nooptimize"] (NoArg noOptimizeOpt) "Disable optimizations"- , Option [] ["parallel"] (NoArg parallelOpt) "Generate a parallel evaluator (if possible)"- , Option [] ["monadicwrapper"] (NoArg monadicWrappersOpt) "Generate monadic wrappers"-- , Option [] ["helpinlining"] (NoArg helpInliningOpt) "Generate inline directives for GHC"- , Option [] ["dummytokenvisit"] (NoArg dummyTokenVisitOpt) "Add an additional dummy parameter to visit functions"- , Option [] ["tupleasdummytoken"] (NoArg tupleAsDummyTokenOpt) "Use conventional tuples as dummy parameter instead of a RealWorld state token"- , Option [] ["stateasdummytoken"] (NoArg stateAsDummyTokenOpt) "Use RealWorld state token as dummy parameter instead of conventional tuples (default)"- , Option [] ["strictdummytoken"] (NoArg strictDummyTokenOpt) "Strictify the dummy token that makes states and rules functions"- , Option [] ["noperruletypesigs"] (NoArg noPerRuleTypeSigsOpt) "Do not generate type sigs for attrs passed to rules"- , Option [] ["noperstatetypesigs"] (NoArg noPerStateTypeSigsOpt) "Do not generate type sigs for attrs saved in node states"- , Option [] ["noeagerblackholing"] (NoArg noEagerBlackholingOpt) "Do not automatically add the eager blackholing feature for parallel programs"- , Option [] ["noperrulecostcentres"] (NoArg noPerRuleCostCentresOpt) "Do not generate cost centres for rules"- , Option [] ["nopervisitcostcentres"] (NoArg noPerVisitCostCentresOpt) "Do not generate cost centres for visits"- , Option [] ["noinlinepragmas"] (NoArg noInlinePragmasOpt) "Definitely not generate inline directives"- , Option [] ["aggressiveinlinepragmas"] (NoArg aggressiveInlinePragmasOpt) "Generate more aggressive inline directives"- , Option [] ["latehigherorderbinding"] (NoArg lateHigherOrderBindingOpt) "Generate an attribute and wrapper for late binding of higher-order attributes"- ]--allc = "dcfsprm"--data Options = Options{ moduleName :: ModuleHeader- , dataTypes :: Bool- , dataRecords :: Bool- , strictData :: Bool- , strictWrap :: Bool- , folds :: Bool- , semfuns :: Bool- , typeSigs :: Bool- , attrInfo :: Bool- , rename :: Bool- , wrappers :: Bool- , modcopy :: Bool- , newtypes :: Bool- , nest :: Bool- , smacro :: Bool- , outputFiles :: [String]- , searchPath :: [String]- , verbose :: Bool- , prefix :: String- , withSelf :: Bool- , withCycle :: Bool- , showHelp :: Bool- , showVersion :: Bool- , visit :: Bool- , withSeq :: Bool- , unbox :: Bool- , bangpats :: Bool- , cases :: Bool- , strictCases :: Bool- , stricterCases :: Bool- , strictSems :: Bool- , localCps :: Bool- , splitSems :: Bool- , werrors :: Bool- , wignore :: Bool- , wmaxerrs :: Int- , dumpgrammar :: Bool- , dumpcgrammar :: Bool- , sepSemMods :: Bool- , genFileDeps :: Bool- , genLinePragmas :: Bool- , genvisage :: Bool- , genAspectAG :: Bool- , noGroup :: [String]- , extends :: Maybe String- , genAttributeList :: Bool- , forceIrrefutables :: Maybe String- , uniqueDispenser :: String- , lcKeywords :: Bool- , doubleColons :: Bool- , monadic :: Bool- , ocaml :: Bool- , visitorsOutput :: Bool- , statsFile :: Maybe String- , breadthFirst :: Bool- , breadthFirstStrict :: Bool- , checkParseRhs :: Bool- , checkParseTy :: Bool- , checkParseBlock :: Bool- , nocatas :: Set NontermIdent-- , noOptimizations :: Bool-- -- KW code path- , kennedyWarren :: Bool- , parallelInvoke :: Bool- , tupleAsDummyToken :: Bool -- use the empty tuple as dummy token instead of State# RealWorld (Lambda State Hack GHC?)- , dummyTokenVisit :: Bool -- add a dummy argument/pass dummy extra token to visits (should not really have an effect ... Lambda State Hack GHC?)- , strictDummyToken :: Bool -- make the dummy token strict (to prevent its removal -- should not really have an effect)- , noPerRuleTypeSigs :: Bool -- do not print type signatures for attributes of rules- , noPerStateTypeSigs :: Bool -- do not print type signatures for attributes contained in the state- , noEagerBlackholing :: Bool -- disable the use of eager black holing in the parallel evaluator code- , lateHigherOrderBinding :: Bool -- generate code to allow late binding of higher-order children semantics- , monadicWrappers :: Bool-- -- tracing- , genTraces :: Bool- , genUseTraces :: Bool- , genCostCentres :: Bool- , noPerRuleCostCentres :: Bool- , noPerVisitCostCentres :: Bool-- -- inline pragma generation- , helpInlining :: Bool- , noInlinePragmas :: Bool- , aggressiveInlinePragmas :: Bool- } deriving Show-noOptions = Options { moduleName = NoName- , dataTypes = False- , dataRecords = False- , strictData = False- , strictWrap = False- , folds = False- , semfuns = False- , typeSigs = False- , attrInfo = False- , rename = False- , wrappers = False- , modcopy = False- , newtypes = False- , nest = False- , smacro = False- , outputFiles = []- , searchPath = []- , verbose = False- , showHelp = False- , showVersion = False- , prefix = "sem_"- , withSelf = False- , withCycle = False- , visit = False- , withSeq = False- , unbox = False- , bangpats = False- , cases = False- , strictCases = False- , stricterCases = False- , strictSems = False- , localCps = False- , splitSems = False- , werrors = False- , wignore = False- , wmaxerrs = 99999- , dumpgrammar = False- , dumpcgrammar = False- , sepSemMods = False- , genFileDeps = False- , genLinePragmas = False- , genvisage = False- , genAspectAG = False- , noGroup = []- , extends = Nothing- , genAttributeList = False- , forceIrrefutables = Nothing- , uniqueDispenser = "nextUnique"- , lcKeywords = False- , doubleColons = False- , monadic = False- , ocaml = False- , visitorsOutput = False- , statsFile = Nothing- , breadthFirst = False- , breadthFirstStrict = False- , checkParseRhs = False- , checkParseTy = False- , checkParseBlock = False- , nocatas = Set.empty- , noOptimizations = False-- -- defaults for the KW-code path- , kennedyWarren = False- , parallelInvoke = False- , tupleAsDummyToken = True- , dummyTokenVisit = False- , strictDummyToken = False- , noPerRuleTypeSigs = False- , noPerStateTypeSigs = False- , noEagerBlackholing = False- , lateHigherOrderBinding = False- , monadicWrappers = False-- -- defaults for tracing- , genTraces = False- , genUseTraces = False- , genCostCentres = False- , noPerRuleCostCentres = False- , noPerVisitCostCentres = False-- -- defaults for inline pragma generation- , helpInlining = False- , noInlinePragmas = False- , aggressiveInlinePragmas = False- }--moduleOpt nm opts = opts{moduleName = maybe Default Name nm}-dataOpt opts = opts{dataTypes = True}-dataRecOpt opts = opts{dataRecords = True}-strictDataOpt opts = opts{strictData = True}-strictWrapOpt opts = opts{strictWrap = True}-cataOpt opts = opts{folds = True}-semfunsOpt opts = opts{semfuns = True}-signaturesOpt opts = opts{typeSigs = True}-prettyOpt opts = opts{attrInfo = True}-renameOpt opts = opts{rename = True}-wrappersOpt opts = opts{wrappers = True}-modcopyOpt opts = opts{modcopy = True}-newtypesOpt opts = opts{newtypes = True}-nestOpt opts = opts{nest = True}-smacroOpt opts = opts{smacro = True}-verboseOpt opts = opts{verbose = True}-helpOpt opts = opts{showHelp = True}-versionOpt opts = opts{showVersion = True}-prefixOpt pre opts = opts{prefix = pre }-selfOpt opts = opts{withSelf = True}-cycleOpt opts = opts{withCycle = True}-visitOpt opts = opts{visit = True, withCycle = True}-seqOpt opts = opts{withSeq = True}-unboxOpt opts = opts{unbox = True}-bangpatsOpt opts = opts{bangpats = True}-casesOpt opts = opts{cases = True}-strictCasesOpt opts = opts{strictCases = True}-stricterCasesOpt opts = opts{strictCases = True, stricterCases = True}-strictSemOpt opts = opts{strictSems = True}-localCpsOpt opts = opts{localCps = True}-splitSemsOpt opts = opts{splitSems = True}-werrorsOpt opts = opts{werrors = True}-wignoreOpt opts = opts{wignore = True}-wmaxErrsOpt n opts = opts{wmaxerrs = read n}-dumpgrammarOpt opts = opts{dumpgrammar = True}-dumpcgrammarOpt opts = opts{dumpcgrammar = True}-genTracesOpt opts = opts{genTraces = True}-genUseTracesOpt opts = opts{genUseTraces = True}-genCostCentresOpt opts = opts{genCostCentres = True}-sepSemModsOpt opts = opts{sepSemMods = True}-genFileDepsOpt opts = opts{genFileDeps = True}-genLinePragmasOpt opts = opts{genLinePragmas = True}-genVisageOpt opts = opts{genvisage = True }-genAspectAGOpt opts = opts{genAspectAG = True}--dummyTokenVisitOpt opts = opts { dummyTokenVisit = True }-tupleAsDummyTokenOpt opts = opts { tupleAsDummyToken = True }-stateAsDummyTokenOpt opts = opts { tupleAsDummyToken = False }-strictDummyTokenOpt opts = opts { strictDummyToken = True }-noPerRuleTypeSigsOpt opts = opts { noPerRuleTypeSigs = True }-noPerStateTypeSigsOpt opts = opts { noPerStateTypeSigs = True }-noEagerBlackholingOpt opts = opts { noEagerBlackholing = True }-noPerRuleCostCentresOpt opts = opts { noPerRuleCostCentres = True }-noPerVisitCostCentresOpt opts = opts { noPerVisitCostCentres = True }-helpInliningOpt opts = opts { helpInlining = True }-noInlinePragmasOpt opts = opts { noInlinePragmas = True }-aggressiveInlinePragmasOpt opts = opts { aggressiveInlinePragmas = True }-lateHigherOrderBindingOpt opts = opts { lateHigherOrderBinding = True }-monadicWrappersOpt opts = opts { monadicWrappers = True }--noGroupOpt att opts = opts{noGroup = extract att ++ noGroup opts}- where extract s = case dropWhile isSeparator s of- "" -> []- s' -> w : extract s''- where (w, s'') =- break isSeparator s'- isSeparator x = x == ':'--extendsOpt m opts = opts{extends = Just m }--genAttrListOpt opts = opts { genAttributeList = True }-forceIrrefutableOpt mbNm opts = opts { forceIrrefutables = mbNm }-uniqueDispenserOpt nm opts = opts { uniqueDispenser = nm }-lcKeywordsOpt opts = opts { lcKeywords = True }-doubleColonsOpt opts = opts { doubleColons = True }-haskellSyntaxOpt = lcKeywordsOpt . doubleColonsOpt . genLinePragmasOpt-monadicOpt opts = opts { monadic = True }-parallelOpt opts = opts { parallelInvoke = True }-ocamlOpt opts = opts { ocaml = True }-visitorsOutputOpt opts = opts { visitorsOutput = True }-statisticsOpt nm opts = opts { statsFile = Just nm }-breadthfirstOpt opts = opts { breadthFirst = True }-breadthfirstStrictOpt opts = opts { breadthFirstStrict = True }-parseHsRhsOpt opts = opts { checkParseRhs = True }-parseHsTpOpt opts = opts { checkParseTy = True }-parseHsBlockOpt opts = opts { checkParseBlock = True }-parseHsOpt = parseHsRhsOpt . parseHsTpOpt . parseHsBlockOpt-kennedyWarrenOpt opts = opts { kennedyWarren = True }-noOptimizeOpt opts = opts { noOptimizations = True }-nocatasOpt str opts = opts { nocatas = set `Set.union` nocatas opts } where- set = Set.fromList ids- ids = map identifier lst- lst = split str-- split str | null p = []- | otherwise = p : split ps- where (p,ps) = break (== ',') str--outputOpt file opts = opts{outputFiles = file : outputFiles opts}-searchPathOpt path opts = opts{searchPath = extract path ++ searchPath opts}- where extract xs = let (p,ps) = break (\x -> x == ';' || x == ':') xs- in if null p then [] else p : extract ps-allOpt = moduleOpt Nothing . dataOpt . cataOpt . semfunsOpt . signaturesOpt . prettyOpt . renameOpt . dataRecOpt-optimizeOpt = visitOpt . casesOpt--condDisableOptimizations opts- | noOptimizations opts =- opts { strictData = False- , strictWrap = False- , withSeq = False- , unbox = False- , bangpats = False- , cases = False- , strictCases = False- , stricterCases = False- , strictSems = False- , localCps = False- , splitSems = False- , breadthFirstStrict = False- }- | otherwise = opts--getOptions args = let (flags,files,errors) = getOpt Permute options args- appliedOpts = foldl (flip ($)) noOptions flags- finOpts = condDisableOptimizations appliedOpts- in (finOpts,files,errors)--data ModuleHeader = NoName- | Name String- | Default deriving Show
src/Scanner.hs view
@@ -10,7 +10,7 @@ import Data.List import Data.Char import UU.Scanner.GenToken -import Options +import Options (Options (..)) data Input = Input !Pos String (Maybe (Token, Input))
+ src/UU/UUAGC/Bootstrap.hs view
@@ -0,0 +1,11 @@+module UU.UUAGC.Bootstrap (uuagcBootstrap, uuagcBootstrapMain) where++import Ag (uuagcLib, uuagcExe)++import System.Exit (ExitCode(..))++uuagcBootstrap :: [String] -> FilePath -> IO (ExitCode, [FilePath])+uuagcBootstrap = uuagcLib++uuagcBootstrapMain :: IO ()+uuagcBootstrapMain = uuagcExe
uuagc-bootstrap.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.8 build-type: Simple name: uuagc-bootstrap-version: 0.9.39.3.0+version: 0.9.40.1 license: BSD3 license-file: LICENSE maintainer: Arie Middelkoop <ariem@cs.uu.nl>@@ -17,13 +17,22 @@ extra-source-files: README executable uuagc-bootstrap- build-depends: base >= 4, base < 5, ghc-prim >= 0.2.0.0- build-depends: containers >= 0.3, directory >= 1.0.1.1, array >= 0.3.0.1- build-depends: uulib >= 0.9.14, mtl >= 1.1.1.1- build-depends: haskell-src-exts >= 1.11.1- build-depends: filepath >= 1.1.0.4- main-is: Ag.hs- other-modules: Ag+ build-depends: uuagc-bootstrap == 0.9.40.1+ build-depends: base >= 4, base < 5+ main-is: Main.hs+ hs-source-dirs: src-main++library+ build-depends: base >= 4, base < 5, ghc-prim >= 0.2.0.0+ build-depends: containers >= 0.3, directory >= 1.0.1.1, array >= 0.3.0.1+ build-depends: uulib >= 0.9.14, mtl >= 1.1.1.1+ build-depends: haskell-src-exts >= 1.11.1+ build-depends: filepath >= 1.1.0.4+ hs-source-dirs: src, src-version, src-derived, src-options+ exposed-modules: UU.UUAGC.Bootstrap, UU.UUAGC.BootstrapVersion+ extensions: TypeSynonymInstances, MultiParamTypeClasses+ other-modules: Paths_uuagc_bootstrap+ , Ag , CommonTypes , GrammarInfo , HsTokenScanner@@ -74,11 +83,3 @@ , KWOrder , ExecutionPlan , ExecutionPlan2Hs- extensions: TypeSynonymInstances, MultiParamTypeClasses- hs-source-dirs: src, src-version, src-derived--library- build-depends: base >= 4, base < 5- hs-source-dirs: src- other-modules: Paths_uuagc_bootstrap- exposed-modules: UU.UUAGC.BootstrapVersion