{-# LANGUAGE Rank2Types, GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
module ExecutionPlan2Clean where
{-# LINE 2 "src-ag/HsToken.ag" #-}
import CommonTypes
import UU.Scanner.Position(Pos)
{-# LINE 10 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 2 "src-ag/Expression.ag" #-}
import UU.Scanner.Position(Pos)
import HsToken
{-# LINE 16 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 2 "src-ag/Patterns.ag" #-}
import UU.Scanner.Position(Pos)
import CommonTypes (ConstructorIdent,Identifier)
{-# LINE 23 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 2 "src-ag/ExecutionPlan.ag" #-}
import Patterns (Pattern(..),Patterns)
import Expression (Expression(..))
import CommonTypes
import ErrorMessages
import qualified Data.Set as Set
import Data.Set(Set)
import qualified Data.Map as Map
import Data.Map(Map)
{-# LINE 37 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 7 "src-ag/ExecutionPlan2Clean.ag" #-}
import ExecutionPlan
import Pretty
import PPUtil
import Options
import Data.Monoid(mappend,mempty)
import Data.Maybe
import Debug.Trace
import System.IO
import System.Directory
import System.FilePath
import UU.Scanner.Position
import TokenDef
import HsToken
import ErrorMessages
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Sequence(Seq)
import qualified Data.Sequence as Seq
import Data.Foldable(toList)
{-# LINE 64 "src-generated/ExecutionPlan2Clean.hs" #-}
import Control.Monad.Identity (Identity)
import qualified Control.Monad.Identity
{-# LINE 190 "src-ag/ExecutionPlan2Clean.ag" #-}
classCtxsToDocs :: ClassContext -> [PP_Doc]
classCtxsToDocs = map toDoc where
toDoc (ident,args) = (ident >#< ppSpaced (map pp_parens args))
classConstrsToDocs :: [Type] -> [PP_Doc]
classConstrsToDocs = map ppTp
ppClasses :: [PP_Doc] -> PP_Doc
ppClasses [] = empty
ppClasses xs = "|" >#< pp_block "" "" "&" xs
ppQuants :: [Identifier] -> PP_Doc
ppQuants [] = empty
ppQuants ps = "E." >#< ppSpaced ps >#< ":"
{-# LINE 83 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 227 "src-ag/ExecutionPlan2Clean.ag" #-}
ppConFields :: Bool -> [PP_Doc] -> PP_Doc
ppConFields True flds = ppListSep "{" "}" ", " flds
ppConFields False flds = ppSpaced flds
{-# LINE 91 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 260 "src-ag/ExecutionPlan2Clean.ag" #-}
ppTp :: Type -> PP_Doc
ppTp = text . typeToHaskellString Nothing []
{-# LINE 97 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 333 "src-ag/ExecutionPlan2Clean.ag" #-}
isRecordConstructor :: NontermIdent -> Map NontermIdent ConstructorType -> Bool
isRecordConstructor nt ctm = Map.lookup nt ctm == Just RecordConstructor
{-# LINE 103 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 374 "src-ag/ExecutionPlan2Clean.ag" #-}
type VisitStateState = (VisitIdentifier,StateIdentifier, StateIdentifier)
{-# LINE 107 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 483 "src-ag/ExecutionPlan2Clean.ag" #-}
conNmTVisit nt vId = "T_" >|< nt >|< "_v" >|< vId
conNmTVisitIn nt vId = "T_" >|< nt >|< "_vIn" >|< vId
conNmTVisitOut nt vId = "T_" >|< nt >|< "_vOut" >|< vId
conNmTNextVisit nt stId = "T_" >|< nt >|< "_s" >|< stId
ppMonadType :: Options -> PP_Doc
ppMonadType opts
| parallelInvoke opts = text "IO"
| otherwise = text "Identity"
{-# LINE 120 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 652 "src-ag/ExecutionPlan2Clean.ag" #-}
ppDefor :: Type -> PP_Doc
ppDefor (NT nt args _) = "T_" >|< nt >#< ppSpaced (map pp_parens args)
ppDefor (Haskell s) = text s
{-# LINE 127 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 756 "src-ag/ExecutionPlan2Clean.ag" #-}
mklet :: (PP a, PP b, PP c) => a -> b -> c -> PP_Doc
mklet prefix defs body =
prefix
>-< indent (length (show prefix))
("let"
>-< indent 4 defs
>-< "in" >#< body)
{-# LINE 138 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 817 "src-ag/ExecutionPlan2Clean.ag" #-}
resultValName :: String
resultValName = "ag__result_"
nextStName :: String
nextStName = "ag__st_"
{-# LINE 147 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 878 "src-ag/ExecutionPlan2Clean.ag" #-}
parResultName :: String
parResultName = "__outcome_"
fmtDecl :: PP a => Bool -> FormatMode -> a -> PP_Doc
fmtDecl declPure fmt decl = case fmt of
FormatLetDecl -> pp decl
FormatLetLine -> "let" >#< decl >#< "in"
FormatDo | declPure -> "let" >#< decl >#< "in"
| otherwise -> pp decl
{-# LINE 160 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 992 "src-ag/ExecutionPlan2Clean.ag" #-}
stname :: Identifier -> Int -> String
stname child st = "st_" ++ getName child ++ "X" ++ show st
compatibleAttach :: VisitKind -> NontermIdent -> Options -> Bool
compatibleAttach _ _ _ = True
unMon :: Options -> PP_Doc
unMon options
| parallelInvoke options = text "'System.IO.Unsafe'.unsafePerformIO"
| otherwise = text "'Control.Monad.Identity'.runIdentity"
{-# LINE 175 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 1079 "src-ag/ExecutionPlan2Clean.ag" #-}
dummyPat :: Options -> Bool -> PP_Doc
dummyPat opts noArgs
| not noArgs && tupleAsDummyToken opts = empty
| tupleAsDummyToken opts = if strictDummyToken opts
then text "Void"
else text "(_)"
| otherwise = let match | strictDummyToken opts = "!_"
| otherwise = "_"
in pp_parens (match >#< "::" >#< dummyType opts noArgs)
where match | strictDummyToken opts = "(!_)"
| otherwise = "_"
dummyArg :: Options -> Bool -> PP_Doc
dummyArg opts noArgs
| not noArgs && tupleAsDummyToken opts = empty
| tupleAsDummyToken opts = text "Void"
| otherwise = text "GHC.Prim.realWorld#"
dummyType :: Options -> Bool -> PP_Doc
dummyType opts noArgs
| not noArgs && tupleAsDummyToken opts = empty
| tupleAsDummyToken opts = text "Void"
| otherwise = text "(GHC.Prim.State# GHC.Prim.RealWorld)"
{-# LINE 202 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 1105 "src-ag/ExecutionPlan2Clean.ag" #-}
ruleInlineThresholdSoft :: Int
ruleInlineThresholdSoft = 3
ruleInlineThresholdHard :: Int
ruleInlineThresholdHard = 5
reallyOftenUsedThreshold :: Int
reallyOftenUsedThreshold = 12
{-# LINE 217 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 1172 "src-ag/ExecutionPlan2Clean.ag" #-}
data NonLocalAttr
= AttrInh Identifier Identifier
| AttrSyn Identifier Identifier deriving Show
mkNonLocalAttr :: Bool -> Identifier -> Identifier -> NonLocalAttr
mkNonLocalAttr True = AttrInh
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
lookupType :: Identifier -> Identifier -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc
lookupType child name attrMp childMp
| noParameters childTp = Just ppDoc
| otherwise = Nothing
where
attrTp = Map.findWithDefault (error "lookupType: the attribute is not in the attrs of the child") name childAttrs
childAttrs = Map.findWithDefault (error "lookupType: the attributes of the nonterm are not in the map") nonterm attrMp
nonterm = extractNonterminal childTp
childTp = Map.findWithDefault (error ("lookupType: the child " ++ show child ++ "is not in the appropriate map")) child childMp
ppDoc = ppTp attrTp
noParameters :: Type -> Bool
noParameters (Haskell _) = True
noParameters (NT _ args _) = null args
{-# LINE 250 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 1259 "src-ag/ExecutionPlan2Clean.ag" #-}
compatibleKind :: VisitKind -> VisitKind -> Bool
compatibleKind _ _ = True
compatibleRule :: VisitKind -> Bool -> Bool
compatibleRule (VisitPure _) False = False
compatibleRule _ _ = True
{-# LINE 261 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 1281 "src-ag/ExecutionPlan2Clean.ag" #-}
unionWithSum = Map.unionWith (+)
{-# LINE 266 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 1304 "src-ag/ExecutionPlan2Clean.ag" #-}
uwSetUnion :: (Ord a, Ord b) => Map a (Set b) -> Map a (Set b) -> Map a (Set b)
uwSetUnion = Map.unionWith Set.union
uwMapUnion :: (Ord a, Ord b) => Map a (Map b c) -> Map a (Map b c) -> Map a (Map b c)
uwMapUnion = Map.unionWith Map.union
{-# LINE 275 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# LINE 1499 "src-ag/ExecutionPlan2Clean.ag" #-}
renderDocs :: [PP_Doc] -> String
renderDocs pps = foldr (.) id (map (\d -> (disp d 50000) . ( '\n':) ) pps) ""
writeModule :: FilePath -> [PP_Doc] -> IO ()
writeModule path docs
= do bExists <- doesFileExist path
if bExists
then do input <- readFile path
seq (length input) (return ())
if input /= output
then dumpIt
else return ()
else dumpIt
where
output = renderDocs docs
dumpIt = writeFile path output
cleanIclModuleHeader :: Options -> String -> String
cleanIclModuleHeader flags input
= case moduleName flags
of Name nm -> genMod nm
Default -> genMod (defaultModuleName input)
NoName -> ""
where genMod x = "implementation module " ++ x
cleanDclModuleHeader :: Options -> String -> Maybe String -> String
cleanDclModuleHeader flags input export
= case moduleName flags
of Name nm -> genMod nm
Default -> genMod (defaultModuleName input)
NoName -> ""
where genMod x = "definition module " ++ x ++ genExp export x
genExp Nothing _ = ""
genExp (Just e) x = "(module " ++ x ++ ", module " ++ e ++ ")"
defaultModuleName :: String -> String
defaultModuleName = dropExtension
mkIclModuleHeader :: Maybe (String,String,String) -> String -> String -> String -> Bool -> String
mkIclModuleHeader Nothing defaultName suffix _ _
= "implementation module " ++ defaultName ++ suffix
mkIclModuleHeader (Just (name, exports, imports)) _ suffix addExports replaceExports
= "implementation module " ++ name ++ suffix ++ "\n" ++ imports ++ "\n"
mkDclModuleHeader :: Maybe (String,String,String) -> String -> String -> String -> Bool -> String
mkDclModuleHeader Nothing defaultName suffix _ _
= "definition module " ++ defaultName ++ suffix
mkDclModuleHeader (Just (name, exports, _)) _ suffix addExports replaceExports
= "definition module " ++ name ++ suffix ++ ex ++ "\n"
where
ex = if null exports || (replaceExports && null addExports)
then ""
else if null addExports
then exports
else if replaceExports
then addExports
else exports ++ "," ++ addExports
{-# LINE 336 "src-generated/ExecutionPlan2Clean.hs" #-}
data Inh_EChild = Inh_EChild { Inh_EChild -> Map Identifier Int
allInitStates_Inh_EChild :: (Map NontermIdent Int), Inh_EChild -> Identifier
con_Inh_EChild :: (ConstructorIdent), Inh_EChild -> Map Identifier ConstructorType
constructorTypeMap_Inh_EChild :: (Map NontermIdent ConstructorType), :: (String -> String -> String -> Bool -> String), :: (String -> String -> String -> Bool -> String), Inh_EChild -> PP_Doc
importBlocks_Inh_EChild :: (PP_Doc), Inh_EChild -> String
mainFile_Inh_EChild :: (String), Inh_EChild -> String
mainName_Inh_EChild :: (String), Inh_EChild -> Identifier
nt_Inh_EChild :: (NontermIdent), Inh_EChild -> Options
options_Inh_EChild :: (Options), Inh_EChild -> PP_Doc
textBlocks_Inh_EChild :: (PP_Doc) }
data Syn_EChild = Syn_EChild { Syn_EChild -> PP_Doc
argnamesw_Syn_EChild :: ( PP_Doc ), Syn_EChild -> PP_Doc
argpats_Syn_EChild :: ( PP_Doc ), Syn_EChild -> PP_Doc
argtps_Syn_EChild :: ( PP_Doc ), Syn_EChild -> Attributes
childTypes_Syn_EChild :: (Map Identifier Type), Syn_EChild
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
childintros_Syn_EChild :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), Syn_EChild -> PP_Doc
datatype_Syn_EChild :: (PP_Doc), Syn_EChild -> [Identifier]
recfields_Syn_EChild :: ( [Identifier] ), Syn_EChild -> PP_Doc
recordtype_Syn_EChild :: (PP_Doc), Syn_EChild -> Set String
terminaldefs_Syn_EChild :: (Set String), Syn_EChild -> Set String
usedArgs_Syn_EChild :: (Set String) }
{-# INLINABLE wrap_EChild #-}
wrap_EChild :: T_EChild -> Inh_EChild -> (Syn_EChild )
wrap_EChild :: T_EChild -> Inh_EChild -> Syn_EChild
wrap_EChild (T_EChild Identity T_EChild_s2
act) (Inh_EChild Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks String
_lhsImainFile String
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions PP_Doc
_lhsItextBlocks) =
Identity Syn_EChild -> Syn_EChild
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_EChild_s2
sem <- Identity T_EChild_s2
act
let arg1 :: T_EChild_vIn1
arg1 = Map Identifier Int
-> Identifier
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> String
-> String
-> Identifier
-> Options
-> PP_Doc
-> T_EChild_vIn1
T_EChild_vIn1 Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks String
_lhsImainFile String
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions PP_Doc
_lhsItextBlocks
(T_EChild_vOut1 PP_Doc
_lhsOargnamesw PP_Doc
_lhsOargpats PP_Doc
_lhsOargtps Attributes
_lhsOchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros PP_Doc
_lhsOdatatype [Identifier]
_lhsOrecfields PP_Doc
_lhsOrecordtype Set String
_lhsOterminaldefs Set String
_lhsOusedArgs) <- T_EChild_vOut1 -> Identity T_EChild_vOut1
forall (m :: * -> *) a. Monad m => a -> m a
return (T_EChild_s2 -> T_EChild_v1
inv_EChild_s2 T_EChild_s2
sem T_EChild_vIn1
arg1)
Syn_EChild -> Identity Syn_EChild
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc
-> PP_Doc
-> PP_Doc
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> PP_Doc
-> [Identifier]
-> PP_Doc
-> Set String
-> Set String
-> Syn_EChild
Syn_EChild PP_Doc
_lhsOargnamesw PP_Doc
_lhsOargpats PP_Doc
_lhsOargtps Attributes
_lhsOchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros PP_Doc
_lhsOdatatype [Identifier]
_lhsOrecfields PP_Doc
_lhsOrecordtype Set String
_lhsOterminaldefs Set String
_lhsOusedArgs)
)
{-# NOINLINE sem_EChild #-}
sem_EChild :: EChild -> T_EChild
sem_EChild :: EChild -> T_EChild
sem_EChild ( EChild Identifier
name_ Type
tp_ ChildKind
kind_ Bool
hasAround_ Maybe [Identifier]
merges_ Bool
isMerged_ ) = Identifier
-> Type
-> ChildKind
-> Bool
-> Maybe [Identifier]
-> Bool
-> T_EChild
sem_EChild_EChild Identifier
name_ Type
tp_ ChildKind
kind_ Bool
hasAround_ Maybe [Identifier]
merges_ Bool
isMerged_
sem_EChild ( ETerm Identifier
name_ Type
tp_ ) = Identifier -> Type -> T_EChild
sem_EChild_ETerm Identifier
name_ Type
tp_
newtype T_EChild = T_EChild {
T_EChild -> Identity T_EChild_s2
attach_T_EChild :: Identity (T_EChild_s2 )
}
newtype T_EChild_s2 = C_EChild_s2 {
T_EChild_s2 -> T_EChild_v1
inv_EChild_s2 :: (T_EChild_v1 )
}
data T_EChild_s3 = C_EChild_s3
type T_EChild_v1 = (T_EChild_vIn1 ) -> (T_EChild_vOut1 )
data T_EChild_vIn1 = T_EChild_vIn1 (Map NontermIdent Int) (ConstructorIdent) (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (String -> String -> String -> Bool -> String) (PP_Doc) (String) (String) (NontermIdent) (Options) (PP_Doc)
data T_EChild_vOut1 = T_EChild_vOut1 ( PP_Doc ) ( PP_Doc ) ( PP_Doc ) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (PP_Doc) ( [Identifier] ) (PP_Doc) (Set String) (Set String)
{-# NOINLINE sem_EChild_EChild #-}
sem_EChild_EChild :: (Identifier) -> (Type) -> (ChildKind) -> (Bool) -> (Maybe [Identifier]) -> (Bool) -> T_EChild
sem_EChild_EChild :: Identifier
-> Type
-> ChildKind
-> Bool
-> Maybe [Identifier]
-> Bool
-> T_EChild
sem_EChild_EChild Identifier
arg_name_ Type
arg_tp_ ChildKind
arg_kind_ Bool
arg_hasAround_ Maybe [Identifier]
_ Bool
_ = Identity T_EChild_s2 -> T_EChild
T_EChild (T_EChild_s2 -> Identity T_EChild_s2
forall (m :: * -> *) a. Monad m => a -> m a
return T_EChild_s2
st2) where
{-# NOINLINE st2 #-}
st2 :: T_EChild_s2
st2 = let
v1 :: T_EChild_v1
v1 :: T_EChild_v1
v1 = \ (T_EChild_vIn1 Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks String
_lhsImainFile String
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions PP_Doc
_lhsItextBlocks) -> ( let
_lhsOusedArgs :: Set String
_lhsOusedArgs :: Set String
_lhsOusedArgs = (Set String -> Set String) -> Set String -> Set String
forall a. (a -> a) -> a -> a
rule0 Set String -> Set String
_usedArgs_augmented_f1 Set String
forall a. Set a
_usedArgs_augmented_syn
_usedArgs_augmented_f1 :: Set String -> Set String
_usedArgs_augmented_f1 = ChildKind -> Identifier -> Set String -> Set String
rule1 ChildKind
arg_kind_ Identifier
arg_name_
_tpDoc :: PP_Doc
_tpDoc = (PP_Doc -> PP_Doc) -> Type -> PP_Doc
forall t. (PP_Doc -> t) -> Type -> t
rule2 PP_Doc -> PP_Doc
_addStrict Type
arg_tp_
_strNm :: String
_strNm = Identifier -> Identifier -> Identifier -> String
rule3 Identifier
_lhsIcon Identifier
_lhsInt Identifier
arg_name_
_field :: PP_Doc
_field = Options -> String -> PP_Doc -> PP_Doc
rule4 Options
_lhsIoptions String
_strNm PP_Doc
_tpDoc
_recordfield :: PP_Doc
_recordfield = String -> PP_Doc -> PP_Doc
rule5 String
_strNm PP_Doc
_tpDoc
_addStrict :: PP_Doc -> PP_Doc
_addStrict = Options -> PP_Doc -> PP_Doc
rule6 Options
_lhsIoptions
_lhsOdatatype :: PP_Doc
_lhsOdatatype :: PP_Doc
_lhsOdatatype = PP_Doc -> ChildKind -> PP_Doc
rule7 PP_Doc
_field ChildKind
arg_kind_
_lhsOrecordtype :: PP_Doc
_lhsOrecordtype :: PP_Doc
_lhsOrecordtype = PP_Doc -> ChildKind -> PP_Doc
rule8 PP_Doc
_recordfield ChildKind
arg_kind_
_lhsOargnamesw :: PP_Doc
_lhsOargnamesw :: PP_Doc
_lhsOargnamesw = Identifier -> ChildKind -> Identifier -> PP_Doc
rule9 Identifier
_nt ChildKind
arg_kind_ Identifier
arg_name_
_lhsOargtps :: PP_Doc
_lhsOargtps :: PP_Doc
_lhsOargtps = ChildKind -> Type -> PP_Doc
rule10 ChildKind
arg_kind_ Type
arg_tp_
_argpats :: PP_Doc
_argpats = ChildKind -> Identifier -> PP_Doc
rule11 ChildKind
arg_kind_ Identifier
arg_name_
_lhsOrecfields :: [Identifier]
_lhsOrecfields :: [Identifier]
_lhsOrecfields = ChildKind -> Identifier -> [Identifier]
forall a. ChildKind -> a -> [a]
rule12 ChildKind
arg_kind_ Identifier
arg_name_
_lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros :: Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros = (VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Identifier
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
forall a k. a -> k -> Map k a
rule13 VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))
_introcode Identifier
arg_name_
_isDefor :: Bool
_isDefor = Type -> Bool
rule14 Type
arg_tp_
_valcode :: PP_Doc
_valcode = Bool -> Options -> Identifier -> ChildKind -> Identifier -> PP_Doc
rule15 Bool
_isDefor Options
_lhsIoptions Identifier
_nt ChildKind
arg_kind_ Identifier
arg_name_
_aroundcode :: PP_Doc
_aroundcode = Options -> Bool -> Identifier -> PP_Doc
rule16 Options
_lhsIoptions Bool
arg_hasAround_ Identifier
arg_name_
_introcode :: VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))
_introcode = (PP_Doc -> PP_Doc)
-> PP_Doc
-> Int
-> Bool
-> Options
-> Identifier
-> PP_Doc
-> Bool
-> ChildKind
-> Identifier
-> VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))
rule17 PP_Doc -> PP_Doc
_addbang PP_Doc
_aroundcode Int
_initSt Bool
_isDefor Options
_lhsIoptions Identifier
_nt PP_Doc
_valcode Bool
arg_hasAround_ ChildKind
arg_kind_ Identifier
arg_name_
_nt :: Identifier
_nt = Type -> Identifier
rule18 Type
arg_tp_
_addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule19 Options
_lhsIoptions
_lhsOchildTypes :: Map Identifier Type
_lhsOchildTypes :: Attributes
_lhsOchildTypes = Identifier -> Type -> Attributes
forall k a. k -> a -> Map k a
rule20 Identifier
arg_name_ Type
arg_tp_
_initSt :: Int
_initSt = Map Identifier Int -> Identifier -> Int
rule21 Map Identifier Int
_lhsIallInitStates Identifier
_nt
_lhsOterminaldefs :: Set String
_lhsOterminaldefs :: Set String
_lhsOterminaldefs = () -> Set String
forall a. () -> Set a
rule22 ()
_usedArgs_augmented_syn :: Set a
_usedArgs_augmented_syn = () -> Set a
forall a. () -> Set a
rule23 ()
_lhsOargpats :: PP_Doc
_lhsOargpats :: PP_Doc
_lhsOargpats = PP_Doc -> PP_Doc
forall a. a -> a
rule24 PP_Doc
_argpats
__result_ :: T_EChild_vOut1
__result_ = PP_Doc
-> PP_Doc
-> PP_Doc
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> PP_Doc
-> [Identifier]
-> PP_Doc
-> Set String
-> Set String
-> T_EChild_vOut1
T_EChild_vOut1 PP_Doc
_lhsOargnamesw PP_Doc
_lhsOargpats PP_Doc
_lhsOargtps Attributes
_lhsOchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros PP_Doc
_lhsOdatatype [Identifier]
_lhsOrecfields PP_Doc
_lhsOrecordtype Set String
_lhsOterminaldefs Set String
_lhsOusedArgs
in T_EChild_vOut1
__result_ )
in T_EChild_v1 -> T_EChild_s2
C_EChild_s2 T_EChild_v1
v1
{-# INLINE rule0 #-}
rule0 :: (a -> a) -> a -> a
rule0 = \ a -> a
_usedArgs_augmented_f1 a
_usedArgs_augmented_syn ->
((a -> a) -> a -> a) -> a -> [a -> a] -> a
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr (a -> a) -> a -> a
forall a b. (a -> b) -> a -> b
($) a
_usedArgs_augmented_syn [a -> a
_usedArgs_augmented_f1]
{-# INLINE rule1 #-}
rule1 :: ChildKind -> Identifier -> Set String -> Set String
rule1 = \ ChildKind
kind_ Identifier
name_ ->
\Set String
s -> case ChildKind
kind_ of
ChildKind
ChildSyntax -> String -> Set String -> Set String
forall a. Ord a => a -> Set a -> Set a
Set.insert (String
"arg_" String -> String -> String
forall a. [a] -> [a] -> [a]
++ Identifier -> String
forall a. Show a => a -> String
show Identifier
name_ String -> String -> String
forall a. [a] -> [a] -> [a]
++ String
"_") Set String
s
ChildKind
_ -> Set String
s
{-# INLINE rule2 #-}
{-# LINE 243 "src-ag/ExecutionPlan2Clean.ag" #-}
rule2 = \ _addStrict tp_ ->
{-# LINE 243 "src-ag/ExecutionPlan2Clean.ag" #-}
_addStrict $ pp_parens $ ppTp $ removeDeforested tp_
{-# LINE 426 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule3 #-}
{-# LINE 244 "src-ag/ExecutionPlan2Clean.ag" #-}
rule3 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ ->
{-# LINE 244 "src-ag/ExecutionPlan2Clean.ag" #-}
recordFieldname _lhsInt _lhsIcon name_
{-# LINE 432 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule4 #-}
{-# LINE 245 "src-ag/ExecutionPlan2Clean.ag" #-}
rule4 = \ ((_lhsIoptions) :: Options) _strNm _tpDoc ->
{-# LINE 245 "src-ag/ExecutionPlan2Clean.ag" #-}
if dataRecords _lhsIoptions
then _strNm >#< "::" >#< _tpDoc
else _tpDoc
{-# LINE 440 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule5 #-}
{-# LINE 248 "src-ag/ExecutionPlan2Clean.ag" #-}
rule5 = \ _strNm _tpDoc ->
{-# LINE 248 "src-ag/ExecutionPlan2Clean.ag" #-}
_strNm >#< "::" >#< _tpDoc
{-# LINE 446 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule6 #-}
{-# LINE 249 "src-ag/ExecutionPlan2Clean.ag" #-}
rule6 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 249 "src-ag/ExecutionPlan2Clean.ag" #-}
\x -> if strictData _lhsIoptions then "!" >|< x else x
{-# LINE 452 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule7 #-}
{-# LINE 250 "src-ag/ExecutionPlan2Clean.ag" #-}
rule7 = \ _field kind_ ->
{-# LINE 250 "src-ag/ExecutionPlan2Clean.ag" #-}
case kind_ of
ChildAttr -> empty
_ -> _field
{-# LINE 460 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule8 #-}
{-# LINE 254 "src-ag/ExecutionPlan2Clean.ag" #-}
rule8 = \ _recordfield kind_ ->
{-# LINE 254 "src-ag/ExecutionPlan2Clean.ag" #-}
case kind_ of
ChildAttr -> empty
_ -> _recordfield
{-# LINE 468 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule9 #-}
{-# LINE 342 "src-ag/ExecutionPlan2Clean.ag" #-}
rule9 = \ _nt kind_ name_ ->
{-# LINE 342 "src-ag/ExecutionPlan2Clean.ag" #-}
case kind_ of
ChildSyntax -> "(" >#< "sem_" >|< _nt >#< name_ >|< "_" >#< ")"
ChildAttr -> empty
ChildReplace tp -> "(" >#< "sem_" >|< extractNonterminal tp >#< name_ >|< "_" >#< ")"
{-# LINE 477 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule10 #-}
{-# LINE 633 "src-ag/ExecutionPlan2Clean.ag" #-}
rule10 = \ kind_ tp_ ->
{-# LINE 633 "src-ag/ExecutionPlan2Clean.ag" #-}
case kind_ of
ChildSyntax -> pp_parens $ ppDefor tp_
ChildReplace tp -> pp_parens $ ppDefor tp
_ -> empty
{-# LINE 486 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule11 #-}
{-# LINE 637 "src-ag/ExecutionPlan2Clean.ag" #-}
rule11 = \ kind_ name_ ->
{-# LINE 637 "src-ag/ExecutionPlan2Clean.ag" #-}
case kind_ of
ChildSyntax -> name_ >|< "_"
ChildReplace _ -> name_ >|< "_"
_ -> empty
{-# LINE 495 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule12 #-}
{-# LINE 642 "src-ag/ExecutionPlan2Clean.ag" #-}
rule12 = \ kind_ name_ ->
{-# LINE 642 "src-ag/ExecutionPlan2Clean.ag" #-}
case kind_ of
ChildSyntax -> [name_]
ChildReplace _ -> [name_]
_ -> []
{-# LINE 504 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule13 #-}
{-# LINE 946 "src-ag/ExecutionPlan2Clean.ag" #-}
rule13 = \ _introcode name_ ->
{-# LINE 946 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton name_ _introcode
{-# LINE 510 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule14 #-}
{-# LINE 947 "src-ag/ExecutionPlan2Clean.ag" #-}
rule14 = \ tp_ ->
{-# LINE 947 "src-ag/ExecutionPlan2Clean.ag" #-}
case tp_ of
NT _ _ defor -> defor
_ -> False
{-# LINE 518 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule15 #-}
{-# LINE 950 "src-ag/ExecutionPlan2Clean.ag" #-}
rule15 = \ _isDefor ((_lhsIoptions) :: Options) _nt kind_ name_ ->
{-# LINE 950 "src-ag/ExecutionPlan2Clean.ag" #-}
case kind_ of
ChildSyntax -> "arg_" >|< name_ >|< "_"
ChildAttr ->
let prefix | not _isDefor = if lateHigherOrderBinding _lhsIoptions
then lateSemNtLabel _nt >#< lhsname _lhsIoptions True idLateBindingAttr
else "sem_" >|< _nt
| otherwise = empty
in pp_parens (prefix >#< instname name_)
ChildReplace _ ->
pp_parens (instname name_ >#< name_ >|< "_")
{-# LINE 533 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule16 #-}
{-# LINE 961 "src-ag/ExecutionPlan2Clean.ag" #-}
rule16 = \ ((_lhsIoptions) :: Options) hasAround_ name_ ->
{-# LINE 961 "src-ag/ExecutionPlan2Clean.ag" #-}
if hasAround_
then locname _lhsIoptions name_ >|< "_around"
else empty
{-# LINE 541 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule17 #-}
{-# LINE 964 "src-ag/ExecutionPlan2Clean.ag" #-}
rule17 = \ _addbang _aroundcode _initSt _isDefor ((_lhsIoptions) :: Options) _nt _valcode hasAround_ kind_ name_ ->
{-# LINE 964 "src-ag/ExecutionPlan2Clean.ag" #-}
\kind fmtMode ->
let pat = text $ stname name_ _initSt
patStrict = _addbang pat
attach = "attach_T_" >|< _nt >#< pp_parens (_aroundcode >#< _valcode )
runAttach = unMon _lhsIoptions >#< pp_parens attach
decl = case kind of
VisitPure False -> pat >#< "=" >#< runAttach
VisitPure True -> patStrict >#< "=" >#< runAttach
VisitMonadic -> attach >#< ">>= \\" >#< patStrict >#< "->"
in if compatibleAttach kind _nt _lhsIoptions
then Right ( fmtDecl False fmtMode decl
, Set.singleton (stname name_ _initSt )
, case kind_ of
ChildAttr -> Map.insert (instname name_) Nothing $
( if _isDefor || not (lateHigherOrderBinding _lhsIoptions)
then id
else Map.insert (lhsname _lhsIoptions True idLateBindingAttr) (Just $ AttrInh _LHS idLateBindingAttr)
) $
( if hasAround_
then Map.insert (locname _lhsIoptions (name_) ++ "_around") Nothing
else id
) $ Map.empty
ChildReplace _ -> Map.singleton (instname name_) Nothing
ChildSyntax -> Map.empty
)
else Left $ IncompatibleAttachKind name_ kind
{-# LINE 572 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule18 #-}
{-# LINE 990 "src-ag/ExecutionPlan2Clean.ag" #-}
rule18 = \ tp_ ->
{-# LINE 990 "src-ag/ExecutionPlan2Clean.ag" #-}
extractNonterminal tp_
{-# LINE 578 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule19 #-}
{-# LINE 1568 "src-ag/ExecutionPlan2Clean.ag" #-}
rule19 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 1568 "src-ag/ExecutionPlan2Clean.ag" #-}
\x -> if bangpats _lhsIoptions then "!" >|< x else x
{-# LINE 584 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule20 #-}
{-# LINE 1620 "src-ag/ExecutionPlan2Clean.ag" #-}
rule20 = \ name_ tp_ ->
{-# LINE 1620 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton name_ tp_
{-# LINE 590 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule21 #-}
{-# LINE 1664 "src-ag/ExecutionPlan2Clean.ag" #-}
rule21 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) _nt ->
{-# LINE 1664 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.findWithDefault (error "nonterminal not in allInitStates map") _nt _lhsIallInitStates
{-# LINE 596 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule22 #-}
rule22 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule23 #-}
rule23 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule24 #-}
rule24 = \ _argpats ->
_argpats
{-# NOINLINE sem_EChild_ETerm #-}
sem_EChild_ETerm :: (Identifier) -> (Type) -> T_EChild
sem_EChild_ETerm :: Identifier -> Type -> T_EChild
sem_EChild_ETerm Identifier
arg_name_ Type
arg_tp_ = Identity T_EChild_s2 -> T_EChild
T_EChild (T_EChild_s2 -> Identity T_EChild_s2
forall (m :: * -> *) a. Monad m => a -> m a
return T_EChild_s2
st2) where
{-# NOINLINE st2 #-}
st2 :: T_EChild_s2
st2 = let
v1 :: T_EChild_v1
v1 :: T_EChild_v1
v1 = \ (T_EChild_vIn1 Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks String
_lhsImainFile String
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions PP_Doc
_lhsItextBlocks) -> ( let
_tpDoc :: PP_Doc
_tpDoc = (PP_Doc -> PP_Doc) -> Type -> PP_Doc
forall t. (PP_Doc -> t) -> Type -> t
rule25 PP_Doc -> PP_Doc
_addStrict Type
arg_tp_
_strNm :: String
_strNm = Identifier -> Identifier -> Identifier -> String
rule26 Identifier
_lhsIcon Identifier
_lhsInt Identifier
arg_name_
_field :: PP_Doc
_field = Options -> String -> PP_Doc -> PP_Doc
rule27 Options
_lhsIoptions String
_strNm PP_Doc
_tpDoc
_recordfield :: PP_Doc
_recordfield = String -> PP_Doc -> PP_Doc
rule28 String
_strNm PP_Doc
_tpDoc
_addStrict :: PP_Doc -> PP_Doc
_addStrict = Options -> PP_Doc -> PP_Doc
rule29 Options
_lhsIoptions
_lhsOdatatype :: PP_Doc
_lhsOdatatype :: PP_Doc
_lhsOdatatype = PP_Doc -> PP_Doc
forall a. a -> a
rule30 PP_Doc
_field
_lhsOrecordtype :: PP_Doc
_lhsOrecordtype :: PP_Doc
_lhsOrecordtype = PP_Doc -> PP_Doc
forall a. a -> a
rule31 PP_Doc
_recordfield
_lhsOargnamesw :: PP_Doc
_lhsOargnamesw :: PP_Doc
_lhsOargnamesw = Identifier -> PP_Doc
rule32 Identifier
arg_name_
_lhsOargtps :: PP_Doc
_lhsOargtps :: PP_Doc
_lhsOargtps = Type -> PP_Doc
rule33 Type
arg_tp_
_argpats :: PP_Doc
_argpats = (PP_Doc -> PP_Doc) -> Identifier -> PP_Doc
forall t. (PP_Doc -> t) -> Identifier -> t
rule34 PP_Doc -> PP_Doc
_addbang Identifier
arg_name_
_lhsOrecfields :: [Identifier]
_lhsOrecfields :: [Identifier]
_lhsOrecfields = Identifier -> [Identifier]
forall a. a -> [a]
rule35 Identifier
arg_name_
_lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros :: Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros = Identifier
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
forall k p p a a k a.
k -> Map k (p -> p -> Either a (PP_Doc, Set a, Map k a))
rule36 Identifier
arg_name_
_lhsOterminaldefs :: Set String
_lhsOterminaldefs :: Set String
_lhsOterminaldefs = Identifier -> Set String
rule37 Identifier
arg_name_
_addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule38 Options
_lhsIoptions
_lhsOchildTypes :: Map Identifier Type
_lhsOchildTypes :: Attributes
_lhsOchildTypes = Identifier -> Type -> Attributes
forall k a. k -> a -> Map k a
rule39 Identifier
arg_name_ Type
arg_tp_
_lhsOusedArgs :: Set String
_lhsOusedArgs :: Set String
_lhsOusedArgs = () -> Set String
forall a. () -> Set a
rule40 ()
_lhsOargpats :: PP_Doc
_lhsOargpats :: PP_Doc
_lhsOargpats = PP_Doc -> PP_Doc
forall a. a -> a
rule41 PP_Doc
_argpats
__result_ :: T_EChild_vOut1
__result_ = PP_Doc
-> PP_Doc
-> PP_Doc
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> PP_Doc
-> [Identifier]
-> PP_Doc
-> Set String
-> Set String
-> T_EChild_vOut1
T_EChild_vOut1 PP_Doc
_lhsOargnamesw PP_Doc
_lhsOargpats PP_Doc
_lhsOargtps Attributes
_lhsOchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros PP_Doc
_lhsOdatatype [Identifier]
_lhsOrecfields PP_Doc
_lhsOrecordtype Set String
_lhsOterminaldefs Set String
_lhsOusedArgs
in T_EChild_vOut1
__result_ )
in T_EChild_v1 -> T_EChild_s2
C_EChild_s2 T_EChild_v1
v1
{-# INLINE rule25 #-}
{-# LINE 243 "src-ag/ExecutionPlan2Clean.ag" #-}
rule25 = \ _addStrict tp_ ->
{-# LINE 243 "src-ag/ExecutionPlan2Clean.ag" #-}
_addStrict $ pp_parens $ ppTp $ removeDeforested tp_
{-# LINE 648 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule26 #-}
{-# LINE 244 "src-ag/ExecutionPlan2Clean.ag" #-}
rule26 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ ->
{-# LINE 244 "src-ag/ExecutionPlan2Clean.ag" #-}
recordFieldname _lhsInt _lhsIcon name_
{-# LINE 654 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule27 #-}
{-# LINE 245 "src-ag/ExecutionPlan2Clean.ag" #-}
rule27 = \ ((_lhsIoptions) :: Options) _strNm _tpDoc ->
{-# LINE 245 "src-ag/ExecutionPlan2Clean.ag" #-}
if dataRecords _lhsIoptions
then _strNm >#< "::" >#< _tpDoc
else _tpDoc
{-# LINE 662 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule28 #-}
{-# LINE 248 "src-ag/ExecutionPlan2Clean.ag" #-}
rule28 = \ _strNm _tpDoc ->
{-# LINE 248 "src-ag/ExecutionPlan2Clean.ag" #-}
_strNm >#< "::" >#< _tpDoc
{-# LINE 668 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule29 #-}
{-# LINE 249 "src-ag/ExecutionPlan2Clean.ag" #-}
rule29 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 249 "src-ag/ExecutionPlan2Clean.ag" #-}
\x -> if strictData _lhsIoptions then "!" >|< x else x
{-# LINE 674 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule30 #-}
{-# LINE 257 "src-ag/ExecutionPlan2Clean.ag" #-}
rule30 = \ _field ->
{-# LINE 257 "src-ag/ExecutionPlan2Clean.ag" #-}
_field
{-# LINE 680 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule31 #-}
{-# LINE 258 "src-ag/ExecutionPlan2Clean.ag" #-}
rule31 = \ _recordfield ->
{-# LINE 258 "src-ag/ExecutionPlan2Clean.ag" #-}
_recordfield
{-# LINE 686 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule32 #-}
{-# LINE 346 "src-ag/ExecutionPlan2Clean.ag" #-}
rule32 = \ name_ ->
{-# LINE 346 "src-ag/ExecutionPlan2Clean.ag" #-}
text $ fieldname name_
{-# LINE 692 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule33 #-}
{-# LINE 648 "src-ag/ExecutionPlan2Clean.ag" #-}
rule33 = \ tp_ ->
{-# LINE 648 "src-ag/ExecutionPlan2Clean.ag" #-}
pp_parens $ show tp_
{-# LINE 698 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule34 #-}
{-# LINE 649 "src-ag/ExecutionPlan2Clean.ag" #-}
rule34 = \ _addbang name_ ->
{-# LINE 649 "src-ag/ExecutionPlan2Clean.ag" #-}
_addbang $ text $ fieldname name_
{-# LINE 704 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule35 #-}
{-# LINE 650 "src-ag/ExecutionPlan2Clean.ag" #-}
rule35 = \ name_ ->
{-# LINE 650 "src-ag/ExecutionPlan2Clean.ag" #-}
[name_]
{-# LINE 710 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule36 #-}
{-# LINE 945 "src-ag/ExecutionPlan2Clean.ag" #-}
rule36 = \ name_ ->
{-# LINE 945 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton name_ (\_ _ -> Right (empty, Set.empty, Map.empty))
{-# LINE 716 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule37 #-}
{-# LINE 1318 "src-ag/ExecutionPlan2Clean.ag" #-}
rule37 = \ name_ ->
{-# LINE 1318 "src-ag/ExecutionPlan2Clean.ag" #-}
Set.singleton $ fieldname name_
{-# LINE 722 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule38 #-}
{-# LINE 1569 "src-ag/ExecutionPlan2Clean.ag" #-}
rule38 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 1569 "src-ag/ExecutionPlan2Clean.ag" #-}
\x -> if bangpats _lhsIoptions then "!" >|< x else x
{-# LINE 728 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule39 #-}
{-# LINE 1620 "src-ag/ExecutionPlan2Clean.ag" #-}
rule39 = \ name_ tp_ ->
{-# LINE 1620 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton name_ tp_
{-# LINE 734 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule40 #-}
rule40 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule41 #-}
rule41 = \ _argpats ->
_argpats
data Inh_EChildren = Inh_EChildren { Inh_EChildren -> Map Identifier Int
allInitStates_Inh_EChildren :: (Map NontermIdent Int), Inh_EChildren -> Identifier
con_Inh_EChildren :: (ConstructorIdent), Inh_EChildren -> Map Identifier ConstructorType
constructorTypeMap_Inh_EChildren :: (Map NontermIdent ConstructorType), :: (String -> String -> String -> Bool -> String), :: (String -> String -> String -> Bool -> String), Inh_EChildren -> PP_Doc
importBlocks_Inh_EChildren :: (PP_Doc), Inh_EChildren -> String
mainFile_Inh_EChildren :: (String), Inh_EChildren -> String
mainName_Inh_EChildren :: (String), Inh_EChildren -> Identifier
nt_Inh_EChildren :: (NontermIdent), Inh_EChildren -> Options
options_Inh_EChildren :: (Options), Inh_EChildren -> PP_Doc
textBlocks_Inh_EChildren :: (PP_Doc) }
data Syn_EChildren = Syn_EChildren { Syn_EChildren -> [PP_Doc]
argnamesw_Syn_EChildren :: ([PP_Doc]), Syn_EChildren -> [PP_Doc]
argpats_Syn_EChildren :: ( [PP_Doc] ), Syn_EChildren -> [PP_Doc]
argtps_Syn_EChildren :: ( [PP_Doc] ), Syn_EChildren -> Attributes
childTypes_Syn_EChildren :: (Map Identifier Type), Syn_EChildren
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
childintros_Syn_EChildren :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), Syn_EChildren -> [PP_Doc]
datatype_Syn_EChildren :: ([PP_Doc]), Syn_EChildren -> [Identifier]
recfields_Syn_EChildren :: ( [Identifier] ), Syn_EChildren -> [PP_Doc]
recordtype_Syn_EChildren :: ([PP_Doc]), Syn_EChildren -> Set String
terminaldefs_Syn_EChildren :: (Set String), Syn_EChildren -> Set String
usedArgs_Syn_EChildren :: (Set String) }
{-# INLINABLE wrap_EChildren #-}
wrap_EChildren :: T_EChildren -> Inh_EChildren -> (Syn_EChildren )
wrap_EChildren :: T_EChildren -> Inh_EChildren -> Syn_EChildren
wrap_EChildren (T_EChildren Identity T_EChildren_s5
act) (Inh_EChildren Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks String
_lhsImainFile String
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions PP_Doc
_lhsItextBlocks) =
Identity Syn_EChildren -> Syn_EChildren
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_EChildren_s5
sem <- Identity T_EChildren_s5
act
let arg4 :: T_EChildren_vIn4
arg4 = Map Identifier Int
-> Identifier
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> String
-> String
-> Identifier
-> Options
-> PP_Doc
-> T_EChildren_vIn4
T_EChildren_vIn4 Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks String
_lhsImainFile String
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions PP_Doc
_lhsItextBlocks
(T_EChildren_vOut4 [PP_Doc]
_lhsOargnamesw [PP_Doc]
_lhsOargpats [PP_Doc]
_lhsOargtps Attributes
_lhsOchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros [PP_Doc]
_lhsOdatatype [Identifier]
_lhsOrecfields [PP_Doc]
_lhsOrecordtype Set String
_lhsOterminaldefs Set String
_lhsOusedArgs) <- T_EChildren_vOut4 -> Identity T_EChildren_vOut4
forall (m :: * -> *) a. Monad m => a -> m a
return (T_EChildren_s5 -> T_EChildren_v4
inv_EChildren_s5 T_EChildren_s5
sem T_EChildren_vIn4
arg4)
Syn_EChildren -> Identity Syn_EChildren
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc]
-> [PP_Doc]
-> [PP_Doc]
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> [PP_Doc]
-> [Identifier]
-> [PP_Doc]
-> Set String
-> Set String
-> Syn_EChildren
Syn_EChildren [PP_Doc]
_lhsOargnamesw [PP_Doc]
_lhsOargpats [PP_Doc]
_lhsOargtps Attributes
_lhsOchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros [PP_Doc]
_lhsOdatatype [Identifier]
_lhsOrecfields [PP_Doc]
_lhsOrecordtype Set String
_lhsOterminaldefs Set String
_lhsOusedArgs)
)
{-# NOINLINE sem_EChildren #-}
sem_EChildren :: EChildren -> T_EChildren
sem_EChildren :: EChildren -> T_EChildren
sem_EChildren EChildren
list = (T_EChild -> T_EChildren -> T_EChildren)
-> T_EChildren -> [T_EChild] -> T_EChildren
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_EChild -> T_EChildren -> T_EChildren
sem_EChildren_Cons T_EChildren
sem_EChildren_Nil ((EChild -> T_EChild) -> EChildren -> [T_EChild]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map EChild -> T_EChild
sem_EChild EChildren
list)
newtype T_EChildren = T_EChildren {
T_EChildren -> Identity T_EChildren_s5
attach_T_EChildren :: Identity (T_EChildren_s5 )
}
newtype T_EChildren_s5 = C_EChildren_s5 {
T_EChildren_s5 -> T_EChildren_v4
inv_EChildren_s5 :: (T_EChildren_v4 )
}
data T_EChildren_s6 = C_EChildren_s6
type T_EChildren_v4 = (T_EChildren_vIn4 ) -> (T_EChildren_vOut4 )
data T_EChildren_vIn4 = T_EChildren_vIn4 (Map NontermIdent Int) (ConstructorIdent) (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (String -> String -> String -> Bool -> String) (PP_Doc) (String) (String) (NontermIdent) (Options) (PP_Doc)
data T_EChildren_vOut4 = T_EChildren_vOut4 ([PP_Doc]) ( [PP_Doc] ) ( [PP_Doc] ) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ([PP_Doc]) ( [Identifier] ) ([PP_Doc]) (Set String) (Set String)
{-# NOINLINE sem_EChildren_Cons #-}
sem_EChildren_Cons :: T_EChild -> T_EChildren -> T_EChildren
sem_EChildren_Cons :: T_EChild -> T_EChildren -> T_EChildren
sem_EChildren_Cons T_EChild
arg_hd_ T_EChildren
arg_tl_ = Identity T_EChildren_s5 -> T_EChildren
T_EChildren (T_EChildren_s5 -> Identity T_EChildren_s5
forall (m :: * -> *) a. Monad m => a -> m a
return T_EChildren_s5
st5) where
{-# NOINLINE st5 #-}
st5 :: T_EChildren_s5
st5 = let
v4 :: T_EChildren_v4
v4 :: T_EChildren_v4
v4 = \ (T_EChildren_vIn4 Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks String
_lhsImainFile String
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions PP_Doc
_lhsItextBlocks) -> ( let
_hdX2 :: T_EChild_s2
_hdX2 = Identity T_EChild_s2 -> T_EChild_s2
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_EChild -> Identity T_EChild_s2
attach_T_EChild (T_EChild
arg_hd_))
_tlX5 :: T_EChildren_s5
_tlX5 = Identity T_EChildren_s5 -> T_EChildren_s5
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_EChildren -> Identity T_EChildren_s5
attach_T_EChildren (T_EChildren
arg_tl_))
(T_EChild_vOut1 PP_Doc
_hdIargnamesw PP_Doc
_hdIargpats PP_Doc
_hdIargtps Attributes
_hdIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_hdIchildintros PP_Doc
_hdIdatatype [Identifier]
_hdIrecfields PP_Doc
_hdIrecordtype Set String
_hdIterminaldefs Set String
_hdIusedArgs) = T_EChild_s2 -> T_EChild_v1
inv_EChild_s2 T_EChild_s2
_hdX2 (Map Identifier Int
-> Identifier
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> String
-> String
-> Identifier
-> Options
-> PP_Doc
-> T_EChild_vIn1
T_EChild_vIn1 Map Identifier Int
_hdOallInitStates Identifier
_hdOcon Map Identifier ConstructorType
_hdOconstructorTypeMap String -> String -> String -> Bool -> String
_hdOdclModuleHeader String -> String -> String -> Bool -> String
_hdOiclModuleHeader PP_Doc
_hdOimportBlocks String
_hdOmainFile String
_hdOmainName Identifier
_hdOnt Options
_hdOoptions PP_Doc
_hdOtextBlocks)
(T_EChildren_vOut4 [PP_Doc]
_tlIargnamesw [PP_Doc]
_tlIargpats [PP_Doc]
_tlIargtps Attributes
_tlIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_tlIchildintros [PP_Doc]
_tlIdatatype [Identifier]
_tlIrecfields [PP_Doc]
_tlIrecordtype Set String
_tlIterminaldefs Set String
_tlIusedArgs) = T_EChildren_s5 -> T_EChildren_v4
inv_EChildren_s5 T_EChildren_s5
_tlX5 (Map Identifier Int
-> Identifier
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> String
-> String
-> Identifier
-> Options
-> PP_Doc
-> T_EChildren_vIn4
T_EChildren_vIn4 Map Identifier Int
_tlOallInitStates Identifier
_tlOcon Map Identifier ConstructorType
_tlOconstructorTypeMap String -> String -> String -> Bool -> String
_tlOdclModuleHeader String -> String -> String -> Bool -> String
_tlOiclModuleHeader PP_Doc
_tlOimportBlocks String
_tlOmainFile String
_tlOmainName Identifier
_tlOnt Options
_tlOoptions PP_Doc
_tlOtextBlocks)
_lhsOargnamesw :: [PP_Doc]
_lhsOargnamesw :: [PP_Doc]
_lhsOargnamesw = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule42 PP_Doc
_hdIargnamesw [PP_Doc]
_tlIargnamesw
_lhsOargpats :: [PP_Doc]
_lhsOargpats :: [PP_Doc]
_lhsOargpats = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule43 PP_Doc
_hdIargpats [PP_Doc]
_tlIargpats
_lhsOargtps :: [PP_Doc]
_lhsOargtps :: [PP_Doc]
_lhsOargtps = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule44 PP_Doc
_hdIargtps [PP_Doc]
_tlIargtps
_lhsOchildTypes :: Map Identifier Type
_lhsOchildTypes :: Attributes
_lhsOchildTypes = Attributes -> Attributes -> Attributes
rule45 Attributes
_hdIchildTypes Attributes
_tlIchildTypes
_lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros :: Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros = Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
rule46 Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_hdIchildintros Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_tlIchildintros
_lhsOdatatype :: [PP_Doc]
_lhsOdatatype :: [PP_Doc]
_lhsOdatatype = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule47 PP_Doc
_hdIdatatype [PP_Doc]
_tlIdatatype
_lhsOrecfields :: [Identifier]
_lhsOrecfields :: [Identifier]
_lhsOrecfields = [Identifier] -> [Identifier] -> [Identifier]
rule48 [Identifier]
_hdIrecfields [Identifier]
_tlIrecfields
_lhsOrecordtype :: [PP_Doc]
_lhsOrecordtype :: [PP_Doc]
_lhsOrecordtype = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule49 PP_Doc
_hdIrecordtype [PP_Doc]
_tlIrecordtype
_lhsOterminaldefs :: Set String
_lhsOterminaldefs :: Set String
_lhsOterminaldefs = Set String -> Set String -> Set String
rule50 Set String
_hdIterminaldefs Set String
_tlIterminaldefs
_lhsOusedArgs :: Set String
_lhsOusedArgs :: Set String
_lhsOusedArgs = Set String -> Set String -> Set String
rule51 Set String
_hdIusedArgs Set String
_tlIusedArgs
_hdOallInitStates :: Map Identifier Int
_hdOallInitStates = Map Identifier Int -> Map Identifier Int
rule52 Map Identifier Int
_lhsIallInitStates
_hdOcon :: Identifier
_hdOcon = Identifier -> Identifier
rule53 Identifier
_lhsIcon
_hdOconstructorTypeMap :: Map Identifier ConstructorType
_hdOconstructorTypeMap = Map Identifier ConstructorType -> Map Identifier ConstructorType
rule54 Map Identifier ConstructorType
_lhsIconstructorTypeMap
_hdOdclModuleHeader :: String -> String -> String -> Bool -> String
_hdOdclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule55 String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
_hdOiclModuleHeader :: String -> String -> String -> Bool -> String
_hdOiclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule56 String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
_hdOimportBlocks :: PP_Doc
_hdOimportBlocks = PP_Doc -> PP_Doc
rule57 PP_Doc
_lhsIimportBlocks
_hdOmainFile :: String
_hdOmainFile = String -> String
rule58 String
_lhsImainFile
_hdOmainName :: String
_hdOmainName = String -> String
rule59 String
_lhsImainName
_hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule60 Identifier
_lhsInt
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule61 Options
_lhsIoptions
_hdOtextBlocks :: PP_Doc
_hdOtextBlocks = PP_Doc -> PP_Doc
rule62 PP_Doc
_lhsItextBlocks
_tlOallInitStates :: Map Identifier Int
_tlOallInitStates = Map Identifier Int -> Map Identifier Int
rule63 Map Identifier Int
_lhsIallInitStates
_tlOcon :: Identifier
_tlOcon = Identifier -> Identifier
rule64 Identifier
_lhsIcon
_tlOconstructorTypeMap :: Map Identifier ConstructorType
_tlOconstructorTypeMap = Map Identifier ConstructorType -> Map Identifier ConstructorType
rule65 Map Identifier ConstructorType
_lhsIconstructorTypeMap
_tlOdclModuleHeader :: String -> String -> String -> Bool -> String
_tlOdclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule66 String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
_tlOiclModuleHeader :: String -> String -> String -> Bool -> String
_tlOiclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule67 String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
_tlOimportBlocks :: PP_Doc
_tlOimportBlocks = PP_Doc -> PP_Doc
rule68 PP_Doc
_lhsIimportBlocks
_tlOmainFile :: String
_tlOmainFile = String -> String
rule69 String
_lhsImainFile
_tlOmainName :: String
_tlOmainName = String -> String
rule70 String
_lhsImainName
_tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule71 Identifier
_lhsInt
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule72 Options
_lhsIoptions
_tlOtextBlocks :: PP_Doc
_tlOtextBlocks = PP_Doc -> PP_Doc
rule73 PP_Doc
_lhsItextBlocks
__result_ :: T_EChildren_vOut4
__result_ = [PP_Doc]
-> [PP_Doc]
-> [PP_Doc]
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> [PP_Doc]
-> [Identifier]
-> [PP_Doc]
-> Set String
-> Set String
-> T_EChildren_vOut4
T_EChildren_vOut4 [PP_Doc]
_lhsOargnamesw [PP_Doc]
_lhsOargpats [PP_Doc]
_lhsOargtps Attributes
_lhsOchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros [PP_Doc]
_lhsOdatatype [Identifier]
_lhsOrecfields [PP_Doc]
_lhsOrecordtype Set String
_lhsOterminaldefs Set String
_lhsOusedArgs
in T_EChildren_vOut4
__result_ )
in T_EChildren_v4 -> T_EChildren_s5
C_EChildren_s5 T_EChildren_v4
v4
{-# INLINE rule42 #-}
rule42 :: PP_Doc -> [PP_Doc] -> [PP_Doc]
rule42 = \ ((PP_Doc
_hdIargnamesw) :: PP_Doc ) (([PP_Doc]
_tlIargnamesw) :: [PP_Doc]) ->
PP_Doc
_hdIargnamesw PP_Doc -> [PP_Doc] -> [PP_Doc]
forall a. a -> [a] -> [a]
: [PP_Doc]
_tlIargnamesw
{-# INLINE rule43 #-}
rule43 :: PP_Doc -> [PP_Doc] -> [PP_Doc]
rule43 = \ ((PP_Doc
_hdIargpats) :: PP_Doc ) (([PP_Doc]
_tlIargpats) :: [PP_Doc] ) ->
PP_Doc
_hdIargpats PP_Doc -> [PP_Doc] -> [PP_Doc]
forall a. a -> [a] -> [a]
: [PP_Doc]
_tlIargpats
{-# INLINE rule44 #-}
rule44 :: PP_Doc -> [PP_Doc] -> [PP_Doc]
rule44 = \ ((PP_Doc
_hdIargtps) :: PP_Doc ) (([PP_Doc]
_tlIargtps) :: [PP_Doc] ) ->
PP_Doc
_hdIargtps PP_Doc -> [PP_Doc] -> [PP_Doc]
forall a. a -> [a] -> [a]
: [PP_Doc]
_tlIargtps
{-# INLINE rule45 #-}
rule45 :: Attributes -> Attributes -> Attributes
rule45 = \ ((Attributes
_hdIchildTypes) :: Map Identifier Type) ((Attributes
_tlIchildTypes) :: Map Identifier Type) ->
Attributes
_hdIchildTypes Attributes -> Attributes -> Attributes
forall a. Monoid a => a -> a -> a
`mappend` Attributes
_tlIchildTypes
{-# INLINE rule46 #-}
rule46 :: Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
rule46 = \ ((Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_hdIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ((Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_tlIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_hdIchildintros Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_tlIchildintros
{-# INLINE rule47 #-}
rule47 :: PP_Doc -> [PP_Doc] -> [PP_Doc]
rule47 = \ ((PP_Doc
_hdIdatatype) :: PP_Doc) (([PP_Doc]
_tlIdatatype) :: [PP_Doc]) ->
PP_Doc
_hdIdatatype PP_Doc -> [PP_Doc] -> [PP_Doc]
forall a. a -> [a] -> [a]
: [PP_Doc]
_tlIdatatype
{-# INLINE rule48 #-}
rule48 :: [Identifier] -> [Identifier] -> [Identifier]
rule48 = \ (([Identifier]
_hdIrecfields) :: [Identifier] ) (([Identifier]
_tlIrecfields) :: [Identifier] ) ->
[Identifier]
_hdIrecfields [Identifier] -> [Identifier] -> [Identifier]
forall a. [a] -> [a] -> [a]
++ [Identifier]
_tlIrecfields
{-# INLINE rule49 #-}
rule49 :: PP_Doc -> [PP_Doc] -> [PP_Doc]
rule49 = \ ((PP_Doc
_hdIrecordtype) :: PP_Doc) (([PP_Doc]
_tlIrecordtype) :: [PP_Doc]) ->
PP_Doc
_hdIrecordtype PP_Doc -> [PP_Doc] -> [PP_Doc]
forall a. a -> [a] -> [a]
: [PP_Doc]
_tlIrecordtype
{-# INLINE rule50 #-}
rule50 :: Set String -> Set String -> Set String
rule50 = \ ((Set String
_hdIterminaldefs) :: Set String) ((Set String
_tlIterminaldefs) :: Set String) ->
Set String
_hdIterminaldefs Set String -> Set String -> Set String
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set String
_tlIterminaldefs
{-# INLINE rule51 #-}
rule51 :: Set String -> Set String -> Set String
rule51 = \ ((Set String
_hdIusedArgs) :: Set String) ((Set String
_tlIusedArgs) :: Set String) ->
Set String
_hdIusedArgs Set String -> Set String -> Set String
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set String
_tlIusedArgs
{-# INLINE rule52 #-}
rule52 :: Map Identifier Int -> Map Identifier Int
rule52 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
Map Identifier Int
_lhsIallInitStates
{-# INLINE rule53 #-}
rule53 :: Identifier -> Identifier
rule53 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
Identifier
_lhsIcon
{-# INLINE rule54 #-}
rule54 :: Map Identifier ConstructorType -> Map Identifier ConstructorType
rule54 = \ ((Map Identifier ConstructorType
_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->
Map Identifier ConstructorType
_lhsIconstructorTypeMap
{-# INLINE rule55 #-}
rule55 :: (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule55 = \ ((String -> String -> String -> Bool -> String
_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->
String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
{-# INLINE rule56 #-}
rule56 :: (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule56 = \ ((String -> String -> String -> Bool -> String
_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->
String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
{-# INLINE rule57 #-}
rule57 :: PP_Doc -> PP_Doc
rule57 = \ ((PP_Doc
_lhsIimportBlocks) :: PP_Doc) ->
PP_Doc
_lhsIimportBlocks
{-# INLINE rule58 #-}
rule58 :: String -> String
rule58 = \ ((String
_lhsImainFile) :: String) ->
String
_lhsImainFile
{-# INLINE rule59 #-}
rule59 :: String -> String
rule59 = \ ((String
_lhsImainName) :: String) ->
String
_lhsImainName
{-# INLINE rule60 #-}
rule60 :: Identifier -> Identifier
rule60 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
Identifier
_lhsInt
{-# INLINE rule61 #-}
rule61 :: Options -> Options
rule61 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule62 #-}
rule62 :: PP_Doc -> PP_Doc
rule62 = \ ((PP_Doc
_lhsItextBlocks) :: PP_Doc) ->
PP_Doc
_lhsItextBlocks
{-# INLINE rule63 #-}
rule63 :: Map Identifier Int -> Map Identifier Int
rule63 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
Map Identifier Int
_lhsIallInitStates
{-# INLINE rule64 #-}
rule64 :: Identifier -> Identifier
rule64 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
Identifier
_lhsIcon
{-# INLINE rule65 #-}
rule65 :: Map Identifier ConstructorType -> Map Identifier ConstructorType
rule65 = \ ((Map Identifier ConstructorType
_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->
Map Identifier ConstructorType
_lhsIconstructorTypeMap
{-# INLINE rule66 #-}
rule66 :: (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule66 = \ ((String -> String -> String -> Bool -> String
_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->
String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
{-# INLINE rule67 #-}
rule67 :: (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule67 = \ ((String -> String -> String -> Bool -> String
_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->
String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
{-# INLINE rule68 #-}
rule68 :: PP_Doc -> PP_Doc
rule68 = \ ((PP_Doc
_lhsIimportBlocks) :: PP_Doc) ->
PP_Doc
_lhsIimportBlocks
{-# INLINE rule69 #-}
rule69 :: String -> String
rule69 = \ ((String
_lhsImainFile) :: String) ->
String
_lhsImainFile
{-# INLINE rule70 #-}
rule70 :: String -> String
rule70 = \ ((String
_lhsImainName) :: String) ->
String
_lhsImainName
{-# INLINE rule71 #-}
rule71 :: Identifier -> Identifier
rule71 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
Identifier
_lhsInt
{-# INLINE rule72 #-}
rule72 :: Options -> Options
rule72 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule73 #-}
rule73 :: PP_Doc -> PP_Doc
rule73 = \ ((PP_Doc
_lhsItextBlocks) :: PP_Doc) ->
PP_Doc
_lhsItextBlocks
{-# NOINLINE sem_EChildren_Nil #-}
sem_EChildren_Nil :: T_EChildren
sem_EChildren_Nil :: T_EChildren
sem_EChildren_Nil = Identity T_EChildren_s5 -> T_EChildren
T_EChildren (T_EChildren_s5 -> Identity T_EChildren_s5
forall (m :: * -> *) a. Monad m => a -> m a
return T_EChildren_s5
st5) where
{-# NOINLINE st5 #-}
st5 :: T_EChildren_s5
st5 = let
v4 :: T_EChildren_v4
v4 :: T_EChildren_v4
v4 = \ (T_EChildren_vIn4 Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks String
_lhsImainFile String
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions PP_Doc
_lhsItextBlocks) -> ( let
_lhsOargnamesw :: [PP_Doc]
_lhsOargnamesw :: [PP_Doc]
_lhsOargnamesw = () -> [PP_Doc]
forall a. () -> [a]
rule74 ()
_lhsOargpats :: [PP_Doc]
_lhsOargpats :: [PP_Doc]
_lhsOargpats = () -> [PP_Doc]
forall a. () -> [a]
rule75 ()
_lhsOargtps :: [PP_Doc]
_lhsOargtps :: [PP_Doc]
_lhsOargtps = () -> [PP_Doc]
forall a. () -> [a]
rule76 ()
_lhsOchildTypes :: Map Identifier Type
_lhsOchildTypes :: Attributes
_lhsOchildTypes = () -> Attributes
rule77 ()
_lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros :: Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros = ()
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
forall k a. () -> Map k a
rule78 ()
_lhsOdatatype :: [PP_Doc]
_lhsOdatatype :: [PP_Doc]
_lhsOdatatype = () -> [PP_Doc]
forall a. () -> [a]
rule79 ()
_lhsOrecfields :: [Identifier]
_lhsOrecfields :: [Identifier]
_lhsOrecfields = () -> [Identifier]
forall a. () -> [a]
rule80 ()
_lhsOrecordtype :: [PP_Doc]
_lhsOrecordtype :: [PP_Doc]
_lhsOrecordtype = () -> [PP_Doc]
forall a. () -> [a]
rule81 ()
_lhsOterminaldefs :: Set String
_lhsOterminaldefs :: Set String
_lhsOterminaldefs = () -> Set String
forall a. () -> Set a
rule82 ()
_lhsOusedArgs :: Set String
_lhsOusedArgs :: Set String
_lhsOusedArgs = () -> Set String
forall a. () -> Set a
rule83 ()
__result_ :: T_EChildren_vOut4
__result_ = [PP_Doc]
-> [PP_Doc]
-> [PP_Doc]
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> [PP_Doc]
-> [Identifier]
-> [PP_Doc]
-> Set String
-> Set String
-> T_EChildren_vOut4
T_EChildren_vOut4 [PP_Doc]
_lhsOargnamesw [PP_Doc]
_lhsOargpats [PP_Doc]
_lhsOargtps Attributes
_lhsOchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros [PP_Doc]
_lhsOdatatype [Identifier]
_lhsOrecfields [PP_Doc]
_lhsOrecordtype Set String
_lhsOterminaldefs Set String
_lhsOusedArgs
in T_EChildren_vOut4
__result_ )
in T_EChildren_v4 -> T_EChildren_s5
C_EChildren_s5 T_EChildren_v4
v4
{-# INLINE rule74 #-}
rule74 :: () -> [a]
rule74 = \ (()
_ :: ()) ->
[]
{-# INLINE rule75 #-}
rule75 :: () -> [a]
rule75 = \ (()
_ :: ()) ->
[]
{-# INLINE rule76 #-}
rule76 :: () -> [a]
rule76 = \ (()
_ :: ()) ->
[]
{-# INLINE rule77 #-}
rule77 :: () -> Attributes
rule77 = \ (()
_ :: ()) ->
Attributes
forall a. Monoid a => a
mempty
{-# INLINE rule78 #-}
rule78 :: () -> Map k a
rule78 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule79 #-}
rule79 :: () -> [a]
rule79 = \ (()
_ :: ()) ->
[]
{-# INLINE rule80 #-}
rule80 :: () -> [a]
rule80 = \ (()
_ :: ()) ->
[]
{-# INLINE rule81 #-}
rule81 :: () -> [a]
rule81 = \ (()
_ :: ()) ->
[]
{-# INLINE rule82 #-}
rule82 :: () -> Set a
rule82 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
{-# INLINE rule83 #-}
rule83 :: () -> Set a
rule83 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
data Inh_ENonterminal = Inh_ENonterminal { Inh_ENonterminal -> Map Int (Int, Int)
allFromToStates_Inh_ENonterminal :: (Map VisitIdentifier (Int,Int)), Inh_ENonterminal -> Map Identifier Int
allInitStates_Inh_ENonterminal :: (Map NontermIdent Int), Inh_ENonterminal -> Map Int VisitKind
allVisitKinds_Inh_ENonterminal :: (Map VisitIdentifier VisitKind), Inh_ENonterminal
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
allchildvisit_Inh_ENonterminal :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Inh_ENonterminal -> Map Int (Set Identifier)
avisitdefs_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)), Inh_ENonterminal -> Map Int (Set Identifier)
avisituses_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)), Inh_ENonterminal -> Map Identifier ConstructorType
constructorTypeMap_Inh_ENonterminal :: (Map NontermIdent ConstructorType), :: (String -> String -> String -> Bool -> String), Inh_ENonterminal -> Derivings
derivings_Inh_ENonterminal :: (Derivings), :: (String -> String -> String -> Bool -> String), Inh_ENonterminal -> PP_Doc
importBlocks_Inh_ENonterminal :: (PP_Doc), Inh_ENonterminal -> Map Identifier Attributes
inhmap_Inh_ENonterminal :: (Map NontermIdent Attributes), Inh_ENonterminal -> Map Identifier (Map Identifier Attributes)
localAttrTypes_Inh_ENonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), Inh_ENonterminal -> String
mainFile_Inh_ENonterminal :: (String), Inh_ENonterminal -> String
mainName_Inh_ENonterminal :: (String), Inh_ENonterminal -> Options
options_Inh_ENonterminal :: (Options), Inh_ENonterminal -> Map Identifier Attributes
synmap_Inh_ENonterminal :: (Map NontermIdent Attributes), Inh_ENonterminal -> PP_Doc
textBlocks_Inh_ENonterminal :: (PP_Doc), Inh_ENonterminal -> TypeSyns
typeSyns_Inh_ENonterminal :: (TypeSyns), Inh_ENonterminal -> Set Identifier
wrappers_Inh_ENonterminal :: (Set NontermIdent) }
data Syn_ENonterminal = Syn_ENonterminal { Syn_ENonterminal -> PP_Doc
appendCommon_Syn_ENonterminal :: ( PP_Doc ), Syn_ENonterminal -> PP_Doc
appendMain_Syn_ENonterminal :: ( PP_Doc ), Syn_ENonterminal
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
childvisit_Syn_ENonterminal :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Syn_ENonterminal -> Seq Error
errors_Syn_ENonterminal :: (Seq Error), Syn_ENonterminal -> Map Int (Int, Int)
fromToStates_Syn_ENonterminal :: (Map VisitIdentifier (Int,Int)), Syn_ENonterminal -> IO ()
genProdIO_Syn_ENonterminal :: (IO ()), Syn_ENonterminal -> [PP_Doc]
imports_Syn_ENonterminal :: ([PP_Doc]), Syn_ENonterminal -> Map Identifier Int
initStates_Syn_ENonterminal :: (Map NontermIdent Int), Syn_ENonterminal -> PP_Doc
output_Syn_ENonterminal :: (PP_Doc), Syn_ENonterminal -> PP_Doc
output_dcl_Syn_ENonterminal :: (PP_Doc), Syn_ENonterminal -> Seq PP_Doc
semFunBndDefs_Syn_ENonterminal :: (Seq PP_Doc), Syn_ENonterminal -> Seq PP_Doc
semFunBndTps_Syn_ENonterminal :: (Seq PP_Doc), Syn_ENonterminal -> Map Int VisitKind
visitKinds_Syn_ENonterminal :: (Map VisitIdentifier VisitKind), Syn_ENonterminal -> Map Int (Set Identifier)
visitdefs_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier)), Syn_ENonterminal -> Map Int (Set Identifier)
visituses_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier)) }
{-# INLINABLE wrap_ENonterminal #-}
wrap_ENonterminal :: T_ENonterminal -> Inh_ENonterminal -> (Syn_ENonterminal )
wrap_ENonterminal :: T_ENonterminal -> Inh_ENonterminal -> Syn_ENonterminal
wrap_ENonterminal (T_ENonterminal Identity T_ENonterminal_s8
act) (Inh_ENonterminal Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader Derivings
_lhsIderivings String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks TypeSyns
_lhsItypeSyns Set Identifier
_lhsIwrappers) =
Identity Syn_ENonterminal -> Syn_ENonterminal
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_ENonterminal_s8
sem <- Identity T_ENonterminal_s8
act
let arg7 :: T_ENonterminal_vIn7
arg7 = Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> Derivings
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> String
-> String
-> Options
-> Map Identifier Attributes
-> PP_Doc
-> TypeSyns
-> Set Identifier
-> T_ENonterminal_vIn7
T_ENonterminal_vIn7 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader Derivings
_lhsIderivings String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks TypeSyns
_lhsItypeSyns Set Identifier
_lhsIwrappers
(T_ENonterminal_vOut7 PP_Doc
_lhsOappendCommon PP_Doc
_lhsOappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOoutput PP_Doc
_lhsOoutput_dcl Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses) <- T_ENonterminal_vOut7 -> Identity T_ENonterminal_vOut7
forall (m :: * -> *) a. Monad m => a -> m a
return (T_ENonterminal_s8 -> T_ENonterminal_v7
inv_ENonterminal_s8 T_ENonterminal_s8
sem T_ENonterminal_vIn7
arg7)
Syn_ENonterminal -> Identity Syn_ENonterminal
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc
-> PP_Doc
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> Map Identifier Int
-> PP_Doc
-> PP_Doc
-> Seq PP_Doc
-> Seq PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Syn_ENonterminal
Syn_ENonterminal PP_Doc
_lhsOappendCommon PP_Doc
_lhsOappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOoutput PP_Doc
_lhsOoutput_dcl Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses)
)
{-# INLINE sem_ENonterminal #-}
sem_ENonterminal :: ENonterminal -> T_ENonterminal
sem_ENonterminal :: ENonterminal -> T_ENonterminal
sem_ENonterminal ( ENonterminal Identifier
nt_ [Identifier]
params_ ClassContext
classCtxs_ Int
initial_ [Int]
initialv_ Map Int StateCtx
nextVisits_ Map Int StateCtx
prevVisits_ EProductions
prods_ Bool
recursive_ HigherOrderInfo
hoInfo_ ) = Identifier
-> [Identifier]
-> ClassContext
-> Int
-> [Int]
-> Map Int StateCtx
-> Map Int StateCtx
-> T_EProductions
-> Bool
-> HigherOrderInfo
-> T_ENonterminal
sem_ENonterminal_ENonterminal Identifier
nt_ [Identifier]
params_ ClassContext
classCtxs_ Int
initial_ [Int]
initialv_ Map Int StateCtx
nextVisits_ Map Int StateCtx
prevVisits_ ( EProductions -> T_EProductions
sem_EProductions EProductions
prods_ ) Bool
recursive_ HigherOrderInfo
hoInfo_
newtype T_ENonterminal = T_ENonterminal {
T_ENonterminal -> Identity T_ENonterminal_s8
attach_T_ENonterminal :: Identity (T_ENonterminal_s8 )
}
newtype T_ENonterminal_s8 = C_ENonterminal_s8 {
T_ENonterminal_s8 -> T_ENonterminal_v7
inv_ENonterminal_s8 :: (T_ENonterminal_v7 )
}
data T_ENonterminal_s9 = C_ENonterminal_s9
type T_ENonterminal_v7 = (T_ENonterminal_vIn7 ) -> (T_ENonterminal_vOut7 )
data T_ENonterminal_vIn7 = T_ENonterminal_vIn7 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (Derivings) (String -> String -> String -> Bool -> String) (PP_Doc) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (Options) (Map NontermIdent Attributes) (PP_Doc) (TypeSyns) (Set NontermIdent)
data T_ENonterminal_vOut7 = T_ENonterminal_vOut7 ( PP_Doc ) ( PP_Doc ) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (Map NontermIdent Int) (PP_Doc) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))
{-# NOINLINE sem_ENonterminal_ENonterminal #-}
sem_ENonterminal_ENonterminal :: (NontermIdent) -> ([Identifier]) -> (ClassContext) -> (StateIdentifier) -> ([VisitIdentifier]) -> (Map StateIdentifier StateCtx) -> (Map StateIdentifier StateCtx) -> T_EProductions -> (Bool) -> (HigherOrderInfo) -> T_ENonterminal
sem_ENonterminal_ENonterminal :: Identifier
-> [Identifier]
-> ClassContext
-> Int
-> [Int]
-> Map Int StateCtx
-> Map Int StateCtx
-> T_EProductions
-> Bool
-> HigherOrderInfo
-> T_ENonterminal
sem_ENonterminal_ENonterminal Identifier
arg_nt_ [Identifier]
arg_params_ ClassContext
arg_classCtxs_ Int
arg_initial_ [Int]
arg_initialv_ Map Int StateCtx
arg_nextVisits_ Map Int StateCtx
arg_prevVisits_ T_EProductions
arg_prods_ Bool
_ HigherOrderInfo
_ = Identity T_ENonterminal_s8 -> T_ENonterminal
T_ENonterminal (T_ENonterminal_s8 -> Identity T_ENonterminal_s8
forall (m :: * -> *) a. Monad m => a -> m a
return T_ENonterminal_s8
st8) where
{-# NOINLINE st8 #-}
st8 :: T_ENonterminal_s8
st8 = let
v7 :: T_ENonterminal_v7
v7 :: T_ENonterminal_v7
v7 = \ (T_ENonterminal_vIn7 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader Derivings
_lhsIderivings String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks TypeSyns
_lhsItypeSyns Set Identifier
_lhsIwrappers) -> ( let
_prodsX17 :: T_EProductions_s17
_prodsX17 = Identity T_EProductions_s17 -> T_EProductions_s17
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_EProductions -> Identity T_EProductions_s17
attach_T_EProductions (T_EProductions
arg_prods_))
(T_EProductions_vOut16 [VisitStateState]
_prodsIallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_prodsIchildvisit Int
_prodsIcount [PP_Doc]
_prodsIdatatype Seq Error
_prodsIerrors Map Int (Int, Int)
_prodsIfromToStates IO ()
_prodsIgenProdIO [PP_Doc]
_prodsIimports PP_Doc
_prodsIrecordtype Seq PP_Doc
_prodsIsemFunBndDefs Seq PP_Doc
_prodsIsemFunBndTps PP_Doc
_prodsIsem_nt PP_Doc
_prodsIsem_prod PP_Doc
_prodsIsem_prod_tys PP_Doc
_prodsIt_visits Map Int VisitKind
_prodsIvisitKinds Map Int (Set Identifier)
_prodsIvisitdefs Map Int (Set Identifier)
_prodsIvisituses) = T_EProductions_s17 -> T_EProductions_v16
inv_EProductions_s17 T_EProductions_s17
_prodsX17 (Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Set Int
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> ClassContext
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> Attributes
-> Int
-> Map Identifier Attributes
-> String
-> String
-> Map Int StateCtx
-> Identifier
-> Type
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Bool
-> Attributes
-> PP_Doc
-> T_EProductions_vIn16
T_EProductions_vIn16 Map Int (Int, Int)
_prodsOallFromToStates Map Identifier Attributes
_prodsOallInhmap Map Identifier Int
_prodsOallInitStates Map Identifier Attributes
_prodsOallSynmap Map Int VisitKind
_prodsOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_prodsOallchildvisit Set Int
_prodsOallstates Map Int (Set Identifier)
_prodsOavisitdefs Map Int (Set Identifier)
_prodsOavisituses ClassContext
_prodsOclassCtxs Map Identifier ConstructorType
_prodsOconstructorTypeMap String -> String -> String -> Bool -> String
_prodsOdclModuleHeader String -> String -> String -> Bool -> String
_prodsOiclModuleHeader PP_Doc
_prodsOimportBlocks Attributes
_prodsOinhmap Int
_prodsOinitial Map Identifier Attributes
_prodsOlocalAttrTypes String
_prodsOmainFile String
_prodsOmainName Map Int StateCtx
_prodsOnextVisits Identifier
_prodsOnt Type
_prodsOntType Options
_prodsOoptions [Identifier]
_prodsOparams Map Int StateCtx
_prodsOprevVisits Bool
_prodsOrename Attributes
_prodsOsynmap PP_Doc
_prodsOtextBlocks)
_prodsOrename :: Bool
_prodsOrename = Options -> Bool
rule84 Options
_lhsIoptions
_prodsOnt :: Identifier
_prodsOnt = Identifier -> Identifier
forall a. a -> a
rule85 Identifier
arg_nt_
_prodsOparams :: [Identifier]
_prodsOparams = [Identifier] -> [Identifier]
forall a. a -> a
rule86 [Identifier]
arg_params_
_prodsOclassCtxs :: ClassContext
_prodsOclassCtxs = ClassContext -> ClassContext
forall a. a -> a
rule87 ClassContext
arg_classCtxs_
_lhsOoutput :: PP_Doc
_lhsOoutput :: PP_Doc
_lhsOoutput = Bool
-> PP_Doc
-> Options
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Identifier
-> PP_Doc
rule88 Bool
_hasWrapper PP_Doc
_k_states Options
_lhsIoptions PP_Doc
_prodsIsem_prod PP_Doc
_sem_nt PP_Doc
_t_init_icl PP_Doc
_t_states_icl PP_Doc
_wr_inh_icl PP_Doc
_wr_syn_icl PP_Doc
_wrapper_icl Identifier
arg_nt_
_hasWrapper :: Bool
_hasWrapper = Set Identifier -> Identifier -> Bool
rule89 Set Identifier
_lhsIwrappers Identifier
arg_nt_
_lhsOoutput_dcl :: PP_Doc
_lhsOoutput_dcl :: PP_Doc
_lhsOoutput_dcl = PP_Doc
-> Bool
-> Options
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> String
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Identifier
-> PP_Doc
rule90 PP_Doc
_datatype Bool
_hasWrapper Options
_lhsIoptions PP_Doc
_prodsIsem_prod_tys PP_Doc
_prodsIt_visits PP_Doc
_sem_tp String
_semname PP_Doc
_t_init_dcl PP_Doc
_t_states_dcl PP_Doc
_wr_inh_dcl PP_Doc
_wr_syn_dcl PP_Doc
_wrapper_dcl Identifier
arg_nt_
_classPP :: PP_Doc
_classPP = ClassContext -> PP_Doc
rule91 ClassContext
arg_classCtxs_
_aliasPre :: PP_Doc
_aliasPre = PP_Doc -> PP_Doc -> Identifier -> PP_Doc
rule92 PP_Doc
_classPP PP_Doc
_t_params Identifier
arg_nt_
_datatype :: PP_Doc
_datatype = PP_Doc
-> PP_Doc
-> PP_Doc
-> Map Identifier ConstructorType
-> TypeSyns
-> [PP_Doc]
-> PP_Doc
-> PP_Doc
-> Identifier
-> PP_Doc
rule93 PP_Doc
_aliasPre PP_Doc
_classPP PP_Doc
_derivings Map Identifier ConstructorType
_lhsIconstructorTypeMap TypeSyns
_lhsItypeSyns [PP_Doc]
_prodsIdatatype PP_Doc
_prodsIrecordtype PP_Doc
_t_params Identifier
arg_nt_
_derivings :: PP_Doc
_derivings = Derivings -> Identifier -> PP_Doc
rule94 Derivings
_lhsIderivings Identifier
arg_nt_
_fsemname :: Identifier -> String
_fsemname = () -> Identifier -> String
rule95 ()
_semname :: String
_semname = (Identifier -> String) -> Identifier -> String
forall t t. (t -> t) -> t -> t
rule96 Identifier -> String
_fsemname Identifier
arg_nt_
_frecarg :: Type -> String -> PP_Doc
_frecarg = (Identifier -> String) -> Type -> String -> PP_Doc
rule97 Identifier -> String
_fsemname
_sem_tp :: PP_Doc
_sem_tp = PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc -> Identifier -> PP_Doc
rule98 PP_Doc
_classPP PP_Doc
_quantPP PP_Doc
_t_params PP_Doc
_t_type Identifier
arg_nt_
_quantPP :: PP_Doc
_quantPP = [Identifier] -> PP_Doc
rule99 [Identifier]
arg_params_
_sem_nt :: PP_Doc
_sem_nt = (Type -> String -> PP_Doc)
-> (Identifier -> String)
-> TypeSyns
-> PP_Doc
-> PP_Doc
-> String
-> Identifier
-> PP_Doc
rule100 Type -> String -> PP_Doc
_frecarg Identifier -> String
_fsemname TypeSyns
_lhsItypeSyns PP_Doc
_prodsIsem_nt PP_Doc
_sem_tp String
_semname Identifier
arg_nt_
(Just Attributes
_prodsOinhmap) = Map Identifier Attributes -> Identifier -> Maybe Attributes
rule101 Map Identifier Attributes
_lhsIinhmap Identifier
arg_nt_
(Just Attributes
_prodsOsynmap) = Map Identifier Attributes -> Identifier -> Maybe Attributes
rule102 Map Identifier Attributes
_lhsIsynmap Identifier
arg_nt_
_prodsOallInhmap :: Map Identifier Attributes
_prodsOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule103 Map Identifier Attributes
_lhsIinhmap
_prodsOallSynmap :: Map Identifier Attributes
_prodsOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule104 Map Identifier Attributes
_lhsIsynmap
_outedges :: Set Int
_outedges = [VisitStateState] -> Set Int
rule105 [VisitStateState]
_prodsIallvisits
_inedges :: Set Int
_inedges = [VisitStateState] -> Set Int
rule106 [VisitStateState]
_prodsIallvisits
_allstates :: Set Int
_allstates = Set Int -> Set Int -> Int -> Set Int
rule107 Set Int
_inedges Set Int
_outedges Int
arg_initial_
_stvisits :: Int -> [VisitStateState]
_stvisits = [VisitStateState] -> Int -> [VisitStateState]
rule108 [VisitStateState]
_prodsIallvisits
_t_type :: PP_Doc
_t_type = Identifier -> PP_Doc
rule109 Identifier
arg_nt_
_lt_type :: PP_Doc
_lt_type = Identifier -> PP_Doc
rule110 Identifier
arg_nt_
_t_params :: PP_Doc
_t_params = [Identifier] -> PP_Doc
rule111 [Identifier]
arg_params_
_t_init_icl :: PP_Doc
_t_init_icl = PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc
rule112 PP_Doc
_lt_type PP_Doc
_t_init_dcl PP_Doc
_t_type
_t_init_dcl :: PP_Doc
_t_init_dcl = Options -> PP_Doc -> PP_Doc -> Int -> PP_Doc
rule113 Options
_lhsIoptions PP_Doc
_t_params PP_Doc
_t_type Int
arg_initial_
_t_states_icl :: PP_Doc
_t_states_icl = Set Int -> Map Int StateCtx -> Identifier -> PP_Doc
rule114 Set Int
_allstates Map Int StateCtx
arg_nextVisits_ Identifier
arg_nt_
_t_states_dcl :: PP_Doc
_t_states_dcl = Set Int -> PP_Doc -> Map Int StateCtx -> Identifier -> PP_Doc
rule115 Set Int
_allstates PP_Doc
_t_params Map Int StateCtx
arg_nextVisits_ Identifier
arg_nt_
_k_type :: String
_k_type = Identifier -> String
rule116 Identifier
arg_nt_
_k_states :: PP_Doc
_k_states = Set Int
-> String
-> [VisitStateState]
-> PP_Doc
-> PP_Doc
-> Map Int StateCtx
-> Identifier
-> PP_Doc
rule117 Set Int
_allstates String
_k_type [VisitStateState]
_prodsIallvisits PP_Doc
_t_params PP_Doc
_t_type Map Int StateCtx
arg_nextVisits_ Identifier
arg_nt_
_wr_inh_icl :: PP_Doc
_wr_inh_icl = (String -> [(Identifier, Type)] -> PP_Doc)
-> [(Identifier, Type)] -> PP_Doc
forall t t. (String -> t -> t) -> t -> t
rule118 String -> [(Identifier, Type)] -> PP_Doc
_genwrap_icl [(Identifier, Type)]
_wr_inhs
_wr_syn_icl :: PP_Doc
_wr_syn_icl = (String -> [(Identifier, Type)] -> PP_Doc)
-> [(Identifier, Type)] -> PP_Doc
forall t t. (String -> t -> t) -> t -> t
rule119 String -> [(Identifier, Type)] -> PP_Doc
_genwrap_icl [(Identifier, Type)]
_wr_syns
_genwrap_icl :: String -> [(Identifier, Type)] -> PP_Doc
_genwrap_icl = (PP_Doc -> PP_Doc)
-> Identifier -> String -> [(Identifier, Type)] -> PP_Doc
rule120 PP_Doc -> PP_Doc
_addbang Identifier
arg_nt_
_wr_inh_dcl :: PP_Doc
_wr_inh_dcl = (String -> [(Identifier, Type)] -> PP_Doc)
-> [(Identifier, Type)] -> PP_Doc
forall t t. (String -> t -> t) -> t -> t
rule121 String -> [(Identifier, Type)] -> PP_Doc
_genwrap_dcl [(Identifier, Type)]
_wr_inhs
_wr_syn_dcl :: PP_Doc
_wr_syn_dcl = (String -> [(Identifier, Type)] -> PP_Doc)
-> [(Identifier, Type)] -> PP_Doc
forall t t. (String -> t -> t) -> t -> t
rule122 String -> [(Identifier, Type)] -> PP_Doc
_genwrap_dcl [(Identifier, Type)]
_wr_syns
_genwrap_dcl :: String -> [(Identifier, Type)] -> PP_Doc
_genwrap_dcl = (PP_Doc -> PP_Doc)
-> PP_Doc -> Identifier -> String -> [(Identifier, Type)] -> PP_Doc
rule123 PP_Doc -> PP_Doc
_addbang PP_Doc
_t_params Identifier
arg_nt_
_synAttrs :: Attributes
_synAttrs = Map Identifier Attributes -> Identifier -> Attributes
rule124 Map Identifier Attributes
_lhsIinhmap Identifier
arg_nt_
_wr_inhs :: [(Identifier, Type)]
_wr_inhs = Attributes -> (Attributes -> Attributes) -> [(Identifier, Type)]
forall t k a. t -> (t -> Map k a) -> [(k, a)]
rule125 Attributes
_synAttrs Attributes -> Attributes
_wr_filter
_wr_inhs1 :: [(Identifier, Type)]
_wr_inhs1 = Attributes -> [(Identifier, Type)]
forall k a. Map k a -> [(k, a)]
rule126 Attributes
_synAttrs
_wr_filter :: Attributes -> Attributes
_wr_filter = Options -> Attributes -> Attributes
forall a. Options -> Map Identifier a -> Map Identifier a
rule127 Options
_lhsIoptions
_wr_syns :: [(Identifier, Type)]
_wr_syns = Map Identifier Attributes -> Identifier -> [(Identifier, Type)]
rule128 Map Identifier Attributes
_lhsIsynmap Identifier
arg_nt_
_inhlist :: [String]
_inhlist = Options -> [(Identifier, Type)] -> [String]
forall b. Options -> [(Identifier, b)] -> [String]
rule129 Options
_lhsIoptions [(Identifier, Type)]
_wr_inhs
_inhlist1 :: [String]
_inhlist1 = Options -> [(Identifier, Type)] -> [String]
forall b. Options -> [(Identifier, b)] -> [String]
rule130 Options
_lhsIoptions [(Identifier, Type)]
_wr_inhs1
_synlist :: [String]
_synlist = Options -> [(Identifier, Type)] -> [String]
forall b. Options -> [(Identifier, b)] -> [String]
rule131 Options
_lhsIoptions [(Identifier, Type)]
_wr_syns
_wrapname :: String
_wrapname = Identifier -> String
rule132 Identifier
arg_nt_
_inhname :: String
_inhname = Identifier -> String
rule133 Identifier
arg_nt_
_synname :: String
_synname = Identifier -> String
rule134 Identifier
arg_nt_
_firstVisitInfo :: StateCtx
_firstVisitInfo = Int -> Map Int StateCtx -> StateCtx
rule135 Int
arg_initial_ Map Int StateCtx
arg_nextVisits_
_wrapper_icl :: PP_Doc
_wrapper_icl = (PP_Doc -> PP_Doc)
-> (PP_Doc -> PP_Doc)
-> PP_Doc
-> StateCtx
-> [String]
-> [String]
-> String
-> String
-> Map Int VisitKind
-> String
-> Options
-> PP_Doc
-> [String]
-> String
-> PP_Doc
-> PP_Doc
-> String
-> Int
-> [Int]
-> Identifier
-> PP_Doc
rule136 PP_Doc -> PP_Doc
_addbang PP_Doc -> PP_Doc
forall a. a -> a
_addbangWrap PP_Doc
_classPP StateCtx
_firstVisitInfo [String]
_inhlist [String]
_inhlist1 String
_inhname String
_k_type Map Int VisitKind
_lhsIallVisitKinds String
_lhsImainName Options
_lhsIoptions PP_Doc
_quantPP [String]
_synlist String
_synname PP_Doc
_t_params PP_Doc
_t_type String
_wrapname Int
arg_initial_ [Int]
arg_initialv_ Identifier
arg_nt_
_wrapper_dcl :: PP_Doc
_wrapper_dcl = PP_Doc
-> String
-> Options
-> PP_Doc
-> String
-> PP_Doc
-> PP_Doc
-> String
-> PP_Doc
rule137 PP_Doc
_classPP String
_inhname Options
_lhsIoptions PP_Doc
_quantPP String
_synname PP_Doc
_t_params PP_Doc
_t_type String
_wrapname
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = Seq PP_Doc -> PP_Doc -> Seq PP_Doc
rule138 Seq PP_Doc
_prodsIsemFunBndDefs PP_Doc
_semFunBndDef
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps = Seq PP_Doc -> PP_Doc -> Seq PP_Doc
rule139 Seq PP_Doc
_prodsIsemFunBndTps PP_Doc
_semFunBndTp
_semFunBndDef :: PP_Doc
_semFunBndDef = String -> String -> PP_Doc
rule140 String
_semFunBndNm String
_semname
_semFunBndTp :: PP_Doc
_semFunBndTp = String -> PP_Doc -> PP_Doc
rule141 String
_semFunBndNm PP_Doc
_sem_tp
_semFunBndNm :: String
_semFunBndNm = Identifier -> String
rule142 Identifier
arg_nt_
_prodsOinitial :: Int
_prodsOinitial = Int -> Int
forall a. a -> a
rule143 Int
arg_initial_
_prodsOallstates :: Set Int
_prodsOallstates = Set Int -> Set Int
forall a. a -> a
rule144 Set Int
_allstates
_lhsOappendMain :: PP_Doc
_lhsOappendMain :: PP_Doc
_lhsOappendMain = Set Identifier
-> PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc -> Identifier -> PP_Doc
rule145 Set Identifier
_lhsIwrappers PP_Doc
_sem_nt PP_Doc
_wr_inh_icl PP_Doc
_wr_syn_icl PP_Doc
_wrapper_icl Identifier
arg_nt_
_lhsOappendCommon :: PP_Doc
_lhsOappendCommon :: PP_Doc
_lhsOappendCommon = PP_Doc -> PP_Doc -> Options -> PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc
rule146 PP_Doc
_datatype PP_Doc
_k_states Options
_lhsIoptions PP_Doc
_prodsIt_visits PP_Doc
_t_init_icl PP_Doc
_t_states_icl
_addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule147 Options
_lhsIoptions
_addbangWrap :: a -> a
_addbangWrap = () -> a -> a
forall a. () -> a -> a
rule148 ()
_prodsOnextVisits :: Map Int StateCtx
_prodsOnextVisits = Map Int StateCtx -> Map Int StateCtx
forall a. a -> a
rule149 Map Int StateCtx
arg_nextVisits_
_prodsOprevVisits :: Map Int StateCtx
_prodsOprevVisits = Map Int StateCtx -> Map Int StateCtx
forall a. a -> a
rule150 Map Int StateCtx
arg_prevVisits_
_prodsOlocalAttrTypes :: Map Identifier Attributes
_prodsOlocalAttrTypes = Map Identifier (Map Identifier Attributes)
-> Identifier -> Map Identifier Attributes
rule151 Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes Identifier
arg_nt_
_lhsOinitStates :: Map NontermIdent Int
_lhsOinitStates :: Map Identifier Int
_lhsOinitStates = Int -> Identifier -> Map Identifier Int
forall a k. a -> k -> Map k a
rule152 Int
arg_initial_ Identifier
arg_nt_
_ntType :: Type
_ntType = Identifier -> [Identifier] -> Type
rule153 Identifier
arg_nt_ [Identifier]
arg_params_
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule154 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_prodsIchildvisit
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule155 Seq Error
_prodsIerrors
_lhsOfromToStates :: Map VisitIdentifier (Int,Int)
_lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule156 Map Int (Int, Int)
_prodsIfromToStates
_lhsOgenProdIO :: IO ()
_lhsOgenProdIO :: IO ()
_lhsOgenProdIO = IO () -> IO ()
rule157 IO ()
_prodsIgenProdIO
_lhsOimports :: [PP_Doc]
_lhsOimports :: [PP_Doc]
_lhsOimports = [PP_Doc] -> [PP_Doc]
rule158 [PP_Doc]
_prodsIimports
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind
rule159 Map Int VisitKind
_prodsIvisitKinds
_lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
_lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule160 Map Int (Set Identifier)
_prodsIvisitdefs
_lhsOvisituses :: Map VisitIdentifier (Set Identifier)
_lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule161 Map Int (Set Identifier)
_prodsIvisituses
_prodsOallFromToStates :: Map Int (Int, Int)
_prodsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule162 Map Int (Int, Int)
_lhsIallFromToStates
_prodsOallInitStates :: Map Identifier Int
_prodsOallInitStates = Map Identifier Int -> Map Identifier Int
rule163 Map Identifier Int
_lhsIallInitStates
_prodsOallVisitKinds :: Map Int VisitKind
_prodsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule164 Map Int VisitKind
_lhsIallVisitKinds
_prodsOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_prodsOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule165 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
_prodsOavisitdefs :: Map Int (Set Identifier)
_prodsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule166 Map Int (Set Identifier)
_lhsIavisitdefs
_prodsOavisituses :: Map Int (Set Identifier)
_prodsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule167 Map Int (Set Identifier)
_lhsIavisituses
_prodsOconstructorTypeMap :: Map Identifier ConstructorType
_prodsOconstructorTypeMap = Map Identifier ConstructorType -> Map Identifier ConstructorType
rule168 Map Identifier ConstructorType
_lhsIconstructorTypeMap
_prodsOdclModuleHeader :: String -> String -> String -> Bool -> String
_prodsOdclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule169 String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
_prodsOiclModuleHeader :: String -> String -> String -> Bool -> String
_prodsOiclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule170 String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
_prodsOimportBlocks :: PP_Doc
_prodsOimportBlocks = PP_Doc -> PP_Doc
rule171 PP_Doc
_lhsIimportBlocks
_prodsOmainFile :: String
_prodsOmainFile = String -> String
rule172 String
_lhsImainFile
_prodsOmainName :: String
_prodsOmainName = String -> String
rule173 String
_lhsImainName
_prodsOntType :: Type
_prodsOntType = Type -> Type
forall a. a -> a
rule174 Type
_ntType
_prodsOoptions :: Options
_prodsOoptions = Options -> Options
rule175 Options
_lhsIoptions
_prodsOtextBlocks :: PP_Doc
_prodsOtextBlocks = PP_Doc -> PP_Doc
rule176 PP_Doc
_lhsItextBlocks
__result_ :: T_ENonterminal_vOut7
__result_ = PP_Doc
-> PP_Doc
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> Map Identifier Int
-> PP_Doc
-> PP_Doc
-> Seq PP_Doc
-> Seq PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_ENonterminal_vOut7
T_ENonterminal_vOut7 PP_Doc
_lhsOappendCommon PP_Doc
_lhsOappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOoutput PP_Doc
_lhsOoutput_dcl Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
in T_ENonterminal_vOut7
__result_ )
in T_ENonterminal_v7 -> T_ENonterminal_s8
C_ENonterminal_s8 T_ENonterminal_v7
v7
{-# INLINE rule84 #-}
{-# LINE 58 "src-ag/ExecutionPlan2Clean.ag" #-}
rule84 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 58 "src-ag/ExecutionPlan2Clean.ag" #-}
rename _lhsIoptions
{-# LINE 1140 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule85 #-}
{-# LINE 66 "src-ag/ExecutionPlan2Clean.ag" #-}
rule85 = \ nt_ ->
{-# LINE 66 "src-ag/ExecutionPlan2Clean.ag" #-}
nt_
{-# LINE 1146 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule86 #-}
{-# LINE 78 "src-ag/ExecutionPlan2Clean.ag" #-}
rule86 = \ params_ ->
{-# LINE 78 "src-ag/ExecutionPlan2Clean.ag" #-}
params_
{-# LINE 1152 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule87 #-}
{-# LINE 82 "src-ag/ExecutionPlan2Clean.ag" #-}
rule87 = \ classCtxs_ ->
{-# LINE 82 "src-ag/ExecutionPlan2Clean.ag" #-}
classCtxs_
{-# LINE 1158 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule88 #-}
{-# LINE 102 "src-ag/ExecutionPlan2Clean.ag" #-}
rule88 = \ _hasWrapper _k_states ((_lhsIoptions) :: Options) ((_prodsIsem_prod) :: PP_Doc) _sem_nt _t_init_icl _t_states_icl _wr_inh_icl _wr_syn_icl _wrapper_icl nt_ ->
{-# LINE 102 "src-ag/ExecutionPlan2Clean.ag" #-}
("// " ++ getName nt_ ++ " " ++ replicate (60 - length (getName nt_)) '-')
>-< (if _hasWrapper
then "// wrapper"
>-< _wr_inh_icl
>-< _wr_syn_icl
>-< _wrapper_icl
>-< ""
else empty)
>-< (if folds _lhsIoptions
then "// cata"
>-< _sem_nt
>-< ""
else empty)
>-< (if semfuns _lhsIoptions
then "// semantic domain"
>-< _t_init_icl
>-< _t_states_icl
>-< _k_states
>-< _prodsIsem_prod
>-< ""
else empty)
{-# LINE 1184 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule89 #-}
{-# LINE 123 "src-ag/ExecutionPlan2Clean.ag" #-}
rule89 = \ ((_lhsIwrappers) :: Set NontermIdent) nt_ ->
{-# LINE 123 "src-ag/ExecutionPlan2Clean.ag" #-}
nt_ `Set.member` _lhsIwrappers
{-# LINE 1190 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule90 #-}
{-# LINE 125 "src-ag/ExecutionPlan2Clean.ag" #-}
rule90 = \ _datatype _hasWrapper ((_lhsIoptions) :: Options) ((_prodsIsem_prod_tys) :: PP_Doc) ((_prodsIt_visits) :: PP_Doc) _sem_tp _semname _t_init_dcl _t_states_dcl _wr_inh_dcl _wr_syn_dcl _wrapper_dcl nt_ ->
{-# LINE 125 "src-ag/ExecutionPlan2Clean.ag" #-}
("// " ++ getName nt_ ++ " " ++ replicate (60 - length (getName nt_)) '-')
>-< (if dataTypes _lhsIoptions
then "// data"
>-< _datatype
>-< ""
else empty)
>-< (if _hasWrapper
then "// wrapper"
>-< _wr_inh_dcl
>-< _wr_syn_dcl
>-< _wrapper_dcl
>-< ""
else empty)
>-< (if folds _lhsIoptions
then "// cata"
>-< _semname >#< "::" >#< _sem_tp
>-< ""
else empty)
>-< (if semfuns _lhsIoptions
then "// semantic domain"
>-< _t_init_dcl
>-< _t_states_dcl
>-< _prodsIt_visits
>-< _prodsIsem_prod_tys
>-< ""
else empty)
{-# LINE 1221 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule91 #-}
{-# LINE 163 "src-ag/ExecutionPlan2Clean.ag" #-}
rule91 = \ classCtxs_ ->
{-# LINE 163 "src-ag/ExecutionPlan2Clean.ag" #-}
ppClasses $ classCtxsToDocs classCtxs_
{-# LINE 1227 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule92 #-}
{-# LINE 164 "src-ag/ExecutionPlan2Clean.ag" #-}
rule92 = \ _classPP _t_params nt_ ->
{-# LINE 164 "src-ag/ExecutionPlan2Clean.ag" #-}
"::" >#< _classPP >#< nt_ >#< _t_params >#< ":=="
{-# LINE 1233 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule93 #-}
{-# LINE 165 "src-ag/ExecutionPlan2Clean.ag" #-}
rule93 = \ _aliasPre _classPP _derivings ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ((_lhsItypeSyns) :: TypeSyns) ((_prodsIdatatype) :: [PP_Doc]) ((_prodsIrecordtype) :: PP_Doc) _t_params nt_ ->
{-# LINE 165 "src-ag/ExecutionPlan2Clean.ag" #-}
case lookup nt_ _lhsItypeSyns of
Nothing -> "::" >#< _classPP >#< nt_ >#< _t_params
>-< ( if null _prodsIdatatype
then empty
else if isRecordConstructor nt_ _lhsIconstructorTypeMap
then indent 2 $ "=" >#< _prodsIrecordtype
else indent 2 $ vlist $ ( ("=" >#< head _prodsIdatatype)
: (map ("|" >#<) $ tail _prodsIdatatype))
)
>-< indent 2 _derivings
Just (List t) -> _aliasPre >#< "[" >#< show t >#< "]"
Just (Maybe t) -> _aliasPre >#< "Data.Maybe" >#< pp_parens (show t)
Just (Tuple ts) -> _aliasPre >#< pp_parens (ppCommas $ map (show . snd) ts)
Just (Either l r) -> _aliasPre >#< "Data.Either" >#< pp_parens (show l) >#< pp_parens (show r)
Just (Map k v) -> _aliasPre >#< "Data.Map" >#< pp_parens (show k) >#< pp_parens (show v)
Just (IntMap t) -> _aliasPre >#< "Data.IntMap.IntMap" >#< pp_parens (show t)
Just (OrdSet t) -> _aliasPre >#< "Data.Set.Set" >#< pp_parens (show t)
Just IntSet -> _aliasPre >#< "Data.IntSet.IntSet"
{-# LINE 1256 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule94 #-}
{-# LINE 184 "src-ag/ExecutionPlan2Clean.ag" #-}
rule94 = \ ((_lhsIderivings) :: Derivings) nt_ ->
{-# LINE 184 "src-ag/ExecutionPlan2Clean.ag" #-}
case Map.lookup nt_ _lhsIderivings of
Nothing -> empty
Just s -> if Set.null s
then empty
else "deriving" >#< (pp_parens $ ppCommas $ map pp $ Set.toList s)
{-# LINE 1266 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule95 #-}
{-# LINE 269 "src-ag/ExecutionPlan2Clean.ag" #-}
rule95 = \ (_ :: ()) ->
{-# LINE 269 "src-ag/ExecutionPlan2Clean.ag" #-}
\x -> "sem_" ++ show x
{-# LINE 1272 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule96 #-}
{-# LINE 270 "src-ag/ExecutionPlan2Clean.ag" #-}
rule96 = \ _fsemname nt_ ->
{-# LINE 270 "src-ag/ExecutionPlan2Clean.ag" #-}
_fsemname nt_
{-# LINE 1278 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule97 #-}
{-# LINE 271 "src-ag/ExecutionPlan2Clean.ag" #-}
rule97 = \ _fsemname ->
{-# LINE 271 "src-ag/ExecutionPlan2Clean.ag" #-}
\t x -> case t of
NT nt _ _ -> pp_parens (_fsemname nt >#< x)
_ -> pp x
{-# LINE 1286 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule98 #-}
{-# LINE 277 "src-ag/ExecutionPlan2Clean.ag" #-}
rule98 = \ _classPP _quantPP _t_params _t_type nt_ ->
{-# LINE 277 "src-ag/ExecutionPlan2Clean.ag" #-}
_quantPP >#< _classPP >#< nt_ >#< _t_params >#< "->" >#< _t_type >#< _t_params
{-# LINE 1292 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule99 #-}
{-# LINE 278 "src-ag/ExecutionPlan2Clean.ag" #-}
rule99 = \ params_ ->
{-# LINE 278 "src-ag/ExecutionPlan2Clean.ag" #-}
ppQuants params_
{-# LINE 1298 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule100 #-}
{-# LINE 280 "src-ag/ExecutionPlan2Clean.ag" #-}
rule100 = \ _frecarg _fsemname ((_lhsItypeSyns) :: TypeSyns) ((_prodsIsem_nt) :: PP_Doc) _sem_tp _semname nt_ ->
{-# LINE 280 "src-ag/ExecutionPlan2Clean.ag" #-}
_semname >#< "::" >#< _sem_tp
>-< case lookup nt_ _lhsItypeSyns of
Nothing -> _prodsIsem_nt
Just (List t) -> _semname >#< "list" >#< "=" >#< "foldr" >#< _semname >|< "_Cons"
>#< _semname >|< "_Nil"
>#< case t of
NT nt _ _ -> pp_parens ("map" >#< _fsemname nt >#< "list")
_ -> pp "list"
Just (Maybe t) -> _semname >#< "'Data.Maybe'.Nothing" >#< "=" >#< _semname >|< "_Nothing"
>-< _semname >#< pp_parens ("'Data.Maybe'.Just just") >#< "="
>#< _semname >|< "_Just" >#< _frecarg t "just"
Just (Tuple ts) -> _semname >#< pp_parens (ppCommas $ map fst ts) >#< "="
>#< _semname >|< "_Tuple" >#< ppSpaced (map (\t -> _frecarg (snd t) (show $ fst t)) ts)
Just (Either l r) -> _semname >#< "('Data.Either'.Left left)" >#< "=" >#< _semname >|< "_Left" >#< _frecarg l "left"
>-< _semname >#< "('Data.Either'.Right right)" >#< "=" >#< _semname >|< "_Right" >#< _frecarg r "right"
Just (Map k v) -> _semname >#< "m" >#< "=" >#< "'Data.Map'.foldrWithKey"
>#< _semname >|< "_Entry" >#< _semname >|< "_Nil"
>#< case v of
NT nt _ _ -> pp_parens ("'Data.Map'.map" >#< _fsemname nt >#< "m")
_ -> pp "m"
Just (IntMap v) -> _semname >#< "m" >#< "=" >#< "'Data.IntMap'.foldWithKey"
>#< _semname >|< "_Entry" >#< _semname >|< "_Nil"
>#< case v of
NT nt _ _ -> pp_parens ("'Data.IntMap'.map" >#< _fsemname nt >#< "m")
_ -> pp "m"
Just (OrdSet t) -> _semname >#< "s" >#< "=" >#< "foldr" >#< _semname >|< "_Entry"
>#< _semname >|< "_Nil"
>#< pp_parens (
( case t of
NT nt _ _ -> pp_parens ("map" >#< _fsemname nt)
_ -> empty
) >#< pp_parens ("'Data.IntSet'.elems" >#< "s")
)
Just IntSet -> _semname >#< "s" >#< "=" >#< "foldr" >#< _semname >|< "_Entry"
>#< _semname >|< "_Nil"
>#< pp_parens ("'Data.IntSet'.elems" >#< "s")
{-# LINE 1339 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule101 #-}
{-# LINE 366 "src-ag/ExecutionPlan2Clean.ag" #-}
rule101 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) nt_ ->
{-# LINE 366 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.lookup nt_ _lhsIinhmap
{-# LINE 1345 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule102 #-}
{-# LINE 367 "src-ag/ExecutionPlan2Clean.ag" #-}
rule102 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) nt_ ->
{-# LINE 367 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.lookup nt_ _lhsIsynmap
{-# LINE 1351 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule103 #-}
{-# LINE 368 "src-ag/ExecutionPlan2Clean.ag" #-}
rule103 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->
{-# LINE 368 "src-ag/ExecutionPlan2Clean.ag" #-}
_lhsIinhmap
{-# LINE 1357 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule104 #-}
{-# LINE 369 "src-ag/ExecutionPlan2Clean.ag" #-}
rule104 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->
{-# LINE 369 "src-ag/ExecutionPlan2Clean.ag" #-}
_lhsIsynmap
{-# LINE 1363 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule105 #-}
{-# LINE 390 "src-ag/ExecutionPlan2Clean.ag" #-}
rule105 = \ ((_prodsIallvisits) :: [VisitStateState]) ->
{-# LINE 390 "src-ag/ExecutionPlan2Clean.ag" #-}
Set.fromList $ map (\(_,f,_) -> f) _prodsIallvisits
{-# LINE 1369 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule106 #-}
{-# LINE 391 "src-ag/ExecutionPlan2Clean.ag" #-}
rule106 = \ ((_prodsIallvisits) :: [VisitStateState]) ->
{-# LINE 391 "src-ag/ExecutionPlan2Clean.ag" #-}
Set.fromList $ map (\(_,_,t) -> t) _prodsIallvisits
{-# LINE 1375 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule107 #-}
{-# LINE 392 "src-ag/ExecutionPlan2Clean.ag" #-}
rule107 = \ _inedges _outedges initial_ ->
{-# LINE 392 "src-ag/ExecutionPlan2Clean.ag" #-}
Set.insert initial_ $ _inedges `Set.union` _outedges
{-# LINE 1381 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule108 #-}
{-# LINE 393 "src-ag/ExecutionPlan2Clean.ag" #-}
rule108 = \ ((_prodsIallvisits) :: [VisitStateState]) ->
{-# LINE 393 "src-ag/ExecutionPlan2Clean.ag" #-}
\st -> filter (\(v,f,t) -> f == st) _prodsIallvisits
{-# LINE 1387 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule109 #-}
{-# LINE 394 "src-ag/ExecutionPlan2Clean.ag" #-}
rule109 = \ nt_ ->
{-# LINE 394 "src-ag/ExecutionPlan2Clean.ag" #-}
"T_" >|< nt_
{-# LINE 1393 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule110 #-}
{-# LINE 395 "src-ag/ExecutionPlan2Clean.ag" #-}
rule110 = \ nt_ ->
{-# LINE 395 "src-ag/ExecutionPlan2Clean.ag" #-}
"t_" >|< nt_
{-# LINE 1399 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule111 #-}
{-# LINE 396 "src-ag/ExecutionPlan2Clean.ag" #-}
rule111 = \ params_ ->
{-# LINE 396 "src-ag/ExecutionPlan2Clean.ag" #-}
ppSpaced params_
{-# LINE 1405 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule112 #-}
{-# LINE 397 "src-ag/ExecutionPlan2Clean.ag" #-}
rule112 = \ _lt_type _t_init_dcl _t_type ->
{-# LINE 397 "src-ag/ExecutionPlan2Clean.ag" #-}
_t_init_dcl >-<
"attach_" >|< _t_type >#< pp_parens (_t_type >#< _lt_type ) >#< "=" >#< _lt_type
{-# LINE 1412 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule113 #-}
{-# LINE 399 "src-ag/ExecutionPlan2Clean.ag" #-}
rule113 = \ ((_lhsIoptions) :: Options) _t_params _t_type initial_ ->
{-# LINE 399 "src-ag/ExecutionPlan2Clean.ag" #-}
"::" >#< _t_type >#< _t_params >#< "=" >#< _t_type
>#<
pp_parens (
ppMonadType _lhsIoptions >#< pp_parens (_t_type >|< "_s" >|< initial_ >#< _t_params ))
{-# LINE 1421 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule114 #-}
{-# LINE 403 "src-ag/ExecutionPlan2Clean.ag" #-}
rule114 = \ _allstates nextVisits_ nt_ ->
{-# LINE 403 "src-ag/ExecutionPlan2Clean.ag" #-}
vlist $ map (\st ->
let nt_st = nt_ >|< "_s" >|< st
c_st = "C_" >|< nt_st
inv_st = "inv_" >|< nt_st
nextVisit = Map.findWithDefault ManyVis st nextVisits_
in case nextVisit of
NoneVis -> empty
OneVis vId -> inv_st >#< pp_parens (c_st >#< "x") >#< "=" >#< "x"
ManyVis -> empty
) $ Set.toList _allstates
{-# LINE 1436 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule115 #-}
{-# LINE 413 "src-ag/ExecutionPlan2Clean.ag" #-}
rule115 = \ _allstates _t_params nextVisits_ nt_ ->
{-# LINE 413 "src-ag/ExecutionPlan2Clean.ag" #-}
vlist $ map (\st ->
let nt_st = nt_ >|< "_s" >|< st
t_st = "T_" >|< nt_st
k_st = "K_" >|< nt_st
c_st = "C_" >|< nt_st
inv_st = "inv_" >|< nt_st
nextVisit = Map.findWithDefault ManyVis st nextVisits_
in case nextVisit of
NoneVis -> "::" >#< t_st >#< _t_params >#< "=" >#< c_st
OneVis vId -> "::" >#< t_st >#< _t_params >#< "=" >#< c_st >#< (pp_parens (conNmTVisit nt_ vId >#< _t_params ))
ManyVis -> "::" >#< t_st >#< _t_params >#< "where" >#< c_st >#< "::"
>#< (pp_braces $ inv_st >#< "::" >#< "!" >|< pp_parens ("E.t:" >#< k_st >#< _t_params >#< "t" >#< "->" >#< "t"))
>#< "->" >#< t_st >#< _t_params
) $ Set.toList _allstates
{-# LINE 1455 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule116 #-}
{-# LINE 430 "src-ag/ExecutionPlan2Clean.ag" #-}
rule116 = \ nt_ ->
{-# LINE 430 "src-ag/ExecutionPlan2Clean.ag" #-}
"K_" ++ show nt_
{-# LINE 1461 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule117 #-}
{-# LINE 431 "src-ag/ExecutionPlan2Clean.ag" #-}
rule117 = \ _allstates _k_type ((_prodsIallvisits) :: [VisitStateState]) _t_params _t_type nextVisits_ nt_ ->
{-# LINE 431 "src-ag/ExecutionPlan2Clean.ag" #-}
vlist $ map (\st ->
let nt_st = nt_ >|< "_s" >|< st
k_st = "K_" >|< nt_st
outg = filter (\(v,f,t) -> f == st) _prodsIallvisits
visitlist = vlist $ map (\(v,f,t) ->
_k_type >|< "_v" >|< v >#< "::" >#< k_st >#< _t_params >#< pp_parens (_t_type >|< "_v" >|< v >#< _t_params )
) outg
nextVisit = Map.findWithDefault ManyVis st nextVisits_
decl = "::" >#< k_st >#< "k" >#< _t_params >#< "where" >-< indent 3 visitlist
in case nextVisit of
NoneVis -> empty
OneVis _ -> empty
ManyVis -> decl
) $ Set.toList _allstates
{-# LINE 1480 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule118 #-}
{-# LINE 499 "src-ag/ExecutionPlan2Clean.ag" #-}
rule118 = \ _genwrap_icl _wr_inhs ->
{-# LINE 499 "src-ag/ExecutionPlan2Clean.ag" #-}
_genwrap_icl "Inh" _wr_inhs
{-# LINE 1486 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule119 #-}
{-# LINE 500 "src-ag/ExecutionPlan2Clean.ag" #-}
rule119 = \ _genwrap_icl _wr_syns ->
{-# LINE 500 "src-ag/ExecutionPlan2Clean.ag" #-}
_genwrap_icl "Syn" _wr_syns
{-# LINE 1492 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule120 #-}
{-# LINE 501 "src-ag/ExecutionPlan2Clean.ag" #-}
rule120 = \ _addbang nt_ ->
{-# LINE 501 "src-ag/ExecutionPlan2Clean.ag" #-}
\nm attr ->
let tyConName = nm >|< "_" >|< nt_
in (let (d, _, _) = foldr (\(i, t) (d, c, n) -> (d >-<
i >|< "_" >|< tyConName >#< "::" >#< tyConName >#< "->" >#< (_addbang $ pp_parens $ typeToHaskellString (Just nt_) [] t)
>-< i >|< "_" >|< tyConName >#< pp_parens (tyConName >#< unwords (replicate (n - c - 1) "_" ++ ["x"] ++ replicate c "_")) >#< "= x"
, c + 1, n)
) (empty, 0, length attr) attr
in d)
{-# LINE 1505 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule121 #-}
{-# LINE 509 "src-ag/ExecutionPlan2Clean.ag" #-}
rule121 = \ _genwrap_dcl _wr_inhs ->
{-# LINE 509 "src-ag/ExecutionPlan2Clean.ag" #-}
_genwrap_dcl "Inh" _wr_inhs
{-# LINE 1511 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule122 #-}
{-# LINE 510 "src-ag/ExecutionPlan2Clean.ag" #-}
rule122 = \ _genwrap_dcl _wr_syns ->
{-# LINE 510 "src-ag/ExecutionPlan2Clean.ag" #-}
_genwrap_dcl "Syn" _wr_syns
{-# LINE 1517 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule123 #-}
{-# LINE 511 "src-ag/ExecutionPlan2Clean.ag" #-}
rule123 = \ _addbang _t_params nt_ ->
{-# LINE 511 "src-ag/ExecutionPlan2Clean.ag" #-}
\nm attr ->
let tyConName = nm >|< "_" >|< nt_
in "::" >#< tyConName >#< _t_params >#< "=" >#< tyConName
>#< (ppSpaced $ map (\(_,t) -> _addbang $ pp_parens $ typeToHaskellString (Just nt_) [] t) attr)
>-<
(let (d, _, _) = foldr (\(i, t) (d, c, n) -> (d >-<
i >|< "_" >|< tyConName >#< "::" >#< tyConName >#< "->" >#< (_addbang $ pp_parens $ typeToHaskellString (Just nt_) [] t)
, c + 1, n)
) (empty, 0, length attr) attr
in d)
{-# LINE 1532 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule124 #-}
{-# LINE 521 "src-ag/ExecutionPlan2Clean.ag" #-}
rule124 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) nt_ ->
{-# LINE 521 "src-ag/ExecutionPlan2Clean.ag" #-}
fromJust $ Map.lookup nt_ _lhsIinhmap
{-# LINE 1538 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule125 #-}
{-# LINE 522 "src-ag/ExecutionPlan2Clean.ag" #-}
rule125 = \ _synAttrs _wr_filter ->
{-# LINE 522 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.toList $ _wr_filter $ _synAttrs
{-# LINE 1544 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule126 #-}
{-# LINE 523 "src-ag/ExecutionPlan2Clean.ag" #-}
rule126 = \ _synAttrs ->
{-# LINE 523 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.toList _synAttrs
{-# LINE 1550 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule127 #-}
{-# LINE 524 "src-ag/ExecutionPlan2Clean.ag" #-}
rule127 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 524 "src-ag/ExecutionPlan2Clean.ag" #-}
if lateHigherOrderBinding _lhsIoptions
then Map.delete idLateBindingAttr
else id
{-# LINE 1558 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule128 #-}
{-# LINE 527 "src-ag/ExecutionPlan2Clean.ag" #-}
rule128 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) nt_ ->
{-# LINE 527 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.toList $ fromJust $ Map.lookup nt_ _lhsIsynmap
{-# LINE 1564 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule129 #-}
{-# LINE 528 "src-ag/ExecutionPlan2Clean.ag" #-}
rule129 = \ ((_lhsIoptions) :: Options) _wr_inhs ->
{-# LINE 528 "src-ag/ExecutionPlan2Clean.ag" #-}
map (lhsname _lhsIoptions True . fst) _wr_inhs
{-# LINE 1570 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule130 #-}
{-# LINE 529 "src-ag/ExecutionPlan2Clean.ag" #-}
rule130 = \ ((_lhsIoptions) :: Options) _wr_inhs1 ->
{-# LINE 529 "src-ag/ExecutionPlan2Clean.ag" #-}
map (lhsname _lhsIoptions True . fst) _wr_inhs1
{-# LINE 1576 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule131 #-}
{-# LINE 530 "src-ag/ExecutionPlan2Clean.ag" #-}
rule131 = \ ((_lhsIoptions) :: Options) _wr_syns ->
{-# LINE 530 "src-ag/ExecutionPlan2Clean.ag" #-}
map (lhsname _lhsIoptions False . fst) _wr_syns
{-# LINE 1582 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule132 #-}
{-# LINE 531 "src-ag/ExecutionPlan2Clean.ag" #-}
rule132 = \ nt_ ->
{-# LINE 531 "src-ag/ExecutionPlan2Clean.ag" #-}
"wrap_" ++ show nt_
{-# LINE 1588 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule133 #-}
{-# LINE 532 "src-ag/ExecutionPlan2Clean.ag" #-}
rule133 = \ nt_ ->
{-# LINE 532 "src-ag/ExecutionPlan2Clean.ag" #-}
"Inh_" ++ show nt_
{-# LINE 1594 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule134 #-}
{-# LINE 533 "src-ag/ExecutionPlan2Clean.ag" #-}
rule134 = \ nt_ ->
{-# LINE 533 "src-ag/ExecutionPlan2Clean.ag" #-}
"Syn_" ++ show nt_
{-# LINE 1600 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule135 #-}
{-# LINE 534 "src-ag/ExecutionPlan2Clean.ag" #-}
rule135 = \ initial_ nextVisits_ ->
{-# LINE 534 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.findWithDefault ManyVis initial_ nextVisits_
{-# LINE 1606 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule136 #-}
{-# LINE 535 "src-ag/ExecutionPlan2Clean.ag" #-}
rule136 = \ _addbang _addbangWrap _classPP _firstVisitInfo _inhlist _inhlist1 _inhname _k_type ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ((_lhsImainName) :: String) ((_lhsIoptions) :: Options) _quantPP _synlist _synname _t_params _t_type _wrapname initial_ initialv_ nt_ ->
{-# LINE 535 "src-ag/ExecutionPlan2Clean.ag" #-}
(_wrapname >#< "::" >#< _quantPP >#< _classPP >#< _t_type >#< _t_params
>#< _inhname >#< _t_params >#< "->" >#< ( if monadicWrappers _lhsIoptions then ppMonadType _lhsIoptions else empty) >#< pp_parens (_synname >#< _t_params ))
>-< (_wrapname >#< (_addbang $ pp_parens (_t_type >#< pp "act"))
>#< (_addbang $ pp_parens (_inhname
>#< (ppSpaced $ map (_addbangWrap . pp) _inhlist )) >#< "="))
>-<
indent 3 (case initialv_ of
[] -> text _synname
(initv:_) ->
let inCon = conNmTVisitIn nt_ initv
outCon = conNmTVisitOut nt_ initv
pat = _addbang $ pp_parens $ pat0
pat0 = outCon >#< ppSpaced _synlist
arg = inCon >#< ppSpaced _inhlist1
ind = case _firstVisitInfo of
NoneVis -> error "wrapper: initial state should have a next visit but it has none"
OneVis _ -> empty
ManyVis -> _k_type >|< "_v" >|< initv
extra = if dummyTokenVisit _lhsIoptions
then pp $ dummyArg _lhsIoptions True
else empty
convert = case Map.lookup initv _lhsIallVisitKinds of
Just kind -> case kind of
VisitPure _ -> text "lift"
VisitMonadic -> empty
_ -> empty
unMonad | monadicWrappers _lhsIoptions = empty
| otherwise = unMon _lhsIoptions
in unMonad >#< "("
>-< indent 2
("act >>= \\" >#< _addbang (pp "sem") >#< "->"
>-< "lift" >#< pp_parens arg >#< ">>= \\" >#< _addbangWrap (pp "arg") >#< "->"
>-< convert >#< pp_parens ("inv_" >|< nt_ >|< "_s" >|< initial_ >#< "sem" >#< ind >#< "arg" >#< extra) >#< ">>= \\" >#< pat >#< "->"
>-< "lift" >#< pp_parens (_synname >#< ppSpaced _synlist )
)
>-< ")" )
>-< if lateHigherOrderBinding _lhsIoptions
then indent 2 ("where" >#< lhsname _lhsIoptions True idLateBindingAttr >#< "=" >#< lateBindingFieldNm _lhsImainName)
else empty
{-# LINE 1650 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule137 #-}
{-# LINE 575 "src-ag/ExecutionPlan2Clean.ag" #-}
rule137 = \ _classPP _inhname ((_lhsIoptions) :: Options) _quantPP _synname _t_params _t_type _wrapname ->
{-# LINE 575 "src-ag/ExecutionPlan2Clean.ag" #-}
(_wrapname >#< "::" >#< _quantPP >#< _classPP >#< _t_type >#< _t_params
>#< _inhname >#< _t_params >#< "->" >#< ( if monadicWrappers _lhsIoptions then ppMonadType _lhsIoptions else empty) >#< pp_parens (_synname >#< _t_params ))
{-# LINE 1657 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule138 #-}
{-# LINE 584 "src-ag/ExecutionPlan2Clean.ag" #-}
rule138 = \ ((_prodsIsemFunBndDefs) :: Seq PP_Doc) _semFunBndDef ->
{-# LINE 584 "src-ag/ExecutionPlan2Clean.ag" #-}
_semFunBndDef Seq.<| _prodsIsemFunBndDefs
{-# LINE 1663 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule139 #-}
{-# LINE 585 "src-ag/ExecutionPlan2Clean.ag" #-}
rule139 = \ ((_prodsIsemFunBndTps) :: Seq PP_Doc) _semFunBndTp ->
{-# LINE 585 "src-ag/ExecutionPlan2Clean.ag" #-}
_semFunBndTp Seq.<| _prodsIsemFunBndTps
{-# LINE 1669 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule140 #-}
{-# LINE 586 "src-ag/ExecutionPlan2Clean.ag" #-}
rule140 = \ _semFunBndNm _semname ->
{-# LINE 586 "src-ag/ExecutionPlan2Clean.ag" #-}
_semFunBndNm >#< "=" >#< _semname
{-# LINE 1675 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule141 #-}
{-# LINE 587 "src-ag/ExecutionPlan2Clean.ag" #-}
rule141 = \ _semFunBndNm _sem_tp ->
{-# LINE 587 "src-ag/ExecutionPlan2Clean.ag" #-}
_semFunBndNm >#< "::" >#< _sem_tp
{-# LINE 1681 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule142 #-}
{-# LINE 588 "src-ag/ExecutionPlan2Clean.ag" #-}
rule142 = \ nt_ ->
{-# LINE 588 "src-ag/ExecutionPlan2Clean.ag" #-}
lateSemNtLabel nt_
{-# LINE 1687 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule143 #-}
{-# LINE 622 "src-ag/ExecutionPlan2Clean.ag" #-}
rule143 = \ initial_ ->
{-# LINE 622 "src-ag/ExecutionPlan2Clean.ag" #-}
initial_
{-# LINE 1693 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule144 #-}
{-# LINE 623 "src-ag/ExecutionPlan2Clean.ag" #-}
rule144 = \ _allstates ->
{-# LINE 623 "src-ag/ExecutionPlan2Clean.ag" #-}
_allstates
{-# LINE 1699 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule145 #-}
{-# LINE 1469 "src-ag/ExecutionPlan2Clean.ag" #-}
rule145 = \ ((_lhsIwrappers) :: Set NontermIdent) _sem_nt _wr_inh_icl _wr_syn_icl _wrapper_icl nt_ ->
{-# LINE 1469 "src-ag/ExecutionPlan2Clean.ag" #-}
(if nt_ `Set.member` _lhsIwrappers
then _wr_inh_icl
>-< _wr_syn_icl
>-< _wrapper_icl
else empty)
>-< _sem_nt
{-# LINE 1710 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule146 #-}
{-# LINE 1475 "src-ag/ExecutionPlan2Clean.ag" #-}
rule146 = \ _datatype _k_states ((_lhsIoptions) :: Options) ((_prodsIt_visits) :: PP_Doc) _t_init_icl _t_states_icl ->
{-# LINE 1475 "src-ag/ExecutionPlan2Clean.ag" #-}
(if dataTypes _lhsIoptions then _datatype else empty)
>-< _t_init_icl
>-< _t_states_icl
>-< _k_states
>-< _prodsIt_visits
{-# LINE 1720 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule147 #-}
{-# LINE 1566 "src-ag/ExecutionPlan2Clean.ag" #-}
rule147 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 1566 "src-ag/ExecutionPlan2Clean.ag" #-}
\x -> if bangpats _lhsIoptions then "!" >|< x else x
{-# LINE 1726 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule148 #-}
{-# LINE 1574 "src-ag/ExecutionPlan2Clean.ag" #-}
rule148 = \ (_ :: ()) ->
{-# LINE 1574 "src-ag/ExecutionPlan2Clean.ag" #-}
id
{-# LINE 1732 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule149 #-}
{-# LINE 1586 "src-ag/ExecutionPlan2Clean.ag" #-}
rule149 = \ nextVisits_ ->
{-# LINE 1586 "src-ag/ExecutionPlan2Clean.ag" #-}
nextVisits_
{-# LINE 1738 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule150 #-}
{-# LINE 1587 "src-ag/ExecutionPlan2Clean.ag" #-}
rule150 = \ prevVisits_ ->
{-# LINE 1587 "src-ag/ExecutionPlan2Clean.ag" #-}
prevVisits_
{-# LINE 1744 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule151 #-}
{-# LINE 1631 "src-ag/ExecutionPlan2Clean.ag" #-}
rule151 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) nt_ ->
{-# LINE 1631 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.findWithDefault Map.empty nt_ _lhsIlocalAttrTypes
{-# LINE 1750 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule152 #-}
{-# LINE 1658 "src-ag/ExecutionPlan2Clean.ag" #-}
rule152 = \ initial_ nt_ ->
{-# LINE 1658 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton nt_ initial_
{-# LINE 1756 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule153 #-}
{-# LINE 1672 "src-ag/ExecutionPlan2Clean.ag" #-}
rule153 = \ nt_ params_ ->
{-# LINE 1672 "src-ag/ExecutionPlan2Clean.ag" #-}
NT nt_ (map show params_) False
{-# LINE 1762 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule154 #-}
rule154 = \ ((_prodsIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
_prodsIchildvisit
{-# INLINE rule155 #-}
rule155 = \ ((_prodsIerrors) :: Seq Error) ->
_prodsIerrors
{-# INLINE rule156 #-}
rule156 = \ ((_prodsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->
_prodsIfromToStates
{-# INLINE rule157 #-}
rule157 = \ ((_prodsIgenProdIO) :: IO ()) ->
_prodsIgenProdIO
{-# INLINE rule158 #-}
rule158 = \ ((_prodsIimports) :: [PP_Doc]) ->
_prodsIimports
{-# INLINE rule159 #-}
rule159 = \ ((_prodsIvisitKinds) :: Map VisitIdentifier VisitKind) ->
_prodsIvisitKinds
{-# INLINE rule160 #-}
rule160 = \ ((_prodsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_prodsIvisitdefs
{-# INLINE rule161 #-}
rule161 = \ ((_prodsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->
_prodsIvisituses
{-# INLINE rule162 #-}
rule162 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule163 #-}
rule163 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule164 #-}
rule164 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule165 #-}
rule165 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
_lhsIallchildvisit
{-# INLINE rule166 #-}
rule166 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule167 #-}
rule167 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule168 #-}
rule168 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->
_lhsIconstructorTypeMap
{-# INLINE rule169 #-}
rule169 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->
_lhsIdclModuleHeader
{-# INLINE rule170 #-}
rule170 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->
_lhsIiclModuleHeader
{-# INLINE rule171 #-}
rule171 = \ ((_lhsIimportBlocks) :: PP_Doc) ->
_lhsIimportBlocks
{-# INLINE rule172 #-}
rule172 = \ ((_lhsImainFile) :: String) ->
_lhsImainFile
{-# INLINE rule173 #-}
rule173 = \ ((_lhsImainName) :: String) ->
_lhsImainName
{-# INLINE rule174 #-}
rule174 = \ _ntType ->
_ntType
{-# INLINE rule175 #-}
rule175 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule176 #-}
rule176 = \ ((_lhsItextBlocks) :: PP_Doc) ->
_lhsItextBlocks
data Inh_ENonterminals = Inh_ENonterminals { Inh_ENonterminals -> Map Int (Int, Int)
allFromToStates_Inh_ENonterminals :: (Map VisitIdentifier (Int,Int)), Inh_ENonterminals -> Map Identifier Int
allInitStates_Inh_ENonterminals :: (Map NontermIdent Int), Inh_ENonterminals -> Map Int VisitKind
allVisitKinds_Inh_ENonterminals :: (Map VisitIdentifier VisitKind), Inh_ENonterminals
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
allchildvisit_Inh_ENonterminals :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Inh_ENonterminals -> Map Int (Set Identifier)
avisitdefs_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)), Inh_ENonterminals -> Map Int (Set Identifier)
avisituses_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)), Inh_ENonterminals -> Map Identifier ConstructorType
constructorTypeMap_Inh_ENonterminals :: (Map NontermIdent ConstructorType), :: (String -> String -> String -> Bool -> String), Inh_ENonterminals -> Derivings
derivings_Inh_ENonterminals :: (Derivings), :: (String -> String -> String -> Bool -> String), Inh_ENonterminals -> PP_Doc
importBlocks_Inh_ENonterminals :: (PP_Doc), Inh_ENonterminals -> Map Identifier Attributes
inhmap_Inh_ENonterminals :: (Map NontermIdent Attributes), Inh_ENonterminals -> Map Identifier (Map Identifier Attributes)
localAttrTypes_Inh_ENonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), Inh_ENonterminals -> String
mainFile_Inh_ENonterminals :: (String), Inh_ENonterminals -> String
mainName_Inh_ENonterminals :: (String), Inh_ENonterminals -> Options
options_Inh_ENonterminals :: (Options), Inh_ENonterminals -> Map Identifier Attributes
synmap_Inh_ENonterminals :: (Map NontermIdent Attributes), Inh_ENonterminals -> PP_Doc
textBlocks_Inh_ENonterminals :: (PP_Doc), Inh_ENonterminals -> TypeSyns
typeSyns_Inh_ENonterminals :: (TypeSyns), Inh_ENonterminals -> Set Identifier
wrappers_Inh_ENonterminals :: (Set NontermIdent) }
data Syn_ENonterminals = Syn_ENonterminals { Syn_ENonterminals -> [PP_Doc]
appendCommon_Syn_ENonterminals :: ([PP_Doc]), Syn_ENonterminals -> [PP_Doc]
appendMain_Syn_ENonterminals :: ([PP_Doc]), Syn_ENonterminals
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
childvisit_Syn_ENonterminals :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Syn_ENonterminals -> Seq Error
errors_Syn_ENonterminals :: (Seq Error), Syn_ENonterminals -> Map Int (Int, Int)
fromToStates_Syn_ENonterminals :: (Map VisitIdentifier (Int,Int)), Syn_ENonterminals -> IO ()
genProdIO_Syn_ENonterminals :: (IO ()), Syn_ENonterminals -> [PP_Doc]
imports_Syn_ENonterminals :: ([PP_Doc]), Syn_ENonterminals -> Map Identifier Int
initStates_Syn_ENonterminals :: (Map NontermIdent Int), Syn_ENonterminals -> PP_Doc
output_Syn_ENonterminals :: (PP_Doc), Syn_ENonterminals -> PP_Doc
output_dcl_Syn_ENonterminals :: (PP_Doc), Syn_ENonterminals -> Seq PP_Doc
semFunBndDefs_Syn_ENonterminals :: (Seq PP_Doc), Syn_ENonterminals -> Seq PP_Doc
semFunBndTps_Syn_ENonterminals :: (Seq PP_Doc), Syn_ENonterminals -> Map Int VisitKind
visitKinds_Syn_ENonterminals :: (Map VisitIdentifier VisitKind), Syn_ENonterminals -> Map Int (Set Identifier)
visitdefs_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier)), Syn_ENonterminals -> Map Int (Set Identifier)
visituses_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier)) }
{-# INLINABLE wrap_ENonterminals #-}
wrap_ENonterminals :: T_ENonterminals -> Inh_ENonterminals -> (Syn_ENonterminals )
wrap_ENonterminals :: T_ENonterminals -> Inh_ENonterminals -> Syn_ENonterminals
wrap_ENonterminals (T_ENonterminals Identity T_ENonterminals_s11
act) (Inh_ENonterminals Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader Derivings
_lhsIderivings String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks TypeSyns
_lhsItypeSyns Set Identifier
_lhsIwrappers) =
Identity Syn_ENonterminals -> Syn_ENonterminals
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_ENonterminals_s11
sem <- Identity T_ENonterminals_s11
act
let arg10 :: T_ENonterminals_vIn10
arg10 = Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> Derivings
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> String
-> String
-> Options
-> Map Identifier Attributes
-> PP_Doc
-> TypeSyns
-> Set Identifier
-> T_ENonterminals_vIn10
T_ENonterminals_vIn10 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader Derivings
_lhsIderivings String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks TypeSyns
_lhsItypeSyns Set Identifier
_lhsIwrappers
(T_ENonterminals_vOut10 [PP_Doc]
_lhsOappendCommon [PP_Doc]
_lhsOappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOoutput PP_Doc
_lhsOoutput_dcl Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses) <- T_ENonterminals_vOut10 -> Identity T_ENonterminals_vOut10
forall (m :: * -> *) a. Monad m => a -> m a
return (T_ENonterminals_s11 -> T_ENonterminals_v10
inv_ENonterminals_s11 T_ENonterminals_s11
sem T_ENonterminals_vIn10
arg10)
Syn_ENonterminals -> Identity Syn_ENonterminals
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc]
-> [PP_Doc]
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> Map Identifier Int
-> PP_Doc
-> PP_Doc
-> Seq PP_Doc
-> Seq PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Syn_ENonterminals
Syn_ENonterminals [PP_Doc]
_lhsOappendCommon [PP_Doc]
_lhsOappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOoutput PP_Doc
_lhsOoutput_dcl Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses)
)
{-# NOINLINE sem_ENonterminals #-}
sem_ENonterminals :: ENonterminals -> T_ENonterminals
sem_ENonterminals :: ENonterminals -> T_ENonterminals
sem_ENonterminals ENonterminals
list = (T_ENonterminal -> T_ENonterminals -> T_ENonterminals)
-> T_ENonterminals -> [T_ENonterminal] -> T_ENonterminals
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_ENonterminal -> T_ENonterminals -> T_ENonterminals
sem_ENonterminals_Cons T_ENonterminals
sem_ENonterminals_Nil ((ENonterminal -> T_ENonterminal)
-> ENonterminals -> [T_ENonterminal]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map ENonterminal -> T_ENonterminal
sem_ENonterminal ENonterminals
list)
newtype T_ENonterminals = T_ENonterminals {
T_ENonterminals -> Identity T_ENonterminals_s11
attach_T_ENonterminals :: Identity (T_ENonterminals_s11 )
}
newtype T_ENonterminals_s11 = C_ENonterminals_s11 {
T_ENonterminals_s11 -> T_ENonterminals_v10
inv_ENonterminals_s11 :: (T_ENonterminals_v10 )
}
data T_ENonterminals_s12 = C_ENonterminals_s12
type T_ENonterminals_v10 = (T_ENonterminals_vIn10 ) -> (T_ENonterminals_vOut10 )
data T_ENonterminals_vIn10 = T_ENonterminals_vIn10 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (Derivings) (String -> String -> String -> Bool -> String) (PP_Doc) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (Options) (Map NontermIdent Attributes) (PP_Doc) (TypeSyns) (Set NontermIdent)
data T_ENonterminals_vOut10 = T_ENonterminals_vOut10 ([PP_Doc]) ([PP_Doc]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (Map NontermIdent Int) (PP_Doc) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))
{-# NOINLINE sem_ENonterminals_Cons #-}
sem_ENonterminals_Cons :: T_ENonterminal -> T_ENonterminals -> T_ENonterminals
sem_ENonterminals_Cons :: T_ENonterminal -> T_ENonterminals -> T_ENonterminals
sem_ENonterminals_Cons T_ENonterminal
arg_hd_ T_ENonterminals
arg_tl_ = Identity T_ENonterminals_s11 -> T_ENonterminals
T_ENonterminals (T_ENonterminals_s11 -> Identity T_ENonterminals_s11
forall (m :: * -> *) a. Monad m => a -> m a
return T_ENonterminals_s11
st11) where
{-# NOINLINE st11 #-}
st11 :: T_ENonterminals_s11
st11 = let
v10 :: T_ENonterminals_v10
v10 :: T_ENonterminals_v10
v10 = \ (T_ENonterminals_vIn10 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader Derivings
_lhsIderivings String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks TypeSyns
_lhsItypeSyns Set Identifier
_lhsIwrappers) -> ( let
_hdX8 :: T_ENonterminal_s8
_hdX8 = Identity T_ENonterminal_s8 -> T_ENonterminal_s8
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ENonterminal -> Identity T_ENonterminal_s8
attach_T_ENonterminal (T_ENonterminal
arg_hd_))
_tlX11 :: T_ENonterminals_s11
_tlX11 = Identity T_ENonterminals_s11 -> T_ENonterminals_s11
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ENonterminals -> Identity T_ENonterminals_s11
attach_T_ENonterminals (T_ENonterminals
arg_tl_))
(T_ENonterminal_vOut7 PP_Doc
_hdIappendCommon PP_Doc
_hdIappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit Seq Error
_hdIerrors Map Int (Int, Int)
_hdIfromToStates IO ()
_hdIgenProdIO [PP_Doc]
_hdIimports Map Identifier Int
_hdIinitStates PP_Doc
_hdIoutput PP_Doc
_hdIoutput_dcl Seq PP_Doc
_hdIsemFunBndDefs Seq PP_Doc
_hdIsemFunBndTps Map Int VisitKind
_hdIvisitKinds Map Int (Set Identifier)
_hdIvisitdefs Map Int (Set Identifier)
_hdIvisituses) = T_ENonterminal_s8 -> T_ENonterminal_v7
inv_ENonterminal_s8 T_ENonterminal_s8
_hdX8 (Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> Derivings
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> String
-> String
-> Options
-> Map Identifier Attributes
-> PP_Doc
-> TypeSyns
-> Set Identifier
-> T_ENonterminal_vIn7
T_ENonterminal_vIn7 Map Int (Int, Int)
_hdOallFromToStates Map Identifier Int
_hdOallInitStates Map Int VisitKind
_hdOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdOallchildvisit Map Int (Set Identifier)
_hdOavisitdefs Map Int (Set Identifier)
_hdOavisituses Map Identifier ConstructorType
_hdOconstructorTypeMap String -> String -> String -> Bool -> String
_hdOdclModuleHeader Derivings
_hdOderivings String -> String -> String -> Bool -> String
_hdOiclModuleHeader PP_Doc
_hdOimportBlocks Map Identifier Attributes
_hdOinhmap Map Identifier (Map Identifier Attributes)
_hdOlocalAttrTypes String
_hdOmainFile String
_hdOmainName Options
_hdOoptions Map Identifier Attributes
_hdOsynmap PP_Doc
_hdOtextBlocks TypeSyns
_hdOtypeSyns Set Identifier
_hdOwrappers)
(T_ENonterminals_vOut10 [PP_Doc]
_tlIappendCommon [PP_Doc]
_tlIappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit Seq Error
_tlIerrors Map Int (Int, Int)
_tlIfromToStates IO ()
_tlIgenProdIO [PP_Doc]
_tlIimports Map Identifier Int
_tlIinitStates PP_Doc
_tlIoutput PP_Doc
_tlIoutput_dcl Seq PP_Doc
_tlIsemFunBndDefs Seq PP_Doc
_tlIsemFunBndTps Map Int VisitKind
_tlIvisitKinds Map Int (Set Identifier)
_tlIvisitdefs Map Int (Set Identifier)
_tlIvisituses) = T_ENonterminals_s11 -> T_ENonterminals_v10
inv_ENonterminals_s11 T_ENonterminals_s11
_tlX11 (Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> Derivings
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> String
-> String
-> Options
-> Map Identifier Attributes
-> PP_Doc
-> TypeSyns
-> Set Identifier
-> T_ENonterminals_vIn10
T_ENonterminals_vIn10 Map Int (Int, Int)
_tlOallFromToStates Map Identifier Int
_tlOallInitStates Map Int VisitKind
_tlOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlOallchildvisit Map Int (Set Identifier)
_tlOavisitdefs Map Int (Set Identifier)
_tlOavisituses Map Identifier ConstructorType
_tlOconstructorTypeMap String -> String -> String -> Bool -> String
_tlOdclModuleHeader Derivings
_tlOderivings String -> String -> String -> Bool -> String
_tlOiclModuleHeader PP_Doc
_tlOimportBlocks Map Identifier Attributes
_tlOinhmap Map Identifier (Map Identifier Attributes)
_tlOlocalAttrTypes String
_tlOmainFile String
_tlOmainName Options
_tlOoptions Map Identifier Attributes
_tlOsynmap PP_Doc
_tlOtextBlocks TypeSyns
_tlOtypeSyns Set Identifier
_tlOwrappers)
_lhsOappendCommon :: [PP_Doc]
_lhsOappendCommon :: [PP_Doc]
_lhsOappendCommon = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule177 PP_Doc
_hdIappendCommon [PP_Doc]
_tlIappendCommon
_lhsOappendMain :: [PP_Doc]
_lhsOappendMain :: [PP_Doc]
_lhsOappendMain = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule178 PP_Doc
_hdIappendMain [PP_Doc]
_tlIappendMain
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule179 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule180 Seq Error
_hdIerrors Seq Error
_tlIerrors
_lhsOfromToStates :: Map VisitIdentifier (Int,Int)
_lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = Map Int (Int, Int) -> Map Int (Int, Int) -> Map Int (Int, Int)
rule181 Map Int (Int, Int)
_hdIfromToStates Map Int (Int, Int)
_tlIfromToStates
_lhsOgenProdIO :: IO ()
_lhsOgenProdIO :: IO ()
_lhsOgenProdIO = IO () -> IO () -> IO ()
rule182 IO ()
_hdIgenProdIO IO ()
_tlIgenProdIO
_lhsOimports :: [PP_Doc]
_lhsOimports :: [PP_Doc]
_lhsOimports = [PP_Doc] -> [PP_Doc] -> [PP_Doc]
rule183 [PP_Doc]
_hdIimports [PP_Doc]
_tlIimports
_lhsOinitStates :: Map NontermIdent Int
_lhsOinitStates :: Map Identifier Int
_lhsOinitStates = Map Identifier Int -> Map Identifier Int -> Map Identifier Int
rule184 Map Identifier Int
_hdIinitStates Map Identifier Int
_tlIinitStates
_lhsOoutput :: PP_Doc
_lhsOoutput :: PP_Doc
_lhsOoutput = PP_Doc -> PP_Doc -> PP_Doc
rule185 PP_Doc
_hdIoutput PP_Doc
_tlIoutput
_lhsOoutput_dcl :: PP_Doc
_lhsOoutput_dcl :: PP_Doc
_lhsOoutput_dcl = PP_Doc -> PP_Doc -> PP_Doc
rule186 PP_Doc
_hdIoutput_dcl PP_Doc
_tlIoutput_dcl
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
rule187 Seq PP_Doc
_hdIsemFunBndDefs Seq PP_Doc
_tlIsemFunBndDefs
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps = Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
rule188 Seq PP_Doc
_hdIsemFunBndTps Seq PP_Doc
_tlIsemFunBndTps
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
rule189 Map Int VisitKind
_hdIvisitKinds Map Int VisitKind
_tlIvisitKinds
_lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
_lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule190 Map Int (Set Identifier)
_hdIvisitdefs Map Int (Set Identifier)
_tlIvisitdefs
_lhsOvisituses :: Map VisitIdentifier (Set Identifier)
_lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule191 Map Int (Set Identifier)
_hdIvisituses Map Int (Set Identifier)
_tlIvisituses
_hdOallFromToStates :: Map Int (Int, Int)
_hdOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule192 Map Int (Int, Int)
_lhsIallFromToStates
_hdOallInitStates :: Map Identifier Int
_hdOallInitStates = Map Identifier Int -> Map Identifier Int
rule193 Map Identifier Int
_lhsIallInitStates
_hdOallVisitKinds :: Map Int VisitKind
_hdOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule194 Map Int VisitKind
_lhsIallVisitKinds
_hdOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule195 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
_hdOavisitdefs :: Map Int (Set Identifier)
_hdOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule196 Map Int (Set Identifier)
_lhsIavisitdefs
_hdOavisituses :: Map Int (Set Identifier)
_hdOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule197 Map Int (Set Identifier)
_lhsIavisituses
_hdOconstructorTypeMap :: Map Identifier ConstructorType
_hdOconstructorTypeMap = Map Identifier ConstructorType -> Map Identifier ConstructorType
rule198 Map Identifier ConstructorType
_lhsIconstructorTypeMap
_hdOdclModuleHeader :: String -> String -> String -> Bool -> String
_hdOdclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule199 String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
_hdOderivings :: Derivings
_hdOderivings = Derivings -> Derivings
rule200 Derivings
_lhsIderivings
_hdOiclModuleHeader :: String -> String -> String -> Bool -> String
_hdOiclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule201 String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
_hdOimportBlocks :: PP_Doc
_hdOimportBlocks = PP_Doc -> PP_Doc
rule202 PP_Doc
_lhsIimportBlocks
_hdOinhmap :: Map Identifier Attributes
_hdOinhmap = Map Identifier Attributes -> Map Identifier Attributes
rule203 Map Identifier Attributes
_lhsIinhmap
_hdOlocalAttrTypes :: Map Identifier (Map Identifier Attributes)
_hdOlocalAttrTypes = Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule204 Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes
_hdOmainFile :: String
_hdOmainFile = String -> String
rule205 String
_lhsImainFile
_hdOmainName :: String
_hdOmainName = String -> String
rule206 String
_lhsImainName
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule207 Options
_lhsIoptions
_hdOsynmap :: Map Identifier Attributes
_hdOsynmap = Map Identifier Attributes -> Map Identifier Attributes
rule208 Map Identifier Attributes
_lhsIsynmap
_hdOtextBlocks :: PP_Doc
_hdOtextBlocks = PP_Doc -> PP_Doc
rule209 PP_Doc
_lhsItextBlocks
_hdOtypeSyns :: TypeSyns
_hdOtypeSyns = TypeSyns -> TypeSyns
rule210 TypeSyns
_lhsItypeSyns
_hdOwrappers :: Set Identifier
_hdOwrappers = Set Identifier -> Set Identifier
rule211 Set Identifier
_lhsIwrappers
_tlOallFromToStates :: Map Int (Int, Int)
_tlOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule212 Map Int (Int, Int)
_lhsIallFromToStates
_tlOallInitStates :: Map Identifier Int
_tlOallInitStates = Map Identifier Int -> Map Identifier Int
rule213 Map Identifier Int
_lhsIallInitStates
_tlOallVisitKinds :: Map Int VisitKind
_tlOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule214 Map Int VisitKind
_lhsIallVisitKinds
_tlOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule215 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
_tlOavisitdefs :: Map Int (Set Identifier)
_tlOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule216 Map Int (Set Identifier)
_lhsIavisitdefs
_tlOavisituses :: Map Int (Set Identifier)
_tlOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule217 Map Int (Set Identifier)
_lhsIavisituses
_tlOconstructorTypeMap :: Map Identifier ConstructorType
_tlOconstructorTypeMap = Map Identifier ConstructorType -> Map Identifier ConstructorType
rule218 Map Identifier ConstructorType
_lhsIconstructorTypeMap
_tlOdclModuleHeader :: String -> String -> String -> Bool -> String
_tlOdclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule219 String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
_tlOderivings :: Derivings
_tlOderivings = Derivings -> Derivings
rule220 Derivings
_lhsIderivings
_tlOiclModuleHeader :: String -> String -> String -> Bool -> String
_tlOiclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule221 String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
_tlOimportBlocks :: PP_Doc
_tlOimportBlocks = PP_Doc -> PP_Doc
rule222 PP_Doc
_lhsIimportBlocks
_tlOinhmap :: Map Identifier Attributes
_tlOinhmap = Map Identifier Attributes -> Map Identifier Attributes
rule223 Map Identifier Attributes
_lhsIinhmap
_tlOlocalAttrTypes :: Map Identifier (Map Identifier Attributes)
_tlOlocalAttrTypes = Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule224 Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes
_tlOmainFile :: String
_tlOmainFile = String -> String
rule225 String
_lhsImainFile
_tlOmainName :: String
_tlOmainName = String -> String
rule226 String
_lhsImainName
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule227 Options
_lhsIoptions
_tlOsynmap :: Map Identifier Attributes
_tlOsynmap = Map Identifier Attributes -> Map Identifier Attributes
rule228 Map Identifier Attributes
_lhsIsynmap
_tlOtextBlocks :: PP_Doc
_tlOtextBlocks = PP_Doc -> PP_Doc
rule229 PP_Doc
_lhsItextBlocks
_tlOtypeSyns :: TypeSyns
_tlOtypeSyns = TypeSyns -> TypeSyns
rule230 TypeSyns
_lhsItypeSyns
_tlOwrappers :: Set Identifier
_tlOwrappers = Set Identifier -> Set Identifier
rule231 Set Identifier
_lhsIwrappers
__result_ :: T_ENonterminals_vOut10
__result_ = [PP_Doc]
-> [PP_Doc]
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> Map Identifier Int
-> PP_Doc
-> PP_Doc
-> Seq PP_Doc
-> Seq PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_ENonterminals_vOut10
T_ENonterminals_vOut10 [PP_Doc]
_lhsOappendCommon [PP_Doc]
_lhsOappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOoutput PP_Doc
_lhsOoutput_dcl Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
in T_ENonterminals_vOut10
__result_ )
in T_ENonterminals_v10 -> T_ENonterminals_s11
C_ENonterminals_s11 T_ENonterminals_v10
v10
{-# INLINE rule177 #-}
rule177 :: PP_Doc -> [PP_Doc] -> [PP_Doc]
rule177 = \ ((PP_Doc
_hdIappendCommon) :: PP_Doc ) (([PP_Doc]
_tlIappendCommon) :: [PP_Doc]) ->
PP_Doc
_hdIappendCommon PP_Doc -> [PP_Doc] -> [PP_Doc]
forall a. a -> [a] -> [a]
: [PP_Doc]
_tlIappendCommon
{-# INLINE rule178 #-}
rule178 :: PP_Doc -> [PP_Doc] -> [PP_Doc]
rule178 = \ ((PP_Doc
_hdIappendMain) :: PP_Doc ) (([PP_Doc]
_tlIappendMain) :: [PP_Doc]) ->
PP_Doc
_hdIappendMain PP_Doc -> [PP_Doc] -> [PP_Doc]
forall a. a -> [a] -> [a]
: [PP_Doc]
_tlIappendMain
{-# INLINE rule179 #-}
rule179 :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule179 = \ ((Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ((Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit
{-# INLINE rule180 #-}
rule180 :: Seq Error -> Seq Error -> Seq Error
rule180 = \ ((Seq Error
_hdIerrors) :: Seq Error) ((Seq Error
_tlIerrors) :: Seq Error) ->
Seq Error
_hdIerrors Seq Error -> Seq Error -> Seq Error
forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq Error
_tlIerrors
{-# INLINE rule181 #-}
rule181 :: Map Int (Int, Int) -> Map Int (Int, Int) -> Map Int (Int, Int)
rule181 = \ ((Map Int (Int, Int)
_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((Map Int (Int, Int)
_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->
Map Int (Int, Int)
_hdIfromToStates Map Int (Int, Int) -> Map Int (Int, Int) -> Map Int (Int, Int)
forall a. Monoid a => a -> a -> a
`mappend` Map Int (Int, Int)
_tlIfromToStates
{-# INLINE rule182 #-}
rule182 :: IO () -> IO () -> IO ()
rule182 = \ ((IO ()
_hdIgenProdIO) :: IO ()) ((IO ()
_tlIgenProdIO) :: IO ()) ->
IO ()
_hdIgenProdIO IO () -> IO () -> IO ()
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> IO ()
_tlIgenProdIO
{-# INLINE rule183 #-}
rule183 :: [PP_Doc] -> [PP_Doc] -> [PP_Doc]
rule183 = \ (([PP_Doc]
_hdIimports) :: [PP_Doc]) (([PP_Doc]
_tlIimports) :: [PP_Doc]) ->
[PP_Doc]
_hdIimports [PP_Doc] -> [PP_Doc] -> [PP_Doc]
forall a. [a] -> [a] -> [a]
++ [PP_Doc]
_tlIimports
{-# INLINE rule184 #-}
rule184 :: Map Identifier Int -> Map Identifier Int -> Map Identifier Int
rule184 = \ ((Map Identifier Int
_hdIinitStates) :: Map NontermIdent Int) ((Map Identifier Int
_tlIinitStates) :: Map NontermIdent Int) ->
Map Identifier Int
_hdIinitStates Map Identifier Int -> Map Identifier Int -> Map Identifier Int
forall a. Monoid a => a -> a -> a
`mappend` Map Identifier Int
_tlIinitStates
{-# INLINE rule185 #-}
rule185 :: PP_Doc -> PP_Doc -> PP_Doc
rule185 = \ ((PP_Doc
_hdIoutput) :: PP_Doc) ((PP_Doc
_tlIoutput) :: PP_Doc) ->
PP_Doc
_hdIoutput PP_Doc -> PP_Doc -> PP_Doc
forall a b. (PP a, PP b) => a -> b -> PP_Doc
>-< PP_Doc
_tlIoutput
{-# INLINE rule186 #-}
rule186 :: PP_Doc -> PP_Doc -> PP_Doc
rule186 = \ ((PP_Doc
_hdIoutput_dcl) :: PP_Doc) ((PP_Doc
_tlIoutput_dcl) :: PP_Doc) ->
PP_Doc
_hdIoutput_dcl PP_Doc -> PP_Doc -> PP_Doc
forall a b. (PP a, PP b) => a -> b -> PP_Doc
>-< PP_Doc
_tlIoutput_dcl
{-# INLINE rule187 #-}
rule187 :: Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
rule187 = \ ((Seq PP_Doc
_hdIsemFunBndDefs) :: Seq PP_Doc) ((Seq PP_Doc
_tlIsemFunBndDefs) :: Seq PP_Doc) ->
Seq PP_Doc
_hdIsemFunBndDefs Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq PP_Doc
_tlIsemFunBndDefs
{-# INLINE rule188 #-}
rule188 :: Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
rule188 = \ ((Seq PP_Doc
_hdIsemFunBndTps) :: Seq PP_Doc) ((Seq PP_Doc
_tlIsemFunBndTps) :: Seq PP_Doc) ->
Seq PP_Doc
_hdIsemFunBndTps Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq PP_Doc
_tlIsemFunBndTps
{-# INLINE rule189 #-}
rule189 :: Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
rule189 = \ ((Map Int VisitKind
_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((Map Int VisitKind
_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->
Map Int VisitKind
_hdIvisitKinds Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
forall a. Monoid a => a -> a -> a
`mappend` Map Int VisitKind
_tlIvisitKinds
{-# INLINE rule190 #-}
rule190 :: Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule190 = \ ((Map Int (Set Identifier)
_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((Map Int (Set Identifier)
_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_hdIvisitdefs Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
forall a b.
(Ord a, Ord b) =>
Map a (Set b) -> Map a (Set b) -> Map a (Set b)
`uwSetUnion` Map Int (Set Identifier)
_tlIvisitdefs
{-# INLINE rule191 #-}
rule191 :: Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule191 = \ ((Map Int (Set Identifier)
_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((Map Int (Set Identifier)
_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_hdIvisituses Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
forall a b.
(Ord a, Ord b) =>
Map a (Set b) -> Map a (Set b) -> Map a (Set b)
`uwSetUnion` Map Int (Set Identifier)
_tlIvisituses
{-# INLINE rule192 #-}
rule192 :: Map Int (Int, Int) -> Map Int (Int, Int)
rule192 = \ ((Map Int (Int, Int)
_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
Map Int (Int, Int)
_lhsIallFromToStates
{-# INLINE rule193 #-}
rule193 :: Map Identifier Int -> Map Identifier Int
rule193 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
Map Identifier Int
_lhsIallInitStates
{-# INLINE rule194 #-}
rule194 :: Map Int VisitKind -> Map Int VisitKind
rule194 = \ ((Map Int VisitKind
_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
Map Int VisitKind
_lhsIallVisitKinds
{-# INLINE rule195 #-}
rule195 :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule195 = \ ((Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
{-# INLINE rule196 #-}
rule196 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule196 = \ ((Map Int (Set Identifier)
_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_lhsIavisitdefs
{-# INLINE rule197 #-}
rule197 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule197 = \ ((Map Int (Set Identifier)
_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_lhsIavisituses
{-# INLINE rule198 #-}
rule198 :: Map Identifier ConstructorType -> Map Identifier ConstructorType
rule198 = \ ((Map Identifier ConstructorType
_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->
Map Identifier ConstructorType
_lhsIconstructorTypeMap
{-# INLINE rule199 #-}
rule199 :: (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule199 = \ ((String -> String -> String -> Bool -> String
_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->
String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
{-# INLINE rule200 #-}
rule200 :: Derivings -> Derivings
rule200 = \ ((Derivings
_lhsIderivings) :: Derivings) ->
Derivings
_lhsIderivings
{-# INLINE rule201 #-}
rule201 :: (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule201 = \ ((String -> String -> String -> Bool -> String
_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->
String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
{-# INLINE rule202 #-}
rule202 :: PP_Doc -> PP_Doc
rule202 = \ ((PP_Doc
_lhsIimportBlocks) :: PP_Doc) ->
PP_Doc
_lhsIimportBlocks
{-# INLINE rule203 #-}
rule203 :: Map Identifier Attributes -> Map Identifier Attributes
rule203 = \ ((Map Identifier Attributes
_lhsIinhmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIinhmap
{-# INLINE rule204 #-}
rule204 :: Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule204 = \ ((Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->
Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes
{-# INLINE rule205 #-}
rule205 :: String -> String
rule205 = \ ((String
_lhsImainFile) :: String) ->
String
_lhsImainFile
{-# INLINE rule206 #-}
rule206 :: String -> String
rule206 = \ ((String
_lhsImainName) :: String) ->
String
_lhsImainName
{-# INLINE rule207 #-}
rule207 :: Options -> Options
rule207 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule208 #-}
rule208 :: Map Identifier Attributes -> Map Identifier Attributes
rule208 = \ ((Map Identifier Attributes
_lhsIsynmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIsynmap
{-# INLINE rule209 #-}
rule209 :: PP_Doc -> PP_Doc
rule209 = \ ((PP_Doc
_lhsItextBlocks) :: PP_Doc) ->
PP_Doc
_lhsItextBlocks
{-# INLINE rule210 #-}
rule210 :: TypeSyns -> TypeSyns
rule210 = \ ((TypeSyns
_lhsItypeSyns) :: TypeSyns) ->
TypeSyns
_lhsItypeSyns
{-# INLINE rule211 #-}
rule211 :: Set Identifier -> Set Identifier
rule211 = \ ((Set Identifier
_lhsIwrappers) :: Set NontermIdent) ->
Set Identifier
_lhsIwrappers
{-# INLINE rule212 #-}
rule212 :: Map Int (Int, Int) -> Map Int (Int, Int)
rule212 = \ ((Map Int (Int, Int)
_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
Map Int (Int, Int)
_lhsIallFromToStates
{-# INLINE rule213 #-}
rule213 :: Map Identifier Int -> Map Identifier Int
rule213 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
Map Identifier Int
_lhsIallInitStates
{-# INLINE rule214 #-}
rule214 :: Map Int VisitKind -> Map Int VisitKind
rule214 = \ ((Map Int VisitKind
_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
Map Int VisitKind
_lhsIallVisitKinds
{-# INLINE rule215 #-}
rule215 :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule215 = \ ((Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
{-# INLINE rule216 #-}
rule216 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule216 = \ ((Map Int (Set Identifier)
_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_lhsIavisitdefs
{-# INLINE rule217 #-}
rule217 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule217 = \ ((Map Int (Set Identifier)
_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_lhsIavisituses
{-# INLINE rule218 #-}
rule218 :: Map Identifier ConstructorType -> Map Identifier ConstructorType
rule218 = \ ((Map Identifier ConstructorType
_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->
Map Identifier ConstructorType
_lhsIconstructorTypeMap
{-# INLINE rule219 #-}
rule219 :: (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule219 = \ ((String -> String -> String -> Bool -> String
_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->
String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
{-# INLINE rule220 #-}
rule220 :: Derivings -> Derivings
rule220 = \ ((Derivings
_lhsIderivings) :: Derivings) ->
Derivings
_lhsIderivings
{-# INLINE rule221 #-}
rule221 :: (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule221 = \ ((String -> String -> String -> Bool -> String
_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->
String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
{-# INLINE rule222 #-}
rule222 :: PP_Doc -> PP_Doc
rule222 = \ ((PP_Doc
_lhsIimportBlocks) :: PP_Doc) ->
PP_Doc
_lhsIimportBlocks
{-# INLINE rule223 #-}
rule223 :: Map Identifier Attributes -> Map Identifier Attributes
rule223 = \ ((Map Identifier Attributes
_lhsIinhmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIinhmap
{-# INLINE rule224 #-}
rule224 :: Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule224 = \ ((Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->
Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes
{-# INLINE rule225 #-}
rule225 :: String -> String
rule225 = \ ((String
_lhsImainFile) :: String) ->
String
_lhsImainFile
{-# INLINE rule226 #-}
rule226 :: String -> String
rule226 = \ ((String
_lhsImainName) :: String) ->
String
_lhsImainName
{-# INLINE rule227 #-}
rule227 :: Options -> Options
rule227 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule228 #-}
rule228 :: Map Identifier Attributes -> Map Identifier Attributes
rule228 = \ ((Map Identifier Attributes
_lhsIsynmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIsynmap
{-# INLINE rule229 #-}
rule229 :: PP_Doc -> PP_Doc
rule229 = \ ((PP_Doc
_lhsItextBlocks) :: PP_Doc) ->
PP_Doc
_lhsItextBlocks
{-# INLINE rule230 #-}
rule230 :: TypeSyns -> TypeSyns
rule230 = \ ((TypeSyns
_lhsItypeSyns) :: TypeSyns) ->
TypeSyns
_lhsItypeSyns
{-# INLINE rule231 #-}
rule231 :: Set Identifier -> Set Identifier
rule231 = \ ((Set Identifier
_lhsIwrappers) :: Set NontermIdent) ->
Set Identifier
_lhsIwrappers
{-# NOINLINE sem_ENonterminals_Nil #-}
sem_ENonterminals_Nil :: T_ENonterminals
sem_ENonterminals_Nil :: T_ENonterminals
sem_ENonterminals_Nil = Identity T_ENonterminals_s11 -> T_ENonterminals
T_ENonterminals (T_ENonterminals_s11 -> Identity T_ENonterminals_s11
forall (m :: * -> *) a. Monad m => a -> m a
return T_ENonterminals_s11
st11) where
{-# NOINLINE st11 #-}
st11 :: T_ENonterminals_s11
st11 = let
v10 :: T_ENonterminals_v10
v10 :: T_ENonterminals_v10
v10 = \ (T_ENonterminals_vIn10 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader Derivings
_lhsIderivings String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks TypeSyns
_lhsItypeSyns Set Identifier
_lhsIwrappers) -> ( let
_lhsOappendCommon :: [PP_Doc]
_lhsOappendCommon :: [PP_Doc]
_lhsOappendCommon = () -> [PP_Doc]
forall a. () -> [a]
rule232 ()
_lhsOappendMain :: [PP_Doc]
_lhsOappendMain :: [PP_Doc]
_lhsOappendMain = () -> [PP_Doc]
forall a. () -> [a]
rule233 ()
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = ()
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
forall k a. () -> Map k a
rule234 ()
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule235 ()
_lhsOfromToStates :: Map VisitIdentifier (Int,Int)
_lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = () -> Map Int (Int, Int)
rule236 ()
_lhsOgenProdIO :: IO ()
_lhsOgenProdIO :: IO ()
_lhsOgenProdIO = () -> IO ()
rule237 ()
_lhsOimports :: [PP_Doc]
_lhsOimports :: [PP_Doc]
_lhsOimports = () -> [PP_Doc]
forall a. () -> [a]
rule238 ()
_lhsOinitStates :: Map NontermIdent Int
_lhsOinitStates :: Map Identifier Int
_lhsOinitStates = () -> Map Identifier Int
rule239 ()
_lhsOoutput :: PP_Doc
_lhsOoutput :: PP_Doc
_lhsOoutput = () -> PP_Doc
rule240 ()
_lhsOoutput_dcl :: PP_Doc
_lhsOoutput_dcl :: PP_Doc
_lhsOoutput_dcl = () -> PP_Doc
rule241 ()
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = () -> Seq PP_Doc
forall a. () -> Seq a
rule242 ()
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps = () -> Seq PP_Doc
forall a. () -> Seq a
rule243 ()
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule244 ()
_lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
_lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule245 ()
_lhsOvisituses :: Map VisitIdentifier (Set Identifier)
_lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule246 ()
__result_ :: T_ENonterminals_vOut10
__result_ = [PP_Doc]
-> [PP_Doc]
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> Map Identifier Int
-> PP_Doc
-> PP_Doc
-> Seq PP_Doc
-> Seq PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_ENonterminals_vOut10
T_ENonterminals_vOut10 [PP_Doc]
_lhsOappendCommon [PP_Doc]
_lhsOappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOoutput PP_Doc
_lhsOoutput_dcl Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
in T_ENonterminals_vOut10
__result_ )
in T_ENonterminals_v10 -> T_ENonterminals_s11
C_ENonterminals_s11 T_ENonterminals_v10
v10
{-# INLINE rule232 #-}
rule232 :: () -> [a]
rule232 = \ (()
_ :: ()) ->
[]
{-# INLINE rule233 #-}
rule233 :: () -> [a]
rule233 = \ (()
_ :: ()) ->
[]
{-# INLINE rule234 #-}
rule234 :: () -> Map k a
rule234 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule235 #-}
rule235 :: () -> Seq a
rule235 = \ (()
_ :: ()) ->
Seq a
forall a. Seq a
Seq.empty
{-# INLINE rule236 #-}
rule236 :: () -> Map Int (Int, Int)
rule236 = \ (()
_ :: ()) ->
Map Int (Int, Int)
forall a. Monoid a => a
mempty
{-# INLINE rule237 #-}
rule237 :: () -> IO ()
rule237 = \ (()
_ :: ()) ->
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
{-# INLINE rule238 #-}
rule238 :: () -> [a]
rule238 = \ (()
_ :: ()) ->
[]
{-# INLINE rule239 #-}
rule239 :: () -> Map Identifier Int
rule239 = \ (()
_ :: ()) ->
Map Identifier Int
forall a. Monoid a => a
mempty
{-# INLINE rule240 #-}
rule240 :: () -> PP_Doc
rule240 = \ (()
_ :: ()) ->
PP_Doc
empty
{-# INLINE rule241 #-}
rule241 :: () -> PP_Doc
rule241 = \ (()
_ :: ()) ->
PP_Doc
empty
{-# INLINE rule242 #-}
rule242 :: () -> Seq a
rule242 = \ (()
_ :: ()) ->
Seq a
forall a. Seq a
Seq.empty
{-# INLINE rule243 #-}
rule243 :: () -> Seq a
rule243 = \ (()
_ :: ()) ->
Seq a
forall a. Seq a
Seq.empty
{-# INLINE rule244 #-}
rule244 :: () -> Map Int VisitKind
rule244 = \ (()
_ :: ()) ->
Map Int VisitKind
forall a. Monoid a => a
mempty
{-# INLINE rule245 #-}
rule245 :: () -> Map k a
rule245 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule246 #-}
rule246 :: () -> Map k a
rule246 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
data Inh_EProduction = Inh_EProduction { Inh_EProduction -> Map Int (Int, Int)
allFromToStates_Inh_EProduction :: (Map VisitIdentifier (Int,Int)), Inh_EProduction -> Map Identifier Attributes
allInhmap_Inh_EProduction :: (Map NontermIdent Attributes), Inh_EProduction -> Map Identifier Int
allInitStates_Inh_EProduction :: (Map NontermIdent Int), Inh_EProduction -> Map Identifier Attributes
allSynmap_Inh_EProduction :: (Map NontermIdent Attributes), Inh_EProduction -> Map Int VisitKind
allVisitKinds_Inh_EProduction :: (Map VisitIdentifier VisitKind), Inh_EProduction
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
allchildvisit_Inh_EProduction :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Inh_EProduction -> Set Int
allstates_Inh_EProduction :: (Set StateIdentifier), Inh_EProduction -> Map Int (Set Identifier)
avisitdefs_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)), Inh_EProduction -> Map Int (Set Identifier)
avisituses_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)), Inh_EProduction -> ClassContext
classCtxs_Inh_EProduction :: (ClassContext), Inh_EProduction -> Map Identifier ConstructorType
constructorTypeMap_Inh_EProduction :: (Map NontermIdent ConstructorType), :: (String -> String -> String -> Bool -> String), :: (String -> String -> String -> Bool -> String), Inh_EProduction -> PP_Doc
importBlocks_Inh_EProduction :: (PP_Doc), Inh_EProduction -> Attributes
inhmap_Inh_EProduction :: (Attributes), Inh_EProduction -> Int
initial_Inh_EProduction :: (StateIdentifier), Inh_EProduction -> Map Identifier Attributes
localAttrTypes_Inh_EProduction :: (Map ConstructorIdent (Map Identifier Type)), Inh_EProduction -> String
mainFile_Inh_EProduction :: (String), Inh_EProduction -> String
mainName_Inh_EProduction :: (String), Inh_EProduction -> Map Int StateCtx
nextVisits_Inh_EProduction :: (Map StateIdentifier StateCtx), Inh_EProduction -> Identifier
nt_Inh_EProduction :: (NontermIdent), Inh_EProduction -> Type
ntType_Inh_EProduction :: (Type), Inh_EProduction -> Options
options_Inh_EProduction :: (Options), Inh_EProduction -> [Identifier]
params_Inh_EProduction :: ([Identifier]), Inh_EProduction -> Map Int StateCtx
prevVisits_Inh_EProduction :: (Map StateIdentifier StateCtx), Inh_EProduction -> Bool
rename_Inh_EProduction :: (Bool), Inh_EProduction -> Attributes
synmap_Inh_EProduction :: (Attributes), Inh_EProduction -> PP_Doc
textBlocks_Inh_EProduction :: (PP_Doc) }
data Syn_EProduction = Syn_EProduction { Syn_EProduction -> [VisitStateState]
allvisits_Syn_EProduction :: ([VisitStateState]), Syn_EProduction
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
childvisit_Syn_EProduction :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Syn_EProduction -> Int
count_Syn_EProduction :: (Int), Syn_EProduction -> PP_Doc
datatype_Syn_EProduction :: (PP_Doc), Syn_EProduction -> Seq Error
errors_Syn_EProduction :: (Seq Error), Syn_EProduction -> Map Int (Int, Int)
fromToStates_Syn_EProduction :: (Map VisitIdentifier (Int,Int)), Syn_EProduction -> IO ()
genProdIO_Syn_EProduction :: (IO ()), Syn_EProduction -> [PP_Doc]
imports_Syn_EProduction :: ([PP_Doc]), Syn_EProduction -> PP_Doc
recordtype_Syn_EProduction :: (PP_Doc), Syn_EProduction -> Seq PP_Doc
semFunBndDefs_Syn_EProduction :: (Seq PP_Doc), Syn_EProduction -> Seq PP_Doc
semFunBndTps_Syn_EProduction :: (Seq PP_Doc), Syn_EProduction -> PP_Doc
sem_nt_Syn_EProduction :: (PP_Doc), Syn_EProduction -> PP_Doc
sem_prod_Syn_EProduction :: (PP_Doc), Syn_EProduction -> PP_Doc
sem_prod_tys_Syn_EProduction :: (PP_Doc), Syn_EProduction -> PP_Doc
t_visits_Syn_EProduction :: (PP_Doc), Syn_EProduction -> Map Int VisitKind
visitKinds_Syn_EProduction :: (Map VisitIdentifier VisitKind), Syn_EProduction -> Map Int (Set Identifier)
visitdefs_Syn_EProduction :: (Map VisitIdentifier (Set Identifier)), Syn_EProduction -> Map Int (Set Identifier)
visituses_Syn_EProduction :: (Map VisitIdentifier (Set Identifier)) }
{-# INLINABLE wrap_EProduction #-}
wrap_EProduction :: T_EProduction -> Inh_EProduction -> (Syn_EProduction )
wrap_EProduction :: T_EProduction -> Inh_EProduction -> Syn_EProduction
wrap_EProduction (T_EProduction Identity T_EProduction_s14
act) (Inh_EProduction Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Set Int
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses ClassContext
_lhsIclassCtxs Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks) =
Identity Syn_EProduction -> Syn_EProduction
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_EProduction_s14
sem <- Identity T_EProduction_s14
act
let arg13 :: T_EProduction_vIn13
arg13 = Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Set Int
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> ClassContext
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> Attributes
-> Int
-> Map Identifier Attributes
-> String
-> String
-> Map Int StateCtx
-> Identifier
-> Type
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Bool
-> Attributes
-> PP_Doc
-> T_EProduction_vIn13
T_EProduction_vIn13 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Set Int
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses ClassContext
_lhsIclassCtxs Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks
(T_EProduction_vOut13 [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Int
_lhsOcount PP_Doc
_lhsOdatatype Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports PP_Doc
_lhsOrecordtype Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod PP_Doc
_lhsOsem_prod_tys PP_Doc
_lhsOt_visits Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses) <- T_EProduction_vOut13 -> Identity T_EProduction_vOut13
forall (m :: * -> *) a. Monad m => a -> m a
return (T_EProduction_s14 -> T_EProduction_v13
inv_EProduction_s14 T_EProduction_s14
sem T_EProduction_vIn13
arg13)
Syn_EProduction -> Identity Syn_EProduction
forall (m :: * -> *) a. Monad m => a -> m a
return ([VisitStateState]
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Int
-> PP_Doc
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> PP_Doc
-> Seq PP_Doc
-> Seq PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Syn_EProduction
Syn_EProduction [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Int
_lhsOcount PP_Doc
_lhsOdatatype Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports PP_Doc
_lhsOrecordtype Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod PP_Doc
_lhsOsem_prod_tys PP_Doc
_lhsOt_visits Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses)
)
{-# INLINE sem_EProduction #-}
sem_EProduction :: EProduction -> T_EProduction
sem_EProduction :: EProduction -> T_EProduction
sem_EProduction ( EProduction Identifier
con_ [Identifier]
params_ [Type]
constraints_ ERules
rules_ EChildren
children_ Visits
visits_ ) = Identifier
-> [Identifier]
-> [Type]
-> T_ERules
-> T_EChildren
-> T_Visits
-> T_EProduction
sem_EProduction_EProduction Identifier
con_ [Identifier]
params_ [Type]
constraints_ ( ERules -> T_ERules
sem_ERules ERules
rules_ ) ( EChildren -> T_EChildren
sem_EChildren EChildren
children_ ) ( Visits -> T_Visits
sem_Visits Visits
visits_ )
newtype T_EProduction = T_EProduction {
T_EProduction -> Identity T_EProduction_s14
attach_T_EProduction :: Identity (T_EProduction_s14 )
}
newtype T_EProduction_s14 = C_EProduction_s14 {
T_EProduction_s14 -> T_EProduction_v13
inv_EProduction_s14 :: (T_EProduction_v13 )
}
data T_EProduction_s15 = C_EProduction_s15
type T_EProduction_v13 = (T_EProduction_vIn13 ) -> (T_EProduction_vOut13 )
data T_EProduction_vIn13 = T_EProduction_vIn13 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Set StateIdentifier) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (ClassContext) (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (String -> String -> String -> Bool -> String) (PP_Doc) (Attributes) (StateIdentifier) (Map ConstructorIdent (Map Identifier Type)) (String) (String) (Map StateIdentifier StateCtx) (NontermIdent) (Type) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Bool) (Attributes) (PP_Doc)
data T_EProduction_vOut13 = T_EProduction_vOut13 ([VisitStateState]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Int) (PP_Doc) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))
{-# NOINLINE sem_EProduction_EProduction #-}
sem_EProduction_EProduction :: (ConstructorIdent) -> ([Identifier]) -> ([Type]) -> T_ERules -> T_EChildren -> T_Visits -> T_EProduction
sem_EProduction_EProduction :: Identifier
-> [Identifier]
-> [Type]
-> T_ERules
-> T_EChildren
-> T_Visits
-> T_EProduction
sem_EProduction_EProduction Identifier
arg_con_ [Identifier]
arg_params_ [Type]
arg_constraints_ T_ERules
arg_rules_ T_EChildren
arg_children_ T_Visits
arg_visits_ = Identity T_EProduction_s14 -> T_EProduction
T_EProduction (T_EProduction_s14 -> Identity T_EProduction_s14
forall (m :: * -> *) a. Monad m => a -> m a
return T_EProduction_s14
st14) where
{-# NOINLINE st14 #-}
st14 :: T_EProduction_s14
st14 = let
v13 :: T_EProduction_v13
v13 :: T_EProduction_v13
v13 = \ (T_EProduction_vIn13 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Set Int
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses ClassContext
_lhsIclassCtxs Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks) -> ( let
_rulesX23 :: T_ERules_s23
_rulesX23 = Identity T_ERules_s23 -> T_ERules_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ERules -> Identity T_ERules_s23
attach_T_ERules (T_ERules
arg_rules_))
_childrenX5 :: T_EChildren_s5
_childrenX5 = Identity T_EChildren_s5 -> T_EChildren_s5
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_EChildren -> Identity T_EChildren_s5
attach_T_EChildren (T_EChildren
arg_children_))
_visitsX56 :: T_Visits_s56
_visitsX56 = Identity T_Visits_s56 -> T_Visits_s56
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Visits -> Identity T_Visits_s56
attach_T_Visits (T_Visits
arg_visits_))
(T_ERules_vOut22 Seq Error
_rulesIerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_rulesImrules Map Identifier (Set String)
_rulesIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_rulesIruleuses PP_Doc
_rulesIsem_rules Set String
_rulesIusedArgs) = T_ERules_s23 -> T_ERules_v22
inv_ERules_s23 T_ERules_s23
_rulesX23 (Map Identifier Attributes
-> Map Identifier Attributes
-> Attributes
-> Identifier
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> Attributes
-> Set String
-> Attributes
-> String
-> String
-> Identifier
-> Options
-> Map Identifier (Set VisitKind)
-> Attributes
-> PP_Doc
-> Map Identifier Int
-> T_ERules_vIn22
T_ERules_vIn22 Map Identifier Attributes
_rulesOallInhmap Map Identifier Attributes
_rulesOallSynmap Attributes
_rulesOchildTypes Identifier
_rulesOcon Map Identifier ConstructorType
_rulesOconstructorTypeMap String -> String -> String -> Bool -> String
_rulesOdclModuleHeader String -> String -> String -> Bool -> String
_rulesOiclModuleHeader PP_Doc
_rulesOimportBlocks Attributes
_rulesOinhmap Set String
_rulesOlazyIntras Attributes
_rulesOlocalAttrTypes String
_rulesOmainFile String
_rulesOmainName Identifier
_rulesOnt Options
_rulesOoptions Map Identifier (Set VisitKind)
_rulesOruleKinds Attributes
_rulesOsynmap PP_Doc
_rulesOtextBlocks Map Identifier Int
_rulesOusageInfo)
(T_EChildren_vOut4 [PP_Doc]
_childrenIargnamesw [PP_Doc]
_childrenIargpats [PP_Doc]
_childrenIargtps Attributes
_childrenIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_childrenIchildintros [PP_Doc]
_childrenIdatatype [Identifier]
_childrenIrecfields [PP_Doc]
_childrenIrecordtype Set String
_childrenIterminaldefs Set String
_childrenIusedArgs) = T_EChildren_s5 -> T_EChildren_v4
inv_EChildren_s5 T_EChildren_s5
_childrenX5 (Map Identifier Int
-> Identifier
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> String
-> String
-> Identifier
-> Options
-> PP_Doc
-> T_EChildren_vIn4
T_EChildren_vIn4 Map Identifier Int
_childrenOallInitStates Identifier
_childrenOcon Map Identifier ConstructorType
_childrenOconstructorTypeMap String -> String -> String -> Bool -> String
_childrenOdclModuleHeader String -> String -> String -> Bool -> String
_childrenOiclModuleHeader PP_Doc
_childrenOimportBlocks String
_childrenOmainFile String
_childrenOmainName Identifier
_childrenOnt Options
_childrenOoptions PP_Doc
_childrenOtextBlocks)
(T_Visits_vOut55 [VisitStateState]
_visitsIallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_visitsIchildvisit Seq Error
_visitsIerrors Map Int (Int, Int)
_visitsIfromToStates Map Int (Map String (Maybe NonLocalAttr))
_visitsIintramap Set String
_visitsIlazyIntras Map Identifier (Set VisitKind)
_visitsIruleKinds Map Identifier Int
_visitsIruleUsage [(Int, Bool -> PP_Doc)]
_visitsIsem_visit PP_Doc
_visitsIt_visits Set String
_visitsIusedArgs Map Int VisitKind
_visitsIvisitKinds Map Int (Set Identifier)
_visitsIvisitdefs Map Int (Set Identifier)
_visitsIvisituses) = T_Visits_s56 -> T_Visits_v55
inv_Visits_s56 T_Visits_s56
_visitsX56 (Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Map String (Maybe NonLocalAttr))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Identifier
-> Attributes
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Int StateCtx
-> Identifier
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Map Identifier (Set String)
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> Attributes
-> Set String
-> T_Visits_vIn55
T_Visits_vIn55 Map Int (Int, Int)
_visitsOallFromToStates Map Identifier Attributes
_visitsOallInhmap Map Identifier Int
_visitsOallInitStates Map Identifier Attributes
_visitsOallSynmap Map Int VisitKind
_visitsOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_visitsOallchildvisit Map Int (Map String (Maybe NonLocalAttr))
_visitsOallintramap Map Int (Set Identifier)
_visitsOavisitdefs Map Int (Set Identifier)
_visitsOavisituses Attributes
_visitsOchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_visitsOchildintros Identifier
_visitsOcon Attributes
_visitsOinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_visitsOmrules Map Int StateCtx
_visitsOnextVisits Identifier
_visitsOnt Options
_visitsOoptions [Identifier]
_visitsOparams Map Int StateCtx
_visitsOprevVisits Map Identifier (Set String)
_visitsOruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_visitsOruleuses Attributes
_visitsOsynmap Set String
_visitsOterminaldefs)
_childrenOcon :: Identifier
_childrenOcon = Identifier -> Identifier
forall a. a -> a
rule247 Identifier
arg_con_
_rulesOcon :: Identifier
_rulesOcon = Identifier -> Identifier
forall a. a -> a
rule248 Identifier
arg_con_
_visitsOcon :: Identifier
_visitsOcon = Identifier -> Identifier
forall a. a -> a
rule249 Identifier
arg_con_
_lhsOdatatype :: PP_Doc
_lhsOdatatype :: PP_Doc
_lhsOdatatype = [PP_Doc]
-> PP_Doc
-> Identifier
-> Options
-> Bool
-> PP_Doc
-> Identifier
-> PP_Doc
rule250 [PP_Doc]
_childrenIdatatype PP_Doc
_classPP1 Identifier
_lhsInt Options
_lhsIoptions Bool
_lhsIrename PP_Doc
_quantPP1 Identifier
arg_con_
_lhsOrecordtype :: PP_Doc
_lhsOrecordtype :: PP_Doc
_lhsOrecordtype = [PP_Doc] -> PP_Doc -> PP_Doc -> PP_Doc
rule251 [PP_Doc]
_childrenIrecordtype PP_Doc
_classPP1 PP_Doc
_quantPP1
_classPP1 :: PP_Doc
_classPP1 = [Type] -> PP_Doc
rule252 [Type]
arg_constraints_
_quantPP1 :: PP_Doc
_quantPP1 = [Identifier] -> PP_Doc
rule253 [Identifier]
arg_params_
_lhsOcount :: Int
_lhsOcount :: Int
_lhsOcount = () -> Int
rule254 ()
_lhsOsem_nt :: PP_Doc
_lhsOsem_nt :: PP_Doc
_lhsOsem_nt = [PP_Doc]
-> [PP_Doc]
-> [Identifier]
-> Map Identifier ConstructorType
-> Identifier
-> Bool
-> Identifier
-> PP_Doc
rule255 [PP_Doc]
_childrenIargnamesw [PP_Doc]
_childrenIargpats [Identifier]
_childrenIrecfields Map Identifier ConstructorType
_lhsIconstructorTypeMap Identifier
_lhsInt Bool
_lhsIrename Identifier
arg_con_
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = PP_Doc -> Seq PP_Doc
forall a. a -> Seq a
rule256 PP_Doc
_semFunBndDef
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps = PP_Doc -> Seq PP_Doc
forall a. a -> Seq a
rule257 PP_Doc
_semFunBndTp
_semFunBndDef :: PP_Doc
_semFunBndDef = String -> String -> PP_Doc
rule258 String
_semFunBndNm String
_semname
_semFunBndTp :: PP_Doc
_semFunBndTp = String -> PP_Doc -> PP_Doc
rule259 String
_semFunBndNm PP_Doc
_sem_tp
_semFunBndNm :: String
_semFunBndNm = Identifier -> Identifier -> String
rule260 Identifier
_lhsInt Identifier
arg_con_
_t_type :: PP_Doc
_t_type = Identifier -> PP_Doc
rule261 Identifier
_lhsInt
_t_params :: PP_Doc
_t_params = [Identifier] -> PP_Doc
rule262 [Identifier]
_lhsIparams
_usedArgs :: Set String
_usedArgs = Set String -> Set String -> Set String -> Set String
rule263 Set String
_childrenIusedArgs Set String
_rulesIusedArgs Set String
_visitsIusedArgs
_args :: [PP_Doc]
_args = [PP_Doc] -> Set String -> [PP_Doc]
rule264 [PP_Doc]
_childrenIargpats Set String
_usedArgs
_semname :: String
_semname = Identifier -> Identifier -> String
rule265 Identifier
_lhsInt Identifier
arg_con_
_sem_tp :: PP_Doc
_sem_tp = [PP_Doc] -> PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc
rule266 [PP_Doc]
_childrenIargtps PP_Doc
_classPP2 PP_Doc
_quantPP2 PP_Doc
_t_params PP_Doc
_t_type
_classPP2 :: PP_Doc
_classPP2 = ClassContext -> [Type] -> PP_Doc
rule267 ClassContext
_lhsIclassCtxs [Type]
arg_constraints_
_quantPP2 :: PP_Doc
_quantPP2 = [Identifier] -> [Identifier] -> PP_Doc
rule268 [Identifier]
_lhsIparams [Identifier]
arg_params_
_lhsOsem_prod_tys :: PP_Doc
_lhsOsem_prod_tys :: PP_Doc
_lhsOsem_prod_tys = PP_Doc -> String -> PP_Doc
rule269 PP_Doc
_sem_tp String
_semname
_sem_prod :: PP_Doc
_sem_prod = [PP_Doc]
-> Int
-> Maybe PP_Doc
-> (PP_Doc -> Maybe PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc)
-> PP_Doc
-> PP_Doc
-> String
-> PP_Doc
-> PP_Doc
forall t t.
[PP_Doc]
-> Int
-> t
-> (PP_Doc -> t -> t -> PP_Doc -> PP_Doc)
-> t
-> PP_Doc
-> String
-> PP_Doc
-> PP_Doc
rule270 [PP_Doc]
_args Int
_lhsIinitial Maybe PP_Doc
_mbInitializer PP_Doc -> Maybe PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc
_mkSemBody PP_Doc
_outerlet PP_Doc
_sem_tp String
_semname PP_Doc
_t_type
_mkSemBody :: PP_Doc -> Maybe PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc
_mkSemBody = () -> PP_Doc -> Maybe PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc
rule271 ()
_mbInitializer :: Maybe PP_Doc
_mbInitializer = Options -> Maybe PP_Doc
rule272 Options
_lhsIoptions
_outerlet :: PP_Doc
_outerlet = PP_Doc -> [PP_Doc] -> PP_Doc
rule273 PP_Doc
_rulesIsem_rules [PP_Doc]
_statefns
_statefns :: [PP_Doc]
_statefns = (Int -> PP_Doc) -> Set Int -> [PP_Doc]
forall b. (Int -> b) -> Set Int -> [b]
rule274 Int -> PP_Doc
_genstfn Set Int
_lhsIallstates
_genstfn :: Int -> PP_Doc
_genstfn = (PP_Doc -> PP_Doc)
-> Int
-> Map Int StateCtx
-> Identifier
-> Map Int StateCtx
-> (Int -> PP_Doc)
-> (Int -> PP_Doc)
-> (Int -> Bool -> PP_Doc)
-> Int
-> PP_Doc
rule275 PP_Doc -> PP_Doc
_addbang Int
_lhsIinitial Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Map Int StateCtx
_lhsIprevVisits Int -> PP_Doc
_stargs Int -> PP_Doc
_stks Int -> Bool -> PP_Doc
_stvs
_stargs :: Int -> PP_Doc
_stargs = (PP_Doc -> PP_Doc)
-> Attributes
-> Set String
-> Map Identifier Attributes
-> Map Identifier Attributes
-> Options
-> Attributes
-> Map Int (Map String (Maybe NonLocalAttr))
-> Int
-> PP_Doc
rule276 PP_Doc -> PP_Doc
_addbang Attributes
_childTypes Set String
_lazyIntras Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Options
_lhsIoptions Attributes
_localAttrTypes Map Int (Map String (Maybe NonLocalAttr))
_visitsIintramap
_stks :: Int -> PP_Doc
_stks = Identifier -> (Int -> [VisitStateState]) -> PP_Doc -> Int -> PP_Doc
forall b c.
Identifier -> (Int -> [(Int, b, c)]) -> PP_Doc -> Int -> PP_Doc
rule277 Identifier
_lhsInt Int -> [VisitStateState]
_stvisits PP_Doc
_t_params
_stvisits :: Int -> [VisitStateState]
_stvisits = [VisitStateState] -> Int -> [VisitStateState]
rule278 [VisitStateState]
_visitsIallvisits
_stvs :: Int -> Bool -> PP_Doc
_stvs = [(Int, Bool -> PP_Doc)] -> Int -> Bool -> PP_Doc
rule279 [(Int, Bool -> PP_Doc)]
_visitsIsem_visit
_visitsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_visitsOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule280 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_rulesImrules
_visitsOchildintros :: Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_visitsOchildintros = Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
rule281 Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_childrenIchildintros
_rulesOusageInfo :: Map Identifier Int
_rulesOusageInfo = Map Identifier Int -> Map Identifier Int
rule282 Map Identifier Int
_visitsIruleUsage
_rulesOruleKinds :: Map Identifier (Set VisitKind)
_rulesOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule283 Map Identifier (Set VisitKind)
_visitsIruleKinds
_visitsOallintramap :: Map Int (Map String (Maybe NonLocalAttr))
_visitsOallintramap = Map Int (Map String (Maybe NonLocalAttr))
-> Map Int (Map String (Maybe NonLocalAttr))
rule284 Map Int (Map String (Maybe NonLocalAttr))
_visitsIintramap
_visitsOterminaldefs :: Set String
_visitsOterminaldefs = Set String -> Set String
rule285 Set String
_childrenIterminaldefs
_visitsOruledefs :: Map Identifier (Set String)
_visitsOruledefs = Map Identifier (Set String) -> Map Identifier (Set String)
rule286 Map Identifier (Set String)
_rulesIruledefs
_visitsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
_visitsOruleuses = Map Identifier (Map String (Maybe NonLocalAttr))
-> Map Identifier (Map String (Maybe NonLocalAttr))
rule287 Map Identifier (Map String (Maybe NonLocalAttr))
_rulesIruleuses
_lazyIntras :: Set String
_lazyIntras = Set String -> Set String
rule288 Set String
_visitsIlazyIntras
_lhsOimports :: [PP_Doc]
_lhsOimports :: [PP_Doc]
_lhsOimports = String -> [PP_Doc]
rule289 String
_moduleName
_moduleName :: String
_moduleName = String -> String -> String
rule290 String
_lhsImainName String
_suffix
_suffix :: String
_suffix = Identifier -> Identifier -> String
rule291 Identifier
_lhsInt Identifier
arg_con_
_outputfile :: String
_outputfile = String -> String -> String
rule292 String
_lhsImainFile String
_suffix
_ppMonadImports :: PP_Doc
_ppMonadImports = () -> PP_Doc
rule293 ()
_lhsOgenProdIO :: IO ()
_lhsOgenProdIO :: IO ()
_lhsOgenProdIO = (String -> String -> String -> Bool -> String)
-> PP_Doc
-> String
-> String
-> PP_Doc
-> PP_Doc
-> String
-> String
-> IO ()
rule294 String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks String
_lhsImainName String
_outputfile PP_Doc
_ppMonadImports PP_Doc
_sem_prod String
_semname String
_suffix
_addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule295 Options
_lhsIoptions
_childTypes :: Attributes
_childTypes = Attributes -> Type -> Attributes
rule296 Attributes
_childrenIchildTypes Type
_lhsIntType
_localAttrTypes :: Attributes
_localAttrTypes = Map Identifier Attributes -> Identifier -> Attributes
rule297 Map Identifier Attributes
_lhsIlocalAttrTypes Identifier
arg_con_
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule298 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_visitsIchildvisit
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule299 Seq Error
_rulesIerrors Seq Error
_visitsIerrors
_lhsOfromToStates :: Map VisitIdentifier (Int,Int)
_lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule300 Map Int (Int, Int)
_visitsIfromToStates
_lhsOt_visits :: PP_Doc
_lhsOt_visits :: PP_Doc
_lhsOt_visits = PP_Doc -> PP_Doc
rule301 PP_Doc
_visitsIt_visits
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind
rule302 Map Int VisitKind
_visitsIvisitKinds
_lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
_lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule303 Map Int (Set Identifier)
_visitsIvisitdefs
_lhsOvisituses :: Map VisitIdentifier (Set Identifier)
_lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule304 Map Int (Set Identifier)
_visitsIvisituses
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits = [VisitStateState] -> [VisitStateState]
rule305 [VisitStateState]
_visitsIallvisits
_lhsOsem_prod :: PP_Doc
_lhsOsem_prod :: PP_Doc
_lhsOsem_prod = PP_Doc -> PP_Doc
forall a. a -> a
rule306 PP_Doc
_sem_prod
_rulesOallInhmap :: Map Identifier Attributes
_rulesOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule307 Map Identifier Attributes
_lhsIallInhmap
_rulesOallSynmap :: Map Identifier Attributes
_rulesOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule308 Map Identifier Attributes
_lhsIallSynmap
_rulesOchildTypes :: Attributes
_rulesOchildTypes = Attributes -> Attributes
forall a. a -> a
rule309 Attributes
_childTypes
_rulesOconstructorTypeMap :: Map Identifier ConstructorType
_rulesOconstructorTypeMap = Map Identifier ConstructorType -> Map Identifier ConstructorType
rule310 Map Identifier ConstructorType
_lhsIconstructorTypeMap
_rulesOdclModuleHeader :: String -> String -> String -> Bool -> String
_rulesOdclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule311 String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
_rulesOiclModuleHeader :: String -> String -> String -> Bool -> String
_rulesOiclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule312 String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
_rulesOimportBlocks :: PP_Doc
_rulesOimportBlocks = PP_Doc -> PP_Doc
rule313 PP_Doc
_lhsIimportBlocks
_rulesOinhmap :: Attributes
_rulesOinhmap = Attributes -> Attributes
rule314 Attributes
_lhsIinhmap
_rulesOlazyIntras :: Set String
_rulesOlazyIntras = Set String -> Set String
forall a. a -> a
rule315 Set String
_lazyIntras
_rulesOlocalAttrTypes :: Attributes
_rulesOlocalAttrTypes = Attributes -> Attributes
forall a. a -> a
rule316 Attributes
_localAttrTypes
_rulesOmainFile :: String
_rulesOmainFile = String -> String
rule317 String
_lhsImainFile
_rulesOmainName :: String
_rulesOmainName = String -> String
rule318 String
_lhsImainName
_rulesOnt :: Identifier
_rulesOnt = Identifier -> Identifier
rule319 Identifier
_lhsInt
_rulesOoptions :: Options
_rulesOoptions = Options -> Options
rule320 Options
_lhsIoptions
_rulesOsynmap :: Attributes
_rulesOsynmap = Attributes -> Attributes
rule321 Attributes
_lhsIsynmap
_rulesOtextBlocks :: PP_Doc
_rulesOtextBlocks = PP_Doc -> PP_Doc
rule322 PP_Doc
_lhsItextBlocks
_childrenOallInitStates :: Map Identifier Int
_childrenOallInitStates = Map Identifier Int -> Map Identifier Int
rule323 Map Identifier Int
_lhsIallInitStates
_childrenOconstructorTypeMap :: Map Identifier ConstructorType
_childrenOconstructorTypeMap = Map Identifier ConstructorType -> Map Identifier ConstructorType
rule324 Map Identifier ConstructorType
_lhsIconstructorTypeMap
_childrenOdclModuleHeader :: String -> String -> String -> Bool -> String
_childrenOdclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule325 String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
_childrenOiclModuleHeader :: String -> String -> String -> Bool -> String
_childrenOiclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule326 String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
_childrenOimportBlocks :: PP_Doc
_childrenOimportBlocks = PP_Doc -> PP_Doc
rule327 PP_Doc
_lhsIimportBlocks
_childrenOmainFile :: String
_childrenOmainFile = String -> String
rule328 String
_lhsImainFile
_childrenOmainName :: String
_childrenOmainName = String -> String
rule329 String
_lhsImainName
_childrenOnt :: Identifier
_childrenOnt = Identifier -> Identifier
rule330 Identifier
_lhsInt
_childrenOoptions :: Options
_childrenOoptions = Options -> Options
rule331 Options
_lhsIoptions
_childrenOtextBlocks :: PP_Doc
_childrenOtextBlocks = PP_Doc -> PP_Doc
rule332 PP_Doc
_lhsItextBlocks
_visitsOallFromToStates :: Map Int (Int, Int)
_visitsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule333 Map Int (Int, Int)
_lhsIallFromToStates
_visitsOallInhmap :: Map Identifier Attributes
_visitsOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule334 Map Identifier Attributes
_lhsIallInhmap
_visitsOallInitStates :: Map Identifier Int
_visitsOallInitStates = Map Identifier Int -> Map Identifier Int
rule335 Map Identifier Int
_lhsIallInitStates
_visitsOallSynmap :: Map Identifier Attributes
_visitsOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule336 Map Identifier Attributes
_lhsIallSynmap
_visitsOallVisitKinds :: Map Int VisitKind
_visitsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule337 Map Int VisitKind
_lhsIallVisitKinds
_visitsOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_visitsOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule338 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
_visitsOavisitdefs :: Map Int (Set Identifier)
_visitsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule339 Map Int (Set Identifier)
_lhsIavisitdefs
_visitsOavisituses :: Map Int (Set Identifier)
_visitsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule340 Map Int (Set Identifier)
_lhsIavisituses
_visitsOchildTypes :: Attributes
_visitsOchildTypes = Attributes -> Attributes
forall a. a -> a
rule341 Attributes
_childTypes
_visitsOinhmap :: Attributes
_visitsOinhmap = Attributes -> Attributes
rule342 Attributes
_lhsIinhmap
_visitsOnextVisits :: Map Int StateCtx
_visitsOnextVisits = Map Int StateCtx -> Map Int StateCtx
rule343 Map Int StateCtx
_lhsInextVisits
_visitsOnt :: Identifier
_visitsOnt = Identifier -> Identifier
rule344 Identifier
_lhsInt
_visitsOoptions :: Options
_visitsOoptions = Options -> Options
rule345 Options
_lhsIoptions
_visitsOparams :: [Identifier]
_visitsOparams = [Identifier] -> [Identifier]
rule346 [Identifier]
_lhsIparams
_visitsOprevVisits :: Map Int StateCtx
_visitsOprevVisits = Map Int StateCtx -> Map Int StateCtx
rule347 Map Int StateCtx
_lhsIprevVisits
_visitsOsynmap :: Attributes
_visitsOsynmap = Attributes -> Attributes
rule348 Attributes
_lhsIsynmap
__result_ :: T_EProduction_vOut13
__result_ = [VisitStateState]
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Int
-> PP_Doc
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> PP_Doc
-> Seq PP_Doc
-> Seq PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_EProduction_vOut13
T_EProduction_vOut13 [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Int
_lhsOcount PP_Doc
_lhsOdatatype Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports PP_Doc
_lhsOrecordtype Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod PP_Doc
_lhsOsem_prod_tys PP_Doc
_lhsOt_visits Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
in T_EProduction_vOut13
__result_ )
in T_EProduction_v13 -> T_EProduction_s14
C_EProduction_s14 T_EProduction_v13
v13
{-# INLINE rule247 #-}
{-# LINE 72 "src-ag/ExecutionPlan2Clean.ag" #-}
rule247 = \ con_ ->
{-# LINE 72 "src-ag/ExecutionPlan2Clean.ag" #-}
con_
{-# LINE 2369 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule248 #-}
{-# LINE 73 "src-ag/ExecutionPlan2Clean.ag" #-}
rule248 = \ con_ ->
{-# LINE 73 "src-ag/ExecutionPlan2Clean.ag" #-}
con_
{-# LINE 2375 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule249 #-}
{-# LINE 74 "src-ag/ExecutionPlan2Clean.ag" #-}
rule249 = \ con_ ->
{-# LINE 74 "src-ag/ExecutionPlan2Clean.ag" #-}
con_
{-# LINE 2381 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule250 #-}
{-# LINE 215 "src-ag/ExecutionPlan2Clean.ag" #-}
rule250 = \ ((_childrenIdatatype) :: [PP_Doc]) _classPP1 ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_lhsIrename) :: Bool) _quantPP1 con_ ->
{-# LINE 215 "src-ag/ExecutionPlan2Clean.ag" #-}
_quantPP1 >#< _classPP1
>#< conname _lhsIrename _lhsInt con_
>#< ppConFields (dataRecords _lhsIoptions) _childrenIdatatype
{-# LINE 2389 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule251 #-}
{-# LINE 218 "src-ag/ExecutionPlan2Clean.ag" #-}
rule251 = \ ((_childrenIrecordtype) :: [PP_Doc]) _classPP1 _quantPP1 ->
{-# LINE 218 "src-ag/ExecutionPlan2Clean.ag" #-}
_quantPP1 >#< _classPP1
>#< ppConFields True _childrenIrecordtype
{-# LINE 2396 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule252 #-}
{-# LINE 220 "src-ag/ExecutionPlan2Clean.ag" #-}
rule252 = \ constraints_ ->
{-# LINE 220 "src-ag/ExecutionPlan2Clean.ag" #-}
ppClasses (classConstrsToDocs constraints_)
{-# LINE 2402 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule253 #-}
{-# LINE 221 "src-ag/ExecutionPlan2Clean.ag" #-}
rule253 = \ params_ ->
{-# LINE 221 "src-ag/ExecutionPlan2Clean.ag" #-}
ppQuants params_
{-# LINE 2408 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule254 #-}
{-# LINE 320 "src-ag/ExecutionPlan2Clean.ag" #-}
rule254 = \ (_ :: ()) ->
{-# LINE 320 "src-ag/ExecutionPlan2Clean.ag" #-}
1
{-# LINE 2414 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule255 #-}
{-# LINE 325 "src-ag/ExecutionPlan2Clean.ag" #-}
rule255 = \ ((_childrenIargnamesw) :: [PP_Doc]) ((_childrenIargpats) :: [PP_Doc] ) ((_childrenIrecfields) :: [Identifier] ) ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ((_lhsInt) :: NontermIdent) ((_lhsIrename) :: Bool) con_ ->
{-# LINE 325 "src-ag/ExecutionPlan2Clean.ag" #-}
let lhs = "sem_" >|< _lhsInt
rhs = "=" >#< "sem_" >|< _lhsInt >|< "_" >|< con_ >#< ppSpaced _childrenIargnamesw
cnnm = conname _lhsIrename _lhsInt con_
in if isRecordConstructor _lhsInt _lhsIconstructorTypeMap
then lhs >#< "{" >#< cnnm >#< "|" >#<
pp_block "" "" "," (zipWith (\l r -> l >#< "=" >#< r) _childrenIrecfields _childrenIargpats) >#< "}" >#< rhs
else lhs >#< "(" >#< cnnm >#< ppSpaced _childrenIargpats >#< ")" >#< rhs
{-# LINE 2426 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule256 #-}
{-# LINE 591 "src-ag/ExecutionPlan2Clean.ag" #-}
rule256 = \ _semFunBndDef ->
{-# LINE 591 "src-ag/ExecutionPlan2Clean.ag" #-}
Seq.singleton _semFunBndDef
{-# LINE 2432 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule257 #-}
{-# LINE 592 "src-ag/ExecutionPlan2Clean.ag" #-}
rule257 = \ _semFunBndTp ->
{-# LINE 592 "src-ag/ExecutionPlan2Clean.ag" #-}
Seq.singleton _semFunBndTp
{-# LINE 2438 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule258 #-}
{-# LINE 593 "src-ag/ExecutionPlan2Clean.ag" #-}
rule258 = \ _semFunBndNm _semname ->
{-# LINE 593 "src-ag/ExecutionPlan2Clean.ag" #-}
_semFunBndNm >#< "=" >#< _semname
{-# LINE 2444 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule259 #-}
{-# LINE 594 "src-ag/ExecutionPlan2Clean.ag" #-}
rule259 = \ _semFunBndNm _sem_tp ->
{-# LINE 594 "src-ag/ExecutionPlan2Clean.ag" #-}
_semFunBndNm >#< "::" >#< _sem_tp
{-# LINE 2450 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule260 #-}
{-# LINE 595 "src-ag/ExecutionPlan2Clean.ag" #-}
rule260 = \ ((_lhsInt) :: NontermIdent) con_ ->
{-# LINE 595 "src-ag/ExecutionPlan2Clean.ag" #-}
lateSemConLabel _lhsInt con_
{-# LINE 2456 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule261 #-}
{-# LINE 659 "src-ag/ExecutionPlan2Clean.ag" #-}
rule261 = \ ((_lhsInt) :: NontermIdent) ->
{-# LINE 659 "src-ag/ExecutionPlan2Clean.ag" #-}
"T_" >|< _lhsInt
{-# LINE 2462 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule262 #-}
{-# LINE 660 "src-ag/ExecutionPlan2Clean.ag" #-}
rule262 = \ ((_lhsIparams) :: [Identifier]) ->
{-# LINE 660 "src-ag/ExecutionPlan2Clean.ag" #-}
ppSpaced _lhsIparams
{-# LINE 2468 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule263 #-}
{-# LINE 661 "src-ag/ExecutionPlan2Clean.ag" #-}
rule263 = \ ((_childrenIusedArgs) :: Set String) ((_rulesIusedArgs) :: Set String) ((_visitsIusedArgs) :: Set String) ->
{-# LINE 661 "src-ag/ExecutionPlan2Clean.ag" #-}
_childrenIusedArgs `Set.union` _visitsIusedArgs `Set.union` _rulesIusedArgs
{-# LINE 2474 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule264 #-}
{-# LINE 664 "src-ag/ExecutionPlan2Clean.ag" #-}
rule264 = \ ((_childrenIargpats) :: [PP_Doc] ) _usedArgs ->
{-# LINE 664 "src-ag/ExecutionPlan2Clean.ag" #-}
map (\x -> let (name,arg) = case show x of
"" -> ("", empty)
'!':name -> ("arg_" ++ name, "!arg_" >|< name)
name -> ("arg_" ++ name, "arg_" >|< name)
in if null name || name `Set.member` _usedArgs
then arg
else text "_") _childrenIargpats
{-# LINE 2486 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule265 #-}
{-# LINE 671 "src-ag/ExecutionPlan2Clean.ag" #-}
rule265 = \ ((_lhsInt) :: NontermIdent) con_ ->
{-# LINE 671 "src-ag/ExecutionPlan2Clean.ag" #-}
"sem_" ++ show _lhsInt ++ "_" ++ show con_
{-# LINE 2492 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule266 #-}
{-# LINE 672 "src-ag/ExecutionPlan2Clean.ag" #-}
rule266 = \ ((_childrenIargtps) :: [PP_Doc] ) _classPP2 _quantPP2 _t_params _t_type ->
{-# LINE 672 "src-ag/ExecutionPlan2Clean.ag" #-}
_quantPP2 >#< _classPP2 >#< ppSpaced _childrenIargtps
>#< (if length _childrenIargtps > 0 then "->" else "")
>#< _t_type >#< _t_params
{-# LINE 2500 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule267 #-}
{-# LINE 675 "src-ag/ExecutionPlan2Clean.ag" #-}
rule267 = \ ((_lhsIclassCtxs) :: ClassContext) constraints_ ->
{-# LINE 675 "src-ag/ExecutionPlan2Clean.ag" #-}
ppClasses (classCtxsToDocs _lhsIclassCtxs ++ classConstrsToDocs constraints_)
{-# LINE 2506 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule268 #-}
{-# LINE 676 "src-ag/ExecutionPlan2Clean.ag" #-}
rule268 = \ ((_lhsIparams) :: [Identifier]) params_ ->
{-# LINE 676 "src-ag/ExecutionPlan2Clean.ag" #-}
ppQuants (_lhsIparams ++ params_)
{-# LINE 2512 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule269 #-}
{-# LINE 678 "src-ag/ExecutionPlan2Clean.ag" #-}
rule269 = \ _sem_tp _semname ->
{-# LINE 678 "src-ag/ExecutionPlan2Clean.ag" #-}
_semname >#< " ::" >#< _sem_tp
{-# LINE 2518 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule270 #-}
{-# LINE 680 "src-ag/ExecutionPlan2Clean.ag" #-}
rule270 = \ _args ((_lhsIinitial) :: StateIdentifier) _mbInitializer _mkSemBody _outerlet _sem_tp _semname _t_type ->
{-# LINE 680 "src-ag/ExecutionPlan2Clean.ag" #-}
_semname >#< " ::" >#< _sem_tp
>-< _mkSemBody (_semname >#< ppSpaced _args >#< "=" >#< _t_type )
_mbInitializer _outerlet ("lift" >#< "st" >|< _lhsIinitial)
{-# LINE 2526 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule271 #-}
{-# LINE 683 "src-ag/ExecutionPlan2Clean.ag" #-}
rule271 = \ (_ :: ()) ->
{-# LINE 683 "src-ag/ExecutionPlan2Clean.ag" #-}
\prefix mbInit outerlet ret ->
case mbInit of
Nothing -> prefix >#< pp_parens ret >#< "where"
>-< indent 3 outerlet
Just m -> prefix >#< "(" >#< "do"
>-< indent 1 (
m
>-< "let"
>-< indent 2 outerlet
>-< ret )
>-< indent 1 ")"
{-# LINE 2542 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule272 #-}
{-# LINE 695 "src-ag/ExecutionPlan2Clean.ag" #-}
rule272 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 695 "src-ag/ExecutionPlan2Clean.ag" #-}
if parallelInvoke _lhsIoptions
then (Nothing :: Maybe PP_Doc)
else Nothing
{-# LINE 2550 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule273 #-}
{-# LINE 701 "src-ag/ExecutionPlan2Clean.ag" #-}
rule273 = \ ((_rulesIsem_rules) :: PP_Doc) _statefns ->
{-# LINE 701 "src-ag/ExecutionPlan2Clean.ag" #-}
vlist _statefns >-< _rulesIsem_rules
{-# LINE 2556 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule274 #-}
{-# LINE 702 "src-ag/ExecutionPlan2Clean.ag" #-}
rule274 = \ _genstfn ((_lhsIallstates) :: Set StateIdentifier) ->
{-# LINE 702 "src-ag/ExecutionPlan2Clean.ag" #-}
map _genstfn $ Set.toList _lhsIallstates
{-# LINE 2562 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule275 #-}
{-# LINE 703 "src-ag/ExecutionPlan2Clean.ag" #-}
rule275 = \ _addbang ((_lhsIinitial) :: StateIdentifier) ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ((_lhsInt) :: NontermIdent) ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) _stargs _stks _stvs ->
{-# LINE 703 "src-ag/ExecutionPlan2Clean.ag" #-}
\st -> let nextVisitInfo = Map.findWithDefault ManyVis st _lhsInextVisits
prevVisitInfo = Map.findWithDefault ManyVis st _lhsIprevVisits
stNm = "st" >|< st
lhs = bang stNm >#< "=" >#<
(
if st == _lhsIinitial
then empty
else "\\" >#< _stargs st >#< "->"
)
cCon = "C_" >|< _lhsInt >|< "_s" >|< st
bang | st == _lhsIinitial = _addbang
| otherwise = id
in case nextVisitInfo of
NoneVis ->
if st == _lhsIinitial
then lhs >#< cCon
else empty
OneVis vId -> mklet lhs (_stvs st False) (cCon >#< "v" >|< vId)
ManyVis -> mklet lhs (_stks st >-< _stvs st True) (cCon >#< "k" >|< st)
{-# LINE 2586 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule276 #-}
{-# LINE 731 "src-ag/ExecutionPlan2Clean.ag" #-}
rule276 = \ _addbang _childTypes _lazyIntras ((_lhsIallInhmap) :: Map NontermIdent Attributes) ((_lhsIallSynmap) :: Map NontermIdent Attributes) ((_lhsIoptions) :: Options) _localAttrTypes ((_visitsIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->
{-# LINE 731 "src-ag/ExecutionPlan2Clean.ag" #-}
\st -> let attrs = maybe Map.empty id $ Map.lookup st _visitsIintramap
in ppSpaced [ let match | str `Set.member` _lazyIntras = pp str
| otherwise = _addbang (pp str)
in case mbAttr of
Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->
case Map.lookup nm _localAttrTypes of
Just tp -> pp_parens (pp_parens match >#< "::" >#< ppTp tp)
Nothing -> match
Just attr | not (noPerStateTypeSigs _lhsIoptions) ->
case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _childTypes of
Just tpDoc -> pp_parens (pp_parens match >#< "::" >#< tpDoc)
Nothing -> match
_ -> match
| (str,mbAttr) <- Map.assocs attrs
] >#< dummyPat _lhsIoptions (Map.null attrs)
{-# LINE 2606 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule277 #-}
{-# LINE 747 "src-ag/ExecutionPlan2Clean.ag" #-}
rule277 = \ ((_lhsInt) :: NontermIdent) _stvisits _t_params ->
{-# LINE 747 "src-ag/ExecutionPlan2Clean.ag" #-}
\st -> if null (_stvisits st)
then empty
else "k" >|< st >#< "::" >#< "K_" >|< _lhsInt >|< "_s" >|< st >#< _t_params >#< "t" >#< "->" >#< "t"
>-< vlist (map (\(v,f,t) -> "k" >|< st >#< "K_" >|< _lhsInt >|< "_v" >|< v >#< "="
>#< "v" >|< v) $ _stvisits st)
{-# LINE 2616 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule278 #-}
{-# LINE 752 "src-ag/ExecutionPlan2Clean.ag" #-}
rule278 = \ ((_visitsIallvisits) :: [VisitStateState]) ->
{-# LINE 752 "src-ag/ExecutionPlan2Clean.ag" #-}
\st -> filter (\(v,f,t) -> f == st) _visitsIallvisits
{-# LINE 2622 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule279 #-}
{-# LINE 753 "src-ag/ExecutionPlan2Clean.ag" #-}
rule279 = \ ((_visitsIsem_visit) :: [(StateIdentifier,Bool -> PP_Doc)] ) ->
{-# LINE 753 "src-ag/ExecutionPlan2Clean.ag" #-}
\st inlinePragma -> vlist [ppf inlinePragma | (f,ppf) <- _visitsIsem_visit, f == st]
{-# LINE 2628 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule280 #-}
{-# LINE 754 "src-ag/ExecutionPlan2Clean.ag" #-}
rule280 = \ ((_rulesImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
{-# LINE 754 "src-ag/ExecutionPlan2Clean.ag" #-}
_rulesImrules
{-# LINE 2634 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule281 #-}
{-# LINE 942 "src-ag/ExecutionPlan2Clean.ag" #-}
rule281 = \ ((_childrenIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
{-# LINE 942 "src-ag/ExecutionPlan2Clean.ag" #-}
_childrenIchildintros
{-# LINE 2640 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule282 #-}
{-# LINE 1277 "src-ag/ExecutionPlan2Clean.ag" #-}
rule282 = \ ((_visitsIruleUsage) :: Map Identifier Int) ->
{-# LINE 1277 "src-ag/ExecutionPlan2Clean.ag" #-}
_visitsIruleUsage
{-# LINE 2646 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule283 #-}
{-# LINE 1292 "src-ag/ExecutionPlan2Clean.ag" #-}
rule283 = \ ((_visitsIruleKinds) :: Map Identifier (Set VisitKind)) ->
{-# LINE 1292 "src-ag/ExecutionPlan2Clean.ag" #-}
_visitsIruleKinds
{-# LINE 2652 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule284 #-}
{-# LINE 1321 "src-ag/ExecutionPlan2Clean.ag" #-}
rule284 = \ ((_visitsIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->
{-# LINE 1321 "src-ag/ExecutionPlan2Clean.ag" #-}
_visitsIintramap
{-# LINE 2658 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule285 #-}
{-# LINE 1322 "src-ag/ExecutionPlan2Clean.ag" #-}
rule285 = \ ((_childrenIterminaldefs) :: Set String) ->
{-# LINE 1322 "src-ag/ExecutionPlan2Clean.ag" #-}
_childrenIterminaldefs
{-# LINE 2664 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule286 #-}
{-# LINE 1346 "src-ag/ExecutionPlan2Clean.ag" #-}
rule286 = \ ((_rulesIruledefs) :: Map Identifier (Set String)) ->
{-# LINE 1346 "src-ag/ExecutionPlan2Clean.ag" #-}
_rulesIruledefs
{-# LINE 2670 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule287 #-}
{-# LINE 1347 "src-ag/ExecutionPlan2Clean.ag" #-}
rule287 = \ ((_rulesIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
{-# LINE 1347 "src-ag/ExecutionPlan2Clean.ag" #-}
_rulesIruleuses
{-# LINE 2676 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule288 #-}
{-# LINE 1401 "src-ag/ExecutionPlan2Clean.ag" #-}
rule288 = \ ((_visitsIlazyIntras) :: Set String) ->
{-# LINE 1401 "src-ag/ExecutionPlan2Clean.ag" #-}
_visitsIlazyIntras
{-# LINE 2682 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule289 #-}
{-# LINE 1486 "src-ag/ExecutionPlan2Clean.ag" #-}
rule289 = \ _moduleName ->
{-# LINE 1486 "src-ag/ExecutionPlan2Clean.ag" #-}
[pp $ "import " ++ _moduleName ]
{-# LINE 2688 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule290 #-}
{-# LINE 1487 "src-ag/ExecutionPlan2Clean.ag" #-}
rule290 = \ ((_lhsImainName) :: String) _suffix ->
{-# LINE 1487 "src-ag/ExecutionPlan2Clean.ag" #-}
_lhsImainName ++ _suffix
{-# LINE 2694 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule291 #-}
{-# LINE 1488 "src-ag/ExecutionPlan2Clean.ag" #-}
rule291 = \ ((_lhsInt) :: NontermIdent) con_ ->
{-# LINE 1488 "src-ag/ExecutionPlan2Clean.ag" #-}
'_' : show _lhsInt ++ ('_' : show con_)
{-# LINE 2700 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule292 #-}
{-# LINE 1489 "src-ag/ExecutionPlan2Clean.ag" #-}
rule292 = \ ((_lhsImainFile) :: String) _suffix ->
{-# LINE 1489 "src-ag/ExecutionPlan2Clean.ag" #-}
replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ _suffix )
{-# LINE 2706 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule293 #-}
{-# LINE 1490 "src-ag/ExecutionPlan2Clean.ag" #-}
rule293 = \ (_ :: ()) ->
{-# LINE 1490 "src-ag/ExecutionPlan2Clean.ag" #-}
pp "import qualified Control.Monad.Identity"
{-# LINE 2712 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule294 #-}
{-# LINE 1491 "src-ag/ExecutionPlan2Clean.ag" #-}
rule294 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIimportBlocks) :: PP_Doc) ((_lhsImainName) :: String) _outputfile _ppMonadImports _sem_prod _semname _suffix ->
{-# LINE 1491 "src-ag/ExecutionPlan2Clean.ag" #-}
writeModule _outputfile
[ pp $ _lhsIiclModuleHeader _lhsImainName _suffix _semname True
, _lhsIimportBlocks
, _ppMonadImports
, pp $ "import " ++ _lhsImainName ++ "_common"
, _sem_prod
]
{-# LINE 2724 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule295 #-}
{-# LINE 1567 "src-ag/ExecutionPlan2Clean.ag" #-}
rule295 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 1567 "src-ag/ExecutionPlan2Clean.ag" #-}
\x -> if bangpats _lhsIoptions then "!" >|< x else x
{-# LINE 2730 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule296 #-}
{-# LINE 1617 "src-ag/ExecutionPlan2Clean.ag" #-}
rule296 = \ ((_childrenIchildTypes) :: Map Identifier Type) ((_lhsIntType) :: Type) ->
{-# LINE 1617 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton _LHS _lhsIntType `Map.union` _childrenIchildTypes
{-# LINE 2736 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule297 #-}
{-# LINE 1634 "src-ag/ExecutionPlan2Clean.ag" #-}
rule297 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) con_ ->
{-# LINE 1634 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.findWithDefault Map.empty con_ _lhsIlocalAttrTypes
{-# LINE 2742 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule298 #-}
rule298 = \ ((_visitsIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
_visitsIchildvisit
{-# INLINE rule299 #-}
rule299 = \ ((_rulesIerrors) :: Seq Error) ((_visitsIerrors) :: Seq Error) ->
_rulesIerrors Seq.>< _visitsIerrors
{-# INLINE rule300 #-}
rule300 = \ ((_visitsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->
_visitsIfromToStates
{-# INLINE rule301 #-}
rule301 = \ ((_visitsIt_visits) :: PP_Doc) ->
_visitsIt_visits
{-# INLINE rule302 #-}
rule302 = \ ((_visitsIvisitKinds) :: Map VisitIdentifier VisitKind) ->
_visitsIvisitKinds
{-# INLINE rule303 #-}
rule303 = \ ((_visitsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_visitsIvisitdefs
{-# INLINE rule304 #-}
rule304 = \ ((_visitsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->
_visitsIvisituses
{-# INLINE rule305 #-}
rule305 = \ ((_visitsIallvisits) :: [VisitStateState]) ->
_visitsIallvisits
{-# INLINE rule306 #-}
rule306 = \ _sem_prod ->
_sem_prod
{-# INLINE rule307 #-}
rule307 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule308 #-}
rule308 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule309 #-}
rule309 = \ _childTypes ->
_childTypes
{-# INLINE rule310 #-}
rule310 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->
_lhsIconstructorTypeMap
{-# INLINE rule311 #-}
rule311 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->
_lhsIdclModuleHeader
{-# INLINE rule312 #-}
rule312 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->
_lhsIiclModuleHeader
{-# INLINE rule313 #-}
rule313 = \ ((_lhsIimportBlocks) :: PP_Doc) ->
_lhsIimportBlocks
{-# INLINE rule314 #-}
rule314 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule315 #-}
rule315 = \ _lazyIntras ->
_lazyIntras
{-# INLINE rule316 #-}
rule316 = \ _localAttrTypes ->
_localAttrTypes
{-# INLINE rule317 #-}
rule317 = \ ((_lhsImainFile) :: String) ->
_lhsImainFile
{-# INLINE rule318 #-}
rule318 = \ ((_lhsImainName) :: String) ->
_lhsImainName
{-# INLINE rule319 #-}
rule319 = \ ((_lhsInt) :: NontermIdent) ->
_lhsInt
{-# INLINE rule320 #-}
rule320 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule321 #-}
rule321 = \ ((_lhsIsynmap) :: Attributes) ->
_lhsIsynmap
{-# INLINE rule322 #-}
rule322 = \ ((_lhsItextBlocks) :: PP_Doc) ->
_lhsItextBlocks
{-# INLINE rule323 #-}
rule323 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule324 #-}
rule324 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->
_lhsIconstructorTypeMap
{-# INLINE rule325 #-}
rule325 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->
_lhsIdclModuleHeader
{-# INLINE rule326 #-}
rule326 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->
_lhsIiclModuleHeader
{-# INLINE rule327 #-}
rule327 = \ ((_lhsIimportBlocks) :: PP_Doc) ->
_lhsIimportBlocks
{-# INLINE rule328 #-}
rule328 = \ ((_lhsImainFile) :: String) ->
_lhsImainFile
{-# INLINE rule329 #-}
rule329 = \ ((_lhsImainName) :: String) ->
_lhsImainName
{-# INLINE rule330 #-}
rule330 = \ ((_lhsInt) :: NontermIdent) ->
_lhsInt
{-# INLINE rule331 #-}
rule331 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule332 #-}
rule332 = \ ((_lhsItextBlocks) :: PP_Doc) ->
_lhsItextBlocks
{-# INLINE rule333 #-}
rule333 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule334 #-}
rule334 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule335 #-}
rule335 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule336 #-}
rule336 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule337 #-}
rule337 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule338 #-}
rule338 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
_lhsIallchildvisit
{-# INLINE rule339 #-}
rule339 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule340 #-}
rule340 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule341 #-}
rule341 = \ _childTypes ->
_childTypes
{-# INLINE rule342 #-}
rule342 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule343 #-}
rule343 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->
_lhsInextVisits
{-# INLINE rule344 #-}
rule344 = \ ((_lhsInt) :: NontermIdent) ->
_lhsInt
{-# INLINE rule345 #-}
rule345 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule346 #-}
rule346 = \ ((_lhsIparams) :: [Identifier]) ->
_lhsIparams
{-# INLINE rule347 #-}
rule347 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->
_lhsIprevVisits
{-# INLINE rule348 #-}
rule348 = \ ((_lhsIsynmap) :: Attributes) ->
_lhsIsynmap
data Inh_EProductions = Inh_EProductions { Inh_EProductions -> Map Int (Int, Int)
allFromToStates_Inh_EProductions :: (Map VisitIdentifier (Int,Int)), Inh_EProductions -> Map Identifier Attributes
allInhmap_Inh_EProductions :: (Map NontermIdent Attributes), Inh_EProductions -> Map Identifier Int
allInitStates_Inh_EProductions :: (Map NontermIdent Int), Inh_EProductions -> Map Identifier Attributes
allSynmap_Inh_EProductions :: (Map NontermIdent Attributes), Inh_EProductions -> Map Int VisitKind
allVisitKinds_Inh_EProductions :: (Map VisitIdentifier VisitKind), Inh_EProductions
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
allchildvisit_Inh_EProductions :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Inh_EProductions -> Set Int
allstates_Inh_EProductions :: (Set StateIdentifier), Inh_EProductions -> Map Int (Set Identifier)
avisitdefs_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)), Inh_EProductions -> Map Int (Set Identifier)
avisituses_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)), Inh_EProductions -> ClassContext
classCtxs_Inh_EProductions :: (ClassContext), Inh_EProductions -> Map Identifier ConstructorType
constructorTypeMap_Inh_EProductions :: (Map NontermIdent ConstructorType), :: (String -> String -> String -> Bool -> String), :: (String -> String -> String -> Bool -> String), Inh_EProductions -> PP_Doc
importBlocks_Inh_EProductions :: (PP_Doc), Inh_EProductions -> Attributes
inhmap_Inh_EProductions :: (Attributes), Inh_EProductions -> Int
initial_Inh_EProductions :: (StateIdentifier), Inh_EProductions -> Map Identifier Attributes
localAttrTypes_Inh_EProductions :: (Map ConstructorIdent (Map Identifier Type)), Inh_EProductions -> String
mainFile_Inh_EProductions :: (String), Inh_EProductions -> String
mainName_Inh_EProductions :: (String), Inh_EProductions -> Map Int StateCtx
nextVisits_Inh_EProductions :: (Map StateIdentifier StateCtx), Inh_EProductions -> Identifier
nt_Inh_EProductions :: (NontermIdent), Inh_EProductions -> Type
ntType_Inh_EProductions :: (Type), Inh_EProductions -> Options
options_Inh_EProductions :: (Options), Inh_EProductions -> [Identifier]
params_Inh_EProductions :: ([Identifier]), Inh_EProductions -> Map Int StateCtx
prevVisits_Inh_EProductions :: (Map StateIdentifier StateCtx), Inh_EProductions -> Bool
rename_Inh_EProductions :: (Bool), Inh_EProductions -> Attributes
synmap_Inh_EProductions :: (Attributes), Inh_EProductions -> PP_Doc
textBlocks_Inh_EProductions :: (PP_Doc) }
data Syn_EProductions = Syn_EProductions { Syn_EProductions -> [VisitStateState]
allvisits_Syn_EProductions :: ([VisitStateState]), Syn_EProductions
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
childvisit_Syn_EProductions :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Syn_EProductions -> Int
count_Syn_EProductions :: (Int), Syn_EProductions -> [PP_Doc]
datatype_Syn_EProductions :: ([PP_Doc]), Syn_EProductions -> Seq Error
errors_Syn_EProductions :: (Seq Error), Syn_EProductions -> Map Int (Int, Int)
fromToStates_Syn_EProductions :: (Map VisitIdentifier (Int,Int)), Syn_EProductions -> IO ()
genProdIO_Syn_EProductions :: (IO ()), Syn_EProductions -> [PP_Doc]
imports_Syn_EProductions :: ([PP_Doc]), Syn_EProductions -> PP_Doc
recordtype_Syn_EProductions :: (PP_Doc), Syn_EProductions -> Seq PP_Doc
semFunBndDefs_Syn_EProductions :: (Seq PP_Doc), Syn_EProductions -> Seq PP_Doc
semFunBndTps_Syn_EProductions :: (Seq PP_Doc), Syn_EProductions -> PP_Doc
sem_nt_Syn_EProductions :: (PP_Doc), Syn_EProductions -> PP_Doc
sem_prod_Syn_EProductions :: (PP_Doc), Syn_EProductions -> PP_Doc
sem_prod_tys_Syn_EProductions :: (PP_Doc), Syn_EProductions -> PP_Doc
t_visits_Syn_EProductions :: (PP_Doc), Syn_EProductions -> Map Int VisitKind
visitKinds_Syn_EProductions :: (Map VisitIdentifier VisitKind), Syn_EProductions -> Map Int (Set Identifier)
visitdefs_Syn_EProductions :: (Map VisitIdentifier (Set Identifier)), Syn_EProductions -> Map Int (Set Identifier)
visituses_Syn_EProductions :: (Map VisitIdentifier (Set Identifier)) }
{-# INLINABLE wrap_EProductions #-}
wrap_EProductions :: T_EProductions -> Inh_EProductions -> (Syn_EProductions )
wrap_EProductions :: T_EProductions -> Inh_EProductions -> Syn_EProductions
wrap_EProductions (T_EProductions Identity T_EProductions_s17
act) (Inh_EProductions Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Set Int
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses ClassContext
_lhsIclassCtxs Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks) =
Identity Syn_EProductions -> Syn_EProductions
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_EProductions_s17
sem <- Identity T_EProductions_s17
act
let arg16 :: T_EProductions_vIn16
arg16 = Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Set Int
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> ClassContext
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> Attributes
-> Int
-> Map Identifier Attributes
-> String
-> String
-> Map Int StateCtx
-> Identifier
-> Type
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Bool
-> Attributes
-> PP_Doc
-> T_EProductions_vIn16
T_EProductions_vIn16 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Set Int
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses ClassContext
_lhsIclassCtxs Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks
(T_EProductions_vOut16 [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Int
_lhsOcount [PP_Doc]
_lhsOdatatype Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports PP_Doc
_lhsOrecordtype Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod PP_Doc
_lhsOsem_prod_tys PP_Doc
_lhsOt_visits Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses) <- T_EProductions_vOut16 -> Identity T_EProductions_vOut16
forall (m :: * -> *) a. Monad m => a -> m a
return (T_EProductions_s17 -> T_EProductions_v16
inv_EProductions_s17 T_EProductions_s17
sem T_EProductions_vIn16
arg16)
Syn_EProductions -> Identity Syn_EProductions
forall (m :: * -> *) a. Monad m => a -> m a
return ([VisitStateState]
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Int
-> [PP_Doc]
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> PP_Doc
-> Seq PP_Doc
-> Seq PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Syn_EProductions
Syn_EProductions [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Int
_lhsOcount [PP_Doc]
_lhsOdatatype Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports PP_Doc
_lhsOrecordtype Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod PP_Doc
_lhsOsem_prod_tys PP_Doc
_lhsOt_visits Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses)
)
{-# NOINLINE sem_EProductions #-}
sem_EProductions :: EProductions -> T_EProductions
sem_EProductions :: EProductions -> T_EProductions
sem_EProductions EProductions
list = (T_EProduction -> T_EProductions -> T_EProductions)
-> T_EProductions -> [T_EProduction] -> T_EProductions
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_EProduction -> T_EProductions -> T_EProductions
sem_EProductions_Cons T_EProductions
sem_EProductions_Nil ((EProduction -> T_EProduction) -> EProductions -> [T_EProduction]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map EProduction -> T_EProduction
sem_EProduction EProductions
list)
newtype T_EProductions = T_EProductions {
T_EProductions -> Identity T_EProductions_s17
attach_T_EProductions :: Identity (T_EProductions_s17 )
}
newtype T_EProductions_s17 = C_EProductions_s17 {
T_EProductions_s17 -> T_EProductions_v16
inv_EProductions_s17 :: (T_EProductions_v16 )
}
data T_EProductions_s18 = C_EProductions_s18
type T_EProductions_v16 = (T_EProductions_vIn16 ) -> (T_EProductions_vOut16 )
data T_EProductions_vIn16 = T_EProductions_vIn16 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Set StateIdentifier) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (ClassContext) (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (String -> String -> String -> Bool -> String) (PP_Doc) (Attributes) (StateIdentifier) (Map ConstructorIdent (Map Identifier Type)) (String) (String) (Map StateIdentifier StateCtx) (NontermIdent) (Type) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Bool) (Attributes) (PP_Doc)
data T_EProductions_vOut16 = T_EProductions_vOut16 ([VisitStateState]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Int) ([PP_Doc]) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))
{-# NOINLINE sem_EProductions_Cons #-}
sem_EProductions_Cons :: T_EProduction -> T_EProductions -> T_EProductions
sem_EProductions_Cons :: T_EProduction -> T_EProductions -> T_EProductions
sem_EProductions_Cons T_EProduction
arg_hd_ T_EProductions
arg_tl_ = Identity T_EProductions_s17 -> T_EProductions
T_EProductions (T_EProductions_s17 -> Identity T_EProductions_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_EProductions_s17
st17) where
{-# NOINLINE st17 #-}
st17 :: T_EProductions_s17
st17 = let
v16 :: T_EProductions_v16
v16 :: T_EProductions_v16
v16 = \ (T_EProductions_vIn16 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Set Int
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses ClassContext
_lhsIclassCtxs Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks) -> ( let
_hdX14 :: T_EProduction_s14
_hdX14 = Identity T_EProduction_s14 -> T_EProduction_s14
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_EProduction -> Identity T_EProduction_s14
attach_T_EProduction (T_EProduction
arg_hd_))
_tlX17 :: T_EProductions_s17
_tlX17 = Identity T_EProductions_s17 -> T_EProductions_s17
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_EProductions -> Identity T_EProductions_s17
attach_T_EProductions (T_EProductions
arg_tl_))
(T_EProduction_vOut13 [VisitStateState]
_hdIallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit Int
_hdIcount PP_Doc
_hdIdatatype Seq Error
_hdIerrors Map Int (Int, Int)
_hdIfromToStates IO ()
_hdIgenProdIO [PP_Doc]
_hdIimports PP_Doc
_hdIrecordtype Seq PP_Doc
_hdIsemFunBndDefs Seq PP_Doc
_hdIsemFunBndTps PP_Doc
_hdIsem_nt PP_Doc
_hdIsem_prod PP_Doc
_hdIsem_prod_tys PP_Doc
_hdIt_visits Map Int VisitKind
_hdIvisitKinds Map Int (Set Identifier)
_hdIvisitdefs Map Int (Set Identifier)
_hdIvisituses) = T_EProduction_s14 -> T_EProduction_v13
inv_EProduction_s14 T_EProduction_s14
_hdX14 (Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Set Int
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> ClassContext
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> Attributes
-> Int
-> Map Identifier Attributes
-> String
-> String
-> Map Int StateCtx
-> Identifier
-> Type
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Bool
-> Attributes
-> PP_Doc
-> T_EProduction_vIn13
T_EProduction_vIn13 Map Int (Int, Int)
_hdOallFromToStates Map Identifier Attributes
_hdOallInhmap Map Identifier Int
_hdOallInitStates Map Identifier Attributes
_hdOallSynmap Map Int VisitKind
_hdOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdOallchildvisit Set Int
_hdOallstates Map Int (Set Identifier)
_hdOavisitdefs Map Int (Set Identifier)
_hdOavisituses ClassContext
_hdOclassCtxs Map Identifier ConstructorType
_hdOconstructorTypeMap String -> String -> String -> Bool -> String
_hdOdclModuleHeader String -> String -> String -> Bool -> String
_hdOiclModuleHeader PP_Doc
_hdOimportBlocks Attributes
_hdOinhmap Int
_hdOinitial Map Identifier Attributes
_hdOlocalAttrTypes String
_hdOmainFile String
_hdOmainName Map Int StateCtx
_hdOnextVisits Identifier
_hdOnt Type
_hdOntType Options
_hdOoptions [Identifier]
_hdOparams Map Int StateCtx
_hdOprevVisits Bool
_hdOrename Attributes
_hdOsynmap PP_Doc
_hdOtextBlocks)
(T_EProductions_vOut16 [VisitStateState]
_tlIallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit Int
_tlIcount [PP_Doc]
_tlIdatatype Seq Error
_tlIerrors Map Int (Int, Int)
_tlIfromToStates IO ()
_tlIgenProdIO [PP_Doc]
_tlIimports PP_Doc
_tlIrecordtype Seq PP_Doc
_tlIsemFunBndDefs Seq PP_Doc
_tlIsemFunBndTps PP_Doc
_tlIsem_nt PP_Doc
_tlIsem_prod PP_Doc
_tlIsem_prod_tys PP_Doc
_tlIt_visits Map Int VisitKind
_tlIvisitKinds Map Int (Set Identifier)
_tlIvisitdefs Map Int (Set Identifier)
_tlIvisituses) = T_EProductions_s17 -> T_EProductions_v16
inv_EProductions_s17 T_EProductions_s17
_tlX17 (Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Set Int
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> ClassContext
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> Attributes
-> Int
-> Map Identifier Attributes
-> String
-> String
-> Map Int StateCtx
-> Identifier
-> Type
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Bool
-> Attributes
-> PP_Doc
-> T_EProductions_vIn16
T_EProductions_vIn16 Map Int (Int, Int)
_tlOallFromToStates Map Identifier Attributes
_tlOallInhmap Map Identifier Int
_tlOallInitStates Map Identifier Attributes
_tlOallSynmap Map Int VisitKind
_tlOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlOallchildvisit Set Int
_tlOallstates Map Int (Set Identifier)
_tlOavisitdefs Map Int (Set Identifier)
_tlOavisituses ClassContext
_tlOclassCtxs Map Identifier ConstructorType
_tlOconstructorTypeMap String -> String -> String -> Bool -> String
_tlOdclModuleHeader String -> String -> String -> Bool -> String
_tlOiclModuleHeader PP_Doc
_tlOimportBlocks Attributes
_tlOinhmap Int
_tlOinitial Map Identifier Attributes
_tlOlocalAttrTypes String
_tlOmainFile String
_tlOmainName Map Int StateCtx
_tlOnextVisits Identifier
_tlOnt Type
_tlOntType Options
_tlOoptions [Identifier]
_tlOparams Map Int StateCtx
_tlOprevVisits Bool
_tlOrename Attributes
_tlOsynmap PP_Doc
_tlOtextBlocks)
_lhsOrecordtype :: PP_Doc
_lhsOrecordtype :: PP_Doc
_lhsOrecordtype = PP_Doc -> PP_Doc
rule349 PP_Doc
_hdIrecordtype
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits = [VisitStateState] -> [VisitStateState]
rule350 [VisitStateState]
_hdIallvisits
_lhsOt_visits :: PP_Doc
_lhsOt_visits :: PP_Doc
_lhsOt_visits = PP_Doc -> PP_Doc
rule351 PP_Doc
_hdIt_visits
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule352 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit
_lhsOcount :: Int
_lhsOcount :: Int
_lhsOcount = Int -> Int -> Int
rule353 Int
_hdIcount Int
_tlIcount
_lhsOdatatype :: [PP_Doc]
_lhsOdatatype :: [PP_Doc]
_lhsOdatatype = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule354 PP_Doc
_hdIdatatype [PP_Doc]
_tlIdatatype
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule355 Seq Error
_hdIerrors Seq Error
_tlIerrors
_lhsOfromToStates :: Map VisitIdentifier (Int,Int)
_lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = Map Int (Int, Int) -> Map Int (Int, Int) -> Map Int (Int, Int)
rule356 Map Int (Int, Int)
_hdIfromToStates Map Int (Int, Int)
_tlIfromToStates
_lhsOgenProdIO :: IO ()
_lhsOgenProdIO :: IO ()
_lhsOgenProdIO = IO () -> IO () -> IO ()
rule357 IO ()
_hdIgenProdIO IO ()
_tlIgenProdIO
_lhsOimports :: [PP_Doc]
_lhsOimports :: [PP_Doc]
_lhsOimports = [PP_Doc] -> [PP_Doc] -> [PP_Doc]
rule358 [PP_Doc]
_hdIimports [PP_Doc]
_tlIimports
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
rule359 Seq PP_Doc
_hdIsemFunBndDefs Seq PP_Doc
_tlIsemFunBndDefs
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps = Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
rule360 Seq PP_Doc
_hdIsemFunBndTps Seq PP_Doc
_tlIsemFunBndTps
_lhsOsem_nt :: PP_Doc
_lhsOsem_nt :: PP_Doc
_lhsOsem_nt = PP_Doc -> PP_Doc -> PP_Doc
rule361 PP_Doc
_hdIsem_nt PP_Doc
_tlIsem_nt
_lhsOsem_prod :: PP_Doc
_lhsOsem_prod :: PP_Doc
_lhsOsem_prod = PP_Doc -> PP_Doc -> PP_Doc
rule362 PP_Doc
_hdIsem_prod PP_Doc
_tlIsem_prod
_lhsOsem_prod_tys :: PP_Doc
_lhsOsem_prod_tys :: PP_Doc
_lhsOsem_prod_tys = PP_Doc -> PP_Doc -> PP_Doc
rule363 PP_Doc
_hdIsem_prod_tys PP_Doc
_tlIsem_prod_tys
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
rule364 Map Int VisitKind
_hdIvisitKinds Map Int VisitKind
_tlIvisitKinds
_lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
_lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule365 Map Int (Set Identifier)
_hdIvisitdefs Map Int (Set Identifier)
_tlIvisitdefs
_lhsOvisituses :: Map VisitIdentifier (Set Identifier)
_lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule366 Map Int (Set Identifier)
_hdIvisituses Map Int (Set Identifier)
_tlIvisituses
_hdOallFromToStates :: Map Int (Int, Int)
_hdOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule367 Map Int (Int, Int)
_lhsIallFromToStates
_hdOallInhmap :: Map Identifier Attributes
_hdOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule368 Map Identifier Attributes
_lhsIallInhmap
_hdOallInitStates :: Map Identifier Int
_hdOallInitStates = Map Identifier Int -> Map Identifier Int
rule369 Map Identifier Int
_lhsIallInitStates
_hdOallSynmap :: Map Identifier Attributes
_hdOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule370 Map Identifier Attributes
_lhsIallSynmap
_hdOallVisitKinds :: Map Int VisitKind
_hdOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule371 Map Int VisitKind
_lhsIallVisitKinds
_hdOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule372 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
_hdOallstates :: Set Int
_hdOallstates = Set Int -> Set Int
rule373 Set Int
_lhsIallstates
_hdOavisitdefs :: Map Int (Set Identifier)
_hdOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule374 Map Int (Set Identifier)
_lhsIavisitdefs
_hdOavisituses :: Map Int (Set Identifier)
_hdOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule375 Map Int (Set Identifier)
_lhsIavisituses
_hdOclassCtxs :: ClassContext
_hdOclassCtxs = ClassContext -> ClassContext
rule376 ClassContext
_lhsIclassCtxs
_hdOconstructorTypeMap :: Map Identifier ConstructorType
_hdOconstructorTypeMap = Map Identifier ConstructorType -> Map Identifier ConstructorType
rule377 Map Identifier ConstructorType
_lhsIconstructorTypeMap
_hdOdclModuleHeader :: String -> String -> String -> Bool -> String
_hdOdclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule378 String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
_hdOiclModuleHeader :: String -> String -> String -> Bool -> String
_hdOiclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule379 String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
_hdOimportBlocks :: PP_Doc
_hdOimportBlocks = PP_Doc -> PP_Doc
rule380 PP_Doc
_lhsIimportBlocks
_hdOinhmap :: Attributes
_hdOinhmap = Attributes -> Attributes
rule381 Attributes
_lhsIinhmap
_hdOinitial :: Int
_hdOinitial = Int -> Int
rule382 Int
_lhsIinitial
_hdOlocalAttrTypes :: Map Identifier Attributes
_hdOlocalAttrTypes = Map Identifier Attributes -> Map Identifier Attributes
rule383 Map Identifier Attributes
_lhsIlocalAttrTypes
_hdOmainFile :: String
_hdOmainFile = String -> String
rule384 String
_lhsImainFile
_hdOmainName :: String
_hdOmainName = String -> String
rule385 String
_lhsImainName
_hdOnextVisits :: Map Int StateCtx
_hdOnextVisits = Map Int StateCtx -> Map Int StateCtx
rule386 Map Int StateCtx
_lhsInextVisits
_hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule387 Identifier
_lhsInt
_hdOntType :: Type
_hdOntType = Type -> Type
rule388 Type
_lhsIntType
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule389 Options
_lhsIoptions
_hdOparams :: [Identifier]
_hdOparams = [Identifier] -> [Identifier]
rule390 [Identifier]
_lhsIparams
_hdOprevVisits :: Map Int StateCtx
_hdOprevVisits = Map Int StateCtx -> Map Int StateCtx
rule391 Map Int StateCtx
_lhsIprevVisits
_hdOrename :: Bool
_hdOrename = Bool -> Bool
rule392 Bool
_lhsIrename
_hdOsynmap :: Attributes
_hdOsynmap = Attributes -> Attributes
rule393 Attributes
_lhsIsynmap
_hdOtextBlocks :: PP_Doc
_hdOtextBlocks = PP_Doc -> PP_Doc
rule394 PP_Doc
_lhsItextBlocks
_tlOallFromToStates :: Map Int (Int, Int)
_tlOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule395 Map Int (Int, Int)
_lhsIallFromToStates
_tlOallInhmap :: Map Identifier Attributes
_tlOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule396 Map Identifier Attributes
_lhsIallInhmap
_tlOallInitStates :: Map Identifier Int
_tlOallInitStates = Map Identifier Int -> Map Identifier Int
rule397 Map Identifier Int
_lhsIallInitStates
_tlOallSynmap :: Map Identifier Attributes
_tlOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule398 Map Identifier Attributes
_lhsIallSynmap
_tlOallVisitKinds :: Map Int VisitKind
_tlOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule399 Map Int VisitKind
_lhsIallVisitKinds
_tlOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule400 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
_tlOallstates :: Set Int
_tlOallstates = Set Int -> Set Int
rule401 Set Int
_lhsIallstates
_tlOavisitdefs :: Map Int (Set Identifier)
_tlOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule402 Map Int (Set Identifier)
_lhsIavisitdefs
_tlOavisituses :: Map Int (Set Identifier)
_tlOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule403 Map Int (Set Identifier)
_lhsIavisituses
_tlOclassCtxs :: ClassContext
_tlOclassCtxs = ClassContext -> ClassContext
rule404 ClassContext
_lhsIclassCtxs
_tlOconstructorTypeMap :: Map Identifier ConstructorType
_tlOconstructorTypeMap = Map Identifier ConstructorType -> Map Identifier ConstructorType
rule405 Map Identifier ConstructorType
_lhsIconstructorTypeMap
_tlOdclModuleHeader :: String -> String -> String -> Bool -> String
_tlOdclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule406 String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
_tlOiclModuleHeader :: String -> String -> String -> Bool -> String
_tlOiclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule407 String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
_tlOimportBlocks :: PP_Doc
_tlOimportBlocks = PP_Doc -> PP_Doc
rule408 PP_Doc
_lhsIimportBlocks
_tlOinhmap :: Attributes
_tlOinhmap = Attributes -> Attributes
rule409 Attributes
_lhsIinhmap
_tlOinitial :: Int
_tlOinitial = Int -> Int
rule410 Int
_lhsIinitial
_tlOlocalAttrTypes :: Map Identifier Attributes
_tlOlocalAttrTypes = Map Identifier Attributes -> Map Identifier Attributes
rule411 Map Identifier Attributes
_lhsIlocalAttrTypes
_tlOmainFile :: String
_tlOmainFile = String -> String
rule412 String
_lhsImainFile
_tlOmainName :: String
_tlOmainName = String -> String
rule413 String
_lhsImainName
_tlOnextVisits :: Map Int StateCtx
_tlOnextVisits = Map Int StateCtx -> Map Int StateCtx
rule414 Map Int StateCtx
_lhsInextVisits
_tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule415 Identifier
_lhsInt
_tlOntType :: Type
_tlOntType = Type -> Type
rule416 Type
_lhsIntType
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule417 Options
_lhsIoptions
_tlOparams :: [Identifier]
_tlOparams = [Identifier] -> [Identifier]
rule418 [Identifier]
_lhsIparams
_tlOprevVisits :: Map Int StateCtx
_tlOprevVisits = Map Int StateCtx -> Map Int StateCtx
rule419 Map Int StateCtx
_lhsIprevVisits
_tlOrename :: Bool
_tlOrename = Bool -> Bool
rule420 Bool
_lhsIrename
_tlOsynmap :: Attributes
_tlOsynmap = Attributes -> Attributes
rule421 Attributes
_lhsIsynmap
_tlOtextBlocks :: PP_Doc
_tlOtextBlocks = PP_Doc -> PP_Doc
rule422 PP_Doc
_lhsItextBlocks
__result_ :: T_EProductions_vOut16
__result_ = [VisitStateState]
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Int
-> [PP_Doc]
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> PP_Doc
-> Seq PP_Doc
-> Seq PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_EProductions_vOut16
T_EProductions_vOut16 [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Int
_lhsOcount [PP_Doc]
_lhsOdatatype Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports PP_Doc
_lhsOrecordtype Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod PP_Doc
_lhsOsem_prod_tys PP_Doc
_lhsOt_visits Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
in T_EProductions_vOut16
__result_ )
in T_EProductions_v16 -> T_EProductions_s17
C_EProductions_s17 T_EProductions_v16
v16
{-# INLINE rule349 #-}
{-# LINE 224 "src-ag/ExecutionPlan2Clean.ag" #-}
rule349 = \ ((_hdIrecordtype) :: PP_Doc) ->
{-# LINE 224 "src-ag/ExecutionPlan2Clean.ag" #-}
_hdIrecordtype
{-# LINE 3038 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule350 #-}
{-# LINE 385 "src-ag/ExecutionPlan2Clean.ag" #-}
rule350 = \ ((_hdIallvisits) :: [VisitStateState]) ->
{-# LINE 385 "src-ag/ExecutionPlan2Clean.ag" #-}
_hdIallvisits
{-# LINE 3044 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule351 #-}
{-# LINE 450 "src-ag/ExecutionPlan2Clean.ag" #-}
rule351 = \ ((_hdIt_visits) :: PP_Doc) ->
{-# LINE 450 "src-ag/ExecutionPlan2Clean.ag" #-}
_hdIt_visits
{-# LINE 3050 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule352 #-}
rule352 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
_hdIchildvisit `Map.union` _tlIchildvisit
{-# INLINE rule353 #-}
rule353 = \ ((_hdIcount) :: Int) ((_tlIcount) :: Int) ->
_hdIcount + _tlIcount
{-# INLINE rule354 #-}
rule354 = \ ((_hdIdatatype) :: PP_Doc) ((_tlIdatatype) :: [PP_Doc]) ->
_hdIdatatype : _tlIdatatype
{-# INLINE rule355 #-}
rule355 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->
_hdIerrors Seq.>< _tlIerrors
{-# INLINE rule356 #-}
rule356 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->
_hdIfromToStates `mappend` _tlIfromToStates
{-# INLINE rule357 #-}
rule357 = \ ((_hdIgenProdIO) :: IO ()) ((_tlIgenProdIO) :: IO ()) ->
_hdIgenProdIO >> _tlIgenProdIO
{-# INLINE rule358 #-}
rule358 = \ ((_hdIimports) :: [PP_Doc]) ((_tlIimports) :: [PP_Doc]) ->
_hdIimports ++ _tlIimports
{-# INLINE rule359 #-}
rule359 = \ ((_hdIsemFunBndDefs) :: Seq PP_Doc) ((_tlIsemFunBndDefs) :: Seq PP_Doc) ->
_hdIsemFunBndDefs Seq.>< _tlIsemFunBndDefs
{-# INLINE rule360 #-}
rule360 = \ ((_hdIsemFunBndTps) :: Seq PP_Doc) ((_tlIsemFunBndTps) :: Seq PP_Doc) ->
_hdIsemFunBndTps Seq.>< _tlIsemFunBndTps
{-# INLINE rule361 #-}
rule361 = \ ((_hdIsem_nt) :: PP_Doc) ((_tlIsem_nt) :: PP_Doc) ->
_hdIsem_nt >-< _tlIsem_nt
{-# INLINE rule362 #-}
rule362 = \ ((_hdIsem_prod) :: PP_Doc) ((_tlIsem_prod) :: PP_Doc) ->
_hdIsem_prod >-< _tlIsem_prod
{-# INLINE rule363 #-}
rule363 = \ ((_hdIsem_prod_tys) :: PP_Doc) ((_tlIsem_prod_tys) :: PP_Doc) ->
_hdIsem_prod_tys >-< _tlIsem_prod_tys
{-# INLINE rule364 #-}
rule364 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->
_hdIvisitKinds `mappend` _tlIvisitKinds
{-# INLINE rule365 #-}
rule365 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_hdIvisitdefs `uwSetUnion` _tlIvisitdefs
{-# INLINE rule366 #-}
rule366 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->
_hdIvisituses `uwSetUnion` _tlIvisituses
{-# INLINE rule367 #-}
rule367 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule368 #-}
rule368 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule369 #-}
rule369 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule370 #-}
rule370 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule371 #-}
rule371 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule372 #-}
rule372 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
_lhsIallchildvisit
{-# INLINE rule373 #-}
rule373 = \ ((_lhsIallstates) :: Set StateIdentifier) ->
_lhsIallstates
{-# INLINE rule374 #-}
rule374 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule375 #-}
rule375 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule376 #-}
rule376 = \ ((_lhsIclassCtxs) :: ClassContext) ->
_lhsIclassCtxs
{-# INLINE rule377 #-}
rule377 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->
_lhsIconstructorTypeMap
{-# INLINE rule378 #-}
rule378 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->
_lhsIdclModuleHeader
{-# INLINE rule379 #-}
rule379 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->
_lhsIiclModuleHeader
{-# INLINE rule380 #-}
rule380 = \ ((_lhsIimportBlocks) :: PP_Doc) ->
_lhsIimportBlocks
{-# INLINE rule381 #-}
rule381 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule382 #-}
rule382 = \ ((_lhsIinitial) :: StateIdentifier) ->
_lhsIinitial
{-# INLINE rule383 #-}
rule383 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) ->
_lhsIlocalAttrTypes
{-# INLINE rule384 #-}
rule384 = \ ((_lhsImainFile) :: String) ->
_lhsImainFile
{-# INLINE rule385 #-}
rule385 = \ ((_lhsImainName) :: String) ->
_lhsImainName
{-# INLINE rule386 #-}
rule386 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->
_lhsInextVisits
{-# INLINE rule387 #-}
rule387 = \ ((_lhsInt) :: NontermIdent) ->
_lhsInt
{-# INLINE rule388 #-}
rule388 = \ ((_lhsIntType) :: Type) ->
_lhsIntType
{-# INLINE rule389 #-}
rule389 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule390 #-}
rule390 = \ ((_lhsIparams) :: [Identifier]) ->
_lhsIparams
{-# INLINE rule391 #-}
rule391 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->
_lhsIprevVisits
{-# INLINE rule392 #-}
rule392 = \ ((_lhsIrename) :: Bool) ->
_lhsIrename
{-# INLINE rule393 #-}
rule393 = \ ((_lhsIsynmap) :: Attributes) ->
_lhsIsynmap
{-# INLINE rule394 #-}
rule394 = \ ((_lhsItextBlocks) :: PP_Doc) ->
_lhsItextBlocks
{-# INLINE rule395 #-}
rule395 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule396 #-}
rule396 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule397 #-}
rule397 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule398 #-}
rule398 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule399 #-}
rule399 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule400 #-}
rule400 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
_lhsIallchildvisit
{-# INLINE rule401 #-}
rule401 = \ ((_lhsIallstates) :: Set StateIdentifier) ->
_lhsIallstates
{-# INLINE rule402 #-}
rule402 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule403 #-}
rule403 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule404 #-}
rule404 = \ ((_lhsIclassCtxs) :: ClassContext) ->
_lhsIclassCtxs
{-# INLINE rule405 #-}
rule405 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->
_lhsIconstructorTypeMap
{-# INLINE rule406 #-}
rule406 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->
_lhsIdclModuleHeader
{-# INLINE rule407 #-}
rule407 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->
_lhsIiclModuleHeader
{-# INLINE rule408 #-}
rule408 = \ ((_lhsIimportBlocks) :: PP_Doc) ->
_lhsIimportBlocks
{-# INLINE rule409 #-}
rule409 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule410 #-}
rule410 = \ ((_lhsIinitial) :: StateIdentifier) ->
_lhsIinitial
{-# INLINE rule411 #-}
rule411 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) ->
_lhsIlocalAttrTypes
{-# INLINE rule412 #-}
rule412 = \ ((_lhsImainFile) :: String) ->
_lhsImainFile
{-# INLINE rule413 #-}
rule413 = \ ((_lhsImainName) :: String) ->
_lhsImainName
{-# INLINE rule414 #-}
rule414 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->
_lhsInextVisits
{-# INLINE rule415 #-}
rule415 = \ ((_lhsInt) :: NontermIdent) ->
_lhsInt
{-# INLINE rule416 #-}
rule416 = \ ((_lhsIntType) :: Type) ->
_lhsIntType
{-# INLINE rule417 #-}
rule417 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule418 #-}
rule418 = \ ((_lhsIparams) :: [Identifier]) ->
_lhsIparams
{-# INLINE rule419 #-}
rule419 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->
_lhsIprevVisits
{-# INLINE rule420 #-}
rule420 = \ ((_lhsIrename) :: Bool) ->
_lhsIrename
{-# INLINE rule421 #-}
rule421 = \ ((_lhsIsynmap) :: Attributes) ->
_lhsIsynmap
{-# INLINE rule422 #-}
rule422 = \ ((_lhsItextBlocks) :: PP_Doc) ->
_lhsItextBlocks
{-# NOINLINE sem_EProductions_Nil #-}
sem_EProductions_Nil :: T_EProductions
sem_EProductions_Nil :: T_EProductions
sem_EProductions_Nil = Identity T_EProductions_s17 -> T_EProductions
T_EProductions (T_EProductions_s17 -> Identity T_EProductions_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_EProductions_s17
st17) where
{-# NOINLINE st17 #-}
st17 :: T_EProductions_s17
st17 = let
v16 :: T_EProductions_v16
v16 :: T_EProductions_v16
v16 = \ (T_EProductions_vIn16 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Set Int
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses ClassContext
_lhsIclassCtxs Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks) -> ( let
_lhsOrecordtype :: PP_Doc
_lhsOrecordtype :: PP_Doc
_lhsOrecordtype = () -> PP_Doc
rule423 ()
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits = () -> [VisitStateState]
forall a. () -> a
rule424 ()
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = ()
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
forall k a. () -> Map k a
rule425 ()
_lhsOcount :: Int
_lhsOcount :: Int
_lhsOcount = () -> Int
rule426 ()
_lhsOdatatype :: [PP_Doc]
_lhsOdatatype :: [PP_Doc]
_lhsOdatatype = () -> [PP_Doc]
forall a. () -> [a]
rule427 ()
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule428 ()
_lhsOfromToStates :: Map VisitIdentifier (Int,Int)
_lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = () -> Map Int (Int, Int)
rule429 ()
_lhsOgenProdIO :: IO ()
_lhsOgenProdIO :: IO ()
_lhsOgenProdIO = () -> IO ()
rule430 ()
_lhsOimports :: [PP_Doc]
_lhsOimports :: [PP_Doc]
_lhsOimports = () -> [PP_Doc]
forall a. () -> [a]
rule431 ()
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = () -> Seq PP_Doc
forall a. () -> Seq a
rule432 ()
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps = () -> Seq PP_Doc
forall a. () -> Seq a
rule433 ()
_lhsOsem_nt :: PP_Doc
_lhsOsem_nt :: PP_Doc
_lhsOsem_nt = () -> PP_Doc
rule434 ()
_lhsOsem_prod :: PP_Doc
_lhsOsem_prod :: PP_Doc
_lhsOsem_prod = () -> PP_Doc
rule435 ()
_lhsOsem_prod_tys :: PP_Doc
_lhsOsem_prod_tys :: PP_Doc
_lhsOsem_prod_tys = () -> PP_Doc
rule436 ()
_lhsOt_visits :: PP_Doc
_lhsOt_visits :: PP_Doc
_lhsOt_visits = () -> PP_Doc
rule437 ()
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule438 ()
_lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
_lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule439 ()
_lhsOvisituses :: Map VisitIdentifier (Set Identifier)
_lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule440 ()
__result_ :: T_EProductions_vOut16
__result_ = [VisitStateState]
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Int
-> [PP_Doc]
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> PP_Doc
-> Seq PP_Doc
-> Seq PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_EProductions_vOut16
T_EProductions_vOut16 [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Int
_lhsOcount [PP_Doc]
_lhsOdatatype Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports PP_Doc
_lhsOrecordtype Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod PP_Doc
_lhsOsem_prod_tys PP_Doc
_lhsOt_visits Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
in T_EProductions_vOut16
__result_ )
in T_EProductions_v16 -> T_EProductions_s17
C_EProductions_s17 T_EProductions_v16
v16
{-# INLINE rule423 #-}
{-# LINE 225 "src-ag/ExecutionPlan2Clean.ag" #-}
rule423 = \ (_ :: ()) ->
{-# LINE 225 "src-ag/ExecutionPlan2Clean.ag" #-}
empty
{-# LINE 3315 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule424 #-}
{-# LINE 386 "src-ag/ExecutionPlan2Clean.ag" #-}
rule424 = \ (_ :: ()) ->
{-# LINE 386 "src-ag/ExecutionPlan2Clean.ag" #-}
error "Every nonterminal should have at least 1 production"
{-# LINE 3321 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule425 #-}
rule425 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule426 #-}
rule426 = \ (_ :: ()) ->
0
{-# INLINE rule427 #-}
rule427 = \ (_ :: ()) ->
[]
{-# INLINE rule428 #-}
rule428 = \ (_ :: ()) ->
Seq.empty
{-# INLINE rule429 #-}
rule429 = \ (_ :: ()) ->
mempty
{-# INLINE rule430 #-}
rule430 = \ (_ :: ()) ->
return ()
{-# INLINE rule431 #-}
rule431 = \ (_ :: ()) ->
[]
{-# INLINE rule432 #-}
rule432 = \ (_ :: ()) ->
Seq.empty
{-# INLINE rule433 #-}
rule433 = \ (_ :: ()) ->
Seq.empty
{-# INLINE rule434 #-}
rule434 = \ (_ :: ()) ->
empty
{-# INLINE rule435 #-}
rule435 = \ (_ :: ()) ->
empty
{-# INLINE rule436 #-}
rule436 = \ (_ :: ()) ->
empty
{-# INLINE rule437 #-}
rule437 = \ (_ :: ()) ->
empty
{-# INLINE rule438 #-}
rule438 = \ (_ :: ()) ->
mempty
{-# INLINE rule439 #-}
rule439 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule440 #-}
rule440 = \ (_ :: ()) ->
Map.empty
data Inh_ERule = Inh_ERule { Inh_ERule -> Map Identifier Attributes
allInhmap_Inh_ERule :: (Map NontermIdent Attributes), Inh_ERule -> Map Identifier Attributes
allSynmap_Inh_ERule :: (Map NontermIdent Attributes), Inh_ERule -> Attributes
childTypes_Inh_ERule :: (Map Identifier Type), Inh_ERule -> Identifier
con_Inh_ERule :: (ConstructorIdent), Inh_ERule -> Map Identifier ConstructorType
constructorTypeMap_Inh_ERule :: (Map NontermIdent ConstructorType), :: (String -> String -> String -> Bool -> String), :: (String -> String -> String -> Bool -> String), Inh_ERule -> PP_Doc
importBlocks_Inh_ERule :: (PP_Doc), Inh_ERule -> Attributes
inhmap_Inh_ERule :: (Attributes), Inh_ERule -> Set String
lazyIntras_Inh_ERule :: (Set String), Inh_ERule -> Attributes
localAttrTypes_Inh_ERule :: (Map Identifier Type), Inh_ERule -> String
mainFile_Inh_ERule :: (String), Inh_ERule -> String
mainName_Inh_ERule :: (String), Inh_ERule -> Identifier
nt_Inh_ERule :: (NontermIdent), Inh_ERule -> Options
options_Inh_ERule :: (Options), Inh_ERule -> Map Identifier (Set VisitKind)
ruleKinds_Inh_ERule :: (Map Identifier (Set VisitKind)), Inh_ERule -> Attributes
synmap_Inh_ERule :: (Attributes), Inh_ERule -> PP_Doc
textBlocks_Inh_ERule :: (PP_Doc), Inh_ERule -> Map Identifier Int
usageInfo_Inh_ERule :: (Map Identifier Int) }
data Syn_ERule = Syn_ERule { Syn_ERule -> Seq Error
errors_Syn_ERule :: (Seq Error), Syn_ERule
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
mrules_Syn_ERule :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), Syn_ERule -> Map Identifier (Set String)
ruledefs_Syn_ERule :: (Map Identifier (Set String)), Syn_ERule -> Map Identifier (Map String (Maybe NonLocalAttr))
ruleuses_Syn_ERule :: (Map Identifier (Map String (Maybe NonLocalAttr))), Syn_ERule -> PP_Doc
sem_rules_Syn_ERule :: (PP_Doc), Syn_ERule -> Set String
usedArgs_Syn_ERule :: (Set String) }
{-# INLINABLE wrap_ERule #-}
wrap_ERule :: T_ERule -> Inh_ERule -> (Syn_ERule )
wrap_ERule :: T_ERule -> Inh_ERule -> Syn_ERule
wrap_ERule (T_ERule Identity T_ERule_s20
act) (Inh_ERule Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Identifier
_lhsIcon Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Set String
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks Map Identifier Int
_lhsIusageInfo) =
Identity Syn_ERule -> Syn_ERule
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_ERule_s20
sem <- Identity T_ERule_s20
act
let arg19 :: T_ERule_vIn19
arg19 = Map Identifier Attributes
-> Map Identifier Attributes
-> Attributes
-> Identifier
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> Attributes
-> Set String
-> Attributes
-> String
-> String
-> Identifier
-> Options
-> Map Identifier (Set VisitKind)
-> Attributes
-> PP_Doc
-> Map Identifier Int
-> T_ERule_vIn19
T_ERule_vIn19 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Identifier
_lhsIcon Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Set String
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks Map Identifier Int
_lhsIusageInfo
(T_ERule_vOut19 Seq Error
_lhsOerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set String)
_lhsOruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules Set String
_lhsOusedArgs) <- T_ERule_vOut19 -> Identity T_ERule_vOut19
forall (m :: * -> *) a. Monad m => a -> m a
return (T_ERule_s20 -> T_ERule_v19
inv_ERule_s20 T_ERule_s20
sem T_ERule_vIn19
arg19)
Syn_ERule -> Identity Syn_ERule
forall (m :: * -> *) a. Monad m => a -> m a
return (Seq Error
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (Set String)
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> PP_Doc
-> Set String
-> Syn_ERule
Syn_ERule Seq Error
_lhsOerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set String)
_lhsOruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules Set String
_lhsOusedArgs)
)
{-# INLINE sem_ERule #-}
sem_ERule :: ERule -> T_ERule
sem_ERule :: ERule -> T_ERule
sem_ERule ( ERule Identifier
name_ Pattern
pattern_ Expression
rhs_ Bool
owrt_ String
origin_ Bool
explicit_ Bool
pure_ Maybe Error
mbError_ ) = Identifier
-> T_Pattern
-> T_Expression
-> Bool
-> String
-> Bool
-> Bool
-> Maybe Error
-> T_ERule
sem_ERule_ERule Identifier
name_ ( Pattern -> T_Pattern
sem_Pattern Pattern
pattern_ ) ( Expression -> T_Expression
sem_Expression Expression
rhs_ ) Bool
owrt_ String
origin_ Bool
explicit_ Bool
pure_ Maybe Error
mbError_
newtype T_ERule = T_ERule {
T_ERule -> Identity T_ERule_s20
attach_T_ERule :: Identity (T_ERule_s20 )
}
newtype T_ERule_s20 = C_ERule_s20 {
T_ERule_s20 -> T_ERule_v19
inv_ERule_s20 :: (T_ERule_v19 )
}
data T_ERule_s21 = C_ERule_s21
type T_ERule_v19 = (T_ERule_vIn19 ) -> (T_ERule_vOut19 )
data T_ERule_vIn19 = T_ERule_vIn19 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Map Identifier Type) (ConstructorIdent) (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (String -> String -> String -> Bool -> String) (PP_Doc) (Attributes) (Set String) (Map Identifier Type) (String) (String) (NontermIdent) (Options) (Map Identifier (Set VisitKind)) (Attributes) (PP_Doc) (Map Identifier Int)
data T_ERule_vOut19 = T_ERule_vOut19 (Seq Error) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (PP_Doc) (Set String)
{-# NOINLINE sem_ERule_ERule #-}
sem_ERule_ERule :: (Identifier) -> T_Pattern -> T_Expression -> (Bool) -> (String) -> (Bool) -> (Bool) -> (Maybe Error) -> T_ERule
sem_ERule_ERule :: Identifier
-> T_Pattern
-> T_Expression
-> Bool
-> String
-> Bool
-> Bool
-> Maybe Error
-> T_ERule
sem_ERule_ERule Identifier
arg_name_ T_Pattern
arg_pattern_ T_Expression
arg_rhs_ Bool
_ String
_ Bool
arg_explicit_ Bool
arg_pure_ Maybe Error
arg_mbError_ = Identity T_ERule_s20 -> T_ERule
T_ERule (T_ERule_s20 -> Identity T_ERule_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_ERule_s20
st20) where
{-# NOINLINE st20 #-}
st20 :: T_ERule_s20
st20 = let
v19 :: T_ERule_v19
v19 :: T_ERule_v19
v19 = \ (T_ERule_vIn19 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Identifier
_lhsIcon Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Set String
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks Map Identifier Int
_lhsIusageInfo) -> ( let
_patternX41 :: T_Pattern_s41
_patternX41 = Identity T_Pattern_s41 -> T_Pattern_s41
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s41
attach_T_Pattern (T_Pattern
arg_pattern_))
_rhsX29 :: T_Expression_s29
_rhsX29 = Identity T_Expression_s29 -> T_Expression_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expression -> Identity T_Expression_s29
attach_T_Expression (T_Expression
arg_rhs_))
(T_Pattern_vOut40 PP_Doc
_patternIattrTypes Set String
_patternIattrs Pattern
_patternIcopy Bool
_patternIisUnderscore PP_Doc
_patternIsem_lhs) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_patternX41 (Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Pattern_vIn40
T_Pattern_vIn40 Map Identifier Attributes
_patternOallInhmap Map Identifier Attributes
_patternOallSynmap Bool
_patternOanyLazyKind Attributes
_patternOinhmap Attributes
_patternOlocalAttrTypes Options
_patternOoptions Attributes
_patternOsynmap)
(T_Expression_vOut28 Map String (Maybe NonLocalAttr)
_rhsIattrs Pos
_rhsIpos PP_Doc
_rhsIsemfunc [HsToken]
_rhsItks) = T_Expression_s29 -> T_Expression_v28
inv_Expression_s29 T_Expression_s29
_rhsX29 (Options -> T_Expression_vIn28
T_Expression_vIn28 Options
_rhsOoptions)
_lhsOusedArgs :: Set String
_lhsOusedArgs :: Set String
_lhsOusedArgs = (Set String -> Set String) -> Set String -> Set String
forall a. (a -> a) -> a -> a
rule441 Set String -> Set String
_usedArgs_augmented_f1 Set String
forall a. Set a
_usedArgs_augmented_syn
_usedArgs_augmented_f1 :: Set String -> Set String
_usedArgs_augmented_f1 = Map String (Maybe NonLocalAttr) -> Set String -> Set String
rule442 Map String (Maybe NonLocalAttr)
_rhsIattrs
_lhsOsem_rules :: PP_Doc
_lhsOsem_rules :: PP_Doc
_lhsOsem_rules = PP_Doc -> Int -> PP_Doc
rule443 PP_Doc
_rulecode Int
_used
_rulecode :: PP_Doc
_rulecode = PP_Doc -> Bool -> PP_Doc -> PP_Doc -> Pos -> PP_Doc -> PP_Doc
rule444 PP_Doc
_endpragma Bool
_genpragma PP_Doc
_lambda PP_Doc
_pragma Pos
_rhsIpos PP_Doc
_rhsIsemfunc
_pragma :: PP_Doc
_pragma = Pos -> PP_Doc
rule445 Pos
_rhsIpos
_endpragma :: PP_Doc
_endpragma = String -> PP_Doc
rule446 String
_lhsImainFile
_genpragma :: Bool
_genpragma = Bool -> Options -> Bool -> Bool
rule447 Bool
_haspos Options
_lhsIoptions Bool
arg_explicit_
_haspos :: Bool
_haspos = Pos -> Bool
rule448 Pos
_rhsIpos
_lambda :: PP_Doc
_lambda = PP_Doc
-> Options
-> Map String (Maybe NonLocalAttr)
-> Identifier
-> PP_Doc
rule449 PP_Doc
_argPats Options
_lhsIoptions Map String (Maybe NonLocalAttr)
_rhsIattrs Identifier
arg_name_
_argPats :: PP_Doc
_argPats = (PP_Doc -> PP_Doc)
-> Map Identifier Attributes
-> Map Identifier Attributes
-> Attributes
-> Set String
-> Attributes
-> Options
-> Map String (Maybe NonLocalAttr)
-> PP_Doc
rule450 PP_Doc -> PP_Doc
_addbang1 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Set String
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Map String (Maybe NonLocalAttr)
_rhsIattrs
_argExprs :: PP_Doc
_argExprs = Map String (Maybe NonLocalAttr) -> PP_Doc
rule451 Map String (Maybe NonLocalAttr)
_rhsIattrs
_stepcode :: VisitKind -> FormatMode -> Either Error PP_Doc
_stepcode = PP_Doc
-> Options
-> PP_Doc
-> PP_Doc
-> Map String (Maybe NonLocalAttr)
-> Identifier
-> Bool
-> VisitKind
-> FormatMode
-> Either Error PP_Doc
rule452 PP_Doc
_argExprs Options
_lhsIoptions PP_Doc
_patternIattrTypes PP_Doc
_patternIsem_lhs Map String (Maybe NonLocalAttr)
_rhsIattrs Identifier
arg_name_ Bool
arg_pure_
_lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules = (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Identifier
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
forall a k. a -> k -> Map k a
rule453 VisitKind -> FormatMode -> Either Error PP_Doc
_stepcode Identifier
arg_name_
_used :: Int
_used = Map Identifier Int -> Identifier -> Int
rule454 Map Identifier Int
_lhsIusageInfo Identifier
arg_name_
_kinds :: Set VisitKind
_kinds = Map Identifier (Set VisitKind) -> Identifier -> Set VisitKind
rule455 Map Identifier (Set VisitKind)
_lhsIruleKinds Identifier
arg_name_
_anyLazyKind :: Bool
_anyLazyKind = Set VisitKind -> Bool
rule456 Set VisitKind
_kinds
_lhsOruledefs :: Map Identifier (Set String)
_lhsOruledefs :: Map Identifier (Set String)
_lhsOruledefs = Set String -> Identifier -> Map Identifier (Set String)
forall k. Set String -> k -> Map k (Set String)
rule457 Set String
_patternIattrs Identifier
arg_name_
_lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
_lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
_lhsOruleuses = Map String (Maybe NonLocalAttr)
-> Identifier -> Map Identifier (Map String (Maybe NonLocalAttr))
forall k.
Map String (Maybe NonLocalAttr)
-> k -> Map k (Map String (Maybe NonLocalAttr))
rule458 Map String (Maybe NonLocalAttr)
_rhsIattrs Identifier
arg_name_
_addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule459 Options
_lhsIoptions
_addbang1 :: PP_Doc -> PP_Doc
_addbang1 = (PP_Doc -> PP_Doc) -> Bool -> PP_Doc -> PP_Doc
forall a. (a -> a) -> Bool -> a -> a
rule460 PP_Doc -> PP_Doc
_addbang Bool
_anyLazyKind
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Int -> Maybe Error -> Seq Error
forall a. Int -> Maybe a -> Seq a
rule461 Int
_used Maybe Error
arg_mbError_
_usedArgs_augmented_syn :: Set a
_usedArgs_augmented_syn = () -> Set a
forall a. () -> Set a
rule462 ()
_patternOallInhmap :: Map Identifier Attributes
_patternOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule463 Map Identifier Attributes
_lhsIallInhmap
_patternOallSynmap :: Map Identifier Attributes
_patternOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule464 Map Identifier Attributes
_lhsIallSynmap
_patternOanyLazyKind :: Bool
_patternOanyLazyKind = Bool -> Bool
forall a. a -> a
rule465 Bool
_anyLazyKind
_patternOinhmap :: Attributes
_patternOinhmap = Attributes -> Attributes
rule466 Attributes
_lhsIinhmap
_patternOlocalAttrTypes :: Attributes
_patternOlocalAttrTypes = Attributes -> Attributes
rule467 Attributes
_lhsIlocalAttrTypes
_patternOoptions :: Options
_patternOoptions = Options -> Options
rule468 Options
_lhsIoptions
_patternOsynmap :: Attributes
_patternOsynmap = Attributes -> Attributes
rule469 Attributes
_lhsIsynmap
_rhsOoptions :: Options
_rhsOoptions = Options -> Options
rule470 Options
_lhsIoptions
__result_ :: T_ERule_vOut19
__result_ = Seq Error
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (Set String)
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> PP_Doc
-> Set String
-> T_ERule_vOut19
T_ERule_vOut19 Seq Error
_lhsOerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set String)
_lhsOruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules Set String
_lhsOusedArgs
in T_ERule_vOut19
__result_ )
in T_ERule_v19 -> T_ERule_s20
C_ERule_s20 T_ERule_v19
v19
{-# INLINE rule441 #-}
rule441 :: (a -> a) -> a -> a
rule441 = \ a -> a
_usedArgs_augmented_f1 a
_usedArgs_augmented_syn ->
((a -> a) -> a -> a) -> a -> [a -> a] -> a
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr (a -> a) -> a -> a
forall a b. (a -> b) -> a -> b
($) a
_usedArgs_augmented_syn [a -> a
_usedArgs_augmented_f1]
{-# INLINE rule442 #-}
rule442 :: Map String (Maybe NonLocalAttr) -> Set String -> Set String
rule442 = \ ((Map String (Maybe NonLocalAttr)
_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->
Set String -> Set String -> Set String
forall a. Ord a => Set a -> Set a -> Set a
Set.union (Set String -> Set String -> Set String)
-> Set String -> Set String -> Set String
forall a b. (a -> b) -> a -> b
$ Map String (Maybe NonLocalAttr) -> Set String
forall k a. Map k a -> Set k
Map.keysSet (Map String (Maybe NonLocalAttr) -> Set String)
-> Map String (Maybe NonLocalAttr) -> Set String
forall a b. (a -> b) -> a -> b
$ (String -> String)
-> Map String (Maybe NonLocalAttr)
-> Map String (Maybe NonLocalAttr)
forall k2 k1 a. Ord k2 => (k1 -> k2) -> Map k1 a -> Map k2 a
Map.mapKeys (\String
a -> String
"arg_" String -> String -> String
forall a. [a] -> [a] -> [a]
++ String
a) (Map String (Maybe NonLocalAttr)
-> Map String (Maybe NonLocalAttr))
-> Map String (Maybe NonLocalAttr)
-> Map String (Maybe NonLocalAttr)
forall a b. (a -> b) -> a -> b
$ (Maybe NonLocalAttr -> Bool)
-> Map String (Maybe NonLocalAttr)
-> Map String (Maybe NonLocalAttr)
forall a k. (a -> Bool) -> Map k a -> Map k a
Map.filter Maybe NonLocalAttr -> Bool
forall a. Maybe a -> Bool
isNothing Map String (Maybe NonLocalAttr)
_rhsIattrs
{-# INLINE rule443 #-}
{-# LINE 1011 "src-ag/ExecutionPlan2Clean.ag" #-}
rule443 = \ _rulecode _used ->
{-# LINE 1011 "src-ag/ExecutionPlan2Clean.ag" #-}
if _used == 0
then empty
else _rulecode
{-# LINE 3464 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule444 #-}
{-# LINE 1014 "src-ag/ExecutionPlan2Clean.ag" #-}
rule444 = \ _endpragma _genpragma _lambda _pragma ((_rhsIpos) :: Pos) ((_rhsIsemfunc) :: PP_Doc) ->
{-# LINE 1014 "src-ag/ExecutionPlan2Clean.ag" #-}
( if _genpragma
then _pragma
else empty
)
>-< _lambda
>-< indent ((column _rhsIpos - 2) `max` 2)
( if _genpragma
then _pragma >-< _rhsIsemfunc >-< _endpragma
else _rhsIsemfunc
)
{-# LINE 3479 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule445 #-}
{-# LINE 1026 "src-ag/ExecutionPlan2Clean.ag" #-}
rule445 = \ ((_rhsIpos) :: Pos) ->
{-# LINE 1026 "src-ag/ExecutionPlan2Clean.ag" #-}
"/*# LINE" >#< show (line _rhsIpos) >#< show (file _rhsIpos) >#< "#*/"
{-# LINE 3485 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule446 #-}
{-# LINE 1027 "src-ag/ExecutionPlan2Clean.ag" #-}
rule446 = \ ((_lhsImainFile) :: String) ->
{-# LINE 1027 "src-ag/ExecutionPlan2Clean.ag" #-}
ppWithLineNr (\ln -> "/*# LINE " ++ show (ln+1) ++ " " ++ show _lhsImainFile ++ "#*/")
{-# LINE 3491 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule447 #-}
{-# LINE 1028 "src-ag/ExecutionPlan2Clean.ag" #-}
rule447 = \ _haspos ((_lhsIoptions) :: Options) explicit_ ->
{-# LINE 1028 "src-ag/ExecutionPlan2Clean.ag" #-}
genLinePragmas _lhsIoptions && explicit_ && _haspos
{-# LINE 3497 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule448 #-}
{-# LINE 1029 "src-ag/ExecutionPlan2Clean.ag" #-}
rule448 = \ ((_rhsIpos) :: Pos) ->
{-# LINE 1029 "src-ag/ExecutionPlan2Clean.ag" #-}
line _rhsIpos > 0 && column _rhsIpos >= 0 && not (null (file _rhsIpos))
{-# LINE 3503 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule449 #-}
{-# LINE 1042 "src-ag/ExecutionPlan2Clean.ag" #-}
rule449 = \ _argPats ((_lhsIoptions) :: Options) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ ->
{-# LINE 1042 "src-ag/ExecutionPlan2Clean.ag" #-}
name_ >#< _argPats >#< dummyPat _lhsIoptions (Map.null _rhsIattrs) >#< "="
{-# LINE 3509 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule450 #-}
{-# LINE 1044 "src-ag/ExecutionPlan2Clean.ag" #-}
rule450 = \ _addbang1 ((_lhsIallInhmap) :: Map NontermIdent Attributes) ((_lhsIallSynmap) :: Map NontermIdent Attributes) ((_lhsIchildTypes) :: Map Identifier Type) ((_lhsIlazyIntras) :: Set String) ((_lhsIlocalAttrTypes) :: Map Identifier Type) ((_lhsIoptions) :: Options) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->
{-# LINE 1044 "src-ag/ExecutionPlan2Clean.ag" #-}
ppSpaced [ let match | str `Set.member` _lhsIlazyIntras = pp str
| otherwise = _addbang1 (pp str)
in case mbAttr of
Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->
case Map.lookup nm _lhsIlocalAttrTypes of
Just tp -> pp_parens (pp_parens match)
Nothing -> match
Just attr | not (noPerRuleTypeSigs _lhsIoptions) ->
case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes of
Just tpDoc -> pp_parens (pp_parens match)
Nothing -> match
_ -> match
| (str,mbAttr) <- Map.assocs _rhsIattrs
]
{-# LINE 3528 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule451 #-}
{-# LINE 1058 "src-ag/ExecutionPlan2Clean.ag" #-}
rule451 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->
{-# LINE 1058 "src-ag/ExecutionPlan2Clean.ag" #-}
ppSpaced [ case mbAttr of
Nothing -> "arg_" >|< str
_ -> text str
| (str,mbAttr) <- Map.assocs _rhsIattrs
]
{-# LINE 3538 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule452 #-}
{-# LINE 1063 "src-ag/ExecutionPlan2Clean.ag" #-}
rule452 = \ _argExprs ((_lhsIoptions) :: Options) ((_patternIattrTypes) :: PP_Doc) ((_patternIsem_lhs) :: PP_Doc ) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ pure_ ->
{-# LINE 1063 "src-ag/ExecutionPlan2Clean.ag" #-}
\kind fmtMode -> if kind `compatibleRule` pure_
then Right $ let oper | pure_ = "="
| otherwise = "<-"
decl = _patternIsem_lhs >#< oper >#< name_ >#< _argExprs >#< dummyArg _lhsIoptions (Map.null _rhsIattrs)
tp = if pure_ && not (noPerRuleTypeSigs _lhsIoptions)
then _patternIattrTypes
else empty
in fmtDecl pure_ fmtMode (tp >-< decl)
else Left $ IncompatibleRuleKind name_ kind
{-# LINE 3552 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule453 #-}
{-# LINE 1073 "src-ag/ExecutionPlan2Clean.ag" #-}
rule453 = \ _stepcode name_ ->
{-# LINE 1073 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton name_ _stepcode
{-# LINE 3558 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule454 #-}
{-# LINE 1279 "src-ag/ExecutionPlan2Clean.ag" #-}
rule454 = \ ((_lhsIusageInfo) :: Map Identifier Int) name_ ->
{-# LINE 1279 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.findWithDefault 0 name_ _lhsIusageInfo
{-# LINE 3564 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule455 #-}
{-# LINE 1295 "src-ag/ExecutionPlan2Clean.ag" #-}
rule455 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) name_ ->
{-# LINE 1295 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.findWithDefault Set.empty name_ _lhsIruleKinds
{-# LINE 3570 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule456 #-}
{-# LINE 1296 "src-ag/ExecutionPlan2Clean.ag" #-}
rule456 = \ _kinds ->
{-# LINE 1296 "src-ag/ExecutionPlan2Clean.ag" #-}
Set.fold (\k r -> isLazyKind k || r) False _kinds
{-# LINE 3576 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule457 #-}
{-# LINE 1342 "src-ag/ExecutionPlan2Clean.ag" #-}
rule457 = \ ((_patternIattrs) :: Set String) name_ ->
{-# LINE 1342 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton name_ _patternIattrs
{-# LINE 3582 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule458 #-}
{-# LINE 1343 "src-ag/ExecutionPlan2Clean.ag" #-}
rule458 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ ->
{-# LINE 1343 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton name_ _rhsIattrs
{-# LINE 3588 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule459 #-}
{-# LINE 1564 "src-ag/ExecutionPlan2Clean.ag" #-}
rule459 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 1564 "src-ag/ExecutionPlan2Clean.ag" #-}
\x -> if bangpats _lhsIoptions then "!" >|< x else x
{-# LINE 3594 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule460 #-}
{-# LINE 1575 "src-ag/ExecutionPlan2Clean.ag" #-}
rule460 = \ _addbang _anyLazyKind ->
{-# LINE 1575 "src-ag/ExecutionPlan2Clean.ag" #-}
if _anyLazyKind then id else _addbang
{-# LINE 3600 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule461 #-}
{-# LINE 1681 "src-ag/ExecutionPlan2Clean.ag" #-}
rule461 = \ _used mbError_ ->
{-# LINE 1681 "src-ag/ExecutionPlan2Clean.ag" #-}
case mbError_ of
Just e | _used > 0 -> Seq.singleton e
_ -> Seq.empty
{-# LINE 3608 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule462 #-}
rule462 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule463 #-}
rule463 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule464 #-}
rule464 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule465 #-}
rule465 = \ _anyLazyKind ->
_anyLazyKind
{-# INLINE rule466 #-}
rule466 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule467 #-}
rule467 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->
_lhsIlocalAttrTypes
{-# INLINE rule468 #-}
rule468 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule469 #-}
rule469 = \ ((_lhsIsynmap) :: Attributes) ->
_lhsIsynmap
{-# INLINE rule470 #-}
rule470 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
data Inh_ERules = Inh_ERules { Inh_ERules -> Map Identifier Attributes
allInhmap_Inh_ERules :: (Map NontermIdent Attributes), Inh_ERules -> Map Identifier Attributes
allSynmap_Inh_ERules :: (Map NontermIdent Attributes), Inh_ERules -> Attributes
childTypes_Inh_ERules :: (Map Identifier Type), Inh_ERules -> Identifier
con_Inh_ERules :: (ConstructorIdent), Inh_ERules -> Map Identifier ConstructorType
constructorTypeMap_Inh_ERules :: (Map NontermIdent ConstructorType), :: (String -> String -> String -> Bool -> String), :: (String -> String -> String -> Bool -> String), Inh_ERules -> PP_Doc
importBlocks_Inh_ERules :: (PP_Doc), Inh_ERules -> Attributes
inhmap_Inh_ERules :: (Attributes), Inh_ERules -> Set String
lazyIntras_Inh_ERules :: (Set String), Inh_ERules -> Attributes
localAttrTypes_Inh_ERules :: (Map Identifier Type), Inh_ERules -> String
mainFile_Inh_ERules :: (String), Inh_ERules -> String
mainName_Inh_ERules :: (String), Inh_ERules -> Identifier
nt_Inh_ERules :: (NontermIdent), Inh_ERules -> Options
options_Inh_ERules :: (Options), Inh_ERules -> Map Identifier (Set VisitKind)
ruleKinds_Inh_ERules :: (Map Identifier (Set VisitKind)), Inh_ERules -> Attributes
synmap_Inh_ERules :: (Attributes), Inh_ERules -> PP_Doc
textBlocks_Inh_ERules :: (PP_Doc), Inh_ERules -> Map Identifier Int
usageInfo_Inh_ERules :: (Map Identifier Int) }
data Syn_ERules = Syn_ERules { Syn_ERules -> Seq Error
errors_Syn_ERules :: (Seq Error), Syn_ERules
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
mrules_Syn_ERules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), Syn_ERules -> Map Identifier (Set String)
ruledefs_Syn_ERules :: (Map Identifier (Set String)), Syn_ERules -> Map Identifier (Map String (Maybe NonLocalAttr))
ruleuses_Syn_ERules :: (Map Identifier (Map String (Maybe NonLocalAttr))), Syn_ERules -> PP_Doc
sem_rules_Syn_ERules :: (PP_Doc), Syn_ERules -> Set String
usedArgs_Syn_ERules :: (Set String) }
{-# INLINABLE wrap_ERules #-}
wrap_ERules :: T_ERules -> Inh_ERules -> (Syn_ERules )
wrap_ERules :: T_ERules -> Inh_ERules -> Syn_ERules
wrap_ERules (T_ERules Identity T_ERules_s23
act) (Inh_ERules Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Identifier
_lhsIcon Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Set String
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks Map Identifier Int
_lhsIusageInfo) =
Identity Syn_ERules -> Syn_ERules
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_ERules_s23
sem <- Identity T_ERules_s23
act
let arg22 :: T_ERules_vIn22
arg22 = Map Identifier Attributes
-> Map Identifier Attributes
-> Attributes
-> Identifier
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> Attributes
-> Set String
-> Attributes
-> String
-> String
-> Identifier
-> Options
-> Map Identifier (Set VisitKind)
-> Attributes
-> PP_Doc
-> Map Identifier Int
-> T_ERules_vIn22
T_ERules_vIn22 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Identifier
_lhsIcon Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Set String
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks Map Identifier Int
_lhsIusageInfo
(T_ERules_vOut22 Seq Error
_lhsOerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set String)
_lhsOruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules Set String
_lhsOusedArgs) <- T_ERules_vOut22 -> Identity T_ERules_vOut22
forall (m :: * -> *) a. Monad m => a -> m a
return (T_ERules_s23 -> T_ERules_v22
inv_ERules_s23 T_ERules_s23
sem T_ERules_vIn22
arg22)
Syn_ERules -> Identity Syn_ERules
forall (m :: * -> *) a. Monad m => a -> m a
return (Seq Error
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (Set String)
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> PP_Doc
-> Set String
-> Syn_ERules
Syn_ERules Seq Error
_lhsOerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set String)
_lhsOruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules Set String
_lhsOusedArgs)
)
{-# NOINLINE sem_ERules #-}
sem_ERules :: ERules -> T_ERules
sem_ERules :: ERules -> T_ERules
sem_ERules ERules
list = (T_ERule -> T_ERules -> T_ERules)
-> T_ERules -> [T_ERule] -> T_ERules
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_ERule -> T_ERules -> T_ERules
sem_ERules_Cons T_ERules
sem_ERules_Nil ((ERule -> T_ERule) -> ERules -> [T_ERule]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map ERule -> T_ERule
sem_ERule ERules
list)
newtype T_ERules = T_ERules {
T_ERules -> Identity T_ERules_s23
attach_T_ERules :: Identity (T_ERules_s23 )
}
newtype T_ERules_s23 = C_ERules_s23 {
T_ERules_s23 -> T_ERules_v22
inv_ERules_s23 :: (T_ERules_v22 )
}
data T_ERules_s24 = C_ERules_s24
type T_ERules_v22 = (T_ERules_vIn22 ) -> (T_ERules_vOut22 )
data T_ERules_vIn22 = T_ERules_vIn22 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Map Identifier Type) (ConstructorIdent) (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (String -> String -> String -> Bool -> String) (PP_Doc) (Attributes) (Set String) (Map Identifier Type) (String) (String) (NontermIdent) (Options) (Map Identifier (Set VisitKind)) (Attributes) (PP_Doc) (Map Identifier Int)
data T_ERules_vOut22 = T_ERules_vOut22 (Seq Error) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (PP_Doc) (Set String)
{-# NOINLINE sem_ERules_Cons #-}
sem_ERules_Cons :: T_ERule -> T_ERules -> T_ERules
sem_ERules_Cons :: T_ERule -> T_ERules -> T_ERules
sem_ERules_Cons T_ERule
arg_hd_ T_ERules
arg_tl_ = Identity T_ERules_s23 -> T_ERules
T_ERules (T_ERules_s23 -> Identity T_ERules_s23
forall (m :: * -> *) a. Monad m => a -> m a
return T_ERules_s23
st23) where
{-# NOINLINE st23 #-}
st23 :: T_ERules_s23
st23 = let
v22 :: T_ERules_v22
v22 :: T_ERules_v22
v22 = \ (T_ERules_vIn22 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Identifier
_lhsIcon Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Set String
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks Map Identifier Int
_lhsIusageInfo) -> ( let
_hdX20 :: T_ERule_s20
_hdX20 = Identity T_ERule_s20 -> T_ERule_s20
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ERule -> Identity T_ERule_s20
attach_T_ERule (T_ERule
arg_hd_))
_tlX23 :: T_ERules_s23
_tlX23 = Identity T_ERules_s23 -> T_ERules_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ERules -> Identity T_ERules_s23
attach_T_ERules (T_ERules
arg_tl_))
(T_ERule_vOut19 Seq Error
_hdIerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_hdImrules Map Identifier (Set String)
_hdIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_hdIruleuses PP_Doc
_hdIsem_rules Set String
_hdIusedArgs) = T_ERule_s20 -> T_ERule_v19
inv_ERule_s20 T_ERule_s20
_hdX20 (Map Identifier Attributes
-> Map Identifier Attributes
-> Attributes
-> Identifier
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> Attributes
-> Set String
-> Attributes
-> String
-> String
-> Identifier
-> Options
-> Map Identifier (Set VisitKind)
-> Attributes
-> PP_Doc
-> Map Identifier Int
-> T_ERule_vIn19
T_ERule_vIn19 Map Identifier Attributes
_hdOallInhmap Map Identifier Attributes
_hdOallSynmap Attributes
_hdOchildTypes Identifier
_hdOcon Map Identifier ConstructorType
_hdOconstructorTypeMap String -> String -> String -> Bool -> String
_hdOdclModuleHeader String -> String -> String -> Bool -> String
_hdOiclModuleHeader PP_Doc
_hdOimportBlocks Attributes
_hdOinhmap Set String
_hdOlazyIntras Attributes
_hdOlocalAttrTypes String
_hdOmainFile String
_hdOmainName Identifier
_hdOnt Options
_hdOoptions Map Identifier (Set VisitKind)
_hdOruleKinds Attributes
_hdOsynmap PP_Doc
_hdOtextBlocks Map Identifier Int
_hdOusageInfo)
(T_ERules_vOut22 Seq Error
_tlIerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_tlImrules Map Identifier (Set String)
_tlIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_tlIruleuses PP_Doc
_tlIsem_rules Set String
_tlIusedArgs) = T_ERules_s23 -> T_ERules_v22
inv_ERules_s23 T_ERules_s23
_tlX23 (Map Identifier Attributes
-> Map Identifier Attributes
-> Attributes
-> Identifier
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> Attributes
-> Set String
-> Attributes
-> String
-> String
-> Identifier
-> Options
-> Map Identifier (Set VisitKind)
-> Attributes
-> PP_Doc
-> Map Identifier Int
-> T_ERules_vIn22
T_ERules_vIn22 Map Identifier Attributes
_tlOallInhmap Map Identifier Attributes
_tlOallSynmap Attributes
_tlOchildTypes Identifier
_tlOcon Map Identifier ConstructorType
_tlOconstructorTypeMap String -> String -> String -> Bool -> String
_tlOdclModuleHeader String -> String -> String -> Bool -> String
_tlOiclModuleHeader PP_Doc
_tlOimportBlocks Attributes
_tlOinhmap Set String
_tlOlazyIntras Attributes
_tlOlocalAttrTypes String
_tlOmainFile String
_tlOmainName Identifier
_tlOnt Options
_tlOoptions Map Identifier (Set VisitKind)
_tlOruleKinds Attributes
_tlOsynmap PP_Doc
_tlOtextBlocks Map Identifier Int
_tlOusageInfo)
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule471 Seq Error
_hdIerrors Seq Error
_tlIerrors
_lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule472 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_hdImrules Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_tlImrules
_lhsOruledefs :: Map Identifier (Set String)
_lhsOruledefs :: Map Identifier (Set String)
_lhsOruledefs = Map Identifier (Set String)
-> Map Identifier (Set String) -> Map Identifier (Set String)
rule473 Map Identifier (Set String)
_hdIruledefs Map Identifier (Set String)
_tlIruledefs
_lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
_lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
_lhsOruleuses = Map Identifier (Map String (Maybe NonLocalAttr))
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> Map Identifier (Map String (Maybe NonLocalAttr))
rule474 Map Identifier (Map String (Maybe NonLocalAttr))
_hdIruleuses Map Identifier (Map String (Maybe NonLocalAttr))
_tlIruleuses
_lhsOsem_rules :: PP_Doc
_lhsOsem_rules :: PP_Doc
_lhsOsem_rules = PP_Doc -> PP_Doc -> PP_Doc
rule475 PP_Doc
_hdIsem_rules PP_Doc
_tlIsem_rules
_lhsOusedArgs :: Set String
_lhsOusedArgs :: Set String
_lhsOusedArgs = Set String -> Set String -> Set String
rule476 Set String
_hdIusedArgs Set String
_tlIusedArgs
_hdOallInhmap :: Map Identifier Attributes
_hdOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule477 Map Identifier Attributes
_lhsIallInhmap
_hdOallSynmap :: Map Identifier Attributes
_hdOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule478 Map Identifier Attributes
_lhsIallSynmap
_hdOchildTypes :: Attributes
_hdOchildTypes = Attributes -> Attributes
rule479 Attributes
_lhsIchildTypes
_hdOcon :: Identifier
_hdOcon = Identifier -> Identifier
rule480 Identifier
_lhsIcon
_hdOconstructorTypeMap :: Map Identifier ConstructorType
_hdOconstructorTypeMap = Map Identifier ConstructorType -> Map Identifier ConstructorType
rule481 Map Identifier ConstructorType
_lhsIconstructorTypeMap
_hdOdclModuleHeader :: String -> String -> String -> Bool -> String
_hdOdclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule482 String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
_hdOiclModuleHeader :: String -> String -> String -> Bool -> String
_hdOiclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule483 String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
_hdOimportBlocks :: PP_Doc
_hdOimportBlocks = PP_Doc -> PP_Doc
rule484 PP_Doc
_lhsIimportBlocks
_hdOinhmap :: Attributes
_hdOinhmap = Attributes -> Attributes
rule485 Attributes
_lhsIinhmap
_hdOlazyIntras :: Set String
_hdOlazyIntras = Set String -> Set String
rule486 Set String
_lhsIlazyIntras
_hdOlocalAttrTypes :: Attributes
_hdOlocalAttrTypes = Attributes -> Attributes
rule487 Attributes
_lhsIlocalAttrTypes
_hdOmainFile :: String
_hdOmainFile = String -> String
rule488 String
_lhsImainFile
_hdOmainName :: String
_hdOmainName = String -> String
rule489 String
_lhsImainName
_hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule490 Identifier
_lhsInt
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule491 Options
_lhsIoptions
_hdOruleKinds :: Map Identifier (Set VisitKind)
_hdOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule492 Map Identifier (Set VisitKind)
_lhsIruleKinds
_hdOsynmap :: Attributes
_hdOsynmap = Attributes -> Attributes
rule493 Attributes
_lhsIsynmap
_hdOtextBlocks :: PP_Doc
_hdOtextBlocks = PP_Doc -> PP_Doc
rule494 PP_Doc
_lhsItextBlocks
_hdOusageInfo :: Map Identifier Int
_hdOusageInfo = Map Identifier Int -> Map Identifier Int
rule495 Map Identifier Int
_lhsIusageInfo
_tlOallInhmap :: Map Identifier Attributes
_tlOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule496 Map Identifier Attributes
_lhsIallInhmap
_tlOallSynmap :: Map Identifier Attributes
_tlOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule497 Map Identifier Attributes
_lhsIallSynmap
_tlOchildTypes :: Attributes
_tlOchildTypes = Attributes -> Attributes
rule498 Attributes
_lhsIchildTypes
_tlOcon :: Identifier
_tlOcon = Identifier -> Identifier
rule499 Identifier
_lhsIcon
_tlOconstructorTypeMap :: Map Identifier ConstructorType
_tlOconstructorTypeMap = Map Identifier ConstructorType -> Map Identifier ConstructorType
rule500 Map Identifier ConstructorType
_lhsIconstructorTypeMap
_tlOdclModuleHeader :: String -> String -> String -> Bool -> String
_tlOdclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule501 String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
_tlOiclModuleHeader :: String -> String -> String -> Bool -> String
_tlOiclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule502 String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
_tlOimportBlocks :: PP_Doc
_tlOimportBlocks = PP_Doc -> PP_Doc
rule503 PP_Doc
_lhsIimportBlocks
_tlOinhmap :: Attributes
_tlOinhmap = Attributes -> Attributes
rule504 Attributes
_lhsIinhmap
_tlOlazyIntras :: Set String
_tlOlazyIntras = Set String -> Set String
rule505 Set String
_lhsIlazyIntras
_tlOlocalAttrTypes :: Attributes
_tlOlocalAttrTypes = Attributes -> Attributes
rule506 Attributes
_lhsIlocalAttrTypes
_tlOmainFile :: String
_tlOmainFile = String -> String
rule507 String
_lhsImainFile
_tlOmainName :: String
_tlOmainName = String -> String
rule508 String
_lhsImainName
_tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule509 Identifier
_lhsInt
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule510 Options
_lhsIoptions
_tlOruleKinds :: Map Identifier (Set VisitKind)
_tlOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule511 Map Identifier (Set VisitKind)
_lhsIruleKinds
_tlOsynmap :: Attributes
_tlOsynmap = Attributes -> Attributes
rule512 Attributes
_lhsIsynmap
_tlOtextBlocks :: PP_Doc
_tlOtextBlocks = PP_Doc -> PP_Doc
rule513 PP_Doc
_lhsItextBlocks
_tlOusageInfo :: Map Identifier Int
_tlOusageInfo = Map Identifier Int -> Map Identifier Int
rule514 Map Identifier Int
_lhsIusageInfo
__result_ :: T_ERules_vOut22
__result_ = Seq Error
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (Set String)
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> PP_Doc
-> Set String
-> T_ERules_vOut22
T_ERules_vOut22 Seq Error
_lhsOerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set String)
_lhsOruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules Set String
_lhsOusedArgs
in T_ERules_vOut22
__result_ )
in T_ERules_v22 -> T_ERules_s23
C_ERules_s23 T_ERules_v22
v22
{-# INLINE rule471 #-}
rule471 :: Seq Error -> Seq Error -> Seq Error
rule471 = \ ((Seq Error
_hdIerrors) :: Seq Error) ((Seq Error
_tlIerrors) :: Seq Error) ->
Seq Error
_hdIerrors Seq Error -> Seq Error -> Seq Error
forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq Error
_tlIerrors
{-# INLINE rule472 #-}
rule472 :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule472 = \ ((Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_hdImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ((Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_tlImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_hdImrules Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_tlImrules
{-# INLINE rule473 #-}
rule473 :: Map Identifier (Set String)
-> Map Identifier (Set String) -> Map Identifier (Set String)
rule473 = \ ((Map Identifier (Set String)
_hdIruledefs) :: Map Identifier (Set String)) ((Map Identifier (Set String)
_tlIruledefs) :: Map Identifier (Set String)) ->
Map Identifier (Set String)
_hdIruledefs Map Identifier (Set String)
-> Map Identifier (Set String) -> Map Identifier (Set String)
forall a b.
(Ord a, Ord b) =>
Map a (Set b) -> Map a (Set b) -> Map a (Set b)
`uwSetUnion` Map Identifier (Set String)
_tlIruledefs
{-# INLINE rule474 #-}
rule474 :: Map Identifier (Map String (Maybe NonLocalAttr))
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> Map Identifier (Map String (Maybe NonLocalAttr))
rule474 = \ ((Map Identifier (Map String (Maybe NonLocalAttr))
_hdIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ((Map Identifier (Map String (Maybe NonLocalAttr))
_tlIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
Map Identifier (Map String (Maybe NonLocalAttr))
_hdIruleuses Map Identifier (Map String (Maybe NonLocalAttr))
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> Map Identifier (Map String (Maybe NonLocalAttr))
forall a b c.
(Ord a, Ord b) =>
Map a (Map b c) -> Map a (Map b c) -> Map a (Map b c)
`uwMapUnion` Map Identifier (Map String (Maybe NonLocalAttr))
_tlIruleuses
{-# INLINE rule475 #-}
rule475 :: PP_Doc -> PP_Doc -> PP_Doc
rule475 = \ ((PP_Doc
_hdIsem_rules) :: PP_Doc) ((PP_Doc
_tlIsem_rules) :: PP_Doc) ->
PP_Doc
_hdIsem_rules PP_Doc -> PP_Doc -> PP_Doc
forall a b. (PP a, PP b) => a -> b -> PP_Doc
>-< PP_Doc
_tlIsem_rules
{-# INLINE rule476 #-}
rule476 :: Set String -> Set String -> Set String
rule476 = \ ((Set String
_hdIusedArgs) :: Set String) ((Set String
_tlIusedArgs) :: Set String) ->
Set String
_hdIusedArgs Set String -> Set String -> Set String
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set String
_tlIusedArgs
{-# INLINE rule477 #-}
rule477 :: Map Identifier Attributes -> Map Identifier Attributes
rule477 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallInhmap
{-# INLINE rule478 #-}
rule478 :: Map Identifier Attributes -> Map Identifier Attributes
rule478 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallSynmap
{-# INLINE rule479 #-}
rule479 :: Attributes -> Attributes
rule479 = \ ((Attributes
_lhsIchildTypes) :: Map Identifier Type) ->
Attributes
_lhsIchildTypes
{-# INLINE rule480 #-}
rule480 :: Identifier -> Identifier
rule480 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
Identifier
_lhsIcon
{-# INLINE rule481 #-}
rule481 :: Map Identifier ConstructorType -> Map Identifier ConstructorType
rule481 = \ ((Map Identifier ConstructorType
_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->
Map Identifier ConstructorType
_lhsIconstructorTypeMap
{-# INLINE rule482 #-}
rule482 :: (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule482 = \ ((String -> String -> String -> Bool -> String
_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->
String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
{-# INLINE rule483 #-}
rule483 :: (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule483 = \ ((String -> String -> String -> Bool -> String
_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->
String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
{-# INLINE rule484 #-}
rule484 :: PP_Doc -> PP_Doc
rule484 = \ ((PP_Doc
_lhsIimportBlocks) :: PP_Doc) ->
PP_Doc
_lhsIimportBlocks
{-# INLINE rule485 #-}
rule485 :: Attributes -> Attributes
rule485 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
Attributes
_lhsIinhmap
{-# INLINE rule486 #-}
rule486 :: Set String -> Set String
rule486 = \ ((Set String
_lhsIlazyIntras) :: Set String) ->
Set String
_lhsIlazyIntras
{-# INLINE rule487 #-}
rule487 :: Attributes -> Attributes
rule487 = \ ((Attributes
_lhsIlocalAttrTypes) :: Map Identifier Type) ->
Attributes
_lhsIlocalAttrTypes
{-# INLINE rule488 #-}
rule488 :: String -> String
rule488 = \ ((String
_lhsImainFile) :: String) ->
String
_lhsImainFile
{-# INLINE rule489 #-}
rule489 :: String -> String
rule489 = \ ((String
_lhsImainName) :: String) ->
String
_lhsImainName
{-# INLINE rule490 #-}
rule490 :: Identifier -> Identifier
rule490 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
Identifier
_lhsInt
{-# INLINE rule491 #-}
rule491 :: Options -> Options
rule491 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule492 #-}
rule492 :: Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule492 = \ ((Map Identifier (Set VisitKind)
_lhsIruleKinds) :: Map Identifier (Set VisitKind)) ->
Map Identifier (Set VisitKind)
_lhsIruleKinds
{-# INLINE rule493 #-}
rule493 :: Attributes -> Attributes
rule493 = \ ((Attributes
_lhsIsynmap) :: Attributes) ->
Attributes
_lhsIsynmap
{-# INLINE rule494 #-}
rule494 :: PP_Doc -> PP_Doc
rule494 = \ ((PP_Doc
_lhsItextBlocks) :: PP_Doc) ->
PP_Doc
_lhsItextBlocks
{-# INLINE rule495 #-}
rule495 :: Map Identifier Int -> Map Identifier Int
rule495 = \ ((Map Identifier Int
_lhsIusageInfo) :: Map Identifier Int) ->
Map Identifier Int
_lhsIusageInfo
{-# INLINE rule496 #-}
rule496 :: Map Identifier Attributes -> Map Identifier Attributes
rule496 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallInhmap
{-# INLINE rule497 #-}
rule497 :: Map Identifier Attributes -> Map Identifier Attributes
rule497 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallSynmap
{-# INLINE rule498 #-}
rule498 :: Attributes -> Attributes
rule498 = \ ((Attributes
_lhsIchildTypes) :: Map Identifier Type) ->
Attributes
_lhsIchildTypes
{-# INLINE rule499 #-}
rule499 :: Identifier -> Identifier
rule499 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
Identifier
_lhsIcon
{-# INLINE rule500 #-}
rule500 :: Map Identifier ConstructorType -> Map Identifier ConstructorType
rule500 = \ ((Map Identifier ConstructorType
_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->
Map Identifier ConstructorType
_lhsIconstructorTypeMap
{-# INLINE rule501 #-}
rule501 :: (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule501 = \ ((String -> String -> String -> Bool -> String
_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->
String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
{-# INLINE rule502 #-}
rule502 :: (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule502 = \ ((String -> String -> String -> Bool -> String
_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->
String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
{-# INLINE rule503 #-}
rule503 :: PP_Doc -> PP_Doc
rule503 = \ ((PP_Doc
_lhsIimportBlocks) :: PP_Doc) ->
PP_Doc
_lhsIimportBlocks
{-# INLINE rule504 #-}
rule504 :: Attributes -> Attributes
rule504 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
Attributes
_lhsIinhmap
{-# INLINE rule505 #-}
rule505 :: Set String -> Set String
rule505 = \ ((Set String
_lhsIlazyIntras) :: Set String) ->
Set String
_lhsIlazyIntras
{-# INLINE rule506 #-}
rule506 :: Attributes -> Attributes
rule506 = \ ((Attributes
_lhsIlocalAttrTypes) :: Map Identifier Type) ->
Attributes
_lhsIlocalAttrTypes
{-# INLINE rule507 #-}
rule507 :: String -> String
rule507 = \ ((String
_lhsImainFile) :: String) ->
String
_lhsImainFile
{-# INLINE rule508 #-}
rule508 :: String -> String
rule508 = \ ((String
_lhsImainName) :: String) ->
String
_lhsImainName
{-# INLINE rule509 #-}
rule509 :: Identifier -> Identifier
rule509 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
Identifier
_lhsInt
{-# INLINE rule510 #-}
rule510 :: Options -> Options
rule510 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule511 #-}
rule511 :: Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule511 = \ ((Map Identifier (Set VisitKind)
_lhsIruleKinds) :: Map Identifier (Set VisitKind)) ->
Map Identifier (Set VisitKind)
_lhsIruleKinds
{-# INLINE rule512 #-}
rule512 :: Attributes -> Attributes
rule512 = \ ((Attributes
_lhsIsynmap) :: Attributes) ->
Attributes
_lhsIsynmap
{-# INLINE rule513 #-}
rule513 :: PP_Doc -> PP_Doc
rule513 = \ ((PP_Doc
_lhsItextBlocks) :: PP_Doc) ->
PP_Doc
_lhsItextBlocks
{-# INLINE rule514 #-}
rule514 :: Map Identifier Int -> Map Identifier Int
rule514 = \ ((Map Identifier Int
_lhsIusageInfo) :: Map Identifier Int) ->
Map Identifier Int
_lhsIusageInfo
{-# NOINLINE sem_ERules_Nil #-}
sem_ERules_Nil :: T_ERules
sem_ERules_Nil :: T_ERules
sem_ERules_Nil = Identity T_ERules_s23 -> T_ERules
T_ERules (T_ERules_s23 -> Identity T_ERules_s23
forall (m :: * -> *) a. Monad m => a -> m a
return T_ERules_s23
st23) where
{-# NOINLINE st23 #-}
st23 :: T_ERules_s23
st23 = let
v22 :: T_ERules_v22
v22 :: T_ERules_v22
v22 = \ (T_ERules_vIn22 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Identifier
_lhsIcon Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Set String
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes String
_lhsImainFile String
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks Map Identifier Int
_lhsIusageInfo) -> ( let
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule515 ()
_lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules = ()
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
forall k a. () -> Map k a
rule516 ()
_lhsOruledefs :: Map Identifier (Set String)
_lhsOruledefs :: Map Identifier (Set String)
_lhsOruledefs = () -> Map Identifier (Set String)
forall k a. () -> Map k a
rule517 ()
_lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
_lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
_lhsOruleuses = () -> Map Identifier (Map String (Maybe NonLocalAttr))
forall k a. () -> Map k a
rule518 ()
_lhsOsem_rules :: PP_Doc
_lhsOsem_rules :: PP_Doc
_lhsOsem_rules = () -> PP_Doc
rule519 ()
_lhsOusedArgs :: Set String
_lhsOusedArgs :: Set String
_lhsOusedArgs = () -> Set String
forall a. () -> Set a
rule520 ()
__result_ :: T_ERules_vOut22
__result_ = Seq Error
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (Set String)
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> PP_Doc
-> Set String
-> T_ERules_vOut22
T_ERules_vOut22 Seq Error
_lhsOerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set String)
_lhsOruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules Set String
_lhsOusedArgs
in T_ERules_vOut22
__result_ )
in T_ERules_v22 -> T_ERules_s23
C_ERules_s23 T_ERules_v22
v22
{-# INLINE rule515 #-}
rule515 :: () -> Seq a
rule515 = \ (()
_ :: ()) ->
Seq a
forall a. Seq a
Seq.empty
{-# INLINE rule516 #-}
rule516 :: () -> Map k a
rule516 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule517 #-}
rule517 :: () -> Map k a
rule517 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule518 #-}
rule518 :: () -> Map k a
rule518 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule519 #-}
rule519 :: () -> PP_Doc
rule519 = \ (()
_ :: ()) ->
PP_Doc
empty
{-# INLINE rule520 #-}
rule520 :: () -> Set a
rule520 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
data Inh_ExecutionPlan = Inh_ExecutionPlan { Inh_ExecutionPlan -> Map Identifier ConstructorType
constructorTypeMap_Inh_ExecutionPlan :: (Map NontermIdent ConstructorType), :: (String -> String -> String -> Bool -> String), :: (String -> String -> String -> Bool -> String), Inh_ExecutionPlan -> PP_Doc
importBlocks_Inh_ExecutionPlan :: (PP_Doc), Inh_ExecutionPlan -> Map Identifier Attributes
inhmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes), Inh_ExecutionPlan -> Map Identifier (Map Identifier Attributes)
localAttrTypes_Inh_ExecutionPlan :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), Inh_ExecutionPlan -> PP_Doc
mainBlocksDoc_Inh_ExecutionPlan :: (PP_Doc), Inh_ExecutionPlan -> String
mainFile_Inh_ExecutionPlan :: (String), Inh_ExecutionPlan -> String
mainName_Inh_ExecutionPlan :: (String), Inh_ExecutionPlan -> Options
options_Inh_ExecutionPlan :: (Options), Inh_ExecutionPlan -> Map Identifier Attributes
synmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes), Inh_ExecutionPlan -> Map BlockInfo PP_Doc
textBlockMap_Inh_ExecutionPlan :: (Map BlockInfo PP_Doc), Inh_ExecutionPlan -> PP_Doc
textBlocks_Inh_ExecutionPlan :: (PP_Doc) }
data Syn_ExecutionPlan = Syn_ExecutionPlan { Syn_ExecutionPlan -> Seq Error
errors_Syn_ExecutionPlan :: (Seq Error), Syn_ExecutionPlan -> IO ()
genIO_Syn_ExecutionPlan :: (IO ()), Syn_ExecutionPlan -> PP_Doc
output_Syn_ExecutionPlan :: (PP_Doc), Syn_ExecutionPlan -> PP_Doc
output_dcl_Syn_ExecutionPlan :: (PP_Doc) }
{-# INLINABLE wrap_ExecutionPlan #-}
wrap_ExecutionPlan :: T_ExecutionPlan -> Inh_ExecutionPlan -> (Syn_ExecutionPlan )
wrap_ExecutionPlan :: T_ExecutionPlan -> Inh_ExecutionPlan -> Syn_ExecutionPlan
wrap_ExecutionPlan (T_ExecutionPlan Identity T_ExecutionPlan_s26
act) (Inh_ExecutionPlan Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes PP_Doc
_lhsImainBlocksDoc String
_lhsImainFile String
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap Map BlockInfo PP_Doc
_lhsItextBlockMap PP_Doc
_lhsItextBlocks) =
Identity Syn_ExecutionPlan -> Syn_ExecutionPlan
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_ExecutionPlan_s26
sem <- Identity T_ExecutionPlan_s26
act
let arg25 :: T_ExecutionPlan_vIn25
arg25 = Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> PP_Doc
-> String
-> String
-> Options
-> Map Identifier Attributes
-> Map BlockInfo PP_Doc
-> PP_Doc
-> T_ExecutionPlan_vIn25
T_ExecutionPlan_vIn25 Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes PP_Doc
_lhsImainBlocksDoc String
_lhsImainFile String
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap Map BlockInfo PP_Doc
_lhsItextBlockMap PP_Doc
_lhsItextBlocks
(T_ExecutionPlan_vOut25 Seq Error
_lhsOerrors IO ()
_lhsOgenIO PP_Doc
_lhsOoutput PP_Doc
_lhsOoutput_dcl) <- T_ExecutionPlan_vOut25 -> Identity T_ExecutionPlan_vOut25
forall (m :: * -> *) a. Monad m => a -> m a
return (T_ExecutionPlan_s26 -> T_ExecutionPlan_v25
inv_ExecutionPlan_s26 T_ExecutionPlan_s26
sem T_ExecutionPlan_vIn25
arg25)
Syn_ExecutionPlan -> Identity Syn_ExecutionPlan
forall (m :: * -> *) a. Monad m => a -> m a
return (Seq Error -> IO () -> PP_Doc -> PP_Doc -> Syn_ExecutionPlan
Syn_ExecutionPlan Seq Error
_lhsOerrors IO ()
_lhsOgenIO PP_Doc
_lhsOoutput PP_Doc
_lhsOoutput_dcl)
)
{-# INLINE sem_ExecutionPlan #-}
sem_ExecutionPlan :: ExecutionPlan -> T_ExecutionPlan
sem_ExecutionPlan :: ExecutionPlan -> T_ExecutionPlan
sem_ExecutionPlan ( ExecutionPlan ENonterminals
nonts_ TypeSyns
typeSyns_ Set Identifier
wrappers_ Derivings
derivings_ ) = T_ENonterminals
-> TypeSyns -> Set Identifier -> Derivings -> T_ExecutionPlan
sem_ExecutionPlan_ExecutionPlan ( ENonterminals -> T_ENonterminals
sem_ENonterminals ENonterminals
nonts_ ) TypeSyns
typeSyns_ Set Identifier
wrappers_ Derivings
derivings_
newtype T_ExecutionPlan = T_ExecutionPlan {
T_ExecutionPlan -> Identity T_ExecutionPlan_s26
attach_T_ExecutionPlan :: Identity (T_ExecutionPlan_s26 )
}
newtype T_ExecutionPlan_s26 = C_ExecutionPlan_s26 {
T_ExecutionPlan_s26 -> T_ExecutionPlan_v25
inv_ExecutionPlan_s26 :: (T_ExecutionPlan_v25 )
}
data T_ExecutionPlan_s27 = C_ExecutionPlan_s27
type T_ExecutionPlan_v25 = (T_ExecutionPlan_vIn25 ) -> (T_ExecutionPlan_vOut25 )
data T_ExecutionPlan_vIn25 = T_ExecutionPlan_vIn25 (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (String -> String -> String -> Bool -> String) (PP_Doc) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (PP_Doc) (String) (String) (Options) (Map NontermIdent Attributes) (Map BlockInfo PP_Doc) (PP_Doc)
data T_ExecutionPlan_vOut25 = T_ExecutionPlan_vOut25 (Seq Error) (IO ()) (PP_Doc) (PP_Doc)
{-# NOINLINE sem_ExecutionPlan_ExecutionPlan #-}
sem_ExecutionPlan_ExecutionPlan :: T_ENonterminals -> (TypeSyns) -> (Set NontermIdent) -> (Derivings) -> T_ExecutionPlan
sem_ExecutionPlan_ExecutionPlan :: T_ENonterminals
-> TypeSyns -> Set Identifier -> Derivings -> T_ExecutionPlan
sem_ExecutionPlan_ExecutionPlan T_ENonterminals
arg_nonts_ TypeSyns
arg_typeSyns_ Set Identifier
arg_wrappers_ Derivings
arg_derivings_ = Identity T_ExecutionPlan_s26 -> T_ExecutionPlan
T_ExecutionPlan (T_ExecutionPlan_s26 -> Identity T_ExecutionPlan_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_ExecutionPlan_s26
st26) where
{-# NOINLINE st26 #-}
st26 :: T_ExecutionPlan_s26
st26 = let
v25 :: T_ExecutionPlan_v25
v25 :: T_ExecutionPlan_v25
v25 = \ (T_ExecutionPlan_vIn25 Map Identifier ConstructorType
_lhsIconstructorTypeMap String -> String -> String -> Bool -> String
_lhsIdclModuleHeader String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes PP_Doc
_lhsImainBlocksDoc String
_lhsImainFile String
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap Map BlockInfo PP_Doc
_lhsItextBlockMap PP_Doc
_lhsItextBlocks) -> ( let
_nontsX11 :: T_ENonterminals_s11
_nontsX11 = Identity T_ENonterminals_s11 -> T_ENonterminals_s11
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ENonterminals -> Identity T_ENonterminals_s11
attach_T_ENonterminals (T_ENonterminals
arg_nonts_))
(T_ENonterminals_vOut10 [PP_Doc]
_nontsIappendCommon [PP_Doc]
_nontsIappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_nontsIchildvisit Seq Error
_nontsIerrors Map Int (Int, Int)
_nontsIfromToStates IO ()
_nontsIgenProdIO [PP_Doc]
_nontsIimports Map Identifier Int
_nontsIinitStates PP_Doc
_nontsIoutput PP_Doc
_nontsIoutput_dcl Seq PP_Doc
_nontsIsemFunBndDefs Seq PP_Doc
_nontsIsemFunBndTps Map Int VisitKind
_nontsIvisitKinds Map Int (Set Identifier)
_nontsIvisitdefs Map Int (Set Identifier)
_nontsIvisituses) = T_ENonterminals_s11 -> T_ENonterminals_v10
inv_ENonterminals_s11 T_ENonterminals_s11
_nontsX11 (Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Map Identifier ConstructorType
-> (String -> String -> String -> Bool -> String)
-> Derivings
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> String
-> String
-> Options
-> Map Identifier Attributes
-> PP_Doc
-> TypeSyns
-> Set Identifier
-> T_ENonterminals_vIn10
T_ENonterminals_vIn10 Map Int (Int, Int)
_nontsOallFromToStates Map Identifier Int
_nontsOallInitStates Map Int VisitKind
_nontsOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_nontsOallchildvisit Map Int (Set Identifier)
_nontsOavisitdefs Map Int (Set Identifier)
_nontsOavisituses Map Identifier ConstructorType
_nontsOconstructorTypeMap String -> String -> String -> Bool -> String
_nontsOdclModuleHeader Derivings
_nontsOderivings String -> String -> String -> Bool -> String
_nontsOiclModuleHeader PP_Doc
_nontsOimportBlocks Map Identifier Attributes
_nontsOinhmap Map Identifier (Map Identifier Attributes)
_nontsOlocalAttrTypes String
_nontsOmainFile String
_nontsOmainName Options
_nontsOoptions Map Identifier Attributes
_nontsOsynmap PP_Doc
_nontsOtextBlocks TypeSyns
_nontsOtypeSyns Set Identifier
_nontsOwrappers)
_lhsOoutput :: PP_Doc
_lhsOoutput :: PP_Doc
_lhsOoutput = PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc
rule521 PP_Doc
_commonExtra PP_Doc
_nontsIoutput PP_Doc
_wrappersExtra
_lhsOoutput_dcl :: PP_Doc
_lhsOoutput_dcl :: PP_Doc
_lhsOoutput_dcl = PP_Doc -> PP_Doc
rule522 PP_Doc
_nontsIoutput_dcl
_nontsOwrappers :: Set Identifier
_nontsOwrappers = Set Identifier -> Set Identifier
forall a. a -> a
rule523 Set Identifier
arg_wrappers_
_nontsOtypeSyns :: TypeSyns
_nontsOtypeSyns = TypeSyns -> TypeSyns
forall a. a -> a
rule524 TypeSyns
arg_typeSyns_
_nontsOderivings :: Derivings
_nontsOderivings = Derivings -> Derivings
forall a. a -> a
rule525 Derivings
arg_derivings_
_wrappersExtra :: PP_Doc
_wrappersExtra = PP_Doc -> Options -> PP_Doc
rule526 PP_Doc
_lateSemBndDef Options
_lhsIoptions
_commonExtra :: PP_Doc
_commonExtra = PP_Doc -> Options -> PP_Doc
rule527 PP_Doc
_lateSemBndTp Options
_lhsIoptions
_lateSemBndTp :: PP_Doc
_lateSemBndTp = String -> Seq PP_Doc -> PP_Doc
rule528 String
_lhsImainName Seq PP_Doc
_nontsIsemFunBndTps
_lateSemBndDef :: PP_Doc
_lateSemBndDef = String -> Seq PP_Doc -> PP_Doc
rule529 String
_lhsImainName Seq PP_Doc
_nontsIsemFunBndDefs
_nontsOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_nontsOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule530 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_nontsIchildvisit
_nontsOavisitdefs :: Map Int (Set Identifier)
_nontsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule531 Map Int (Set Identifier)
_nontsIvisitdefs
_nontsOavisituses :: Map Int (Set Identifier)
_nontsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule532 Map Int (Set Identifier)
_nontsIvisituses
_lhsOgenIO :: IO ()
_lhsOgenIO :: IO ()
_lhsOgenIO = IO () -> IO () -> IO () -> IO ()
forall a a. IO a -> IO a -> IO () -> IO ()
rule533 IO ()
_genCommonModule IO ()
_genMainModule IO ()
_nontsIgenProdIO
_mainModuleFile :: String
_mainModuleFile = String -> String
rule534 String
_lhsImainFile
_ppMonadImports :: PP_Doc
_ppMonadImports = () -> PP_Doc
rule535 ()
_genMainModule :: IO ()
_genMainModule = (String -> String -> String -> Bool -> String)
-> PP_Doc
-> String
-> String
-> [PP_Doc]
-> [PP_Doc]
-> PP_Doc
-> PP_Doc
-> IO ()
rule536 String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsImainBlocksDoc String
_lhsImainName String
_mainModuleFile [PP_Doc]
_nontsIappendMain [PP_Doc]
_nontsIimports PP_Doc
_ppMonadImports PP_Doc
_wrappersExtra
_commonFile :: String
_commonFile = String -> String
rule537 String
_lhsImainFile
_genCommonModule :: IO ()
_genCommonModule = PP_Doc
-> String
-> (String -> String -> String -> Bool -> String)
-> PP_Doc
-> String
-> PP_Doc
-> [PP_Doc]
-> PP_Doc
-> IO ()
rule538 PP_Doc
_commonExtra String
_commonFile String -> String -> String -> Bool -> String
_lhsIiclModuleHeader PP_Doc
_lhsIimportBlocks String
_lhsImainName PP_Doc
_lhsItextBlocks [PP_Doc]
_nontsIappendCommon PP_Doc
_ppMonadImports
_nontsOallFromToStates :: Map Int (Int, Int)
_nontsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule539 Map Int (Int, Int)
_nontsIfromToStates
_nontsOallVisitKinds :: Map Int VisitKind
_nontsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule540 Map Int VisitKind
_nontsIvisitKinds
_nontsOallInitStates :: Map Identifier Int
_nontsOallInitStates = Map Identifier Int -> Map Identifier Int
rule541 Map Identifier Int
_nontsIinitStates
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule542 Seq Error
_nontsIerrors
_nontsOconstructorTypeMap :: Map Identifier ConstructorType
_nontsOconstructorTypeMap = Map Identifier ConstructorType -> Map Identifier ConstructorType
rule543 Map Identifier ConstructorType
_lhsIconstructorTypeMap
_nontsOdclModuleHeader :: String -> String -> String -> Bool -> String
_nontsOdclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule544 String -> String -> String -> Bool -> String
_lhsIdclModuleHeader
_nontsOiclModuleHeader :: String -> String -> String -> Bool -> String
_nontsOiclModuleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule545 String -> String -> String -> Bool -> String
_lhsIiclModuleHeader
_nontsOimportBlocks :: PP_Doc
_nontsOimportBlocks = PP_Doc -> PP_Doc
rule546 PP_Doc
_lhsIimportBlocks
_nontsOinhmap :: Map Identifier Attributes
_nontsOinhmap = Map Identifier Attributes -> Map Identifier Attributes
rule547 Map Identifier Attributes
_lhsIinhmap
_nontsOlocalAttrTypes :: Map Identifier (Map Identifier Attributes)
_nontsOlocalAttrTypes = Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule548 Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes
_nontsOmainFile :: String
_nontsOmainFile = String -> String
rule549 String
_lhsImainFile
_nontsOmainName :: String
_nontsOmainName = String -> String
rule550 String
_lhsImainName
_nontsOoptions :: Options
_nontsOoptions = Options -> Options
rule551 Options
_lhsIoptions
_nontsOsynmap :: Map Identifier Attributes
_nontsOsynmap = Map Identifier Attributes -> Map Identifier Attributes
rule552 Map Identifier Attributes
_lhsIsynmap
_nontsOtextBlocks :: PP_Doc
_nontsOtextBlocks = PP_Doc -> PP_Doc
rule553 PP_Doc
_lhsItextBlocks
__result_ :: T_ExecutionPlan_vOut25
__result_ = Seq Error -> IO () -> PP_Doc -> PP_Doc -> T_ExecutionPlan_vOut25
T_ExecutionPlan_vOut25 Seq Error
_lhsOerrors IO ()
_lhsOgenIO PP_Doc
_lhsOoutput PP_Doc
_lhsOoutput_dcl
in T_ExecutionPlan_vOut25
__result_ )
in T_ExecutionPlan_v25 -> T_ExecutionPlan_s26
C_ExecutionPlan_s26 T_ExecutionPlan_v25
v25
{-# INLINE rule521 #-}
{-# LINE 91 "src-ag/ExecutionPlan2Clean.ag" #-}
rule521 = \ _commonExtra ((_nontsIoutput) :: PP_Doc) _wrappersExtra ->
{-# LINE 91 "src-ag/ExecutionPlan2Clean.ag" #-}
_nontsIoutput >-< _commonExtra >-< _wrappersExtra
{-# LINE 3988 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule522 #-}
{-# LINE 92 "src-ag/ExecutionPlan2Clean.ag" #-}
rule522 = \ ((_nontsIoutput_dcl) :: PP_Doc) ->
{-# LINE 92 "src-ag/ExecutionPlan2Clean.ag" #-}
_nontsIoutput_dcl
{-# LINE 3994 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule523 #-}
{-# LINE 99 "src-ag/ExecutionPlan2Clean.ag" #-}
rule523 = \ wrappers_ ->
{-# LINE 99 "src-ag/ExecutionPlan2Clean.ag" #-}
wrappers_
{-# LINE 4000 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule524 #-}
{-# LINE 159 "src-ag/ExecutionPlan2Clean.ag" #-}
rule524 = \ typeSyns_ ->
{-# LINE 159 "src-ag/ExecutionPlan2Clean.ag" #-}
typeSyns_
{-# LINE 4006 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule525 #-}
{-# LINE 160 "src-ag/ExecutionPlan2Clean.ag" #-}
rule525 = \ derivings_ ->
{-# LINE 160 "src-ag/ExecutionPlan2Clean.ag" #-}
derivings_
{-# LINE 4012 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule526 #-}
{-# LINE 599 "src-ag/ExecutionPlan2Clean.ag" #-}
rule526 = \ _lateSemBndDef ((_lhsIoptions) :: Options) ->
{-# LINE 599 "src-ag/ExecutionPlan2Clean.ag" #-}
if lateHigherOrderBinding _lhsIoptions
then _lateSemBndDef
else empty
{-# LINE 4020 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule527 #-}
{-# LINE 602 "src-ag/ExecutionPlan2Clean.ag" #-}
rule527 = \ _lateSemBndTp ((_lhsIoptions) :: Options) ->
{-# LINE 602 "src-ag/ExecutionPlan2Clean.ag" #-}
if lateHigherOrderBinding _lhsIoptions
then _lateSemBndTp
else empty
{-# LINE 4028 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule528 #-}
{-# LINE 605 "src-ag/ExecutionPlan2Clean.ag" #-}
rule528 = \ ((_lhsImainName) :: String) ((_nontsIsemFunBndTps) :: Seq PP_Doc) ->
{-# LINE 605 "src-ag/ExecutionPlan2Clean.ag" #-}
"::" >#< lateBindingTypeNm _lhsImainName >#< "=" >#< lateBindingTypeNm _lhsImainName
>-< (indent 2 $ pp_block "{" "}" "," $ toList _nontsIsemFunBndTps)
{-# LINE 4035 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule529 #-}
{-# LINE 607 "src-ag/ExecutionPlan2Clean.ag" #-}
rule529 = \ ((_lhsImainName) :: String) ((_nontsIsemFunBndDefs) :: Seq PP_Doc) ->
{-# LINE 607 "src-ag/ExecutionPlan2Clean.ag" #-}
lateBindingFieldNm _lhsImainName >#< "::" >#< lateBindingTypeNm _lhsImainName
>-< lateBindingFieldNm _lhsImainName >#< "=" >#< lateBindingTypeNm _lhsImainName
>-< (indent 2 $ pp_block "{" "}" "," $ toList _nontsIsemFunBndDefs )
{-# LINE 4043 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule530 #-}
{-# LINE 1223 "src-ag/ExecutionPlan2Clean.ag" #-}
rule530 = \ ((_nontsIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
{-# LINE 1223 "src-ag/ExecutionPlan2Clean.ag" #-}
_nontsIchildvisit
{-# LINE 4049 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule531 #-}
{-# LINE 1367 "src-ag/ExecutionPlan2Clean.ag" #-}
rule531 = \ ((_nontsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
{-# LINE 1367 "src-ag/ExecutionPlan2Clean.ag" #-}
_nontsIvisitdefs
{-# LINE 4055 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule532 #-}
{-# LINE 1368 "src-ag/ExecutionPlan2Clean.ag" #-}
rule532 = \ ((_nontsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->
{-# LINE 1368 "src-ag/ExecutionPlan2Clean.ag" #-}
_nontsIvisituses
{-# LINE 4061 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule533 #-}
{-# LINE 1439 "src-ag/ExecutionPlan2Clean.ag" #-}
rule533 = \ _genCommonModule _genMainModule ((_nontsIgenProdIO) :: IO ()) ->
{-# LINE 1439 "src-ag/ExecutionPlan2Clean.ag" #-}
do _genMainModule
_genCommonModule
_nontsIgenProdIO
{-# LINE 4069 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule534 #-}
{-# LINE 1442 "src-ag/ExecutionPlan2Clean.ag" #-}
rule534 = \ ((_lhsImainFile) :: String) ->
{-# LINE 1442 "src-ag/ExecutionPlan2Clean.ag" #-}
_lhsImainFile
{-# LINE 4075 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule535 #-}
{-# LINE 1443 "src-ag/ExecutionPlan2Clean.ag" #-}
rule535 = \ (_ :: ()) ->
{-# LINE 1443 "src-ag/ExecutionPlan2Clean.ag" #-}
pp "import qualified Control.Monad.Identity"
{-# LINE 4081 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule536 #-}
{-# LINE 1444 "src-ag/ExecutionPlan2Clean.ag" #-}
rule536 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ((_lhsImainBlocksDoc) :: PP_Doc) ((_lhsImainName) :: String) _mainModuleFile ((_nontsIappendMain) :: [PP_Doc]) ((_nontsIimports) :: [PP_Doc]) _ppMonadImports _wrappersExtra ->
{-# LINE 1444 "src-ag/ExecutionPlan2Clean.ag" #-}
writeModule _mainModuleFile
( [ pp $ _lhsIiclModuleHeader _lhsImainName "" "" False
, _ppMonadImports
, pp $ "import " ++ _lhsImainName ++ "_common"
]
++ _nontsIimports
++ [_lhsImainBlocksDoc]
++ [_wrappersExtra ]
++ _nontsIappendMain
)
{-# LINE 4096 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule537 #-}
{-# LINE 1454 "src-ag/ExecutionPlan2Clean.ag" #-}
rule537 = \ ((_lhsImainFile) :: String) ->
{-# LINE 1454 "src-ag/ExecutionPlan2Clean.ag" #-}
replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ "_common")
{-# LINE 4102 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule538 #-}
{-# LINE 1455 "src-ag/ExecutionPlan2Clean.ag" #-}
rule538 = \ _commonExtra _commonFile ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIimportBlocks) :: PP_Doc) ((_lhsImainName) :: String) ((_lhsItextBlocks) :: PP_Doc) ((_nontsIappendCommon) :: [PP_Doc]) _ppMonadImports ->
{-# LINE 1455 "src-ag/ExecutionPlan2Clean.ag" #-}
writeModule _commonFile
( [ pp $ _lhsIiclModuleHeader _lhsImainName "_common" "" True
, _ppMonadImports
, _lhsIimportBlocks
, _lhsItextBlocks
, _commonExtra
]
++ _nontsIappendCommon
)
{-# LINE 4116 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule539 #-}
{-# LINE 1603 "src-ag/ExecutionPlan2Clean.ag" #-}
rule539 = \ ((_nontsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->
{-# LINE 1603 "src-ag/ExecutionPlan2Clean.ag" #-}
_nontsIfromToStates
{-# LINE 4122 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule540 #-}
{-# LINE 1647 "src-ag/ExecutionPlan2Clean.ag" #-}
rule540 = \ ((_nontsIvisitKinds) :: Map VisitIdentifier VisitKind) ->
{-# LINE 1647 "src-ag/ExecutionPlan2Clean.ag" #-}
_nontsIvisitKinds
{-# LINE 4128 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule541 #-}
{-# LINE 1661 "src-ag/ExecutionPlan2Clean.ag" #-}
rule541 = \ ((_nontsIinitStates) :: Map NontermIdent Int) ->
{-# LINE 1661 "src-ag/ExecutionPlan2Clean.ag" #-}
_nontsIinitStates
{-# LINE 4134 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule542 #-}
rule542 = \ ((_nontsIerrors) :: Seq Error) ->
_nontsIerrors
{-# INLINE rule543 #-}
rule543 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->
_lhsIconstructorTypeMap
{-# INLINE rule544 #-}
rule544 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->
_lhsIdclModuleHeader
{-# INLINE rule545 #-}
rule545 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->
_lhsIiclModuleHeader
{-# INLINE rule546 #-}
rule546 = \ ((_lhsIimportBlocks) :: PP_Doc) ->
_lhsIimportBlocks
{-# INLINE rule547 #-}
rule547 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->
_lhsIinhmap
{-# INLINE rule548 #-}
rule548 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->
_lhsIlocalAttrTypes
{-# INLINE rule549 #-}
rule549 = \ ((_lhsImainFile) :: String) ->
_lhsImainFile
{-# INLINE rule550 #-}
rule550 = \ ((_lhsImainName) :: String) ->
_lhsImainName
{-# INLINE rule551 #-}
rule551 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule552 #-}
rule552 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->
_lhsIsynmap
{-# INLINE rule553 #-}
rule553 = \ ((_lhsItextBlocks) :: PP_Doc) ->
_lhsItextBlocks
data Inh_Expression = Inh_Expression { Inh_Expression -> Options
options_Inh_Expression :: (Options) }
data Syn_Expression = Syn_Expression { Syn_Expression -> Map String (Maybe NonLocalAttr)
attrs_Syn_Expression :: (Map String (Maybe NonLocalAttr)), Syn_Expression -> Pos
pos_Syn_Expression :: (Pos), Syn_Expression -> PP_Doc
semfunc_Syn_Expression :: (PP_Doc), Syn_Expression -> [HsToken]
tks_Syn_Expression :: ([HsToken]) }
{-# INLINABLE wrap_Expression #-}
wrap_Expression :: T_Expression -> Inh_Expression -> (Syn_Expression )
wrap_Expression :: T_Expression -> Inh_Expression -> Syn_Expression
wrap_Expression (T_Expression Identity T_Expression_s29
act) (Inh_Expression Options
_lhsIoptions) =
Identity Syn_Expression -> Syn_Expression
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_Expression_s29
sem <- Identity T_Expression_s29
act
let arg28 :: T_Expression_vIn28
arg28 = Options -> T_Expression_vIn28
T_Expression_vIn28 Options
_lhsIoptions
(T_Expression_vOut28 Map String (Maybe NonLocalAttr)
_lhsOattrs Pos
_lhsOpos PP_Doc
_lhsOsemfunc [HsToken]
_lhsOtks) <- T_Expression_vOut28 -> Identity T_Expression_vOut28
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Expression_s29 -> T_Expression_v28
inv_Expression_s29 T_Expression_s29
sem T_Expression_vIn28
arg28)
Syn_Expression -> Identity Syn_Expression
forall (m :: * -> *) a. Monad m => a -> m a
return (Map String (Maybe NonLocalAttr)
-> Pos -> PP_Doc -> [HsToken] -> Syn_Expression
Syn_Expression Map String (Maybe NonLocalAttr)
_lhsOattrs Pos
_lhsOpos PP_Doc
_lhsOsemfunc [HsToken]
_lhsOtks)
)
{-# INLINE sem_Expression #-}
sem_Expression :: Expression -> T_Expression
sem_Expression :: Expression -> T_Expression
sem_Expression ( Expression Pos
pos_ [HsToken]
tks_ ) = Pos -> [HsToken] -> T_Expression
sem_Expression_Expression Pos
pos_ [HsToken]
tks_
newtype T_Expression = T_Expression {
T_Expression -> Identity T_Expression_s29
attach_T_Expression :: Identity (T_Expression_s29 )
}
newtype T_Expression_s29 = C_Expression_s29 {
T_Expression_s29 -> T_Expression_v28
inv_Expression_s29 :: (T_Expression_v28 )
}
data T_Expression_s30 = C_Expression_s30
type T_Expression_v28 = (T_Expression_vIn28 ) -> (T_Expression_vOut28 )
data T_Expression_vIn28 = T_Expression_vIn28 (Options)
data T_Expression_vOut28 = T_Expression_vOut28 (Map String (Maybe NonLocalAttr)) (Pos) (PP_Doc) ([HsToken])
{-# NOINLINE sem_Expression_Expression #-}
sem_Expression_Expression :: (Pos) -> ([HsToken]) -> T_Expression
sem_Expression_Expression :: Pos -> [HsToken] -> T_Expression
sem_Expression_Expression Pos
arg_pos_ [HsToken]
arg_tks_ = Identity T_Expression_s29 -> T_Expression
T_Expression (T_Expression_s29 -> Identity T_Expression_s29
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expression_s29
st29) where
{-# NOINLINE st29 #-}
st29 :: T_Expression_s29
st29 = let
v28 :: T_Expression_v28
v28 :: T_Expression_v28
v28 = \ (T_Expression_vIn28 Options
_lhsIoptions) -> ( let
_lhsOtks :: [HsToken]
_lhsOtks :: [HsToken]
_lhsOtks = [HsToken] -> [HsToken]
forall a. a -> a
rule554 [HsToken]
arg_tks_
_lhsOpos :: Pos
_lhsOpos :: Pos
_lhsOpos = Pos -> Pos
forall a. a -> a
rule555 Pos
arg_pos_
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs = Inh_HsToken -> [HsToken] -> Map String (Maybe NonLocalAttr)
rule556 Inh_HsToken
_inhhstoken [HsToken]
arg_tks_
_lhsOsemfunc :: PP_Doc
_lhsOsemfunc :: PP_Doc
_lhsOsemfunc = Inh_HsToken -> [HsToken] -> PP_Doc
rule557 Inh_HsToken
_inhhstoken [HsToken]
arg_tks_
_inhhstoken :: Inh_HsToken
_inhhstoken = Options -> Inh_HsToken
rule558 Options
_lhsIoptions
__result_ :: T_Expression_vOut28
__result_ = Map String (Maybe NonLocalAttr)
-> Pos -> PP_Doc -> [HsToken] -> T_Expression_vOut28
T_Expression_vOut28 Map String (Maybe NonLocalAttr)
_lhsOattrs Pos
_lhsOpos PP_Doc
_lhsOsemfunc [HsToken]
_lhsOtks
in T_Expression_vOut28
__result_ )
in T_Expression_v28 -> T_Expression_s29
C_Expression_s29 T_Expression_v28
v28
{-# INLINE rule554 #-}
{-# LINE 1077 "src-ag/ExecutionPlan2Clean.ag" #-}
rule554 = \ tks_ ->
{-# LINE 1077 "src-ag/ExecutionPlan2Clean.ag" #-}
tks_
{-# LINE 4226 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule555 #-}
{-# LINE 1120 "src-ag/ExecutionPlan2Clean.ag" #-}
rule555 = \ pos_ ->
{-# LINE 1120 "src-ag/ExecutionPlan2Clean.ag" #-}
pos_
{-# LINE 4232 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule556 #-}
{-# LINE 1207 "src-ag/ExecutionPlan2Clean.ag" #-}
rule556 = \ _inhhstoken tks_ ->
{-# LINE 1207 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.unions $ map (\tok -> attrs_Syn_HsToken (wrap_HsToken (sem_HsToken tok) _inhhstoken )) tks_
{-# LINE 4238 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule557 #-}
{-# LINE 1208 "src-ag/ExecutionPlan2Clean.ag" #-}
rule557 = \ _inhhstoken tks_ ->
{-# LINE 1208 "src-ag/ExecutionPlan2Clean.ag" #-}
vlist $ showTokens $ map (\tok -> tok_Syn_HsToken (wrap_HsToken (sem_HsToken tok) _inhhstoken )) tks_
{-# LINE 4244 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule558 #-}
{-# LINE 1209 "src-ag/ExecutionPlan2Clean.ag" #-}
rule558 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 1209 "src-ag/ExecutionPlan2Clean.ag" #-}
Inh_HsToken _lhsIoptions
{-# LINE 4250 "src-generated/ExecutionPlan2Clean.hs" #-}
data Inh_HsToken = Inh_HsToken { Inh_HsToken -> Options
options_Inh_HsToken :: (Options) }
data Syn_HsToken = Syn_HsToken { Syn_HsToken -> Map String (Maybe NonLocalAttr)
attrs_Syn_HsToken :: (Map String (Maybe NonLocalAttr)), Syn_HsToken -> (Pos, String)
tok_Syn_HsToken :: ((Pos,String)) }
{-# INLINABLE wrap_HsToken #-}
wrap_HsToken :: T_HsToken -> Inh_HsToken -> (Syn_HsToken )
wrap_HsToken :: T_HsToken -> Inh_HsToken -> Syn_HsToken
wrap_HsToken (T_HsToken Identity T_HsToken_s32
act) (Inh_HsToken Options
_lhsIoptions) =
Identity Syn_HsToken -> Syn_HsToken
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_HsToken_s32
sem <- Identity T_HsToken_s32
act
let arg31 :: T_HsToken_vIn31
arg31 = Options -> T_HsToken_vIn31
T_HsToken_vIn31 Options
_lhsIoptions
(T_HsToken_vOut31 Map String (Maybe NonLocalAttr)
_lhsOattrs (Pos, String)
_lhsOtok) <- T_HsToken_vOut31 -> Identity T_HsToken_vOut31
forall (m :: * -> *) a. Monad m => a -> m a
return (T_HsToken_s32 -> T_HsToken_v31
inv_HsToken_s32 T_HsToken_s32
sem T_HsToken_vIn31
arg31)
Syn_HsToken -> Identity Syn_HsToken
forall (m :: * -> *) a. Monad m => a -> m a
return (Map String (Maybe NonLocalAttr) -> (Pos, String) -> Syn_HsToken
Syn_HsToken Map String (Maybe NonLocalAttr)
_lhsOattrs (Pos, String)
_lhsOtok)
)
{-# NOINLINE sem_HsToken #-}
sem_HsToken :: HsToken -> T_HsToken
sem_HsToken :: HsToken -> T_HsToken
sem_HsToken ( AGLocal Identifier
var_ Pos
pos_ Maybe String
rdesc_ ) = Identifier -> Pos -> Maybe String -> T_HsToken
sem_HsToken_AGLocal Identifier
var_ Pos
pos_ Maybe String
rdesc_
sem_HsToken ( AGField Identifier
field_ Identifier
attr_ Pos
pos_ Maybe String
rdesc_ ) = Identifier -> Identifier -> Pos -> Maybe String -> T_HsToken
sem_HsToken_AGField Identifier
field_ Identifier
attr_ Pos
pos_ Maybe String
rdesc_
sem_HsToken ( HsToken String
value_ Pos
pos_ ) = String -> Pos -> T_HsToken
sem_HsToken_HsToken String
value_ Pos
pos_
sem_HsToken ( CharToken String
value_ Pos
pos_ ) = String -> Pos -> T_HsToken
sem_HsToken_CharToken String
value_ Pos
pos_
sem_HsToken ( StrToken String
value_ Pos
pos_ ) = String -> Pos -> T_HsToken
sem_HsToken_StrToken String
value_ Pos
pos_
sem_HsToken ( Err String
mesg_ Pos
pos_ ) = String -> Pos -> T_HsToken
sem_HsToken_Err String
mesg_ Pos
pos_
newtype T_HsToken = T_HsToken {
T_HsToken -> Identity T_HsToken_s32
attach_T_HsToken :: Identity (T_HsToken_s32 )
}
newtype T_HsToken_s32 = C_HsToken_s32 {
T_HsToken_s32 -> T_HsToken_v31
inv_HsToken_s32 :: (T_HsToken_v31 )
}
data T_HsToken_s33 = C_HsToken_s33
type T_HsToken_v31 = (T_HsToken_vIn31 ) -> (T_HsToken_vOut31 )
data T_HsToken_vIn31 = T_HsToken_vIn31 (Options)
data T_HsToken_vOut31 = T_HsToken_vOut31 (Map String (Maybe NonLocalAttr)) ((Pos,String))
{-# NOINLINE sem_HsToken_AGLocal #-}
sem_HsToken_AGLocal :: (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken
sem_HsToken_AGLocal :: Identifier -> Pos -> Maybe String -> T_HsToken
sem_HsToken_AGLocal Identifier
arg_var_ Pos
arg_pos_ Maybe String
_ = Identity T_HsToken_s32 -> T_HsToken
T_HsToken (T_HsToken_s32 -> Identity T_HsToken_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s32
st32) where
{-# NOINLINE st32 #-}
st32 :: T_HsToken_s32
st32 = let
v31 :: T_HsToken_v31
v31 :: T_HsToken_v31
v31 = \ (T_HsToken_vIn31 Options
_lhsIoptions) -> ( let
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs = Identifier -> Map String (Maybe NonLocalAttr)
forall a. Identifier -> Map String (Maybe a)
rule559 Identifier
arg_var_
_tok :: (Pos, String)
_tok = Pos -> Identifier -> (Pos, String)
forall a. a -> Identifier -> (a, String)
rule560 Pos
arg_pos_ Identifier
arg_var_
_lhsOtok :: (Pos,String)
_lhsOtok :: (Pos, String)
_lhsOtok = (Pos, String) -> (Pos, String)
forall a. a -> a
rule561 (Pos, String)
_tok
__result_ :: T_HsToken_vOut31
__result_ = Map String (Maybe NonLocalAttr)
-> (Pos, String) -> T_HsToken_vOut31
T_HsToken_vOut31 Map String (Maybe NonLocalAttr)
_lhsOattrs (Pos, String)
_lhsOtok
in T_HsToken_vOut31
__result_ )
in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
{-# INLINE rule559 #-}
{-# LINE 1166 "src-ag/ExecutionPlan2Clean.ag" #-}
rule559 = \ var_ ->
{-# LINE 1166 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton (fieldname var_) Nothing
{-# LINE 4307 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule560 #-}
{-# LINE 1412 "src-ag/ExecutionPlan2Clean.ag" #-}
rule560 = \ pos_ var_ ->
{-# LINE 1412 "src-ag/ExecutionPlan2Clean.ag" #-}
(pos_,fieldname var_)
{-# LINE 4313 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule561 #-}
rule561 = \ _tok ->
_tok
{-# NOINLINE sem_HsToken_AGField #-}
sem_HsToken_AGField :: (Identifier) -> (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken
sem_HsToken_AGField :: Identifier -> Identifier -> Pos -> Maybe String -> T_HsToken
sem_HsToken_AGField Identifier
arg_field_ Identifier
arg_attr_ Pos
arg_pos_ Maybe String
arg_rdesc_ = Identity T_HsToken_s32 -> T_HsToken
T_HsToken (T_HsToken_s32 -> Identity T_HsToken_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s32
st32) where
{-# NOINLINE st32 #-}
st32 :: T_HsToken_s32
st32 = let
v31 :: T_HsToken_v31
v31 :: T_HsToken_v31
v31 = \ (T_HsToken_vIn31 Options
_lhsIoptions) -> ( let
_mbAttr :: Maybe NonLocalAttr
_mbAttr = Identifier -> Identifier -> Maybe NonLocalAttr
rule562 Identifier
arg_attr_ Identifier
arg_field_
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs = Options
-> Maybe NonLocalAttr
-> Identifier
-> Identifier
-> Map String (Maybe NonLocalAttr)
forall a. Options -> a -> Identifier -> Identifier -> Map String a
rule563 Options
_lhsIoptions Maybe NonLocalAttr
_mbAttr Identifier
arg_attr_ Identifier
arg_field_
_addTrace :: String -> String
_addTrace = Identifier -> Identifier -> Maybe String -> String -> String
rule564 Identifier
arg_attr_ Identifier
arg_field_ Maybe String
arg_rdesc_
_lhsOtok :: (Pos,String)
_lhsOtok :: (Pos, String)
_lhsOtok = (String -> String)
-> Options -> Identifier -> Identifier -> Pos -> (Pos, String)
forall b a.
(String -> b) -> Options -> Identifier -> Identifier -> a -> (a, b)
rule565 String -> String
_addTrace Options
_lhsIoptions Identifier
arg_attr_ Identifier
arg_field_ Pos
arg_pos_
__result_ :: T_HsToken_vOut31
__result_ = Map String (Maybe NonLocalAttr)
-> (Pos, String) -> T_HsToken_vOut31
T_HsToken_vOut31 Map String (Maybe NonLocalAttr)
_lhsOattrs (Pos, String)
_lhsOtok
in T_HsToken_vOut31
__result_ )
in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
{-# INLINE rule562 #-}
{-# LINE 1167 "src-ag/ExecutionPlan2Clean.ag" #-}
rule562 = \ attr_ field_ ->
{-# LINE 1167 "src-ag/ExecutionPlan2Clean.ag" #-}
if field_ == _INST || field_ == _FIELD || field_ == _INST'
then Nothing
else Just $ mkNonLocalAttr (field_ == _LHS) field_ attr_
{-# LINE 4340 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule563 #-}
{-# LINE 1170 "src-ag/ExecutionPlan2Clean.ag" #-}
rule563 = \ ((_lhsIoptions) :: Options) _mbAttr attr_ field_ ->
{-# LINE 1170 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton (attrname _lhsIoptions True field_ attr_) _mbAttr
{-# LINE 4346 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule564 #-}
{-# LINE 1416 "src-ag/ExecutionPlan2Clean.ag" #-}
rule564 = \ attr_ field_ rdesc_ ->
{-# LINE 1416 "src-ag/ExecutionPlan2Clean.ag" #-}
case rdesc_ of
Just d -> \x -> "(trace_n " ++ show (d ++ " -> " ++ show field_ ++ "." ++ show attr_) ++ " (" ++ x ++ "))"
Nothing -> id
{-# LINE 4354 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule565 #-}
{-# LINE 1419 "src-ag/ExecutionPlan2Clean.ag" #-}
rule565 = \ _addTrace ((_lhsIoptions) :: Options) attr_ field_ pos_ ->
{-# LINE 1419 "src-ag/ExecutionPlan2Clean.ag" #-}
(pos_, _addTrace $ attrname _lhsIoptions True field_ attr_)
{-# LINE 4360 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# NOINLINE sem_HsToken_HsToken #-}
sem_HsToken_HsToken :: (String) -> (Pos) -> T_HsToken
sem_HsToken_HsToken :: String -> Pos -> T_HsToken
sem_HsToken_HsToken String
arg_value_ Pos
arg_pos_ = Identity T_HsToken_s32 -> T_HsToken
T_HsToken (T_HsToken_s32 -> Identity T_HsToken_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s32
st32) where
{-# NOINLINE st32 #-}
st32 :: T_HsToken_s32
st32 = let
v31 :: T_HsToken_v31
v31 :: T_HsToken_v31
v31 = \ (T_HsToken_vIn31 Options
_lhsIoptions) -> ( let
_lhsOtok :: (Pos,String)
_lhsOtok :: (Pos, String)
_lhsOtok = Pos -> String -> (Pos, String)
forall a b. a -> b -> (a, b)
rule566 Pos
arg_pos_ String
arg_value_
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs = () -> Map String (Maybe NonLocalAttr)
forall k a. () -> Map k a
rule567 ()
__result_ :: T_HsToken_vOut31
__result_ = Map String (Maybe NonLocalAttr)
-> (Pos, String) -> T_HsToken_vOut31
T_HsToken_vOut31 Map String (Maybe NonLocalAttr)
_lhsOattrs (Pos, String)
_lhsOtok
in T_HsToken_vOut31
__result_ )
in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
{-# INLINE rule566 #-}
{-# LINE 1421 "src-ag/ExecutionPlan2Clean.ag" #-}
rule566 = \ pos_ value_ ->
{-# LINE 1421 "src-ag/ExecutionPlan2Clean.ag" #-}
(pos_, value_)
{-# LINE 4380 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule567 #-}
rule567 = \ (_ :: ()) ->
Map.empty
{-# NOINLINE sem_HsToken_CharToken #-}
sem_HsToken_CharToken :: (String) -> (Pos) -> T_HsToken
sem_HsToken_CharToken :: String -> Pos -> T_HsToken
sem_HsToken_CharToken String
arg_value_ Pos
arg_pos_ = Identity T_HsToken_s32 -> T_HsToken
T_HsToken (T_HsToken_s32 -> Identity T_HsToken_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s32
st32) where
{-# NOINLINE st32 #-}
st32 :: T_HsToken_s32
st32 = let
v31 :: T_HsToken_v31
v31 :: T_HsToken_v31
v31 = \ (T_HsToken_vIn31 Options
_lhsIoptions) -> ( let
_lhsOtok :: (Pos,String)
_lhsOtok :: (Pos, String)
_lhsOtok = Pos -> String -> (Pos, String)
forall a. a -> String -> (a, String)
rule568 Pos
arg_pos_ String
arg_value_
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs = () -> Map String (Maybe NonLocalAttr)
forall k a. () -> Map k a
rule569 ()
__result_ :: T_HsToken_vOut31
__result_ = Map String (Maybe NonLocalAttr)
-> (Pos, String) -> T_HsToken_vOut31
T_HsToken_vOut31 Map String (Maybe NonLocalAttr)
_lhsOattrs (Pos, String)
_lhsOtok
in T_HsToken_vOut31
__result_ )
in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
{-# INLINE rule568 #-}
{-# LINE 1423 "src-ag/ExecutionPlan2Clean.ag" #-}
rule568 = \ pos_ value_ ->
{-# LINE 1423 "src-ag/ExecutionPlan2Clean.ag" #-}
(pos_, if null value_
then ""
else showCharShort (head value_)
)
{-# LINE 4406 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule569 #-}
rule569 = \ (_ :: ()) ->
Map.empty
{-# NOINLINE sem_HsToken_StrToken #-}
sem_HsToken_StrToken :: (String) -> (Pos) -> T_HsToken
sem_HsToken_StrToken :: String -> Pos -> T_HsToken
sem_HsToken_StrToken String
arg_value_ Pos
arg_pos_ = Identity T_HsToken_s32 -> T_HsToken
T_HsToken (T_HsToken_s32 -> Identity T_HsToken_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s32
st32) where
{-# NOINLINE st32 #-}
st32 :: T_HsToken_s32
st32 = let
v31 :: T_HsToken_v31
v31 :: T_HsToken_v31
v31 = \ (T_HsToken_vIn31 Options
_lhsIoptions) -> ( let
_lhsOtok :: (Pos,String)
_lhsOtok :: (Pos, String)
_lhsOtok = Pos -> String -> (Pos, String)
forall a. a -> String -> (a, String)
rule570 Pos
arg_pos_ String
arg_value_
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs = () -> Map String (Maybe NonLocalAttr)
forall k a. () -> Map k a
rule571 ()
__result_ :: T_HsToken_vOut31
__result_ = Map String (Maybe NonLocalAttr)
-> (Pos, String) -> T_HsToken_vOut31
T_HsToken_vOut31 Map String (Maybe NonLocalAttr)
_lhsOattrs (Pos, String)
_lhsOtok
in T_HsToken_vOut31
__result_ )
in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
{-# INLINE rule570 #-}
{-# LINE 1428 "src-ag/ExecutionPlan2Clean.ag" #-}
rule570 = \ pos_ value_ ->
{-# LINE 1428 "src-ag/ExecutionPlan2Clean.ag" #-}
(pos_, showStrShort value_)
{-# LINE 4429 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule571 #-}
rule571 = \ (_ :: ()) ->
Map.empty
{-# NOINLINE sem_HsToken_Err #-}
sem_HsToken_Err :: (String) -> (Pos) -> T_HsToken
sem_HsToken_Err :: String -> Pos -> T_HsToken
sem_HsToken_Err String
_ Pos
arg_pos_ = Identity T_HsToken_s32 -> T_HsToken
T_HsToken (T_HsToken_s32 -> Identity T_HsToken_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s32
st32) where
{-# NOINLINE st32 #-}
st32 :: T_HsToken_s32
st32 = let
v31 :: T_HsToken_v31
v31 :: T_HsToken_v31
v31 = \ (T_HsToken_vIn31 Options
_lhsIoptions) -> ( let
_lhsOtok :: (Pos,String)
_lhsOtok :: (Pos, String)
_lhsOtok = Pos -> (Pos, String)
forall a. a -> (a, String)
rule572 Pos
arg_pos_
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs = () -> Map String (Maybe NonLocalAttr)
forall k a. () -> Map k a
rule573 ()
__result_ :: T_HsToken_vOut31
__result_ = Map String (Maybe NonLocalAttr)
-> (Pos, String) -> T_HsToken_vOut31
T_HsToken_vOut31 Map String (Maybe NonLocalAttr)
_lhsOattrs (Pos, String)
_lhsOtok
in T_HsToken_vOut31
__result_ )
in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
{-# INLINE rule572 #-}
{-# LINE 1429 "src-ag/ExecutionPlan2Clean.ag" #-}
rule572 = \ pos_ ->
{-# LINE 1429 "src-ag/ExecutionPlan2Clean.ag" #-}
(pos_, "")
{-# LINE 4452 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule573 #-}
rule573 = \ (_ :: ()) ->
Map.empty
data Inh_HsTokens = Inh_HsTokens { Inh_HsTokens -> Options
options_Inh_HsTokens :: (Options) }
data Syn_HsTokens = Syn_HsTokens { Syn_HsTokens -> [(Pos, String)]
tks_Syn_HsTokens :: ([(Pos,String)]) }
{-# INLINABLE wrap_HsTokens #-}
wrap_HsTokens :: T_HsTokens -> Inh_HsTokens -> (Syn_HsTokens )
wrap_HsTokens :: T_HsTokens -> Inh_HsTokens -> Syn_HsTokens
wrap_HsTokens (T_HsTokens Identity T_HsTokens_s35
act) (Inh_HsTokens Options
_lhsIoptions) =
Identity Syn_HsTokens -> Syn_HsTokens
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_HsTokens_s35
sem <- Identity T_HsTokens_s35
act
let arg34 :: T_HsTokens_vIn34
arg34 = Options -> T_HsTokens_vIn34
T_HsTokens_vIn34 Options
_lhsIoptions
(T_HsTokens_vOut34 [(Pos, String)]
_lhsOtks) <- T_HsTokens_vOut34 -> Identity T_HsTokens_vOut34
forall (m :: * -> *) a. Monad m => a -> m a
return (T_HsTokens_s35 -> T_HsTokens_v34
inv_HsTokens_s35 T_HsTokens_s35
sem T_HsTokens_vIn34
arg34)
Syn_HsTokens -> Identity Syn_HsTokens
forall (m :: * -> *) a. Monad m => a -> m a
return ([(Pos, String)] -> Syn_HsTokens
Syn_HsTokens [(Pos, String)]
_lhsOtks)
)
{-# NOINLINE sem_HsTokens #-}
sem_HsTokens :: HsTokens -> T_HsTokens
sem_HsTokens :: [HsToken] -> T_HsTokens
sem_HsTokens [HsToken]
list = (T_HsToken -> T_HsTokens -> T_HsTokens)
-> T_HsTokens -> [T_HsToken] -> T_HsTokens
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_HsToken -> T_HsTokens -> T_HsTokens
sem_HsTokens_Cons T_HsTokens
sem_HsTokens_Nil ((HsToken -> T_HsToken) -> [HsToken] -> [T_HsToken]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map HsToken -> T_HsToken
sem_HsToken [HsToken]
list)
newtype T_HsTokens = T_HsTokens {
T_HsTokens -> Identity T_HsTokens_s35
attach_T_HsTokens :: Identity (T_HsTokens_s35 )
}
newtype T_HsTokens_s35 = C_HsTokens_s35 {
T_HsTokens_s35 -> T_HsTokens_v34
inv_HsTokens_s35 :: (T_HsTokens_v34 )
}
data T_HsTokens_s36 = C_HsTokens_s36
type T_HsTokens_v34 = (T_HsTokens_vIn34 ) -> (T_HsTokens_vOut34 )
data T_HsTokens_vIn34 = T_HsTokens_vIn34 (Options)
data T_HsTokens_vOut34 = T_HsTokens_vOut34 ([(Pos,String)])
{-# NOINLINE sem_HsTokens_Cons #-}
sem_HsTokens_Cons :: T_HsToken -> T_HsTokens -> T_HsTokens
sem_HsTokens_Cons :: T_HsToken -> T_HsTokens -> T_HsTokens
sem_HsTokens_Cons T_HsToken
arg_hd_ T_HsTokens
arg_tl_ = Identity T_HsTokens_s35 -> T_HsTokens
T_HsTokens (T_HsTokens_s35 -> Identity T_HsTokens_s35
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsTokens_s35
st35) where
{-# NOINLINE st35 #-}
st35 :: T_HsTokens_s35
st35 = let
v34 :: T_HsTokens_v34
v34 :: T_HsTokens_v34
v34 = \ (T_HsTokens_vIn34 Options
_lhsIoptions) -> ( let
_hdX32 :: T_HsToken_s32
_hdX32 = Identity T_HsToken_s32 -> T_HsToken_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_HsToken -> Identity T_HsToken_s32
attach_T_HsToken (T_HsToken
arg_hd_))
_tlX35 :: T_HsTokens_s35
_tlX35 = Identity T_HsTokens_s35 -> T_HsTokens_s35
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_HsTokens -> Identity T_HsTokens_s35
attach_T_HsTokens (T_HsTokens
arg_tl_))
(T_HsToken_vOut31 Map String (Maybe NonLocalAttr)
_hdIattrs (Pos, String)
_hdItok) = T_HsToken_s32 -> T_HsToken_v31
inv_HsToken_s32 T_HsToken_s32
_hdX32 (Options -> T_HsToken_vIn31
T_HsToken_vIn31 Options
_hdOoptions)
(T_HsTokens_vOut34 [(Pos, String)]
_tlItks) = T_HsTokens_s35 -> T_HsTokens_v34
inv_HsTokens_s35 T_HsTokens_s35
_tlX35 (Options -> T_HsTokens_vIn34
T_HsTokens_vIn34 Options
_tlOoptions)
_lhsOtks :: [(Pos,String)]
_lhsOtks :: [(Pos, String)]
_lhsOtks = (Pos, String) -> [(Pos, String)] -> [(Pos, String)]
rule574 (Pos, String)
_hdItok [(Pos, String)]
_tlItks
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule575 Options
_lhsIoptions
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule576 Options
_lhsIoptions
__result_ :: T_HsTokens_vOut34
__result_ = [(Pos, String)] -> T_HsTokens_vOut34
T_HsTokens_vOut34 [(Pos, String)]
_lhsOtks
in T_HsTokens_vOut34
__result_ )
in T_HsTokens_v34 -> T_HsTokens_s35
C_HsTokens_s35 T_HsTokens_v34
v34
{-# INLINE rule574 #-}
{-# LINE 1408 "src-ag/ExecutionPlan2Clean.ag" #-}
rule574 = \ ((_hdItok) :: (Pos,String)) ((_tlItks) :: [(Pos,String)]) ->
{-# LINE 1408 "src-ag/ExecutionPlan2Clean.ag" #-}
_hdItok : _tlItks
{-# LINE 4510 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule575 #-}
rule575 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule576 #-}
rule576 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_HsTokens_Nil #-}
sem_HsTokens_Nil :: T_HsTokens
sem_HsTokens_Nil :: T_HsTokens
sem_HsTokens_Nil = Identity T_HsTokens_s35 -> T_HsTokens
T_HsTokens (T_HsTokens_s35 -> Identity T_HsTokens_s35
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsTokens_s35
st35) where
{-# NOINLINE st35 #-}
st35 :: T_HsTokens_s35
st35 = let
v34 :: T_HsTokens_v34
v34 :: T_HsTokens_v34
v34 = \ (T_HsTokens_vIn34 Options
_lhsIoptions) -> ( let
_lhsOtks :: [(Pos,String)]
_lhsOtks :: [(Pos, String)]
_lhsOtks = () -> [(Pos, String)]
forall a. () -> [a]
rule577 ()
__result_ :: T_HsTokens_vOut34
__result_ = [(Pos, String)] -> T_HsTokens_vOut34
T_HsTokens_vOut34 [(Pos, String)]
_lhsOtks
in T_HsTokens_vOut34
__result_ )
in T_HsTokens_v34 -> T_HsTokens_s35
C_HsTokens_s35 T_HsTokens_v34
v34
{-# INLINE rule577 #-}
{-# LINE 1409 "src-ag/ExecutionPlan2Clean.ag" #-}
rule577 = \ (_ :: ()) ->
{-# LINE 1409 "src-ag/ExecutionPlan2Clean.ag" #-}
[]
{-# LINE 4534 "src-generated/ExecutionPlan2Clean.hs" #-}
data Inh_HsTokensRoot = Inh_HsTokensRoot { Inh_HsTokensRoot -> Options
options_Inh_HsTokensRoot :: (Options) }
data Syn_HsTokensRoot = Syn_HsTokensRoot { }
{-# INLINABLE wrap_HsTokensRoot #-}
wrap_HsTokensRoot :: T_HsTokensRoot -> Inh_HsTokensRoot -> (Syn_HsTokensRoot )
wrap_HsTokensRoot :: T_HsTokensRoot -> Inh_HsTokensRoot -> Syn_HsTokensRoot
wrap_HsTokensRoot (T_HsTokensRoot Identity T_HsTokensRoot_s38
act) (Inh_HsTokensRoot Options
_lhsIoptions) =
Identity Syn_HsTokensRoot -> Syn_HsTokensRoot
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_HsTokensRoot_s38
sem <- Identity T_HsTokensRoot_s38
act
let arg37 :: T_HsTokensRoot_vIn37
arg37 = Options -> T_HsTokensRoot_vIn37
T_HsTokensRoot_vIn37 Options
_lhsIoptions
(T_HsTokensRoot_vOut37
T_HsTokensRoot_vOut37 ) <- T_HsTokensRoot_vOut37 -> Identity T_HsTokensRoot_vOut37
forall (m :: * -> *) a. Monad m => a -> m a
return (T_HsTokensRoot_s38 -> T_HsTokensRoot_v37
inv_HsTokensRoot_s38 T_HsTokensRoot_s38
sem T_HsTokensRoot_vIn37
arg37)
Syn_HsTokensRoot -> Identity Syn_HsTokensRoot
forall (m :: * -> *) a. Monad m => a -> m a
return (Syn_HsTokensRoot
Syn_HsTokensRoot )
)
{-# INLINE sem_HsTokensRoot #-}
sem_HsTokensRoot :: HsTokensRoot -> T_HsTokensRoot
sem_HsTokensRoot :: HsTokensRoot -> T_HsTokensRoot
sem_HsTokensRoot ( HsTokensRoot [HsToken]
tokens_ ) = T_HsTokens -> T_HsTokensRoot
sem_HsTokensRoot_HsTokensRoot ( [HsToken] -> T_HsTokens
sem_HsTokens [HsToken]
tokens_ )
newtype T_HsTokensRoot = T_HsTokensRoot {
T_HsTokensRoot -> Identity T_HsTokensRoot_s38
attach_T_HsTokensRoot :: Identity (T_HsTokensRoot_s38 )
}
newtype T_HsTokensRoot_s38 = C_HsTokensRoot_s38 {
T_HsTokensRoot_s38 -> T_HsTokensRoot_v37
inv_HsTokensRoot_s38 :: (T_HsTokensRoot_v37 )
}
data T_HsTokensRoot_s39 = C_HsTokensRoot_s39
type T_HsTokensRoot_v37 = (T_HsTokensRoot_vIn37 ) -> (T_HsTokensRoot_vOut37 )
data T_HsTokensRoot_vIn37 = T_HsTokensRoot_vIn37 (Options)
data T_HsTokensRoot_vOut37 = T_HsTokensRoot_vOut37
{-# NOINLINE sem_HsTokensRoot_HsTokensRoot #-}
sem_HsTokensRoot_HsTokensRoot :: T_HsTokens -> T_HsTokensRoot
sem_HsTokensRoot_HsTokensRoot :: T_HsTokens -> T_HsTokensRoot
sem_HsTokensRoot_HsTokensRoot T_HsTokens
arg_tokens_ = Identity T_HsTokensRoot_s38 -> T_HsTokensRoot
T_HsTokensRoot (T_HsTokensRoot_s38 -> Identity T_HsTokensRoot_s38
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsTokensRoot_s38
st38) where
{-# NOINLINE st38 #-}
st38 :: T_HsTokensRoot_s38
st38 = let
v37 :: T_HsTokensRoot_v37
v37 :: T_HsTokensRoot_v37
v37 = \ (T_HsTokensRoot_vIn37 Options
_lhsIoptions) -> ( let
_tokensX35 :: T_HsTokens_s35
_tokensX35 = Identity T_HsTokens_s35 -> T_HsTokens_s35
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_HsTokens -> Identity T_HsTokens_s35
attach_T_HsTokens (T_HsTokens
arg_tokens_))
(T_HsTokens_vOut34 [(Pos, String)]
_tokensItks) = T_HsTokens_s35 -> T_HsTokens_v34
inv_HsTokens_s35 T_HsTokens_s35
_tokensX35 (Options -> T_HsTokens_vIn34
T_HsTokens_vIn34 Options
_tokensOoptions)
_tokensOoptions :: Options
_tokensOoptions = Options -> Options
rule578 Options
_lhsIoptions
__result_ :: T_HsTokensRoot_vOut37
__result_ = T_HsTokensRoot_vOut37
T_HsTokensRoot_vOut37
in T_HsTokensRoot_vOut37
__result_ )
in T_HsTokensRoot_v37 -> T_HsTokensRoot_s38
C_HsTokensRoot_s38 T_HsTokensRoot_v37
v37
{-# INLINE rule578 #-}
rule578 :: Options -> Options
rule578 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
data Inh_Pattern = Inh_Pattern { Inh_Pattern -> Map Identifier Attributes
allInhmap_Inh_Pattern :: (Map NontermIdent Attributes), Inh_Pattern -> Map Identifier Attributes
allSynmap_Inh_Pattern :: (Map NontermIdent Attributes), Inh_Pattern -> Bool
anyLazyKind_Inh_Pattern :: (Bool), Inh_Pattern -> Attributes
inhmap_Inh_Pattern :: (Attributes), Inh_Pattern -> Attributes
localAttrTypes_Inh_Pattern :: (Map Identifier Type), Inh_Pattern -> Options
options_Inh_Pattern :: (Options), Inh_Pattern -> Attributes
synmap_Inh_Pattern :: (Attributes) }
data Syn_Pattern = Syn_Pattern { Syn_Pattern -> PP_Doc
attrTypes_Syn_Pattern :: (PP_Doc), Syn_Pattern -> Set String
attrs_Syn_Pattern :: (Set String), Syn_Pattern -> Pattern
copy_Syn_Pattern :: (Pattern), Syn_Pattern -> Bool
isUnderscore_Syn_Pattern :: (Bool), Syn_Pattern -> PP_Doc
sem_lhs_Syn_Pattern :: ( PP_Doc ) }
{-# INLINABLE wrap_Pattern #-}
wrap_Pattern :: T_Pattern -> Inh_Pattern -> (Syn_Pattern )
wrap_Pattern :: T_Pattern -> Inh_Pattern -> Syn_Pattern
wrap_Pattern (T_Pattern Identity T_Pattern_s41
act) (Inh_Pattern Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) =
Identity Syn_Pattern -> Syn_Pattern
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_Pattern_s41
sem <- Identity T_Pattern_s41
act
let arg40 :: T_Pattern_vIn40
arg40 = Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Pattern_vIn40
T_Pattern_vIn40 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap
(T_Pattern_vOut40 PP_Doc
_lhsOattrTypes Set String
_lhsOattrs Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOsem_lhs) <- T_Pattern_vOut40 -> Identity T_Pattern_vOut40
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
sem T_Pattern_vIn40
arg40)
Syn_Pattern -> Identity Syn_Pattern
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Set String -> Pattern -> Bool -> PP_Doc -> Syn_Pattern
Syn_Pattern PP_Doc
_lhsOattrTypes Set String
_lhsOattrs Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOsem_lhs)
)
{-# NOINLINE sem_Pattern #-}
sem_Pattern :: Pattern -> T_Pattern
sem_Pattern :: Pattern -> T_Pattern
sem_Pattern ( Constr Identifier
name_ Patterns
pats_ ) = Identifier -> T_Patterns -> T_Pattern
sem_Pattern_Constr Identifier
name_ ( Patterns -> T_Patterns
sem_Patterns Patterns
pats_ )
sem_Pattern ( Product Pos
pos_ Patterns
pats_ ) = Pos -> T_Patterns -> T_Pattern
sem_Pattern_Product Pos
pos_ ( Patterns -> T_Patterns
sem_Patterns Patterns
pats_ )
sem_Pattern ( Alias Identifier
field_ Identifier
attr_ Pattern
pat_ ) = Identifier -> Identifier -> T_Pattern -> T_Pattern
sem_Pattern_Alias Identifier
field_ Identifier
attr_ ( Pattern -> T_Pattern
sem_Pattern Pattern
pat_ )
sem_Pattern ( Irrefutable Pattern
pat_ ) = T_Pattern -> T_Pattern
sem_Pattern_Irrefutable ( Pattern -> T_Pattern
sem_Pattern Pattern
pat_ )
sem_Pattern ( Underscore Pos
pos_ ) = Pos -> T_Pattern
sem_Pattern_Underscore Pos
pos_
newtype T_Pattern = T_Pattern {
T_Pattern -> Identity T_Pattern_s41
attach_T_Pattern :: Identity (T_Pattern_s41 )
}
newtype T_Pattern_s41 = C_Pattern_s41 {
T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 :: (T_Pattern_v40 )
}
data T_Pattern_s42 = C_Pattern_s42
type T_Pattern_v40 = (T_Pattern_vIn40 ) -> (T_Pattern_vOut40 )
data T_Pattern_vIn40 = T_Pattern_vIn40 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Bool) (Attributes) (Map Identifier Type) (Options) (Attributes)
data T_Pattern_vOut40 = T_Pattern_vOut40 (PP_Doc) (Set String) (Pattern) (Bool) ( PP_Doc )
{-# NOINLINE sem_Pattern_Constr #-}
sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns -> T_Pattern
sem_Pattern_Constr :: Identifier -> T_Patterns -> T_Pattern
sem_Pattern_Constr Identifier
arg_name_ T_Patterns
arg_pats_ = Identity T_Pattern_s41 -> T_Pattern
T_Pattern (T_Pattern_s41 -> Identity T_Pattern_s41
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s41
st41) where
{-# NOINLINE st41 #-}
st41 :: T_Pattern_s41
st41 = let
v40 :: T_Pattern_v40
v40 :: T_Pattern_v40
v40 = \ (T_Pattern_vIn40 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) -> ( let
_patsX44 :: T_Patterns_s44
_patsX44 = Identity T_Patterns_s44 -> T_Patterns_s44
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s44
attach_T_Patterns (T_Patterns
arg_pats_))
(T_Patterns_vOut43 PP_Doc
_patsIattrTypes Set String
_patsIattrs Patterns
_patsIcopy [PP_Doc]
_patsIsem_lhs) = T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
_patsX44 (Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Patterns_vIn43
T_Patterns_vIn43 Map Identifier Attributes
_patsOallInhmap Map Identifier Attributes
_patsOallSynmap Bool
_patsOanyLazyKind Attributes
_patsOinhmap Attributes
_patsOlocalAttrTypes Options
_patsOoptions Attributes
_patsOsynmap)
_lhsOsem_lhs :: PP_Doc
_lhsOsem_lhs :: PP_Doc
_lhsOsem_lhs = (PP_Doc -> PP_Doc) -> [PP_Doc] -> Identifier -> PP_Doc
forall t. (PP_Doc -> t) -> [PP_Doc] -> Identifier -> t
rule579 PP_Doc -> PP_Doc
_addbang1 [PP_Doc]
_patsIsem_lhs Identifier
arg_name_
_lhsOisUnderscore :: Bool
_lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule580 ()
_addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule581 Options
_lhsIoptions
_addbang1 :: PP_Doc -> PP_Doc
_addbang1 = (PP_Doc -> PP_Doc) -> Bool -> PP_Doc -> PP_Doc
forall a. (a -> a) -> Bool -> a -> a
rule582 PP_Doc -> PP_Doc
_addbang Bool
_lhsIanyLazyKind
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes = PP_Doc -> PP_Doc
rule583 PP_Doc
_patsIattrTypes
_lhsOattrs :: Set String
_lhsOattrs :: Set String
_lhsOattrs = Set String -> Set String
rule584 Set String
_patsIattrs
_copy :: Pattern
_copy = Patterns -> Identifier -> Pattern
rule585 Patterns
_patsIcopy Identifier
arg_name_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule586 Pattern
_copy
_patsOallInhmap :: Map Identifier Attributes
_patsOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule587 Map Identifier Attributes
_lhsIallInhmap
_patsOallSynmap :: Map Identifier Attributes
_patsOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule588 Map Identifier Attributes
_lhsIallSynmap
_patsOanyLazyKind :: Bool
_patsOanyLazyKind = Bool -> Bool
rule589 Bool
_lhsIanyLazyKind
_patsOinhmap :: Attributes
_patsOinhmap = Attributes -> Attributes
rule590 Attributes
_lhsIinhmap
_patsOlocalAttrTypes :: Attributes
_patsOlocalAttrTypes = Attributes -> Attributes
rule591 Attributes
_lhsIlocalAttrTypes
_patsOoptions :: Options
_patsOoptions = Options -> Options
rule592 Options
_lhsIoptions
_patsOsynmap :: Attributes
_patsOsynmap = Attributes -> Attributes
rule593 Attributes
_lhsIsynmap
__result_ :: T_Pattern_vOut40
__result_ = PP_Doc
-> Set String -> Pattern -> Bool -> PP_Doc -> T_Pattern_vOut40
T_Pattern_vOut40 PP_Doc
_lhsOattrTypes Set String
_lhsOattrs Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOsem_lhs
in T_Pattern_vOut40
__result_ )
in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
{-# INLINE rule579 #-}
{-# LINE 1134 "src-ag/ExecutionPlan2Clean.ag" #-}
rule579 = \ _addbang1 ((_patsIsem_lhs) :: [PP_Doc]) name_ ->
{-# LINE 1134 "src-ag/ExecutionPlan2Clean.ag" #-}
_addbang1 $ pp_parens $ name_ >#< hv_sp _patsIsem_lhs
{-# LINE 4654 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule580 #-}
{-# LINE 1141 "src-ag/ExecutionPlan2Clean.ag" #-}
rule580 = \ (_ :: ()) ->
{-# LINE 1141 "src-ag/ExecutionPlan2Clean.ag" #-}
False
{-# LINE 4660 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule581 #-}
{-# LINE 1571 "src-ag/ExecutionPlan2Clean.ag" #-}
rule581 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 1571 "src-ag/ExecutionPlan2Clean.ag" #-}
\x -> if bangpats _lhsIoptions then "!" >|< x else x
{-# LINE 4666 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule582 #-}
{-# LINE 1576 "src-ag/ExecutionPlan2Clean.ag" #-}
rule582 = \ _addbang ((_lhsIanyLazyKind) :: Bool) ->
{-# LINE 1576 "src-ag/ExecutionPlan2Clean.ag" #-}
if _lhsIanyLazyKind then id else _addbang
{-# LINE 4672 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule583 #-}
rule583 = \ ((_patsIattrTypes) :: PP_Doc) ->
_patsIattrTypes
{-# INLINE rule584 #-}
rule584 = \ ((_patsIattrs) :: Set String) ->
_patsIattrs
{-# INLINE rule585 #-}
rule585 = \ ((_patsIcopy) :: Patterns) name_ ->
Constr name_ _patsIcopy
{-# INLINE rule586 #-}
rule586 = \ _copy ->
_copy
{-# INLINE rule587 #-}
rule587 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule588 #-}
rule588 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule589 #-}
rule589 = \ ((_lhsIanyLazyKind) :: Bool) ->
_lhsIanyLazyKind
{-# INLINE rule590 #-}
rule590 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule591 #-}
rule591 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->
_lhsIlocalAttrTypes
{-# INLINE rule592 #-}
rule592 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule593 #-}
rule593 = \ ((_lhsIsynmap) :: Attributes) ->
_lhsIsynmap
{-# NOINLINE sem_Pattern_Product #-}
sem_Pattern_Product :: (Pos) -> T_Patterns -> T_Pattern
sem_Pattern_Product :: Pos -> T_Patterns -> T_Pattern
sem_Pattern_Product Pos
arg_pos_ T_Patterns
arg_pats_ = Identity T_Pattern_s41 -> T_Pattern
T_Pattern (T_Pattern_s41 -> Identity T_Pattern_s41
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s41
st41) where
{-# NOINLINE st41 #-}
st41 :: T_Pattern_s41
st41 = let
v40 :: T_Pattern_v40
v40 :: T_Pattern_v40
v40 = \ (T_Pattern_vIn40 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) -> ( let
_patsX44 :: T_Patterns_s44
_patsX44 = Identity T_Patterns_s44 -> T_Patterns_s44
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s44
attach_T_Patterns (T_Patterns
arg_pats_))
(T_Patterns_vOut43 PP_Doc
_patsIattrTypes Set String
_patsIattrs Patterns
_patsIcopy [PP_Doc]
_patsIsem_lhs) = T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
_patsX44 (Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Patterns_vIn43
T_Patterns_vIn43 Map Identifier Attributes
_patsOallInhmap Map Identifier Attributes
_patsOallSynmap Bool
_patsOanyLazyKind Attributes
_patsOinhmap Attributes
_patsOlocalAttrTypes Options
_patsOoptions Attributes
_patsOsynmap)
_lhsOsem_lhs :: PP_Doc
_lhsOsem_lhs :: PP_Doc
_lhsOsem_lhs = (PP_Doc -> PP_Doc) -> [PP_Doc] -> PP_Doc
forall t. (PP_Doc -> t) -> [PP_Doc] -> t
rule594 PP_Doc -> PP_Doc
_addbang1 [PP_Doc]
_patsIsem_lhs
_lhsOisUnderscore :: Bool
_lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule595 ()
_addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule596 Options
_lhsIoptions
_addbang1 :: PP_Doc -> PP_Doc
_addbang1 = (PP_Doc -> PP_Doc) -> Bool -> PP_Doc -> PP_Doc
forall a. (a -> a) -> Bool -> a -> a
rule597 PP_Doc -> PP_Doc
_addbang Bool
_lhsIanyLazyKind
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes = PP_Doc -> PP_Doc
rule598 PP_Doc
_patsIattrTypes
_lhsOattrs :: Set String
_lhsOattrs :: Set String
_lhsOattrs = Set String -> Set String
rule599 Set String
_patsIattrs
_copy :: Pattern
_copy = Patterns -> Pos -> Pattern
rule600 Patterns
_patsIcopy Pos
arg_pos_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule601 Pattern
_copy
_patsOallInhmap :: Map Identifier Attributes
_patsOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule602 Map Identifier Attributes
_lhsIallInhmap
_patsOallSynmap :: Map Identifier Attributes
_patsOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule603 Map Identifier Attributes
_lhsIallSynmap
_patsOanyLazyKind :: Bool
_patsOanyLazyKind = Bool -> Bool
rule604 Bool
_lhsIanyLazyKind
_patsOinhmap :: Attributes
_patsOinhmap = Attributes -> Attributes
rule605 Attributes
_lhsIinhmap
_patsOlocalAttrTypes :: Attributes
_patsOlocalAttrTypes = Attributes -> Attributes
rule606 Attributes
_lhsIlocalAttrTypes
_patsOoptions :: Options
_patsOoptions = Options -> Options
rule607 Options
_lhsIoptions
_patsOsynmap :: Attributes
_patsOsynmap = Attributes -> Attributes
rule608 Attributes
_lhsIsynmap
__result_ :: T_Pattern_vOut40
__result_ = PP_Doc
-> Set String -> Pattern -> Bool -> PP_Doc -> T_Pattern_vOut40
T_Pattern_vOut40 PP_Doc
_lhsOattrTypes Set String
_lhsOattrs Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOsem_lhs
in T_Pattern_vOut40
__result_ )
in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
{-# INLINE rule594 #-}
{-# LINE 1133 "src-ag/ExecutionPlan2Clean.ag" #-}
rule594 = \ _addbang1 ((_patsIsem_lhs) :: [PP_Doc]) ->
{-# LINE 1133 "src-ag/ExecutionPlan2Clean.ag" #-}
_addbang1 $ pp_block "(" ")" "," _patsIsem_lhs
{-# LINE 4743 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule595 #-}
{-# LINE 1142 "src-ag/ExecutionPlan2Clean.ag" #-}
rule595 = \ (_ :: ()) ->
{-# LINE 1142 "src-ag/ExecutionPlan2Clean.ag" #-}
False
{-# LINE 4749 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule596 #-}
{-# LINE 1571 "src-ag/ExecutionPlan2Clean.ag" #-}
rule596 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 1571 "src-ag/ExecutionPlan2Clean.ag" #-}
\x -> if bangpats _lhsIoptions then "!" >|< x else x
{-# LINE 4755 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule597 #-}
{-# LINE 1576 "src-ag/ExecutionPlan2Clean.ag" #-}
rule597 = \ _addbang ((_lhsIanyLazyKind) :: Bool) ->
{-# LINE 1576 "src-ag/ExecutionPlan2Clean.ag" #-}
if _lhsIanyLazyKind then id else _addbang
{-# LINE 4761 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule598 #-}
rule598 = \ ((_patsIattrTypes) :: PP_Doc) ->
_patsIattrTypes
{-# INLINE rule599 #-}
rule599 = \ ((_patsIattrs) :: Set String) ->
_patsIattrs
{-# INLINE rule600 #-}
rule600 = \ ((_patsIcopy) :: Patterns) pos_ ->
Product pos_ _patsIcopy
{-# INLINE rule601 #-}
rule601 = \ _copy ->
_copy
{-# INLINE rule602 #-}
rule602 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule603 #-}
rule603 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule604 #-}
rule604 = \ ((_lhsIanyLazyKind) :: Bool) ->
_lhsIanyLazyKind
{-# INLINE rule605 #-}
rule605 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule606 #-}
rule606 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->
_lhsIlocalAttrTypes
{-# INLINE rule607 #-}
rule607 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule608 #-}
rule608 = \ ((_lhsIsynmap) :: Attributes) ->
_lhsIsynmap
{-# NOINLINE sem_Pattern_Alias #-}
sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern -> T_Pattern
sem_Pattern_Alias :: Identifier -> Identifier -> T_Pattern -> T_Pattern
sem_Pattern_Alias Identifier
arg_field_ Identifier
arg_attr_ T_Pattern
arg_pat_ = Identity T_Pattern_s41 -> T_Pattern
T_Pattern (T_Pattern_s41 -> Identity T_Pattern_s41
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s41
st41) where
{-# NOINLINE st41 #-}
st41 :: T_Pattern_s41
st41 = let
v40 :: T_Pattern_v40
v40 :: T_Pattern_v40
v40 = \ (T_Pattern_vIn40 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) -> ( let
_patX41 :: T_Pattern_s41
_patX41 = Identity T_Pattern_s41 -> T_Pattern_s41
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s41
attach_T_Pattern (T_Pattern
arg_pat_))
(T_Pattern_vOut40 PP_Doc
_patIattrTypes Set String
_patIattrs Pattern
_patIcopy Bool
_patIisUnderscore PP_Doc
_patIsem_lhs) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_patX41 (Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Pattern_vIn40
T_Pattern_vIn40 Map Identifier Attributes
_patOallInhmap Map Identifier Attributes
_patOallSynmap Bool
_patOanyLazyKind Attributes
_patOinhmap Attributes
_patOlocalAttrTypes Options
_patOoptions Attributes
_patOsynmap)
_varPat :: PP_Doc
_varPat = Options -> Identifier -> Identifier -> PP_Doc
rule609 Options
_lhsIoptions Identifier
arg_attr_ Identifier
arg_field_
_patExpr :: PP_Doc
_patExpr = Bool -> PP_Doc -> PP_Doc -> PP_Doc
rule610 Bool
_patIisUnderscore PP_Doc
_patIsem_lhs PP_Doc
_varPat
_lhsOsem_lhs :: PP_Doc
_lhsOsem_lhs :: PP_Doc
_lhsOsem_lhs = (PP_Doc -> PP_Doc) -> PP_Doc -> PP_Doc
forall t t. (t -> t) -> t -> t
rule611 PP_Doc -> PP_Doc
_addbang1 PP_Doc
_patExpr
_lhsOisUnderscore :: Bool
_lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule612 ()
_lhsOattrs :: Set String
_lhsOattrs :: Set String
_lhsOattrs = Options -> Set String -> Identifier -> Identifier -> Set String
rule613 Options
_lhsIoptions Set String
_patIattrs Identifier
arg_attr_ Identifier
arg_field_
_mbTp :: Maybe Type
_mbTp = Attributes -> Attributes -> Identifier -> Identifier -> Maybe Type
rule614 Attributes
_lhsIlocalAttrTypes Attributes
_lhsIsynmap Identifier
arg_attr_ Identifier
arg_field_
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes = () -> PP_Doc
rule615 ()
_addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule616 Options
_lhsIoptions
_addbang1 :: PP_Doc -> PP_Doc
_addbang1 = (PP_Doc -> PP_Doc) -> Bool -> PP_Doc -> PP_Doc
forall a. (a -> a) -> Bool -> a -> a
rule617 PP_Doc -> PP_Doc
_addbang Bool
_lhsIanyLazyKind
_copy :: Pattern
_copy = Pattern -> Identifier -> Identifier -> Pattern
rule618 Pattern
_patIcopy Identifier
arg_attr_ Identifier
arg_field_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule619 Pattern
_copy
_patOallInhmap :: Map Identifier Attributes
_patOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule620 Map Identifier Attributes
_lhsIallInhmap
_patOallSynmap :: Map Identifier Attributes
_patOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule621 Map Identifier Attributes
_lhsIallSynmap
_patOanyLazyKind :: Bool
_patOanyLazyKind = Bool -> Bool
rule622 Bool
_lhsIanyLazyKind
_patOinhmap :: Attributes
_patOinhmap = Attributes -> Attributes
rule623 Attributes
_lhsIinhmap
_patOlocalAttrTypes :: Attributes
_patOlocalAttrTypes = Attributes -> Attributes
rule624 Attributes
_lhsIlocalAttrTypes
_patOoptions :: Options
_patOoptions = Options -> Options
rule625 Options
_lhsIoptions
_patOsynmap :: Attributes
_patOsynmap = Attributes -> Attributes
rule626 Attributes
_lhsIsynmap
__result_ :: T_Pattern_vOut40
__result_ = PP_Doc
-> Set String -> Pattern -> Bool -> PP_Doc -> T_Pattern_vOut40
T_Pattern_vOut40 PP_Doc
_lhsOattrTypes Set String
_lhsOattrs Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOsem_lhs
in T_Pattern_vOut40
__result_ )
in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
{-# INLINE rule609 #-}
{-# LINE 1128 "src-ag/ExecutionPlan2Clean.ag" #-}
rule609 = \ ((_lhsIoptions) :: Options) attr_ field_ ->
{-# LINE 1128 "src-ag/ExecutionPlan2Clean.ag" #-}
text $ attrname _lhsIoptions False field_ attr_
{-# LINE 4835 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule610 #-}
{-# LINE 1129 "src-ag/ExecutionPlan2Clean.ag" #-}
rule610 = \ ((_patIisUnderscore) :: Bool) ((_patIsem_lhs) :: PP_Doc ) _varPat ->
{-# LINE 1129 "src-ag/ExecutionPlan2Clean.ag" #-}
if _patIisUnderscore
then _varPat
else _varPat >|< "@" >|< _patIsem_lhs
{-# LINE 4843 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule611 #-}
{-# LINE 1132 "src-ag/ExecutionPlan2Clean.ag" #-}
rule611 = \ _addbang1 _patExpr ->
{-# LINE 1132 "src-ag/ExecutionPlan2Clean.ag" #-}
_addbang1 _patExpr
{-# LINE 4849 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule612 #-}
{-# LINE 1143 "src-ag/ExecutionPlan2Clean.ag" #-}
rule612 = \ (_ :: ()) ->
{-# LINE 1143 "src-ag/ExecutionPlan2Clean.ag" #-}
False
{-# LINE 4855 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule613 #-}
{-# LINE 1149 "src-ag/ExecutionPlan2Clean.ag" #-}
rule613 = \ ((_lhsIoptions) :: Options) ((_patIattrs) :: Set String) attr_ field_ ->
{-# LINE 1149 "src-ag/ExecutionPlan2Clean.ag" #-}
Set.insert (attrname _lhsIoptions False field_ attr_) _patIattrs
{-# LINE 4861 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule614 #-}
{-# LINE 1154 "src-ag/ExecutionPlan2Clean.ag" #-}
rule614 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ((_lhsIsynmap) :: Attributes) attr_ field_ ->
{-# LINE 1154 "src-ag/ExecutionPlan2Clean.ag" #-}
if field_ == _LHS
then Map.lookup attr_ _lhsIsynmap
else if field_ == _LOC
then Map.lookup attr_ _lhsIlocalAttrTypes
else Nothing
{-# LINE 4871 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule615 #-}
{-# LINE 1159 "src-ag/ExecutionPlan2Clean.ag" #-}
rule615 = \ (_ :: ()) ->
{-# LINE 1159 "src-ag/ExecutionPlan2Clean.ag" #-}
empty
{-# LINE 4877 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule616 #-}
{-# LINE 1571 "src-ag/ExecutionPlan2Clean.ag" #-}
rule616 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 1571 "src-ag/ExecutionPlan2Clean.ag" #-}
\x -> if bangpats _lhsIoptions then "!" >|< x else x
{-# LINE 4883 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule617 #-}
{-# LINE 1576 "src-ag/ExecutionPlan2Clean.ag" #-}
rule617 = \ _addbang ((_lhsIanyLazyKind) :: Bool) ->
{-# LINE 1576 "src-ag/ExecutionPlan2Clean.ag" #-}
if _lhsIanyLazyKind then id else _addbang
{-# LINE 4889 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule618 #-}
rule618 = \ ((_patIcopy) :: Pattern) attr_ field_ ->
Alias field_ attr_ _patIcopy
{-# INLINE rule619 #-}
rule619 = \ _copy ->
_copy
{-# INLINE rule620 #-}
rule620 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule621 #-}
rule621 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule622 #-}
rule622 = \ ((_lhsIanyLazyKind) :: Bool) ->
_lhsIanyLazyKind
{-# INLINE rule623 #-}
rule623 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule624 #-}
rule624 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->
_lhsIlocalAttrTypes
{-# INLINE rule625 #-}
rule625 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule626 #-}
rule626 = \ ((_lhsIsynmap) :: Attributes) ->
_lhsIsynmap
{-# NOINLINE sem_Pattern_Irrefutable #-}
sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern
sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern
sem_Pattern_Irrefutable T_Pattern
arg_pat_ = Identity T_Pattern_s41 -> T_Pattern
T_Pattern (T_Pattern_s41 -> Identity T_Pattern_s41
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s41
st41) where
{-# NOINLINE st41 #-}
st41 :: T_Pattern_s41
st41 = let
v40 :: T_Pattern_v40
v40 :: T_Pattern_v40
v40 = \ (T_Pattern_vIn40 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) -> ( let
_patX41 :: T_Pattern_s41
_patX41 = Identity T_Pattern_s41 -> T_Pattern_s41
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s41
attach_T_Pattern (T_Pattern
arg_pat_))
(T_Pattern_vOut40 PP_Doc
_patIattrTypes Set String
_patIattrs Pattern
_patIcopy Bool
_patIisUnderscore PP_Doc
_patIsem_lhs) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_patX41 (Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Pattern_vIn40
T_Pattern_vIn40 Map Identifier Attributes
_patOallInhmap Map Identifier Attributes
_patOallSynmap Bool
_patOanyLazyKind Attributes
_patOinhmap Attributes
_patOlocalAttrTypes Options
_patOoptions Attributes
_patOsynmap)
_lhsOsem_lhs :: PP_Doc
_lhsOsem_lhs :: PP_Doc
_lhsOsem_lhs = PP_Doc -> PP_Doc
rule627 PP_Doc
_patIsem_lhs
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes = PP_Doc -> PP_Doc
rule628 PP_Doc
_patIattrTypes
_lhsOattrs :: Set String
_lhsOattrs :: Set String
_lhsOattrs = Set String -> Set String
rule629 Set String
_patIattrs
_copy :: Pattern
_copy = Pattern -> Pattern
rule630 Pattern
_patIcopy
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule631 Pattern
_copy
_lhsOisUnderscore :: Bool
_lhsOisUnderscore :: Bool
_lhsOisUnderscore = Bool -> Bool
rule632 Bool
_patIisUnderscore
_patOallInhmap :: Map Identifier Attributes
_patOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule633 Map Identifier Attributes
_lhsIallInhmap
_patOallSynmap :: Map Identifier Attributes
_patOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule634 Map Identifier Attributes
_lhsIallSynmap
_patOanyLazyKind :: Bool
_patOanyLazyKind = Bool -> Bool
rule635 Bool
_lhsIanyLazyKind
_patOinhmap :: Attributes
_patOinhmap = Attributes -> Attributes
rule636 Attributes
_lhsIinhmap
_patOlocalAttrTypes :: Attributes
_patOlocalAttrTypes = Attributes -> Attributes
rule637 Attributes
_lhsIlocalAttrTypes
_patOoptions :: Options
_patOoptions = Options -> Options
rule638 Options
_lhsIoptions
_patOsynmap :: Attributes
_patOsynmap = Attributes -> Attributes
rule639 Attributes
_lhsIsynmap
__result_ :: T_Pattern_vOut40
__result_ = PP_Doc
-> Set String -> Pattern -> Bool -> PP_Doc -> T_Pattern_vOut40
T_Pattern_vOut40 PP_Doc
_lhsOattrTypes Set String
_lhsOattrs Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOsem_lhs
in T_Pattern_vOut40
__result_ )
in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
{-# INLINE rule627 #-}
{-# LINE 1136 "src-ag/ExecutionPlan2Clean.ag" #-}
rule627 = \ ((_patIsem_lhs) :: PP_Doc ) ->
{-# LINE 1136 "src-ag/ExecutionPlan2Clean.ag" #-}
text "~" >|< pp_parens _patIsem_lhs
{-# LINE 4952 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule628 #-}
rule628 = \ ((_patIattrTypes) :: PP_Doc) ->
_patIattrTypes
{-# INLINE rule629 #-}
rule629 = \ ((_patIattrs) :: Set String) ->
_patIattrs
{-# INLINE rule630 #-}
rule630 = \ ((_patIcopy) :: Pattern) ->
Irrefutable _patIcopy
{-# INLINE rule631 #-}
rule631 = \ _copy ->
_copy
{-# INLINE rule632 #-}
rule632 = \ ((_patIisUnderscore) :: Bool) ->
_patIisUnderscore
{-# INLINE rule633 #-}
rule633 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule634 #-}
rule634 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule635 #-}
rule635 = \ ((_lhsIanyLazyKind) :: Bool) ->
_lhsIanyLazyKind
{-# INLINE rule636 #-}
rule636 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule637 #-}
rule637 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->
_lhsIlocalAttrTypes
{-# INLINE rule638 #-}
rule638 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule639 #-}
rule639 = \ ((_lhsIsynmap) :: Attributes) ->
_lhsIsynmap
{-# NOINLINE sem_Pattern_Underscore #-}
sem_Pattern_Underscore :: (Pos) -> T_Pattern
sem_Pattern_Underscore :: Pos -> T_Pattern
sem_Pattern_Underscore Pos
arg_pos_ = Identity T_Pattern_s41 -> T_Pattern
T_Pattern (T_Pattern_s41 -> Identity T_Pattern_s41
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s41
st41) where
{-# NOINLINE st41 #-}
st41 :: T_Pattern_s41
st41 = let
v40 :: T_Pattern_v40
v40 :: T_Pattern_v40
v40 = \ (T_Pattern_vIn40 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) -> ( let
_lhsOsem_lhs :: PP_Doc
_lhsOsem_lhs :: PP_Doc
_lhsOsem_lhs = () -> PP_Doc
rule640 ()
_lhsOisUnderscore :: Bool
_lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule641 ()
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes = () -> PP_Doc
rule642 ()
_lhsOattrs :: Set String
_lhsOattrs :: Set String
_lhsOattrs = () -> Set String
forall a. () -> Set a
rule643 ()
_copy :: Pattern
_copy = Pos -> Pattern
rule644 Pos
arg_pos_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule645 Pattern
_copy
__result_ :: T_Pattern_vOut40
__result_ = PP_Doc
-> Set String -> Pattern -> Bool -> PP_Doc -> T_Pattern_vOut40
T_Pattern_vOut40 PP_Doc
_lhsOattrTypes Set String
_lhsOattrs Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOsem_lhs
in T_Pattern_vOut40
__result_ )
in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
{-# INLINE rule640 #-}
{-# LINE 1135 "src-ag/ExecutionPlan2Clean.ag" #-}
rule640 = \ (_ :: ()) ->
{-# LINE 1135 "src-ag/ExecutionPlan2Clean.ag" #-}
text "_"
{-# LINE 5015 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule641 #-}
{-# LINE 1144 "src-ag/ExecutionPlan2Clean.ag" #-}
rule641 = \ (_ :: ()) ->
{-# LINE 1144 "src-ag/ExecutionPlan2Clean.ag" #-}
True
{-# LINE 5021 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule642 #-}
rule642 = \ (_ :: ()) ->
empty
{-# INLINE rule643 #-}
rule643 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule644 #-}
rule644 = \ pos_ ->
Underscore pos_
{-# INLINE rule645 #-}
rule645 = \ _copy ->
_copy
data Inh_Patterns = Inh_Patterns { Inh_Patterns -> Map Identifier Attributes
allInhmap_Inh_Patterns :: (Map NontermIdent Attributes), Inh_Patterns -> Map Identifier Attributes
allSynmap_Inh_Patterns :: (Map NontermIdent Attributes), Inh_Patterns -> Bool
anyLazyKind_Inh_Patterns :: (Bool), Inh_Patterns -> Attributes
inhmap_Inh_Patterns :: (Attributes), Inh_Patterns -> Attributes
localAttrTypes_Inh_Patterns :: (Map Identifier Type), Inh_Patterns -> Options
options_Inh_Patterns :: (Options), Inh_Patterns -> Attributes
synmap_Inh_Patterns :: (Attributes) }
data Syn_Patterns = Syn_Patterns { Syn_Patterns -> PP_Doc
attrTypes_Syn_Patterns :: (PP_Doc), Syn_Patterns -> Set String
attrs_Syn_Patterns :: (Set String), Syn_Patterns -> Patterns
copy_Syn_Patterns :: (Patterns), Syn_Patterns -> [PP_Doc]
sem_lhs_Syn_Patterns :: ([PP_Doc]) }
{-# INLINABLE wrap_Patterns #-}
wrap_Patterns :: T_Patterns -> Inh_Patterns -> (Syn_Patterns )
wrap_Patterns :: T_Patterns -> Inh_Patterns -> Syn_Patterns
wrap_Patterns (T_Patterns Identity T_Patterns_s44
act) (Inh_Patterns Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) =
Identity Syn_Patterns -> Syn_Patterns
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_Patterns_s44
sem <- Identity T_Patterns_s44
act
let arg43 :: T_Patterns_vIn43
arg43 = Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Patterns_vIn43
T_Patterns_vIn43 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap
(T_Patterns_vOut43 PP_Doc
_lhsOattrTypes Set String
_lhsOattrs Patterns
_lhsOcopy [PP_Doc]
_lhsOsem_lhs) <- T_Patterns_vOut43 -> Identity T_Patterns_vOut43
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
sem T_Patterns_vIn43
arg43)
Syn_Patterns -> Identity Syn_Patterns
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Set String -> Patterns -> [PP_Doc] -> Syn_Patterns
Syn_Patterns PP_Doc
_lhsOattrTypes Set String
_lhsOattrs Patterns
_lhsOcopy [PP_Doc]
_lhsOsem_lhs)
)
{-# NOINLINE sem_Patterns #-}
sem_Patterns :: Patterns -> T_Patterns
sem_Patterns :: Patterns -> T_Patterns
sem_Patterns Patterns
list = (T_Pattern -> T_Patterns -> T_Patterns)
-> T_Patterns -> [T_Pattern] -> T_Patterns
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Pattern -> T_Patterns -> T_Patterns
sem_Patterns_Cons T_Patterns
sem_Patterns_Nil ((Pattern -> T_Pattern) -> Patterns -> [T_Pattern]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Pattern -> T_Pattern
sem_Pattern Patterns
list)
newtype T_Patterns = T_Patterns {
T_Patterns -> Identity T_Patterns_s44
attach_T_Patterns :: Identity (T_Patterns_s44 )
}
newtype T_Patterns_s44 = C_Patterns_s44 {
T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 :: (T_Patterns_v43 )
}
data T_Patterns_s45 = C_Patterns_s45
type T_Patterns_v43 = (T_Patterns_vIn43 ) -> (T_Patterns_vOut43 )
data T_Patterns_vIn43 = T_Patterns_vIn43 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Bool) (Attributes) (Map Identifier Type) (Options) (Attributes)
data T_Patterns_vOut43 = T_Patterns_vOut43 (PP_Doc) (Set String) (Patterns) ([PP_Doc])
{-# NOINLINE sem_Patterns_Cons #-}
sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns
sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns
sem_Patterns_Cons T_Pattern
arg_hd_ T_Patterns
arg_tl_ = Identity T_Patterns_s44 -> T_Patterns
T_Patterns (T_Patterns_s44 -> Identity T_Patterns_s44
forall (m :: * -> *) a. Monad m => a -> m a
return T_Patterns_s44
st44) where
{-# NOINLINE st44 #-}
st44 :: T_Patterns_s44
st44 = let
v43 :: T_Patterns_v43
v43 :: T_Patterns_v43
v43 = \ (T_Patterns_vIn43 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) -> ( let
_hdX41 :: T_Pattern_s41
_hdX41 = Identity T_Pattern_s41 -> T_Pattern_s41
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s41
attach_T_Pattern (T_Pattern
arg_hd_))
_tlX44 :: T_Patterns_s44
_tlX44 = Identity T_Patterns_s44 -> T_Patterns_s44
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s44
attach_T_Patterns (T_Patterns
arg_tl_))
(T_Pattern_vOut40 PP_Doc
_hdIattrTypes Set String
_hdIattrs Pattern
_hdIcopy Bool
_hdIisUnderscore PP_Doc
_hdIsem_lhs) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_hdX41 (Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Pattern_vIn40
T_Pattern_vIn40 Map Identifier Attributes
_hdOallInhmap Map Identifier Attributes
_hdOallSynmap Bool
_hdOanyLazyKind Attributes
_hdOinhmap Attributes
_hdOlocalAttrTypes Options
_hdOoptions Attributes
_hdOsynmap)
(T_Patterns_vOut43 PP_Doc
_tlIattrTypes Set String
_tlIattrs Patterns
_tlIcopy [PP_Doc]
_tlIsem_lhs) = T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
_tlX44 (Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Patterns_vIn43
T_Patterns_vIn43 Map Identifier Attributes
_tlOallInhmap Map Identifier Attributes
_tlOallSynmap Bool
_tlOanyLazyKind Attributes
_tlOinhmap Attributes
_tlOlocalAttrTypes Options
_tlOoptions Attributes
_tlOsynmap)
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes = PP_Doc -> PP_Doc -> PP_Doc
rule646 PP_Doc
_hdIattrTypes PP_Doc
_tlIattrTypes
_lhsOattrs :: Set String
_lhsOattrs :: Set String
_lhsOattrs = Set String -> Set String -> Set String
rule647 Set String
_hdIattrs Set String
_tlIattrs
_lhsOsem_lhs :: [PP_Doc]
_lhsOsem_lhs :: [PP_Doc]
_lhsOsem_lhs = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule648 PP_Doc
_hdIsem_lhs [PP_Doc]
_tlIsem_lhs
_copy :: Patterns
_copy = Pattern -> Patterns -> Patterns
rule649 Pattern
_hdIcopy Patterns
_tlIcopy
_lhsOcopy :: Patterns
_lhsOcopy :: Patterns
_lhsOcopy = Patterns -> Patterns
forall a. a -> a
rule650 Patterns
_copy
_hdOallInhmap :: Map Identifier Attributes
_hdOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule651 Map Identifier Attributes
_lhsIallInhmap
_hdOallSynmap :: Map Identifier Attributes
_hdOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule652 Map Identifier Attributes
_lhsIallSynmap
_hdOanyLazyKind :: Bool
_hdOanyLazyKind = Bool -> Bool
rule653 Bool
_lhsIanyLazyKind
_hdOinhmap :: Attributes
_hdOinhmap = Attributes -> Attributes
rule654 Attributes
_lhsIinhmap
_hdOlocalAttrTypes :: Attributes
_hdOlocalAttrTypes = Attributes -> Attributes
rule655 Attributes
_lhsIlocalAttrTypes
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule656 Options
_lhsIoptions
_hdOsynmap :: Attributes
_hdOsynmap = Attributes -> Attributes
rule657 Attributes
_lhsIsynmap
_tlOallInhmap :: Map Identifier Attributes
_tlOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule658 Map Identifier Attributes
_lhsIallInhmap
_tlOallSynmap :: Map Identifier Attributes
_tlOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule659 Map Identifier Attributes
_lhsIallSynmap
_tlOanyLazyKind :: Bool
_tlOanyLazyKind = Bool -> Bool
rule660 Bool
_lhsIanyLazyKind
_tlOinhmap :: Attributes
_tlOinhmap = Attributes -> Attributes
rule661 Attributes
_lhsIinhmap
_tlOlocalAttrTypes :: Attributes
_tlOlocalAttrTypes = Attributes -> Attributes
rule662 Attributes
_lhsIlocalAttrTypes
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule663 Options
_lhsIoptions
_tlOsynmap :: Attributes
_tlOsynmap = Attributes -> Attributes
rule664 Attributes
_lhsIsynmap
__result_ :: T_Patterns_vOut43
__result_ = PP_Doc -> Set String -> Patterns -> [PP_Doc] -> T_Patterns_vOut43
T_Patterns_vOut43 PP_Doc
_lhsOattrTypes Set String
_lhsOattrs Patterns
_lhsOcopy [PP_Doc]
_lhsOsem_lhs
in T_Patterns_vOut43
__result_ )
in T_Patterns_v43 -> T_Patterns_s44
C_Patterns_s44 T_Patterns_v43
v43
{-# INLINE rule646 #-}
rule646 :: PP_Doc -> PP_Doc -> PP_Doc
rule646 = \ ((PP_Doc
_hdIattrTypes) :: PP_Doc) ((PP_Doc
_tlIattrTypes) :: PP_Doc) ->
PP_Doc
_hdIattrTypes PP_Doc -> PP_Doc -> PP_Doc
forall a b. (PP a, PP b) => a -> b -> PP_Doc
>-< PP_Doc
_tlIattrTypes
{-# INLINE rule647 #-}
rule647 :: Set String -> Set String -> Set String
rule647 = \ ((Set String
_hdIattrs) :: Set String) ((Set String
_tlIattrs) :: Set String) ->
Set String
_hdIattrs Set String -> Set String -> Set String
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set String
_tlIattrs
{-# INLINE rule648 #-}
rule648 :: PP_Doc -> [PP_Doc] -> [PP_Doc]
rule648 = \ ((PP_Doc
_hdIsem_lhs) :: PP_Doc ) (([PP_Doc]
_tlIsem_lhs) :: [PP_Doc]) ->
PP_Doc
_hdIsem_lhs PP_Doc -> [PP_Doc] -> [PP_Doc]
forall a. a -> [a] -> [a]
: [PP_Doc]
_tlIsem_lhs
{-# INLINE rule649 #-}
rule649 :: Pattern -> Patterns -> Patterns
rule649 = \ ((Pattern
_hdIcopy) :: Pattern) ((Patterns
_tlIcopy) :: Patterns) ->
(:) Pattern
_hdIcopy Patterns
_tlIcopy
{-# INLINE rule650 #-}
rule650 :: p -> p
rule650 = \ p
_copy ->
p
_copy
{-# INLINE rule651 #-}
rule651 :: Map Identifier Attributes -> Map Identifier Attributes
rule651 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallInhmap
{-# INLINE rule652 #-}
rule652 :: Map Identifier Attributes -> Map Identifier Attributes
rule652 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallSynmap
{-# INLINE rule653 #-}
rule653 :: Bool -> Bool
rule653 = \ ((Bool
_lhsIanyLazyKind) :: Bool) ->
Bool
_lhsIanyLazyKind
{-# INLINE rule654 #-}
rule654 :: Attributes -> Attributes
rule654 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
Attributes
_lhsIinhmap
{-# INLINE rule655 #-}
rule655 :: Attributes -> Attributes
rule655 = \ ((Attributes
_lhsIlocalAttrTypes) :: Map Identifier Type) ->
Attributes
_lhsIlocalAttrTypes
{-# INLINE rule656 #-}
rule656 :: Options -> Options
rule656 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule657 #-}
rule657 :: Attributes -> Attributes
rule657 = \ ((Attributes
_lhsIsynmap) :: Attributes) ->
Attributes
_lhsIsynmap
{-# INLINE rule658 #-}
rule658 :: Map Identifier Attributes -> Map Identifier Attributes
rule658 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallInhmap
{-# INLINE rule659 #-}
rule659 :: Map Identifier Attributes -> Map Identifier Attributes
rule659 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallSynmap
{-# INLINE rule660 #-}
rule660 :: Bool -> Bool
rule660 = \ ((Bool
_lhsIanyLazyKind) :: Bool) ->
Bool
_lhsIanyLazyKind
{-# INLINE rule661 #-}
rule661 :: Attributes -> Attributes
rule661 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
Attributes
_lhsIinhmap
{-# INLINE rule662 #-}
rule662 :: Attributes -> Attributes
rule662 = \ ((Attributes
_lhsIlocalAttrTypes) :: Map Identifier Type) ->
Attributes
_lhsIlocalAttrTypes
{-# INLINE rule663 #-}
rule663 :: Options -> Options
rule663 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule664 #-}
rule664 :: Attributes -> Attributes
rule664 = \ ((Attributes
_lhsIsynmap) :: Attributes) ->
Attributes
_lhsIsynmap
{-# NOINLINE sem_Patterns_Nil #-}
sem_Patterns_Nil :: T_Patterns
sem_Patterns_Nil :: T_Patterns
sem_Patterns_Nil = Identity T_Patterns_s44 -> T_Patterns
T_Patterns (T_Patterns_s44 -> Identity T_Patterns_s44
forall (m :: * -> *) a. Monad m => a -> m a
return T_Patterns_s44
st44) where
{-# NOINLINE st44 #-}
st44 :: T_Patterns_s44
st44 = let
v43 :: T_Patterns_v43
v43 :: T_Patterns_v43
v43 = \ (T_Patterns_vIn43 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) -> ( let
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes = () -> PP_Doc
rule665 ()
_lhsOattrs :: Set String
_lhsOattrs :: Set String
_lhsOattrs = () -> Set String
forall a. () -> Set a
rule666 ()
_lhsOsem_lhs :: [PP_Doc]
_lhsOsem_lhs :: [PP_Doc]
_lhsOsem_lhs = () -> [PP_Doc]
forall a. () -> [a]
rule667 ()
_copy :: [a]
_copy = () -> [a]
forall a. () -> [a]
rule668 ()
_lhsOcopy :: Patterns
_lhsOcopy :: Patterns
_lhsOcopy = Patterns -> Patterns
forall a. a -> a
rule669 Patterns
forall a. [a]
_copy
__result_ :: T_Patterns_vOut43
__result_ = PP_Doc -> Set String -> Patterns -> [PP_Doc] -> T_Patterns_vOut43
T_Patterns_vOut43 PP_Doc
_lhsOattrTypes Set String
_lhsOattrs Patterns
_lhsOcopy [PP_Doc]
_lhsOsem_lhs
in T_Patterns_vOut43
__result_ )
in T_Patterns_v43 -> T_Patterns_s44
C_Patterns_s44 T_Patterns_v43
v43
{-# INLINE rule665 #-}
rule665 :: () -> PP_Doc
rule665 = \ (()
_ :: ()) ->
PP_Doc
empty
{-# INLINE rule666 #-}
rule666 :: () -> Set a
rule666 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
{-# INLINE rule667 #-}
rule667 :: () -> [a]
rule667 = \ (()
_ :: ()) ->
[]
{-# INLINE rule668 #-}
rule668 :: () -> [a]
rule668 = \ (()
_ :: ()) ->
[]
{-# INLINE rule669 #-}
rule669 :: p -> p
rule669 = \ p
_copy ->
p
_copy
data Inh_Visit = Inh_Visit { Inh_Visit -> Map Int (Int, Int)
allFromToStates_Inh_Visit :: (Map VisitIdentifier (Int,Int)), Inh_Visit -> Map Identifier Attributes
allInhmap_Inh_Visit :: (Map NontermIdent Attributes), Inh_Visit -> Map Identifier Int
allInitStates_Inh_Visit :: (Map NontermIdent Int), Inh_Visit -> Map Identifier Attributes
allSynmap_Inh_Visit :: (Map NontermIdent Attributes), Inh_Visit -> Map Int VisitKind
allVisitKinds_Inh_Visit :: (Map VisitIdentifier VisitKind), Inh_Visit
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
allchildvisit_Inh_Visit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Inh_Visit -> Map Int (Map String (Maybe NonLocalAttr))
allintramap_Inh_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), Inh_Visit -> Map Int (Set Identifier)
avisitdefs_Inh_Visit :: (Map VisitIdentifier (Set Identifier)), Inh_Visit -> Map Int (Set Identifier)
avisituses_Inh_Visit :: (Map VisitIdentifier (Set Identifier)), Inh_Visit -> Attributes
childTypes_Inh_Visit :: (Map Identifier Type), Inh_Visit
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
childintros_Inh_Visit :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), Inh_Visit -> Identifier
con_Inh_Visit :: (ConstructorIdent), Inh_Visit -> Attributes
inhmap_Inh_Visit :: (Attributes), Inh_Visit
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
mrules_Inh_Visit :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), Inh_Visit -> Map Int StateCtx
nextVisits_Inh_Visit :: (Map StateIdentifier StateCtx), Inh_Visit -> Identifier
nt_Inh_Visit :: (NontermIdent), Inh_Visit -> Options
options_Inh_Visit :: (Options), Inh_Visit -> [Identifier]
params_Inh_Visit :: ([Identifier]), Inh_Visit -> Map Int StateCtx
prevVisits_Inh_Visit :: (Map StateIdentifier StateCtx), Inh_Visit -> Map Identifier (Set String)
ruledefs_Inh_Visit :: (Map Identifier (Set String)), Inh_Visit -> Map Identifier (Map String (Maybe NonLocalAttr))
ruleuses_Inh_Visit :: (Map Identifier (Map String (Maybe NonLocalAttr))), Inh_Visit -> Attributes
synmap_Inh_Visit :: (Attributes), Inh_Visit -> Set String
terminaldefs_Inh_Visit :: (Set String) }
data Syn_Visit = Syn_Visit { Syn_Visit -> VisitStateState
allvisits_Syn_Visit :: ( VisitStateState ), Syn_Visit
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
childvisit_Syn_Visit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Syn_Visit -> Seq Error
errors_Syn_Visit :: (Seq Error), Syn_Visit -> Map Int (Int, Int)
fromToStates_Syn_Visit :: (Map VisitIdentifier (Int,Int)), Syn_Visit -> Map Int (Map String (Maybe NonLocalAttr))
intramap_Syn_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), Syn_Visit -> Set String
lazyIntras_Syn_Visit :: (Set String), Syn_Visit -> Map Identifier (Set VisitKind)
ruleKinds_Syn_Visit :: (Map Identifier (Set VisitKind)), Syn_Visit -> Map Identifier Int
ruleUsage_Syn_Visit :: (Map Identifier Int), Syn_Visit -> (Int, Bool -> PP_Doc)
sem_visit_Syn_Visit :: ( (StateIdentifier,Bool -> PP_Doc) ), Syn_Visit -> PP_Doc
t_visits_Syn_Visit :: (PP_Doc), Syn_Visit -> Set String
usedArgs_Syn_Visit :: (Set String), Syn_Visit -> Map Int VisitKind
visitKinds_Syn_Visit :: (Map VisitIdentifier VisitKind), Syn_Visit -> Map Int (Set Identifier)
visitdefs_Syn_Visit :: (Map VisitIdentifier (Set Identifier)), Syn_Visit -> Map Int (Set Identifier)
visituses_Syn_Visit :: (Map VisitIdentifier (Set Identifier)) }
{-# INLINABLE wrap_Visit #-}
wrap_Visit :: T_Visit -> Inh_Visit -> (Syn_Visit )
wrap_Visit :: T_Visit -> Inh_Visit -> Syn_Visit
wrap_Visit (T_Visit Identity T_Visit_s47
act) (Inh_Visit Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Map String (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set String
_lhsIterminaldefs) =
Identity Syn_Visit -> Syn_Visit
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_Visit_s47
sem <- Identity T_Visit_s47
act
let arg46 :: T_Visit_vIn46
arg46 = Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Map String (Maybe NonLocalAttr))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Identifier
-> Attributes
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Int StateCtx
-> Identifier
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Map Identifier (Set String)
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> Attributes
-> Set String
-> T_Visit_vIn46
T_Visit_vIn46 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Map String (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set String
_lhsIterminaldefs
(T_Visit_vOut46 VisitStateState
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map String (Maybe NonLocalAttr))
_lhsOintramap Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage (Int, Bool -> PP_Doc)
_lhsOsem_visit PP_Doc
_lhsOt_visits Set String
_lhsOusedArgs Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses) <- T_Visit_vOut46 -> Identity T_Visit_vOut46
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Visit_s47 -> T_Visit_v46
inv_Visit_s47 T_Visit_s47
sem T_Visit_vIn46
arg46)
Syn_Visit -> Identity Syn_Visit
forall (m :: * -> *) a. Monad m => a -> m a
return (VisitStateState
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> Map Int (Map String (Maybe NonLocalAttr))
-> Set String
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> (Int, Bool -> PP_Doc)
-> PP_Doc
-> Set String
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Syn_Visit
Syn_Visit VisitStateState
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map String (Maybe NonLocalAttr))
_lhsOintramap Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage (Int, Bool -> PP_Doc)
_lhsOsem_visit PP_Doc
_lhsOt_visits Set String
_lhsOusedArgs Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses)
)
{-# INLINE sem_Visit #-}
sem_Visit :: Visit -> T_Visit
sem_Visit :: Visit -> T_Visit
sem_Visit ( Visit Int
ident_ Int
from_ Int
to_ Set Identifier
inh_ Set Identifier
syn_ VisitSteps
steps_ VisitKind
kind_ ) = Int
-> Int
-> Int
-> Set Identifier
-> Set Identifier
-> T_VisitSteps
-> VisitKind
-> T_Visit
sem_Visit_Visit Int
ident_ Int
from_ Int
to_ Set Identifier
inh_ Set Identifier
syn_ ( VisitSteps -> T_VisitSteps
sem_VisitSteps VisitSteps
steps_ ) VisitKind
kind_
newtype T_Visit = T_Visit {
T_Visit -> Identity T_Visit_s47
attach_T_Visit :: Identity (T_Visit_s47 )
}
newtype T_Visit_s47 = C_Visit_s47 {
T_Visit_s47 -> T_Visit_v46
inv_Visit_s47 :: (T_Visit_v46 )
}
data T_Visit_s48 = C_Visit_s48
type T_Visit_v46 = (T_Visit_vIn46 ) -> (T_Visit_vOut46 )
data T_Visit_vIn46 = T_Visit_vIn46 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (ConstructorIdent) (Attributes) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map StateIdentifier StateCtx) (NontermIdent) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Attributes) (Set String)
data T_Visit_vOut46 = T_Visit_vOut46 ( VisitStateState ) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) ( (StateIdentifier,Bool -> PP_Doc) ) (PP_Doc) (Set String) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))
{-# NOINLINE sem_Visit_Visit #-}
sem_Visit_Visit :: (VisitIdentifier) -> (StateIdentifier) -> (StateIdentifier) -> (Set Identifier) -> (Set Identifier) -> T_VisitSteps -> (VisitKind) -> T_Visit
sem_Visit_Visit :: Int
-> Int
-> Int
-> Set Identifier
-> Set Identifier
-> T_VisitSteps
-> VisitKind
-> T_Visit
sem_Visit_Visit Int
arg_ident_ Int
arg_from_ Int
arg_to_ Set Identifier
arg_inh_ Set Identifier
arg_syn_ T_VisitSteps
arg_steps_ VisitKind
arg_kind_ = Identity T_Visit_s47 -> T_Visit
T_Visit (T_Visit_s47 -> Identity T_Visit_s47
forall (m :: * -> *) a. Monad m => a -> m a
return T_Visit_s47
st47) where
{-# NOINLINE st47 #-}
st47 :: T_Visit_s47
st47 = let
v46 :: T_Visit_v46
v46 :: T_Visit_v46
v46 = \ (T_Visit_vIn46 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Map String (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set String
_lhsIterminaldefs) -> ( let
_stepsX53 :: T_VisitSteps_s53
_stepsX53 = Identity T_VisitSteps_s53 -> T_VisitSteps_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_VisitSteps -> Identity T_VisitSteps_s53
attach_T_VisitSteps (T_VisitSteps
arg_steps_))
(T_VisitSteps_vOut52 Set String
_stepsIdefs Seq Error
_stepsIerrors Int
_stepsIindex Bool
_stepsIisLast Set String
_stepsIlazyIntras Map Identifier (Set VisitKind)
_stepsIruleKinds Map Identifier Int
_stepsIruleUsage PP_Doc
_stepsIsem_steps Int
_stepsIsize Set String
_stepsIusedArgs Map String (Maybe NonLocalAttr)
_stepsIuses Map Int VisitKind
_stepsIvisitKinds) = T_VisitSteps_s53 -> T_VisitSteps_v52
inv_VisitSteps_s53 T_VisitSteps_s53
_stepsX53 (Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> FormatMode
-> Int
-> VisitKind
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Options
-> Map Identifier (Set String)
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> T_VisitSteps_vIn52
T_VisitSteps_vIn52 Map Int (Int, Int)
_stepsOallFromToStates Map Identifier Int
_stepsOallInitStates Map Int VisitKind
_stepsOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_stepsOallchildvisit Map Int (Set Identifier)
_stepsOavisitdefs Map Int (Set Identifier)
_stepsOavisituses Attributes
_stepsOchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_stepsOchildintros FormatMode
_stepsOfmtMode Int
_stepsOindex VisitKind
_stepsOkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_stepsOmrules Options
_stepsOoptions Map Identifier (Set String)
_stepsOruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_stepsOruleuses)
_lhsOallvisits :: VisitStateState
_lhsOallvisits :: VisitStateState
_lhsOallvisits = Int -> Int -> Int -> VisitStateState
forall b a c. b -> a -> c -> (a, b, c)
rule670 Int
arg_from_ Int
arg_ident_ Int
arg_to_
_nameT_visit :: PP_Doc
_nameT_visit = Identifier -> Int -> PP_Doc
rule671 Identifier
_lhsInt Int
arg_ident_
_nameTIn_visit :: PP_Doc
_nameTIn_visit = Identifier -> Int -> PP_Doc
rule672 Identifier
_lhsInt Int
arg_ident_
_nameTOut_visit :: PP_Doc
_nameTOut_visit = Identifier -> Int -> PP_Doc
rule673 Identifier
_lhsInt Int
arg_ident_
_nameTNext_visit :: PP_Doc
_nameTNext_visit = Identifier -> Int -> PP_Doc
rule674 Identifier
_lhsInt Int
arg_to_
_nextVisitInfo :: StateCtx
_nextVisitInfo = Map Int StateCtx -> Int -> StateCtx
rule675 Map Int StateCtx
_lhsInextVisits Int
arg_to_
_typecon :: PP_Doc
_typecon = Options -> VisitKind -> PP_Doc
rule676 Options
_lhsIoptions VisitKind
arg_kind_
_t_params :: PP_Doc
_t_params = [Identifier] -> PP_Doc
rule677 [Identifier]
_lhsIparams
_lhsOt_visits :: PP_Doc
_lhsOt_visits :: PP_Doc
_lhsOt_visits = (PP_Doc -> PP_Doc)
-> PP_Doc
-> Options
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> StateCtx
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
rule678 PP_Doc -> PP_Doc
_addbang1 PP_Doc
_inhpart Options
_lhsIoptions PP_Doc
_nameTIn_visit PP_Doc
_nameTNext_visit PP_Doc
_nameTOut_visit PP_Doc
_nameT_visit StateCtx
_nextVisitInfo PP_Doc
_synpart PP_Doc
_t_params PP_Doc
_typecon
_inhpart :: PP_Doc
_inhpart = Attributes
-> (Set Identifier -> Attributes -> PP_Doc)
-> Set Identifier
-> PP_Doc
forall t t. Attributes -> (t -> Attributes -> t) -> t -> t
rule679 Attributes
_lhsIinhmap Set Identifier -> Attributes -> PP_Doc
_ppTypeList Set Identifier
arg_inh_
_synpart :: PP_Doc
_synpart = Attributes
-> (Set Identifier -> Attributes -> PP_Doc)
-> Set Identifier
-> PP_Doc
forall t t. Attributes -> (t -> Attributes -> t) -> t -> t
rule680 Attributes
_lhsIsynmap Set Identifier -> Attributes -> PP_Doc
_ppTypeList Set Identifier
arg_syn_
_ppTypeList :: Set Identifier -> Attributes -> PP_Doc
_ppTypeList = (PP_Doc -> PP_Doc) -> Set Identifier -> Attributes -> PP_Doc
rule681 PP_Doc -> PP_Doc
_addbang1
_lhsOsem_visit :: (StateIdentifier,Bool -> PP_Doc)
_lhsOsem_visit :: (Int, Bool -> PP_Doc)
_lhsOsem_visit = (PP_Doc -> PP_Doc)
-> PP_Doc
-> Options
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Int
-> Int
-> (Int, Bool -> PP_Doc)
forall a p.
(PP_Doc -> PP_Doc)
-> PP_Doc
-> Options
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> a
-> Int
-> (a, p -> PP_Doc)
rule682 PP_Doc -> PP_Doc
_addbang PP_Doc
_inhpats Options
_lhsIoptions PP_Doc
_nameTIn_visit PP_Doc
_stepsClosing PP_Doc
_stepsInitial PP_Doc
_stepsIsem_steps Int
arg_from_ Int
arg_ident_
_stepsInitial :: PP_Doc
_stepsInitial = VisitKind -> PP_Doc
rule683 VisitKind
arg_kind_
_stepsClosing :: PP_Doc
_stepsClosing = (PP_Doc -> PP_Doc) -> PP_Doc -> PP_Doc -> VisitKind -> PP_Doc
rule684 PP_Doc -> PP_Doc
_addbang PP_Doc
_nextStBuild PP_Doc
_resultval VisitKind
arg_kind_
_vname :: PP_Doc
_vname = Int -> PP_Doc
rule685 Int
arg_ident_
_inhpats :: PP_Doc
_inhpats = Options -> Set Identifier -> PP_Doc
rule686 Options
_lhsIoptions Set Identifier
arg_inh_
_inhargs :: Identifier -> PP_Doc
_inhargs = Options -> Set Identifier -> Identifier -> PP_Doc
rule687 Options
_lhsIoptions Set Identifier
arg_inh_
_synargs :: PP_Doc
_synargs = Options -> Set Identifier -> PP_Doc
rule688 Options
_lhsIoptions Set Identifier
arg_syn_
_nextargsMp :: Map String (Maybe NonLocalAttr)
_nextargsMp = Map Int (Map String (Maybe NonLocalAttr))
-> Int -> Map String (Maybe NonLocalAttr)
rule689 Map Int (Map String (Maybe NonLocalAttr))
_lhsIallintramap Int
arg_to_
_nextargs :: PP_Doc
_nextargs = Map String (Maybe NonLocalAttr) -> PP_Doc
forall a. Map String a -> PP_Doc
rule690 Map String (Maybe NonLocalAttr)
_nextargsMp
_nextst :: PP_Doc
_nextst = Options
-> PP_Doc -> Map String (Maybe NonLocalAttr) -> Int -> PP_Doc
forall k a. Options -> PP_Doc -> Map k a -> Int -> PP_Doc
rule691 Options
_lhsIoptions PP_Doc
_nextargs Map String (Maybe NonLocalAttr)
_nextargsMp Int
arg_to_
_resultval :: PP_Doc
_resultval = PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc
rule692 PP_Doc
_nameTOut_visit PP_Doc
_nextStRef PP_Doc
_synargs
(PP_Doc
_nextStBuild,PP_Doc
_nextStRef) = (PP_Doc -> PP_Doc) -> StateCtx -> PP_Doc -> (PP_Doc, PP_Doc)
rule693 PP_Doc -> PP_Doc
_addbang StateCtx
_nextVisitInfo PP_Doc
_nextst
_stepsOkind :: VisitKind
_stepsOkind = VisitKind -> VisitKind
forall a. a -> a
rule694 VisitKind
arg_kind_
_stepsOfmtMode :: FormatMode
_stepsOfmtMode = VisitKind -> FormatMode
rule695 VisitKind
arg_kind_
_stepsOindex :: Int
_stepsOindex = () -> Int
rule696 ()
_prevVisitInfo :: StateCtx
_prevVisitInfo = Map Int StateCtx -> Int -> StateCtx
rule697 Map Int StateCtx
_lhsInextVisits Int
arg_from_
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Int
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
forall a k. a -> k -> Map k a
rule698 Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)
_invokecode Int
arg_ident_
_invokecode :: Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)
_invokecode = (PP_Doc -> PP_Doc)
-> (Identifier -> PP_Doc)
-> Identifier
-> Options
-> PP_Doc
-> PP_Doc
-> StateCtx
-> StateCtx
-> Int
-> Int
-> VisitKind
-> Set Identifier
-> Int
-> Identifier
-> VisitKind
-> Either Error (PP_Doc, PP_Doc)
rule699 PP_Doc -> PP_Doc
_addbang Identifier -> PP_Doc
_inhargs Identifier
_lhsInt Options
_lhsIoptions PP_Doc
_nameTIn_visit PP_Doc
_nameTOut_visit StateCtx
_nextVisitInfo StateCtx
_prevVisitInfo Int
arg_from_ Int
arg_ident_ VisitKind
arg_kind_ Set Identifier
arg_syn_ Int
arg_to_
_thisintra :: Map String (Maybe NonLocalAttr)
_thisintra = Map String (Maybe Any)
-> Map String (Maybe NonLocalAttr)
-> Map String (Maybe NonLocalAttr)
-> Map String (Maybe NonLocalAttr)
forall b a.
Map String b -> Map String a -> Map String a -> Map String a
rule700 Map String (Maybe Any)
_defsAsMap Map String (Maybe NonLocalAttr)
_nextintra Map String (Maybe NonLocalAttr)
_uses
_lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))
_lhsOintramap :: Map Int (Map String (Maybe NonLocalAttr))
_lhsOintramap = Map String (Maybe NonLocalAttr)
-> Int -> Map Int (Map String (Maybe NonLocalAttr))
forall a k. a -> k -> Map k a
rule701 Map String (Maybe NonLocalAttr)
_thisintra Int
arg_from_
_nextintra :: Map String (Maybe NonLocalAttr)
_nextintra = Map Int (Map String (Maybe NonLocalAttr))
-> Int -> Map String (Maybe NonLocalAttr)
rule702 Map Int (Map String (Maybe NonLocalAttr))
_lhsIallintramap Int
arg_to_
_uses :: Map String (Maybe NonLocalAttr)
_uses = Options
-> Map String (Maybe NonLocalAttr)
-> Set Identifier
-> Map String (Maybe NonLocalAttr)
rule703 Options
_lhsIoptions Map String (Maybe NonLocalAttr)
_stepsIuses Set Identifier
arg_syn_
_inhVarNms :: Set String
_inhVarNms = Options -> Set Identifier -> Set String
rule704 Options
_lhsIoptions Set Identifier
arg_inh_
_defs :: Set String
_defs = Set String -> Set String -> Set String -> Set String
rule705 Set String
_inhVarNms Set String
_lhsIterminaldefs Set String
_stepsIdefs
_defsAsMap :: Map String (Maybe Any)
_defsAsMap = Set String -> Map String (Maybe Any)
forall a. Set String -> Map String (Maybe a)
rule706 Set String
_defs
_lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
_lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = Int -> Set Identifier -> Map Int (Set Identifier)
forall k a. k -> a -> Map k a
rule707 Int
arg_ident_ Set Identifier
arg_syn_
_lhsOvisituses :: Map VisitIdentifier (Set Identifier)
_lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = Int -> Set Identifier -> Map Int (Set Identifier)
forall k a. k -> a -> Map k a
rule708 Int
arg_ident_ Set Identifier
arg_inh_
_lazyIntrasInh :: Set String
_lazyIntrasInh = Set String -> Set String -> VisitKind -> Set String
rule709 Set String
_inhVarNms Set String
_stepsIdefs VisitKind
arg_kind_
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set String
_lhsOlazyIntras = Set String -> Set String -> Set String
rule710 Set String
_lazyIntrasInh Set String
_stepsIlazyIntras
_addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule711 Options
_lhsIoptions
_addbang1 :: PP_Doc -> PP_Doc
_addbang1 = (PP_Doc -> PP_Doc) -> VisitKind -> PP_Doc -> PP_Doc
forall a. (a -> a) -> VisitKind -> a -> a
rule712 PP_Doc -> PP_Doc
_addbang VisitKind
arg_kind_
_lhsOfromToStates :: Map VisitIdentifier (Int,Int)
_lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = Int -> Int -> Int -> Map Int (Int, Int)
forall a k b. a -> k -> b -> Map k (a, b)
rule713 Int
arg_from_ Int
arg_ident_ Int
arg_to_
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Int -> VisitKind -> Map Int VisitKind
forall k a. k -> a -> Map k a
rule714 Int
arg_ident_ VisitKind
arg_kind_
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule715 Seq Error
_stepsIerrors
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule716 Map Identifier (Set VisitKind)
_stepsIruleKinds
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = Map Identifier Int -> Map Identifier Int
rule717 Map Identifier Int
_stepsIruleUsage
_lhsOusedArgs :: Set String
_lhsOusedArgs :: Set String
_lhsOusedArgs = Set String -> Set String
rule718 Set String
_stepsIusedArgs
_stepsOallFromToStates :: Map Int (Int, Int)
_stepsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule719 Map Int (Int, Int)
_lhsIallFromToStates
_stepsOallInitStates :: Map Identifier Int
_stepsOallInitStates = Map Identifier Int -> Map Identifier Int
rule720 Map Identifier Int
_lhsIallInitStates
_stepsOallVisitKinds :: Map Int VisitKind
_stepsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule721 Map Int VisitKind
_lhsIallVisitKinds
_stepsOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_stepsOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule722 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
_stepsOavisitdefs :: Map Int (Set Identifier)
_stepsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule723 Map Int (Set Identifier)
_lhsIavisitdefs
_stepsOavisituses :: Map Int (Set Identifier)
_stepsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule724 Map Int (Set Identifier)
_lhsIavisituses
_stepsOchildTypes :: Attributes
_stepsOchildTypes = Attributes -> Attributes
rule725 Attributes
_lhsIchildTypes
_stepsOchildintros :: Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_stepsOchildintros = Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
rule726 Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros
_stepsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_stepsOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule727 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
_stepsOoptions :: Options
_stepsOoptions = Options -> Options
rule728 Options
_lhsIoptions
_stepsOruledefs :: Map Identifier (Set String)
_stepsOruledefs = Map Identifier (Set String) -> Map Identifier (Set String)
rule729 Map Identifier (Set String)
_lhsIruledefs
_stepsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
_stepsOruleuses = Map Identifier (Map String (Maybe NonLocalAttr))
-> Map Identifier (Map String (Maybe NonLocalAttr))
rule730 Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses
__result_ :: T_Visit_vOut46
__result_ = VisitStateState
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> Map Int (Map String (Maybe NonLocalAttr))
-> Set String
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> (Int, Bool -> PP_Doc)
-> PP_Doc
-> Set String
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_Visit_vOut46
T_Visit_vOut46 VisitStateState
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map String (Maybe NonLocalAttr))
_lhsOintramap Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage (Int, Bool -> PP_Doc)
_lhsOsem_visit PP_Doc
_lhsOt_visits Set String
_lhsOusedArgs Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
in T_Visit_vOut46
__result_ )
in T_Visit_v46 -> T_Visit_s47
C_Visit_s47 T_Visit_v46
v46
{-# INLINE rule670 #-}
{-# LINE 382 "src-ag/ExecutionPlan2Clean.ag" #-}
rule670 = \ from_ ident_ to_ ->
{-# LINE 382 "src-ag/ExecutionPlan2Clean.ag" #-}
(ident_, from_, to_)
{-# LINE 5316 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule671 #-}
{-# LINE 453 "src-ag/ExecutionPlan2Clean.ag" #-}
rule671 = \ ((_lhsInt) :: NontermIdent) ident_ ->
{-# LINE 453 "src-ag/ExecutionPlan2Clean.ag" #-}
conNmTVisit _lhsInt ident_
{-# LINE 5322 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule672 #-}
{-# LINE 454 "src-ag/ExecutionPlan2Clean.ag" #-}
rule672 = \ ((_lhsInt) :: NontermIdent) ident_ ->
{-# LINE 454 "src-ag/ExecutionPlan2Clean.ag" #-}
conNmTVisitIn _lhsInt ident_
{-# LINE 5328 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule673 #-}
{-# LINE 455 "src-ag/ExecutionPlan2Clean.ag" #-}
rule673 = \ ((_lhsInt) :: NontermIdent) ident_ ->
{-# LINE 455 "src-ag/ExecutionPlan2Clean.ag" #-}
conNmTVisitOut _lhsInt ident_
{-# LINE 5334 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule674 #-}
{-# LINE 456 "src-ag/ExecutionPlan2Clean.ag" #-}
rule674 = \ ((_lhsInt) :: NontermIdent) to_ ->
{-# LINE 456 "src-ag/ExecutionPlan2Clean.ag" #-}
conNmTNextVisit _lhsInt to_
{-# LINE 5340 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule675 #-}
{-# LINE 458 "src-ag/ExecutionPlan2Clean.ag" #-}
rule675 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) to_ ->
{-# LINE 458 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.findWithDefault ManyVis to_ _lhsInextVisits
{-# LINE 5346 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule676 #-}
{-# LINE 459 "src-ag/ExecutionPlan2Clean.ag" #-}
rule676 = \ ((_lhsIoptions) :: Options) kind_ ->
{-# LINE 459 "src-ag/ExecutionPlan2Clean.ag" #-}
case kind_ of
VisitPure _ -> empty
VisitMonadic -> ppMonadType _lhsIoptions
{-# LINE 5354 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule677 #-}
{-# LINE 463 "src-ag/ExecutionPlan2Clean.ag" #-}
rule677 = \ ((_lhsIparams) :: [Identifier]) ->
{-# LINE 463 "src-ag/ExecutionPlan2Clean.ag" #-}
ppSpaced _lhsIparams
{-# LINE 5360 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule678 #-}
{-# LINE 464 "src-ag/ExecutionPlan2Clean.ag" #-}
rule678 = \ _addbang1 _inhpart ((_lhsIoptions) :: Options) _nameTIn_visit _nameTNext_visit _nameTOut_visit _nameT_visit _nextVisitInfo _synpart _t_params _typecon ->
{-# LINE 464 "src-ag/ExecutionPlan2Clean.ag" #-}
"::" >#< _nameT_visit >#< _t_params >#< ":==" >#<
pp_parens (_nameTIn_visit >#< _t_params )
>#< ( if dummyTokenVisit _lhsIoptions
then "->" >#< dummyType _lhsIoptions True
else empty
)
>#< "->" >#< _typecon >#< pp_parens (_nameTOut_visit >#< _t_params )
>-< "::" >#< _nameTIn_visit >#< _t_params >#< "=" >#< _nameTIn_visit >#<
_inhpart
>-< "::" >#< _nameTOut_visit >#< _t_params >#< "=" >#< _nameTOut_visit >#<
_synpart >#< case _nextVisitInfo of
NoneVis -> empty
_ -> _addbang1 $ pp_parens (_nameTNext_visit >#< _t_params )
{-# LINE 5378 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule679 #-}
{-# LINE 478 "src-ag/ExecutionPlan2Clean.ag" #-}
rule679 = \ ((_lhsIinhmap) :: Attributes) _ppTypeList inh_ ->
{-# LINE 478 "src-ag/ExecutionPlan2Clean.ag" #-}
_ppTypeList inh_ _lhsIinhmap
{-# LINE 5384 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule680 #-}
{-# LINE 479 "src-ag/ExecutionPlan2Clean.ag" #-}
rule680 = \ ((_lhsIsynmap) :: Attributes) _ppTypeList syn_ ->
{-# LINE 479 "src-ag/ExecutionPlan2Clean.ag" #-}
_ppTypeList syn_ _lhsIsynmap
{-# LINE 5390 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule681 #-}
{-# LINE 480 "src-ag/ExecutionPlan2Clean.ag" #-}
rule681 = \ _addbang1 ->
{-# LINE 480 "src-ag/ExecutionPlan2Clean.ag" #-}
\s m -> ppSpaced $ map (\i -> _addbang1 $ pp_parens $ case Map.lookup i m of
Just tp -> ppTp tp ) $ Set.toList s
{-# LINE 5397 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule682 #-}
{-# LINE 773 "src-ag/ExecutionPlan2Clean.ag" #-}
rule682 = \ _addbang _inhpats ((_lhsIoptions) :: Options) _nameTIn_visit _stepsClosing _stepsInitial ((_stepsIsem_steps) :: PP_Doc) from_ ident_ ->
{-# LINE 773 "src-ag/ExecutionPlan2Clean.ag" #-}
( from_
, \_ ->
"v" >|< ident_ >#< (_addbang $ pp_parens (_nameTIn_visit >#< _inhpats )) >#< "="
>#< ( if dummyTokenVisit _lhsIoptions
then pp $ dummyPat _lhsIoptions True
else empty
)
>-< indent 10 (_stepsInitial
>-< indent 4 _stepsIsem_steps) >-< indent 10 _stepsClosing
)
{-# LINE 5412 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule683 #-}
{-# LINE 791 "src-ag/ExecutionPlan2Clean.ag" #-}
rule683 = \ kind_ ->
{-# LINE 791 "src-ag/ExecutionPlan2Clean.ag" #-}
case kind_ of
VisitPure False -> text "let"
VisitPure True -> empty
VisitMonadic -> text "do"
{-# LINE 5421 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule684 #-}
{-# LINE 795 "src-ag/ExecutionPlan2Clean.ag" #-}
rule684 = \ _addbang _nextStBuild _resultval kind_ ->
{-# LINE 795 "src-ag/ExecutionPlan2Clean.ag" #-}
let decls = _nextStBuild
>-< _addbang (pp resultValName) >#< "=" >#< _resultval
in case kind_ of
VisitPure False -> indent 4 decls
>-< "in" >#< resultValName
VisitPure True -> "let" >#< decls
>-< indent 1 ("in" >#< resultValName)
VisitMonadic -> "let" >#< decls
>-< "lift" >#< resultValName
{-# LINE 5435 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule685 #-}
{-# LINE 804 "src-ag/ExecutionPlan2Clean.ag" #-}
rule685 = \ ident_ ->
{-# LINE 804 "src-ag/ExecutionPlan2Clean.ag" #-}
"v" >|< ident_
{-# LINE 5441 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule686 #-}
{-# LINE 805 "src-ag/ExecutionPlan2Clean.ag" #-}
rule686 = \ ((_lhsIoptions) :: Options) inh_ ->
{-# LINE 805 "src-ag/ExecutionPlan2Clean.ag" #-}
ppSpaced $ map (\arg -> pp $ attrname _lhsIoptions True _LHS arg) $ Set.toList inh_
{-# LINE 5447 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule687 #-}
{-# LINE 806 "src-ag/ExecutionPlan2Clean.ag" #-}
rule687 = \ ((_lhsIoptions) :: Options) inh_ ->
{-# LINE 806 "src-ag/ExecutionPlan2Clean.ag" #-}
\chn -> ppSpaced $ map (attrname _lhsIoptions False chn) $ Set.toList inh_
{-# LINE 5453 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule688 #-}
{-# LINE 807 "src-ag/ExecutionPlan2Clean.ag" #-}
rule688 = \ ((_lhsIoptions) :: Options) syn_ ->
{-# LINE 807 "src-ag/ExecutionPlan2Clean.ag" #-}
ppSpaced $ map (\arg -> attrname _lhsIoptions False _LHS arg) $ Set.toList syn_
{-# LINE 5459 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule689 #-}
{-# LINE 808 "src-ag/ExecutionPlan2Clean.ag" #-}
rule689 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) to_ ->
{-# LINE 808 "src-ag/ExecutionPlan2Clean.ag" #-}
maybe Map.empty id $ Map.lookup to_ _lhsIallintramap
{-# LINE 5465 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule690 #-}
{-# LINE 809 "src-ag/ExecutionPlan2Clean.ag" #-}
rule690 = \ _nextargsMp ->
{-# LINE 809 "src-ag/ExecutionPlan2Clean.ag" #-}
ppSpaced $ Map.keys $ _nextargsMp
{-# LINE 5471 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule691 #-}
{-# LINE 810 "src-ag/ExecutionPlan2Clean.ag" #-}
rule691 = \ ((_lhsIoptions) :: Options) _nextargs _nextargsMp to_ ->
{-# LINE 810 "src-ag/ExecutionPlan2Clean.ag" #-}
"st" >|< to_ >#< _nextargs >#< dummyArg _lhsIoptions (Map.null _nextargsMp )
{-# LINE 5477 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule692 #-}
{-# LINE 811 "src-ag/ExecutionPlan2Clean.ag" #-}
rule692 = \ _nameTOut_visit _nextStRef _synargs ->
{-# LINE 811 "src-ag/ExecutionPlan2Clean.ag" #-}
_nameTOut_visit >#< _synargs >#< _nextStRef
{-# LINE 5483 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule693 #-}
{-# LINE 813 "src-ag/ExecutionPlan2Clean.ag" #-}
rule693 = \ _addbang _nextVisitInfo _nextst ->
{-# LINE 813 "src-ag/ExecutionPlan2Clean.ag" #-}
case _nextVisitInfo of
NoneVis -> (empty, empty)
_ -> (_addbang (pp nextStName) >#< "=" >#< _nextst , pp nextStName)
{-# LINE 5491 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule694 #-}
{-# LINE 827 "src-ag/ExecutionPlan2Clean.ag" #-}
rule694 = \ kind_ ->
{-# LINE 827 "src-ag/ExecutionPlan2Clean.ag" #-}
kind_
{-# LINE 5497 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule695 #-}
{-# LINE 868 "src-ag/ExecutionPlan2Clean.ag" #-}
rule695 = \ kind_ ->
{-# LINE 868 "src-ag/ExecutionPlan2Clean.ag" #-}
case kind_ of
VisitPure False -> FormatLetDecl
VisitPure True -> FormatLetLine
VisitMonadic -> FormatDo
{-# LINE 5506 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule696 #-}
{-# LINE 917 "src-ag/ExecutionPlan2Clean.ag" #-}
rule696 = \ (_ :: ()) ->
{-# LINE 917 "src-ag/ExecutionPlan2Clean.ag" #-}
0
{-# LINE 5512 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule697 #-}
{-# LINE 1227 "src-ag/ExecutionPlan2Clean.ag" #-}
rule697 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) from_ ->
{-# LINE 1227 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.findWithDefault ManyVis from_ _lhsInextVisits
{-# LINE 5518 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule698 #-}
{-# LINE 1228 "src-ag/ExecutionPlan2Clean.ag" #-}
rule698 = \ _invokecode ident_ ->
{-# LINE 1228 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton ident_ _invokecode
{-# LINE 5524 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule699 #-}
{-# LINE 1229 "src-ag/ExecutionPlan2Clean.ag" #-}
rule699 = \ _addbang _inhargs ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) _nameTIn_visit _nameTOut_visit _nextVisitInfo _prevVisitInfo from_ ident_ kind_ syn_ to_ ->
{-# LINE 1229 "src-ag/ExecutionPlan2Clean.ag" #-}
\chn kind ->
if kind `compatibleKind` kind_
then Right $
let pat | isLazyKind kind_ = pat0
| otherwise = _addbang pat0
pat0 = pp_parens pat1
pat1 = _nameTOut_visit >#< (ppSpaced $ map (attrname _lhsIoptions True chn) $ Set.toList syn_)
>#< cont
cont = case _nextVisitInfo of
NoneVis -> empty
_ -> ch1
ch0 = text $ stname chn from_
ch1 = text $ stname chn to_
expr = case (kind, kind_) of
(VisitPure _, VisitPure _) -> expr0
(VisitPure _, VisitMonadic) -> unMon _lhsIoptions >#< expr0
(VisitMonadic, VisitPure _) -> "lift" >#< expr0
(VisitMonadic, VisitMonadic) -> expr0
expr0 = case _prevVisitInfo of
NoneVis -> error "error: invocation of a visit from a state that has no next visits"
OneVis _ -> "inv_" >|< _lhsInt >|< "_s" >|< from_ >#< ch0 >#< args
ManyVis -> "inv_" >|< _lhsInt >|< "_s" >|< from_ >#< ch0
>#< "K_" >|< _lhsInt >|< "_v" >|< ident_ >#< args
args = pp_parens args0 >#< args1
args0 = _nameTIn_visit >#< _inhargs chn
args1 | dummyTokenVisit _lhsIoptions = pp $ dummyArg _lhsIoptions True
| otherwise = empty
in (pat, expr)
else Left $ IncompatibleVisitKind chn ident_ kind kind_
{-# LINE 5558 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule700 #-}
{-# LINE 1325 "src-ag/ExecutionPlan2Clean.ag" #-}
rule700 = \ _defsAsMap _nextintra _uses ->
{-# LINE 1325 "src-ag/ExecutionPlan2Clean.ag" #-}
(_uses `Map.union` _nextintra ) `Map.difference` _defsAsMap
{-# LINE 5564 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule701 #-}
{-# LINE 1326 "src-ag/ExecutionPlan2Clean.ag" #-}
rule701 = \ _thisintra from_ ->
{-# LINE 1326 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton from_ _thisintra
{-# LINE 5570 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule702 #-}
{-# LINE 1327 "src-ag/ExecutionPlan2Clean.ag" #-}
rule702 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) to_ ->
{-# LINE 1327 "src-ag/ExecutionPlan2Clean.ag" #-}
maybe Map.empty id $ Map.lookup to_ _lhsIallintramap
{-# LINE 5576 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule703 #-}
{-# LINE 1328 "src-ag/ExecutionPlan2Clean.ag" #-}
rule703 = \ ((_lhsIoptions) :: Options) ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) syn_ ->
{-# LINE 1328 "src-ag/ExecutionPlan2Clean.ag" #-}
let mp1 = _stepsIuses
mp2 = Map.fromList [ (lhsname _lhsIoptions False i, Just (AttrSyn _LHS i)) | i <- Set.elems syn_ ]
in mp1 `Map.union` mp2
{-# LINE 5584 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule704 #-}
{-# LINE 1331 "src-ag/ExecutionPlan2Clean.ag" #-}
rule704 = \ ((_lhsIoptions) :: Options) inh_ ->
{-# LINE 1331 "src-ag/ExecutionPlan2Clean.ag" #-}
Set.map (lhsname _lhsIoptions True) inh_
{-# LINE 5590 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule705 #-}
{-# LINE 1332 "src-ag/ExecutionPlan2Clean.ag" #-}
rule705 = \ _inhVarNms ((_lhsIterminaldefs) :: Set String) ((_stepsIdefs) :: Set String) ->
{-# LINE 1332 "src-ag/ExecutionPlan2Clean.ag" #-}
_stepsIdefs `Set.union` _inhVarNms `Set.union` _lhsIterminaldefs
{-# LINE 5596 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule706 #-}
{-# LINE 1333 "src-ag/ExecutionPlan2Clean.ag" #-}
rule706 = \ _defs ->
{-# LINE 1333 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.fromList [ (a, Nothing) | a <- Set.elems _defs ]
{-# LINE 5602 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule707 #-}
{-# LINE 1357 "src-ag/ExecutionPlan2Clean.ag" #-}
rule707 = \ ident_ syn_ ->
{-# LINE 1357 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton ident_ syn_
{-# LINE 5608 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule708 #-}
{-# LINE 1358 "src-ag/ExecutionPlan2Clean.ag" #-}
rule708 = \ ident_ inh_ ->
{-# LINE 1358 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton ident_ inh_
{-# LINE 5614 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule709 #-}
{-# LINE 1390 "src-ag/ExecutionPlan2Clean.ag" #-}
rule709 = \ _inhVarNms ((_stepsIdefs) :: Set String) kind_ ->
{-# LINE 1390 "src-ag/ExecutionPlan2Clean.ag" #-}
case kind_ of
VisitPure False -> _inhVarNms `Set.union` _stepsIdefs
_ -> Set.empty
{-# LINE 5622 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule710 #-}
{-# LINE 1393 "src-ag/ExecutionPlan2Clean.ag" #-}
rule710 = \ _lazyIntrasInh ((_stepsIlazyIntras) :: Set String) ->
{-# LINE 1393 "src-ag/ExecutionPlan2Clean.ag" #-}
_lazyIntrasInh `Set.union` _stepsIlazyIntras
{-# LINE 5628 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule711 #-}
{-# LINE 1565 "src-ag/ExecutionPlan2Clean.ag" #-}
rule711 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 1565 "src-ag/ExecutionPlan2Clean.ag" #-}
\x -> if bangpats _lhsIoptions then "!" >|< x else x
{-# LINE 5634 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule712 #-}
{-# LINE 1573 "src-ag/ExecutionPlan2Clean.ag" #-}
rule712 = \ _addbang kind_ ->
{-# LINE 1573 "src-ag/ExecutionPlan2Clean.ag" #-}
if isLazyKind kind_ then id else _addbang
{-# LINE 5640 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule713 #-}
{-# LINE 1600 "src-ag/ExecutionPlan2Clean.ag" #-}
rule713 = \ from_ ident_ to_ ->
{-# LINE 1600 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton ident_ (from_, to_)
{-# LINE 5646 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule714 #-}
{-# LINE 1644 "src-ag/ExecutionPlan2Clean.ag" #-}
rule714 = \ ident_ kind_ ->
{-# LINE 1644 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton ident_ kind_
{-# LINE 5652 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule715 #-}
rule715 = \ ((_stepsIerrors) :: Seq Error) ->
_stepsIerrors
{-# INLINE rule716 #-}
rule716 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->
_stepsIruleKinds
{-# INLINE rule717 #-}
rule717 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->
_stepsIruleUsage
{-# INLINE rule718 #-}
rule718 = \ ((_stepsIusedArgs) :: Set String) ->
_stepsIusedArgs
{-# INLINE rule719 #-}
rule719 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule720 #-}
rule720 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule721 #-}
rule721 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule722 #-}
rule722 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
_lhsIallchildvisit
{-# INLINE rule723 #-}
rule723 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule724 #-}
rule724 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule725 #-}
rule725 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->
_lhsIchildTypes
{-# INLINE rule726 #-}
rule726 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
_lhsIchildintros
{-# INLINE rule727 #-}
rule727 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
_lhsImrules
{-# INLINE rule728 #-}
rule728 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule729 #-}
rule729 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->
_lhsIruledefs
{-# INLINE rule730 #-}
rule730 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
_lhsIruleuses
data Inh_VisitStep = Inh_VisitStep { Inh_VisitStep -> Map Int (Int, Int)
allFromToStates_Inh_VisitStep :: (Map VisitIdentifier (Int,Int)), Inh_VisitStep -> Map Identifier Int
allInitStates_Inh_VisitStep :: (Map NontermIdent Int), Inh_VisitStep -> Map Int VisitKind
allVisitKinds_Inh_VisitStep :: (Map VisitIdentifier VisitKind), Inh_VisitStep
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
allchildvisit_Inh_VisitStep :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Inh_VisitStep -> Map Int (Set Identifier)
avisitdefs_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)), Inh_VisitStep -> Map Int (Set Identifier)
avisituses_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)), Inh_VisitStep -> Attributes
childTypes_Inh_VisitStep :: (Map Identifier Type), Inh_VisitStep
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
childintros_Inh_VisitStep :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), Inh_VisitStep -> FormatMode
fmtMode_Inh_VisitStep :: (FormatMode), Inh_VisitStep -> Int
index_Inh_VisitStep :: (Int), Inh_VisitStep -> Bool
isLast_Inh_VisitStep :: (Bool), Inh_VisitStep -> VisitKind
kind_Inh_VisitStep :: (VisitKind), Inh_VisitStep
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
mrules_Inh_VisitStep :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), Inh_VisitStep -> Options
options_Inh_VisitStep :: (Options), Inh_VisitStep -> Map Identifier (Set String)
ruledefs_Inh_VisitStep :: (Map Identifier (Set String)), Inh_VisitStep -> Map Identifier (Map String (Maybe NonLocalAttr))
ruleuses_Inh_VisitStep :: (Map Identifier (Map String (Maybe NonLocalAttr))) }
data Syn_VisitStep = Syn_VisitStep { Syn_VisitStep -> Set String
defs_Syn_VisitStep :: (Set String), Syn_VisitStep -> Seq Error
errors_Syn_VisitStep :: (Seq Error), Syn_VisitStep -> Int
index_Syn_VisitStep :: (Int), Syn_VisitStep -> Bool
isLast_Syn_VisitStep :: (Bool), Syn_VisitStep -> Set String
lazyIntras_Syn_VisitStep :: (Set String), Syn_VisitStep -> Map Identifier (Set VisitKind)
ruleKinds_Syn_VisitStep :: (Map Identifier (Set VisitKind)), Syn_VisitStep -> Map Identifier Int
ruleUsage_Syn_VisitStep :: (Map Identifier Int), Syn_VisitStep -> PP_Doc
sem_steps_Syn_VisitStep :: (PP_Doc), Syn_VisitStep -> Set String
usedArgs_Syn_VisitStep :: (Set String), Syn_VisitStep -> Map String (Maybe NonLocalAttr)
uses_Syn_VisitStep :: (Map String (Maybe NonLocalAttr)), Syn_VisitStep -> Map Int VisitKind
visitKinds_Syn_VisitStep :: (Map VisitIdentifier VisitKind) }
{-# INLINABLE wrap_VisitStep #-}
wrap_VisitStep :: T_VisitStep -> Inh_VisitStep -> (Syn_VisitStep )
wrap_VisitStep :: T_VisitStep -> Inh_VisitStep -> Syn_VisitStep
wrap_VisitStep (T_VisitStep Identity T_VisitStep_s50
act) (Inh_VisitStep Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses) =
Identity Syn_VisitStep -> Syn_VisitStep
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_VisitStep_s50
sem <- Identity T_VisitStep_s50
act
let arg49 :: T_VisitStep_vIn49
arg49 = Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> FormatMode
-> Int
-> Bool
-> VisitKind
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Options
-> Map Identifier (Set String)
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> T_VisitStep_vIn49
T_VisitStep_vIn49 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses
(T_VisitStep_vOut49 Set String
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Set String
_lhsOusedArgs Map String (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds) <- T_VisitStep_vOut49 -> Identity T_VisitStep_vOut49
forall (m :: * -> *) a. Monad m => a -> m a
return (T_VisitStep_s50 -> T_VisitStep_v49
inv_VisitStep_s50 T_VisitStep_s50
sem T_VisitStep_vIn49
arg49)
Syn_VisitStep -> Identity Syn_VisitStep
forall (m :: * -> *) a. Monad m => a -> m a
return (Set String
-> Seq Error
-> Int
-> Bool
-> Set String
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Set String
-> Map String (Maybe NonLocalAttr)
-> Map Int VisitKind
-> Syn_VisitStep
Syn_VisitStep Set String
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Set String
_lhsOusedArgs Map String (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds)
)
{-# NOINLINE sem_VisitStep #-}
sem_VisitStep :: VisitStep -> T_VisitStep
sem_VisitStep :: VisitStep -> T_VisitStep
sem_VisitStep ( Sem Identifier
name_ ) = Identifier -> T_VisitStep
sem_VisitStep_Sem Identifier
name_
sem_VisitStep ( ChildVisit Identifier
child_ Identifier
nonterm_ Int
visit_ ) = Identifier -> Identifier -> Int -> T_VisitStep
sem_VisitStep_ChildVisit Identifier
child_ Identifier
nonterm_ Int
visit_
sem_VisitStep ( PureGroup VisitSteps
steps_ Bool
ordered_ ) = T_VisitSteps -> Bool -> T_VisitStep
sem_VisitStep_PureGroup ( VisitSteps -> T_VisitSteps
sem_VisitSteps VisitSteps
steps_ ) Bool
ordered_
sem_VisitStep ( Sim VisitSteps
steps_ ) = T_VisitSteps -> T_VisitStep
sem_VisitStep_Sim ( VisitSteps -> T_VisitSteps
sem_VisitSteps VisitSteps
steps_ )
sem_VisitStep ( ChildIntro Identifier
child_ ) = Identifier -> T_VisitStep
sem_VisitStep_ChildIntro Identifier
child_
newtype T_VisitStep = T_VisitStep {
T_VisitStep -> Identity T_VisitStep_s50
attach_T_VisitStep :: Identity (T_VisitStep_s50 )
}
newtype T_VisitStep_s50 = C_VisitStep_s50 {
T_VisitStep_s50 -> T_VisitStep_v49
inv_VisitStep_s50 :: (T_VisitStep_v49 )
}
data T_VisitStep_s51 = C_VisitStep_s51
type T_VisitStep_v49 = (T_VisitStep_vIn49 ) -> (T_VisitStep_vOut49 )
data T_VisitStep_vIn49 = T_VisitStep_vIn49 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (FormatMode) (Int) (Bool) (VisitKind) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Options) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr)))
data T_VisitStep_vOut49 = T_VisitStep_vOut49 (Set String) (Seq Error) (Int) (Bool) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) (PP_Doc) (Set String) (Map String (Maybe NonLocalAttr)) (Map VisitIdentifier VisitKind)
{-# NOINLINE sem_VisitStep_Sem #-}
sem_VisitStep_Sem :: (Identifier) -> T_VisitStep
sem_VisitStep_Sem :: Identifier -> T_VisitStep
sem_VisitStep_Sem Identifier
arg_name_ = Identity T_VisitStep_s50 -> T_VisitStep
T_VisitStep (T_VisitStep_s50 -> Identity T_VisitStep_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_VisitStep_s50
st50) where
{-# NOINLINE st50 #-}
st50 :: T_VisitStep_s50
st50 = let
v49 :: T_VisitStep_v49
v49 :: T_VisitStep_v49
v49 = \ (T_VisitStep_vIn49 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses) -> ( let
_ruleItf :: VisitKind -> FormatMode -> Either Error PP_Doc
_ruleItf = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Identifier -> VisitKind -> FormatMode -> Either Error PP_Doc
rule731 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Identifier
arg_name_
_lhsOerrors :: Seq Error
(Seq Error
_lhsOerrors,PP_Doc
_sem_steps) = FormatMode
-> VisitKind
-> (VisitKind -> FormatMode -> Either Error PP_Doc)
-> (Seq Error, PP_Doc)
forall a.
FormatMode
-> VisitKind
-> (VisitKind -> FormatMode -> Either a PP_Doc)
-> (Seq a, PP_Doc)
rule732 FormatMode
_lhsIfmtMode VisitKind
_lhsIkind VisitKind -> FormatMode -> Either Error PP_Doc
_ruleItf
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = Identifier -> Map Identifier Int
forall k. k -> Map k Int
rule733 Identifier
arg_name_
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = VisitKind -> Identifier -> Map Identifier (Set VisitKind)
forall k. VisitKind -> k -> Map k (Set VisitKind)
rule734 VisitKind
_lhsIkind Identifier
arg_name_
_lhsOdefs :: Set String
_lhsOdefs :: Set String
_lhsOdefs = Map Identifier (Set String) -> Identifier -> Set String
rule735 Map Identifier (Set String)
_lhsIruledefs Identifier
arg_name_
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses = Map Identifier (Map String (Maybe NonLocalAttr))
-> Identifier -> Map String (Maybe NonLocalAttr)
rule736 Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses Identifier
arg_name_
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set String
_lhsOlazyIntras = () -> Set String
forall a. () -> Set a
rule737 ()
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps = PP_Doc -> PP_Doc
forall a. a -> a
rule738 PP_Doc
_sem_steps
_lhsOusedArgs :: Set String
_lhsOusedArgs :: Set String
_lhsOusedArgs = () -> Set String
forall a. () -> Set a
rule739 ()
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule740 ()
_lhsOindex :: Int
_lhsOindex :: Int
_lhsOindex = Int -> Int
rule741 Int
_lhsIindex
_lhsOisLast :: Bool
_lhsOisLast :: Bool
_lhsOisLast = Bool -> Bool
rule742 Bool
_lhsIisLast
__result_ :: T_VisitStep_vOut49
__result_ = Set String
-> Seq Error
-> Int
-> Bool
-> Set String
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Set String
-> Map String (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitStep_vOut49
T_VisitStep_vOut49 Set String
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Set String
_lhsOusedArgs Map String (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds
in T_VisitStep_vOut49
__result_ )
in T_VisitStep_v49 -> T_VisitStep_s50
C_VisitStep_s50 T_VisitStep_v49
v49
{-# INLINE rule731 #-}
{-# LINE 836 "src-ag/ExecutionPlan2Clean.ag" #-}
rule731 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) name_ ->
{-# LINE 836 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.findWithDefault (error $ "Rule " ++ show name_ ++ " not found") name_ _lhsImrules
{-# LINE 5774 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule732 #-}
{-# LINE 837 "src-ag/ExecutionPlan2Clean.ag" #-}
rule732 = \ ((_lhsIfmtMode) :: FormatMode) ((_lhsIkind) :: VisitKind) _ruleItf ->
{-# LINE 837 "src-ag/ExecutionPlan2Clean.ag" #-}
case _ruleItf _lhsIkind _lhsIfmtMode of
Left e -> (Seq.singleton e, empty)
Right stmt -> (Seq.empty, stmt)
{-# LINE 5782 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule733 #-}
{-# LINE 1278 "src-ag/ExecutionPlan2Clean.ag" #-}
rule733 = \ name_ ->
{-# LINE 1278 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton name_ 1
{-# LINE 5788 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule734 #-}
{-# LINE 1288 "src-ag/ExecutionPlan2Clean.ag" #-}
rule734 = \ ((_lhsIkind) :: VisitKind) name_ ->
{-# LINE 1288 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.singleton name_ (Set.singleton _lhsIkind)
{-# LINE 5794 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule735 #-}
{-# LINE 1373 "src-ag/ExecutionPlan2Clean.ag" #-}
rule735 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) name_ ->
{-# LINE 1373 "src-ag/ExecutionPlan2Clean.ag" #-}
maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruledefs
{-# LINE 5800 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule736 #-}
{-# LINE 1374 "src-ag/ExecutionPlan2Clean.ag" #-}
rule736 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) name_ ->
{-# LINE 1374 "src-ag/ExecutionPlan2Clean.ag" #-}
maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruleuses
{-# LINE 5806 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule737 #-}
rule737 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule738 #-}
rule738 = \ _sem_steps ->
_sem_steps
{-# INLINE rule739 #-}
rule739 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule740 #-}
rule740 = \ (_ :: ()) ->
mempty
{-# INLINE rule741 #-}
rule741 = \ ((_lhsIindex) :: Int) ->
_lhsIindex
{-# INLINE rule742 #-}
rule742 = \ ((_lhsIisLast) :: Bool) ->
_lhsIisLast
{-# NOINLINE sem_VisitStep_ChildVisit #-}
sem_VisitStep_ChildVisit :: (Identifier) -> (NontermIdent) -> (VisitIdentifier) -> T_VisitStep
sem_VisitStep_ChildVisit :: Identifier -> Identifier -> Int -> T_VisitStep
sem_VisitStep_ChildVisit Identifier
arg_child_ Identifier
_ Int
arg_visit_ = Identity T_VisitStep_s50 -> T_VisitStep
T_VisitStep (T_VisitStep_s50 -> Identity T_VisitStep_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_VisitStep_s50
st50) where
{-# NOINLINE st50 #-}
st50 :: T_VisitStep_s50
st50 = let
v49 :: T_VisitStep_v49
v49 :: T_VisitStep_v49
v49 = \ (T_VisitStep_vIn49 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses) -> ( let
_visitItf :: Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)
_visitItf = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Int -> Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)
rule743 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Int
arg_visit_
_lhsOerrors :: Seq Error
(Seq Error
_lhsOerrors,PP_Doc
_patPP,PP_Doc
_exprPP) = VisitKind
-> (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Identifier
-> (Seq Error, PP_Doc, PP_Doc)
forall t a.
VisitKind
-> (t -> VisitKind -> Either a (PP_Doc, PP_Doc))
-> t
-> (Seq a, PP_Doc, PP_Doc)
rule744 VisitKind
_lhsIkind Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)
_visitItf Identifier
arg_child_
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps = PP_Doc -> FormatMode -> VisitKind -> PP_Doc -> PP_Doc
rule745 PP_Doc
_exprPP FormatMode
_lhsIfmtMode VisitKind
_lhsIkind PP_Doc
_patPP
_convToMonad :: PP_Doc
_convToMonad = VisitKind -> PP_Doc
rule746 VisitKind
_callKind
_callKind :: VisitKind
_callKind = Map Int VisitKind -> Int -> VisitKind
rule747 Map Int VisitKind
_lhsIallVisitKinds Int
arg_visit_
_lhsOdefs :: Set String
_lhsOdefs :: Set String
_lhsOdefs = Map Int (Set Identifier)
-> Options -> Int -> Identifier -> Int -> Set String
rule748 Map Int (Set Identifier)
_lhsIavisitdefs Options
_lhsIoptions Int
_to Identifier
arg_child_ Int
arg_visit_
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses = Int
-> Map Int (Set Identifier)
-> Options
-> Identifier
-> Int
-> Map String (Maybe NonLocalAttr)
rule749 Int
_from Map Int (Set Identifier)
_lhsIavisituses Options
_lhsIoptions Identifier
arg_child_ Int
arg_visit_
_addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule750 Options
_lhsIoptions
(Int
_from,Int
_to) = Map Int (Int, Int) -> Int -> (Int, Int)
rule751 Map Int (Int, Int)
_lhsIallFromToStates Int
arg_visit_
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set String
_lhsOlazyIntras = () -> Set String
forall a. () -> Set a
rule752 ()
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = () -> Map Identifier (Set VisitKind)
forall k a. () -> Map k a
rule753 ()
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = () -> Map Identifier Int
forall k a. () -> Map k a
rule754 ()
_lhsOusedArgs :: Set String
_lhsOusedArgs :: Set String
_lhsOusedArgs = () -> Set String
forall a. () -> Set a
rule755 ()
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule756 ()
_lhsOindex :: Int
_lhsOindex :: Int
_lhsOindex = Int -> Int
rule757 Int
_lhsIindex
_lhsOisLast :: Bool
_lhsOisLast :: Bool
_lhsOisLast = Bool -> Bool
rule758 Bool
_lhsIisLast
__result_ :: T_VisitStep_vOut49
__result_ = Set String
-> Seq Error
-> Int
-> Bool
-> Set String
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Set String
-> Map String (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitStep_vOut49
T_VisitStep_vOut49 Set String
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Set String
_lhsOusedArgs Map String (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds
in T_VisitStep_vOut49
__result_ )
in T_VisitStep_v49 -> T_VisitStep_s50
C_VisitStep_s50 T_VisitStep_v49
v49
{-# INLINE rule743 #-}
{-# LINE 845 "src-ag/ExecutionPlan2Clean.ag" #-}
rule743 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) visit_ ->
{-# LINE 845 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.findWithDefault (error $ "Visit " ++ show visit_ ++ " not found") visit_ _lhsIallchildvisit
{-# LINE 5867 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule744 #-}
{-# LINE 846 "src-ag/ExecutionPlan2Clean.ag" #-}
rule744 = \ ((_lhsIkind) :: VisitKind) _visitItf child_ ->
{-# LINE 846 "src-ag/ExecutionPlan2Clean.ag" #-}
case _visitItf child_ _lhsIkind of
Left e -> (Seq.singleton e, empty, empty)
Right (pat,expr) -> (Seq.empty, pat, expr)
{-# LINE 5875 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule745 #-}
{-# LINE 850 "src-ag/ExecutionPlan2Clean.ag" #-}
rule745 = \ _exprPP ((_lhsIfmtMode) :: FormatMode) ((_lhsIkind) :: VisitKind) _patPP ->
{-# LINE 850 "src-ag/ExecutionPlan2Clean.ag" #-}
let decl = case _lhsIkind of
VisitPure _ -> _patPP >#< "=" >#< _exprPP
VisitMonadic -> _exprPP >#< ">>= \\" >#< _patPP >#< "->"
in fmtDecl False _lhsIfmtMode decl
{-# LINE 5884 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule746 #-}
{-# LINE 854 "src-ag/ExecutionPlan2Clean.ag" #-}
rule746 = \ _callKind ->
{-# LINE 854 "src-ag/ExecutionPlan2Clean.ag" #-}
case _callKind of
VisitPure _ -> text "lift"
VisitMonadic -> empty
{-# LINE 5892 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule747 #-}
{-# LINE 857 "src-ag/ExecutionPlan2Clean.ag" #-}
rule747 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) visit_ ->
{-# LINE 857 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.findWithDefault (error "visit kind should be in the map") visit_ _lhsIallVisitKinds
{-# LINE 5898 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule748 #-}
{-# LINE 1375 "src-ag/ExecutionPlan2Clean.ag" #-}
rule748 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_lhsIoptions) :: Options) _to child_ visit_ ->
{-# LINE 1375 "src-ag/ExecutionPlan2Clean.ag" #-}
Set.insert (stname child_ _to) $ maybe (error "Visit not found") (Set.map $ attrname _lhsIoptions True child_) $ Map.lookup visit_ _lhsIavisitdefs
{-# LINE 5904 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule749 #-}
{-# LINE 1376 "src-ag/ExecutionPlan2Clean.ag" #-}
rule749 = \ _from ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ((_lhsIoptions) :: Options) child_ visit_ ->
{-# LINE 1376 "src-ag/ExecutionPlan2Clean.ag" #-}
let convert attrs = Map.fromList [ (attrname _lhsIoptions False child_ attr, Just $ mkNonLocalAttr True child_ attr) | attr <- Set.elems attrs ]
in Map.insert (stname child_ _from) Nothing $ convert $
maybe (error "Visit not found") id $ Map.lookup visit_ _lhsIavisituses
{-# LINE 5912 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule750 #-}
{-# LINE 1570 "src-ag/ExecutionPlan2Clean.ag" #-}
rule750 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 1570 "src-ag/ExecutionPlan2Clean.ag" #-}
\x -> if bangpats _lhsIoptions then "!" >|< x else x
{-# LINE 5918 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule751 #-}
{-# LINE 1606 "src-ag/ExecutionPlan2Clean.ag" #-}
rule751 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) visit_ ->
{-# LINE 1606 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.findWithDefault (error "visit not in allFromToStates") visit_ _lhsIallFromToStates
{-# LINE 5924 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule752 #-}
rule752 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule753 #-}
rule753 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule754 #-}
rule754 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule755 #-}
rule755 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule756 #-}
rule756 = \ (_ :: ()) ->
mempty
{-# INLINE rule757 #-}
rule757 = \ ((_lhsIindex) :: Int) ->
_lhsIindex
{-# INLINE rule758 #-}
rule758 = \ ((_lhsIisLast) :: Bool) ->
_lhsIisLast
{-# NOINLINE sem_VisitStep_PureGroup #-}
sem_VisitStep_PureGroup :: T_VisitSteps -> (Bool) -> T_VisitStep
sem_VisitStep_PureGroup :: T_VisitSteps -> Bool -> T_VisitStep
sem_VisitStep_PureGroup T_VisitSteps
arg_steps_ Bool
arg_ordered_ = Identity T_VisitStep_s50 -> T_VisitStep
T_VisitStep (T_VisitStep_s50 -> Identity T_VisitStep_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_VisitStep_s50
st50) where
{-# NOINLINE st50 #-}
st50 :: T_VisitStep_s50
st50 = let
v49 :: T_VisitStep_v49
v49 :: T_VisitStep_v49
v49 = \ (T_VisitStep_vIn49 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses) -> ( let
_stepsX53 :: T_VisitSteps_s53
_stepsX53 = Identity T_VisitSteps_s53 -> T_VisitSteps_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_VisitSteps -> Identity T_VisitSteps_s53
attach_T_VisitSteps (T_VisitSteps
arg_steps_))
(T_VisitSteps_vOut52 Set String
_stepsIdefs Seq Error
_stepsIerrors Int
_stepsIindex Bool
_stepsIisLast Set String
_stepsIlazyIntras Map Identifier (Set VisitKind)
_stepsIruleKinds Map Identifier Int
_stepsIruleUsage PP_Doc
_stepsIsem_steps Int
_stepsIsize Set String
_stepsIusedArgs Map String (Maybe NonLocalAttr)
_stepsIuses Map Int VisitKind
_stepsIvisitKinds) = T_VisitSteps_s53 -> T_VisitSteps_v52
inv_VisitSteps_s53 T_VisitSteps_s53
_stepsX53 (Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> FormatMode
-> Int
-> VisitKind
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Options
-> Map Identifier (Set String)
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> T_VisitSteps_vIn52
T_VisitSteps_vIn52 Map Int (Int, Int)
_stepsOallFromToStates Map Identifier Int
_stepsOallInitStates Map Int VisitKind
_stepsOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_stepsOallchildvisit Map Int (Set Identifier)
_stepsOavisitdefs Map Int (Set Identifier)
_stepsOavisituses Attributes
_stepsOchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_stepsOchildintros FormatMode
_stepsOfmtMode Int
_stepsOindex VisitKind
_stepsOkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_stepsOmrules Options
_stepsOoptions Map Identifier (Set String)
_stepsOruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_stepsOruleuses)
_stepsOkind :: VisitKind
_stepsOkind = Bool -> VisitKind
rule759 Bool
arg_ordered_
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps = FormatMode -> PP_Doc -> PP_Doc
rule760 FormatMode
_lhsIfmtMode PP_Doc
_stepsIsem_steps
_stepsOfmtMode :: FormatMode
_stepsOfmtMode = FormatMode -> FormatMode
rule761 FormatMode
_lhsIfmtMode
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set String
_lhsOlazyIntras = Set String -> Set String -> Bool -> Set String
rule762 Set String
_stepsIdefs Set String
_stepsIlazyIntras Bool
arg_ordered_
_lhsOdefs :: Set String
_lhsOdefs :: Set String
_lhsOdefs = Set String -> Set String
rule763 Set String
_stepsIdefs
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule764 Seq Error
_stepsIerrors
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule765 Map Identifier (Set VisitKind)
_stepsIruleKinds
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = Map Identifier Int -> Map Identifier Int
rule766 Map Identifier Int
_stepsIruleUsage
_lhsOusedArgs :: Set String
_lhsOusedArgs :: Set String
_lhsOusedArgs = Set String -> Set String
rule767 Set String
_stepsIusedArgs
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses = Map String (Maybe NonLocalAttr) -> Map String (Maybe NonLocalAttr)
rule768 Map String (Maybe NonLocalAttr)
_stepsIuses
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind
rule769 Map Int VisitKind
_stepsIvisitKinds
_lhsOindex :: Int
_lhsOindex :: Int
_lhsOindex = Int -> Int
rule770 Int
_stepsIindex
_lhsOisLast :: Bool
_lhsOisLast :: Bool
_lhsOisLast = Bool -> Bool
rule771 Bool
_stepsIisLast
_stepsOallFromToStates :: Map Int (Int, Int)
_stepsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule772 Map Int (Int, Int)
_lhsIallFromToStates
_stepsOallInitStates :: Map Identifier Int
_stepsOallInitStates = Map Identifier Int -> Map Identifier Int
rule773 Map Identifier Int
_lhsIallInitStates
_stepsOallVisitKinds :: Map Int VisitKind
_stepsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule774 Map Int VisitKind
_lhsIallVisitKinds
_stepsOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_stepsOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule775 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
_stepsOavisitdefs :: Map Int (Set Identifier)
_stepsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule776 Map Int (Set Identifier)
_lhsIavisitdefs
_stepsOavisituses :: Map Int (Set Identifier)
_stepsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule777 Map Int (Set Identifier)
_lhsIavisituses
_stepsOchildTypes :: Attributes
_stepsOchildTypes = Attributes -> Attributes
rule778 Attributes
_lhsIchildTypes
_stepsOchildintros :: Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_stepsOchildintros = Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
rule779 Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros
_stepsOindex :: Int
_stepsOindex = Int -> Int
rule780 Int
_lhsIindex
_stepsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_stepsOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule781 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
_stepsOoptions :: Options
_stepsOoptions = Options -> Options
rule782 Options
_lhsIoptions
_stepsOruledefs :: Map Identifier (Set String)
_stepsOruledefs = Map Identifier (Set String) -> Map Identifier (Set String)
rule783 Map Identifier (Set String)
_lhsIruledefs
_stepsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
_stepsOruleuses = Map Identifier (Map String (Maybe NonLocalAttr))
-> Map Identifier (Map String (Maybe NonLocalAttr))
rule784 Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses
__result_ :: T_VisitStep_vOut49
__result_ = Set String
-> Seq Error
-> Int
-> Bool
-> Set String
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Set String
-> Map String (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitStep_vOut49
T_VisitStep_vOut49 Set String
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Set String
_lhsOusedArgs Map String (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds
in T_VisitStep_vOut49
__result_ )
in T_VisitStep_v49 -> T_VisitStep_s50
C_VisitStep_s50 T_VisitStep_v49
v49
{-# INLINE rule759 #-}
{-# LINE 831 "src-ag/ExecutionPlan2Clean.ag" #-}
rule759 = \ ordered_ ->
{-# LINE 831 "src-ag/ExecutionPlan2Clean.ag" #-}
VisitPure ordered_
{-# LINE 6000 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule760 #-}
{-# LINE 859 "src-ag/ExecutionPlan2Clean.ag" #-}
rule760 = \ ((_lhsIfmtMode) :: FormatMode) ((_stepsIsem_steps) :: PP_Doc) ->
{-# LINE 859 "src-ag/ExecutionPlan2Clean.ag" #-}
case _lhsIfmtMode of
FormatDo -> "let" >#< _stepsIsem_steps
_ -> _stepsIsem_steps
{-# LINE 6008 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule761 #-}
{-# LINE 874 "src-ag/ExecutionPlan2Clean.ag" #-}
rule761 = \ ((_lhsIfmtMode) :: FormatMode) ->
{-# LINE 874 "src-ag/ExecutionPlan2Clean.ag" #-}
case _lhsIfmtMode of
FormatDo -> FormatLetDecl
mode -> mode
{-# LINE 6016 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule762 #-}
{-# LINE 1396 "src-ag/ExecutionPlan2Clean.ag" #-}
rule762 = \ ((_stepsIdefs) :: Set String) ((_stepsIlazyIntras) :: Set String) ordered_ ->
{-# LINE 1396 "src-ag/ExecutionPlan2Clean.ag" #-}
if ordered_
then _stepsIlazyIntras
else _stepsIdefs
{-# LINE 6024 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule763 #-}
rule763 = \ ((_stepsIdefs) :: Set String) ->
_stepsIdefs
{-# INLINE rule764 #-}
rule764 = \ ((_stepsIerrors) :: Seq Error) ->
_stepsIerrors
{-# INLINE rule765 #-}
rule765 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->
_stepsIruleKinds
{-# INLINE rule766 #-}
rule766 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->
_stepsIruleUsage
{-# INLINE rule767 #-}
rule767 = \ ((_stepsIusedArgs) :: Set String) ->
_stepsIusedArgs
{-# INLINE rule768 #-}
rule768 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) ->
_stepsIuses
{-# INLINE rule769 #-}
rule769 = \ ((_stepsIvisitKinds) :: Map VisitIdentifier VisitKind) ->
_stepsIvisitKinds
{-# INLINE rule770 #-}
rule770 = \ ((_stepsIindex) :: Int) ->
_stepsIindex
{-# INLINE rule771 #-}
rule771 = \ ((_stepsIisLast) :: Bool) ->
_stepsIisLast
{-# INLINE rule772 #-}
rule772 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule773 #-}
rule773 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule774 #-}
rule774 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule775 #-}
rule775 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
_lhsIallchildvisit
{-# INLINE rule776 #-}
rule776 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule777 #-}
rule777 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule778 #-}
rule778 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->
_lhsIchildTypes
{-# INLINE rule779 #-}
rule779 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
_lhsIchildintros
{-# INLINE rule780 #-}
rule780 = \ ((_lhsIindex) :: Int) ->
_lhsIindex
{-# INLINE rule781 #-}
rule781 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
_lhsImrules
{-# INLINE rule782 #-}
rule782 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule783 #-}
rule783 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->
_lhsIruledefs
{-# INLINE rule784 #-}
rule784 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
_lhsIruleuses
{-# NOINLINE sem_VisitStep_Sim #-}
sem_VisitStep_Sim :: T_VisitSteps -> T_VisitStep
sem_VisitStep_Sim :: T_VisitSteps -> T_VisitStep
sem_VisitStep_Sim T_VisitSteps
arg_steps_ = Identity T_VisitStep_s50 -> T_VisitStep
T_VisitStep (T_VisitStep_s50 -> Identity T_VisitStep_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_VisitStep_s50
st50) where
{-# NOINLINE st50 #-}
st50 :: T_VisitStep_s50
st50 = let
v49 :: T_VisitStep_v49
v49 :: T_VisitStep_v49
v49 = \ (T_VisitStep_vIn49 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses) -> ( let
_stepsX53 :: T_VisitSteps_s53
_stepsX53 = Identity T_VisitSteps_s53 -> T_VisitSteps_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_VisitSteps -> Identity T_VisitSteps_s53
attach_T_VisitSteps (T_VisitSteps
arg_steps_))
(T_VisitSteps_vOut52 Set String
_stepsIdefs Seq Error
_stepsIerrors Int
_stepsIindex Bool
_stepsIisLast Set String
_stepsIlazyIntras Map Identifier (Set VisitKind)
_stepsIruleKinds Map Identifier Int
_stepsIruleUsage PP_Doc
_stepsIsem_steps Int
_stepsIsize Set String
_stepsIusedArgs Map String (Maybe NonLocalAttr)
_stepsIuses Map Int VisitKind
_stepsIvisitKinds) = T_VisitSteps_s53 -> T_VisitSteps_v52
inv_VisitSteps_s53 T_VisitSteps_s53
_stepsX53 (Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> FormatMode
-> Int
-> VisitKind
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Options
-> Map Identifier (Set String)
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> T_VisitSteps_vIn52
T_VisitSteps_vIn52 Map Int (Int, Int)
_stepsOallFromToStates Map Identifier Int
_stepsOallInitStates Map Int VisitKind
_stepsOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_stepsOallchildvisit Map Int (Set Identifier)
_stepsOavisitdefs Map Int (Set Identifier)
_stepsOavisituses Attributes
_stepsOchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_stepsOchildintros FormatMode
_stepsOfmtMode Int
_stepsOindex VisitKind
_stepsOkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_stepsOmrules Options
_stepsOoptions Map Identifier (Set String)
_stepsOruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_stepsOruleuses)
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps = PP_Doc -> PP_Doc
rule785 PP_Doc
_stepsIsem_steps
_stepsOindex :: Int
_stepsOindex = () -> Int
rule786 ()
_lhsOindex :: Int
_lhsOindex :: Int
_lhsOindex = Int -> Int
rule787 Int
_lhsIindex
_isMonadic :: Bool
_isMonadic = VisitKind -> Bool
rule788 VisitKind
_lhsIkind
_lhsOdefs :: Set String
_lhsOdefs :: Set String
_lhsOdefs = Set String -> Set String
rule789 Set String
_stepsIdefs
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule790 Seq Error
_stepsIerrors
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set String
_lhsOlazyIntras = Set String -> Set String
rule791 Set String
_stepsIlazyIntras
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule792 Map Identifier (Set VisitKind)
_stepsIruleKinds
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = Map Identifier Int -> Map Identifier Int
rule793 Map Identifier Int
_stepsIruleUsage
_lhsOusedArgs :: Set String
_lhsOusedArgs :: Set String
_lhsOusedArgs = Set String -> Set String
rule794 Set String
_stepsIusedArgs
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses = Map String (Maybe NonLocalAttr) -> Map String (Maybe NonLocalAttr)
rule795 Map String (Maybe NonLocalAttr)
_stepsIuses
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind
rule796 Map Int VisitKind
_stepsIvisitKinds
_lhsOisLast :: Bool
_lhsOisLast :: Bool
_lhsOisLast = Bool -> Bool
rule797 Bool
_stepsIisLast
_stepsOallFromToStates :: Map Int (Int, Int)
_stepsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule798 Map Int (Int, Int)
_lhsIallFromToStates
_stepsOallInitStates :: Map Identifier Int
_stepsOallInitStates = Map Identifier Int -> Map Identifier Int
rule799 Map Identifier Int
_lhsIallInitStates
_stepsOallVisitKinds :: Map Int VisitKind
_stepsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule800 Map Int VisitKind
_lhsIallVisitKinds
_stepsOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_stepsOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule801 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
_stepsOavisitdefs :: Map Int (Set Identifier)
_stepsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule802 Map Int (Set Identifier)
_lhsIavisitdefs
_stepsOavisituses :: Map Int (Set Identifier)
_stepsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule803 Map Int (Set Identifier)
_lhsIavisituses
_stepsOchildTypes :: Attributes
_stepsOchildTypes = Attributes -> Attributes
rule804 Attributes
_lhsIchildTypes
_stepsOchildintros :: Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_stepsOchildintros = Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
rule805 Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros
_stepsOfmtMode :: FormatMode
_stepsOfmtMode = FormatMode -> FormatMode
rule806 FormatMode
_lhsIfmtMode
_stepsOkind :: VisitKind
_stepsOkind = VisitKind -> VisitKind
rule807 VisitKind
_lhsIkind
_stepsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_stepsOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule808 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
_stepsOoptions :: Options
_stepsOoptions = Options -> Options
rule809 Options
_lhsIoptions
_stepsOruledefs :: Map Identifier (Set String)
_stepsOruledefs = Map Identifier (Set String) -> Map Identifier (Set String)
rule810 Map Identifier (Set String)
_lhsIruledefs
_stepsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
_stepsOruleuses = Map Identifier (Map String (Maybe NonLocalAttr))
-> Map Identifier (Map String (Maybe NonLocalAttr))
rule811 Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses
__result_ :: T_VisitStep_vOut49
__result_ = Set String
-> Seq Error
-> Int
-> Bool
-> Set String
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Set String
-> Map String (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitStep_vOut49
T_VisitStep_vOut49 Set String
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Set String
_lhsOusedArgs Map String (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds
in T_VisitStep_vOut49
__result_ )
in T_VisitStep_v49 -> T_VisitStep_s50
C_VisitStep_s50 T_VisitStep_v49
v49
{-# INLINE rule785 #-}
{-# LINE 858 "src-ag/ExecutionPlan2Clean.ag" #-}
rule785 = \ ((_stepsIsem_steps) :: PP_Doc) ->
{-# LINE 858 "src-ag/ExecutionPlan2Clean.ag" #-}
_stepsIsem_steps
{-# LINE 6146 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule786 #-}
{-# LINE 918 "src-ag/ExecutionPlan2Clean.ag" #-}
rule786 = \ (_ :: ()) ->
{-# LINE 918 "src-ag/ExecutionPlan2Clean.ag" #-}
0
{-# LINE 6152 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule787 #-}
{-# LINE 919 "src-ag/ExecutionPlan2Clean.ag" #-}
rule787 = \ ((_lhsIindex) :: Int) ->
{-# LINE 919 "src-ag/ExecutionPlan2Clean.ag" #-}
_lhsIindex
{-# LINE 6158 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule788 #-}
{-# LINE 930 "src-ag/ExecutionPlan2Clean.ag" #-}
rule788 = \ ((_lhsIkind) :: VisitKind) ->
{-# LINE 930 "src-ag/ExecutionPlan2Clean.ag" #-}
case _lhsIkind of
VisitMonadic -> True
_ -> False
{-# LINE 6166 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule789 #-}
rule789 = \ ((_stepsIdefs) :: Set String) ->
_stepsIdefs
{-# INLINE rule790 #-}
rule790 = \ ((_stepsIerrors) :: Seq Error) ->
_stepsIerrors
{-# INLINE rule791 #-}
rule791 = \ ((_stepsIlazyIntras) :: Set String) ->
_stepsIlazyIntras
{-# INLINE rule792 #-}
rule792 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->
_stepsIruleKinds
{-# INLINE rule793 #-}
rule793 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->
_stepsIruleUsage
{-# INLINE rule794 #-}
rule794 = \ ((_stepsIusedArgs) :: Set String) ->
_stepsIusedArgs
{-# INLINE rule795 #-}
rule795 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) ->
_stepsIuses
{-# INLINE rule796 #-}
rule796 = \ ((_stepsIvisitKinds) :: Map VisitIdentifier VisitKind) ->
_stepsIvisitKinds
{-# INLINE rule797 #-}
rule797 = \ ((_stepsIisLast) :: Bool) ->
_stepsIisLast
{-# INLINE rule798 #-}
rule798 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule799 #-}
rule799 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule800 #-}
rule800 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule801 #-}
rule801 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
_lhsIallchildvisit
{-# INLINE rule802 #-}
rule802 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule803 #-}
rule803 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule804 #-}
rule804 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->
_lhsIchildTypes
{-# INLINE rule805 #-}
rule805 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
_lhsIchildintros
{-# INLINE rule806 #-}
rule806 = \ ((_lhsIfmtMode) :: FormatMode) ->
_lhsIfmtMode
{-# INLINE rule807 #-}
rule807 = \ ((_lhsIkind) :: VisitKind) ->
_lhsIkind
{-# INLINE rule808 #-}
rule808 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
_lhsImrules
{-# INLINE rule809 #-}
rule809 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule810 #-}
rule810 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->
_lhsIruledefs
{-# INLINE rule811 #-}
rule811 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
_lhsIruleuses
{-# NOINLINE sem_VisitStep_ChildIntro #-}
sem_VisitStep_ChildIntro :: (Identifier) -> T_VisitStep
sem_VisitStep_ChildIntro :: Identifier -> T_VisitStep
sem_VisitStep_ChildIntro Identifier
arg_child_ = Identity T_VisitStep_s50 -> T_VisitStep
T_VisitStep (T_VisitStep_s50 -> Identity T_VisitStep_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_VisitStep_s50
st50) where
{-# NOINLINE st50 #-}
st50 :: T_VisitStep_s50
st50 = let
v49 :: T_VisitStep_v49
v49 :: T_VisitStep_v49
v49 = \ (T_VisitStep_vIn49 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses) -> ( let
_attachItf :: VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))
_attachItf = Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Identifier
-> VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))
rule812 Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
arg_child_
_lhsOerrors :: Seq Error
_lhsOsem_steps :: PP_Doc
_lhsOdefs :: Set String
_lhsOuses :: Map String (Maybe NonLocalAttr)
(Seq Error
_lhsOerrors,PP_Doc
_lhsOsem_steps,Set String
_lhsOdefs,Map String (Maybe NonLocalAttr)
_lhsOuses) = (VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> FormatMode
-> VisitKind
-> (Seq Error, PP_Doc, Set String, Map String (Maybe NonLocalAttr))
forall a a k a.
(VisitKind -> FormatMode -> Either a (PP_Doc, Set a, Map k a))
-> FormatMode -> VisitKind -> (Seq a, PP_Doc, Set a, Map k a)
rule813 VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr))
_attachItf FormatMode
_lhsIfmtMode VisitKind
_lhsIkind
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set String
_lhsOlazyIntras = () -> Set String
forall a. () -> Set a
rule814 ()
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = () -> Map Identifier (Set VisitKind)
forall k a. () -> Map k a
rule815 ()
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = () -> Map Identifier Int
forall k a. () -> Map k a
rule816 ()
_lhsOusedArgs :: Set String
_lhsOusedArgs :: Set String
_lhsOusedArgs = () -> Set String
forall a. () -> Set a
rule817 ()
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule818 ()
_lhsOindex :: Int
_lhsOindex :: Int
_lhsOindex = Int -> Int
rule819 Int
_lhsIindex
_lhsOisLast :: Bool
_lhsOisLast :: Bool
_lhsOisLast = Bool -> Bool
rule820 Bool
_lhsIisLast
__result_ :: T_VisitStep_vOut49
__result_ = Set String
-> Seq Error
-> Int
-> Bool
-> Set String
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Set String
-> Map String (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitStep_vOut49
T_VisitStep_vOut49 Set String
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Set String
_lhsOusedArgs Map String (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds
in T_VisitStep_vOut49
__result_ )
in T_VisitStep_v49 -> T_VisitStep_s50
C_VisitStep_s50 T_VisitStep_v49
v49
{-# INLINE rule812 #-}
{-# LINE 840 "src-ag/ExecutionPlan2Clean.ag" #-}
rule812 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) child_ ->
{-# LINE 840 "src-ag/ExecutionPlan2Clean.ag" #-}
Map.findWithDefault (error $ "Child " ++ show child_ ++ " not found") child_ _lhsIchildintros
{-# LINE 6271 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule813 #-}
{-# LINE 842 "src-ag/ExecutionPlan2Clean.ag" #-}
rule813 = \ _attachItf ((_lhsIfmtMode) :: FormatMode) ((_lhsIkind) :: VisitKind) ->
{-# LINE 842 "src-ag/ExecutionPlan2Clean.ag" #-}
case _attachItf _lhsIkind _lhsIfmtMode of
Left e -> (Seq.singleton e, empty, Set.empty, Map.empty)
Right (code, defs, uses) -> (Seq.empty, code, defs, uses)
{-# LINE 6279 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule814 #-}
rule814 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule815 #-}
rule815 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule816 #-}
rule816 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule817 #-}
rule817 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule818 #-}
rule818 = \ (_ :: ()) ->
mempty
{-# INLINE rule819 #-}
rule819 = \ ((_lhsIindex) :: Int) ->
_lhsIindex
{-# INLINE rule820 #-}
rule820 = \ ((_lhsIisLast) :: Bool) ->
_lhsIisLast
data Inh_VisitSteps = Inh_VisitSteps { Inh_VisitSteps -> Map Int (Int, Int)
allFromToStates_Inh_VisitSteps :: (Map VisitIdentifier (Int,Int)), Inh_VisitSteps -> Map Identifier Int
allInitStates_Inh_VisitSteps :: (Map NontermIdent Int), Inh_VisitSteps -> Map Int VisitKind
allVisitKinds_Inh_VisitSteps :: (Map VisitIdentifier VisitKind), Inh_VisitSteps
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
allchildvisit_Inh_VisitSteps :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Inh_VisitSteps -> Map Int (Set Identifier)
avisitdefs_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)), Inh_VisitSteps -> Map Int (Set Identifier)
avisituses_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)), Inh_VisitSteps -> Attributes
childTypes_Inh_VisitSteps :: (Map Identifier Type), Inh_VisitSteps
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
childintros_Inh_VisitSteps :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), Inh_VisitSteps -> FormatMode
fmtMode_Inh_VisitSteps :: (FormatMode), Inh_VisitSteps -> Int
index_Inh_VisitSteps :: (Int), Inh_VisitSteps -> VisitKind
kind_Inh_VisitSteps :: (VisitKind), Inh_VisitSteps
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
mrules_Inh_VisitSteps :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), Inh_VisitSteps -> Options
options_Inh_VisitSteps :: (Options), Inh_VisitSteps -> Map Identifier (Set String)
ruledefs_Inh_VisitSteps :: (Map Identifier (Set String)), Inh_VisitSteps -> Map Identifier (Map String (Maybe NonLocalAttr))
ruleuses_Inh_VisitSteps :: (Map Identifier (Map String (Maybe NonLocalAttr))) }
data Syn_VisitSteps = Syn_VisitSteps { Syn_VisitSteps -> Set String
defs_Syn_VisitSteps :: (Set String), Syn_VisitSteps -> Seq Error
errors_Syn_VisitSteps :: (Seq Error), Syn_VisitSteps -> Int
index_Syn_VisitSteps :: (Int), Syn_VisitSteps -> Bool
isLast_Syn_VisitSteps :: (Bool), Syn_VisitSteps -> Set String
lazyIntras_Syn_VisitSteps :: (Set String), Syn_VisitSteps -> Map Identifier (Set VisitKind)
ruleKinds_Syn_VisitSteps :: (Map Identifier (Set VisitKind)), Syn_VisitSteps -> Map Identifier Int
ruleUsage_Syn_VisitSteps :: (Map Identifier Int), Syn_VisitSteps -> PP_Doc
sem_steps_Syn_VisitSteps :: (PP_Doc), Syn_VisitSteps -> Int
size_Syn_VisitSteps :: (Int), Syn_VisitSteps -> Set String
usedArgs_Syn_VisitSteps :: (Set String), Syn_VisitSteps -> Map String (Maybe NonLocalAttr)
uses_Syn_VisitSteps :: (Map String (Maybe NonLocalAttr)), Syn_VisitSteps -> Map Int VisitKind
visitKinds_Syn_VisitSteps :: (Map VisitIdentifier VisitKind) }
{-# INLINABLE wrap_VisitSteps #-}
wrap_VisitSteps :: T_VisitSteps -> Inh_VisitSteps -> (Syn_VisitSteps )
wrap_VisitSteps :: T_VisitSteps -> Inh_VisitSteps -> Syn_VisitSteps
wrap_VisitSteps (T_VisitSteps Identity T_VisitSteps_s53
act) (Inh_VisitSteps Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses) =
Identity Syn_VisitSteps -> Syn_VisitSteps
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_VisitSteps_s53
sem <- Identity T_VisitSteps_s53
act
let arg52 :: T_VisitSteps_vIn52
arg52 = Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> FormatMode
-> Int
-> VisitKind
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Options
-> Map Identifier (Set String)
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> T_VisitSteps_vIn52
T_VisitSteps_vIn52 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses
(T_VisitSteps_vOut52 Set String
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Int
_lhsOsize Set String
_lhsOusedArgs Map String (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds) <- T_VisitSteps_vOut52 -> Identity T_VisitSteps_vOut52
forall (m :: * -> *) a. Monad m => a -> m a
return (T_VisitSteps_s53 -> T_VisitSteps_v52
inv_VisitSteps_s53 T_VisitSteps_s53
sem T_VisitSteps_vIn52
arg52)
Syn_VisitSteps -> Identity Syn_VisitSteps
forall (m :: * -> *) a. Monad m => a -> m a
return (Set String
-> Seq Error
-> Int
-> Bool
-> Set String
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Int
-> Set String
-> Map String (Maybe NonLocalAttr)
-> Map Int VisitKind
-> Syn_VisitSteps
Syn_VisitSteps Set String
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Int
_lhsOsize Set String
_lhsOusedArgs Map String (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds)
)
{-# NOINLINE sem_VisitSteps #-}
sem_VisitSteps :: VisitSteps -> T_VisitSteps
sem_VisitSteps :: VisitSteps -> T_VisitSteps
sem_VisitSteps VisitSteps
list = (T_VisitStep -> T_VisitSteps -> T_VisitSteps)
-> T_VisitSteps -> [T_VisitStep] -> T_VisitSteps
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_VisitStep -> T_VisitSteps -> T_VisitSteps
sem_VisitSteps_Cons T_VisitSteps
sem_VisitSteps_Nil ((VisitStep -> T_VisitStep) -> VisitSteps -> [T_VisitStep]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map VisitStep -> T_VisitStep
sem_VisitStep VisitSteps
list)
newtype T_VisitSteps = T_VisitSteps {
T_VisitSteps -> Identity T_VisitSteps_s53
attach_T_VisitSteps :: Identity (T_VisitSteps_s53 )
}
newtype T_VisitSteps_s53 = C_VisitSteps_s53 {
T_VisitSteps_s53 -> T_VisitSteps_v52
inv_VisitSteps_s53 :: (T_VisitSteps_v52 )
}
data T_VisitSteps_s54 = C_VisitSteps_s54
type T_VisitSteps_v52 = (T_VisitSteps_vIn52 ) -> (T_VisitSteps_vOut52 )
data T_VisitSteps_vIn52 = T_VisitSteps_vIn52 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (FormatMode) (Int) (VisitKind) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Options) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr)))
data T_VisitSteps_vOut52 = T_VisitSteps_vOut52 (Set String) (Seq Error) (Int) (Bool) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) (PP_Doc) (Int) (Set String) (Map String (Maybe NonLocalAttr)) (Map VisitIdentifier VisitKind)
{-# NOINLINE sem_VisitSteps_Cons #-}
sem_VisitSteps_Cons :: T_VisitStep -> T_VisitSteps -> T_VisitSteps
sem_VisitSteps_Cons :: T_VisitStep -> T_VisitSteps -> T_VisitSteps
sem_VisitSteps_Cons T_VisitStep
arg_hd_ T_VisitSteps
arg_tl_ = Identity T_VisitSteps_s53 -> T_VisitSteps
T_VisitSteps (T_VisitSteps_s53 -> Identity T_VisitSteps_s53
forall (m :: * -> *) a. Monad m => a -> m a
return T_VisitSteps_s53
st53) where
{-# NOINLINE st53 #-}
st53 :: T_VisitSteps_s53
st53 = let
v52 :: T_VisitSteps_v52
v52 :: T_VisitSteps_v52
v52 = \ (T_VisitSteps_vIn52 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses) -> ( let
_hdX50 :: T_VisitStep_s50
_hdX50 = Identity T_VisitStep_s50 -> T_VisitStep_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_VisitStep -> Identity T_VisitStep_s50
attach_T_VisitStep (T_VisitStep
arg_hd_))
_tlX53 :: T_VisitSteps_s53
_tlX53 = Identity T_VisitSteps_s53 -> T_VisitSteps_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_VisitSteps -> Identity T_VisitSteps_s53
attach_T_VisitSteps (T_VisitSteps
arg_tl_))
(T_VisitStep_vOut49 Set String
_hdIdefs Seq Error
_hdIerrors Int
_hdIindex Bool
_hdIisLast Set String
_hdIlazyIntras Map Identifier (Set VisitKind)
_hdIruleKinds Map Identifier Int
_hdIruleUsage PP_Doc
_hdIsem_steps Set String
_hdIusedArgs Map String (Maybe NonLocalAttr)
_hdIuses Map Int VisitKind
_hdIvisitKinds) = T_VisitStep_s50 -> T_VisitStep_v49
inv_VisitStep_s50 T_VisitStep_s50
_hdX50 (Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> FormatMode
-> Int
-> Bool
-> VisitKind
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Options
-> Map Identifier (Set String)
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> T_VisitStep_vIn49
T_VisitStep_vIn49 Map Int (Int, Int)
_hdOallFromToStates Map Identifier Int
_hdOallInitStates Map Int VisitKind
_hdOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdOallchildvisit Map Int (Set Identifier)
_hdOavisitdefs Map Int (Set Identifier)
_hdOavisituses Attributes
_hdOchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_hdOchildintros FormatMode
_hdOfmtMode Int
_hdOindex Bool
_hdOisLast VisitKind
_hdOkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_hdOmrules Options
_hdOoptions Map Identifier (Set String)
_hdOruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_hdOruleuses)
(T_VisitSteps_vOut52 Set String
_tlIdefs Seq Error
_tlIerrors Int
_tlIindex Bool
_tlIisLast Set String
_tlIlazyIntras Map Identifier (Set VisitKind)
_tlIruleKinds Map Identifier Int
_tlIruleUsage PP_Doc
_tlIsem_steps Int
_tlIsize Set String
_tlIusedArgs Map String (Maybe NonLocalAttr)
_tlIuses Map Int VisitKind
_tlIvisitKinds) = T_VisitSteps_s53 -> T_VisitSteps_v52
inv_VisitSteps_s53 T_VisitSteps_s53
_tlX53 (Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> FormatMode
-> Int
-> VisitKind
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Options
-> Map Identifier (Set String)
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> T_VisitSteps_vIn52
T_VisitSteps_vIn52 Map Int (Int, Int)
_tlOallFromToStates Map Identifier Int
_tlOallInitStates Map Int VisitKind
_tlOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlOallchildvisit Map Int (Set Identifier)
_tlOavisitdefs Map Int (Set Identifier)
_tlOavisituses Attributes
_tlOchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_tlOchildintros FormatMode
_tlOfmtMode Int
_tlOindex VisitKind
_tlOkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_tlOmrules Options
_tlOoptions Map Identifier (Set String)
_tlOruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_tlOruleuses)
_lhsOsize :: Int
_lhsOsize :: Int
_lhsOsize = Int -> Int
rule821 Int
_tlIsize
_hdOindex :: Int
_hdOindex = Int -> Int
rule822 Int
_lhsIindex
_tlOindex :: Int
_tlOindex = Int -> Int
rule823 Int
_lhsIindex
_lhsOindex :: Int
_lhsOindex :: Int
_lhsOindex = Int -> Int
rule824 Int
_tlIindex
_lhsOisLast :: Bool
_lhsOisLast :: Bool
_lhsOisLast = () -> Bool
rule825 ()
_hdOisLast :: Bool
_hdOisLast = Bool -> Bool
rule826 Bool
_tlIisLast
_lhsOdefs :: Set String
_lhsOdefs :: Set String
_lhsOdefs = Set String -> Set String -> Set String
rule827 Set String
_hdIdefs Set String
_tlIdefs
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule828 Seq Error
_hdIerrors Seq Error
_tlIerrors
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set String
_lhsOlazyIntras = Set String -> Set String -> Set String
rule829 Set String
_hdIlazyIntras Set String
_tlIlazyIntras
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = Map Identifier (Set VisitKind)
-> Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule830 Map Identifier (Set VisitKind)
_hdIruleKinds Map Identifier (Set VisitKind)
_tlIruleKinds
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = Map Identifier Int -> Map Identifier Int -> Map Identifier Int
rule831 Map Identifier Int
_hdIruleUsage Map Identifier Int
_tlIruleUsage
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps = PP_Doc -> PP_Doc -> PP_Doc
rule832 PP_Doc
_hdIsem_steps PP_Doc
_tlIsem_steps
_lhsOusedArgs :: Set String
_lhsOusedArgs :: Set String
_lhsOusedArgs = Set String -> Set String -> Set String
rule833 Set String
_hdIusedArgs Set String
_tlIusedArgs
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses = Map String (Maybe NonLocalAttr)
-> Map String (Maybe NonLocalAttr)
-> Map String (Maybe NonLocalAttr)
rule834 Map String (Maybe NonLocalAttr)
_hdIuses Map String (Maybe NonLocalAttr)
_tlIuses
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
rule835 Map Int VisitKind
_hdIvisitKinds Map Int VisitKind
_tlIvisitKinds
_hdOallFromToStates :: Map Int (Int, Int)
_hdOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule836 Map Int (Int, Int)
_lhsIallFromToStates
_hdOallInitStates :: Map Identifier Int
_hdOallInitStates = Map Identifier Int -> Map Identifier Int
rule837 Map Identifier Int
_lhsIallInitStates
_hdOallVisitKinds :: Map Int VisitKind
_hdOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule838 Map Int VisitKind
_lhsIallVisitKinds
_hdOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule839 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
_hdOavisitdefs :: Map Int (Set Identifier)
_hdOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule840 Map Int (Set Identifier)
_lhsIavisitdefs
_hdOavisituses :: Map Int (Set Identifier)
_hdOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule841 Map Int (Set Identifier)
_lhsIavisituses
_hdOchildTypes :: Attributes
_hdOchildTypes = Attributes -> Attributes
rule842 Attributes
_lhsIchildTypes
_hdOchildintros :: Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_hdOchildintros = Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
rule843 Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros
_hdOfmtMode :: FormatMode
_hdOfmtMode = FormatMode -> FormatMode
rule844 FormatMode
_lhsIfmtMode
_hdOkind :: VisitKind
_hdOkind = VisitKind -> VisitKind
rule845 VisitKind
_lhsIkind
_hdOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_hdOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule846 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule847 Options
_lhsIoptions
_hdOruledefs :: Map Identifier (Set String)
_hdOruledefs = Map Identifier (Set String) -> Map Identifier (Set String)
rule848 Map Identifier (Set String)
_lhsIruledefs
_hdOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
_hdOruleuses = Map Identifier (Map String (Maybe NonLocalAttr))
-> Map Identifier (Map String (Maybe NonLocalAttr))
rule849 Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses
_tlOallFromToStates :: Map Int (Int, Int)
_tlOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule850 Map Int (Int, Int)
_lhsIallFromToStates
_tlOallInitStates :: Map Identifier Int
_tlOallInitStates = Map Identifier Int -> Map Identifier Int
rule851 Map Identifier Int
_lhsIallInitStates
_tlOallVisitKinds :: Map Int VisitKind
_tlOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule852 Map Int VisitKind
_lhsIallVisitKinds
_tlOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule853 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
_tlOavisitdefs :: Map Int (Set Identifier)
_tlOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule854 Map Int (Set Identifier)
_lhsIavisitdefs
_tlOavisituses :: Map Int (Set Identifier)
_tlOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule855 Map Int (Set Identifier)
_lhsIavisituses
_tlOchildTypes :: Attributes
_tlOchildTypes = Attributes -> Attributes
rule856 Attributes
_lhsIchildTypes
_tlOchildintros :: Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_tlOchildintros = Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
rule857 Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros
_tlOfmtMode :: FormatMode
_tlOfmtMode = FormatMode -> FormatMode
rule858 FormatMode
_lhsIfmtMode
_tlOkind :: VisitKind
_tlOkind = VisitKind -> VisitKind
rule859 VisitKind
_lhsIkind
_tlOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_tlOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule860 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule861 Options
_lhsIoptions
_tlOruledefs :: Map Identifier (Set String)
_tlOruledefs = Map Identifier (Set String) -> Map Identifier (Set String)
rule862 Map Identifier (Set String)
_lhsIruledefs
_tlOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
_tlOruleuses = Map Identifier (Map String (Maybe NonLocalAttr))
-> Map Identifier (Map String (Maybe NonLocalAttr))
rule863 Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses
__result_ :: T_VisitSteps_vOut52
__result_ = Set String
-> Seq Error
-> Int
-> Bool
-> Set String
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Int
-> Set String
-> Map String (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitSteps_vOut52
T_VisitSteps_vOut52 Set String
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Int
_lhsOsize Set String
_lhsOusedArgs Map String (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds
in T_VisitSteps_vOut52
__result_ )
in T_VisitSteps_v52 -> T_VisitSteps_s53
C_VisitSteps_s53 T_VisitSteps_v52
v52
{-# INLINE rule821 #-}
{-# LINE 909 "src-ag/ExecutionPlan2Clean.ag" #-}
rule821 = \ ((_tlIsize) :: Int) ->
{-# LINE 909 "src-ag/ExecutionPlan2Clean.ag" #-}
1 + _tlIsize
{-# LINE 6406 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule822 #-}
{-# LINE 914 "src-ag/ExecutionPlan2Clean.ag" #-}
rule822 = \ ((_lhsIindex) :: Int) ->
{-# LINE 914 "src-ag/ExecutionPlan2Clean.ag" #-}
_lhsIindex
{-# LINE 6412 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule823 #-}
{-# LINE 915 "src-ag/ExecutionPlan2Clean.ag" #-}
rule823 = \ ((_lhsIindex) :: Int) ->
{-# LINE 915 "src-ag/ExecutionPlan2Clean.ag" #-}
1 + _lhsIindex
{-# LINE 6418 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule824 #-}
{-# LINE 916 "src-ag/ExecutionPlan2Clean.ag" #-}
rule824 = \ ((_tlIindex) :: Int) ->
{-# LINE 916 "src-ag/ExecutionPlan2Clean.ag" #-}
_tlIindex
{-# LINE 6424 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule825 #-}
{-# LINE 926 "src-ag/ExecutionPlan2Clean.ag" #-}
rule825 = \ (_ :: ()) ->
{-# LINE 926 "src-ag/ExecutionPlan2Clean.ag" #-}
False
{-# LINE 6430 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule826 #-}
{-# LINE 927 "src-ag/ExecutionPlan2Clean.ag" #-}
rule826 = \ ((_tlIisLast) :: Bool) ->
{-# LINE 927 "src-ag/ExecutionPlan2Clean.ag" #-}
_tlIisLast
{-# LINE 6436 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule827 #-}
rule827 = \ ((_hdIdefs) :: Set String) ((_tlIdefs) :: Set String) ->
_hdIdefs `Set.union` _tlIdefs
{-# INLINE rule828 #-}
rule828 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->
_hdIerrors Seq.>< _tlIerrors
{-# INLINE rule829 #-}
rule829 = \ ((_hdIlazyIntras) :: Set String) ((_tlIlazyIntras) :: Set String) ->
_hdIlazyIntras `Set.union` _tlIlazyIntras
{-# INLINE rule830 #-}
rule830 = \ ((_hdIruleKinds) :: Map Identifier (Set VisitKind)) ((_tlIruleKinds) :: Map Identifier (Set VisitKind)) ->
_hdIruleKinds `unionWithMappend` _tlIruleKinds
{-# INLINE rule831 #-}
rule831 = \ ((_hdIruleUsage) :: Map Identifier Int) ((_tlIruleUsage) :: Map Identifier Int) ->
_hdIruleUsage `unionWithSum` _tlIruleUsage
{-# INLINE rule832 #-}
rule832 = \ ((_hdIsem_steps) :: PP_Doc) ((_tlIsem_steps) :: PP_Doc) ->
_hdIsem_steps >-< _tlIsem_steps
{-# INLINE rule833 #-}
rule833 = \ ((_hdIusedArgs) :: Set String) ((_tlIusedArgs) :: Set String) ->
_hdIusedArgs `Set.union` _tlIusedArgs
{-# INLINE rule834 #-}
rule834 = \ ((_hdIuses) :: Map String (Maybe NonLocalAttr)) ((_tlIuses) :: Map String (Maybe NonLocalAttr)) ->
_hdIuses `Map.union` _tlIuses
{-# INLINE rule835 #-}
rule835 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->
_hdIvisitKinds `mappend` _tlIvisitKinds
{-# INLINE rule836 #-}
rule836 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule837 #-}
rule837 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule838 #-}
rule838 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule839 #-}
rule839 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
_lhsIallchildvisit
{-# INLINE rule840 #-}
rule840 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule841 #-}
rule841 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule842 #-}
rule842 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->
_lhsIchildTypes
{-# INLINE rule843 #-}
rule843 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
_lhsIchildintros
{-# INLINE rule844 #-}
rule844 = \ ((_lhsIfmtMode) :: FormatMode) ->
_lhsIfmtMode
{-# INLINE rule845 #-}
rule845 = \ ((_lhsIkind) :: VisitKind) ->
_lhsIkind
{-# INLINE rule846 #-}
rule846 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
_lhsImrules
{-# INLINE rule847 #-}
rule847 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule848 #-}
rule848 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->
_lhsIruledefs
{-# INLINE rule849 #-}
rule849 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
_lhsIruleuses
{-# INLINE rule850 #-}
rule850 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule851 #-}
rule851 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule852 #-}
rule852 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule853 #-}
rule853 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
_lhsIallchildvisit
{-# INLINE rule854 #-}
rule854 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule855 #-}
rule855 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule856 #-}
rule856 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->
_lhsIchildTypes
{-# INLINE rule857 #-}
rule857 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
_lhsIchildintros
{-# INLINE rule858 #-}
rule858 = \ ((_lhsIfmtMode) :: FormatMode) ->
_lhsIfmtMode
{-# INLINE rule859 #-}
rule859 = \ ((_lhsIkind) :: VisitKind) ->
_lhsIkind
{-# INLINE rule860 #-}
rule860 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
_lhsImrules
{-# INLINE rule861 #-}
rule861 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule862 #-}
rule862 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->
_lhsIruledefs
{-# INLINE rule863 #-}
rule863 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
_lhsIruleuses
{-# NOINLINE sem_VisitSteps_Nil #-}
sem_VisitSteps_Nil :: T_VisitSteps
sem_VisitSteps_Nil :: T_VisitSteps
sem_VisitSteps_Nil = Identity T_VisitSteps_s53 -> T_VisitSteps
T_VisitSteps (T_VisitSteps_s53 -> Identity T_VisitSteps_s53
forall (m :: * -> *) a. Monad m => a -> m a
return T_VisitSteps_s53
st53) where
{-# NOINLINE st53 #-}
st53 :: T_VisitSteps_s53
st53 = let
v52 :: T_VisitSteps_v52
v52 :: T_VisitSteps_v52
v52 = \ (T_VisitSteps_vIn52 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses) -> ( let
_lhsOsize :: Int
_lhsOsize :: Int
_lhsOsize = () -> Int
rule864 ()
_lhsOisLast :: Bool
_lhsOisLast :: Bool
_lhsOisLast = () -> Bool
rule865 ()
_lhsOdefs :: Set String
_lhsOdefs :: Set String
_lhsOdefs = () -> Set String
forall a. () -> Set a
rule866 ()
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule867 ()
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set String
_lhsOlazyIntras = () -> Set String
forall a. () -> Set a
rule868 ()
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = () -> Map Identifier (Set VisitKind)
forall k a. () -> Map k a
rule869 ()
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = () -> Map Identifier Int
forall k a. () -> Map k a
rule870 ()
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps = () -> PP_Doc
rule871 ()
_lhsOusedArgs :: Set String
_lhsOusedArgs :: Set String
_lhsOusedArgs = () -> Set String
forall a. () -> Set a
rule872 ()
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses = () -> Map String (Maybe NonLocalAttr)
forall k a. () -> Map k a
rule873 ()
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule874 ()
_lhsOindex :: Int
_lhsOindex :: Int
_lhsOindex = Int -> Int
rule875 Int
_lhsIindex
__result_ :: T_VisitSteps_vOut52
__result_ = Set String
-> Seq Error
-> Int
-> Bool
-> Set String
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Int
-> Set String
-> Map String (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitSteps_vOut52
T_VisitSteps_vOut52 Set String
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Int
_lhsOsize Set String
_lhsOusedArgs Map String (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds
in T_VisitSteps_vOut52
__result_ )
in T_VisitSteps_v52 -> T_VisitSteps_s53
C_VisitSteps_s53 T_VisitSteps_v52
v52
{-# INLINE rule864 #-}
{-# LINE 908 "src-ag/ExecutionPlan2Clean.ag" #-}
rule864 = \ (_ :: ()) ->
{-# LINE 908 "src-ag/ExecutionPlan2Clean.ag" #-}
0
{-# LINE 6587 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule865 #-}
{-# LINE 925 "src-ag/ExecutionPlan2Clean.ag" #-}
rule865 = \ (_ :: ()) ->
{-# LINE 925 "src-ag/ExecutionPlan2Clean.ag" #-}
True
{-# LINE 6593 "src-generated/ExecutionPlan2Clean.hs" #-}
{-# INLINE rule866 #-}
rule866 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule867 #-}
rule867 = \ (_ :: ()) ->
Seq.empty
{-# INLINE rule868 #-}
rule868 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule869 #-}
rule869 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule870 #-}
rule870 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule871 #-}
rule871 = \ (_ :: ()) ->
empty
{-# INLINE rule872 #-}
rule872 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule873 #-}
rule873 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule874 #-}
rule874 = \ (_ :: ()) ->
mempty
{-# INLINE rule875 #-}
rule875 = \ ((_lhsIindex) :: Int) ->
_lhsIindex
data Inh_Visits = Inh_Visits { Inh_Visits -> Map Int (Int, Int)
allFromToStates_Inh_Visits :: (Map VisitIdentifier (Int,Int)), Inh_Visits -> Map Identifier Attributes
allInhmap_Inh_Visits :: (Map NontermIdent Attributes), Inh_Visits -> Map Identifier Int
allInitStates_Inh_Visits :: (Map NontermIdent Int), Inh_Visits -> Map Identifier Attributes
allSynmap_Inh_Visits :: (Map NontermIdent Attributes), Inh_Visits -> Map Int VisitKind
allVisitKinds_Inh_Visits :: (Map VisitIdentifier VisitKind), Inh_Visits
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
allchildvisit_Inh_Visits :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Inh_Visits -> Map Int (Map String (Maybe NonLocalAttr))
allintramap_Inh_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), Inh_Visits -> Map Int (Set Identifier)
avisitdefs_Inh_Visits :: (Map VisitIdentifier (Set Identifier)), Inh_Visits -> Map Int (Set Identifier)
avisituses_Inh_Visits :: (Map VisitIdentifier (Set Identifier)), Inh_Visits -> Attributes
childTypes_Inh_Visits :: (Map Identifier Type), Inh_Visits
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
childintros_Inh_Visits :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), Inh_Visits -> Identifier
con_Inh_Visits :: (ConstructorIdent), Inh_Visits -> Attributes
inhmap_Inh_Visits :: (Attributes), Inh_Visits
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
mrules_Inh_Visits :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), Inh_Visits -> Map Int StateCtx
nextVisits_Inh_Visits :: (Map StateIdentifier StateCtx), Inh_Visits -> Identifier
nt_Inh_Visits :: (NontermIdent), Inh_Visits -> Options
options_Inh_Visits :: (Options), Inh_Visits -> [Identifier]
params_Inh_Visits :: ([Identifier]), Inh_Visits -> Map Int StateCtx
prevVisits_Inh_Visits :: (Map StateIdentifier StateCtx), Inh_Visits -> Map Identifier (Set String)
ruledefs_Inh_Visits :: (Map Identifier (Set String)), Inh_Visits -> Map Identifier (Map String (Maybe NonLocalAttr))
ruleuses_Inh_Visits :: (Map Identifier (Map String (Maybe NonLocalAttr))), Inh_Visits -> Attributes
synmap_Inh_Visits :: (Attributes), Inh_Visits -> Set String
terminaldefs_Inh_Visits :: (Set String) }
data Syn_Visits = Syn_Visits { Syn_Visits -> [VisitStateState]
allvisits_Syn_Visits :: ([VisitStateState]), Syn_Visits
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
childvisit_Syn_Visits :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Syn_Visits -> Seq Error
errors_Syn_Visits :: (Seq Error), Syn_Visits -> Map Int (Int, Int)
fromToStates_Syn_Visits :: (Map VisitIdentifier (Int,Int)), Syn_Visits -> Map Int (Map String (Maybe NonLocalAttr))
intramap_Syn_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), Syn_Visits -> Set String
lazyIntras_Syn_Visits :: (Set String), Syn_Visits -> Map Identifier (Set VisitKind)
ruleKinds_Syn_Visits :: (Map Identifier (Set VisitKind)), Syn_Visits -> Map Identifier Int
ruleUsage_Syn_Visits :: (Map Identifier Int), Syn_Visits -> [(Int, Bool -> PP_Doc)]
sem_visit_Syn_Visits :: ( [(StateIdentifier,Bool -> PP_Doc)] ), Syn_Visits -> PP_Doc
t_visits_Syn_Visits :: (PP_Doc), Syn_Visits -> Set String
usedArgs_Syn_Visits :: (Set String), Syn_Visits -> Map Int VisitKind
visitKinds_Syn_Visits :: (Map VisitIdentifier VisitKind), Syn_Visits -> Map Int (Set Identifier)
visitdefs_Syn_Visits :: (Map VisitIdentifier (Set Identifier)), Syn_Visits -> Map Int (Set Identifier)
visituses_Syn_Visits :: (Map VisitIdentifier (Set Identifier)) }
{-# INLINABLE wrap_Visits #-}
wrap_Visits :: T_Visits -> Inh_Visits -> (Syn_Visits )
wrap_Visits :: T_Visits -> Inh_Visits -> Syn_Visits
wrap_Visits (T_Visits Identity T_Visits_s56
act) (Inh_Visits Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Map String (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set String
_lhsIterminaldefs) =
Identity Syn_Visits -> Syn_Visits
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_Visits_s56
sem <- Identity T_Visits_s56
act
let arg55 :: T_Visits_vIn55
arg55 = Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Map String (Maybe NonLocalAttr))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Identifier
-> Attributes
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Int StateCtx
-> Identifier
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Map Identifier (Set String)
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> Attributes
-> Set String
-> T_Visits_vIn55
T_Visits_vIn55 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Map String (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set String
_lhsIterminaldefs
(T_Visits_vOut55 [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map String (Maybe NonLocalAttr))
_lhsOintramap Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage [(Int, Bool -> PP_Doc)]
_lhsOsem_visit PP_Doc
_lhsOt_visits Set String
_lhsOusedArgs Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses) <- T_Visits_vOut55 -> Identity T_Visits_vOut55
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Visits_s56 -> T_Visits_v55
inv_Visits_s56 T_Visits_s56
sem T_Visits_vIn55
arg55)
Syn_Visits -> Identity Syn_Visits
forall (m :: * -> *) a. Monad m => a -> m a
return ([VisitStateState]
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> Map Int (Map String (Maybe NonLocalAttr))
-> Set String
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> [(Int, Bool -> PP_Doc)]
-> PP_Doc
-> Set String
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Syn_Visits
Syn_Visits [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map String (Maybe NonLocalAttr))
_lhsOintramap Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage [(Int, Bool -> PP_Doc)]
_lhsOsem_visit PP_Doc
_lhsOt_visits Set String
_lhsOusedArgs Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses)
)
{-# NOINLINE sem_Visits #-}
sem_Visits :: Visits -> T_Visits
sem_Visits :: Visits -> T_Visits
sem_Visits Visits
list = (T_Visit -> T_Visits -> T_Visits)
-> T_Visits -> [T_Visit] -> T_Visits
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Visit -> T_Visits -> T_Visits
sem_Visits_Cons T_Visits
sem_Visits_Nil ((Visit -> T_Visit) -> Visits -> [T_Visit]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Visit -> T_Visit
sem_Visit Visits
list)
newtype T_Visits = T_Visits {
T_Visits -> Identity T_Visits_s56
attach_T_Visits :: Identity (T_Visits_s56 )
}
newtype T_Visits_s56 = C_Visits_s56 {
T_Visits_s56 -> T_Visits_v55
inv_Visits_s56 :: (T_Visits_v55 )
}
data T_Visits_s57 = C_Visits_s57
type T_Visits_v55 = (T_Visits_vIn55 ) -> (T_Visits_vOut55 )
data T_Visits_vIn55 = T_Visits_vIn55 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (ConstructorIdent) (Attributes) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map StateIdentifier StateCtx) (NontermIdent) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Attributes) (Set String)
data T_Visits_vOut55 = T_Visits_vOut55 ([VisitStateState]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) ( [(StateIdentifier,Bool -> PP_Doc)] ) (PP_Doc) (Set String) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))
{-# NOINLINE sem_Visits_Cons #-}
sem_Visits_Cons :: T_Visit -> T_Visits -> T_Visits
sem_Visits_Cons :: T_Visit -> T_Visits -> T_Visits
sem_Visits_Cons T_Visit
arg_hd_ T_Visits
arg_tl_ = Identity T_Visits_s56 -> T_Visits
T_Visits (T_Visits_s56 -> Identity T_Visits_s56
forall (m :: * -> *) a. Monad m => a -> m a
return T_Visits_s56
st56) where
{-# NOINLINE st56 #-}
st56 :: T_Visits_s56
st56 = let
v55 :: T_Visits_v55
v55 :: T_Visits_v55
v55 = \ (T_Visits_vIn55 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Map String (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set String
_lhsIterminaldefs) -> ( let
_hdX47 :: T_Visit_s47
_hdX47 = Identity T_Visit_s47 -> T_Visit_s47
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Visit -> Identity T_Visit_s47
attach_T_Visit (T_Visit
arg_hd_))
_tlX56 :: T_Visits_s56
_tlX56 = Identity T_Visits_s56 -> T_Visits_s56
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Visits -> Identity T_Visits_s56
attach_T_Visits (T_Visits
arg_tl_))
(T_Visit_vOut46 VisitStateState
_hdIallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit Seq Error
_hdIerrors Map Int (Int, Int)
_hdIfromToStates Map Int (Map String (Maybe NonLocalAttr))
_hdIintramap Set String
_hdIlazyIntras Map Identifier (Set VisitKind)
_hdIruleKinds Map Identifier Int
_hdIruleUsage (Int, Bool -> PP_Doc)
_hdIsem_visit PP_Doc
_hdIt_visits Set String
_hdIusedArgs Map Int VisitKind
_hdIvisitKinds Map Int (Set Identifier)
_hdIvisitdefs Map Int (Set Identifier)
_hdIvisituses) = T_Visit_s47 -> T_Visit_v46
inv_Visit_s47 T_Visit_s47
_hdX47 (Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Map String (Maybe NonLocalAttr))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Identifier
-> Attributes
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Int StateCtx
-> Identifier
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Map Identifier (Set String)
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> Attributes
-> Set String
-> T_Visit_vIn46
T_Visit_vIn46 Map Int (Int, Int)
_hdOallFromToStates Map Identifier Attributes
_hdOallInhmap Map Identifier Int
_hdOallInitStates Map Identifier Attributes
_hdOallSynmap Map Int VisitKind
_hdOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdOallchildvisit Map Int (Map String (Maybe NonLocalAttr))
_hdOallintramap Map Int (Set Identifier)
_hdOavisitdefs Map Int (Set Identifier)
_hdOavisituses Attributes
_hdOchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_hdOchildintros Identifier
_hdOcon Attributes
_hdOinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_hdOmrules Map Int StateCtx
_hdOnextVisits Identifier
_hdOnt Options
_hdOoptions [Identifier]
_hdOparams Map Int StateCtx
_hdOprevVisits Map Identifier (Set String)
_hdOruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_hdOruleuses Attributes
_hdOsynmap Set String
_hdOterminaldefs)
(T_Visits_vOut55 [VisitStateState]
_tlIallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit Seq Error
_tlIerrors Map Int (Int, Int)
_tlIfromToStates Map Int (Map String (Maybe NonLocalAttr))
_tlIintramap Set String
_tlIlazyIntras Map Identifier (Set VisitKind)
_tlIruleKinds Map Identifier Int
_tlIruleUsage [(Int, Bool -> PP_Doc)]
_tlIsem_visit PP_Doc
_tlIt_visits Set String
_tlIusedArgs Map Int VisitKind
_tlIvisitKinds Map Int (Set Identifier)
_tlIvisitdefs Map Int (Set Identifier)
_tlIvisituses) = T_Visits_s56 -> T_Visits_v55
inv_Visits_s56 T_Visits_s56
_tlX56 (Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Map String (Maybe NonLocalAttr))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Identifier
-> Attributes
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Int StateCtx
-> Identifier
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Map Identifier (Set String)
-> Map Identifier (Map String (Maybe NonLocalAttr))
-> Attributes
-> Set String
-> T_Visits_vIn55
T_Visits_vIn55 Map Int (Int, Int)
_tlOallFromToStates Map Identifier Attributes
_tlOallInhmap Map Identifier Int
_tlOallInitStates Map Identifier Attributes
_tlOallSynmap Map Int VisitKind
_tlOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlOallchildvisit Map Int (Map String (Maybe NonLocalAttr))
_tlOallintramap Map Int (Set Identifier)
_tlOavisitdefs Map Int (Set Identifier)
_tlOavisituses Attributes
_tlOchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_tlOchildintros Identifier
_tlOcon Attributes
_tlOinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_tlOmrules Map Int StateCtx
_tlOnextVisits Identifier
_tlOnt Options
_tlOoptions [Identifier]
_tlOparams Map Int StateCtx
_tlOprevVisits Map Identifier (Set String)
_tlOruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_tlOruleuses Attributes
_tlOsynmap Set String
_tlOterminaldefs)
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits = VisitStateState -> [VisitStateState] -> [VisitStateState]
rule876 VisitStateState
_hdIallvisits [VisitStateState]
_tlIallvisits
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule877 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule878 Seq Error
_hdIerrors Seq Error
_tlIerrors
_lhsOfromToStates :: Map VisitIdentifier (Int,Int)
_lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = Map Int (Int, Int) -> Map Int (Int, Int) -> Map Int (Int, Int)
rule879 Map Int (Int, Int)
_hdIfromToStates Map Int (Int, Int)
_tlIfromToStates
_lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))
_lhsOintramap :: Map Int (Map String (Maybe NonLocalAttr))
_lhsOintramap = Map Int (Map String (Maybe NonLocalAttr))
-> Map Int (Map String (Maybe NonLocalAttr))
-> Map Int (Map String (Maybe NonLocalAttr))
rule880 Map Int (Map String (Maybe NonLocalAttr))
_hdIintramap Map Int (Map String (Maybe NonLocalAttr))
_tlIintramap
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set String
_lhsOlazyIntras = Set String -> Set String -> Set String
rule881 Set String
_hdIlazyIntras Set String
_tlIlazyIntras
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = Map Identifier (Set VisitKind)
-> Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule882 Map Identifier (Set VisitKind)
_hdIruleKinds Map Identifier (Set VisitKind)
_tlIruleKinds
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = Map Identifier Int -> Map Identifier Int -> Map Identifier Int
rule883 Map Identifier Int
_hdIruleUsage Map Identifier Int
_tlIruleUsage
_lhsOsem_visit :: [(StateIdentifier,Bool -> PP_Doc)]
_lhsOsem_visit :: [(Int, Bool -> PP_Doc)]
_lhsOsem_visit = (Int, Bool -> PP_Doc)
-> [(Int, Bool -> PP_Doc)] -> [(Int, Bool -> PP_Doc)]
rule884 (Int, Bool -> PP_Doc)
_hdIsem_visit [(Int, Bool -> PP_Doc)]
_tlIsem_visit
_lhsOt_visits :: PP_Doc
_lhsOt_visits :: PP_Doc
_lhsOt_visits = PP_Doc -> PP_Doc -> PP_Doc
rule885 PP_Doc
_hdIt_visits PP_Doc
_tlIt_visits
_lhsOusedArgs :: Set String
_lhsOusedArgs :: Set String
_lhsOusedArgs = Set String -> Set String -> Set String
rule886 Set String
_hdIusedArgs Set String
_tlIusedArgs
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
rule887 Map Int VisitKind
_hdIvisitKinds Map Int VisitKind
_tlIvisitKinds
_lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
_lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule888 Map Int (Set Identifier)
_hdIvisitdefs Map Int (Set Identifier)
_tlIvisitdefs
_lhsOvisituses :: Map VisitIdentifier (Set Identifier)
_lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule889 Map Int (Set Identifier)
_hdIvisituses Map Int (Set Identifier)
_tlIvisituses
_hdOallFromToStates :: Map Int (Int, Int)
_hdOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule890 Map Int (Int, Int)
_lhsIallFromToStates
_hdOallInhmap :: Map Identifier Attributes
_hdOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule891 Map Identifier Attributes
_lhsIallInhmap
_hdOallInitStates :: Map Identifier Int
_hdOallInitStates = Map Identifier Int -> Map Identifier Int
rule892 Map Identifier Int
_lhsIallInitStates
_hdOallSynmap :: Map Identifier Attributes
_hdOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule893 Map Identifier Attributes
_lhsIallSynmap
_hdOallVisitKinds :: Map Int VisitKind
_hdOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule894 Map Int VisitKind
_lhsIallVisitKinds
_hdOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule895 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
_hdOallintramap :: Map Int (Map String (Maybe NonLocalAttr))
_hdOallintramap = Map Int (Map String (Maybe NonLocalAttr))
-> Map Int (Map String (Maybe NonLocalAttr))
rule896 Map Int (Map String (Maybe NonLocalAttr))
_lhsIallintramap
_hdOavisitdefs :: Map Int (Set Identifier)
_hdOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule897 Map Int (Set Identifier)
_lhsIavisitdefs
_hdOavisituses :: Map Int (Set Identifier)
_hdOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule898 Map Int (Set Identifier)
_lhsIavisituses
_hdOchildTypes :: Attributes
_hdOchildTypes = Attributes -> Attributes
rule899 Attributes
_lhsIchildTypes
_hdOchildintros :: Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_hdOchildintros = Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
rule900 Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros
_hdOcon :: Identifier
_hdOcon = Identifier -> Identifier
rule901 Identifier
_lhsIcon
_hdOinhmap :: Attributes
_hdOinhmap = Attributes -> Attributes
rule902 Attributes
_lhsIinhmap
_hdOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_hdOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule903 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
_hdOnextVisits :: Map Int StateCtx
_hdOnextVisits = Map Int StateCtx -> Map Int StateCtx
rule904 Map Int StateCtx
_lhsInextVisits
_hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule905 Identifier
_lhsInt
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule906 Options
_lhsIoptions
_hdOparams :: [Identifier]
_hdOparams = [Identifier] -> [Identifier]
rule907 [Identifier]
_lhsIparams
_hdOprevVisits :: Map Int StateCtx
_hdOprevVisits = Map Int StateCtx -> Map Int StateCtx
rule908 Map Int StateCtx
_lhsIprevVisits
_hdOruledefs :: Map Identifier (Set String)
_hdOruledefs = Map Identifier (Set String) -> Map Identifier (Set String)
rule909 Map Identifier (Set String)
_lhsIruledefs
_hdOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
_hdOruleuses = Map Identifier (Map String (Maybe NonLocalAttr))
-> Map Identifier (Map String (Maybe NonLocalAttr))
rule910 Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses
_hdOsynmap :: Attributes
_hdOsynmap = Attributes -> Attributes
rule911 Attributes
_lhsIsynmap
_hdOterminaldefs :: Set String
_hdOterminaldefs = Set String -> Set String
rule912 Set String
_lhsIterminaldefs
_tlOallFromToStates :: Map Int (Int, Int)
_tlOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule913 Map Int (Int, Int)
_lhsIallFromToStates
_tlOallInhmap :: Map Identifier Attributes
_tlOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule914 Map Identifier Attributes
_lhsIallInhmap
_tlOallInitStates :: Map Identifier Int
_tlOallInitStates = Map Identifier Int -> Map Identifier Int
rule915 Map Identifier Int
_lhsIallInitStates
_tlOallSynmap :: Map Identifier Attributes
_tlOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule916 Map Identifier Attributes
_lhsIallSynmap
_tlOallVisitKinds :: Map Int VisitKind
_tlOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule917 Map Int VisitKind
_lhsIallVisitKinds
_tlOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule918 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
_tlOallintramap :: Map Int (Map String (Maybe NonLocalAttr))
_tlOallintramap = Map Int (Map String (Maybe NonLocalAttr))
-> Map Int (Map String (Maybe NonLocalAttr))
rule919 Map Int (Map String (Maybe NonLocalAttr))
_lhsIallintramap
_tlOavisitdefs :: Map Int (Set Identifier)
_tlOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule920 Map Int (Set Identifier)
_lhsIavisitdefs
_tlOavisituses :: Map Int (Set Identifier)
_tlOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule921 Map Int (Set Identifier)
_lhsIavisituses
_tlOchildTypes :: Attributes
_tlOchildTypes = Attributes -> Attributes
rule922 Attributes
_lhsIchildTypes
_tlOchildintros :: Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_tlOchildintros = Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
rule923 Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros
_tlOcon :: Identifier
_tlOcon = Identifier -> Identifier
rule924 Identifier
_lhsIcon
_tlOinhmap :: Attributes
_tlOinhmap = Attributes -> Attributes
rule925 Attributes
_lhsIinhmap
_tlOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_tlOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule926 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
_tlOnextVisits :: Map Int StateCtx
_tlOnextVisits = Map Int StateCtx -> Map Int StateCtx
rule927 Map Int StateCtx
_lhsInextVisits
_tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule928 Identifier
_lhsInt
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule929 Options
_lhsIoptions
_tlOparams :: [Identifier]
_tlOparams = [Identifier] -> [Identifier]
rule930 [Identifier]
_lhsIparams
_tlOprevVisits :: Map Int StateCtx
_tlOprevVisits = Map Int StateCtx -> Map Int StateCtx
rule931 Map Int StateCtx
_lhsIprevVisits
_tlOruledefs :: Map Identifier (Set String)
_tlOruledefs = Map Identifier (Set String) -> Map Identifier (Set String)
rule932 Map Identifier (Set String)
_lhsIruledefs
_tlOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
_tlOruleuses = Map Identifier (Map String (Maybe NonLocalAttr))
-> Map Identifier (Map String (Maybe NonLocalAttr))
rule933 Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses
_tlOsynmap :: Attributes
_tlOsynmap = Attributes -> Attributes
rule934 Attributes
_lhsIsynmap
_tlOterminaldefs :: Set String
_tlOterminaldefs = Set String -> Set String
rule935 Set String
_lhsIterminaldefs
__result_ :: T_Visits_vOut55
__result_ = [VisitStateState]
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> Map Int (Map String (Maybe NonLocalAttr))
-> Set String
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> [(Int, Bool -> PP_Doc)]
-> PP_Doc
-> Set String
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_Visits_vOut55
T_Visits_vOut55 [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map String (Maybe NonLocalAttr))
_lhsOintramap Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage [(Int, Bool -> PP_Doc)]
_lhsOsem_visit PP_Doc
_lhsOt_visits Set String
_lhsOusedArgs Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
in T_Visits_vOut55
__result_ )
in T_Visits_v55 -> T_Visits_s56
C_Visits_s56 T_Visits_v55
v55
{-# INLINE rule876 #-}
rule876 :: VisitStateState -> [VisitStateState] -> [VisitStateState]
rule876 = \ ((VisitStateState
_hdIallvisits) :: VisitStateState ) (([VisitStateState]
_tlIallvisits) :: [VisitStateState]) ->
VisitStateState
_hdIallvisits VisitStateState -> [VisitStateState] -> [VisitStateState]
forall a. a -> [a] -> [a]
: [VisitStateState]
_tlIallvisits
{-# INLINE rule877 #-}
rule877 :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule877 = \ ((Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ((Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit
{-# INLINE rule878 #-}
rule878 :: Seq Error -> Seq Error -> Seq Error
rule878 = \ ((Seq Error
_hdIerrors) :: Seq Error) ((Seq Error
_tlIerrors) :: Seq Error) ->
Seq Error
_hdIerrors Seq Error -> Seq Error -> Seq Error
forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq Error
_tlIerrors
{-# INLINE rule879 #-}
rule879 :: Map Int (Int, Int) -> Map Int (Int, Int) -> Map Int (Int, Int)
rule879 = \ ((Map Int (Int, Int)
_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((Map Int (Int, Int)
_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->
Map Int (Int, Int)
_hdIfromToStates Map Int (Int, Int) -> Map Int (Int, Int) -> Map Int (Int, Int)
forall a. Monoid a => a -> a -> a
`mappend` Map Int (Int, Int)
_tlIfromToStates
{-# INLINE rule880 #-}
rule880 :: Map Int (Map String (Maybe NonLocalAttr))
-> Map Int (Map String (Maybe NonLocalAttr))
-> Map Int (Map String (Maybe NonLocalAttr))
rule880 = \ ((Map Int (Map String (Maybe NonLocalAttr))
_hdIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ((Map Int (Map String (Maybe NonLocalAttr))
_tlIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->
Map Int (Map String (Maybe NonLocalAttr))
_hdIintramap Map Int (Map String (Maybe NonLocalAttr))
-> Map Int (Map String (Maybe NonLocalAttr))
-> Map Int (Map String (Maybe NonLocalAttr))
forall a b c.
(Ord a, Ord b) =>
Map a (Map b c) -> Map a (Map b c) -> Map a (Map b c)
`uwMapUnion` Map Int (Map String (Maybe NonLocalAttr))
_tlIintramap
{-# INLINE rule881 #-}
rule881 :: Set String -> Set String -> Set String
rule881 = \ ((Set String
_hdIlazyIntras) :: Set String) ((Set String
_tlIlazyIntras) :: Set String) ->
Set String
_hdIlazyIntras Set String -> Set String -> Set String
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set String
_tlIlazyIntras
{-# INLINE rule882 #-}
rule882 :: Map Identifier (Set VisitKind)
-> Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule882 = \ ((Map Identifier (Set VisitKind)
_hdIruleKinds) :: Map Identifier (Set VisitKind)) ((Map Identifier (Set VisitKind)
_tlIruleKinds) :: Map Identifier (Set VisitKind)) ->
Map Identifier (Set VisitKind)
_hdIruleKinds Map Identifier (Set VisitKind)
-> Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
forall a k. (Monoid a, Ord k) => Map k a -> Map k a -> Map k a
`unionWithMappend` Map Identifier (Set VisitKind)
_tlIruleKinds
{-# INLINE rule883 #-}
rule883 :: Map Identifier Int -> Map Identifier Int -> Map Identifier Int
rule883 = \ ((Map Identifier Int
_hdIruleUsage) :: Map Identifier Int) ((Map Identifier Int
_tlIruleUsage) :: Map Identifier Int) ->
Map Identifier Int
_hdIruleUsage Map Identifier Int -> Map Identifier Int -> Map Identifier Int
`unionWithSum` Map Identifier Int
_tlIruleUsage
{-# INLINE rule884 #-}
rule884 :: (Int, Bool -> PP_Doc)
-> [(Int, Bool -> PP_Doc)] -> [(Int, Bool -> PP_Doc)]
rule884 = \ (((Int, Bool -> PP_Doc)
_hdIsem_visit) :: (StateIdentifier,Bool -> PP_Doc) ) (([(Int, Bool -> PP_Doc)]
_tlIsem_visit) :: [(StateIdentifier,Bool -> PP_Doc)] ) ->
(Int, Bool -> PP_Doc)
_hdIsem_visit (Int, Bool -> PP_Doc)
-> [(Int, Bool -> PP_Doc)] -> [(Int, Bool -> PP_Doc)]
forall a. a -> [a] -> [a]
: [(Int, Bool -> PP_Doc)]
_tlIsem_visit
{-# INLINE rule885 #-}
rule885 :: PP_Doc -> PP_Doc -> PP_Doc
rule885 = \ ((PP_Doc
_hdIt_visits) :: PP_Doc) ((PP_Doc
_tlIt_visits) :: PP_Doc) ->
PP_Doc
_hdIt_visits PP_Doc -> PP_Doc -> PP_Doc
forall a b. (PP a, PP b) => a -> b -> PP_Doc
>-< PP_Doc
_tlIt_visits
{-# INLINE rule886 #-}
rule886 :: Set String -> Set String -> Set String
rule886 = \ ((Set String
_hdIusedArgs) :: Set String) ((Set String
_tlIusedArgs) :: Set String) ->
Set String
_hdIusedArgs Set String -> Set String -> Set String
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set String
_tlIusedArgs
{-# INLINE rule887 #-}
rule887 :: Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
rule887 = \ ((Map Int VisitKind
_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((Map Int VisitKind
_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->
Map Int VisitKind
_hdIvisitKinds Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
forall a. Monoid a => a -> a -> a
`mappend` Map Int VisitKind
_tlIvisitKinds
{-# INLINE rule888 #-}
rule888 :: Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule888 = \ ((Map Int (Set Identifier)
_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((Map Int (Set Identifier)
_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_hdIvisitdefs Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
forall a b.
(Ord a, Ord b) =>
Map a (Set b) -> Map a (Set b) -> Map a (Set b)
`uwSetUnion` Map Int (Set Identifier)
_tlIvisitdefs
{-# INLINE rule889 #-}
rule889 :: Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule889 = \ ((Map Int (Set Identifier)
_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((Map Int (Set Identifier)
_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_hdIvisituses Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
forall a b.
(Ord a, Ord b) =>
Map a (Set b) -> Map a (Set b) -> Map a (Set b)
`uwSetUnion` Map Int (Set Identifier)
_tlIvisituses
{-# INLINE rule890 #-}
rule890 :: Map Int (Int, Int) -> Map Int (Int, Int)
rule890 = \ ((Map Int (Int, Int)
_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
Map Int (Int, Int)
_lhsIallFromToStates
{-# INLINE rule891 #-}
rule891 :: Map Identifier Attributes -> Map Identifier Attributes
rule891 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallInhmap
{-# INLINE rule892 #-}
rule892 :: Map Identifier Int -> Map Identifier Int
rule892 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
Map Identifier Int
_lhsIallInitStates
{-# INLINE rule893 #-}
rule893 :: Map Identifier Attributes -> Map Identifier Attributes
rule893 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallSynmap
{-# INLINE rule894 #-}
rule894 :: Map Int VisitKind -> Map Int VisitKind
rule894 = \ ((Map Int VisitKind
_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
Map Int VisitKind
_lhsIallVisitKinds
{-# INLINE rule895 #-}
rule895 :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule895 = \ ((Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
{-# INLINE rule896 #-}
rule896 :: Map Int (Map String (Maybe NonLocalAttr))
-> Map Int (Map String (Maybe NonLocalAttr))
rule896 = \ ((Map Int (Map String (Maybe NonLocalAttr))
_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->
Map Int (Map String (Maybe NonLocalAttr))
_lhsIallintramap
{-# INLINE rule897 #-}
rule897 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule897 = \ ((Map Int (Set Identifier)
_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_lhsIavisitdefs
{-# INLINE rule898 #-}
rule898 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule898 = \ ((Map Int (Set Identifier)
_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_lhsIavisituses
{-# INLINE rule899 #-}
rule899 :: Attributes -> Attributes
rule899 = \ ((Attributes
_lhsIchildTypes) :: Map Identifier Type) ->
Attributes
_lhsIchildTypes
{-# INLINE rule900 #-}
rule900 :: Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
rule900 = \ ((Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros
{-# INLINE rule901 #-}
rule901 :: Identifier -> Identifier
rule901 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
Identifier
_lhsIcon
{-# INLINE rule902 #-}
rule902 :: Attributes -> Attributes
rule902 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
Attributes
_lhsIinhmap
{-# INLINE rule903 #-}
rule903 :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule903 = \ ((Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
{-# INLINE rule904 #-}
rule904 :: Map Int StateCtx -> Map Int StateCtx
rule904 = \ ((Map Int StateCtx
_lhsInextVisits) :: Map StateIdentifier StateCtx) ->
Map Int StateCtx
_lhsInextVisits
{-# INLINE rule905 #-}
rule905 :: Identifier -> Identifier
rule905 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
Identifier
_lhsInt
{-# INLINE rule906 #-}
rule906 :: Options -> Options
rule906 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule907 #-}
rule907 :: [Identifier] -> [Identifier]
rule907 = \ (([Identifier]
_lhsIparams) :: [Identifier]) ->
[Identifier]
_lhsIparams
{-# INLINE rule908 #-}
rule908 :: Map Int StateCtx -> Map Int StateCtx
rule908 = \ ((Map Int StateCtx
_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->
Map Int StateCtx
_lhsIprevVisits
{-# INLINE rule909 #-}
rule909 :: Map Identifier (Set String) -> Map Identifier (Set String)
rule909 = \ ((Map Identifier (Set String)
_lhsIruledefs) :: Map Identifier (Set String)) ->
Map Identifier (Set String)
_lhsIruledefs
{-# INLINE rule910 #-}
rule910 :: Map Identifier (Map String (Maybe NonLocalAttr))
-> Map Identifier (Map String (Maybe NonLocalAttr))
rule910 = \ ((Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses
{-# INLINE rule911 #-}
rule911 :: Attributes -> Attributes
rule911 = \ ((Attributes
_lhsIsynmap) :: Attributes) ->
Attributes
_lhsIsynmap
{-# INLINE rule912 #-}
rule912 :: Set String -> Set String
rule912 = \ ((Set String
_lhsIterminaldefs) :: Set String) ->
Set String
_lhsIterminaldefs
{-# INLINE rule913 #-}
rule913 :: Map Int (Int, Int) -> Map Int (Int, Int)
rule913 = \ ((Map Int (Int, Int)
_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
Map Int (Int, Int)
_lhsIallFromToStates
{-# INLINE rule914 #-}
rule914 :: Map Identifier Attributes -> Map Identifier Attributes
rule914 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallInhmap
{-# INLINE rule915 #-}
rule915 :: Map Identifier Int -> Map Identifier Int
rule915 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
Map Identifier Int
_lhsIallInitStates
{-# INLINE rule916 #-}
rule916 :: Map Identifier Attributes -> Map Identifier Attributes
rule916 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallSynmap
{-# INLINE rule917 #-}
rule917 :: Map Int VisitKind -> Map Int VisitKind
rule917 = \ ((Map Int VisitKind
_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
Map Int VisitKind
_lhsIallVisitKinds
{-# INLINE rule918 #-}
rule918 :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule918 = \ ((Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
{-# INLINE rule919 #-}
rule919 :: Map Int (Map String (Maybe NonLocalAttr))
-> Map Int (Map String (Maybe NonLocalAttr))
rule919 = \ ((Map Int (Map String (Maybe NonLocalAttr))
_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->
Map Int (Map String (Maybe NonLocalAttr))
_lhsIallintramap
{-# INLINE rule920 #-}
rule920 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule920 = \ ((Map Int (Set Identifier)
_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_lhsIavisitdefs
{-# INLINE rule921 #-}
rule921 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule921 = \ ((Map Int (Set Identifier)
_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_lhsIavisituses
{-# INLINE rule922 #-}
rule922 :: Attributes -> Attributes
rule922 = \ ((Attributes
_lhsIchildTypes) :: Map Identifier Type) ->
Attributes
_lhsIchildTypes
{-# INLINE rule923 #-}
rule923 :: Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
rule923 = \ ((Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros
{-# INLINE rule924 #-}
rule924 :: Identifier -> Identifier
rule924 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
Identifier
_lhsIcon
{-# INLINE rule925 #-}
rule925 :: Attributes -> Attributes
rule925 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
Attributes
_lhsIinhmap
{-# INLINE rule926 #-}
rule926 :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule926 = \ ((Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
{-# INLINE rule927 #-}
rule927 :: Map Int StateCtx -> Map Int StateCtx
rule927 = \ ((Map Int StateCtx
_lhsInextVisits) :: Map StateIdentifier StateCtx) ->
Map Int StateCtx
_lhsInextVisits
{-# INLINE rule928 #-}
rule928 :: Identifier -> Identifier
rule928 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
Identifier
_lhsInt
{-# INLINE rule929 #-}
rule929 :: Options -> Options
rule929 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule930 #-}
rule930 :: [Identifier] -> [Identifier]
rule930 = \ (([Identifier]
_lhsIparams) :: [Identifier]) ->
[Identifier]
_lhsIparams
{-# INLINE rule931 #-}
rule931 :: Map Int StateCtx -> Map Int StateCtx
rule931 = \ ((Map Int StateCtx
_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->
Map Int StateCtx
_lhsIprevVisits
{-# INLINE rule932 #-}
rule932 :: Map Identifier (Set String) -> Map Identifier (Set String)
rule932 = \ ((Map Identifier (Set String)
_lhsIruledefs) :: Map Identifier (Set String)) ->
Map Identifier (Set String)
_lhsIruledefs
{-# INLINE rule933 #-}
rule933 :: Map Identifier (Map String (Maybe NonLocalAttr))
-> Map Identifier (Map String (Maybe NonLocalAttr))
rule933 = \ ((Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses
{-# INLINE rule934 #-}
rule934 :: Attributes -> Attributes
rule934 = \ ((Attributes
_lhsIsynmap) :: Attributes) ->
Attributes
_lhsIsynmap
{-# INLINE rule935 #-}
rule935 :: Set String -> Set String
rule935 = \ ((Set String
_lhsIterminaldefs) :: Set String) ->
Set String
_lhsIterminaldefs
{-# NOINLINE sem_Visits_Nil #-}
sem_Visits_Nil :: T_Visits
sem_Visits_Nil :: T_Visits
sem_Visits_Nil = Identity T_Visits_s56 -> T_Visits
T_Visits (T_Visits_s56 -> Identity T_Visits_s56
forall (m :: * -> *) a. Monad m => a -> m a
return T_Visits_s56
st56) where
{-# NOINLINE st56 #-}
st56 :: T_Visits_s56
st56 = let
v55 :: T_Visits_v55
v55 :: T_Visits_v55
v55 = \ (T_Visits_vIn55 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Map String (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> FormatMode
-> Either
Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set String)
_lhsIruledefs Map Identifier (Map String (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set String
_lhsIterminaldefs) -> ( let
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits = () -> [VisitStateState]
forall a. () -> [a]
rule936 ()
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = ()
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
forall k a. () -> Map k a
rule937 ()
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule938 ()
_lhsOfromToStates :: Map VisitIdentifier (Int,Int)
_lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = () -> Map Int (Int, Int)
rule939 ()
_lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))
_lhsOintramap :: Map Int (Map String (Maybe NonLocalAttr))
_lhsOintramap = () -> Map Int (Map String (Maybe NonLocalAttr))
forall k a. () -> Map k a
rule940 ()
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set String
_lhsOlazyIntras = () -> Set String
forall a. () -> Set a
rule941 ()
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = () -> Map Identifier (Set VisitKind)
forall k a. () -> Map k a
rule942 ()
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = () -> Map Identifier Int
forall k a. () -> Map k a
rule943 ()
_lhsOsem_visit :: [(StateIdentifier,Bool -> PP_Doc)]
_lhsOsem_visit :: [(Int, Bool -> PP_Doc)]
_lhsOsem_visit = () -> [(Int, Bool -> PP_Doc)]
forall a. () -> [a]
rule944 ()
_lhsOt_visits :: PP_Doc
_lhsOt_visits :: PP_Doc
_lhsOt_visits = () -> PP_Doc
rule945 ()
_lhsOusedArgs :: Set String
_lhsOusedArgs :: Set String
_lhsOusedArgs = () -> Set String
forall a. () -> Set a
rule946 ()
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule947 ()
_lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
_lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule948 ()
_lhsOvisituses :: Map VisitIdentifier (Set Identifier)
_lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule949 ()
__result_ :: T_Visits_vOut55
__result_ = [VisitStateState]
-> Map
Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> Map Int (Map String (Maybe NonLocalAttr))
-> Set String
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> [(Int, Bool -> PP_Doc)]
-> PP_Doc
-> Set String
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_Visits_vOut55
T_Visits_vOut55 [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map String (Maybe NonLocalAttr))
_lhsOintramap Set String
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage [(Int, Bool -> PP_Doc)]
_lhsOsem_visit PP_Doc
_lhsOt_visits Set String
_lhsOusedArgs Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
in T_Visits_vOut55
__result_ )
in T_Visits_v55 -> T_Visits_s56
C_Visits_s56 T_Visits_v55
v55
{-# INLINE rule936 #-}
rule936 :: () -> [a]
rule936 = \ (()
_ :: ()) ->
[]
{-# INLINE rule937 #-}
rule937 :: () -> Map k a
rule937 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule938 #-}
rule938 :: () -> Seq a
rule938 = \ (()
_ :: ()) ->
Seq a
forall a. Seq a
Seq.empty
{-# INLINE rule939 #-}
rule939 :: () -> Map Int (Int, Int)
rule939 = \ (()
_ :: ()) ->
Map Int (Int, Int)
forall a. Monoid a => a
mempty
{-# INLINE rule940 #-}
rule940 :: () -> Map k a
rule940 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule941 #-}
rule941 :: () -> Set a
rule941 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
{-# INLINE rule942 #-}
rule942 :: () -> Map k a
rule942 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule943 #-}
rule943 :: () -> Map k a
rule943 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule944 #-}
rule944 :: () -> [a]
rule944 = \ (()
_ :: ()) ->
[]
{-# INLINE rule945 #-}
rule945 :: () -> PP_Doc
rule945 = \ (()
_ :: ()) ->
PP_Doc
empty
{-# INLINE rule946 #-}
rule946 :: () -> Set a
rule946 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
{-# INLINE rule947 #-}
rule947 :: () -> Map Int VisitKind
rule947 = \ (()
_ :: ()) ->
Map Int VisitKind
forall a. Monoid a => a
mempty
{-# INLINE rule948 #-}
rule948 :: () -> Map k a
rule948 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule949 #-}
rule949 :: () -> Map k a
rule949 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty