{-# LANGUAGE Rank2Types, GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
module ExecutionPlan2Caml where
{-# LINE 2 "src-ag/HsToken.ag" #-}
import CommonTypes
import UU.Scanner.Position(Pos)
{-# LINE 10 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# LINE 2 "src-ag/Expression.ag" #-}
import UU.Scanner.Position(Pos)
import HsToken
{-# LINE 16 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# LINE 2 "src-ag/Patterns.ag" #-}
import UU.Scanner.Position(Pos)
import CommonTypes (ConstructorIdent,Identifier)
{-# LINE 23 "src-generated/ExecutionPlan2Caml.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/ExecutionPlan2Caml.hs" #-}
{-# LINE 32 "src-ag/ExecutionPlan2Caml.ag" #-}
import ExecutionPlan
import Pretty
import PPUtil
import Options
import Data.Monoid(mappend,mempty)
import Data.Maybe
import Data.Graph
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 65 "src-generated/ExecutionPlan2Caml.hs" #-}
import Control.Monad.Identity (Identity)
import qualified Control.Monad.Identity
{-# LINE 175 "src-ag/ExecutionPlan2Caml.ag" #-}
ppRecordTp :: PP a => [a] -> PP_Doc
ppRecordTp es
| null es = text "unit"
| otherwise = pp_block "{" "}" "; " (map pp es)
ppRecordVal :: PP a => [a] -> PP_Doc
ppRecordVal es
| null es = text "()"
| otherwise = pp_block "{" "}" "; " (map pp es)
ppFieldsVal :: Bool -> [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)] -> PP_Doc
ppFieldsVal record fields
| null fields = text "()"
| record = ppRecordVal [ r >#< "=" >#< x | (r,x,_,_) <- fields ]
| otherwise = pp_block "(" ")" "," [ x | (_,x,_,_) <- fields ]
ppFieldsType :: Bool -> Bool -> [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)] -> PP_Doc
ppFieldsType record defor fields
| null fields = text "unit"
| record = ppRecordTp [ r >#< ":" >#< (if defor then d else f) | (r,_,d,f) <- fields ]
| otherwise = pp_block "(" ")" "*" [ if defor then d else f | (_,_,d,f) <- fields ]
{-# LINE 91 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# LINE 288 "src-ag/ExecutionPlan2Caml.ag" #-}
ppTp :: Type -> PP_Doc
ppTp tp = case tp of
Haskell t -> pp t
NT nt tps deforested
| nt == _SELF -> pp "?SELF?"
| null tps -> ppNontTp nt deforested
| otherwise -> pp_parens (ppSpaced (map pp_parens tps) >#< ppNontTp nt deforested)
Self -> pp "?SELF?"
ppNontTp :: NontermIdent -> Bool -> PP_Doc
ppNontTp nt True = pp "t_" >|< pp nt
ppNontTp nt False = pp nt
ppTypeParams :: PP a => [a] -> PP_Doc
ppTypeParams [] = empty
ppTypeParams [x] = pp x
ppTypeParams xs = pp_block "(" ")" "," (map pp xs)
{-# LINE 113 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# LINE 361 "src-ag/ExecutionPlan2Caml.ag" #-}
modName :: NontermIdent -> PP_Doc
modName nt = pp "M_" >|< pp nt
ppFunDecl :: Bool -> PP_Doc -> [(PP_Doc,PP_Doc)] -> PP_Doc -> PP_Doc -> PP_Doc
ppFunDecl gensigs nm args resSig expr = body where
body = nm >#< ppSpaced (map arg args) >#< ppRes >#< "="
>-< indent 2 expr
arg (arg,tp) = ppArg gensigs arg tp
ppRes
| gensigs = ":" >#< resSig
| otherwise = empty
ppArg :: Bool -> PP_Doc -> PP_Doc -> PP_Doc
ppArg gensigs arg tp
| gensigs = pp_parens (arg >#< ":" >#< tp)
| otherwise = arg
{-# LINE 135 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# LINE 428 "src-ag/ExecutionPlan2Caml.ag" #-}
type VisitStateState = (VisitIdentifier,StateIdentifier, StateIdentifier)
{-# LINE 139 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# LINE 464 "src-ag/ExecutionPlan2Caml.ag" #-}
type_nt_state nt st = "s_" >|< nt >|< "_" >|< st
type_nt_sem_top nt = "t_" >|< nt
type_nt_sem nt st = type_nt_sem_top nt >|< "_s" >|< st
type_caller nt st = "c_" >|< nt >|< "_s" >|< st
nm_attach nt = "attach_">|< nt
nm_invoke nt st = "inv_" >|< nt >|< "_s" >|< st
cont_tvar = text "'cont__"
orderStates :: StateIdentifier -> [VisitStateState] -> [StateIdentifier]
orderStates initial edges = res where
source = Map.singleton initial Set.empty
targets = [ Map.singleton t Set.empty | (_,_,t) <- edges ]
deps = [ Map.singleton f (Set.singleton t) | (_,f,t) <- edges ]
mp = Map.unionsWith Set.union (source : (targets ++ deps))
es = [ (f,f,Set.toList ts) | (f,ts) <- Map.toList mp ]
cps = stronglyConnComp es
res = flattenSCCs cps
{-# LINE 179 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# LINE 521 "src-ag/ExecutionPlan2Caml.ag" #-}
type_caller_visit nt v = "c_" >|< nt >|< "_v" >|< v
con_visit nt v = "C_" >|< nt >|< "_v" >|< v
nm_inh nt v = "inh_" >|< nt >|< "_v" >|< v
nm_cont nt v = "cont_" >|< nt >|< "_v" >|< v
{-# LINE 189 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# LINE 567 "src-ag/ExecutionPlan2Caml.ag" #-}
nm_inarg nm nt v = "i_" >|< nm >|< "_" >|< nt >|< "_v" >|< v
nm_outarg nm nt v = "o_" >|< nm >|< "_" >|< nt >|< "_v" >|< v
nm_outarg_cont = nm_outarg "_cont"
conNmTVisit nt vId = "t_" >|< nt >|< "_v" >|< vId
conNmTVisitIn nt vId = "t_" >|< nt >|< "_vIn" >|< vId
conNmTVisitOut nt vId = "t_" >|< nt >|< "_vOut" >|< vId
ppMonadType :: Options -> PP_Doc
ppMonadType opts
| parallelInvoke opts = text "IO"
| otherwise = text "Identity"
{-# LINE 207 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# LINE 780 "src-ag/ExecutionPlan2Caml.ag" #-}
nm_visit v = "__v" >|< v
nm_k st = "__k" >|< st
nm_st st = "__st" >|< st
mklets :: (PP b, PP c) => [b] -> c -> PP_Doc
mklets defs body = res where
ppLet def = "let" >#< def >#< "in"
res = vlist (map ppLet defs) >-< body
{-# LINE 219 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# LINE 822 "src-ag/ExecutionPlan2Caml.ag" #-}
resultValName :: String
resultValName = "__result_"
nextStName :: String
nextStName = "__st_"
{-# LINE 228 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# LINE 963 "src-ag/ExecutionPlan2Caml.ag" #-}
stname :: Identifier -> Int -> String
stname child st = "_" ++ getName child ++ "X" ++ show st
compatibleAttach :: VisitKind -> NontermIdent -> Options -> Bool
compatibleAttach _ _ _ = True
{-# LINE 238 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# LINE 1030 "src-ag/ExecutionPlan2Caml.ag" #-}
dummyPat :: Options -> Bool -> PP_Doc
dummyPat opts noArgs
| not noArgs = empty
| strictDummyToken opts = text "()"
| otherwise = text "(_ : unit)"
dummyArg :: Options -> Bool -> PP_Doc
dummyArg opts noArgs
| not noArgs = empty
| otherwise = text "()"
dummyType :: Options -> Bool -> PP_Doc
dummyType opts noArgs
| not noArgs = empty
| otherwise = text "unit"
{-# LINE 257 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# LINE 1106 "src-ag/ExecutionPlan2Caml.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 290 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# LINE 1204 "src-ag/ExecutionPlan2Caml.ag" #-}
contNm = text "__cont_"
inpsNm = text "__inps_"
compatibleKind :: VisitKind -> VisitKind -> Bool
compatibleKind _ _ = True
compatibleRule :: VisitKind -> Bool -> Bool
compatibleRule (VisitPure _) False = False
compatibleRule _ _ = True
{-# LINE 304 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# LINE 1229 "src-ag/ExecutionPlan2Caml.ag" #-}
unionWithSum = Map.unionWith (+)
{-# LINE 309 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# LINE 1252 "src-ag/ExecutionPlan2Caml.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 318 "src-generated/ExecutionPlan2Caml.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 -> [Char]
mainFile_Inh_EChild :: (String), Inh_EChild -> [Char]
mainName_Inh_EChild :: (String), Inh_EChild -> Identifier
nt_Inh_EChild :: (NontermIdent), Inh_EChild -> Options
options_Inh_EChild :: (Options) }
data Syn_EChild = Syn_EChild { Syn_EChild -> PP_Doc
argnamesw_Syn_EChild :: ( PP_Doc ), Syn_EChild -> Attributes
childTypes_Syn_EChild :: (Map Identifier Type), Syn_EChild
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
childintros_Syn_EChild :: (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), Syn_EChild -> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
sigs_Syn_EChild :: ([(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]), Syn_EChild -> Set [Char]
terminaldefs_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 [Char]
_lhsImainFile [Char]
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions) =
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
-> [Char]
-> [Char]
-> Identifier
-> Options
-> T_EChild_vIn1
T_EChild_vIn1 Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon [Char]
_lhsImainFile [Char]
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions
(T_EChild_vOut1 PP_Doc
_lhsOargnamesw Attributes
_lhsOchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_lhsOsigs Set [Char]
_lhsOterminaldefs) <- 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
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
-> Set [Char]
-> Syn_EChild
Syn_EChild PP_Doc
_lhsOargnamesw Attributes
_lhsOchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_lhsOsigs Set [Char]
_lhsOterminaldefs)
)
{-# 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) (String) (String) (NontermIdent) (Options)
data T_EChild_vOut1 = T_EChild_vOut1 ( PP_Doc ) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ([(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) (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 [Char]
_lhsImainFile [Char]
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions) -> ( let
_tpDocFor :: PP_Doc
_tpDocFor = Type -> PP_Doc
rule0 Type
arg_tp_
_tpDocDefor :: PP_Doc
_tpDocDefor = Type -> PP_Doc
rule1 Type
arg_tp_
_fieldNm :: PP_Doc
_fieldNm = Identifier -> Identifier -> Identifier -> PP_Doc
rule2 Identifier
_lhsIcon Identifier
_lhsInt Identifier
arg_name_
_childNm :: PP_Doc
_childNm = Identifier -> PP_Doc
rule3 Identifier
arg_name_
_field :: (PP_Doc, PP_Doc, PP_Doc, PP_Doc)
_field = PP_Doc
-> PP_Doc -> PP_Doc -> PP_Doc -> (PP_Doc, PP_Doc, PP_Doc, PP_Doc)
forall b a c d. b -> a -> c -> d -> (a, b, c, d)
rule4 PP_Doc
_childNm PP_Doc
_fieldNm PP_Doc
_tpDocDefor PP_Doc
_tpDocFor
_lhsOsigs :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]
_lhsOsigs :: [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_lhsOsigs = (PP_Doc, PP_Doc, PP_Doc, PP_Doc)
-> ChildKind -> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
forall a. a -> ChildKind -> [a]
rule5 (PP_Doc, PP_Doc, PP_Doc, PP_Doc)
_field ChildKind
arg_kind_
_lhsOargnamesw :: PP_Doc
_lhsOargnamesw :: PP_Doc
_lhsOargnamesw = Options -> Identifier -> ChildKind -> Identifier -> PP_Doc
rule6 Options
_lhsIoptions Identifier
_nt ChildKind
arg_kind_ Identifier
arg_name_
_lhsOchildintros :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros :: Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros = (VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Identifier
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
forall a k. a -> k -> Map k a
rule7 VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr))
_introcode Identifier
arg_name_
_isDefor :: Bool
_isDefor = Type -> Bool
rule8 Type
arg_tp_
_valcode :: PP_Doc
_valcode = Bool -> Options -> Identifier -> ChildKind -> Identifier -> PP_Doc
rule9 Bool
_isDefor Options
_lhsIoptions Identifier
_nt ChildKind
arg_kind_ Identifier
arg_name_
_aroundcode :: PP_Doc
_aroundcode = Options -> Bool -> Identifier -> PP_Doc
rule10 Options
_lhsIoptions Bool
arg_hasAround_ Identifier
arg_name_
_introcode :: VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr))
_introcode = PP_Doc
-> Int
-> Bool
-> Options
-> Identifier
-> PP_Doc
-> Bool
-> ChildKind
-> Identifier
-> VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr))
rule11 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
rule12 Type
arg_tp_
_lhsOchildTypes :: Map Identifier Type
_lhsOchildTypes :: Attributes
_lhsOchildTypes = Identifier -> Type -> Attributes
forall k a. k -> a -> Map k a
rule13 Identifier
arg_name_ Type
arg_tp_
_initSt :: Int
_initSt = Map Identifier Int -> Identifier -> Int
rule14 Map Identifier Int
_lhsIallInitStates Identifier
_nt
_lhsOterminaldefs :: Set String
_lhsOterminaldefs :: Set [Char]
_lhsOterminaldefs = () -> Set [Char]
forall a. () -> Set a
rule15 ()
__result_ :: T_EChild_vOut1
__result_ = PP_Doc
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
-> Set [Char]
-> T_EChild_vOut1
T_EChild_vOut1 PP_Doc
_lhsOargnamesw Attributes
_lhsOchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_lhsOsigs Set [Char]
_lhsOterminaldefs
in T_EChild_vOut1
__result_ )
in T_EChild_v1 -> T_EChild_s2
C_EChild_s2 T_EChild_v1
v1
{-# INLINE rule0 #-}
{-# LINE 278 "src-ag/ExecutionPlan2Caml.ag" #-}
rule0 = \ tp_ ->
{-# LINE 278 "src-ag/ExecutionPlan2Caml.ag" #-}
ppTp $ removeDeforested tp_
{-# LINE 386 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule1 #-}
{-# LINE 279 "src-ag/ExecutionPlan2Caml.ag" #-}
rule1 = \ tp_ ->
{-# LINE 279 "src-ag/ExecutionPlan2Caml.ag" #-}
ppTp $ forceDeforested tp_
{-# LINE 392 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule2 #-}
{-# LINE 280 "src-ag/ExecutionPlan2Caml.ag" #-}
rule2 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ ->
{-# LINE 280 "src-ag/ExecutionPlan2Caml.ag" #-}
text $ recordFieldname _lhsInt _lhsIcon name_
{-# LINE 398 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule3 #-}
{-# LINE 281 "src-ag/ExecutionPlan2Caml.ag" #-}
rule3 = \ name_ ->
{-# LINE 281 "src-ag/ExecutionPlan2Caml.ag" #-}
text (fieldname name_)
{-# LINE 404 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule4 #-}
{-# LINE 282 "src-ag/ExecutionPlan2Caml.ag" #-}
rule4 = \ _childNm _fieldNm _tpDocDefor _tpDocFor ->
{-# LINE 282 "src-ag/ExecutionPlan2Caml.ag" #-}
(_fieldNm , _childNm , _tpDocDefor , _tpDocFor )
{-# LINE 410 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule5 #-}
{-# LINE 283 "src-ag/ExecutionPlan2Caml.ag" #-}
rule5 = \ _field kind_ ->
{-# LINE 283 "src-ag/ExecutionPlan2Caml.ag" #-}
case kind_ of
ChildAttr -> []
_ -> [_field ]
{-# LINE 418 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule6 #-}
{-# LINE 396 "src-ag/ExecutionPlan2Caml.ag" #-}
rule6 = \ ((_lhsIoptions) :: Options) _nt kind_ name_ ->
{-# LINE 396 "src-ag/ExecutionPlan2Caml.ag" #-}
case kind_ of
ChildSyntax -> "(" >#< prefix _lhsIoptions >|< _nt >#< name_ >|< "_" >#< ")"
ChildAttr -> empty
ChildReplace tp -> "(" >#< prefix _lhsIoptions >|< extractNonterminal tp >#< name_ >|< "_" >#< ")"
{-# LINE 427 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule7 #-}
{-# LINE 923 "src-ag/ExecutionPlan2Caml.ag" #-}
rule7 = \ _introcode name_ ->
{-# LINE 923 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton name_ _introcode
{-# LINE 433 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule8 #-}
{-# LINE 924 "src-ag/ExecutionPlan2Caml.ag" #-}
rule8 = \ tp_ ->
{-# LINE 924 "src-ag/ExecutionPlan2Caml.ag" #-}
case tp_ of
NT _ _ defor -> defor
_ -> False
{-# LINE 441 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule9 #-}
{-# LINE 927 "src-ag/ExecutionPlan2Caml.ag" #-}
rule9 = \ _isDefor ((_lhsIoptions) :: Options) _nt kind_ name_ ->
{-# LINE 927 "src-ag/ExecutionPlan2Caml.ag" #-}
case kind_ of
ChildSyntax -> name_ >|< "_"
ChildAttr ->
let head | not _isDefor = if lateHigherOrderBinding _lhsIoptions
then lateSemNtLabel _nt >#< lhsname _lhsIoptions True idLateBindingAttr
else prefix _lhsIoptions >|< _nt
| otherwise = empty
in pp_parens (head >#< instname name_)
ChildReplace _ ->
pp_parens (instname name_ >#< name_ >|< "_")
{-# LINE 456 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule10 #-}
{-# LINE 938 "src-ag/ExecutionPlan2Caml.ag" #-}
rule10 = \ ((_lhsIoptions) :: Options) hasAround_ name_ ->
{-# LINE 938 "src-ag/ExecutionPlan2Caml.ag" #-}
if hasAround_
then locname _lhsIoptions name_ >|< "_around"
else empty
{-# LINE 464 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule11 #-}
{-# LINE 941 "src-ag/ExecutionPlan2Caml.ag" #-}
rule11 = \ _aroundcode _initSt _isDefor ((_lhsIoptions) :: Options) _nt _valcode hasAround_ kind_ name_ ->
{-# LINE 941 "src-ag/ExecutionPlan2Caml.ag" #-}
\kind -> let pat = text $ stname name_ _initSt
attach = pp_parens (_aroundcode >#< _valcode ) >|< "." >|< nm_attach _nt >#< "()"
decl = pat >#< "=" >#< attach
in if compatibleAttach kind _nt _lhsIoptions
then Right ( "let" >#< decl >#< "in"
, 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 489 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule12 #-}
{-# LINE 961 "src-ag/ExecutionPlan2Caml.ag" #-}
rule12 = \ tp_ ->
{-# LINE 961 "src-ag/ExecutionPlan2Caml.ag" #-}
extractNonterminal tp_
{-# LINE 495 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule13 #-}
{-# LINE 1424 "src-ag/ExecutionPlan2Caml.ag" #-}
rule13 = \ name_ tp_ ->
{-# LINE 1424 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton name_ tp_
{-# LINE 501 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule14 #-}
{-# LINE 1468 "src-ag/ExecutionPlan2Caml.ag" #-}
rule14 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) _nt ->
{-# LINE 1468 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.findWithDefault (error "nonterminal not in allInitStates map") _nt _lhsIallInitStates
{-# LINE 507 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule15 #-}
rule15 = \ (_ :: ()) ->
Set.empty
{-# 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 [Char]
_lhsImainFile [Char]
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions) -> ( let
_tpDocFor :: PP_Doc
_tpDocFor = Type -> PP_Doc
rule16 Type
arg_tp_
_tpDocDefor :: PP_Doc
_tpDocDefor = Type -> PP_Doc
rule17 Type
arg_tp_
_fieldNm :: PP_Doc
_fieldNm = Identifier -> Identifier -> Identifier -> PP_Doc
rule18 Identifier
_lhsIcon Identifier
_lhsInt Identifier
arg_name_
_childNm :: PP_Doc
_childNm = Identifier -> PP_Doc
rule19 Identifier
arg_name_
_field :: (PP_Doc, PP_Doc, PP_Doc, PP_Doc)
_field = PP_Doc
-> PP_Doc -> PP_Doc -> PP_Doc -> (PP_Doc, PP_Doc, PP_Doc, PP_Doc)
forall b a c d. b -> a -> c -> d -> (a, b, c, d)
rule20 PP_Doc
_childNm PP_Doc
_fieldNm PP_Doc
_tpDocDefor PP_Doc
_tpDocFor
_lhsOsigs :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]
_lhsOsigs :: [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_lhsOsigs = (PP_Doc, PP_Doc, PP_Doc, PP_Doc)
-> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
forall a. a -> [a]
rule21 (PP_Doc, PP_Doc, PP_Doc, PP_Doc)
_field
_lhsOargnamesw :: PP_Doc
_lhsOargnamesw :: PP_Doc
_lhsOargnamesw = Identifier -> PP_Doc
rule22 Identifier
arg_name_
_lhsOchildintros :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros :: Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros = Identifier
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
forall k p a a k a.
k -> Map k (p -> Either a (PP_Doc, Set a, Map k a))
rule23 Identifier
arg_name_
_lhsOterminaldefs :: Set String
_lhsOterminaldefs :: Set [Char]
_lhsOterminaldefs = Identifier -> Set [Char]
rule24 Identifier
arg_name_
_lhsOchildTypes :: Map Identifier Type
_lhsOchildTypes :: Attributes
_lhsOchildTypes = Identifier -> Type -> Attributes
forall k a. k -> a -> Map k a
rule25 Identifier
arg_name_ Type
arg_tp_
__result_ :: T_EChild_vOut1
__result_ = PP_Doc
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
-> Set [Char]
-> T_EChild_vOut1
T_EChild_vOut1 PP_Doc
_lhsOargnamesw Attributes
_lhsOchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_lhsOsigs Set [Char]
_lhsOterminaldefs
in T_EChild_vOut1
__result_ )
in T_EChild_v1 -> T_EChild_s2
C_EChild_s2 T_EChild_v1
v1
{-# INLINE rule16 #-}
{-# LINE 278 "src-ag/ExecutionPlan2Caml.ag" #-}
rule16 = \ tp_ ->
{-# LINE 278 "src-ag/ExecutionPlan2Caml.ag" #-}
ppTp $ removeDeforested tp_
{-# LINE 541 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule17 #-}
{-# LINE 279 "src-ag/ExecutionPlan2Caml.ag" #-}
rule17 = \ tp_ ->
{-# LINE 279 "src-ag/ExecutionPlan2Caml.ag" #-}
ppTp $ forceDeforested tp_
{-# LINE 547 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule18 #-}
{-# LINE 280 "src-ag/ExecutionPlan2Caml.ag" #-}
rule18 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ ->
{-# LINE 280 "src-ag/ExecutionPlan2Caml.ag" #-}
text $ recordFieldname _lhsInt _lhsIcon name_
{-# LINE 553 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule19 #-}
{-# LINE 281 "src-ag/ExecutionPlan2Caml.ag" #-}
rule19 = \ name_ ->
{-# LINE 281 "src-ag/ExecutionPlan2Caml.ag" #-}
text (fieldname name_)
{-# LINE 559 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule20 #-}
{-# LINE 282 "src-ag/ExecutionPlan2Caml.ag" #-}
rule20 = \ _childNm _fieldNm _tpDocDefor _tpDocFor ->
{-# LINE 282 "src-ag/ExecutionPlan2Caml.ag" #-}
(_fieldNm , _childNm , _tpDocDefor , _tpDocFor )
{-# LINE 565 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule21 #-}
{-# LINE 286 "src-ag/ExecutionPlan2Caml.ag" #-}
rule21 = \ _field ->
{-# LINE 286 "src-ag/ExecutionPlan2Caml.ag" #-}
[_field ]
{-# LINE 571 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule22 #-}
{-# LINE 400 "src-ag/ExecutionPlan2Caml.ag" #-}
rule22 = \ name_ ->
{-# LINE 400 "src-ag/ExecutionPlan2Caml.ag" #-}
text $ fieldname name_
{-# LINE 577 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule23 #-}
{-# LINE 922 "src-ag/ExecutionPlan2Caml.ag" #-}
rule23 = \ name_ ->
{-# LINE 922 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton name_ (\_ -> Right (empty, Set.empty, Map.empty))
{-# LINE 583 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule24 #-}
{-# LINE 1266 "src-ag/ExecutionPlan2Caml.ag" #-}
rule24 = \ name_ ->
{-# LINE 1266 "src-ag/ExecutionPlan2Caml.ag" #-}
Set.singleton $ fieldname name_
{-# LINE 589 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule25 #-}
{-# LINE 1424 "src-ag/ExecutionPlan2Caml.ag" #-}
rule25 = \ name_ tp_ ->
{-# LINE 1424 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton name_ tp_
{-# LINE 595 "src-generated/ExecutionPlan2Caml.hs" #-}
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 -> [Char]
mainFile_Inh_EChildren :: (String), Inh_EChildren -> [Char]
mainName_Inh_EChildren :: (String), Inh_EChildren -> Identifier
nt_Inh_EChildren :: (NontermIdent), Inh_EChildren -> Options
options_Inh_EChildren :: (Options) }
data Syn_EChildren = Syn_EChildren { Syn_EChildren -> [PP_Doc]
argnamesw_Syn_EChildren :: ([PP_Doc]), Syn_EChildren -> Attributes
childTypes_Syn_EChildren :: (Map Identifier Type), Syn_EChildren
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
childintros_Syn_EChildren :: (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), Syn_EChildren -> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
sigs_Syn_EChildren :: ([(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]), Syn_EChildren -> Set [Char]
terminaldefs_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 [Char]
_lhsImainFile [Char]
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions) =
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
-> [Char]
-> [Char]
-> Identifier
-> Options
-> T_EChildren_vIn4
T_EChildren_vIn4 Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon [Char]
_lhsImainFile [Char]
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions
(T_EChildren_vOut4 [PP_Doc]
_lhsOargnamesw Attributes
_lhsOchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_lhsOsigs Set [Char]
_lhsOterminaldefs) <- 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]
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
-> Set [Char]
-> Syn_EChildren
Syn_EChildren [PP_Doc]
_lhsOargnamesw Attributes
_lhsOchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_lhsOsigs Set [Char]
_lhsOterminaldefs)
)
{-# 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) (String) (String) (NontermIdent) (Options)
data T_EChildren_vOut4 = T_EChildren_vOut4 ([PP_Doc]) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ([(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) (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 [Char]
_lhsImainFile [Char]
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions) -> ( 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 Attributes
_hdIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_hdIchildintros [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_hdIsigs Set [Char]
_hdIterminaldefs) = T_EChild_s2 -> T_EChild_v1
inv_EChild_s2 T_EChild_s2
_hdX2 (Map Identifier Int
-> Identifier
-> [Char]
-> [Char]
-> Identifier
-> Options
-> T_EChild_vIn1
T_EChild_vIn1 Map Identifier Int
_hdOallInitStates Identifier
_hdOcon [Char]
_hdOmainFile [Char]
_hdOmainName Identifier
_hdOnt Options
_hdOoptions)
(T_EChildren_vOut4 [PP_Doc]
_tlIargnamesw Attributes
_tlIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_tlIchildintros [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_tlIsigs Set [Char]
_tlIterminaldefs) = T_EChildren_s5 -> T_EChildren_v4
inv_EChildren_s5 T_EChildren_s5
_tlX5 (Map Identifier Int
-> Identifier
-> [Char]
-> [Char]
-> Identifier
-> Options
-> T_EChildren_vIn4
T_EChildren_vIn4 Map Identifier Int
_tlOallInitStates Identifier
_tlOcon [Char]
_tlOmainFile [Char]
_tlOmainName Identifier
_tlOnt Options
_tlOoptions)
_lhsOargnamesw :: [PP_Doc]
_lhsOargnamesw :: [PP_Doc]
_lhsOargnamesw = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule26 PP_Doc
_hdIargnamesw [PP_Doc]
_tlIargnamesw
_lhsOchildTypes :: Map Identifier Type
_lhsOchildTypes :: Attributes
_lhsOchildTypes = Attributes -> Attributes -> Attributes
rule27 Attributes
_hdIchildTypes Attributes
_tlIchildTypes
_lhsOchildintros :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros :: Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros = Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule28 Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_hdIchildintros Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_tlIchildintros
_lhsOsigs :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]
_lhsOsigs :: [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_lhsOsigs = [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
-> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
-> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
rule29 [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_hdIsigs [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_tlIsigs
_lhsOterminaldefs :: Set String
_lhsOterminaldefs :: Set [Char]
_lhsOterminaldefs = Set [Char] -> Set [Char] -> Set [Char]
rule30 Set [Char]
_hdIterminaldefs Set [Char]
_tlIterminaldefs
_hdOallInitStates :: Map Identifier Int
_hdOallInitStates = Map Identifier Int -> Map Identifier Int
rule31 Map Identifier Int
_lhsIallInitStates
_hdOcon :: Identifier
_hdOcon = Identifier -> Identifier
rule32 Identifier
_lhsIcon
_hdOmainFile :: [Char]
_hdOmainFile = [Char] -> [Char]
rule33 [Char]
_lhsImainFile
_hdOmainName :: [Char]
_hdOmainName = [Char] -> [Char]
rule34 [Char]
_lhsImainName
_hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule35 Identifier
_lhsInt
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule36 Options
_lhsIoptions
_tlOallInitStates :: Map Identifier Int
_tlOallInitStates = Map Identifier Int -> Map Identifier Int
rule37 Map Identifier Int
_lhsIallInitStates
_tlOcon :: Identifier
_tlOcon = Identifier -> Identifier
rule38 Identifier
_lhsIcon
_tlOmainFile :: [Char]
_tlOmainFile = [Char] -> [Char]
rule39 [Char]
_lhsImainFile
_tlOmainName :: [Char]
_tlOmainName = [Char] -> [Char]
rule40 [Char]
_lhsImainName
_tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule41 Identifier
_lhsInt
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule42 Options
_lhsIoptions
__result_ :: T_EChildren_vOut4
__result_ = [PP_Doc]
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
-> Set [Char]
-> T_EChildren_vOut4
T_EChildren_vOut4 [PP_Doc]
_lhsOargnamesw Attributes
_lhsOchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_lhsOsigs Set [Char]
_lhsOterminaldefs
in T_EChildren_vOut4
__result_ )
in T_EChildren_v4 -> T_EChildren_s5
C_EChildren_s5 T_EChildren_v4
v4
{-# INLINE rule26 #-}
rule26 :: PP_Doc -> [PP_Doc] -> [PP_Doc]
rule26 = \ ((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 rule27 #-}
rule27 :: Attributes -> Attributes -> Attributes
rule27 = \ ((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 rule28 #-}
rule28 :: Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule28 = \ ((Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_hdIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ((Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_tlIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_hdIchildintros Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_tlIchildintros
{-# INLINE rule29 #-}
rule29 :: [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
-> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
-> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
rule29 = \ (([(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_hdIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) (([(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_tlIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) ->
[(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_hdIsigs [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
-> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
-> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
forall a. [a] -> [a] -> [a]
++ [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_tlIsigs
{-# INLINE rule30 #-}
rule30 :: Set [Char] -> Set [Char] -> Set [Char]
rule30 = \ ((Set [Char]
_hdIterminaldefs) :: Set String) ((Set [Char]
_tlIterminaldefs) :: Set String) ->
Set [Char]
_hdIterminaldefs Set [Char] -> Set [Char] -> Set [Char]
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set [Char]
_tlIterminaldefs
{-# INLINE rule31 #-}
rule31 :: Map Identifier Int -> Map Identifier Int
rule31 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
Map Identifier Int
_lhsIallInitStates
{-# INLINE rule32 #-}
rule32 :: Identifier -> Identifier
rule32 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
Identifier
_lhsIcon
{-# INLINE rule33 #-}
rule33 :: [Char] -> [Char]
rule33 = \ (([Char]
_lhsImainFile) :: String) ->
[Char]
_lhsImainFile
{-# INLINE rule34 #-}
rule34 :: [Char] -> [Char]
rule34 = \ (([Char]
_lhsImainName) :: String) ->
[Char]
_lhsImainName
{-# INLINE rule35 #-}
rule35 :: Identifier -> Identifier
rule35 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
Identifier
_lhsInt
{-# INLINE rule36 #-}
rule36 :: Options -> Options
rule36 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule37 #-}
rule37 :: Map Identifier Int -> Map Identifier Int
rule37 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
Map Identifier Int
_lhsIallInitStates
{-# INLINE rule38 #-}
rule38 :: Identifier -> Identifier
rule38 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
Identifier
_lhsIcon
{-# INLINE rule39 #-}
rule39 :: [Char] -> [Char]
rule39 = \ (([Char]
_lhsImainFile) :: String) ->
[Char]
_lhsImainFile
{-# INLINE rule40 #-}
rule40 :: [Char] -> [Char]
rule40 = \ (([Char]
_lhsImainName) :: String) ->
[Char]
_lhsImainName
{-# INLINE rule41 #-}
rule41 :: Identifier -> Identifier
rule41 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
Identifier
_lhsInt
{-# INLINE rule42 #-}
rule42 :: Options -> Options
rule42 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# 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 [Char]
_lhsImainFile [Char]
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions) -> ( let
_lhsOargnamesw :: [PP_Doc]
_lhsOargnamesw :: [PP_Doc]
_lhsOargnamesw = () -> [PP_Doc]
forall a. () -> [a]
rule43 ()
_lhsOchildTypes :: Map Identifier Type
_lhsOchildTypes :: Attributes
_lhsOchildTypes = () -> Attributes
rule44 ()
_lhsOchildintros :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
_lhsOchildintros :: Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros = ()
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
forall k a. () -> Map k a
rule45 ()
_lhsOsigs :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]
_lhsOsigs :: [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_lhsOsigs = () -> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
forall a. () -> [a]
rule46 ()
_lhsOterminaldefs :: Set String
_lhsOterminaldefs :: Set [Char]
_lhsOterminaldefs = () -> Set [Char]
forall a. () -> Set a
rule47 ()
__result_ :: T_EChildren_vOut4
__result_ = [PP_Doc]
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
-> Set [Char]
-> T_EChildren_vOut4
T_EChildren_vOut4 [PP_Doc]
_lhsOargnamesw Attributes
_lhsOchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_lhsOsigs Set [Char]
_lhsOterminaldefs
in T_EChildren_vOut4
__result_ )
in T_EChildren_v4 -> T_EChildren_s5
C_EChildren_s5 T_EChildren_v4
v4
{-# INLINE rule43 #-}
rule43 :: () -> [a]
rule43 = \ (()
_ :: ()) ->
[]
{-# INLINE rule44 #-}
rule44 :: () -> Attributes
rule44 = \ (()
_ :: ()) ->
Attributes
forall a. Monoid a => a
mempty
{-# INLINE rule45 #-}
rule45 :: () -> Map k a
rule45 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule46 #-}
rule46 :: () -> [a]
rule46 = \ (()
_ :: ()) ->
[]
{-# INLINE rule47 #-}
rule47 :: () -> Set a
rule47 = \ (()
_ :: ()) ->
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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
allchildvisit_Inh_ENonterminal :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error 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 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 -> [Char]
mainFile_Inh_ENonterminal :: (String), Inh_ENonterminal -> [Char]
mainName_Inh_ENonterminal :: (String), Inh_ENonterminal -> Options
options_Inh_ENonterminal :: (Options), Inh_ENonterminal -> Map Identifier Attributes
synmap_Inh_ENonterminal :: (Map NontermIdent Attributes), Inh_ENonterminal -> TypeSyns
typeSyns_Inh_ENonterminal :: (TypeSyns), Inh_ENonterminal -> Set Identifier
wrappers_Inh_ENonterminal :: (Set NontermIdent) }
data Syn_ENonterminal = Syn_ENonterminal { Syn_ENonterminal
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
childvisit_Syn_ENonterminal :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), Syn_ENonterminal -> PP_Doc
code_Syn_ENonterminal :: (PP_Doc), Syn_ENonterminal -> PP_Doc
datas_Syn_ENonterminal :: (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 -> Map Identifier Int
initStates_Syn_ENonterminal :: (Map NontermIdent Int), Syn_ENonterminal -> PP_Doc
modules_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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> [Char]
-> [Char]
-> Options
-> Map Identifier Attributes
-> 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap TypeSyns
_lhsItypeSyns Set Identifier
_lhsIwrappers
(T_ENonterminal_vOut7 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit PP_Doc
_lhsOcode PP_Doc
_lhsOdatas Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOmodules 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 (Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> PP_Doc
-> PP_Doc
-> Seq Error
-> Map Int (Int, Int)
-> Map Identifier Int
-> PP_Doc
-> Seq PP_Doc
-> Seq PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Syn_ENonterminal
Syn_ENonterminal Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit PP_Doc
_lhsOcode PP_Doc
_lhsOdatas Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOmodules 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (Options) (Map NontermIdent Attributes) (TypeSyns) (Set NontermIdent)
data T_ENonterminal_vOut7 = T_ENonterminal_vOut7 (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (PP_Doc) (PP_Doc) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (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
_ 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_prodsIchildvisit Int
_prodsIcount [PP_Doc]
_prodsIdatatype [PP_Doc]
_prodsIdatatype_call [PP_Doc]
_prodsIdatatype_con Seq Error
_prodsIerrors Map Int (Int, Int)
_prodsIfromToStates Seq PP_Doc
_prodsIsemFunBndDefs Seq PP_Doc
_prodsIsemFunBndTps PP_Doc
_prodsIsem_nt PP_Doc
_prodsIsem_prod 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> [Int]
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Int
-> Map Identifier Attributes
-> [Char]
-> [Char]
-> Map Int StateCtx
-> Identifier
-> Type
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Bool
-> Attributes
-> 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_prodsOallchildvisit [Int]
_prodsOallstates Map Int (Set Identifier)
_prodsOavisitdefs Map Int (Set Identifier)
_prodsOavisituses Attributes
_prodsOinhmap Int
_prodsOinitial Map Identifier Attributes
_prodsOlocalAttrTypes [Char]
_prodsOmainFile [Char]
_prodsOmainName Map Int StateCtx
_prodsOnextVisits Identifier
_prodsOnt Type
_prodsOntType Options
_prodsOoptions [Identifier]
_prodsOparams Map Int StateCtx
_prodsOprevVisits Bool
_prodsOrename Attributes
_prodsOsynmap)
_prodsOrename :: Bool
_prodsOrename = Options -> Bool
rule48 Options
_lhsIoptions
_prodsOnt :: Identifier
_prodsOnt = Identifier -> Identifier
forall a. a -> a
rule49 Identifier
arg_nt_
_prodsOparams :: [Identifier]
_prodsOparams = [Identifier] -> [Identifier]
forall a. a -> a
rule50 [Identifier]
arg_params_
_lhsOdatas :: PP_Doc
_lhsOdatas :: PP_Doc
_lhsOdatas = PP_Doc
-> PP_Doc
-> PP_Doc
-> Bool
-> Options
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Identifier
-> PP_Doc
rule51 PP_Doc
_c_states PP_Doc
_datatypeNt PP_Doc
_datatypeProds Bool
_hasWrapper Options
_lhsIoptions PP_Doc
_prodsIt_visits PP_Doc
_t_init PP_Doc
_t_states PP_Doc
_wr_inh PP_Doc
_wr_syn Identifier
arg_nt_
_lhsOcode :: PP_Doc
_lhsOcode :: PP_Doc
_lhsOcode = PP_Doc
-> Bool
-> Options
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Identifier
-> PP_Doc
rule52 PP_Doc
_datatypeCon Bool
_hasWrapper Options
_lhsIoptions PP_Doc
_prodsIsem_prod PP_Doc
_sem_nt PP_Doc
_wrapper Identifier
arg_nt_
_lhsOmodules :: PP_Doc
_lhsOmodules :: PP_Doc
_lhsOmodules = PP_Doc -> PP_Doc
forall a. a -> a
rule53 PP_Doc
_moduleDecl
_hasWrapper :: Bool
_hasWrapper = Set Identifier -> Identifier -> Bool
rule54 Set Identifier
_lhsIwrappers Identifier
arg_nt_
_t_params :: PP_Doc
_t_params = [Identifier] -> PP_Doc
rule55 [Identifier]
arg_params_
_aliasPre :: PP_Doc
_aliasPre = PP_Doc -> Identifier -> PP_Doc
rule56 PP_Doc
_t_params Identifier
arg_nt_
_aliasMod :: PP_Doc
_aliasMod = PP_Doc -> Identifier -> PP_Doc
rule57 PP_Doc
_aliasPre Identifier
arg_nt_
_datatypeNt :: PP_Doc
_datatypeNt = PP_Doc
-> PP_Doc
-> TypeSyns
-> [PP_Doc]
-> [PP_Doc]
-> PP_Doc
-> Identifier
-> PP_Doc
rule58 PP_Doc
_aliasMod PP_Doc
_aliasPre TypeSyns
_lhsItypeSyns [PP_Doc]
_prodsIdatatype [PP_Doc]
_prodsIdatatype_call PP_Doc
_t_params Identifier
arg_nt_
_datatypeCon :: PP_Doc
_datatypeCon = TypeSyns -> [PP_Doc] -> Identifier -> PP_Doc
rule59 TypeSyns
_lhsItypeSyns [PP_Doc]
_prodsIdatatype_con Identifier
arg_nt_
_moduleDecl :: PP_Doc
_moduleDecl = TypeSyns -> Identifier -> PP_Doc
rule60 TypeSyns
_lhsItypeSyns Identifier
arg_nt_
_datatypeProds :: PP_Doc
_datatypeProds = [PP_Doc] -> PP_Doc
rule61 [PP_Doc]
_prodsIdatatype
_fsemname :: Identifier -> [Char]
_fsemname = Options -> Identifier -> [Char]
rule62 Options
_lhsIoptions
_semname :: [Char]
_semname = (Identifier -> [Char]) -> Identifier -> [Char]
forall t t. (t -> t) -> t -> t
rule63 Identifier -> [Char]
_fsemname Identifier
arg_nt_
_frecarg :: Type -> PP_Doc -> PP_Doc
_frecarg = (Identifier -> [Char]) -> Type -> PP_Doc -> PP_Doc
rule64 Identifier -> [Char]
_fsemname
_sem_param_tp :: PP_Doc
_sem_param_tp = PP_Doc -> Identifier -> PP_Doc
rule65 PP_Doc
_t_params Identifier
arg_nt_
_sem_res_tp :: PP_Doc
_sem_res_tp = PP_Doc -> PP_Doc -> PP_Doc
rule66 PP_Doc
_t_params PP_Doc
_t_type
_sem_tp :: PP_Doc
_sem_tp = PP_Doc -> PP_Doc -> PP_Doc
rule67 PP_Doc
_sem_param_tp PP_Doc
_sem_res_tp
_o_sigs :: Bool
_o_sigs = Options -> Bool
rule68 Options
_lhsIoptions
_sem_nt_body :: PP_Doc
_sem_nt_body = PP_Doc -> PP_Doc
rule69 PP_Doc
_prodsIsem_nt
_sem_nt :: PP_Doc
_sem_nt = (Type -> PP_Doc -> PP_Doc)
-> (Identifier -> [Char])
-> TypeSyns
-> Bool
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> [Char]
-> Identifier
-> PP_Doc
rule70 Type -> PP_Doc -> PP_Doc
_frecarg Identifier -> [Char]
_fsemname TypeSyns
_lhsItypeSyns Bool
_o_sigs PP_Doc
_sem_nt_body PP_Doc
_sem_param_tp PP_Doc
_sem_res_tp [Char]
_semname Identifier
arg_nt_
(Just Attributes
_prodsOinhmap) = Map Identifier Attributes -> Identifier -> Maybe Attributes
rule71 Map Identifier Attributes
_lhsIinhmap Identifier
arg_nt_
(Just Attributes
_prodsOsynmap) = Map Identifier Attributes -> Identifier -> Maybe Attributes
rule72 Map Identifier Attributes
_lhsIsynmap Identifier
arg_nt_
_prodsOallInhmap :: Map Identifier Attributes
_prodsOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule73 Map Identifier Attributes
_lhsIinhmap
_prodsOallSynmap :: Map Identifier Attributes
_prodsOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule74 Map Identifier Attributes
_lhsIsynmap
_allstates :: [Int]
_allstates = [VisitStateState] -> Int -> [Int]
rule75 [VisitStateState]
_prodsIallvisits Int
arg_initial_
_stvisits :: Int -> [VisitStateState]
_stvisits = [VisitStateState] -> Int -> [VisitStateState]
rule76 [VisitStateState]
_prodsIallvisits
_t_type :: PP_Doc
_t_type = Identifier -> PP_Doc
rule77 Identifier
arg_nt_
_t_c_params :: PP_Doc
_t_c_params = [Identifier] -> PP_Doc
rule78 [Identifier]
arg_params_
_t_init :: PP_Doc
_t_init = PP_Doc -> PP_Doc -> Int -> Identifier -> PP_Doc
rule79 PP_Doc
_t_params PP_Doc
_t_type Int
arg_initial_ Identifier
arg_nt_
_t_states :: PP_Doc
_t_states = [Int]
-> PP_Doc -> PP_Doc -> Map Int StateCtx -> Identifier -> PP_Doc
rule80 [Int]
_allstates PP_Doc
_t_c_params PP_Doc
_t_params Map Int StateCtx
arg_nextVisits_ Identifier
arg_nt_
_c_states :: PP_Doc
_c_states = [Int]
-> [VisitStateState]
-> PP_Doc
-> Map Int StateCtx
-> Identifier
-> PP_Doc
rule81 [Int]
_allstates [VisitStateState]
_prodsIallvisits PP_Doc
_t_c_params Map Int StateCtx
arg_nextVisits_ Identifier
arg_nt_
_wr_inh :: PP_Doc
_wr_inh = ([Char] -> [(Identifier, Type)] -> PP_Doc)
-> [(Identifier, Type)] -> PP_Doc
forall t t. ([Char] -> t -> t) -> t -> t
rule82 [Char] -> [(Identifier, Type)] -> PP_Doc
_genwrap [(Identifier, Type)]
_wr_inhs1
_wr_syn :: PP_Doc
_wr_syn = ([Char] -> [(Identifier, Type)] -> PP_Doc)
-> [(Identifier, Type)] -> PP_Doc
forall t t. ([Char] -> t -> t) -> t -> t
rule83 [Char] -> [(Identifier, Type)] -> PP_Doc
_genwrap [(Identifier, Type)]
_wr_syns
_genwrap :: [Char] -> [(Identifier, Type)] -> PP_Doc
_genwrap = PP_Doc -> Identifier -> [Char] -> [(Identifier, Type)] -> PP_Doc
rule84 PP_Doc
_t_params Identifier
arg_nt_
_inhAttrs :: Attributes
_inhAttrs = Map Identifier Attributes -> Identifier -> Attributes
rule85 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)]
rule86 Attributes
_inhAttrs Attributes -> Attributes
_wr_filter
_wr_inhs1 :: [(Identifier, Type)]
_wr_inhs1 = Attributes -> [(Identifier, Type)]
forall k a. Map k a -> [(k, a)]
rule87 Attributes
_inhAttrs
_wr_filter :: Attributes -> Attributes
_wr_filter = Options -> Attributes -> Attributes
forall a. Options -> Map Identifier a -> Map Identifier a
rule88 Options
_lhsIoptions
_wr_syns :: [(Identifier, Type)]
_wr_syns = Map Identifier Attributes -> Identifier -> [(Identifier, Type)]
rule89 Map Identifier Attributes
_lhsIsynmap Identifier
arg_nt_
_wrapname :: PP_Doc
_wrapname = Identifier -> PP_Doc
rule90 Identifier
arg_nt_
_inhname :: PP_Doc
_inhname = Identifier -> PP_Doc
rule91 Identifier
arg_nt_
_synname :: PP_Doc
_synname = Identifier -> PP_Doc
rule92 Identifier
arg_nt_
_firstVisitInfo :: StateCtx
_firstVisitInfo = Int -> Map Int StateCtx -> StateCtx
rule93 Int
arg_initial_ Map Int StateCtx
arg_nextVisits_
_wrapArgSemTp :: PP_Doc
_wrapArgSemTp = PP_Doc -> PP_Doc -> PP_Doc
rule94 PP_Doc
_t_params PP_Doc
_t_type
_wrapArgInhTp :: PP_Doc
_wrapArgInhTp = PP_Doc -> PP_Doc -> PP_Doc
rule95 PP_Doc
_inhname PP_Doc
_t_params
_wrapArgPats :: PP_Doc
_wrapArgPats = Options -> [(Identifier, Type)] -> Identifier -> PP_Doc
forall b. Options -> [(Identifier, b)] -> Identifier -> PP_Doc
rule96 Options
_lhsIoptions [(Identifier, Type)]
_wr_inhs1 Identifier
arg_nt_
_wrapResTp :: PP_Doc
_wrapResTp = PP_Doc -> PP_Doc -> PP_Doc
rule97 PP_Doc
_synname PP_Doc
_t_params
_wrapper :: PP_Doc
_wrapper = Bool
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
rule98 Bool
_o_sigs PP_Doc
_wrapArgInhTp PP_Doc
_wrapArgPats PP_Doc
_wrapArgSemTp PP_Doc
_wrapResTp PP_Doc
_wrapname PP_Doc
_wrapperPreamble
_wrapperPreamble :: PP_Doc
_wrapperPreamble = [Char] -> Options -> PP_Doc -> PP_Doc
rule99 [Char]
_lhsImainName Options
_lhsIoptions PP_Doc
_wrapperBody
_wrapperBody :: PP_Doc
_wrapperBody = StateCtx
-> Options
-> [(Identifier, Type)]
-> [(Identifier, Type)]
-> Int
-> [Int]
-> Identifier
-> PP_Doc
forall b b.
StateCtx
-> Options
-> [(Identifier, b)]
-> [(Identifier, b)]
-> Int
-> [Int]
-> Identifier
-> PP_Doc
rule100 StateCtx
_firstVisitInfo Options
_lhsIoptions [(Identifier, Type)]
_wr_inhs [(Identifier, Type)]
_wr_syns Int
arg_initial_ [Int]
arg_initialv_ Identifier
arg_nt_
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = Seq PP_Doc -> PP_Doc -> Seq PP_Doc
rule101 Seq PP_Doc
_prodsIsemFunBndDefs PP_Doc
_semFunBndDef
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps = Seq PP_Doc -> PP_Doc -> Seq PP_Doc
rule102 Seq PP_Doc
_prodsIsemFunBndTps PP_Doc
_semFunBndTp
_semFunBndDef :: PP_Doc
_semFunBndDef = [Char] -> [Char] -> PP_Doc
rule103 [Char]
_semFunBndNm [Char]
_semname
_semFunBndTp :: PP_Doc
_semFunBndTp = [Char] -> PP_Doc -> PP_Doc
rule104 [Char]
_semFunBndNm PP_Doc
_sem_tp
_semFunBndNm :: [Char]
_semFunBndNm = Identifier -> [Char]
rule105 Identifier
arg_nt_
_prodsOinitial :: Int
_prodsOinitial = Int -> Int
forall a. a -> a
rule106 Int
arg_initial_
_prodsOallstates :: [Int]
_prodsOallstates = [Int] -> [Int]
forall a. a -> a
rule107 [Int]
_allstates
_prodsOnextVisits :: Map Int StateCtx
_prodsOnextVisits = Map Int StateCtx -> Map Int StateCtx
forall a. a -> a
rule108 Map Int StateCtx
arg_nextVisits_
_prodsOprevVisits :: Map Int StateCtx
_prodsOprevVisits = Map Int StateCtx -> Map Int StateCtx
forall a. a -> a
rule109 Map Int StateCtx
arg_prevVisits_
_prodsOlocalAttrTypes :: Map Identifier Attributes
_prodsOlocalAttrTypes = Map Identifier (Map Identifier Attributes)
-> Identifier -> Map Identifier Attributes
rule110 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
rule111 Int
arg_initial_ Identifier
arg_nt_
_ntType :: Type
_ntType = Identifier -> [Identifier] -> Type
rule112 Identifier
arg_nt_ [Identifier]
arg_params_
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule113 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_prodsIchildvisit
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule114 Seq Error
_prodsIerrors
_lhsOfromToStates :: Map VisitIdentifier (Int,Int)
_lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule115 Map Int (Int, Int)
_prodsIfromToStates
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind
rule116 Map Int VisitKind
_prodsIvisitKinds
_lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
_lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule117 Map Int (Set Identifier)
_prodsIvisitdefs
_lhsOvisituses :: Map VisitIdentifier (Set Identifier)
_lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule118 Map Int (Set Identifier)
_prodsIvisituses
_prodsOallFromToStates :: Map Int (Int, Int)
_prodsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule119 Map Int (Int, Int)
_lhsIallFromToStates
_prodsOallInitStates :: Map Identifier Int
_prodsOallInitStates = Map Identifier Int -> Map Identifier Int
rule120 Map Identifier Int
_lhsIallInitStates
_prodsOallVisitKinds :: Map Int VisitKind
_prodsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule121 Map Int VisitKind
_lhsIallVisitKinds
_prodsOallchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_prodsOallchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule122 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit
_prodsOavisitdefs :: Map Int (Set Identifier)
_prodsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule123 Map Int (Set Identifier)
_lhsIavisitdefs
_prodsOavisituses :: Map Int (Set Identifier)
_prodsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule124 Map Int (Set Identifier)
_lhsIavisituses
_prodsOmainFile :: [Char]
_prodsOmainFile = [Char] -> [Char]
rule125 [Char]
_lhsImainFile
_prodsOmainName :: [Char]
_prodsOmainName = [Char] -> [Char]
rule126 [Char]
_lhsImainName
_prodsOntType :: Type
_prodsOntType = Type -> Type
forall a. a -> a
rule127 Type
_ntType
_prodsOoptions :: Options
_prodsOoptions = Options -> Options
rule128 Options
_lhsIoptions
__result_ :: T_ENonterminal_vOut7
__result_ = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> PP_Doc
-> PP_Doc
-> Seq Error
-> Map Int (Int, Int)
-> Map Identifier Int
-> 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 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit PP_Doc
_lhsOcode PP_Doc
_lhsOdatas Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOmodules 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 rule48 #-}
{-# LINE 78 "src-ag/ExecutionPlan2Caml.ag" #-}
rule48 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 78 "src-ag/ExecutionPlan2Caml.ag" #-}
rename _lhsIoptions
{-# LINE 890 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule49 #-}
{-# LINE 86 "src-ag/ExecutionPlan2Caml.ag" #-}
rule49 = \ nt_ ->
{-# LINE 86 "src-ag/ExecutionPlan2Caml.ag" #-}
nt_
{-# LINE 896 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule50 #-}
{-# LINE 96 "src-ag/ExecutionPlan2Caml.ag" #-}
rule50 = \ params_ ->
{-# LINE 96 "src-ag/ExecutionPlan2Caml.ag" #-}
params_
{-# LINE 902 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule51 #-}
{-# LINE 115 "src-ag/ExecutionPlan2Caml.ag" #-}
rule51 = \ _c_states _datatypeNt _datatypeProds _hasWrapper ((_lhsIoptions) :: Options) ((_prodsIt_visits) :: PP_Doc) _t_init _t_states _wr_inh _wr_syn nt_ ->
{-# LINE 115 "src-ag/ExecutionPlan2Caml.ag" #-}
( text ""
>-< "(* *** " ++ getName nt_ ++ " *** [data] *)")
>-< (if dataTypes _lhsIoptions
then pp "(* data *)"
>-< _datatypeNt
>-< _datatypeProds
>-< ""
else empty)
>-< (if _hasWrapper
then pp "(* wrapper *)"
>-< _wr_inh
>-< _wr_syn
>-< ""
else empty)
>-< (if semfuns _lhsIoptions
then pp "(* semantic domain *)"
>-< _t_init
>-< _t_states
>-< _c_states
>-< _prodsIt_visits
>-< ""
else empty)
{-# LINE 929 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule52 #-}
{-# LINE 138 "src-ag/ExecutionPlan2Caml.ag" #-}
rule52 = \ _datatypeCon _hasWrapper ((_lhsIoptions) :: Options) ((_prodsIsem_prod) :: PP_Doc) _sem_nt _wrapper nt_ ->
{-# LINE 138 "src-ag/ExecutionPlan2Caml.ag" #-}
( text ""
>-< "(* *** " ++ getName nt_ ++ " *** [code] *)")
>-< (if dataTypes _lhsIoptions
then pp "(* constructor functions *)"
>-< _datatypeCon
else empty)
>-< (if _hasWrapper
then pp "(* wrapper *)"
>-< _wrapper
>-< ""
else empty)
>-< (if folds _lhsIoptions
then "(* cata *)"
>-< _sem_nt
>-< ""
else empty)
>-< (if semfuns _lhsIoptions
then "(* semantic domain *)"
>-< _prodsIsem_prod
>-< ""
else empty)
{-# LINE 955 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule53 #-}
{-# LINE 163 "src-ag/ExecutionPlan2Caml.ag" #-}
rule53 = \ _moduleDecl ->
{-# LINE 163 "src-ag/ExecutionPlan2Caml.ag" #-}
_moduleDecl
{-# LINE 961 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule54 #-}
{-# LINE 165 "src-ag/ExecutionPlan2Caml.ag" #-}
rule54 = \ ((_lhsIwrappers) :: Set NontermIdent) nt_ ->
{-# LINE 165 "src-ag/ExecutionPlan2Caml.ag" #-}
nt_ `Set.member` _lhsIwrappers
{-# LINE 967 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule55 #-}
{-# LINE 216 "src-ag/ExecutionPlan2Caml.ag" #-}
rule55 = \ params_ ->
{-# LINE 216 "src-ag/ExecutionPlan2Caml.ag" #-}
ppTypeParams params_
{-# LINE 973 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule56 #-}
{-# LINE 217 "src-ag/ExecutionPlan2Caml.ag" #-}
rule56 = \ _t_params nt_ ->
{-# LINE 217 "src-ag/ExecutionPlan2Caml.ag" #-}
"and" >#< _t_params >#< nt_ >#< "="
{-# LINE 979 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule57 #-}
{-# LINE 218 "src-ag/ExecutionPlan2Caml.ag" #-}
rule57 = \ _aliasPre nt_ ->
{-# LINE 218 "src-ag/ExecutionPlan2Caml.ag" #-}
_aliasPre >#< modName nt_ >|< ".t"
{-# LINE 985 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule58 #-}
{-# LINE 220 "src-ag/ExecutionPlan2Caml.ag" #-}
rule58 = \ _aliasMod _aliasPre ((_lhsItypeSyns) :: TypeSyns) ((_prodsIdatatype) :: [PP_Doc]) ((_prodsIdatatype_call) :: [PP_Doc]) _t_params nt_ ->
{-# LINE 220 "src-ag/ExecutionPlan2Caml.ag" #-}
case lookup nt_ _lhsItypeSyns of
Just (List t) -> _aliasPre >#< ppTp t >#< "list"
Just (Maybe t) -> _aliasPre >#< ppTp t >#< "option"
Just (Tuple ts) -> _aliasPre >#< (pp_block "(" ")" " * " $ map (ppTp . snd) ts)
Just (Map k v) -> _aliasMod
Just (IntMap t) -> _aliasMod
Just (OrdSet t) -> _aliasMod
Just IntSet -> _aliasMod
_ -> "and" >#< _t_params >#< nt_ >#< "="
>-< ( if null _prodsIdatatype
then pp "unit"
else indent 2 $ vlist _prodsIdatatype_call
)
{-# LINE 1003 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule59 #-}
{-# LINE 239 "src-ag/ExecutionPlan2Caml.ag" #-}
rule59 = \ ((_lhsItypeSyns) :: TypeSyns) ((_prodsIdatatype_con) :: [PP_Doc]) nt_ ->
{-# LINE 239 "src-ag/ExecutionPlan2Caml.ag" #-}
case lookup nt_ _lhsItypeSyns of
Just _ -> empty
Nothing -> vlist _prodsIdatatype_con
{-# LINE 1011 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule60 #-}
{-# LINE 244 "src-ag/ExecutionPlan2Caml.ag" #-}
rule60 = \ ((_lhsItypeSyns) :: TypeSyns) nt_ ->
{-# LINE 244 "src-ag/ExecutionPlan2Caml.ag" #-}
let ppModule :: PP a => a -> PP_Doc
ppModule expr = "module" >#< modName nt_ >#< "="
in case lookup nt_ _lhsItypeSyns of
Just (Map k _) -> ppModule ("Map.Make" >#< pp_parens (ppTp k))
Just (IntMap _) -> ppModule ("Map.Make ()")
Just (OrdSet t) -> ppModule ("Set.Make" >#< pp_parens (ppTp t))
Just IntSet -> ppModule ("Set.Make (struct type t = int let compare = Pervasives.compare end)")
_ -> empty
{-# LINE 1024 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule61 #-}
{-# LINE 253 "src-ag/ExecutionPlan2Caml.ag" #-}
rule61 = \ ((_prodsIdatatype) :: [PP_Doc]) ->
{-# LINE 253 "src-ag/ExecutionPlan2Caml.ag" #-}
vlist _prodsIdatatype
{-# LINE 1030 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule62 #-}
{-# LINE 313 "src-ag/ExecutionPlan2Caml.ag" #-}
rule62 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 313 "src-ag/ExecutionPlan2Caml.ag" #-}
\x -> prefix _lhsIoptions ++ show x
{-# LINE 1036 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule63 #-}
{-# LINE 314 "src-ag/ExecutionPlan2Caml.ag" #-}
rule63 = \ _fsemname nt_ ->
{-# LINE 314 "src-ag/ExecutionPlan2Caml.ag" #-}
_fsemname nt_
{-# LINE 1042 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule64 #-}
{-# LINE 315 "src-ag/ExecutionPlan2Caml.ag" #-}
rule64 = \ _fsemname ->
{-# LINE 315 "src-ag/ExecutionPlan2Caml.ag" #-}
\t x -> case t of
NT nt _ _ -> pp_parens (_fsemname nt >#< x)
_ -> x
{-# LINE 1050 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule65 #-}
{-# LINE 319 "src-ag/ExecutionPlan2Caml.ag" #-}
rule65 = \ _t_params nt_ ->
{-# LINE 319 "src-ag/ExecutionPlan2Caml.ag" #-}
_t_params >#< nt_
{-# LINE 1056 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule66 #-}
{-# LINE 320 "src-ag/ExecutionPlan2Caml.ag" #-}
rule66 = \ _t_params _t_type ->
{-# LINE 320 "src-ag/ExecutionPlan2Caml.ag" #-}
_t_params >#< _t_type
{-# LINE 1062 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule67 #-}
{-# LINE 321 "src-ag/ExecutionPlan2Caml.ag" #-}
rule67 = \ _sem_param_tp _sem_res_tp ->
{-# LINE 321 "src-ag/ExecutionPlan2Caml.ag" #-}
_sem_param_tp >#< "->" >#< _sem_res_tp
{-# LINE 1068 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule68 #-}
{-# LINE 323 "src-ag/ExecutionPlan2Caml.ag" #-}
rule68 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 323 "src-ag/ExecutionPlan2Caml.ag" #-}
typeSigs _lhsIoptions
{-# LINE 1074 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule69 #-}
{-# LINE 324 "src-ag/ExecutionPlan2Caml.ag" #-}
rule69 = \ ((_prodsIsem_nt) :: PP_Doc) ->
{-# LINE 324 "src-ag/ExecutionPlan2Caml.ag" #-}
"match arg with" >-< (indent 2 $ _prodsIsem_nt)
{-# LINE 1080 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule70 #-}
{-# LINE 325 "src-ag/ExecutionPlan2Caml.ag" #-}
rule70 = \ _frecarg _fsemname ((_lhsItypeSyns) :: TypeSyns) _o_sigs _sem_nt_body _sem_param_tp _sem_res_tp _semname nt_ ->
{-# LINE 325 "src-ag/ExecutionPlan2Caml.ag" #-}
let genSem :: PP a => a -> PP_Doc -> PP_Doc
genSem nm body = "and" >#< ppFunDecl _o_sigs (pp _semname ) [(pp nm, _sem_param_tp )] _sem_res_tp body
genAlias alts = genSem (pp "arg") (pp "match arg with" >-< (indent 2 $ vlist $ map (pp "|" >#<) alts))
genMap v = let body = modName nt_ >|< ".fold" >#< _semname >|< "_Entry" >#< _semname >|< "_Nil" >#< els
els = case v of
NT nt _ _ -> pp_parens (modName nt_ >|< ".map" >#< _fsemname nt >#< "m")
_ -> pp "m"
in genSem "m" body
genSet mbNt = let body = "List.fold_right" >#< _semname >|< "_Entry" >#<
els (pp_parens (modName nt_ >|< ".elements" >#< "s")) >#< _semname >|< "_Nil"
els r = maybe r (\nt -> pp_parens ("List.map" >#< _fsemname nt >#< r)) mbNt
in genSem "s" body
in case lookup nt_ _lhsItypeSyns of
Just (List t) -> let body = "List.fold_right" >#< _semname >|< "_Cons" >#< els >#< _semname >|< "_Nil"
els = case t of
NT nt _ _ -> pp_parens ("List.map" >#< _fsemname nt >#< "list")
_ -> pp "list"
in genSem "list" body
Just (Tuple ts) -> let pat = pp_parens (ppCommas $ map fst ts)
body = _semname >|< "_Tuple" >#< ppSpaced (map (\t -> _frecarg (snd t) (pp $ fst t)) ts)
in genSem pat body
Just (Map _ v) -> genMap v
Just (IntMap v) -> genMap v
Just (Maybe t) -> genAlias
[ "None" >#< "->" >#< "=" >#< _semname >|< "_Nothing"
, "Some" >#< "just" >#< "->" >#< _semname >|< "_Just" >#< _frecarg t (pp "just")
]
Just (OrdSet t) -> genSet $ case t of
NT nt _ _ -> Just nt
_ -> Nothing
Just (IntSet) -> genSet Nothing
_ -> genSem "arg" _sem_nt_body
{-# LINE 1117 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule71 #-}
{-# LINE 420 "src-ag/ExecutionPlan2Caml.ag" #-}
rule71 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) nt_ ->
{-# LINE 420 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.lookup nt_ _lhsIinhmap
{-# LINE 1123 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule72 #-}
{-# LINE 421 "src-ag/ExecutionPlan2Caml.ag" #-}
rule72 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) nt_ ->
{-# LINE 421 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.lookup nt_ _lhsIsynmap
{-# LINE 1129 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule73 #-}
{-# LINE 422 "src-ag/ExecutionPlan2Caml.ag" #-}
rule73 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->
{-# LINE 422 "src-ag/ExecutionPlan2Caml.ag" #-}
_lhsIinhmap
{-# LINE 1135 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule74 #-}
{-# LINE 423 "src-ag/ExecutionPlan2Caml.ag" #-}
rule74 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->
{-# LINE 423 "src-ag/ExecutionPlan2Caml.ag" #-}
_lhsIsynmap
{-# LINE 1141 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule75 #-}
{-# LINE 444 "src-ag/ExecutionPlan2Caml.ag" #-}
rule75 = \ ((_prodsIallvisits) :: [VisitStateState]) initial_ ->
{-# LINE 444 "src-ag/ExecutionPlan2Caml.ag" #-}
orderStates initial_ _prodsIallvisits
{-# LINE 1147 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule76 #-}
{-# LINE 445 "src-ag/ExecutionPlan2Caml.ag" #-}
rule76 = \ ((_prodsIallvisits) :: [VisitStateState]) ->
{-# LINE 445 "src-ag/ExecutionPlan2Caml.ag" #-}
\st -> filter (\(v,f,t) -> f == st) _prodsIallvisits
{-# LINE 1153 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule77 #-}
{-# LINE 446 "src-ag/ExecutionPlan2Caml.ag" #-}
rule77 = \ nt_ ->
{-# LINE 446 "src-ag/ExecutionPlan2Caml.ag" #-}
type_nt_sem_top nt_
{-# LINE 1159 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule78 #-}
{-# LINE 447 "src-ag/ExecutionPlan2Caml.ag" #-}
rule78 = \ params_ ->
{-# LINE 447 "src-ag/ExecutionPlan2Caml.ag" #-}
ppTypeParams (cont_tvar : map pp params_)
{-# LINE 1165 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule79 #-}
{-# LINE 450 "src-ag/ExecutionPlan2Caml.ag" #-}
rule79 = \ _t_params _t_type initial_ nt_ ->
{-# LINE 450 "src-ag/ExecutionPlan2Caml.ag" #-}
"and" >#< _t_params >#< _t_type >#< "=" >#< pp_braces ( nm_attach nt_ >#< ":" >#< "unit" >#< "->" >#< _t_params >#< type_nt_sem nt_ initial_)
{-# LINE 1171 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule80 #-}
{-# LINE 453 "src-ag/ExecutionPlan2Caml.ag" #-}
rule80 = \ _allstates _t_c_params _t_params nextVisits_ nt_ ->
{-# LINE 453 "src-ag/ExecutionPlan2Caml.ag" #-}
vlist $ map (\st ->
let s_st = type_nt_state nt_ st
t_st = type_nt_sem nt_ st
c_st = type_caller nt_ st
nextVisits = Map.findWithDefault ManyVis st nextVisits_
decl = "and" >#< _t_params >#< t_st >#< "="
in case nextVisits of
NoneVis -> decl >#< "unit"
_ -> decl >#< ppRecordVal [ nm_invoke nt_ st >#< ":" >#< cont_tvar >#< "." >#< _t_c_params >#< c_st >#< "->" >#< cont_tvar ]
) _allstates
{-# LINE 1186 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule81 #-}
{-# LINE 506 "src-ag/ExecutionPlan2Caml.ag" #-}
rule81 = \ _allstates ((_prodsIallvisits) :: [VisitStateState]) _t_c_params nextVisits_ nt_ ->
{-# LINE 506 "src-ag/ExecutionPlan2Caml.ag" #-}
vlist $ map (\st ->
let nt_st = type_nt_state nt_ st
c_st = type_caller nt_ st
outg = filter (\(_,f,_) -> f == st) _prodsIallvisits
nextVisits = Map.findWithDefault ManyVis st nextVisits_
declHead = "and" >#< _t_c_params >#< c_st >#< "="
visitcons = vlist $ map (\(v,_,_) ->
"|" >#< con_visit nt_ v >#< "of" >#< _t_c_params >#< type_caller_visit nt_ v
) outg
in case nextVisits of
NoneVis -> empty
OneVis v -> declHead >#< _t_c_params >#< type_caller_visit nt_ v
ManyVis -> declHead >-< indent 3 visitcons
) _allstates
{-# LINE 1205 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule82 #-}
{-# LINE 588 "src-ag/ExecutionPlan2Caml.ag" #-}
rule82 = \ _genwrap _wr_inhs1 ->
{-# LINE 588 "src-ag/ExecutionPlan2Caml.ag" #-}
_genwrap "inh" _wr_inhs1
{-# LINE 1211 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule83 #-}
{-# LINE 589 "src-ag/ExecutionPlan2Caml.ag" #-}
rule83 = \ _genwrap _wr_syns ->
{-# LINE 589 "src-ag/ExecutionPlan2Caml.ag" #-}
_genwrap "syn" _wr_syns
{-# LINE 1217 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule84 #-}
{-# LINE 590 "src-ag/ExecutionPlan2Caml.ag" #-}
rule84 = \ _t_params nt_ ->
{-# LINE 590 "src-ag/ExecutionPlan2Caml.ag" #-}
\nm attrs ->
"and" >#< _t_params >#< nm >|< "_" >|< nt_ >#< "=" >#< ppRecordTp
[ i >|< "_" >|< nm >|< "_" >|< nt_ >#< ":" >#< ppTp t | (i,t) <- attrs ]
{-# LINE 1225 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule85 #-}
{-# LINE 594 "src-ag/ExecutionPlan2Caml.ag" #-}
rule85 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) nt_ ->
{-# LINE 594 "src-ag/ExecutionPlan2Caml.ag" #-}
fromJust $ Map.lookup nt_ _lhsIinhmap
{-# LINE 1231 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule86 #-}
{-# LINE 595 "src-ag/ExecutionPlan2Caml.ag" #-}
rule86 = \ _inhAttrs _wr_filter ->
{-# LINE 595 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.toList $ _wr_filter $ _inhAttrs
{-# LINE 1237 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule87 #-}
{-# LINE 596 "src-ag/ExecutionPlan2Caml.ag" #-}
rule87 = \ _inhAttrs ->
{-# LINE 596 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.toList _inhAttrs
{-# LINE 1243 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule88 #-}
{-# LINE 597 "src-ag/ExecutionPlan2Caml.ag" #-}
rule88 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 597 "src-ag/ExecutionPlan2Caml.ag" #-}
if kennedyWarren _lhsIoptions && lateHigherOrderBinding _lhsIoptions
then Map.delete idLateBindingAttr
else id
{-# LINE 1251 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule89 #-}
{-# LINE 600 "src-ag/ExecutionPlan2Caml.ag" #-}
rule89 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) nt_ ->
{-# LINE 600 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.toList $ fromJust $ Map.lookup nt_ _lhsIsynmap
{-# LINE 1257 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule90 #-}
{-# LINE 602 "src-ag/ExecutionPlan2Caml.ag" #-}
rule90 = \ nt_ ->
{-# LINE 602 "src-ag/ExecutionPlan2Caml.ag" #-}
text ("wrap_" ++ show nt_)
{-# LINE 1263 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule91 #-}
{-# LINE 603 "src-ag/ExecutionPlan2Caml.ag" #-}
rule91 = \ nt_ ->
{-# LINE 603 "src-ag/ExecutionPlan2Caml.ag" #-}
text ("inh_" ++ show nt_)
{-# LINE 1269 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule92 #-}
{-# LINE 604 "src-ag/ExecutionPlan2Caml.ag" #-}
rule92 = \ nt_ ->
{-# LINE 604 "src-ag/ExecutionPlan2Caml.ag" #-}
text ("syn_" ++ show nt_)
{-# LINE 1275 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule93 #-}
{-# LINE 605 "src-ag/ExecutionPlan2Caml.ag" #-}
rule93 = \ initial_ nextVisits_ ->
{-# LINE 605 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.findWithDefault ManyVis initial_ nextVisits_
{-# LINE 1281 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule94 #-}
{-# LINE 607 "src-ag/ExecutionPlan2Caml.ag" #-}
rule94 = \ _t_params _t_type ->
{-# LINE 607 "src-ag/ExecutionPlan2Caml.ag" #-}
_t_params >#< _t_type
{-# LINE 1287 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule95 #-}
{-# LINE 608 "src-ag/ExecutionPlan2Caml.ag" #-}
rule95 = \ _inhname _t_params ->
{-# LINE 608 "src-ag/ExecutionPlan2Caml.ag" #-}
_t_params >#< _inhname
{-# LINE 1293 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule96 #-}
{-# LINE 609 "src-ag/ExecutionPlan2Caml.ag" #-}
rule96 = \ ((_lhsIoptions) :: Options) _wr_inhs1 nt_ ->
{-# LINE 609 "src-ag/ExecutionPlan2Caml.ag" #-}
ppRecordVal [ i >|< "_inh_" >|< nt_ >#< "=" >#< lhsname _lhsIoptions True i | (i,_) <- _wr_inhs1 ]
{-# LINE 1299 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule97 #-}
{-# LINE 610 "src-ag/ExecutionPlan2Caml.ag" #-}
rule97 = \ _synname _t_params ->
{-# LINE 610 "src-ag/ExecutionPlan2Caml.ag" #-}
_t_params >#< _synname
{-# LINE 1305 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule98 #-}
{-# LINE 611 "src-ag/ExecutionPlan2Caml.ag" #-}
rule98 = \ _o_sigs _wrapArgInhTp _wrapArgPats _wrapArgSemTp _wrapResTp _wrapname _wrapperPreamble ->
{-# LINE 611 "src-ag/ExecutionPlan2Caml.ag" #-}
"and" >#< ppFunDecl _o_sigs _wrapname [(pp "act", _wrapArgSemTp ), (_wrapArgPats , _wrapArgInhTp )] _wrapResTp _wrapperPreamble
{-# LINE 1311 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule99 #-}
{-# LINE 613 "src-ag/ExecutionPlan2Caml.ag" #-}
rule99 = \ ((_lhsImainName) :: String) ((_lhsIoptions) :: Options) _wrapperBody ->
{-# LINE 613 "src-ag/ExecutionPlan2Caml.ag" #-}
( if lateHigherOrderBinding _lhsIoptions
then "let" >#< lhsname _lhsIoptions True idLateBindingAttr >#< "=" >#< lateBindingFieldNm _lhsImainName >#< "in"
else empty
)
>-< _wrapperBody
{-# LINE 1321 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule100 #-}
{-# LINE 619 "src-ag/ExecutionPlan2Caml.ag" #-}
rule100 = \ _firstVisitInfo ((_lhsIoptions) :: Options) _wr_inhs _wr_syns initial_ initialv_ nt_ ->
{-# LINE 619 "src-ag/ExecutionPlan2Caml.ag" #-}
case initialv_ of
[] -> text "{ }"
(initv:_) ->
let attach = "let" >#< "sem" >#< "=" >#< "act." >|< nm_attach nt_ >#< "()" >#< "in"
pat = ppRecordVal [ nm_outarg i nt_ initv >#< "=" >#< lhsname _lhsIoptions False i | (i,_) <- _wr_syns ]
bld = ppRecordVal [ i >|< "_syn_" >|< nt_ >#< "=" >#< lhsname _lhsIoptions False i | (i,_) <- _wr_syns ]
res = "let res = function" >#< pat >#< "->" >#< bld >#< "in"
inps = "let" >#< "inps" >#< "=" >#< ppRecordVal [ nm_inarg i nt_ initv >#< "=" >#< lhsname _lhsIoptions True i | (i,_) <- _wr_inhs ] >#< "in"
arg = "let" >#< "arg" >#< "=" >#< argcon >#< argrec >#< "in"
argcon = case _firstVisitInfo of
ManyVis -> con_visit nt_ initv
_ -> empty
argrec = ppRecordVal
[ nm_inh nt_ initv >#< "=" >#< "inps"
, nm_cont nt_ initv >#< "=" >#< "res"
]
invoke = "sem." >|< nm_invoke nt_ initial_ >#< "arg"
in attach >-< res >-< inps >-< arg >-< invoke
{-# LINE 1344 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule101 #-}
{-# LINE 648 "src-ag/ExecutionPlan2Caml.ag" #-}
rule101 = \ ((_prodsIsemFunBndDefs) :: Seq PP_Doc) _semFunBndDef ->
{-# LINE 648 "src-ag/ExecutionPlan2Caml.ag" #-}
_semFunBndDef Seq.<| _prodsIsemFunBndDefs
{-# LINE 1350 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule102 #-}
{-# LINE 649 "src-ag/ExecutionPlan2Caml.ag" #-}
rule102 = \ ((_prodsIsemFunBndTps) :: Seq PP_Doc) _semFunBndTp ->
{-# LINE 649 "src-ag/ExecutionPlan2Caml.ag" #-}
_semFunBndTp Seq.<| _prodsIsemFunBndTps
{-# LINE 1356 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule103 #-}
{-# LINE 650 "src-ag/ExecutionPlan2Caml.ag" #-}
rule103 = \ _semFunBndNm _semname ->
{-# LINE 650 "src-ag/ExecutionPlan2Caml.ag" #-}
_semFunBndNm >#< "=" >#< _semname
{-# LINE 1362 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule104 #-}
{-# LINE 651 "src-ag/ExecutionPlan2Caml.ag" #-}
rule104 = \ _semFunBndNm _sem_tp ->
{-# LINE 651 "src-ag/ExecutionPlan2Caml.ag" #-}
_semFunBndNm >#< ":" >#< _sem_tp
{-# LINE 1368 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule105 #-}
{-# LINE 652 "src-ag/ExecutionPlan2Caml.ag" #-}
rule105 = \ nt_ ->
{-# LINE 652 "src-ag/ExecutionPlan2Caml.ag" #-}
lateSemNtLabel nt_
{-# LINE 1374 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule106 #-}
{-# LINE 682 "src-ag/ExecutionPlan2Caml.ag" #-}
rule106 = \ initial_ ->
{-# LINE 682 "src-ag/ExecutionPlan2Caml.ag" #-}
initial_
{-# LINE 1380 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule107 #-}
{-# LINE 683 "src-ag/ExecutionPlan2Caml.ag" #-}
rule107 = \ _allstates ->
{-# LINE 683 "src-ag/ExecutionPlan2Caml.ag" #-}
_allstates
{-# LINE 1386 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule108 #-}
{-# LINE 1390 "src-ag/ExecutionPlan2Caml.ag" #-}
rule108 = \ nextVisits_ ->
{-# LINE 1390 "src-ag/ExecutionPlan2Caml.ag" #-}
nextVisits_
{-# LINE 1392 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule109 #-}
{-# LINE 1391 "src-ag/ExecutionPlan2Caml.ag" #-}
rule109 = \ prevVisits_ ->
{-# LINE 1391 "src-ag/ExecutionPlan2Caml.ag" #-}
prevVisits_
{-# LINE 1398 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule110 #-}
{-# LINE 1435 "src-ag/ExecutionPlan2Caml.ag" #-}
rule110 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) nt_ ->
{-# LINE 1435 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.findWithDefault Map.empty nt_ _lhsIlocalAttrTypes
{-# LINE 1404 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule111 #-}
{-# LINE 1462 "src-ag/ExecutionPlan2Caml.ag" #-}
rule111 = \ initial_ nt_ ->
{-# LINE 1462 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton nt_ initial_
{-# LINE 1410 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule112 #-}
{-# LINE 1476 "src-ag/ExecutionPlan2Caml.ag" #-}
rule112 = \ nt_ params_ ->
{-# LINE 1476 "src-ag/ExecutionPlan2Caml.ag" #-}
NT nt_ (map show params_) False
{-# LINE 1416 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule113 #-}
rule113 = \ ((_prodsIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
_prodsIchildvisit
{-# INLINE rule114 #-}
rule114 = \ ((_prodsIerrors) :: Seq Error) ->
_prodsIerrors
{-# INLINE rule115 #-}
rule115 = \ ((_prodsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->
_prodsIfromToStates
{-# INLINE rule116 #-}
rule116 = \ ((_prodsIvisitKinds) :: Map VisitIdentifier VisitKind) ->
_prodsIvisitKinds
{-# INLINE rule117 #-}
rule117 = \ ((_prodsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_prodsIvisitdefs
{-# INLINE rule118 #-}
rule118 = \ ((_prodsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->
_prodsIvisituses
{-# INLINE rule119 #-}
rule119 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule120 #-}
rule120 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule121 #-}
rule121 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule122 #-}
rule122 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
_lhsIallchildvisit
{-# INLINE rule123 #-}
rule123 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule124 #-}
rule124 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule125 #-}
rule125 = \ ((_lhsImainFile) :: String) ->
_lhsImainFile
{-# INLINE rule126 #-}
rule126 = \ ((_lhsImainName) :: String) ->
_lhsImainName
{-# INLINE rule127 #-}
rule127 = \ _ntType ->
_ntType
{-# INLINE rule128 #-}
rule128 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
allchildvisit_Inh_ENonterminals :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error 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 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 -> [Char]
mainFile_Inh_ENonterminals :: (String), Inh_ENonterminals -> [Char]
mainName_Inh_ENonterminals :: (String), Inh_ENonterminals -> Options
options_Inh_ENonterminals :: (Options), Inh_ENonterminals -> Map Identifier Attributes
synmap_Inh_ENonterminals :: (Map NontermIdent Attributes), Inh_ENonterminals -> TypeSyns
typeSyns_Inh_ENonterminals :: (TypeSyns), Inh_ENonterminals -> Set Identifier
wrappers_Inh_ENonterminals :: (Set NontermIdent) }
data Syn_ENonterminals = Syn_ENonterminals { Syn_ENonterminals
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
childvisit_Syn_ENonterminals :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), Syn_ENonterminals -> PP_Doc
code_Syn_ENonterminals :: (PP_Doc), Syn_ENonterminals -> PP_Doc
datas_Syn_ENonterminals :: (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 -> Map Identifier Int
initStates_Syn_ENonterminals :: (Map NontermIdent Int), Syn_ENonterminals -> PP_Doc
modules_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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> [Char]
-> [Char]
-> Options
-> Map Identifier Attributes
-> 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap TypeSyns
_lhsItypeSyns Set Identifier
_lhsIwrappers
(T_ENonterminals_vOut10 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit PP_Doc
_lhsOcode PP_Doc
_lhsOdatas Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOmodules 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 (Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> PP_Doc
-> PP_Doc
-> Seq Error
-> Map Int (Int, Int)
-> Map Identifier Int
-> PP_Doc
-> Seq PP_Doc
-> Seq PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Syn_ENonterminals
Syn_ENonterminals Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit PP_Doc
_lhsOcode PP_Doc
_lhsOdatas Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOmodules 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (Options) (Map NontermIdent Attributes) (TypeSyns) (Set NontermIdent)
data T_ENonterminals_vOut10 = T_ENonterminals_vOut10 (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (PP_Doc) (PP_Doc) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap 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 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdIchildvisit PP_Doc
_hdIcode PP_Doc
_hdIdatas Seq Error
_hdIerrors Map Int (Int, Int)
_hdIfromToStates Map Identifier Int
_hdIinitStates PP_Doc
_hdImodules 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> [Char]
-> [Char]
-> Options
-> Map Identifier Attributes
-> 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdOallchildvisit Map Int (Set Identifier)
_hdOavisitdefs Map Int (Set Identifier)
_hdOavisituses Map Identifier Attributes
_hdOinhmap Map Identifier (Map Identifier Attributes)
_hdOlocalAttrTypes [Char]
_hdOmainFile [Char]
_hdOmainName Options
_hdOoptions Map Identifier Attributes
_hdOsynmap TypeSyns
_hdOtypeSyns Set Identifier
_hdOwrappers)
(T_ENonterminals_vOut10 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlIchildvisit PP_Doc
_tlIcode PP_Doc
_tlIdatas Seq Error
_tlIerrors Map Int (Int, Int)
_tlIfromToStates Map Identifier Int
_tlIinitStates PP_Doc
_tlImodules 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> [Char]
-> [Char]
-> Options
-> Map Identifier Attributes
-> 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlOallchildvisit Map Int (Set Identifier)
_tlOavisitdefs Map Int (Set Identifier)
_tlOavisituses Map Identifier Attributes
_tlOinhmap Map Identifier (Map Identifier Attributes)
_tlOlocalAttrTypes [Char]
_tlOmainFile [Char]
_tlOmainName Options
_tlOoptions Map Identifier Attributes
_tlOsynmap TypeSyns
_tlOtypeSyns Set Identifier
_tlOwrappers)
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule129 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdIchildvisit Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlIchildvisit
_lhsOcode :: PP_Doc
_lhsOcode :: PP_Doc
_lhsOcode = PP_Doc -> PP_Doc -> PP_Doc
rule130 PP_Doc
_hdIcode PP_Doc
_tlIcode
_lhsOdatas :: PP_Doc
_lhsOdatas :: PP_Doc
_lhsOdatas = PP_Doc -> PP_Doc -> PP_Doc
rule131 PP_Doc
_hdIdatas PP_Doc
_tlIdatas
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule132 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)
rule133 Map Int (Int, Int)
_hdIfromToStates Map Int (Int, Int)
_tlIfromToStates
_lhsOinitStates :: Map NontermIdent Int
_lhsOinitStates :: Map Identifier Int
_lhsOinitStates = Map Identifier Int -> Map Identifier Int -> Map Identifier Int
rule134 Map Identifier Int
_hdIinitStates Map Identifier Int
_tlIinitStates
_lhsOmodules :: PP_Doc
_lhsOmodules :: PP_Doc
_lhsOmodules = PP_Doc -> PP_Doc -> PP_Doc
rule135 PP_Doc
_hdImodules PP_Doc
_tlImodules
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
rule136 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
rule137 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
rule138 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)
rule139 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)
rule140 Map Int (Set Identifier)
_hdIvisituses Map Int (Set Identifier)
_tlIvisituses
_hdOallFromToStates :: Map Int (Int, Int)
_hdOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule141 Map Int (Int, Int)
_lhsIallFromToStates
_hdOallInitStates :: Map Identifier Int
_hdOallInitStates = Map Identifier Int -> Map Identifier Int
rule142 Map Identifier Int
_lhsIallInitStates
_hdOallVisitKinds :: Map Int VisitKind
_hdOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule143 Map Int VisitKind
_lhsIallVisitKinds
_hdOallchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdOallchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule144 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit
_hdOavisitdefs :: Map Int (Set Identifier)
_hdOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule145 Map Int (Set Identifier)
_lhsIavisitdefs
_hdOavisituses :: Map Int (Set Identifier)
_hdOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule146 Map Int (Set Identifier)
_lhsIavisituses
_hdOinhmap :: Map Identifier Attributes
_hdOinhmap = Map Identifier Attributes -> Map Identifier Attributes
rule147 Map Identifier Attributes
_lhsIinhmap
_hdOlocalAttrTypes :: Map Identifier (Map Identifier Attributes)
_hdOlocalAttrTypes = Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule148 Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes
_hdOmainFile :: [Char]
_hdOmainFile = [Char] -> [Char]
rule149 [Char]
_lhsImainFile
_hdOmainName :: [Char]
_hdOmainName = [Char] -> [Char]
rule150 [Char]
_lhsImainName
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule151 Options
_lhsIoptions
_hdOsynmap :: Map Identifier Attributes
_hdOsynmap = Map Identifier Attributes -> Map Identifier Attributes
rule152 Map Identifier Attributes
_lhsIsynmap
_hdOtypeSyns :: TypeSyns
_hdOtypeSyns = TypeSyns -> TypeSyns
rule153 TypeSyns
_lhsItypeSyns
_hdOwrappers :: Set Identifier
_hdOwrappers = Set Identifier -> Set Identifier
rule154 Set Identifier
_lhsIwrappers
_tlOallFromToStates :: Map Int (Int, Int)
_tlOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule155 Map Int (Int, Int)
_lhsIallFromToStates
_tlOallInitStates :: Map Identifier Int
_tlOallInitStates = Map Identifier Int -> Map Identifier Int
rule156 Map Identifier Int
_lhsIallInitStates
_tlOallVisitKinds :: Map Int VisitKind
_tlOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule157 Map Int VisitKind
_lhsIallVisitKinds
_tlOallchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlOallchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule158 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit
_tlOavisitdefs :: Map Int (Set Identifier)
_tlOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule159 Map Int (Set Identifier)
_lhsIavisitdefs
_tlOavisituses :: Map Int (Set Identifier)
_tlOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule160 Map Int (Set Identifier)
_lhsIavisituses
_tlOinhmap :: Map Identifier Attributes
_tlOinhmap = Map Identifier Attributes -> Map Identifier Attributes
rule161 Map Identifier Attributes
_lhsIinhmap
_tlOlocalAttrTypes :: Map Identifier (Map Identifier Attributes)
_tlOlocalAttrTypes = Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule162 Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes
_tlOmainFile :: [Char]
_tlOmainFile = [Char] -> [Char]
rule163 [Char]
_lhsImainFile
_tlOmainName :: [Char]
_tlOmainName = [Char] -> [Char]
rule164 [Char]
_lhsImainName
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule165 Options
_lhsIoptions
_tlOsynmap :: Map Identifier Attributes
_tlOsynmap = Map Identifier Attributes -> Map Identifier Attributes
rule166 Map Identifier Attributes
_lhsIsynmap
_tlOtypeSyns :: TypeSyns
_tlOtypeSyns = TypeSyns -> TypeSyns
rule167 TypeSyns
_lhsItypeSyns
_tlOwrappers :: Set Identifier
_tlOwrappers = Set Identifier -> Set Identifier
rule168 Set Identifier
_lhsIwrappers
__result_ :: T_ENonterminals_vOut10
__result_ = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> PP_Doc
-> PP_Doc
-> Seq Error
-> Map Int (Int, Int)
-> Map Identifier Int
-> 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 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit PP_Doc
_lhsOcode PP_Doc
_lhsOdatas Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOmodules 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 rule129 #-}
rule129 :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule129 = \ ((Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ((Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdIchildvisit Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlIchildvisit
{-# INLINE rule130 #-}
rule130 :: PP_Doc -> PP_Doc -> PP_Doc
rule130 = \ ((PP_Doc
_hdIcode) :: PP_Doc) ((PP_Doc
_tlIcode) :: PP_Doc) ->
PP_Doc
_hdIcode PP_Doc -> PP_Doc -> PP_Doc
forall a b. (PP a, PP b) => a -> b -> PP_Doc
>-< PP_Doc
_tlIcode
{-# INLINE rule131 #-}
rule131 :: PP_Doc -> PP_Doc -> PP_Doc
rule131 = \ ((PP_Doc
_hdIdatas) :: PP_Doc) ((PP_Doc
_tlIdatas) :: PP_Doc) ->
PP_Doc
_hdIdatas PP_Doc -> PP_Doc -> PP_Doc
forall a b. (PP a, PP b) => a -> b -> PP_Doc
>-< PP_Doc
_tlIdatas
{-# INLINE rule132 #-}
rule132 :: Seq Error -> Seq Error -> Seq Error
rule132 = \ ((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 rule133 #-}
rule133 :: Map Int (Int, Int) -> Map Int (Int, Int) -> Map Int (Int, Int)
rule133 = \ ((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 rule134 #-}
rule134 :: Map Identifier Int -> Map Identifier Int -> Map Identifier Int
rule134 = \ ((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 rule135 #-}
rule135 :: PP_Doc -> PP_Doc -> PP_Doc
rule135 = \ ((PP_Doc
_hdImodules) :: PP_Doc) ((PP_Doc
_tlImodules) :: PP_Doc) ->
PP_Doc
_hdImodules PP_Doc -> PP_Doc -> PP_Doc
forall a b. (PP a, PP b) => a -> b -> PP_Doc
>-< PP_Doc
_tlImodules
{-# INLINE rule136 #-}
rule136 :: Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
rule136 = \ ((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 rule137 #-}
rule137 :: Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
rule137 = \ ((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 rule138 #-}
rule138 :: Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
rule138 = \ ((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 rule139 #-}
rule139 :: Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule139 = \ ((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 rule140 #-}
rule140 :: Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule140 = \ ((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 rule141 #-}
rule141 :: Map Int (Int, Int) -> Map Int (Int, Int)
rule141 = \ ((Map Int (Int, Int)
_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
Map Int (Int, Int)
_lhsIallFromToStates
{-# INLINE rule142 #-}
rule142 :: Map Identifier Int -> Map Identifier Int
rule142 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
Map Identifier Int
_lhsIallInitStates
{-# INLINE rule143 #-}
rule143 :: Map Int VisitKind -> Map Int VisitKind
rule143 = \ ((Map Int VisitKind
_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
Map Int VisitKind
_lhsIallVisitKinds
{-# INLINE rule144 #-}
rule144 :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule144 = \ ((Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit
{-# INLINE rule145 #-}
rule145 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule145 = \ ((Map Int (Set Identifier)
_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_lhsIavisitdefs
{-# INLINE rule146 #-}
rule146 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule146 = \ ((Map Int (Set Identifier)
_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_lhsIavisituses
{-# INLINE rule147 #-}
rule147 :: Map Identifier Attributes -> Map Identifier Attributes
rule147 = \ ((Map Identifier Attributes
_lhsIinhmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIinhmap
{-# INLINE rule148 #-}
rule148 :: Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule148 = \ ((Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->
Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes
{-# INLINE rule149 #-}
rule149 :: [Char] -> [Char]
rule149 = \ (([Char]
_lhsImainFile) :: String) ->
[Char]
_lhsImainFile
{-# INLINE rule150 #-}
rule150 :: [Char] -> [Char]
rule150 = \ (([Char]
_lhsImainName) :: String) ->
[Char]
_lhsImainName
{-# INLINE rule151 #-}
rule151 :: Options -> Options
rule151 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule152 #-}
rule152 :: Map Identifier Attributes -> Map Identifier Attributes
rule152 = \ ((Map Identifier Attributes
_lhsIsynmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIsynmap
{-# INLINE rule153 #-}
rule153 :: TypeSyns -> TypeSyns
rule153 = \ ((TypeSyns
_lhsItypeSyns) :: TypeSyns) ->
TypeSyns
_lhsItypeSyns
{-# INLINE rule154 #-}
rule154 :: Set Identifier -> Set Identifier
rule154 = \ ((Set Identifier
_lhsIwrappers) :: Set NontermIdent) ->
Set Identifier
_lhsIwrappers
{-# INLINE rule155 #-}
rule155 :: Map Int (Int, Int) -> Map Int (Int, Int)
rule155 = \ ((Map Int (Int, Int)
_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
Map Int (Int, Int)
_lhsIallFromToStates
{-# INLINE rule156 #-}
rule156 :: Map Identifier Int -> Map Identifier Int
rule156 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
Map Identifier Int
_lhsIallInitStates
{-# INLINE rule157 #-}
rule157 :: Map Int VisitKind -> Map Int VisitKind
rule157 = \ ((Map Int VisitKind
_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
Map Int VisitKind
_lhsIallVisitKinds
{-# INLINE rule158 #-}
rule158 :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule158 = \ ((Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit
{-# INLINE rule159 #-}
rule159 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule159 = \ ((Map Int (Set Identifier)
_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_lhsIavisitdefs
{-# INLINE rule160 #-}
rule160 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule160 = \ ((Map Int (Set Identifier)
_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_lhsIavisituses
{-# INLINE rule161 #-}
rule161 :: Map Identifier Attributes -> Map Identifier Attributes
rule161 = \ ((Map Identifier Attributes
_lhsIinhmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIinhmap
{-# INLINE rule162 #-}
rule162 :: Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule162 = \ ((Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->
Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes
{-# INLINE rule163 #-}
rule163 :: [Char] -> [Char]
rule163 = \ (([Char]
_lhsImainFile) :: String) ->
[Char]
_lhsImainFile
{-# INLINE rule164 #-}
rule164 :: [Char] -> [Char]
rule164 = \ (([Char]
_lhsImainName) :: String) ->
[Char]
_lhsImainName
{-# INLINE rule165 #-}
rule165 :: Options -> Options
rule165 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule166 #-}
rule166 :: Map Identifier Attributes -> Map Identifier Attributes
rule166 = \ ((Map Identifier Attributes
_lhsIsynmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIsynmap
{-# INLINE rule167 #-}
rule167 :: TypeSyns -> TypeSyns
rule167 = \ ((TypeSyns
_lhsItypeSyns) :: TypeSyns) ->
TypeSyns
_lhsItypeSyns
{-# INLINE rule168 #-}
rule168 :: Set Identifier -> Set Identifier
rule168 = \ ((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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap TypeSyns
_lhsItypeSyns Set Identifier
_lhsIwrappers) -> ( let
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit = ()
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
forall k a. () -> Map k a
rule169 ()
_lhsOcode :: PP_Doc
_lhsOcode :: PP_Doc
_lhsOcode = () -> PP_Doc
rule170 ()
_lhsOdatas :: PP_Doc
_lhsOdatas :: PP_Doc
_lhsOdatas = () -> PP_Doc
rule171 ()
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule172 ()
_lhsOfromToStates :: Map VisitIdentifier (Int,Int)
_lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = () -> Map Int (Int, Int)
rule173 ()
_lhsOinitStates :: Map NontermIdent Int
_lhsOinitStates :: Map Identifier Int
_lhsOinitStates = () -> Map Identifier Int
rule174 ()
_lhsOmodules :: PP_Doc
_lhsOmodules :: PP_Doc
_lhsOmodules = () -> PP_Doc
rule175 ()
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = () -> Seq PP_Doc
forall a. () -> Seq a
rule176 ()
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps = () -> Seq PP_Doc
forall a. () -> Seq a
rule177 ()
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule178 ()
_lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
_lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule179 ()
_lhsOvisituses :: Map VisitIdentifier (Set Identifier)
_lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule180 ()
__result_ :: T_ENonterminals_vOut10
__result_ = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> PP_Doc
-> PP_Doc
-> Seq Error
-> Map Int (Int, Int)
-> Map Identifier Int
-> 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 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit PP_Doc
_lhsOcode PP_Doc
_lhsOdatas Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOmodules 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 rule169 #-}
rule169 :: () -> Map k a
rule169 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule170 #-}
rule170 :: () -> PP_Doc
rule170 = \ (()
_ :: ()) ->
PP_Doc
empty
{-# INLINE rule171 #-}
rule171 :: () -> PP_Doc
rule171 = \ (()
_ :: ()) ->
PP_Doc
empty
{-# INLINE rule172 #-}
rule172 :: () -> Seq a
rule172 = \ (()
_ :: ()) ->
Seq a
forall a. Seq a
Seq.empty
{-# INLINE rule173 #-}
rule173 :: () -> Map Int (Int, Int)
rule173 = \ (()
_ :: ()) ->
Map Int (Int, Int)
forall a. Monoid a => a
mempty
{-# INLINE rule174 #-}
rule174 :: () -> Map Identifier Int
rule174 = \ (()
_ :: ()) ->
Map Identifier Int
forall a. Monoid a => a
mempty
{-# INLINE rule175 #-}
rule175 :: () -> PP_Doc
rule175 = \ (()
_ :: ()) ->
PP_Doc
empty
{-# INLINE rule176 #-}
rule176 :: () -> Seq a
rule176 = \ (()
_ :: ()) ->
Seq a
forall a. Seq a
Seq.empty
{-# INLINE rule177 #-}
rule177 :: () -> Seq a
rule177 = \ (()
_ :: ()) ->
Seq a
forall a. Seq a
Seq.empty
{-# INLINE rule178 #-}
rule178 :: () -> Map Int VisitKind
rule178 = \ (()
_ :: ()) ->
Map Int VisitKind
forall a. Monoid a => a
mempty
{-# INLINE rule179 #-}
rule179 :: () -> Map k a
rule179 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule180 #-}
rule180 :: () -> Map k a
rule180 = \ (()
_ :: ()) ->
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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
allchildvisit_Inh_EProduction :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), Inh_EProduction -> [Int]
allstates_Inh_EProduction :: ([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 -> 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 -> [Char]
mainFile_Inh_EProduction :: (String), Inh_EProduction -> [Char]
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) }
data Syn_EProduction = Syn_EProduction { Syn_EProduction -> [VisitStateState]
allvisits_Syn_EProduction :: ([VisitStateState]), Syn_EProduction
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
childvisit_Syn_EProduction :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), Syn_EProduction -> Int
count_Syn_EProduction :: (Int), Syn_EProduction -> PP_Doc
datatype_Syn_EProduction :: (PP_Doc), Syn_EProduction -> PP_Doc
datatype_call_Syn_EProduction :: (PP_Doc), Syn_EProduction -> PP_Doc
datatype_con_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 -> 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
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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit [Int]
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap) =
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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> [Int]
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Int
-> Map Identifier Attributes
-> [Char]
-> [Char]
-> Map Int StateCtx
-> Identifier
-> Type
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Bool
-> Attributes
-> 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit [Int]
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap
(T_EProduction_vOut13 [VisitStateState]
_lhsOallvisits Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit Int
_lhsOcount PP_Doc
_lhsOdatatype PP_Doc
_lhsOdatatype_call PP_Doc
_lhsOdatatype_con Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Int
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Seq Error
-> Map Int (Int, Int)
-> Seq PP_Doc
-> Seq 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit Int
_lhsOcount PP_Doc
_lhsOdatatype PP_Doc
_lhsOdatatype_call PP_Doc
_lhsOdatatype_con Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ([StateIdentifier]) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Attributes) (StateIdentifier) (Map ConstructorIdent (Map Identifier Type)) (String) (String) (Map StateIdentifier StateCtx) (NontermIdent) (Type) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Bool) (Attributes)
data T_EProduction_vOut13 = T_EProduction_vOut13 ([VisitStateState]) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Int) (PP_Doc) (PP_Doc) (PP_Doc) (Seq Error) (Map VisitIdentifier (Int,Int)) (Seq PP_Doc) (Seq 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]
_ 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit [Int]
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap) -> ( 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 -> Either Error PP_Doc)
_rulesImrules Map Identifier (Set [Char])
_rulesIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_rulesIruleuses PP_Doc
_rulesIsem_rules) = T_ERules_s23 -> T_ERules_v22
inv_ERules_s23 T_ERules_s23
_rulesX23 (Map Identifier Attributes
-> Map Identifier Attributes
-> Attributes
-> Identifier
-> Attributes
-> Set [Char]
-> Attributes
-> [Char]
-> [Char]
-> Identifier
-> Options
-> Map Identifier (Set VisitKind)
-> Attributes
-> Map Identifier Int
-> T_ERules_vIn22
T_ERules_vIn22 Map Identifier Attributes
_rulesOallInhmap Map Identifier Attributes
_rulesOallSynmap Attributes
_rulesOchildTypes Identifier
_rulesOcon Attributes
_rulesOinhmap Set [Char]
_rulesOlazyIntras Attributes
_rulesOlocalAttrTypes [Char]
_rulesOmainFile [Char]
_rulesOmainName Identifier
_rulesOnt Options
_rulesOoptions Map Identifier (Set VisitKind)
_rulesOruleKinds Attributes
_rulesOsynmap Map Identifier Int
_rulesOusageInfo)
(T_EChildren_vOut4 [PP_Doc]
_childrenIargnamesw Attributes
_childrenIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_childrenIchildintros [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_childrenIsigs Set [Char]
_childrenIterminaldefs) = T_EChildren_s5 -> T_EChildren_v4
inv_EChildren_s5 T_EChildren_s5
_childrenX5 (Map Identifier Int
-> Identifier
-> [Char]
-> [Char]
-> Identifier
-> Options
-> T_EChildren_vIn4
T_EChildren_vIn4 Map Identifier Int
_childrenOallInitStates Identifier
_childrenOcon [Char]
_childrenOmainFile [Char]
_childrenOmainName Identifier
_childrenOnt Options
_childrenOoptions)
(T_Visits_vOut55 [VisitStateState]
_visitsIallvisits Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_visitsIchildvisit Seq Error
_visitsIerrors Map Int (Int, Int)
_visitsIfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_visitsIintramap Set [Char]
_visitsIlazyIntras Map Identifier (Set VisitKind)
_visitsIruleKinds Map Identifier Int
_visitsIruleUsage [(Int, PP_Doc)]
_visitsIsem_visit PP_Doc
_visitsIt_visits 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Identifier
-> Attributes
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Int StateCtx
-> Identifier
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Attributes
-> Set [Char]
-> 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_visitsOallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_visitsOallintramap Map Int (Set Identifier)
_visitsOavisitdefs Map Int (Set Identifier)
_visitsOavisituses Attributes
_visitsOchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_visitsOchildintros Identifier
_visitsOcon Attributes
_visitsOinhmap Map Identifier (VisitKind -> Either Error PP_Doc)
_visitsOmrules Map Int StateCtx
_visitsOnextVisits Identifier
_visitsOnt Options
_visitsOoptions [Identifier]
_visitsOparams Map Int StateCtx
_visitsOprevVisits Map Identifier (Set [Char])
_visitsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_visitsOruleuses Attributes
_visitsOsynmap Set [Char]
_visitsOterminaldefs)
_childrenOcon :: Identifier
_childrenOcon = Identifier -> Identifier
forall a. a -> a
rule181 Identifier
arg_con_
_rulesOcon :: Identifier
_rulesOcon = Identifier -> Identifier
forall a. a -> a
rule182 Identifier
arg_con_
_visitsOcon :: Identifier
_visitsOcon = Identifier -> Identifier
forall a. a -> a
rule183 Identifier
arg_con_
_o_records :: Bool
_o_records = Options -> Bool
rule184 Options
_lhsIoptions
_t_params :: PP_Doc
_t_params = [Identifier] -> PP_Doc
rule185 [Identifier]
_lhsIparams
_t_c_params :: PP_Doc
_t_c_params = [Identifier] -> PP_Doc
rule186 [Identifier]
arg_params_
_conname :: [Char]
_conname = Identifier -> Bool -> Identifier -> [Char]
rule187 Identifier
_lhsInt Bool
_lhsIrename Identifier
arg_con_
_recname :: PP_Doc
_recname = [Char] -> PP_Doc
rule188 [Char]
_conname
_lhsOdatatype :: PP_Doc
_lhsOdatatype :: PP_Doc
_lhsOdatatype = [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
-> Bool -> PP_Doc -> PP_Doc -> PP_Doc
rule189 [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_childrenIsigs Bool
_o_records PP_Doc
_recname PP_Doc
_t_params
_lhsOdatatype_call :: PP_Doc
_lhsOdatatype_call :: PP_Doc
_lhsOdatatype_call = [Char] -> PP_Doc -> PP_Doc -> PP_Doc
rule190 [Char]
_conname PP_Doc
_recname PP_Doc
_t_params
_lhsOdatatype_con :: PP_Doc
_lhsOdatatype_con :: PP_Doc
_lhsOdatatype_con = [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
-> [Char]
-> Identifier
-> Bool
-> Bool
-> PP_Doc
-> Identifier
-> PP_Doc
rule191 [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_childrenIsigs [Char]
_conname Identifier
_lhsInt Bool
_o_records Bool
_o_sigs PP_Doc
_t_params Identifier
arg_con_
_lhsOcount :: Int
_lhsOcount :: Int
_lhsOcount = () -> Int
rule192 ()
_lhsOsem_nt :: PP_Doc
_lhsOsem_nt :: PP_Doc
_lhsOsem_nt = [PP_Doc]
-> [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
-> Identifier
-> Options
-> Bool
-> Bool
-> Identifier
-> PP_Doc
rule193 [PP_Doc]
_childrenIargnamesw [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_childrenIsigs Identifier
_lhsInt Options
_lhsIoptions Bool
_lhsIrename Bool
_o_records Identifier
arg_con_
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = PP_Doc -> Seq PP_Doc
forall a. a -> Seq a
rule194 PP_Doc
_semFunBndDef
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps = PP_Doc -> Seq PP_Doc
forall a. a -> Seq a
rule195 PP_Doc
_semFunBndTp
_semFunBndDef :: PP_Doc
_semFunBndDef = [Char] -> PP_Doc -> PP_Doc
rule196 [Char]
_semFunBndNm PP_Doc
_semname
_semFunBndTp :: PP_Doc
_semFunBndTp = [Char] -> PP_Doc -> PP_Doc
rule197 [Char]
_semFunBndNm PP_Doc
_sem_tp
_semFunBndNm :: [Char]
_semFunBndNm = Identifier -> Identifier -> [Char]
rule198 Identifier
_lhsInt Identifier
arg_con_
_o_sigs :: Bool
_o_sigs = Options -> Bool
rule199 Options
_lhsIoptions
_t_type :: PP_Doc
_t_type = Identifier -> PP_Doc
rule200 Identifier
_lhsInt
_semname :: PP_Doc
_semname = Identifier -> Options -> Identifier -> PP_Doc
rule201 Identifier
_lhsInt Options
_lhsIoptions Identifier
arg_con_
_sem_res_tp :: PP_Doc
_sem_res_tp = PP_Doc -> PP_Doc -> PP_Doc
rule202 PP_Doc
_t_params PP_Doc
_t_type
_sem_tp :: PP_Doc
_sem_tp = [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)] -> PP_Doc -> PP_Doc
rule203 [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_childrenIsigs PP_Doc
_sem_res_tp
_initializer :: PP_Doc
_initializer = () -> PP_Doc
rule204 ()
_sem_prod :: PP_Doc
_sem_prod = [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
-> Bool -> PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc
rule205 [(PP_Doc, PP_Doc, PP_Doc, PP_Doc)]
_childrenIsigs Bool
_o_sigs PP_Doc
_prod_body PP_Doc
_sem_res_tp PP_Doc
_semname
_prod_body :: PP_Doc
_prod_body = PP_Doc
-> Int -> Identifier -> PP_Doc -> [PP_Doc] -> Identifier -> PP_Doc
rule206 PP_Doc
_initializer Int
_lhsIinitial Identifier
_lhsInt PP_Doc
_rulesIsem_rules [PP_Doc]
_statefuns Identifier
arg_con_
_statefuns :: [PP_Doc]
_statefuns = (Int -> PP_Doc) -> [Int] -> [PP_Doc]
forall b. (Int -> b) -> [Int] -> [b]
rule207 Int -> PP_Doc
_genstfn [Int]
_lhsIallstates
_genstfn :: Int -> PP_Doc
_genstfn = Int
-> Map Int StateCtx
-> Identifier
-> (Int -> PP_Doc)
-> (Int -> [PP_Doc])
-> (Int -> [PP_Doc])
-> Int
-> PP_Doc
rule208 Int
_lhsIinitial Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Int -> PP_Doc
_stargs Int -> [PP_Doc]
_stks Int -> [PP_Doc]
_stvs
_stargs :: Int -> PP_Doc
_stargs = Attributes
-> Map Identifier Attributes
-> Map Identifier Attributes
-> Options
-> Attributes
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Int
-> PP_Doc
rule209 Attributes
_childTypes Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Options
_lhsIoptions Attributes
_localAttrTypes Map Int (Map [Char] (Maybe NonLocalAttr))
_visitsIintramap
_stvisits :: Int -> [VisitStateState]
_stvisits = [VisitStateState] -> Int -> [VisitStateState]
rule210 [VisitStateState]
_visitsIallvisits
_stks :: Int -> [PP_Doc]
_stks = Map Int StateCtx
-> Identifier
-> (Int -> [VisitStateState])
-> PP_Doc
-> Identifier
-> Int
-> [PP_Doc]
forall b c.
Map Int StateCtx
-> Identifier
-> (Int -> [(Int, b, c)])
-> PP_Doc
-> Identifier
-> Int
-> [PP_Doc]
rule211 Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Int -> [VisitStateState]
_stvisits PP_Doc
_t_c_params Identifier
arg_con_
_stvs :: Int -> [PP_Doc]
_stvs = [(Int, PP_Doc)] -> Int -> [PP_Doc]
rule212 [(Int, PP_Doc)]
_visitsIsem_visit
_visitsOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)
_visitsOmrules = Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> Either Error PP_Doc)
rule213 Map Identifier (VisitKind -> Either Error PP_Doc)
_rulesImrules
_visitsOchildintros :: Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_visitsOchildintros = Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule214 Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_childrenIchildintros
_rulesOusageInfo :: Map Identifier Int
_rulesOusageInfo = Map Identifier Int -> Map Identifier Int
rule215 Map Identifier Int
_visitsIruleUsage
_rulesOruleKinds :: Map Identifier (Set VisitKind)
_rulesOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule216 Map Identifier (Set VisitKind)
_visitsIruleKinds
_visitsOallintramap :: Map Int (Map [Char] (Maybe NonLocalAttr))
_visitsOallintramap = Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
rule217 Map Int (Map [Char] (Maybe NonLocalAttr))
_visitsIintramap
_visitsOterminaldefs :: Set [Char]
_visitsOterminaldefs = Set [Char] -> Set [Char]
rule218 Set [Char]
_childrenIterminaldefs
_visitsOruledefs :: Map Identifier (Set [Char])
_visitsOruledefs = Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule219 Map Identifier (Set [Char])
_rulesIruledefs
_visitsOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_visitsOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule220 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_rulesIruleuses
_lazyIntras :: Set [Char]
_lazyIntras = Set [Char] -> Set [Char]
rule221 Set [Char]
_visitsIlazyIntras
_childTypes :: Attributes
_childTypes = Attributes -> Type -> Attributes
rule222 Attributes
_childrenIchildTypes Type
_lhsIntType
_localAttrTypes :: Attributes
_localAttrTypes = Map Identifier Attributes -> Identifier -> Attributes
rule223 Map Identifier Attributes
_lhsIlocalAttrTypes Identifier
arg_con_
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule224 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_visitsIchildvisit
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule225 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)
rule226 Map Int (Int, Int)
_visitsIfromToStates
_lhsOt_visits :: PP_Doc
_lhsOt_visits :: PP_Doc
_lhsOt_visits = PP_Doc -> PP_Doc
rule227 PP_Doc
_visitsIt_visits
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind
rule228 Map Int VisitKind
_visitsIvisitKinds
_lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
_lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule229 Map Int (Set Identifier)
_visitsIvisitdefs
_lhsOvisituses :: Map VisitIdentifier (Set Identifier)
_lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule230 Map Int (Set Identifier)
_visitsIvisituses
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits = [VisitStateState] -> [VisitStateState]
rule231 [VisitStateState]
_visitsIallvisits
_lhsOsem_prod :: PP_Doc
_lhsOsem_prod :: PP_Doc
_lhsOsem_prod = PP_Doc -> PP_Doc
forall a. a -> a
rule232 PP_Doc
_sem_prod
_rulesOallInhmap :: Map Identifier Attributes
_rulesOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule233 Map Identifier Attributes
_lhsIallInhmap
_rulesOallSynmap :: Map Identifier Attributes
_rulesOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule234 Map Identifier Attributes
_lhsIallSynmap
_rulesOchildTypes :: Attributes
_rulesOchildTypes = Attributes -> Attributes
forall a. a -> a
rule235 Attributes
_childTypes
_rulesOinhmap :: Attributes
_rulesOinhmap = Attributes -> Attributes
rule236 Attributes
_lhsIinhmap
_rulesOlazyIntras :: Set [Char]
_rulesOlazyIntras = Set [Char] -> Set [Char]
forall a. a -> a
rule237 Set [Char]
_lazyIntras
_rulesOlocalAttrTypes :: Attributes
_rulesOlocalAttrTypes = Attributes -> Attributes
forall a. a -> a
rule238 Attributes
_localAttrTypes
_rulesOmainFile :: [Char]
_rulesOmainFile = [Char] -> [Char]
rule239 [Char]
_lhsImainFile
_rulesOmainName :: [Char]
_rulesOmainName = [Char] -> [Char]
rule240 [Char]
_lhsImainName
_rulesOnt :: Identifier
_rulesOnt = Identifier -> Identifier
rule241 Identifier
_lhsInt
_rulesOoptions :: Options
_rulesOoptions = Options -> Options
rule242 Options
_lhsIoptions
_rulesOsynmap :: Attributes
_rulesOsynmap = Attributes -> Attributes
rule243 Attributes
_lhsIsynmap
_childrenOallInitStates :: Map Identifier Int
_childrenOallInitStates = Map Identifier Int -> Map Identifier Int
rule244 Map Identifier Int
_lhsIallInitStates
_childrenOmainFile :: [Char]
_childrenOmainFile = [Char] -> [Char]
rule245 [Char]
_lhsImainFile
_childrenOmainName :: [Char]
_childrenOmainName = [Char] -> [Char]
rule246 [Char]
_lhsImainName
_childrenOnt :: Identifier
_childrenOnt = Identifier -> Identifier
rule247 Identifier
_lhsInt
_childrenOoptions :: Options
_childrenOoptions = Options -> Options
rule248 Options
_lhsIoptions
_visitsOallFromToStates :: Map Int (Int, Int)
_visitsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule249 Map Int (Int, Int)
_lhsIallFromToStates
_visitsOallInhmap :: Map Identifier Attributes
_visitsOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule250 Map Identifier Attributes
_lhsIallInhmap
_visitsOallInitStates :: Map Identifier Int
_visitsOallInitStates = Map Identifier Int -> Map Identifier Int
rule251 Map Identifier Int
_lhsIallInitStates
_visitsOallSynmap :: Map Identifier Attributes
_visitsOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule252 Map Identifier Attributes
_lhsIallSynmap
_visitsOallVisitKinds :: Map Int VisitKind
_visitsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule253 Map Int VisitKind
_lhsIallVisitKinds
_visitsOallchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_visitsOallchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule254 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit
_visitsOavisitdefs :: Map Int (Set Identifier)
_visitsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule255 Map Int (Set Identifier)
_lhsIavisitdefs
_visitsOavisituses :: Map Int (Set Identifier)
_visitsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule256 Map Int (Set Identifier)
_lhsIavisituses
_visitsOchildTypes :: Attributes
_visitsOchildTypes = Attributes -> Attributes
forall a. a -> a
rule257 Attributes
_childTypes
_visitsOinhmap :: Attributes
_visitsOinhmap = Attributes -> Attributes
rule258 Attributes
_lhsIinhmap
_visitsOnextVisits :: Map Int StateCtx
_visitsOnextVisits = Map Int StateCtx -> Map Int StateCtx
rule259 Map Int StateCtx
_lhsInextVisits
_visitsOnt :: Identifier
_visitsOnt = Identifier -> Identifier
rule260 Identifier
_lhsInt
_visitsOoptions :: Options
_visitsOoptions = Options -> Options
rule261 Options
_lhsIoptions
_visitsOparams :: [Identifier]
_visitsOparams = [Identifier] -> [Identifier]
rule262 [Identifier]
_lhsIparams
_visitsOprevVisits :: Map Int StateCtx
_visitsOprevVisits = Map Int StateCtx -> Map Int StateCtx
rule263 Map Int StateCtx
_lhsIprevVisits
_visitsOsynmap :: Attributes
_visitsOsynmap = Attributes -> Attributes
rule264 Attributes
_lhsIsynmap
__result_ :: T_EProduction_vOut13
__result_ = [VisitStateState]
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Int
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Seq Error
-> Map Int (Int, Int)
-> Seq PP_Doc
-> Seq 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit Int
_lhsOcount PP_Doc
_lhsOdatatype PP_Doc
_lhsOdatatype_call PP_Doc
_lhsOdatatype_con Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod 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 rule181 #-}
{-# LINE 90 "src-ag/ExecutionPlan2Caml.ag" #-}
rule181 = \ con_ ->
{-# LINE 90 "src-ag/ExecutionPlan2Caml.ag" #-}
con_
{-# LINE 1904 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule182 #-}
{-# LINE 91 "src-ag/ExecutionPlan2Caml.ag" #-}
rule182 = \ con_ ->
{-# LINE 91 "src-ag/ExecutionPlan2Caml.ag" #-}
con_
{-# LINE 1910 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule183 #-}
{-# LINE 92 "src-ag/ExecutionPlan2Caml.ag" #-}
rule183 = \ con_ ->
{-# LINE 92 "src-ag/ExecutionPlan2Caml.ag" #-}
con_
{-# LINE 1916 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule184 #-}
{-# LINE 259 "src-ag/ExecutionPlan2Caml.ag" #-}
rule184 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 259 "src-ag/ExecutionPlan2Caml.ag" #-}
dataRecords _lhsIoptions
{-# LINE 1922 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule185 #-}
{-# LINE 260 "src-ag/ExecutionPlan2Caml.ag" #-}
rule185 = \ ((_lhsIparams) :: [Identifier]) ->
{-# LINE 260 "src-ag/ExecutionPlan2Caml.ag" #-}
ppTypeParams _lhsIparams
{-# LINE 1928 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule186 #-}
{-# LINE 261 "src-ag/ExecutionPlan2Caml.ag" #-}
rule186 = \ params_ ->
{-# LINE 261 "src-ag/ExecutionPlan2Caml.ag" #-}
ppTypeParams (cont_tvar : map pp params_)
{-# LINE 1934 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule187 #-}
{-# LINE 262 "src-ag/ExecutionPlan2Caml.ag" #-}
rule187 = \ ((_lhsInt) :: NontermIdent) ((_lhsIrename) :: Bool) con_ ->
{-# LINE 262 "src-ag/ExecutionPlan2Caml.ag" #-}
conname _lhsIrename _lhsInt con_
{-# LINE 1940 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule188 #-}
{-# LINE 263 "src-ag/ExecutionPlan2Caml.ag" #-}
rule188 = \ _conname ->
{-# LINE 263 "src-ag/ExecutionPlan2Caml.ag" #-}
pp "fields_" >|< _conname
{-# LINE 1946 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule189 #-}
{-# LINE 264 "src-ag/ExecutionPlan2Caml.ag" #-}
rule189 = \ ((_childrenIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) _o_records _recname _t_params ->
{-# LINE 264 "src-ag/ExecutionPlan2Caml.ag" #-}
"and" >#< _t_params >#< _recname >#< "="
>#< ppFieldsType _o_records False _childrenIsigs
{-# LINE 1953 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule190 #-}
{-# LINE 266 "src-ag/ExecutionPlan2Caml.ag" #-}
rule190 = \ _conname _recname _t_params ->
{-# LINE 266 "src-ag/ExecutionPlan2Caml.ag" #-}
pp "|" >#< _conname >#< "of" >#< pp_parens (_t_params >#< _recname )
{-# LINE 1959 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule191 #-}
{-# LINE 268 "src-ag/ExecutionPlan2Caml.ag" #-}
rule191 = \ ((_childrenIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) _conname ((_lhsInt) :: NontermIdent) _o_records _o_sigs _t_params con_ ->
{-# LINE 268 "src-ag/ExecutionPlan2Caml.ag" #-}
let funNm = _lhsInt >|< "_" >|< con_
decl = "and" >#< ppFunDecl _o_sigs funNm params (_t_params >#< _lhsInt) body
params = [ (x, t) | (_,x,_,t) <- _childrenIsigs ]
body = _conname >#< ppFieldsVal _o_records _childrenIsigs
in decl
{-# LINE 1969 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule192 #-}
{-# LINE 384 "src-ag/ExecutionPlan2Caml.ag" #-}
rule192 = \ (_ :: ()) ->
{-# LINE 384 "src-ag/ExecutionPlan2Caml.ag" #-}
1
{-# LINE 1975 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule193 #-}
{-# LINE 389 "src-ag/ExecutionPlan2Caml.ag" #-}
rule193 = \ ((_childrenIargnamesw) :: [PP_Doc]) ((_childrenIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_lhsIrename) :: Bool) _o_records con_ ->
{-# LINE 389 "src-ag/ExecutionPlan2Caml.ag" #-}
"|" >#< conname _lhsIrename _lhsInt con_ >#< ppFieldsVal _o_records _childrenIsigs >#< "->" >#<
prefix _lhsIoptions >|< _lhsInt >|< "_" >|< con_ >#< ppSpaced _childrenIargnamesw
{-# LINE 1982 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule194 #-}
{-# LINE 655 "src-ag/ExecutionPlan2Caml.ag" #-}
rule194 = \ _semFunBndDef ->
{-# LINE 655 "src-ag/ExecutionPlan2Caml.ag" #-}
Seq.singleton _semFunBndDef
{-# LINE 1988 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule195 #-}
{-# LINE 656 "src-ag/ExecutionPlan2Caml.ag" #-}
rule195 = \ _semFunBndTp ->
{-# LINE 656 "src-ag/ExecutionPlan2Caml.ag" #-}
Seq.singleton _semFunBndTp
{-# LINE 1994 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule196 #-}
{-# LINE 657 "src-ag/ExecutionPlan2Caml.ag" #-}
rule196 = \ _semFunBndNm _semname ->
{-# LINE 657 "src-ag/ExecutionPlan2Caml.ag" #-}
_semFunBndNm >#< "=" >#< _semname
{-# LINE 2000 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule197 #-}
{-# LINE 658 "src-ag/ExecutionPlan2Caml.ag" #-}
rule197 = \ _semFunBndNm _sem_tp ->
{-# LINE 658 "src-ag/ExecutionPlan2Caml.ag" #-}
_semFunBndNm >#< ":" >#< _sem_tp
{-# LINE 2006 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule198 #-}
{-# LINE 659 "src-ag/ExecutionPlan2Caml.ag" #-}
rule198 = \ ((_lhsInt) :: NontermIdent) con_ ->
{-# LINE 659 "src-ag/ExecutionPlan2Caml.ag" #-}
lateSemConLabel _lhsInt con_
{-# LINE 2012 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule199 #-}
{-# LINE 686 "src-ag/ExecutionPlan2Caml.ag" #-}
rule199 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 686 "src-ag/ExecutionPlan2Caml.ag" #-}
typeSigs _lhsIoptions
{-# LINE 2018 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule200 #-}
{-# LINE 687 "src-ag/ExecutionPlan2Caml.ag" #-}
rule200 = \ ((_lhsInt) :: NontermIdent) ->
{-# LINE 687 "src-ag/ExecutionPlan2Caml.ag" #-}
type_nt_sem_top _lhsInt
{-# LINE 2024 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule201 #-}
{-# LINE 688 "src-ag/ExecutionPlan2Caml.ag" #-}
rule201 = \ ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) con_ ->
{-# LINE 688 "src-ag/ExecutionPlan2Caml.ag" #-}
prefix _lhsIoptions >|< _lhsInt >|< "_" >|< con_
{-# LINE 2030 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule202 #-}
{-# LINE 689 "src-ag/ExecutionPlan2Caml.ag" #-}
rule202 = \ _t_params _t_type ->
{-# LINE 689 "src-ag/ExecutionPlan2Caml.ag" #-}
_t_params >#< _t_type
{-# LINE 2036 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule203 #-}
{-# LINE 690 "src-ag/ExecutionPlan2Caml.ag" #-}
rule203 = \ ((_childrenIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) _sem_res_tp ->
{-# LINE 690 "src-ag/ExecutionPlan2Caml.ag" #-}
pp_block "" "" "->" [ d | (_,_,d,_) <- _childrenIsigs ] >#< "->" >#< _sem_res_tp
{-# LINE 2042 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule204 #-}
{-# LINE 693 "src-ag/ExecutionPlan2Caml.ag" #-}
rule204 = \ (_ :: ()) ->
{-# LINE 693 "src-ag/ExecutionPlan2Caml.ag" #-}
empty
{-# LINE 2048 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule205 #-}
{-# LINE 699 "src-ag/ExecutionPlan2Caml.ag" #-}
rule205 = \ ((_childrenIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) _o_sigs _prod_body _sem_res_tp _semname ->
{-# LINE 699 "src-ag/ExecutionPlan2Caml.ag" #-}
"and" >#< ppFunDecl _o_sigs _semname [ (x,d) | (_,x,d,_) <- _childrenIsigs ] _sem_res_tp _prod_body
{-# LINE 2054 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule206 #-}
{-# LINE 701 "src-ag/ExecutionPlan2Caml.ag" #-}
rule206 = \ _initializer ((_lhsIinitial) :: StateIdentifier) ((_lhsInt) :: NontermIdent) ((_rulesIsem_rules) :: PP_Doc) _statefuns con_ ->
{-# LINE 701 "src-ag/ExecutionPlan2Caml.ag" #-}
_initializer
>-< "{" >#< nm_attach _lhsInt >#< "=" >#< "function () ->"
>-< indent 2
( "(* rules of production" >#< con_ >#< "*)"
>-< _rulesIsem_rules
>-< "(* states of production" >#< con_ >#< "*)"
>-< vlist _statefuns
>-< nm_st _lhsIinitial
)
>#< "}"
{-# LINE 2069 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule207 #-}
{-# LINE 717 "src-ag/ExecutionPlan2Caml.ag" #-}
rule207 = \ _genstfn ((_lhsIallstates) :: [StateIdentifier]) ->
{-# LINE 717 "src-ag/ExecutionPlan2Caml.ag" #-}
map _genstfn _lhsIallstates
{-# LINE 2075 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule208 #-}
{-# LINE 719 "src-ag/ExecutionPlan2Caml.ag" #-}
rule208 = \ ((_lhsIinitial) :: StateIdentifier) ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ((_lhsInt) :: NontermIdent) _stargs _stks _stvs ->
{-# LINE 719 "src-ag/ExecutionPlan2Caml.ag" #-}
\st -> let nextVisitInfo = Map.findWithDefault ManyVis st _lhsInextVisits
stNm = nm_st st
stDef body = "let" >#< stNm >#< (if st == _lhsIinitial then empty else _stargs st) >#< "="
>-< indent 2 body >#< "in"
in case nextVisitInfo of
NoneVis ->
if st == _lhsIinitial
then stDef (pp "unit")
else empty
_ -> stDef $ mklets (_stvs st ++ _stks st) $ ppRecordVal
[ nm_invoke _lhsInt st >#< "=" >#< nm_k st ]
{-# LINE 2091 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule209 #-}
{-# LINE 739 "src-ag/ExecutionPlan2Caml.ag" #-}
rule209 = \ _childTypes ((_lhsIallInhmap) :: Map NontermIdent Attributes) ((_lhsIallSynmap) :: Map NontermIdent Attributes) ((_lhsIoptions) :: Options) _localAttrTypes ((_visitsIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->
{-# LINE 739 "src-ag/ExecutionPlan2Caml.ag" #-}
\st -> let attrs = maybe Map.empty id $ Map.lookup st _visitsIintramap in ppSpaced
[ case mbAttr of
Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->
case Map.lookup nm _localAttrTypes of
Just tp -> pp_parens (strNm >#< ":" >#< ppTp tp)
Nothing -> pp strNm
Just attr | not (noPerStateTypeSigs _lhsIoptions) ->
case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _childTypes of
Just tpDoc -> pp_parens (strNm >#< ":" >#< tpDoc)
Nothing -> pp strNm
_ -> pp strNm
| (strNm, mbAttr) <- Map.assocs attrs
] >#< dummyPat _lhsIoptions (Map.null attrs)
{-# LINE 2109 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule210 #-}
{-# LINE 754 "src-ag/ExecutionPlan2Caml.ag" #-}
rule210 = \ ((_visitsIallvisits) :: [VisitStateState]) ->
{-# LINE 754 "src-ag/ExecutionPlan2Caml.ag" #-}
\st -> filter (\(_,f,_) -> f == st) _visitsIallvisits
{-# LINE 2115 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule211 #-}
{-# LINE 756 "src-ag/ExecutionPlan2Caml.ag" #-}
rule211 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ((_lhsInt) :: NontermIdent) _stvisits _t_c_params con_ ->
{-# LINE 756 "src-ag/ExecutionPlan2Caml.ag" #-}
\st -> let stvisits = _stvisits st
def = ppFunDecl False (pp $ nm_k st)
[(pp "arg", _t_c_params >#< type_caller _lhsInt st)] (pp cont_tvar) body
nextVisitInfo = Map.findWithDefault ManyVis st _lhsInextVisits
body = case nextVisitInfo of
NoneVis -> text "?no next visit?"
OneVis v -> dispatch "arg" v
ManyVis -> let alt (v,_,_) = "|" >#< con_visit _lhsInt v >#< "chosen" >#< "->" >-< indent 2 (dispatch "chosen" v)
in "match arg with" >-< (indent 2 $ vlist $ map alt stvisits)
dispatch nm v = "let" >#< ppRecordVal
[ nm_inh _lhsInt v >#< "=" >#< "inp"
, nm_cont _lhsInt v >#< "=" >#< "cont" ]
>#< "=" >#< pp nm
>-< "in" >#< "cont" >#< pp_parens (nm_visit v >#< "inp")
in if null stvisits
then []
else [ "(* k-function for production" >#< con_ >#< " *)" >-< def ]
{-# LINE 2137 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule212 #-}
{-# LINE 777 "src-ag/ExecutionPlan2Caml.ag" #-}
rule212 = \ ((_visitsIsem_visit) :: [(StateIdentifier,PP_Doc)] ) ->
{-# LINE 777 "src-ag/ExecutionPlan2Caml.ag" #-}
\st -> [ppf | (f,ppf) <- _visitsIsem_visit, f == st]
{-# LINE 2143 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule213 #-}
{-# LINE 778 "src-ag/ExecutionPlan2Caml.ag" #-}
rule213 = \ ((_rulesImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->
{-# LINE 778 "src-ag/ExecutionPlan2Caml.ag" #-}
_rulesImrules
{-# LINE 2149 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule214 #-}
{-# LINE 919 "src-ag/ExecutionPlan2Caml.ag" #-}
rule214 = \ ((_childrenIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
{-# LINE 919 "src-ag/ExecutionPlan2Caml.ag" #-}
_childrenIchildintros
{-# LINE 2155 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule215 #-}
{-# LINE 1225 "src-ag/ExecutionPlan2Caml.ag" #-}
rule215 = \ ((_visitsIruleUsage) :: Map Identifier Int) ->
{-# LINE 1225 "src-ag/ExecutionPlan2Caml.ag" #-}
_visitsIruleUsage
{-# LINE 2161 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule216 #-}
{-# LINE 1240 "src-ag/ExecutionPlan2Caml.ag" #-}
rule216 = \ ((_visitsIruleKinds) :: Map Identifier (Set VisitKind)) ->
{-# LINE 1240 "src-ag/ExecutionPlan2Caml.ag" #-}
_visitsIruleKinds
{-# LINE 2167 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule217 #-}
{-# LINE 1269 "src-ag/ExecutionPlan2Caml.ag" #-}
rule217 = \ ((_visitsIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->
{-# LINE 1269 "src-ag/ExecutionPlan2Caml.ag" #-}
_visitsIintramap
{-# LINE 2173 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule218 #-}
{-# LINE 1270 "src-ag/ExecutionPlan2Caml.ag" #-}
rule218 = \ ((_childrenIterminaldefs) :: Set String) ->
{-# LINE 1270 "src-ag/ExecutionPlan2Caml.ag" #-}
_childrenIterminaldefs
{-# LINE 2179 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule219 #-}
{-# LINE 1294 "src-ag/ExecutionPlan2Caml.ag" #-}
rule219 = \ ((_rulesIruledefs) :: Map Identifier (Set String)) ->
{-# LINE 1294 "src-ag/ExecutionPlan2Caml.ag" #-}
_rulesIruledefs
{-# LINE 2185 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule220 #-}
{-# LINE 1295 "src-ag/ExecutionPlan2Caml.ag" #-}
rule220 = \ ((_rulesIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
{-# LINE 1295 "src-ag/ExecutionPlan2Caml.ag" #-}
_rulesIruleuses
{-# LINE 2191 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule221 #-}
{-# LINE 1349 "src-ag/ExecutionPlan2Caml.ag" #-}
rule221 = \ ((_visitsIlazyIntras) :: Set String) ->
{-# LINE 1349 "src-ag/ExecutionPlan2Caml.ag" #-}
_visitsIlazyIntras
{-# LINE 2197 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule222 #-}
{-# LINE 1421 "src-ag/ExecutionPlan2Caml.ag" #-}
rule222 = \ ((_childrenIchildTypes) :: Map Identifier Type) ((_lhsIntType) :: Type) ->
{-# LINE 1421 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton _LHS _lhsIntType `Map.union` _childrenIchildTypes
{-# LINE 2203 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule223 #-}
{-# LINE 1438 "src-ag/ExecutionPlan2Caml.ag" #-}
rule223 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) con_ ->
{-# LINE 1438 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.findWithDefault Map.empty con_ _lhsIlocalAttrTypes
{-# LINE 2209 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule224 #-}
rule224 = \ ((_visitsIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
_visitsIchildvisit
{-# INLINE rule225 #-}
rule225 = \ ((_rulesIerrors) :: Seq Error) ((_visitsIerrors) :: Seq Error) ->
_rulesIerrors Seq.>< _visitsIerrors
{-# INLINE rule226 #-}
rule226 = \ ((_visitsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->
_visitsIfromToStates
{-# INLINE rule227 #-}
rule227 = \ ((_visitsIt_visits) :: PP_Doc) ->
_visitsIt_visits
{-# INLINE rule228 #-}
rule228 = \ ((_visitsIvisitKinds) :: Map VisitIdentifier VisitKind) ->
_visitsIvisitKinds
{-# INLINE rule229 #-}
rule229 = \ ((_visitsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_visitsIvisitdefs
{-# INLINE rule230 #-}
rule230 = \ ((_visitsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->
_visitsIvisituses
{-# INLINE rule231 #-}
rule231 = \ ((_visitsIallvisits) :: [VisitStateState]) ->
_visitsIallvisits
{-# INLINE rule232 #-}
rule232 = \ _sem_prod ->
_sem_prod
{-# INLINE rule233 #-}
rule233 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule234 #-}
rule234 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule235 #-}
rule235 = \ _childTypes ->
_childTypes
{-# INLINE rule236 #-}
rule236 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule237 #-}
rule237 = \ _lazyIntras ->
_lazyIntras
{-# INLINE rule238 #-}
rule238 = \ _localAttrTypes ->
_localAttrTypes
{-# INLINE rule239 #-}
rule239 = \ ((_lhsImainFile) :: String) ->
_lhsImainFile
{-# INLINE rule240 #-}
rule240 = \ ((_lhsImainName) :: String) ->
_lhsImainName
{-# INLINE rule241 #-}
rule241 = \ ((_lhsInt) :: NontermIdent) ->
_lhsInt
{-# INLINE rule242 #-}
rule242 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule243 #-}
rule243 = \ ((_lhsIsynmap) :: Attributes) ->
_lhsIsynmap
{-# INLINE rule244 #-}
rule244 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule245 #-}
rule245 = \ ((_lhsImainFile) :: String) ->
_lhsImainFile
{-# INLINE rule246 #-}
rule246 = \ ((_lhsImainName) :: String) ->
_lhsImainName
{-# INLINE rule247 #-}
rule247 = \ ((_lhsInt) :: NontermIdent) ->
_lhsInt
{-# INLINE rule248 #-}
rule248 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule249 #-}
rule249 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule250 #-}
rule250 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule251 #-}
rule251 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule252 #-}
rule252 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule253 #-}
rule253 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule254 #-}
rule254 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
_lhsIallchildvisit
{-# INLINE rule255 #-}
rule255 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule256 #-}
rule256 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule257 #-}
rule257 = \ _childTypes ->
_childTypes
{-# INLINE rule258 #-}
rule258 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule259 #-}
rule259 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->
_lhsInextVisits
{-# INLINE rule260 #-}
rule260 = \ ((_lhsInt) :: NontermIdent) ->
_lhsInt
{-# INLINE rule261 #-}
rule261 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule262 #-}
rule262 = \ ((_lhsIparams) :: [Identifier]) ->
_lhsIparams
{-# INLINE rule263 #-}
rule263 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->
_lhsIprevVisits
{-# INLINE rule264 #-}
rule264 = \ ((_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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
allchildvisit_Inh_EProductions :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), Inh_EProductions -> [Int]
allstates_Inh_EProductions :: ([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 -> 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 -> [Char]
mainFile_Inh_EProductions :: (String), Inh_EProductions -> [Char]
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) }
data Syn_EProductions = Syn_EProductions { Syn_EProductions -> [VisitStateState]
allvisits_Syn_EProductions :: ([VisitStateState]), Syn_EProductions
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
childvisit_Syn_EProductions :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), Syn_EProductions -> Int
count_Syn_EProductions :: (Int), Syn_EProductions -> [PP_Doc]
datatype_Syn_EProductions :: ([PP_Doc]), Syn_EProductions -> [PP_Doc]
datatype_call_Syn_EProductions :: ([PP_Doc]), Syn_EProductions -> [PP_Doc]
datatype_con_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 -> 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
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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit [Int]
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap) =
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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> [Int]
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Int
-> Map Identifier Attributes
-> [Char]
-> [Char]
-> Map Int StateCtx
-> Identifier
-> Type
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Bool
-> Attributes
-> 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit [Int]
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap
(T_EProductions_vOut16 [VisitStateState]
_lhsOallvisits Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit Int
_lhsOcount [PP_Doc]
_lhsOdatatype [PP_Doc]
_lhsOdatatype_call [PP_Doc]
_lhsOdatatype_con Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Int
-> [PP_Doc]
-> [PP_Doc]
-> [PP_Doc]
-> Seq Error
-> Map Int (Int, Int)
-> Seq PP_Doc
-> Seq 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit Int
_lhsOcount [PP_Doc]
_lhsOdatatype [PP_Doc]
_lhsOdatatype_call [PP_Doc]
_lhsOdatatype_con Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ([StateIdentifier]) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Attributes) (StateIdentifier) (Map ConstructorIdent (Map Identifier Type)) (String) (String) (Map StateIdentifier StateCtx) (NontermIdent) (Type) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Bool) (Attributes)
data T_EProductions_vOut16 = T_EProductions_vOut16 ([VisitStateState]) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Int) ([PP_Doc]) ([PP_Doc]) ([PP_Doc]) (Seq Error) (Map VisitIdentifier (Int,Int)) (Seq PP_Doc) (Seq 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit [Int]
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap) -> ( 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdIchildvisit Int
_hdIcount PP_Doc
_hdIdatatype PP_Doc
_hdIdatatype_call PP_Doc
_hdIdatatype_con Seq Error
_hdIerrors Map Int (Int, Int)
_hdIfromToStates Seq PP_Doc
_hdIsemFunBndDefs Seq PP_Doc
_hdIsemFunBndTps PP_Doc
_hdIsem_nt PP_Doc
_hdIsem_prod 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> [Int]
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Int
-> Map Identifier Attributes
-> [Char]
-> [Char]
-> Map Int StateCtx
-> Identifier
-> Type
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Bool
-> Attributes
-> 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdOallchildvisit [Int]
_hdOallstates Map Int (Set Identifier)
_hdOavisitdefs Map Int (Set Identifier)
_hdOavisituses Attributes
_hdOinhmap Int
_hdOinitial Map Identifier Attributes
_hdOlocalAttrTypes [Char]
_hdOmainFile [Char]
_hdOmainName Map Int StateCtx
_hdOnextVisits Identifier
_hdOnt Type
_hdOntType Options
_hdOoptions [Identifier]
_hdOparams Map Int StateCtx
_hdOprevVisits Bool
_hdOrename Attributes
_hdOsynmap)
(T_EProductions_vOut16 [VisitStateState]
_tlIallvisits Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlIchildvisit Int
_tlIcount [PP_Doc]
_tlIdatatype [PP_Doc]
_tlIdatatype_call [PP_Doc]
_tlIdatatype_con Seq Error
_tlIerrors Map Int (Int, Int)
_tlIfromToStates Seq PP_Doc
_tlIsemFunBndDefs Seq PP_Doc
_tlIsemFunBndTps PP_Doc
_tlIsem_nt PP_Doc
_tlIsem_prod 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> [Int]
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Int
-> Map Identifier Attributes
-> [Char]
-> [Char]
-> Map Int StateCtx
-> Identifier
-> Type
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Bool
-> Attributes
-> 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlOallchildvisit [Int]
_tlOallstates Map Int (Set Identifier)
_tlOavisitdefs Map Int (Set Identifier)
_tlOavisituses Attributes
_tlOinhmap Int
_tlOinitial Map Identifier Attributes
_tlOlocalAttrTypes [Char]
_tlOmainFile [Char]
_tlOmainName Map Int StateCtx
_tlOnextVisits Identifier
_tlOnt Type
_tlOntType Options
_tlOoptions [Identifier]
_tlOparams Map Int StateCtx
_tlOprevVisits Bool
_tlOrename Attributes
_tlOsynmap)
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits = [VisitStateState] -> [VisitStateState]
rule265 [VisitStateState]
_hdIallvisits
_lhsOt_visits :: PP_Doc
_lhsOt_visits :: PP_Doc
_lhsOt_visits = PP_Doc -> PP_Doc
rule266 PP_Doc
_hdIt_visits
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule267 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdIchildvisit Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlIchildvisit
_lhsOcount :: Int
_lhsOcount :: Int
_lhsOcount = Int -> Int -> Int
rule268 Int
_hdIcount Int
_tlIcount
_lhsOdatatype :: [PP_Doc]
_lhsOdatatype :: [PP_Doc]
_lhsOdatatype = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule269 PP_Doc
_hdIdatatype [PP_Doc]
_tlIdatatype
_lhsOdatatype_call :: [PP_Doc]
_lhsOdatatype_call :: [PP_Doc]
_lhsOdatatype_call = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule270 PP_Doc
_hdIdatatype_call [PP_Doc]
_tlIdatatype_call
_lhsOdatatype_con :: [PP_Doc]
_lhsOdatatype_con :: [PP_Doc]
_lhsOdatatype_con = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule271 PP_Doc
_hdIdatatype_con [PP_Doc]
_tlIdatatype_con
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule272 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)
rule273 Map Int (Int, Int)
_hdIfromToStates Map Int (Int, Int)
_tlIfromToStates
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
rule274 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
rule275 Seq PP_Doc
_hdIsemFunBndTps Seq PP_Doc
_tlIsemFunBndTps
_lhsOsem_nt :: PP_Doc
_lhsOsem_nt :: PP_Doc
_lhsOsem_nt = PP_Doc -> PP_Doc -> PP_Doc
rule276 PP_Doc
_hdIsem_nt PP_Doc
_tlIsem_nt
_lhsOsem_prod :: PP_Doc
_lhsOsem_prod :: PP_Doc
_lhsOsem_prod = PP_Doc -> PP_Doc -> PP_Doc
rule277 PP_Doc
_hdIsem_prod PP_Doc
_tlIsem_prod
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
rule278 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)
rule279 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)
rule280 Map Int (Set Identifier)
_hdIvisituses Map Int (Set Identifier)
_tlIvisituses
_hdOallFromToStates :: Map Int (Int, Int)
_hdOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule281 Map Int (Int, Int)
_lhsIallFromToStates
_hdOallInhmap :: Map Identifier Attributes
_hdOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule282 Map Identifier Attributes
_lhsIallInhmap
_hdOallInitStates :: Map Identifier Int
_hdOallInitStates = Map Identifier Int -> Map Identifier Int
rule283 Map Identifier Int
_lhsIallInitStates
_hdOallSynmap :: Map Identifier Attributes
_hdOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule284 Map Identifier Attributes
_lhsIallSynmap
_hdOallVisitKinds :: Map Int VisitKind
_hdOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule285 Map Int VisitKind
_lhsIallVisitKinds
_hdOallchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdOallchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule286 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit
_hdOallstates :: [Int]
_hdOallstates = [Int] -> [Int]
rule287 [Int]
_lhsIallstates
_hdOavisitdefs :: Map Int (Set Identifier)
_hdOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule288 Map Int (Set Identifier)
_lhsIavisitdefs
_hdOavisituses :: Map Int (Set Identifier)
_hdOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule289 Map Int (Set Identifier)
_lhsIavisituses
_hdOinhmap :: Attributes
_hdOinhmap = Attributes -> Attributes
rule290 Attributes
_lhsIinhmap
_hdOinitial :: Int
_hdOinitial = Int -> Int
rule291 Int
_lhsIinitial
_hdOlocalAttrTypes :: Map Identifier Attributes
_hdOlocalAttrTypes = Map Identifier Attributes -> Map Identifier Attributes
rule292 Map Identifier Attributes
_lhsIlocalAttrTypes
_hdOmainFile :: [Char]
_hdOmainFile = [Char] -> [Char]
rule293 [Char]
_lhsImainFile
_hdOmainName :: [Char]
_hdOmainName = [Char] -> [Char]
rule294 [Char]
_lhsImainName
_hdOnextVisits :: Map Int StateCtx
_hdOnextVisits = Map Int StateCtx -> Map Int StateCtx
rule295 Map Int StateCtx
_lhsInextVisits
_hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule296 Identifier
_lhsInt
_hdOntType :: Type
_hdOntType = Type -> Type
rule297 Type
_lhsIntType
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule298 Options
_lhsIoptions
_hdOparams :: [Identifier]
_hdOparams = [Identifier] -> [Identifier]
rule299 [Identifier]
_lhsIparams
_hdOprevVisits :: Map Int StateCtx
_hdOprevVisits = Map Int StateCtx -> Map Int StateCtx
rule300 Map Int StateCtx
_lhsIprevVisits
_hdOrename :: Bool
_hdOrename = Bool -> Bool
rule301 Bool
_lhsIrename
_hdOsynmap :: Attributes
_hdOsynmap = Attributes -> Attributes
rule302 Attributes
_lhsIsynmap
_tlOallFromToStates :: Map Int (Int, Int)
_tlOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule303 Map Int (Int, Int)
_lhsIallFromToStates
_tlOallInhmap :: Map Identifier Attributes
_tlOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule304 Map Identifier Attributes
_lhsIallInhmap
_tlOallInitStates :: Map Identifier Int
_tlOallInitStates = Map Identifier Int -> Map Identifier Int
rule305 Map Identifier Int
_lhsIallInitStates
_tlOallSynmap :: Map Identifier Attributes
_tlOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule306 Map Identifier Attributes
_lhsIallSynmap
_tlOallVisitKinds :: Map Int VisitKind
_tlOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule307 Map Int VisitKind
_lhsIallVisitKinds
_tlOallchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlOallchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule308 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit
_tlOallstates :: [Int]
_tlOallstates = [Int] -> [Int]
rule309 [Int]
_lhsIallstates
_tlOavisitdefs :: Map Int (Set Identifier)
_tlOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule310 Map Int (Set Identifier)
_lhsIavisitdefs
_tlOavisituses :: Map Int (Set Identifier)
_tlOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule311 Map Int (Set Identifier)
_lhsIavisituses
_tlOinhmap :: Attributes
_tlOinhmap = Attributes -> Attributes
rule312 Attributes
_lhsIinhmap
_tlOinitial :: Int
_tlOinitial = Int -> Int
rule313 Int
_lhsIinitial
_tlOlocalAttrTypes :: Map Identifier Attributes
_tlOlocalAttrTypes = Map Identifier Attributes -> Map Identifier Attributes
rule314 Map Identifier Attributes
_lhsIlocalAttrTypes
_tlOmainFile :: [Char]
_tlOmainFile = [Char] -> [Char]
rule315 [Char]
_lhsImainFile
_tlOmainName :: [Char]
_tlOmainName = [Char] -> [Char]
rule316 [Char]
_lhsImainName
_tlOnextVisits :: Map Int StateCtx
_tlOnextVisits = Map Int StateCtx -> Map Int StateCtx
rule317 Map Int StateCtx
_lhsInextVisits
_tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule318 Identifier
_lhsInt
_tlOntType :: Type
_tlOntType = Type -> Type
rule319 Type
_lhsIntType
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule320 Options
_lhsIoptions
_tlOparams :: [Identifier]
_tlOparams = [Identifier] -> [Identifier]
rule321 [Identifier]
_lhsIparams
_tlOprevVisits :: Map Int StateCtx
_tlOprevVisits = Map Int StateCtx -> Map Int StateCtx
rule322 Map Int StateCtx
_lhsIprevVisits
_tlOrename :: Bool
_tlOrename = Bool -> Bool
rule323 Bool
_lhsIrename
_tlOsynmap :: Attributes
_tlOsynmap = Attributes -> Attributes
rule324 Attributes
_lhsIsynmap
__result_ :: T_EProductions_vOut16
__result_ = [VisitStateState]
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Int
-> [PP_Doc]
-> [PP_Doc]
-> [PP_Doc]
-> Seq Error
-> Map Int (Int, Int)
-> Seq PP_Doc
-> Seq 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit Int
_lhsOcount [PP_Doc]
_lhsOdatatype [PP_Doc]
_lhsOdatatype_call [PP_Doc]
_lhsOdatatype_con Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod 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 rule265 #-}
{-# LINE 439 "src-ag/ExecutionPlan2Caml.ag" #-}
rule265 = \ ((_hdIallvisits) :: [VisitStateState]) ->
{-# LINE 439 "src-ag/ExecutionPlan2Caml.ag" #-}
_hdIallvisits
{-# LINE 2459 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule266 #-}
{-# LINE 534 "src-ag/ExecutionPlan2Caml.ag" #-}
rule266 = \ ((_hdIt_visits) :: PP_Doc) ->
{-# LINE 534 "src-ag/ExecutionPlan2Caml.ag" #-}
_hdIt_visits
{-# LINE 2465 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule267 #-}
rule267 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
_hdIchildvisit `Map.union` _tlIchildvisit
{-# INLINE rule268 #-}
rule268 = \ ((_hdIcount) :: Int) ((_tlIcount) :: Int) ->
_hdIcount + _tlIcount
{-# INLINE rule269 #-}
rule269 = \ ((_hdIdatatype) :: PP_Doc) ((_tlIdatatype) :: [PP_Doc]) ->
_hdIdatatype : _tlIdatatype
{-# INLINE rule270 #-}
rule270 = \ ((_hdIdatatype_call) :: PP_Doc) ((_tlIdatatype_call) :: [PP_Doc]) ->
_hdIdatatype_call : _tlIdatatype_call
{-# INLINE rule271 #-}
rule271 = \ ((_hdIdatatype_con) :: PP_Doc) ((_tlIdatatype_con) :: [PP_Doc]) ->
_hdIdatatype_con : _tlIdatatype_con
{-# INLINE rule272 #-}
rule272 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->
_hdIerrors Seq.>< _tlIerrors
{-# INLINE rule273 #-}
rule273 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->
_hdIfromToStates `mappend` _tlIfromToStates
{-# INLINE rule274 #-}
rule274 = \ ((_hdIsemFunBndDefs) :: Seq PP_Doc) ((_tlIsemFunBndDefs) :: Seq PP_Doc) ->
_hdIsemFunBndDefs Seq.>< _tlIsemFunBndDefs
{-# INLINE rule275 #-}
rule275 = \ ((_hdIsemFunBndTps) :: Seq PP_Doc) ((_tlIsemFunBndTps) :: Seq PP_Doc) ->
_hdIsemFunBndTps Seq.>< _tlIsemFunBndTps
{-# INLINE rule276 #-}
rule276 = \ ((_hdIsem_nt) :: PP_Doc) ((_tlIsem_nt) :: PP_Doc) ->
_hdIsem_nt >-< _tlIsem_nt
{-# INLINE rule277 #-}
rule277 = \ ((_hdIsem_prod) :: PP_Doc) ((_tlIsem_prod) :: PP_Doc) ->
_hdIsem_prod >-< _tlIsem_prod
{-# INLINE rule278 #-}
rule278 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->
_hdIvisitKinds `mappend` _tlIvisitKinds
{-# INLINE rule279 #-}
rule279 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_hdIvisitdefs `uwSetUnion` _tlIvisitdefs
{-# INLINE rule280 #-}
rule280 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->
_hdIvisituses `uwSetUnion` _tlIvisituses
{-# INLINE rule281 #-}
rule281 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule282 #-}
rule282 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule283 #-}
rule283 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule284 #-}
rule284 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule285 #-}
rule285 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule286 #-}
rule286 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
_lhsIallchildvisit
{-# INLINE rule287 #-}
rule287 = \ ((_lhsIallstates) :: [StateIdentifier]) ->
_lhsIallstates
{-# INLINE rule288 #-}
rule288 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule289 #-}
rule289 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule290 #-}
rule290 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule291 #-}
rule291 = \ ((_lhsIinitial) :: StateIdentifier) ->
_lhsIinitial
{-# INLINE rule292 #-}
rule292 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) ->
_lhsIlocalAttrTypes
{-# INLINE rule293 #-}
rule293 = \ ((_lhsImainFile) :: String) ->
_lhsImainFile
{-# INLINE rule294 #-}
rule294 = \ ((_lhsImainName) :: String) ->
_lhsImainName
{-# INLINE rule295 #-}
rule295 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->
_lhsInextVisits
{-# INLINE rule296 #-}
rule296 = \ ((_lhsInt) :: NontermIdent) ->
_lhsInt
{-# INLINE rule297 #-}
rule297 = \ ((_lhsIntType) :: Type) ->
_lhsIntType
{-# INLINE rule298 #-}
rule298 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule299 #-}
rule299 = \ ((_lhsIparams) :: [Identifier]) ->
_lhsIparams
{-# INLINE rule300 #-}
rule300 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->
_lhsIprevVisits
{-# INLINE rule301 #-}
rule301 = \ ((_lhsIrename) :: Bool) ->
_lhsIrename
{-# INLINE rule302 #-}
rule302 = \ ((_lhsIsynmap) :: Attributes) ->
_lhsIsynmap
{-# INLINE rule303 #-}
rule303 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule304 #-}
rule304 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule305 #-}
rule305 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule306 #-}
rule306 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule307 #-}
rule307 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule308 #-}
rule308 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
_lhsIallchildvisit
{-# INLINE rule309 #-}
rule309 = \ ((_lhsIallstates) :: [StateIdentifier]) ->
_lhsIallstates
{-# INLINE rule310 #-}
rule310 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule311 #-}
rule311 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule312 #-}
rule312 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule313 #-}
rule313 = \ ((_lhsIinitial) :: StateIdentifier) ->
_lhsIinitial
{-# INLINE rule314 #-}
rule314 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) ->
_lhsIlocalAttrTypes
{-# INLINE rule315 #-}
rule315 = \ ((_lhsImainFile) :: String) ->
_lhsImainFile
{-# INLINE rule316 #-}
rule316 = \ ((_lhsImainName) :: String) ->
_lhsImainName
{-# INLINE rule317 #-}
rule317 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->
_lhsInextVisits
{-# INLINE rule318 #-}
rule318 = \ ((_lhsInt) :: NontermIdent) ->
_lhsInt
{-# INLINE rule319 #-}
rule319 = \ ((_lhsIntType) :: Type) ->
_lhsIntType
{-# INLINE rule320 #-}
rule320 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule321 #-}
rule321 = \ ((_lhsIparams) :: [Identifier]) ->
_lhsIparams
{-# INLINE rule322 #-}
rule322 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->
_lhsIprevVisits
{-# INLINE rule323 #-}
rule323 = \ ((_lhsIrename) :: Bool) ->
_lhsIrename
{-# INLINE rule324 #-}
rule324 = \ ((_lhsIsynmap) :: Attributes) ->
_lhsIsynmap
{-# 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit [Int]
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap) -> ( let
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits = () -> [VisitStateState]
forall a. () -> a
rule325 ()
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit = ()
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
forall k a. () -> Map k a
rule326 ()
_lhsOcount :: Int
_lhsOcount :: Int
_lhsOcount = () -> Int
rule327 ()
_lhsOdatatype :: [PP_Doc]
_lhsOdatatype :: [PP_Doc]
_lhsOdatatype = () -> [PP_Doc]
forall a. () -> [a]
rule328 ()
_lhsOdatatype_call :: [PP_Doc]
_lhsOdatatype_call :: [PP_Doc]
_lhsOdatatype_call = () -> [PP_Doc]
forall a. () -> [a]
rule329 ()
_lhsOdatatype_con :: [PP_Doc]
_lhsOdatatype_con :: [PP_Doc]
_lhsOdatatype_con = () -> [PP_Doc]
forall a. () -> [a]
rule330 ()
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule331 ()
_lhsOfromToStates :: Map VisitIdentifier (Int,Int)
_lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = () -> Map Int (Int, Int)
rule332 ()
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = () -> Seq PP_Doc
forall a. () -> Seq a
rule333 ()
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps = () -> Seq PP_Doc
forall a. () -> Seq a
rule334 ()
_lhsOsem_nt :: PP_Doc
_lhsOsem_nt :: PP_Doc
_lhsOsem_nt = () -> PP_Doc
rule335 ()
_lhsOsem_prod :: PP_Doc
_lhsOsem_prod :: PP_Doc
_lhsOsem_prod = () -> PP_Doc
rule336 ()
_lhsOt_visits :: PP_Doc
_lhsOt_visits :: PP_Doc
_lhsOt_visits = () -> PP_Doc
rule337 ()
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule338 ()
_lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
_lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule339 ()
_lhsOvisituses :: Map VisitIdentifier (Set Identifier)
_lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule340 ()
__result_ :: T_EProductions_vOut16
__result_ = [VisitStateState]
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Int
-> [PP_Doc]
-> [PP_Doc]
-> [PP_Doc]
-> Seq Error
-> Map Int (Int, Int)
-> Seq PP_Doc
-> Seq 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit Int
_lhsOcount [PP_Doc]
_lhsOdatatype [PP_Doc]
_lhsOdatatype_call [PP_Doc]
_lhsOdatatype_con Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod 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 rule325 #-}
{-# LINE 440 "src-ag/ExecutionPlan2Caml.ag" #-}
rule325 = \ (_ :: ()) ->
{-# LINE 440 "src-ag/ExecutionPlan2Caml.ag" #-}
error "Every nonterminal should have at least 1 production"
{-# LINE 2687 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule326 #-}
rule326 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule327 #-}
rule327 = \ (_ :: ()) ->
0
{-# INLINE rule328 #-}
rule328 = \ (_ :: ()) ->
[]
{-# INLINE rule329 #-}
rule329 = \ (_ :: ()) ->
[]
{-# INLINE rule330 #-}
rule330 = \ (_ :: ()) ->
[]
{-# INLINE rule331 #-}
rule331 = \ (_ :: ()) ->
Seq.empty
{-# INLINE rule332 #-}
rule332 = \ (_ :: ()) ->
mempty
{-# INLINE rule333 #-}
rule333 = \ (_ :: ()) ->
Seq.empty
{-# INLINE rule334 #-}
rule334 = \ (_ :: ()) ->
Seq.empty
{-# INLINE rule335 #-}
rule335 = \ (_ :: ()) ->
empty
{-# INLINE rule336 #-}
rule336 = \ (_ :: ()) ->
empty
{-# INLINE rule337 #-}
rule337 = \ (_ :: ()) ->
empty
{-# INLINE rule338 #-}
rule338 = \ (_ :: ()) ->
mempty
{-# INLINE rule339 #-}
rule339 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule340 #-}
rule340 = \ (_ :: ()) ->
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 -> Attributes
inhmap_Inh_ERule :: (Attributes), Inh_ERule -> Set [Char]
lazyIntras_Inh_ERule :: (Set String), Inh_ERule -> Attributes
localAttrTypes_Inh_ERule :: (Map Identifier Type), Inh_ERule -> [Char]
mainFile_Inh_ERule :: (String), Inh_ERule -> [Char]
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 -> 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 -> Either Error PP_Doc)
mrules_Syn_ERule :: (Map Identifier (VisitKind -> Either Error PP_Doc)), Syn_ERule -> Map Identifier (Set [Char])
ruledefs_Syn_ERule :: (Map Identifier (Set String)), Syn_ERule -> Map Identifier (Map [Char] (Maybe NonLocalAttr))
ruleuses_Syn_ERule :: (Map Identifier (Map String (Maybe NonLocalAttr))), Syn_ERule -> PP_Doc
sem_rules_Syn_ERule :: (PP_Doc) }
{-# 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 Attributes
_lhsIinhmap Set [Char]
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap 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
-> Attributes
-> Set [Char]
-> Attributes
-> [Char]
-> [Char]
-> Identifier
-> Options
-> Map Identifier (Set VisitKind)
-> Attributes
-> Map Identifier Int
-> T_ERule_vIn19
T_ERule_vIn19 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Identifier
_lhsIcon Attributes
_lhsIinhmap Set [Char]
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap Map Identifier Int
_lhsIusageInfo
(T_ERule_vOut19 Seq Error
_lhsOerrors Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set [Char])
_lhsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules) <- 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 -> Either Error PP_Doc)
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> PP_Doc
-> Syn_ERule
Syn_ERule Seq Error
_lhsOerrors Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set [Char])
_lhsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules)
)
{-# INLINE sem_ERule #-}
sem_ERule :: ERule -> T_ERule
sem_ERule :: ERule -> T_ERule
sem_ERule ( ERule Identifier
name_ Pattern
pattern_ Expression
rhs_ Bool
owrt_ [Char]
origin_ Bool
explicit_ Bool
pure_ Maybe Error
mbError_ ) = Identifier
-> T_Pattern
-> T_Expression
-> Bool
-> [Char]
-> 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_ [Char]
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) (Attributes) (Set String) (Map Identifier Type) (String) (String) (NontermIdent) (Options) (Map Identifier (Set VisitKind)) (Attributes) (Map Identifier Int)
data T_ERule_vOut19 = T_ERule_vOut19 (Seq Error) (Map Identifier (VisitKind -> Either Error PP_Doc)) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (PP_Doc)
{-# 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
-> [Char]
-> Bool
-> Bool
-> Maybe Error
-> T_ERule
sem_ERule_ERule Identifier
arg_name_ T_Pattern
arg_pattern_ T_Expression
arg_rhs_ Bool
_ [Char]
_ 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 Attributes
_lhsIinhmap Set [Char]
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap 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 [Char]
_patternIattrs Pattern
_patternIcopy [(PP_Doc, PP_Doc)]
_patternIextraDefs 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 [Char] (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)
_lhsOsem_rules :: PP_Doc
_lhsOsem_rules :: PP_Doc
_lhsOsem_rules = PP_Doc -> Int -> PP_Doc
rule341 PP_Doc
_rulecode Int
_used
_rulecode :: PP_Doc
_rulecode = PP_Doc -> PP_Doc -> Bool -> PP_Doc -> Pos -> PP_Doc -> PP_Doc
rule342 PP_Doc
_declHead PP_Doc
_endpragma Bool
_genpragma PP_Doc
_pragma Pos
_rhsIpos PP_Doc
_rhsIsemfunc
_pragma :: PP_Doc
_pragma = Options -> Pos -> PP_Doc
rule343 Options
_lhsIoptions Pos
_rhsIpos
_endpragma :: PP_Doc
_endpragma = [Char] -> Options -> PP_Doc
rule344 [Char]
_lhsImainFile Options
_lhsIoptions
_genpragma :: Bool
_genpragma = Bool -> Options -> Bool -> Bool
rule345 Bool
_haspos Options
_lhsIoptions Bool
arg_explicit_
_haspos :: Bool
_haspos = Pos -> Bool
rule346 Pos
_rhsIpos
_declHead :: PP_Doc
_declHead = PP_Doc
-> Options
-> Map [Char] (Maybe NonLocalAttr)
-> Identifier
-> PP_Doc
rule347 PP_Doc
_argPats Options
_lhsIoptions Map [Char] (Maybe NonLocalAttr)
_rhsIattrs Identifier
arg_name_
_argPats :: PP_Doc
_argPats = Map Identifier Attributes
-> Map Identifier Attributes
-> Attributes
-> Attributes
-> Options
-> Map [Char] (Maybe NonLocalAttr)
-> PP_Doc
rule348 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Map [Char] (Maybe NonLocalAttr)
_rhsIattrs
_argExprs :: PP_Doc
_argExprs = Map [Char] (Maybe NonLocalAttr) -> PP_Doc
rule349 Map [Char] (Maybe NonLocalAttr)
_rhsIattrs
_stepcode :: VisitKind -> Either Error PP_Doc
_stepcode = PP_Doc
-> Options
-> [(PP_Doc, PP_Doc)]
-> PP_Doc
-> Map [Char] (Maybe NonLocalAttr)
-> Identifier
-> Bool
-> VisitKind
-> Either Error PP_Doc
rule350 PP_Doc
_argExprs Options
_lhsIoptions [(PP_Doc, PP_Doc)]
_patternIextraDefs PP_Doc
_patternIsem_lhs Map [Char] (Maybe NonLocalAttr)
_rhsIattrs Identifier
arg_name_ Bool
arg_pure_
_lhsOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsOmrules = (VisitKind -> Either Error PP_Doc)
-> Identifier -> Map Identifier (VisitKind -> Either Error PP_Doc)
forall a k. a -> k -> Map k a
rule351 VisitKind -> Either Error PP_Doc
_stepcode Identifier
arg_name_
_used :: Int
_used = Map Identifier Int -> Identifier -> Int
rule352 Map Identifier Int
_lhsIusageInfo Identifier
arg_name_
_kinds :: Set VisitKind
_kinds = Map Identifier (Set VisitKind) -> Identifier -> Set VisitKind
rule353 Map Identifier (Set VisitKind)
_lhsIruleKinds Identifier
arg_name_
_anyLazyKind :: Bool
_anyLazyKind = Set VisitKind -> Bool
rule354 Set VisitKind
_kinds
_lhsOruledefs :: Map Identifier (Set String)
_lhsOruledefs :: Map Identifier (Set [Char])
_lhsOruledefs = Set [Char] -> Identifier -> Map Identifier (Set [Char])
forall k. Set [Char] -> k -> Map k (Set [Char])
rule355 Set [Char]
_patternIattrs Identifier
arg_name_
_lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
_lhsOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses = Map [Char] (Maybe NonLocalAttr)
-> Identifier -> Map Identifier (Map [Char] (Maybe NonLocalAttr))
forall k.
Map [Char] (Maybe NonLocalAttr)
-> k -> Map k (Map [Char] (Maybe NonLocalAttr))
rule356 Map [Char] (Maybe NonLocalAttr)
_rhsIattrs Identifier
arg_name_
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Int -> Maybe Error -> Seq Error
forall a. Int -> Maybe a -> Seq a
rule357 Int
_used Maybe Error
arg_mbError_
_patternOallInhmap :: Map Identifier Attributes
_patternOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule358 Map Identifier Attributes
_lhsIallInhmap
_patternOallSynmap :: Map Identifier Attributes
_patternOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule359 Map Identifier Attributes
_lhsIallSynmap
_patternOanyLazyKind :: Bool
_patternOanyLazyKind = Bool -> Bool
forall a. a -> a
rule360 Bool
_anyLazyKind
_patternOinhmap :: Attributes
_patternOinhmap = Attributes -> Attributes
rule361 Attributes
_lhsIinhmap
_patternOlocalAttrTypes :: Attributes
_patternOlocalAttrTypes = Attributes -> Attributes
rule362 Attributes
_lhsIlocalAttrTypes
_patternOoptions :: Options
_patternOoptions = Options -> Options
rule363 Options
_lhsIoptions
_patternOsynmap :: Attributes
_patternOsynmap = Attributes -> Attributes
rule364 Attributes
_lhsIsynmap
_rhsOoptions :: Options
_rhsOoptions = Options -> Options
rule365 Options
_lhsIoptions
__result_ :: T_ERule_vOut19
__result_ = Seq Error
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> PP_Doc
-> T_ERule_vOut19
T_ERule_vOut19 Seq Error
_lhsOerrors Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set [Char])
_lhsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules
in T_ERule_vOut19
__result_ )
in T_ERule_v19 -> T_ERule_s20
C_ERule_s20 T_ERule_v19
v19
{-# INLINE rule341 #-}
{-# LINE 977 "src-ag/ExecutionPlan2Caml.ag" #-}
rule341 = \ _rulecode _used ->
{-# LINE 977 "src-ag/ExecutionPlan2Caml.ag" #-}
if _used == 0
then empty
else _rulecode
{-# LINE 2815 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule342 #-}
{-# LINE 980 "src-ag/ExecutionPlan2Caml.ag" #-}
rule342 = \ _declHead _endpragma _genpragma _pragma ((_rhsIpos) :: Pos) ((_rhsIsemfunc) :: PP_Doc) ->
{-# LINE 980 "src-ag/ExecutionPlan2Caml.ag" #-}
( if _genpragma
then _pragma
else empty
)
>-< _declHead
>-< indent ((column _rhsIpos - 2) `max` 2)
( if _genpragma
then _pragma >-< _rhsIsemfunc >-< _endpragma
else _rhsIsemfunc
)
>#< "in"
{-# LINE 2831 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule343 #-}
{-# LINE 993 "src-ag/ExecutionPlan2Caml.ag" #-}
rule343 = \ ((_lhsIoptions) :: Options) ((_rhsIpos) :: Pos) ->
{-# LINE 993 "src-ag/ExecutionPlan2Caml.ag" #-}
ppLinePragma _lhsIoptions (line _rhsIpos) (file _rhsIpos)
{-# LINE 2837 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule344 #-}
{-# LINE 994 "src-ag/ExecutionPlan2Caml.ag" #-}
rule344 = \ ((_lhsImainFile) :: String) ((_lhsIoptions) :: Options) ->
{-# LINE 994 "src-ag/ExecutionPlan2Caml.ag" #-}
ppWithLineNr (\ln -> ppLinePragma _lhsIoptions (ln+1) _lhsImainFile)
{-# LINE 2843 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule345 #-}
{-# LINE 995 "src-ag/ExecutionPlan2Caml.ag" #-}
rule345 = \ _haspos ((_lhsIoptions) :: Options) explicit_ ->
{-# LINE 995 "src-ag/ExecutionPlan2Caml.ag" #-}
genLinePragmas _lhsIoptions && explicit_ && _haspos
{-# LINE 2849 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule346 #-}
{-# LINE 996 "src-ag/ExecutionPlan2Caml.ag" #-}
rule346 = \ ((_rhsIpos) :: Pos) ->
{-# LINE 996 "src-ag/ExecutionPlan2Caml.ag" #-}
line _rhsIpos > 0 && column _rhsIpos >= 0 && not (null (file _rhsIpos))
{-# LINE 2855 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule347 #-}
{-# LINE 1000 "src-ag/ExecutionPlan2Caml.ag" #-}
rule347 = \ _argPats ((_lhsIoptions) :: Options) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ ->
{-# LINE 1000 "src-ag/ExecutionPlan2Caml.ag" #-}
"let" >#< name_ >#< _argPats >#< dummyPat _lhsIoptions (Map.null _rhsIattrs) >#< "="
{-# LINE 2861 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule348 #-}
{-# LINE 1002 "src-ag/ExecutionPlan2Caml.ag" #-}
rule348 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ((_lhsIallSynmap) :: Map NontermIdent Attributes) ((_lhsIchildTypes) :: Map Identifier Type) ((_lhsIlocalAttrTypes) :: Map Identifier Type) ((_lhsIoptions) :: Options) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->
{-# LINE 1002 "src-ag/ExecutionPlan2Caml.ag" #-}
ppSpaced
[ case mbAttr of
Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->
case Map.lookup nm _lhsIlocalAttrTypes of
Just tp -> pp_parens (strNm >#< ":" >#< ppTp tp)
Nothing -> pp strNm
Just attr | not (noPerStateTypeSigs _lhsIoptions) ->
case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes of
Just tpDoc -> pp_parens (strNm >#< ":" >#< tpDoc)
Nothing -> pp strNm
_ -> pp strNm
| (strNm, mbAttr) <- Map.assocs _rhsIattrs
]
{-# LINE 2879 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule349 #-}
{-# LINE 1016 "src-ag/ExecutionPlan2Caml.ag" #-}
rule349 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->
{-# LINE 1016 "src-ag/ExecutionPlan2Caml.ag" #-}
ppSpaced $ Map.keys _rhsIattrs
{-# LINE 2885 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule350 #-}
{-# LINE 1017 "src-ag/ExecutionPlan2Caml.ag" #-}
rule350 = \ _argExprs ((_lhsIoptions) :: Options) ((_patternIextraDefs) :: [(PP_Doc,PP_Doc)]) ((_patternIsem_lhs) :: PP_Doc ) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ pure_ ->
{-# LINE 1017 "src-ag/ExecutionPlan2Caml.ag" #-}
\kind ->
let mkBind (pat,expr) = "let" >#< pat >#< "=" >#< expr >#< "in"
in if kind `compatibleRule` pure_
then Right $ mkBind (_patternIsem_lhs, name_ >#< _argExprs >#< dummyArg _lhsIoptions (Map.null _rhsIattrs))
>-< vlist (map mkBind _patternIextraDefs)
else Left $ IncompatibleRuleKind name_ kind
{-# LINE 2896 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule351 #-}
{-# LINE 1024 "src-ag/ExecutionPlan2Caml.ag" #-}
rule351 = \ _stepcode name_ ->
{-# LINE 1024 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton name_ _stepcode
{-# LINE 2902 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule352 #-}
{-# LINE 1227 "src-ag/ExecutionPlan2Caml.ag" #-}
rule352 = \ ((_lhsIusageInfo) :: Map Identifier Int) name_ ->
{-# LINE 1227 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.findWithDefault 0 name_ _lhsIusageInfo
{-# LINE 2908 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule353 #-}
{-# LINE 1243 "src-ag/ExecutionPlan2Caml.ag" #-}
rule353 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) name_ ->
{-# LINE 1243 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.findWithDefault Set.empty name_ _lhsIruleKinds
{-# LINE 2914 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule354 #-}
{-# LINE 1244 "src-ag/ExecutionPlan2Caml.ag" #-}
rule354 = \ _kinds ->
{-# LINE 1244 "src-ag/ExecutionPlan2Caml.ag" #-}
Set.fold (\k r -> isLazyKind k || r) False _kinds
{-# LINE 2920 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule355 #-}
{-# LINE 1290 "src-ag/ExecutionPlan2Caml.ag" #-}
rule355 = \ ((_patternIattrs) :: Set String) name_ ->
{-# LINE 1290 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton name_ _patternIattrs
{-# LINE 2926 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule356 #-}
{-# LINE 1291 "src-ag/ExecutionPlan2Caml.ag" #-}
rule356 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ ->
{-# LINE 1291 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton name_ _rhsIattrs
{-# LINE 2932 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule357 #-}
{-# LINE 1485 "src-ag/ExecutionPlan2Caml.ag" #-}
rule357 = \ _used mbError_ ->
{-# LINE 1485 "src-ag/ExecutionPlan2Caml.ag" #-}
case mbError_ of
Just e | _used > 0 -> Seq.singleton e
_ -> Seq.empty
{-# LINE 2940 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule358 #-}
rule358 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule359 #-}
rule359 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule360 #-}
rule360 = \ _anyLazyKind ->
_anyLazyKind
{-# INLINE rule361 #-}
rule361 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule362 #-}
rule362 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->
_lhsIlocalAttrTypes
{-# INLINE rule363 #-}
rule363 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule364 #-}
rule364 = \ ((_lhsIsynmap) :: Attributes) ->
_lhsIsynmap
{-# INLINE rule365 #-}
rule365 = \ ((_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 -> Attributes
inhmap_Inh_ERules :: (Attributes), Inh_ERules -> Set [Char]
lazyIntras_Inh_ERules :: (Set String), Inh_ERules -> Attributes
localAttrTypes_Inh_ERules :: (Map Identifier Type), Inh_ERules -> [Char]
mainFile_Inh_ERules :: (String), Inh_ERules -> [Char]
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 -> 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 -> Either Error PP_Doc)
mrules_Syn_ERules :: (Map Identifier (VisitKind -> Either Error PP_Doc)), Syn_ERules -> Map Identifier (Set [Char])
ruledefs_Syn_ERules :: (Map Identifier (Set String)), Syn_ERules -> Map Identifier (Map [Char] (Maybe NonLocalAttr))
ruleuses_Syn_ERules :: (Map Identifier (Map String (Maybe NonLocalAttr))), Syn_ERules -> PP_Doc
sem_rules_Syn_ERules :: (PP_Doc) }
{-# 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 Attributes
_lhsIinhmap Set [Char]
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap 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
-> Attributes
-> Set [Char]
-> Attributes
-> [Char]
-> [Char]
-> Identifier
-> Options
-> Map Identifier (Set VisitKind)
-> Attributes
-> Map Identifier Int
-> T_ERules_vIn22
T_ERules_vIn22 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Identifier
_lhsIcon Attributes
_lhsIinhmap Set [Char]
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap Map Identifier Int
_lhsIusageInfo
(T_ERules_vOut22 Seq Error
_lhsOerrors Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set [Char])
_lhsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules) <- 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 -> Either Error PP_Doc)
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> PP_Doc
-> Syn_ERules
Syn_ERules Seq Error
_lhsOerrors Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set [Char])
_lhsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules)
)
{-# 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) (Attributes) (Set String) (Map Identifier Type) (String) (String) (NontermIdent) (Options) (Map Identifier (Set VisitKind)) (Attributes) (Map Identifier Int)
data T_ERules_vOut22 = T_ERules_vOut22 (Seq Error) (Map Identifier (VisitKind -> Either Error PP_Doc)) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (PP_Doc)
{-# 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 Attributes
_lhsIinhmap Set [Char]
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap 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 -> Either Error PP_Doc)
_hdImrules Map Identifier (Set [Char])
_hdIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_hdIruleuses PP_Doc
_hdIsem_rules) = T_ERule_s20 -> T_ERule_v19
inv_ERule_s20 T_ERule_s20
_hdX20 (Map Identifier Attributes
-> Map Identifier Attributes
-> Attributes
-> Identifier
-> Attributes
-> Set [Char]
-> Attributes
-> [Char]
-> [Char]
-> Identifier
-> Options
-> Map Identifier (Set VisitKind)
-> Attributes
-> Map Identifier Int
-> T_ERule_vIn19
T_ERule_vIn19 Map Identifier Attributes
_hdOallInhmap Map Identifier Attributes
_hdOallSynmap Attributes
_hdOchildTypes Identifier
_hdOcon Attributes
_hdOinhmap Set [Char]
_hdOlazyIntras Attributes
_hdOlocalAttrTypes [Char]
_hdOmainFile [Char]
_hdOmainName Identifier
_hdOnt Options
_hdOoptions Map Identifier (Set VisitKind)
_hdOruleKinds Attributes
_hdOsynmap Map Identifier Int
_hdOusageInfo)
(T_ERules_vOut22 Seq Error
_tlIerrors Map Identifier (VisitKind -> Either Error PP_Doc)
_tlImrules Map Identifier (Set [Char])
_tlIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_tlIruleuses PP_Doc
_tlIsem_rules) = T_ERules_s23 -> T_ERules_v22
inv_ERules_s23 T_ERules_s23
_tlX23 (Map Identifier Attributes
-> Map Identifier Attributes
-> Attributes
-> Identifier
-> Attributes
-> Set [Char]
-> Attributes
-> [Char]
-> [Char]
-> Identifier
-> Options
-> Map Identifier (Set VisitKind)
-> Attributes
-> Map Identifier Int
-> T_ERules_vIn22
T_ERules_vIn22 Map Identifier Attributes
_tlOallInhmap Map Identifier Attributes
_tlOallSynmap Attributes
_tlOchildTypes Identifier
_tlOcon Attributes
_tlOinhmap Set [Char]
_tlOlazyIntras Attributes
_tlOlocalAttrTypes [Char]
_tlOmainFile [Char]
_tlOmainName Identifier
_tlOnt Options
_tlOoptions Map Identifier (Set VisitKind)
_tlOruleKinds Attributes
_tlOsynmap Map Identifier Int
_tlOusageInfo)
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule366 Seq Error
_hdIerrors Seq Error
_tlIerrors
_lhsOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsOmrules = Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> Either Error PP_Doc)
rule367 Map Identifier (VisitKind -> Either Error PP_Doc)
_hdImrules Map Identifier (VisitKind -> Either Error PP_Doc)
_tlImrules
_lhsOruledefs :: Map Identifier (Set String)
_lhsOruledefs :: Map Identifier (Set [Char])
_lhsOruledefs = Map Identifier (Set [Char])
-> Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule368 Map Identifier (Set [Char])
_hdIruledefs Map Identifier (Set [Char])
_tlIruledefs
_lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
_lhsOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule369 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_hdIruleuses Map Identifier (Map [Char] (Maybe NonLocalAttr))
_tlIruleuses
_lhsOsem_rules :: PP_Doc
_lhsOsem_rules :: PP_Doc
_lhsOsem_rules = PP_Doc -> PP_Doc -> PP_Doc
rule370 PP_Doc
_hdIsem_rules PP_Doc
_tlIsem_rules
_hdOallInhmap :: Map Identifier Attributes
_hdOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule371 Map Identifier Attributes
_lhsIallInhmap
_hdOallSynmap :: Map Identifier Attributes
_hdOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule372 Map Identifier Attributes
_lhsIallSynmap
_hdOchildTypes :: Attributes
_hdOchildTypes = Attributes -> Attributes
rule373 Attributes
_lhsIchildTypes
_hdOcon :: Identifier
_hdOcon = Identifier -> Identifier
rule374 Identifier
_lhsIcon
_hdOinhmap :: Attributes
_hdOinhmap = Attributes -> Attributes
rule375 Attributes
_lhsIinhmap
_hdOlazyIntras :: Set [Char]
_hdOlazyIntras = Set [Char] -> Set [Char]
rule376 Set [Char]
_lhsIlazyIntras
_hdOlocalAttrTypes :: Attributes
_hdOlocalAttrTypes = Attributes -> Attributes
rule377 Attributes
_lhsIlocalAttrTypes
_hdOmainFile :: [Char]
_hdOmainFile = [Char] -> [Char]
rule378 [Char]
_lhsImainFile
_hdOmainName :: [Char]
_hdOmainName = [Char] -> [Char]
rule379 [Char]
_lhsImainName
_hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule380 Identifier
_lhsInt
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule381 Options
_lhsIoptions
_hdOruleKinds :: Map Identifier (Set VisitKind)
_hdOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule382 Map Identifier (Set VisitKind)
_lhsIruleKinds
_hdOsynmap :: Attributes
_hdOsynmap = Attributes -> Attributes
rule383 Attributes
_lhsIsynmap
_hdOusageInfo :: Map Identifier Int
_hdOusageInfo = Map Identifier Int -> Map Identifier Int
rule384 Map Identifier Int
_lhsIusageInfo
_tlOallInhmap :: Map Identifier Attributes
_tlOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule385 Map Identifier Attributes
_lhsIallInhmap
_tlOallSynmap :: Map Identifier Attributes
_tlOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule386 Map Identifier Attributes
_lhsIallSynmap
_tlOchildTypes :: Attributes
_tlOchildTypes = Attributes -> Attributes
rule387 Attributes
_lhsIchildTypes
_tlOcon :: Identifier
_tlOcon = Identifier -> Identifier
rule388 Identifier
_lhsIcon
_tlOinhmap :: Attributes
_tlOinhmap = Attributes -> Attributes
rule389 Attributes
_lhsIinhmap
_tlOlazyIntras :: Set [Char]
_tlOlazyIntras = Set [Char] -> Set [Char]
rule390 Set [Char]
_lhsIlazyIntras
_tlOlocalAttrTypes :: Attributes
_tlOlocalAttrTypes = Attributes -> Attributes
rule391 Attributes
_lhsIlocalAttrTypes
_tlOmainFile :: [Char]
_tlOmainFile = [Char] -> [Char]
rule392 [Char]
_lhsImainFile
_tlOmainName :: [Char]
_tlOmainName = [Char] -> [Char]
rule393 [Char]
_lhsImainName
_tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule394 Identifier
_lhsInt
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule395 Options
_lhsIoptions
_tlOruleKinds :: Map Identifier (Set VisitKind)
_tlOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule396 Map Identifier (Set VisitKind)
_lhsIruleKinds
_tlOsynmap :: Attributes
_tlOsynmap = Attributes -> Attributes
rule397 Attributes
_lhsIsynmap
_tlOusageInfo :: Map Identifier Int
_tlOusageInfo = Map Identifier Int -> Map Identifier Int
rule398 Map Identifier Int
_lhsIusageInfo
__result_ :: T_ERules_vOut22
__result_ = Seq Error
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> PP_Doc
-> T_ERules_vOut22
T_ERules_vOut22 Seq Error
_lhsOerrors Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set [Char])
_lhsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules
in T_ERules_vOut22
__result_ )
in T_ERules_v22 -> T_ERules_s23
C_ERules_s23 T_ERules_v22
v22
{-# INLINE rule366 #-}
rule366 :: Seq Error -> Seq Error -> Seq Error
rule366 = \ ((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 rule367 #-}
rule367 :: Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> Either Error PP_Doc)
rule367 = \ ((Map Identifier (VisitKind -> Either Error PP_Doc)
_hdImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ((Map Identifier (VisitKind -> Either Error PP_Doc)
_tlImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->
Map Identifier (VisitKind -> Either Error PP_Doc)
_hdImrules Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> Either Error PP_Doc)
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map Identifier (VisitKind -> Either Error PP_Doc)
_tlImrules
{-# INLINE rule368 #-}
rule368 :: Map Identifier (Set [Char])
-> Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule368 = \ ((Map Identifier (Set [Char])
_hdIruledefs) :: Map Identifier (Set String)) ((Map Identifier (Set [Char])
_tlIruledefs) :: Map Identifier (Set String)) ->
Map Identifier (Set [Char])
_hdIruledefs Map Identifier (Set [Char])
-> Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
forall a b.
(Ord a, Ord b) =>
Map a (Set b) -> Map a (Set b) -> Map a (Set b)
`uwSetUnion` Map Identifier (Set [Char])
_tlIruledefs
{-# INLINE rule369 #-}
rule369 :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule369 = \ ((Map Identifier (Map [Char] (Maybe NonLocalAttr))
_hdIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ((Map Identifier (Map [Char] (Maybe NonLocalAttr))
_tlIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
Map Identifier (Map [Char] (Maybe NonLocalAttr))
_hdIruleuses Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (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 [Char] (Maybe NonLocalAttr))
_tlIruleuses
{-# INLINE rule370 #-}
rule370 :: PP_Doc -> PP_Doc -> PP_Doc
rule370 = \ ((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 rule371 #-}
rule371 :: Map Identifier Attributes -> Map Identifier Attributes
rule371 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallInhmap
{-# INLINE rule372 #-}
rule372 :: Map Identifier Attributes -> Map Identifier Attributes
rule372 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallSynmap
{-# INLINE rule373 #-}
rule373 :: Attributes -> Attributes
rule373 = \ ((Attributes
_lhsIchildTypes) :: Map Identifier Type) ->
Attributes
_lhsIchildTypes
{-# INLINE rule374 #-}
rule374 :: Identifier -> Identifier
rule374 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
Identifier
_lhsIcon
{-# INLINE rule375 #-}
rule375 :: Attributes -> Attributes
rule375 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
Attributes
_lhsIinhmap
{-# INLINE rule376 #-}
rule376 :: Set [Char] -> Set [Char]
rule376 = \ ((Set [Char]
_lhsIlazyIntras) :: Set String) ->
Set [Char]
_lhsIlazyIntras
{-# INLINE rule377 #-}
rule377 :: Attributes -> Attributes
rule377 = \ ((Attributes
_lhsIlocalAttrTypes) :: Map Identifier Type) ->
Attributes
_lhsIlocalAttrTypes
{-# INLINE rule378 #-}
rule378 :: [Char] -> [Char]
rule378 = \ (([Char]
_lhsImainFile) :: String) ->
[Char]
_lhsImainFile
{-# INLINE rule379 #-}
rule379 :: [Char] -> [Char]
rule379 = \ (([Char]
_lhsImainName) :: String) ->
[Char]
_lhsImainName
{-# INLINE rule380 #-}
rule380 :: Identifier -> Identifier
rule380 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
Identifier
_lhsInt
{-# INLINE rule381 #-}
rule381 :: Options -> Options
rule381 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule382 #-}
rule382 :: Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule382 = \ ((Map Identifier (Set VisitKind)
_lhsIruleKinds) :: Map Identifier (Set VisitKind)) ->
Map Identifier (Set VisitKind)
_lhsIruleKinds
{-# INLINE rule383 #-}
rule383 :: Attributes -> Attributes
rule383 = \ ((Attributes
_lhsIsynmap) :: Attributes) ->
Attributes
_lhsIsynmap
{-# INLINE rule384 #-}
rule384 :: Map Identifier Int -> Map Identifier Int
rule384 = \ ((Map Identifier Int
_lhsIusageInfo) :: Map Identifier Int) ->
Map Identifier Int
_lhsIusageInfo
{-# INLINE rule385 #-}
rule385 :: Map Identifier Attributes -> Map Identifier Attributes
rule385 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallInhmap
{-# INLINE rule386 #-}
rule386 :: Map Identifier Attributes -> Map Identifier Attributes
rule386 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallSynmap
{-# INLINE rule387 #-}
rule387 :: Attributes -> Attributes
rule387 = \ ((Attributes
_lhsIchildTypes) :: Map Identifier Type) ->
Attributes
_lhsIchildTypes
{-# INLINE rule388 #-}
rule388 :: Identifier -> Identifier
rule388 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
Identifier
_lhsIcon
{-# INLINE rule389 #-}
rule389 :: Attributes -> Attributes
rule389 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
Attributes
_lhsIinhmap
{-# INLINE rule390 #-}
rule390 :: Set [Char] -> Set [Char]
rule390 = \ ((Set [Char]
_lhsIlazyIntras) :: Set String) ->
Set [Char]
_lhsIlazyIntras
{-# INLINE rule391 #-}
rule391 :: Attributes -> Attributes
rule391 = \ ((Attributes
_lhsIlocalAttrTypes) :: Map Identifier Type) ->
Attributes
_lhsIlocalAttrTypes
{-# INLINE rule392 #-}
rule392 :: [Char] -> [Char]
rule392 = \ (([Char]
_lhsImainFile) :: String) ->
[Char]
_lhsImainFile
{-# INLINE rule393 #-}
rule393 :: [Char] -> [Char]
rule393 = \ (([Char]
_lhsImainName) :: String) ->
[Char]
_lhsImainName
{-# INLINE rule394 #-}
rule394 :: Identifier -> Identifier
rule394 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
Identifier
_lhsInt
{-# INLINE rule395 #-}
rule395 :: Options -> Options
rule395 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule396 #-}
rule396 :: Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule396 = \ ((Map Identifier (Set VisitKind)
_lhsIruleKinds) :: Map Identifier (Set VisitKind)) ->
Map Identifier (Set VisitKind)
_lhsIruleKinds
{-# INLINE rule397 #-}
rule397 :: Attributes -> Attributes
rule397 = \ ((Attributes
_lhsIsynmap) :: Attributes) ->
Attributes
_lhsIsynmap
{-# INLINE rule398 #-}
rule398 :: Map Identifier Int -> Map Identifier Int
rule398 = \ ((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 Attributes
_lhsIinhmap Set [Char]
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Identifier
_lhsInt Options
_lhsIoptions Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap Map Identifier Int
_lhsIusageInfo) -> ( let
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule399 ()
_lhsOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsOmrules = () -> Map Identifier (VisitKind -> Either Error PP_Doc)
forall k a. () -> Map k a
rule400 ()
_lhsOruledefs :: Map Identifier (Set String)
_lhsOruledefs :: Map Identifier (Set [Char])
_lhsOruledefs = () -> Map Identifier (Set [Char])
forall k a. () -> Map k a
rule401 ()
_lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
_lhsOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses = () -> Map Identifier (Map [Char] (Maybe NonLocalAttr))
forall k a. () -> Map k a
rule402 ()
_lhsOsem_rules :: PP_Doc
_lhsOsem_rules :: PP_Doc
_lhsOsem_rules = () -> PP_Doc
rule403 ()
__result_ :: T_ERules_vOut22
__result_ = Seq Error
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> PP_Doc
-> T_ERules_vOut22
T_ERules_vOut22 Seq Error
_lhsOerrors Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set [Char])
_lhsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules
in T_ERules_vOut22
__result_ )
in T_ERules_v22 -> T_ERules_s23
C_ERules_s23 T_ERules_v22
v22
{-# INLINE rule399 #-}
rule399 :: () -> Seq a
rule399 = \ (()
_ :: ()) ->
Seq a
forall a. Seq a
Seq.empty
{-# INLINE rule400 #-}
rule400 :: () -> Map k a
rule400 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule401 #-}
rule401 :: () -> Map k a
rule401 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule402 #-}
rule402 :: () -> Map k a
rule402 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule403 #-}
rule403 :: () -> PP_Doc
rule403 = \ (()
_ :: ()) ->
PP_Doc
empty
data Inh_ExecutionPlan = Inh_ExecutionPlan { 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 -> [Char]
mainFile_Inh_ExecutionPlan :: (String), Inh_ExecutionPlan -> [Char]
mainName_Inh_ExecutionPlan :: (String), Inh_ExecutionPlan -> Options
options_Inh_ExecutionPlan :: (Options), Inh_ExecutionPlan -> Map Identifier Attributes
synmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes) }
data Syn_ExecutionPlan = Syn_ExecutionPlan { Syn_ExecutionPlan -> PP_Doc
code_Syn_ExecutionPlan :: (PP_Doc), Syn_ExecutionPlan -> PP_Doc
datas_Syn_ExecutionPlan :: (PP_Doc), Syn_ExecutionPlan -> Seq Error
errors_Syn_ExecutionPlan :: (Seq Error), Syn_ExecutionPlan -> PP_Doc
modules_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 Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap) =
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 Attributes
-> Map Identifier (Map Identifier Attributes)
-> [Char]
-> [Char]
-> Options
-> Map Identifier Attributes
-> T_ExecutionPlan_vIn25
T_ExecutionPlan_vIn25 Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap
(T_ExecutionPlan_vOut25 PP_Doc
_lhsOcode PP_Doc
_lhsOdatas Seq Error
_lhsOerrors PP_Doc
_lhsOmodules) <- 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 (PP_Doc -> PP_Doc -> Seq Error -> PP_Doc -> Syn_ExecutionPlan
Syn_ExecutionPlan PP_Doc
_lhsOcode PP_Doc
_lhsOdatas Seq Error
_lhsOerrors PP_Doc
_lhsOmodules)
)
{-# 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 Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (Options) (Map NontermIdent Attributes)
data T_ExecutionPlan_vOut25 = T_ExecutionPlan_vOut25 (PP_Doc) (PP_Doc) (Seq Error) (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
_ = 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 Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName Options
_lhsIoptions Map Identifier Attributes
_lhsIsynmap) -> ( 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 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_nontsIchildvisit PP_Doc
_nontsIcode PP_Doc
_nontsIdatas Seq Error
_nontsIerrors Map Int (Int, Int)
_nontsIfromToStates Map Identifier Int
_nontsIinitStates PP_Doc
_nontsImodules 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> [Char]
-> [Char]
-> Options
-> Map Identifier Attributes
-> 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_nontsOallchildvisit Map Int (Set Identifier)
_nontsOavisitdefs Map Int (Set Identifier)
_nontsOavisituses Map Identifier Attributes
_nontsOinhmap Map Identifier (Map Identifier Attributes)
_nontsOlocalAttrTypes [Char]
_nontsOmainFile [Char]
_nontsOmainName Options
_nontsOoptions Map Identifier Attributes
_nontsOsynmap TypeSyns
_nontsOtypeSyns Set Identifier
_nontsOwrappers)
_lhsOcode :: PP_Doc
_lhsOcode :: PP_Doc
_lhsOcode = PP_Doc -> PP_Doc -> PP_Doc
rule404 PP_Doc
_nontsIcode PP_Doc
_wrappersExtra
_lhsOdatas :: PP_Doc
_lhsOdatas :: PP_Doc
_lhsOdatas = PP_Doc -> PP_Doc -> PP_Doc
rule405 PP_Doc
_commonExtra PP_Doc
_nontsIdatas
_nontsOwrappers :: Set Identifier
_nontsOwrappers = Set Identifier -> Set Identifier
forall a. a -> a
rule406 Set Identifier
arg_wrappers_
_nontsOtypeSyns :: TypeSyns
_nontsOtypeSyns = TypeSyns -> TypeSyns
forall a. a -> a
rule407 TypeSyns
arg_typeSyns_
_wrappersExtra :: PP_Doc
_wrappersExtra = PP_Doc -> Options -> PP_Doc
rule408 PP_Doc
_lateSemBndDef Options
_lhsIoptions
_commonExtra :: PP_Doc
_commonExtra = PP_Doc -> Options -> PP_Doc
rule409 PP_Doc
_lateSemBndTp Options
_lhsIoptions
_lateSemBndTp :: PP_Doc
_lateSemBndTp = [Char] -> Seq PP_Doc -> PP_Doc
rule410 [Char]
_lhsImainName Seq PP_Doc
_nontsIsemFunBndTps
_lateSemBndDef :: PP_Doc
_lateSemBndDef = [Char] -> Seq PP_Doc -> PP_Doc
rule411 [Char]
_lhsImainName Seq PP_Doc
_nontsIsemFunBndDefs
_nontsOallchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_nontsOallchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule412 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_nontsIchildvisit
_nontsOavisitdefs :: Map Int (Set Identifier)
_nontsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule413 Map Int (Set Identifier)
_nontsIvisitdefs
_nontsOavisituses :: Map Int (Set Identifier)
_nontsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule414 Map Int (Set Identifier)
_nontsIvisituses
_nontsOallFromToStates :: Map Int (Int, Int)
_nontsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule415 Map Int (Int, Int)
_nontsIfromToStates
_nontsOallVisitKinds :: Map Int VisitKind
_nontsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule416 Map Int VisitKind
_nontsIvisitKinds
_nontsOallInitStates :: Map Identifier Int
_nontsOallInitStates = Map Identifier Int -> Map Identifier Int
rule417 Map Identifier Int
_nontsIinitStates
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule418 Seq Error
_nontsIerrors
_lhsOmodules :: PP_Doc
_lhsOmodules :: PP_Doc
_lhsOmodules = PP_Doc -> PP_Doc
rule419 PP_Doc
_nontsImodules
_nontsOinhmap :: Map Identifier Attributes
_nontsOinhmap = Map Identifier Attributes -> Map Identifier Attributes
rule420 Map Identifier Attributes
_lhsIinhmap
_nontsOlocalAttrTypes :: Map Identifier (Map Identifier Attributes)
_nontsOlocalAttrTypes = Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule421 Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes
_nontsOmainFile :: [Char]
_nontsOmainFile = [Char] -> [Char]
rule422 [Char]
_lhsImainFile
_nontsOmainName :: [Char]
_nontsOmainName = [Char] -> [Char]
rule423 [Char]
_lhsImainName
_nontsOoptions :: Options
_nontsOoptions = Options -> Options
rule424 Options
_lhsIoptions
_nontsOsynmap :: Map Identifier Attributes
_nontsOsynmap = Map Identifier Attributes -> Map Identifier Attributes
rule425 Map Identifier Attributes
_lhsIsynmap
__result_ :: T_ExecutionPlan_vOut25
__result_ = PP_Doc -> PP_Doc -> Seq Error -> PP_Doc -> T_ExecutionPlan_vOut25
T_ExecutionPlan_vOut25 PP_Doc
_lhsOcode PP_Doc
_lhsOdatas Seq Error
_lhsOerrors PP_Doc
_lhsOmodules
in T_ExecutionPlan_vOut25
__result_ )
in T_ExecutionPlan_v25 -> T_ExecutionPlan_s26
C_ExecutionPlan_s26 T_ExecutionPlan_v25
v25
{-# INLINE rule404 #-}
{-# LINE 105 "src-ag/ExecutionPlan2Caml.ag" #-}
rule404 = \ ((_nontsIcode) :: PP_Doc) _wrappersExtra ->
{-# LINE 105 "src-ag/ExecutionPlan2Caml.ag" #-}
_nontsIcode >-< _wrappersExtra
{-# LINE 3256 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule405 #-}
{-# LINE 106 "src-ag/ExecutionPlan2Caml.ag" #-}
rule405 = \ _commonExtra ((_nontsIdatas) :: PP_Doc) ->
{-# LINE 106 "src-ag/ExecutionPlan2Caml.ag" #-}
_nontsIdatas >-< _commonExtra
{-# LINE 3262 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule406 #-}
{-# LINE 112 "src-ag/ExecutionPlan2Caml.ag" #-}
rule406 = \ wrappers_ ->
{-# LINE 112 "src-ag/ExecutionPlan2Caml.ag" #-}
wrappers_
{-# LINE 3268 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule407 #-}
{-# LINE 173 "src-ag/ExecutionPlan2Caml.ag" #-}
rule407 = \ typeSyns_ ->
{-# LINE 173 "src-ag/ExecutionPlan2Caml.ag" #-}
typeSyns_
{-# LINE 3274 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule408 #-}
{-# LINE 663 "src-ag/ExecutionPlan2Caml.ag" #-}
rule408 = \ _lateSemBndDef ((_lhsIoptions) :: Options) ->
{-# LINE 663 "src-ag/ExecutionPlan2Caml.ag" #-}
if lateHigherOrderBinding _lhsIoptions
then _lateSemBndDef
else empty
{-# LINE 3282 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule409 #-}
{-# LINE 666 "src-ag/ExecutionPlan2Caml.ag" #-}
rule409 = \ _lateSemBndTp ((_lhsIoptions) :: Options) ->
{-# LINE 666 "src-ag/ExecutionPlan2Caml.ag" #-}
if lateHigherOrderBinding _lhsIoptions
then _lateSemBndTp
else empty
{-# LINE 3290 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule410 #-}
{-# LINE 669 "src-ag/ExecutionPlan2Caml.ag" #-}
rule410 = \ ((_lhsImainName) :: String) ((_nontsIsemFunBndTps) :: Seq PP_Doc) ->
{-# LINE 669 "src-ag/ExecutionPlan2Caml.ag" #-}
"and" >#< lateBindingTypeNm _lhsImainName >#< "=" >#< ppRecordTp (toList _nontsIsemFunBndTps)
{-# LINE 3296 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule411 #-}
{-# LINE 670 "src-ag/ExecutionPlan2Caml.ag" #-}
rule411 = \ ((_lhsImainName) :: String) ((_nontsIsemFunBndDefs) :: Seq PP_Doc) ->
{-# LINE 670 "src-ag/ExecutionPlan2Caml.ag" #-}
"and" >#< lateBindingFieldNm _lhsImainName >#< ":" >#< lateBindingTypeNm _lhsImainName >#< "="
>-< (indent 2 $ ppRecordVal $ toList _nontsIsemFunBndDefs)
{-# LINE 3303 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule412 #-}
{-# LINE 1157 "src-ag/ExecutionPlan2Caml.ag" #-}
rule412 = \ ((_nontsIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
{-# LINE 1157 "src-ag/ExecutionPlan2Caml.ag" #-}
_nontsIchildvisit
{-# LINE 3309 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule413 #-}
{-# LINE 1315 "src-ag/ExecutionPlan2Caml.ag" #-}
rule413 = \ ((_nontsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
{-# LINE 1315 "src-ag/ExecutionPlan2Caml.ag" #-}
_nontsIvisitdefs
{-# LINE 3315 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule414 #-}
{-# LINE 1316 "src-ag/ExecutionPlan2Caml.ag" #-}
rule414 = \ ((_nontsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->
{-# LINE 1316 "src-ag/ExecutionPlan2Caml.ag" #-}
_nontsIvisituses
{-# LINE 3321 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule415 #-}
{-# LINE 1407 "src-ag/ExecutionPlan2Caml.ag" #-}
rule415 = \ ((_nontsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->
{-# LINE 1407 "src-ag/ExecutionPlan2Caml.ag" #-}
_nontsIfromToStates
{-# LINE 3327 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule416 #-}
{-# LINE 1451 "src-ag/ExecutionPlan2Caml.ag" #-}
rule416 = \ ((_nontsIvisitKinds) :: Map VisitIdentifier VisitKind) ->
{-# LINE 1451 "src-ag/ExecutionPlan2Caml.ag" #-}
_nontsIvisitKinds
{-# LINE 3333 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule417 #-}
{-# LINE 1465 "src-ag/ExecutionPlan2Caml.ag" #-}
rule417 = \ ((_nontsIinitStates) :: Map NontermIdent Int) ->
{-# LINE 1465 "src-ag/ExecutionPlan2Caml.ag" #-}
_nontsIinitStates
{-# LINE 3339 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule418 #-}
rule418 = \ ((_nontsIerrors) :: Seq Error) ->
_nontsIerrors
{-# INLINE rule419 #-}
rule419 = \ ((_nontsImodules) :: PP_Doc) ->
_nontsImodules
{-# INLINE rule420 #-}
rule420 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->
_lhsIinhmap
{-# INLINE rule421 #-}
rule421 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->
_lhsIlocalAttrTypes
{-# INLINE rule422 #-}
rule422 = \ ((_lhsImainFile) :: String) ->
_lhsImainFile
{-# INLINE rule423 #-}
rule423 = \ ((_lhsImainName) :: String) ->
_lhsImainName
{-# INLINE rule424 #-}
rule424 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule425 #-}
rule425 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->
_lhsIsynmap
data Inh_Expression = Inh_Expression { Inh_Expression -> Options
options_Inh_Expression :: (Options) }
data Syn_Expression = Syn_Expression { Syn_Expression -> Map [Char] (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 [Char] (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 [Char] (Maybe NonLocalAttr)
-> Pos -> PP_Doc -> [HsToken] -> Syn_Expression
Syn_Expression Map [Char] (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
rule426 [HsToken]
arg_tks_
_lhsOpos :: Pos
_lhsOpos :: Pos
_lhsOpos = Pos -> Pos
forall a. a -> a
rule427 Pos
arg_pos_
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs :: Map [Char] (Maybe NonLocalAttr)
_lhsOattrs = Inh_HsToken -> [HsToken] -> Map [Char] (Maybe NonLocalAttr)
rule428 Inh_HsToken
_inhhstoken [HsToken]
arg_tks_
_lhsOsemfunc :: PP_Doc
_lhsOsemfunc :: PP_Doc
_lhsOsemfunc = Inh_HsToken -> [HsToken] -> PP_Doc
rule429 Inh_HsToken
_inhhstoken [HsToken]
arg_tks_
_inhhstoken :: Inh_HsToken
_inhhstoken = Options -> Inh_HsToken
rule430 Options
_lhsIoptions
__result_ :: T_Expression_vOut28
__result_ = Map [Char] (Maybe NonLocalAttr)
-> Pos -> PP_Doc -> [HsToken] -> T_Expression_vOut28
T_Expression_vOut28 Map [Char] (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 rule426 #-}
{-# LINE 1028 "src-ag/ExecutionPlan2Caml.ag" #-}
rule426 = \ tks_ ->
{-# LINE 1028 "src-ag/ExecutionPlan2Caml.ag" #-}
tks_
{-# LINE 3419 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule427 #-}
{-# LINE 1049 "src-ag/ExecutionPlan2Caml.ag" #-}
rule427 = \ pos_ ->
{-# LINE 1049 "src-ag/ExecutionPlan2Caml.ag" #-}
pos_
{-# LINE 3425 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule428 #-}
{-# LINE 1141 "src-ag/ExecutionPlan2Caml.ag" #-}
rule428 = \ _inhhstoken tks_ ->
{-# LINE 1141 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.unions $ map (\tok -> attrs_Syn_HsToken (wrap_HsToken (sem_HsToken tok) _inhhstoken )) tks_
{-# LINE 3431 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule429 #-}
{-# LINE 1142 "src-ag/ExecutionPlan2Caml.ag" #-}
rule429 = \ _inhhstoken tks_ ->
{-# LINE 1142 "src-ag/ExecutionPlan2Caml.ag" #-}
vlist $ showTokens $ map (\tok -> tok_Syn_HsToken (wrap_HsToken (sem_HsToken tok) _inhhstoken )) tks_
{-# LINE 3437 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule430 #-}
{-# LINE 1143 "src-ag/ExecutionPlan2Caml.ag" #-}
rule430 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 1143 "src-ag/ExecutionPlan2Caml.ag" #-}
Inh_HsToken _lhsIoptions
{-# LINE 3443 "src-generated/ExecutionPlan2Caml.hs" #-}
data Inh_HsToken = Inh_HsToken { Inh_HsToken -> Options
options_Inh_HsToken :: (Options) }
data Syn_HsToken = Syn_HsToken { Syn_HsToken -> Map [Char] (Maybe NonLocalAttr)
attrs_Syn_HsToken :: (Map String (Maybe NonLocalAttr)), Syn_HsToken -> (Pos, [Char])
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 [Char] (Maybe NonLocalAttr)
_lhsOattrs (Pos, [Char])
_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 [Char] (Maybe NonLocalAttr) -> (Pos, [Char]) -> Syn_HsToken
Syn_HsToken Map [Char] (Maybe NonLocalAttr)
_lhsOattrs (Pos, [Char])
_lhsOtok)
)
{-# NOINLINE sem_HsToken #-}
sem_HsToken :: HsToken -> T_HsToken
sem_HsToken :: HsToken -> T_HsToken
sem_HsToken ( AGLocal Identifier
var_ Pos
pos_ Maybe [Char]
rdesc_ ) = Identifier -> Pos -> Maybe [Char] -> T_HsToken
sem_HsToken_AGLocal Identifier
var_ Pos
pos_ Maybe [Char]
rdesc_
sem_HsToken ( AGField Identifier
field_ Identifier
attr_ Pos
pos_ Maybe [Char]
rdesc_ ) = Identifier -> Identifier -> Pos -> Maybe [Char] -> T_HsToken
sem_HsToken_AGField Identifier
field_ Identifier
attr_ Pos
pos_ Maybe [Char]
rdesc_
sem_HsToken ( HsToken [Char]
value_ Pos
pos_ ) = [Char] -> Pos -> T_HsToken
sem_HsToken_HsToken [Char]
value_ Pos
pos_
sem_HsToken ( CharToken [Char]
value_ Pos
pos_ ) = [Char] -> Pos -> T_HsToken
sem_HsToken_CharToken [Char]
value_ Pos
pos_
sem_HsToken ( StrToken [Char]
value_ Pos
pos_ ) = [Char] -> Pos -> T_HsToken
sem_HsToken_StrToken [Char]
value_ Pos
pos_
sem_HsToken ( Err [Char]
mesg_ Pos
pos_ ) = [Char] -> Pos -> T_HsToken
sem_HsToken_Err [Char]
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 [Char] -> T_HsToken
sem_HsToken_AGLocal Identifier
arg_var_ Pos
arg_pos_ Maybe [Char]
_ = 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 [Char] (Maybe NonLocalAttr)
_lhsOattrs = Identifier -> Map [Char] (Maybe NonLocalAttr)
forall a. Identifier -> Map [Char] (Maybe a)
rule431 Identifier
arg_var_
_tok :: (Pos, [Char])
_tok = Pos -> Identifier -> (Pos, [Char])
forall a. a -> Identifier -> (a, [Char])
rule432 Pos
arg_pos_ Identifier
arg_var_
_lhsOtok :: (Pos,String)
_lhsOtok :: (Pos, [Char])
_lhsOtok = (Pos, [Char]) -> (Pos, [Char])
forall a. a -> a
rule433 (Pos, [Char])
_tok
__result_ :: T_HsToken_vOut31
__result_ = Map [Char] (Maybe NonLocalAttr)
-> (Pos, [Char]) -> T_HsToken_vOut31
T_HsToken_vOut31 Map [Char] (Maybe NonLocalAttr)
_lhsOattrs (Pos, [Char])
_lhsOtok
in T_HsToken_vOut31
__result_ )
in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
{-# INLINE rule431 #-}
{-# LINE 1100 "src-ag/ExecutionPlan2Caml.ag" #-}
rule431 = \ var_ ->
{-# LINE 1100 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton (fieldname var_) Nothing
{-# LINE 3500 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule432 #-}
{-# LINE 1363 "src-ag/ExecutionPlan2Caml.ag" #-}
rule432 = \ pos_ var_ ->
{-# LINE 1363 "src-ag/ExecutionPlan2Caml.ag" #-}
(pos_,fieldname var_)
{-# LINE 3506 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule433 #-}
rule433 = \ _tok ->
_tok
{-# NOINLINE sem_HsToken_AGField #-}
sem_HsToken_AGField :: (Identifier) -> (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken
sem_HsToken_AGField :: Identifier -> Identifier -> Pos -> Maybe [Char] -> T_HsToken
sem_HsToken_AGField Identifier
arg_field_ Identifier
arg_attr_ Pos
arg_pos_ Maybe [Char]
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
rule434 Identifier
arg_attr_ Identifier
arg_field_
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs :: Map [Char] (Maybe NonLocalAttr)
_lhsOattrs = Options
-> Maybe NonLocalAttr
-> Identifier
-> Identifier
-> Map [Char] (Maybe NonLocalAttr)
forall a. Options -> a -> Identifier -> Identifier -> Map [Char] a
rule435 Options
_lhsIoptions Maybe NonLocalAttr
_mbAttr Identifier
arg_attr_ Identifier
arg_field_
_addTrace :: [Char] -> [Char]
_addTrace = Identifier -> Identifier -> Maybe [Char] -> [Char] -> [Char]
rule436 Identifier
arg_attr_ Identifier
arg_field_ Maybe [Char]
arg_rdesc_
_lhsOtok :: (Pos,String)
_lhsOtok :: (Pos, [Char])
_lhsOtok = ([Char] -> [Char])
-> Options -> Identifier -> Identifier -> Pos -> (Pos, [Char])
forall b a.
([Char] -> b) -> Options -> Identifier -> Identifier -> a -> (a, b)
rule437 [Char] -> [Char]
_addTrace Options
_lhsIoptions Identifier
arg_attr_ Identifier
arg_field_ Pos
arg_pos_
__result_ :: T_HsToken_vOut31
__result_ = Map [Char] (Maybe NonLocalAttr)
-> (Pos, [Char]) -> T_HsToken_vOut31
T_HsToken_vOut31 Map [Char] (Maybe NonLocalAttr)
_lhsOattrs (Pos, [Char])
_lhsOtok
in T_HsToken_vOut31
__result_ )
in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
{-# INLINE rule434 #-}
{-# LINE 1101 "src-ag/ExecutionPlan2Caml.ag" #-}
rule434 = \ attr_ field_ ->
{-# LINE 1101 "src-ag/ExecutionPlan2Caml.ag" #-}
if field_ == _INST || field_ == _FIELD || field_ == _INST'
then Nothing
else Just $ mkNonLocalAttr (field_ == _LHS) field_ attr_
{-# LINE 3533 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule435 #-}
{-# LINE 1104 "src-ag/ExecutionPlan2Caml.ag" #-}
rule435 = \ ((_lhsIoptions) :: Options) _mbAttr attr_ field_ ->
{-# LINE 1104 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton (attrname _lhsIoptions True field_ attr_) _mbAttr
{-# LINE 3539 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule436 #-}
{-# LINE 1367 "src-ag/ExecutionPlan2Caml.ag" #-}
rule436 = \ attr_ field_ rdesc_ ->
{-# LINE 1367 "src-ag/ExecutionPlan2Caml.ag" #-}
case rdesc_ of
Just d -> \x -> "(prerr_endline " ++ show (d ++ " -> " ++ show field_ ++ "." ++ show attr_) ++ "; " ++ x ++ ")"
Nothing -> id
{-# LINE 3547 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule437 #-}
{-# LINE 1370 "src-ag/ExecutionPlan2Caml.ag" #-}
rule437 = \ _addTrace ((_lhsIoptions) :: Options) attr_ field_ pos_ ->
{-# LINE 1370 "src-ag/ExecutionPlan2Caml.ag" #-}
(pos_, _addTrace $ attrname _lhsIoptions True field_ attr_)
{-# LINE 3553 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# NOINLINE sem_HsToken_HsToken #-}
sem_HsToken_HsToken :: (String) -> (Pos) -> T_HsToken
sem_HsToken_HsToken :: [Char] -> Pos -> T_HsToken
sem_HsToken_HsToken [Char]
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, [Char])
_lhsOtok = Pos -> [Char] -> (Pos, [Char])
forall a b. a -> b -> (a, b)
rule438 Pos
arg_pos_ [Char]
arg_value_
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs :: Map [Char] (Maybe NonLocalAttr)
_lhsOattrs = () -> Map [Char] (Maybe NonLocalAttr)
forall k a. () -> Map k a
rule439 ()
__result_ :: T_HsToken_vOut31
__result_ = Map [Char] (Maybe NonLocalAttr)
-> (Pos, [Char]) -> T_HsToken_vOut31
T_HsToken_vOut31 Map [Char] (Maybe NonLocalAttr)
_lhsOattrs (Pos, [Char])
_lhsOtok
in T_HsToken_vOut31
__result_ )
in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
{-# INLINE rule438 #-}
{-# LINE 1372 "src-ag/ExecutionPlan2Caml.ag" #-}
rule438 = \ pos_ value_ ->
{-# LINE 1372 "src-ag/ExecutionPlan2Caml.ag" #-}
(pos_, value_)
{-# LINE 3573 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule439 #-}
rule439 = \ (_ :: ()) ->
Map.empty
{-# NOINLINE sem_HsToken_CharToken #-}
sem_HsToken_CharToken :: (String) -> (Pos) -> T_HsToken
sem_HsToken_CharToken :: [Char] -> Pos -> T_HsToken
sem_HsToken_CharToken [Char]
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, [Char])
_lhsOtok = Pos -> [Char] -> (Pos, [Char])
forall a. a -> [Char] -> (a, [Char])
rule440 Pos
arg_pos_ [Char]
arg_value_
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs :: Map [Char] (Maybe NonLocalAttr)
_lhsOattrs = () -> Map [Char] (Maybe NonLocalAttr)
forall k a. () -> Map k a
rule441 ()
__result_ :: T_HsToken_vOut31
__result_ = Map [Char] (Maybe NonLocalAttr)
-> (Pos, [Char]) -> T_HsToken_vOut31
T_HsToken_vOut31 Map [Char] (Maybe NonLocalAttr)
_lhsOattrs (Pos, [Char])
_lhsOtok
in T_HsToken_vOut31
__result_ )
in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
{-# INLINE rule440 #-}
{-# LINE 1374 "src-ag/ExecutionPlan2Caml.ag" #-}
rule440 = \ pos_ value_ ->
{-# LINE 1374 "src-ag/ExecutionPlan2Caml.ag" #-}
(pos_, if null value_
then ""
else showCharShort (head value_)
)
{-# LINE 3599 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule441 #-}
rule441 = \ (_ :: ()) ->
Map.empty
{-# NOINLINE sem_HsToken_StrToken #-}
sem_HsToken_StrToken :: (String) -> (Pos) -> T_HsToken
sem_HsToken_StrToken :: [Char] -> Pos -> T_HsToken
sem_HsToken_StrToken [Char]
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, [Char])
_lhsOtok = Pos -> [Char] -> (Pos, [Char])
forall a. a -> [Char] -> (a, [Char])
rule442 Pos
arg_pos_ [Char]
arg_value_
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs :: Map [Char] (Maybe NonLocalAttr)
_lhsOattrs = () -> Map [Char] (Maybe NonLocalAttr)
forall k a. () -> Map k a
rule443 ()
__result_ :: T_HsToken_vOut31
__result_ = Map [Char] (Maybe NonLocalAttr)
-> (Pos, [Char]) -> T_HsToken_vOut31
T_HsToken_vOut31 Map [Char] (Maybe NonLocalAttr)
_lhsOattrs (Pos, [Char])
_lhsOtok
in T_HsToken_vOut31
__result_ )
in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
{-# INLINE rule442 #-}
{-# LINE 1379 "src-ag/ExecutionPlan2Caml.ag" #-}
rule442 = \ pos_ value_ ->
{-# LINE 1379 "src-ag/ExecutionPlan2Caml.ag" #-}
(pos_, showStrShort value_)
{-# LINE 3622 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule443 #-}
rule443 = \ (_ :: ()) ->
Map.empty
{-# NOINLINE sem_HsToken_Err #-}
sem_HsToken_Err :: (String) -> (Pos) -> T_HsToken
sem_HsToken_Err :: [Char] -> Pos -> T_HsToken
sem_HsToken_Err [Char]
_ 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, [Char])
_lhsOtok = Pos -> (Pos, [Char])
forall a. a -> (a, [Char])
rule444 Pos
arg_pos_
_lhsOattrs :: Map String (Maybe NonLocalAttr)
_lhsOattrs :: Map [Char] (Maybe NonLocalAttr)
_lhsOattrs = () -> Map [Char] (Maybe NonLocalAttr)
forall k a. () -> Map k a
rule445 ()
__result_ :: T_HsToken_vOut31
__result_ = Map [Char] (Maybe NonLocalAttr)
-> (Pos, [Char]) -> T_HsToken_vOut31
T_HsToken_vOut31 Map [Char] (Maybe NonLocalAttr)
_lhsOattrs (Pos, [Char])
_lhsOtok
in T_HsToken_vOut31
__result_ )
in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
{-# INLINE rule444 #-}
{-# LINE 1380 "src-ag/ExecutionPlan2Caml.ag" #-}
rule444 = \ pos_ ->
{-# LINE 1380 "src-ag/ExecutionPlan2Caml.ag" #-}
(pos_, "")
{-# LINE 3645 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule445 #-}
rule445 = \ (_ :: ()) ->
Map.empty
data Inh_HsTokens = Inh_HsTokens { Inh_HsTokens -> Options
options_Inh_HsTokens :: (Options) }
data Syn_HsTokens = Syn_HsTokens { Syn_HsTokens -> [(Pos, [Char])]
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, [Char])]
_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, [Char])] -> Syn_HsTokens
Syn_HsTokens [(Pos, [Char])]
_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 [Char] (Maybe NonLocalAttr)
_hdIattrs (Pos, [Char])
_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, [Char])]
_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, [Char])]
_lhsOtks = (Pos, [Char]) -> [(Pos, [Char])] -> [(Pos, [Char])]
rule446 (Pos, [Char])
_hdItok [(Pos, [Char])]
_tlItks
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule447 Options
_lhsIoptions
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule448 Options
_lhsIoptions
__result_ :: T_HsTokens_vOut34
__result_ = [(Pos, [Char])] -> T_HsTokens_vOut34
T_HsTokens_vOut34 [(Pos, [Char])]
_lhsOtks
in T_HsTokens_vOut34
__result_ )
in T_HsTokens_v34 -> T_HsTokens_s35
C_HsTokens_s35 T_HsTokens_v34
v34
{-# INLINE rule446 #-}
{-# LINE 1359 "src-ag/ExecutionPlan2Caml.ag" #-}
rule446 = \ ((_hdItok) :: (Pos,String)) ((_tlItks) :: [(Pos,String)]) ->
{-# LINE 1359 "src-ag/ExecutionPlan2Caml.ag" #-}
_hdItok : _tlItks
{-# LINE 3703 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule447 #-}
rule447 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule448 #-}
rule448 = \ ((_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, [Char])]
_lhsOtks = () -> [(Pos, [Char])]
forall a. () -> [a]
rule449 ()
__result_ :: T_HsTokens_vOut34
__result_ = [(Pos, [Char])] -> T_HsTokens_vOut34
T_HsTokens_vOut34 [(Pos, [Char])]
_lhsOtks
in T_HsTokens_vOut34
__result_ )
in T_HsTokens_v34 -> T_HsTokens_s35
C_HsTokens_s35 T_HsTokens_v34
v34
{-# INLINE rule449 #-}
{-# LINE 1360 "src-ag/ExecutionPlan2Caml.ag" #-}
rule449 = \ (_ :: ()) ->
{-# LINE 1360 "src-ag/ExecutionPlan2Caml.ag" #-}
[]
{-# LINE 3727 "src-generated/ExecutionPlan2Caml.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, [Char])]
_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
rule450 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 rule450 #-}
rule450 :: Options -> Options
rule450 = \ ((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 [Char]
attrs_Syn_Pattern :: (Set String), Syn_Pattern -> Pattern
copy_Syn_Pattern :: (Pattern), :: ([(PP_Doc,PP_Doc)]), 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 [Char]
_lhsOattrs Pattern
_lhsOcopy [(PP_Doc, PP_Doc)]
_lhsOextraDefs 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 [Char]
-> Pattern
-> [(PP_Doc, PP_Doc)]
-> Bool
-> PP_Doc
-> Syn_Pattern
Syn_Pattern PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Pattern
_lhsOcopy [(PP_Doc, PP_Doc)]
_lhsOextraDefs 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) ([(PP_Doc,PP_Doc)]) (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 [Char]
_patsIattrs Patterns
_patsIcopy [(PP_Doc, PP_Doc)]
_patsIextraDefs [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] -> Identifier -> PP_Doc
rule451 [PP_Doc]
_patsIsem_lhs Identifier
arg_name_
_lhsOisUnderscore :: Bool
_lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule452 ()
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes = PP_Doc -> PP_Doc
rule453 PP_Doc
_patsIattrTypes
_lhsOattrs :: Set String
_lhsOattrs :: Set [Char]
_lhsOattrs = Set [Char] -> Set [Char]
rule454 Set [Char]
_patsIattrs
_lhsOextraDefs :: [(PP_Doc,PP_Doc)]
_lhsOextraDefs :: [(PP_Doc, PP_Doc)]
_lhsOextraDefs = [(PP_Doc, PP_Doc)] -> [(PP_Doc, PP_Doc)]
rule455 [(PP_Doc, PP_Doc)]
_patsIextraDefs
_copy :: Pattern
_copy = Patterns -> Identifier -> Pattern
rule456 Patterns
_patsIcopy Identifier
arg_name_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule457 Pattern
_copy
_patsOallInhmap :: Map Identifier Attributes
_patsOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule458 Map Identifier Attributes
_lhsIallInhmap
_patsOallSynmap :: Map Identifier Attributes
_patsOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule459 Map Identifier Attributes
_lhsIallSynmap
_patsOanyLazyKind :: Bool
_patsOanyLazyKind = Bool -> Bool
rule460 Bool
_lhsIanyLazyKind
_patsOinhmap :: Attributes
_patsOinhmap = Attributes -> Attributes
rule461 Attributes
_lhsIinhmap
_patsOlocalAttrTypes :: Attributes
_patsOlocalAttrTypes = Attributes -> Attributes
rule462 Attributes
_lhsIlocalAttrTypes
_patsOoptions :: Options
_patsOoptions = Options -> Options
rule463 Options
_lhsIoptions
_patsOsynmap :: Attributes
_patsOsynmap = Attributes -> Attributes
rule464 Attributes
_lhsIsynmap
__result_ :: T_Pattern_vOut40
__result_ = PP_Doc
-> Set [Char]
-> Pattern
-> [(PP_Doc, PP_Doc)]
-> Bool
-> PP_Doc
-> T_Pattern_vOut40
T_Pattern_vOut40 PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Pattern
_lhsOcopy [(PP_Doc, PP_Doc)]
_lhsOextraDefs 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 rule451 #-}
{-# LINE 1066 "src-ag/ExecutionPlan2Caml.ag" #-}
rule451 = \ ((_patsIsem_lhs) :: [PP_Doc]) name_ ->
{-# LINE 1066 "src-ag/ExecutionPlan2Caml.ag" #-}
pp_parens $ name_ >#< pp_block "(" ")" "," _patsIsem_lhs
{-# LINE 3847 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule452 #-}
{-# LINE 1075 "src-ag/ExecutionPlan2Caml.ag" #-}
rule452 = \ (_ :: ()) ->
{-# LINE 1075 "src-ag/ExecutionPlan2Caml.ag" #-}
False
{-# LINE 3853 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule453 #-}
rule453 = \ ((_patsIattrTypes) :: PP_Doc) ->
_patsIattrTypes
{-# INLINE rule454 #-}
rule454 = \ ((_patsIattrs) :: Set String) ->
_patsIattrs
{-# INLINE rule455 #-}
rule455 = \ ((_patsIextraDefs) :: [(PP_Doc,PP_Doc)]) ->
_patsIextraDefs
{-# INLINE rule456 #-}
rule456 = \ ((_patsIcopy) :: Patterns) name_ ->
Constr name_ _patsIcopy
{-# INLINE rule457 #-}
rule457 = \ _copy ->
_copy
{-# INLINE rule458 #-}
rule458 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule459 #-}
rule459 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule460 #-}
rule460 = \ ((_lhsIanyLazyKind) :: Bool) ->
_lhsIanyLazyKind
{-# INLINE rule461 #-}
rule461 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule462 #-}
rule462 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->
_lhsIlocalAttrTypes
{-# INLINE rule463 #-}
rule463 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule464 #-}
rule464 = \ ((_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 [Char]
_patsIattrs Patterns
_patsIcopy [(PP_Doc, PP_Doc)]
_patsIextraDefs [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
rule465 [PP_Doc]
_patsIsem_lhs
_lhsOisUnderscore :: Bool
_lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule466 ()
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes = PP_Doc -> PP_Doc
rule467 PP_Doc
_patsIattrTypes
_lhsOattrs :: Set String
_lhsOattrs :: Set [Char]
_lhsOattrs = Set [Char] -> Set [Char]
rule468 Set [Char]
_patsIattrs
_lhsOextraDefs :: [(PP_Doc,PP_Doc)]
_lhsOextraDefs :: [(PP_Doc, PP_Doc)]
_lhsOextraDefs = [(PP_Doc, PP_Doc)] -> [(PP_Doc, PP_Doc)]
rule469 [(PP_Doc, PP_Doc)]
_patsIextraDefs
_copy :: Pattern
_copy = Patterns -> Pos -> Pattern
rule470 Patterns
_patsIcopy Pos
arg_pos_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule471 Pattern
_copy
_patsOallInhmap :: Map Identifier Attributes
_patsOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule472 Map Identifier Attributes
_lhsIallInhmap
_patsOallSynmap :: Map Identifier Attributes
_patsOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule473 Map Identifier Attributes
_lhsIallSynmap
_patsOanyLazyKind :: Bool
_patsOanyLazyKind = Bool -> Bool
rule474 Bool
_lhsIanyLazyKind
_patsOinhmap :: Attributes
_patsOinhmap = Attributes -> Attributes
rule475 Attributes
_lhsIinhmap
_patsOlocalAttrTypes :: Attributes
_patsOlocalAttrTypes = Attributes -> Attributes
rule476 Attributes
_lhsIlocalAttrTypes
_patsOoptions :: Options
_patsOoptions = Options -> Options
rule477 Options
_lhsIoptions
_patsOsynmap :: Attributes
_patsOsynmap = Attributes -> Attributes
rule478 Attributes
_lhsIsynmap
__result_ :: T_Pattern_vOut40
__result_ = PP_Doc
-> Set [Char]
-> Pattern
-> [(PP_Doc, PP_Doc)]
-> Bool
-> PP_Doc
-> T_Pattern_vOut40
T_Pattern_vOut40 PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Pattern
_lhsOcopy [(PP_Doc, PP_Doc)]
_lhsOextraDefs 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 rule465 #-}
{-# LINE 1065 "src-ag/ExecutionPlan2Caml.ag" #-}
rule465 = \ ((_patsIsem_lhs) :: [PP_Doc]) ->
{-# LINE 1065 "src-ag/ExecutionPlan2Caml.ag" #-}
pp_block "(" ")" "," _patsIsem_lhs
{-# LINE 3927 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule466 #-}
{-# LINE 1076 "src-ag/ExecutionPlan2Caml.ag" #-}
rule466 = \ (_ :: ()) ->
{-# LINE 1076 "src-ag/ExecutionPlan2Caml.ag" #-}
False
{-# LINE 3933 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule467 #-}
rule467 = \ ((_patsIattrTypes) :: PP_Doc) ->
_patsIattrTypes
{-# INLINE rule468 #-}
rule468 = \ ((_patsIattrs) :: Set String) ->
_patsIattrs
{-# INLINE rule469 #-}
rule469 = \ ((_patsIextraDefs) :: [(PP_Doc,PP_Doc)]) ->
_patsIextraDefs
{-# INLINE rule470 #-}
rule470 = \ ((_patsIcopy) :: Patterns) pos_ ->
Product pos_ _patsIcopy
{-# INLINE rule471 #-}
rule471 = \ _copy ->
_copy
{-# INLINE rule472 #-}
rule472 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule473 #-}
rule473 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule474 #-}
rule474 = \ ((_lhsIanyLazyKind) :: Bool) ->
_lhsIanyLazyKind
{-# INLINE rule475 #-}
rule475 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule476 #-}
rule476 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->
_lhsIlocalAttrTypes
{-# INLINE rule477 #-}
rule477 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule478 #-}
rule478 = \ ((_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 [Char]
_patIattrs Pattern
_patIcopy [(PP_Doc, PP_Doc)]
_patIextraDefs 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)
_var :: PP_Doc
_var = Options -> Identifier -> Identifier -> PP_Doc
rule479 Options
_lhsIoptions Identifier
arg_attr_ Identifier
arg_field_
_hasTp :: Bool
_hasTp = Maybe Type -> Bool
forall a. Maybe a -> Bool
rule480 Maybe Type
_mbTp
_o_sigs :: Bool
_o_sigs = Options -> Bool
rule481 Options
_lhsIoptions
_lhsOsem_lhs :: PP_Doc
_lhsOsem_lhs :: PP_Doc
_lhsOsem_lhs = Bool -> Maybe Type -> Bool -> PP_Doc -> PP_Doc
rule482 Bool
_hasTp Maybe Type
_mbTp Bool
_o_sigs PP_Doc
_var
_lhsOextraDefs :: [(PP_Doc,PP_Doc)]
_lhsOextraDefs :: [(PP_Doc, PP_Doc)]
_lhsOextraDefs = Bool -> PP_Doc -> PP_Doc -> [(PP_Doc, PP_Doc)]
forall b. Bool -> PP_Doc -> b -> [(PP_Doc, b)]
rule483 Bool
_patIisUnderscore PP_Doc
_patIsem_lhs PP_Doc
_var
_lhsOisUnderscore :: Bool
_lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule484 ()
_lhsOattrs :: Set String
_lhsOattrs :: Set [Char]
_lhsOattrs = Options -> Set [Char] -> Identifier -> Identifier -> Set [Char]
rule485 Options
_lhsIoptions Set [Char]
_patIattrs Identifier
arg_attr_ Identifier
arg_field_
_mbTp :: Maybe Type
_mbTp = Attributes -> Attributes -> Identifier -> Identifier -> Maybe Type
rule486 Attributes
_lhsIlocalAttrTypes Attributes
_lhsIsynmap Identifier
arg_attr_ Identifier
arg_field_
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes = Options
-> Maybe Type -> PP_Doc -> Identifier -> Identifier -> PP_Doc
rule487 Options
_lhsIoptions Maybe Type
_mbTp PP_Doc
_patIattrTypes Identifier
arg_attr_ Identifier
arg_field_
_copy :: Pattern
_copy = Pattern -> Identifier -> Identifier -> Pattern
rule488 Pattern
_patIcopy Identifier
arg_attr_ Identifier
arg_field_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule489 Pattern
_copy
_patOallInhmap :: Map Identifier Attributes
_patOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule490 Map Identifier Attributes
_lhsIallInhmap
_patOallSynmap :: Map Identifier Attributes
_patOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule491 Map Identifier Attributes
_lhsIallSynmap
_patOanyLazyKind :: Bool
_patOanyLazyKind = Bool -> Bool
rule492 Bool
_lhsIanyLazyKind
_patOinhmap :: Attributes
_patOinhmap = Attributes -> Attributes
rule493 Attributes
_lhsIinhmap
_patOlocalAttrTypes :: Attributes
_patOlocalAttrTypes = Attributes -> Attributes
rule494 Attributes
_lhsIlocalAttrTypes
_patOoptions :: Options
_patOoptions = Options -> Options
rule495 Options
_lhsIoptions
_patOsynmap :: Attributes
_patOsynmap = Attributes -> Attributes
rule496 Attributes
_lhsIsynmap
__result_ :: T_Pattern_vOut40
__result_ = PP_Doc
-> Set [Char]
-> Pattern
-> [(PP_Doc, PP_Doc)]
-> Bool
-> PP_Doc
-> T_Pattern_vOut40
T_Pattern_vOut40 PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Pattern
_lhsOcopy [(PP_Doc, PP_Doc)]
_lhsOextraDefs 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 rule479 #-}
{-# LINE 1057 "src-ag/ExecutionPlan2Caml.ag" #-}
rule479 = \ ((_lhsIoptions) :: Options) attr_ field_ ->
{-# LINE 1057 "src-ag/ExecutionPlan2Caml.ag" #-}
text $ attrname _lhsIoptions False field_ attr_
{-# LINE 4011 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule480 #-}
{-# LINE 1058 "src-ag/ExecutionPlan2Caml.ag" #-}
rule480 = \ _mbTp ->
{-# LINE 1058 "src-ag/ExecutionPlan2Caml.ag" #-}
isJust _mbTp
{-# LINE 4017 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule481 #-}
{-# LINE 1059 "src-ag/ExecutionPlan2Caml.ag" #-}
rule481 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 1059 "src-ag/ExecutionPlan2Caml.ag" #-}
typeSigs _lhsIoptions
{-# LINE 4023 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule482 #-}
{-# LINE 1061 "src-ag/ExecutionPlan2Caml.ag" #-}
rule482 = \ _hasTp _mbTp _o_sigs _var ->
{-# LINE 1061 "src-ag/ExecutionPlan2Caml.ag" #-}
ppArg (_hasTp && _o_sigs ) _var (maybe (text "?no type?") ppTp _mbTp )
{-# LINE 4029 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule483 #-}
{-# LINE 1062 "src-ag/ExecutionPlan2Caml.ag" #-}
rule483 = \ ((_patIisUnderscore) :: Bool) ((_patIsem_lhs) :: PP_Doc ) _var ->
{-# LINE 1062 "src-ag/ExecutionPlan2Caml.ag" #-}
if _patIisUnderscore
then []
else [ (_patIsem_lhs, _var ) ]
{-# LINE 4037 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule484 #-}
{-# LINE 1077 "src-ag/ExecutionPlan2Caml.ag" #-}
rule484 = \ (_ :: ()) ->
{-# LINE 1077 "src-ag/ExecutionPlan2Caml.ag" #-}
False
{-# LINE 4043 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule485 #-}
{-# LINE 1083 "src-ag/ExecutionPlan2Caml.ag" #-}
rule485 = \ ((_lhsIoptions) :: Options) ((_patIattrs) :: Set String) attr_ field_ ->
{-# LINE 1083 "src-ag/ExecutionPlan2Caml.ag" #-}
Set.insert (attrname _lhsIoptions False field_ attr_) _patIattrs
{-# LINE 4049 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule486 #-}
{-# LINE 1089 "src-ag/ExecutionPlan2Caml.ag" #-}
rule486 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ((_lhsIsynmap) :: Attributes) attr_ field_ ->
{-# LINE 1089 "src-ag/ExecutionPlan2Caml.ag" #-}
if field_ == _LHS
then Map.lookup attr_ _lhsIsynmap
else if field_ == _LOC
then Map.lookup attr_ _lhsIlocalAttrTypes
else Nothing
{-# LINE 4059 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule487 #-}
{-# LINE 1094 "src-ag/ExecutionPlan2Caml.ag" #-}
rule487 = \ ((_lhsIoptions) :: Options) _mbTp ((_patIattrTypes) :: PP_Doc) attr_ field_ ->
{-# LINE 1094 "src-ag/ExecutionPlan2Caml.ag" #-}
maybe empty (\tp -> (attrname _lhsIoptions False field_ attr_) >#< "::" >#< ppTp tp) _mbTp
>-< _patIattrTypes
{-# LINE 4066 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule488 #-}
rule488 = \ ((_patIcopy) :: Pattern) attr_ field_ ->
Alias field_ attr_ _patIcopy
{-# INLINE rule489 #-}
rule489 = \ _copy ->
_copy
{-# INLINE rule490 #-}
rule490 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule491 #-}
rule491 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule492 #-}
rule492 = \ ((_lhsIanyLazyKind) :: Bool) ->
_lhsIanyLazyKind
{-# INLINE rule493 #-}
rule493 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule494 #-}
rule494 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->
_lhsIlocalAttrTypes
{-# INLINE rule495 #-}
rule495 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule496 #-}
rule496 = \ ((_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 [Char]
_patIattrs Pattern
_patIcopy [(PP_Doc, PP_Doc)]
_patIextraDefs 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
rule497 PP_Doc
_patIsem_lhs
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes = PP_Doc -> PP_Doc
rule498 PP_Doc
_patIattrTypes
_lhsOattrs :: Set String
_lhsOattrs :: Set [Char]
_lhsOattrs = Set [Char] -> Set [Char]
rule499 Set [Char]
_patIattrs
_lhsOextraDefs :: [(PP_Doc,PP_Doc)]
_lhsOextraDefs :: [(PP_Doc, PP_Doc)]
_lhsOextraDefs = [(PP_Doc, PP_Doc)] -> [(PP_Doc, PP_Doc)]
rule500 [(PP_Doc, PP_Doc)]
_patIextraDefs
_copy :: Pattern
_copy = Pattern -> Pattern
rule501 Pattern
_patIcopy
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule502 Pattern
_copy
_lhsOisUnderscore :: Bool
_lhsOisUnderscore :: Bool
_lhsOisUnderscore = Bool -> Bool
rule503 Bool
_patIisUnderscore
_patOallInhmap :: Map Identifier Attributes
_patOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule504 Map Identifier Attributes
_lhsIallInhmap
_patOallSynmap :: Map Identifier Attributes
_patOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule505 Map Identifier Attributes
_lhsIallSynmap
_patOanyLazyKind :: Bool
_patOanyLazyKind = Bool -> Bool
rule506 Bool
_lhsIanyLazyKind
_patOinhmap :: Attributes
_patOinhmap = Attributes -> Attributes
rule507 Attributes
_lhsIinhmap
_patOlocalAttrTypes :: Attributes
_patOlocalAttrTypes = Attributes -> Attributes
rule508 Attributes
_lhsIlocalAttrTypes
_patOoptions :: Options
_patOoptions = Options -> Options
rule509 Options
_lhsIoptions
_patOsynmap :: Attributes
_patOsynmap = Attributes -> Attributes
rule510 Attributes
_lhsIsynmap
__result_ :: T_Pattern_vOut40
__result_ = PP_Doc
-> Set [Char]
-> Pattern
-> [(PP_Doc, PP_Doc)]
-> Bool
-> PP_Doc
-> T_Pattern_vOut40
T_Pattern_vOut40 PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Pattern
_lhsOcopy [(PP_Doc, PP_Doc)]
_lhsOextraDefs 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 rule497 #-}
{-# LINE 1068 "src-ag/ExecutionPlan2Caml.ag" #-}
rule497 = \ ((_patIsem_lhs) :: PP_Doc ) ->
{-# LINE 1068 "src-ag/ExecutionPlan2Caml.ag" #-}
pp_parens (text "lazy" >#< _patIsem_lhs)
{-# LINE 4131 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule498 #-}
rule498 = \ ((_patIattrTypes) :: PP_Doc) ->
_patIattrTypes
{-# INLINE rule499 #-}
rule499 = \ ((_patIattrs) :: Set String) ->
_patIattrs
{-# INLINE rule500 #-}
rule500 = \ ((_patIextraDefs) :: [(PP_Doc,PP_Doc)]) ->
_patIextraDefs
{-# INLINE rule501 #-}
rule501 = \ ((_patIcopy) :: Pattern) ->
Irrefutable _patIcopy
{-# INLINE rule502 #-}
rule502 = \ _copy ->
_copy
{-# INLINE rule503 #-}
rule503 = \ ((_patIisUnderscore) :: Bool) ->
_patIisUnderscore
{-# INLINE rule504 #-}
rule504 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
_lhsIallInhmap
{-# INLINE rule505 #-}
rule505 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
_lhsIallSynmap
{-# INLINE rule506 #-}
rule506 = \ ((_lhsIanyLazyKind) :: Bool) ->
_lhsIanyLazyKind
{-# INLINE rule507 #-}
rule507 = \ ((_lhsIinhmap) :: Attributes) ->
_lhsIinhmap
{-# INLINE rule508 #-}
rule508 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->
_lhsIlocalAttrTypes
{-# INLINE rule509 #-}
rule509 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule510 #-}
rule510 = \ ((_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
rule511 ()
_lhsOisUnderscore :: Bool
_lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule512 ()
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes :: PP_Doc
_lhsOattrTypes = () -> PP_Doc
rule513 ()
_lhsOattrs :: Set String
_lhsOattrs :: Set [Char]
_lhsOattrs = () -> Set [Char]
forall a. () -> Set a
rule514 ()
_lhsOextraDefs :: [(PP_Doc,PP_Doc)]
_lhsOextraDefs :: [(PP_Doc, PP_Doc)]
_lhsOextraDefs = () -> [(PP_Doc, PP_Doc)]
forall a. () -> [a]
rule515 ()
_copy :: Pattern
_copy = Pos -> Pattern
rule516 Pos
arg_pos_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule517 Pattern
_copy
__result_ :: T_Pattern_vOut40
__result_ = PP_Doc
-> Set [Char]
-> Pattern
-> [(PP_Doc, PP_Doc)]
-> Bool
-> PP_Doc
-> T_Pattern_vOut40
T_Pattern_vOut40 PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Pattern
_lhsOcopy [(PP_Doc, PP_Doc)]
_lhsOextraDefs 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 rule511 #-}
{-# LINE 1067 "src-ag/ExecutionPlan2Caml.ag" #-}
rule511 = \ (_ :: ()) ->
{-# LINE 1067 "src-ag/ExecutionPlan2Caml.ag" #-}
text "_"
{-# LINE 4199 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule512 #-}
{-# LINE 1078 "src-ag/ExecutionPlan2Caml.ag" #-}
rule512 = \ (_ :: ()) ->
{-# LINE 1078 "src-ag/ExecutionPlan2Caml.ag" #-}
True
{-# LINE 4205 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule513 #-}
rule513 = \ (_ :: ()) ->
empty
{-# INLINE rule514 #-}
rule514 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule515 #-}
rule515 = \ (_ :: ()) ->
[]
{-# INLINE rule516 #-}
rule516 = \ pos_ ->
Underscore pos_
{-# INLINE rule517 #-}
rule517 = \ _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 [Char]
attrs_Syn_Patterns :: (Set String), Syn_Patterns -> Patterns
copy_Syn_Patterns :: (Patterns), :: ([(PP_Doc,PP_Doc)]), 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 [Char]
_lhsOattrs Patterns
_lhsOcopy [(PP_Doc, PP_Doc)]
_lhsOextraDefs [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 [Char]
-> Patterns
-> [(PP_Doc, PP_Doc)]
-> [PP_Doc]
-> Syn_Patterns
Syn_Patterns PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Patterns
_lhsOcopy [(PP_Doc, PP_Doc)]
_lhsOextraDefs [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,PP_Doc)]) ([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 [Char]
_hdIattrs Pattern
_hdIcopy [(PP_Doc, PP_Doc)]
_hdIextraDefs 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 [Char]
_tlIattrs Patterns
_tlIcopy [(PP_Doc, PP_Doc)]
_tlIextraDefs [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
rule518 PP_Doc
_hdIattrTypes PP_Doc
_tlIattrTypes
_lhsOattrs :: Set String
_lhsOattrs :: Set [Char]
_lhsOattrs = Set [Char] -> Set [Char] -> Set [Char]
rule519 Set [Char]
_hdIattrs Set [Char]
_tlIattrs
_lhsOextraDefs :: [(PP_Doc,PP_Doc)]
_lhsOextraDefs :: [(PP_Doc, PP_Doc)]
_lhsOextraDefs = [(PP_Doc, PP_Doc)] -> [(PP_Doc, PP_Doc)] -> [(PP_Doc, PP_Doc)]
rule520 [(PP_Doc, PP_Doc)]
_hdIextraDefs [(PP_Doc, PP_Doc)]
_tlIextraDefs
_lhsOsem_lhs :: [PP_Doc]
_lhsOsem_lhs :: [PP_Doc]
_lhsOsem_lhs = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule521 PP_Doc
_hdIsem_lhs [PP_Doc]
_tlIsem_lhs
_copy :: Patterns
_copy = Pattern -> Patterns -> Patterns
rule522 Pattern
_hdIcopy Patterns
_tlIcopy
_lhsOcopy :: Patterns
_lhsOcopy :: Patterns
_lhsOcopy = Patterns -> Patterns
forall a. a -> a
rule523 Patterns
_copy
_hdOallInhmap :: Map Identifier Attributes
_hdOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule524 Map Identifier Attributes
_lhsIallInhmap
_hdOallSynmap :: Map Identifier Attributes
_hdOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule525 Map Identifier Attributes
_lhsIallSynmap
_hdOanyLazyKind :: Bool
_hdOanyLazyKind = Bool -> Bool
rule526 Bool
_lhsIanyLazyKind
_hdOinhmap :: Attributes
_hdOinhmap = Attributes -> Attributes
rule527 Attributes
_lhsIinhmap
_hdOlocalAttrTypes :: Attributes
_hdOlocalAttrTypes = Attributes -> Attributes
rule528 Attributes
_lhsIlocalAttrTypes
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule529 Options
_lhsIoptions
_hdOsynmap :: Attributes
_hdOsynmap = Attributes -> Attributes
rule530 Attributes
_lhsIsynmap
_tlOallInhmap :: Map Identifier Attributes
_tlOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule531 Map Identifier Attributes
_lhsIallInhmap
_tlOallSynmap :: Map Identifier Attributes
_tlOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule532 Map Identifier Attributes
_lhsIallSynmap
_tlOanyLazyKind :: Bool
_tlOanyLazyKind = Bool -> Bool
rule533 Bool
_lhsIanyLazyKind
_tlOinhmap :: Attributes
_tlOinhmap = Attributes -> Attributes
rule534 Attributes
_lhsIinhmap
_tlOlocalAttrTypes :: Attributes
_tlOlocalAttrTypes = Attributes -> Attributes
rule535 Attributes
_lhsIlocalAttrTypes
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule536 Options
_lhsIoptions
_tlOsynmap :: Attributes
_tlOsynmap = Attributes -> Attributes
rule537 Attributes
_lhsIsynmap
__result_ :: T_Patterns_vOut43
__result_ = PP_Doc
-> Set [Char]
-> Patterns
-> [(PP_Doc, PP_Doc)]
-> [PP_Doc]
-> T_Patterns_vOut43
T_Patterns_vOut43 PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Patterns
_lhsOcopy [(PP_Doc, PP_Doc)]
_lhsOextraDefs [PP_Doc]
_lhsOsem_lhs
in T_Patterns_vOut43
__result_ )
in T_Patterns_v43 -> T_Patterns_s44
C_Patterns_s44 T_Patterns_v43
v43
{-# INLINE rule518 #-}
rule518 :: PP_Doc -> PP_Doc -> PP_Doc
rule518 = \ ((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 rule519 #-}
rule519 :: Set [Char] -> Set [Char] -> Set [Char]
rule519 = \ ((Set [Char]
_hdIattrs) :: Set String) ((Set [Char]
_tlIattrs) :: Set String) ->
Set [Char]
_hdIattrs Set [Char] -> Set [Char] -> Set [Char]
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set [Char]
_tlIattrs
{-# INLINE rule520 #-}
rule520 :: [(PP_Doc, PP_Doc)] -> [(PP_Doc, PP_Doc)] -> [(PP_Doc, PP_Doc)]
rule520 = \ (([(PP_Doc, PP_Doc)]
_hdIextraDefs) :: [(PP_Doc,PP_Doc)]) (([(PP_Doc, PP_Doc)]
_tlIextraDefs) :: [(PP_Doc,PP_Doc)]) ->
[(PP_Doc, PP_Doc)]
_hdIextraDefs [(PP_Doc, PP_Doc)] -> [(PP_Doc, PP_Doc)] -> [(PP_Doc, PP_Doc)]
forall a. [a] -> [a] -> [a]
++ [(PP_Doc, PP_Doc)]
_tlIextraDefs
{-# INLINE rule521 #-}
rule521 :: PP_Doc -> [PP_Doc] -> [PP_Doc]
rule521 = \ ((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 rule522 #-}
rule522 :: Pattern -> Patterns -> Patterns
rule522 = \ ((Pattern
_hdIcopy) :: Pattern) ((Patterns
_tlIcopy) :: Patterns) ->
(:) Pattern
_hdIcopy Patterns
_tlIcopy
{-# INLINE rule523 #-}
rule523 :: p -> p
rule523 = \ p
_copy ->
p
_copy
{-# INLINE rule524 #-}
rule524 :: Map Identifier Attributes -> Map Identifier Attributes
rule524 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallInhmap
{-# INLINE rule525 #-}
rule525 :: Map Identifier Attributes -> Map Identifier Attributes
rule525 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallSynmap
{-# INLINE rule526 #-}
rule526 :: Bool -> Bool
rule526 = \ ((Bool
_lhsIanyLazyKind) :: Bool) ->
Bool
_lhsIanyLazyKind
{-# INLINE rule527 #-}
rule527 :: Attributes -> Attributes
rule527 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
Attributes
_lhsIinhmap
{-# INLINE rule528 #-}
rule528 :: Attributes -> Attributes
rule528 = \ ((Attributes
_lhsIlocalAttrTypes) :: Map Identifier Type) ->
Attributes
_lhsIlocalAttrTypes
{-# INLINE rule529 #-}
rule529 :: Options -> Options
rule529 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule530 #-}
rule530 :: Attributes -> Attributes
rule530 = \ ((Attributes
_lhsIsynmap) :: Attributes) ->
Attributes
_lhsIsynmap
{-# INLINE rule531 #-}
rule531 :: Map Identifier Attributes -> Map Identifier Attributes
rule531 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallInhmap
{-# INLINE rule532 #-}
rule532 :: Map Identifier Attributes -> Map Identifier Attributes
rule532 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallSynmap
{-# INLINE rule533 #-}
rule533 :: Bool -> Bool
rule533 = \ ((Bool
_lhsIanyLazyKind) :: Bool) ->
Bool
_lhsIanyLazyKind
{-# INLINE rule534 #-}
rule534 :: Attributes -> Attributes
rule534 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
Attributes
_lhsIinhmap
{-# INLINE rule535 #-}
rule535 :: Attributes -> Attributes
rule535 = \ ((Attributes
_lhsIlocalAttrTypes) :: Map Identifier Type) ->
Attributes
_lhsIlocalAttrTypes
{-# INLINE rule536 #-}
rule536 :: Options -> Options
rule536 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule537 #-}
rule537 :: Attributes -> Attributes
rule537 = \ ((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
rule538 ()
_lhsOattrs :: Set String
_lhsOattrs :: Set [Char]
_lhsOattrs = () -> Set [Char]
forall a. () -> Set a
rule539 ()
_lhsOextraDefs :: [(PP_Doc,PP_Doc)]
_lhsOextraDefs :: [(PP_Doc, PP_Doc)]
_lhsOextraDefs = () -> [(PP_Doc, PP_Doc)]
forall a. () -> [a]
rule540 ()
_lhsOsem_lhs :: [PP_Doc]
_lhsOsem_lhs :: [PP_Doc]
_lhsOsem_lhs = () -> [PP_Doc]
forall a. () -> [a]
rule541 ()
_copy :: [a]
_copy = () -> [a]
forall a. () -> [a]
rule542 ()
_lhsOcopy :: Patterns
_lhsOcopy :: Patterns
_lhsOcopy = Patterns -> Patterns
forall a. a -> a
rule543 Patterns
forall a. [a]
_copy
__result_ :: T_Patterns_vOut43
__result_ = PP_Doc
-> Set [Char]
-> Patterns
-> [(PP_Doc, PP_Doc)]
-> [PP_Doc]
-> T_Patterns_vOut43
T_Patterns_vOut43 PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Patterns
_lhsOcopy [(PP_Doc, PP_Doc)]
_lhsOextraDefs [PP_Doc]
_lhsOsem_lhs
in T_Patterns_vOut43
__result_ )
in T_Patterns_v43 -> T_Patterns_s44
C_Patterns_s44 T_Patterns_v43
v43
{-# INLINE rule538 #-}
rule538 :: () -> PP_Doc
rule538 = \ (()
_ :: ()) ->
PP_Doc
empty
{-# INLINE rule539 #-}
rule539 :: () -> Set a
rule539 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
{-# INLINE rule540 #-}
rule540 :: () -> [a]
rule540 = \ (()
_ :: ()) ->
[]
{-# INLINE rule541 #-}
rule541 :: () -> [a]
rule541 = \ (()
_ :: ()) ->
[]
{-# INLINE rule542 #-}
rule542 :: () -> [a]
rule542 = \ (()
_ :: ()) ->
[]
{-# INLINE rule543 #-}
rule543 :: p -> p
rule543 = \ 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
allchildvisit_Inh_Visit :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), Inh_Visit -> Map Int (Map [Char] (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
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
childintros_Inh_Visit :: (Map Identifier (VisitKind -> 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 -> Either Error PP_Doc)
mrules_Inh_Visit :: (Map Identifier (VisitKind -> 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 [Char])
ruledefs_Inh_Visit :: (Map Identifier (Set String)), Inh_Visit -> Map Identifier (Map [Char] (Maybe NonLocalAttr))
ruleuses_Inh_Visit :: (Map Identifier (Map String (Maybe NonLocalAttr))), Inh_Visit -> Attributes
synmap_Inh_Visit :: (Attributes), Inh_Visit -> Set [Char]
terminaldefs_Inh_Visit :: (Set String) }
data Syn_Visit = Syn_Visit { Syn_Visit -> VisitStateState
allvisits_Syn_Visit :: ( VisitStateState ), Syn_Visit
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
childvisit_Syn_Visit :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error 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 [Char] (Maybe NonLocalAttr))
intramap_Syn_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), Syn_Visit -> Set [Char]
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, PP_Doc)
sem_visit_Syn_Visit :: ( (StateIdentifier,PP_Doc) ), Syn_Visit -> PP_Doc
t_visits_Syn_Visit :: (PP_Doc), 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set [Char]
_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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Identifier
-> Attributes
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Int StateCtx
-> Identifier
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Attributes
-> Set [Char]
-> 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set [Char]
_lhsIterminaldefs
(T_Visit_vOut46 VisitStateState
_lhsOallvisits Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap Set [Char]
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage (Int, PP_Doc)
_lhsOsem_visit PP_Doc
_lhsOt_visits 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Seq Error
-> Map Int (Int, Int)
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Set [Char]
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> (Int, PP_Doc)
-> PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Syn_Visit
Syn_Visit VisitStateState
_lhsOallvisits Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap Set [Char]
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage (Int, PP_Doc)
_lhsOsem_visit PP_Doc
_lhsOt_visits 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (ConstructorIdent) (Attributes) (Map Identifier (VisitKind -> 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) ( (StateIdentifier,PP_Doc) ) (PP_Doc) (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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set [Char]
_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 [Char]
_stepsIdefs Seq Error
_stepsIerrors Int
_stepsIindex Bool
_stepsIisLast Set [Char]
_stepsIlazyIntras Int
_stepsIprevMaxSimRefs Map Identifier (Set VisitKind)
_stepsIruleKinds Map Identifier Int
_stepsIruleUsage PP_Doc
_stepsIsem_steps Int
_stepsIsize Map [Char] (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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> PP_Doc
-> Int
-> VisitKind
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Options
-> Int
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Bool
-> T_VisitSteps_vIn52
T_VisitSteps_vIn52 Map Int (Int, Int)
_stepsOallFromToStates Map Identifier Int
_stepsOallInitStates Map Int VisitKind
_stepsOallVisitKinds Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_stepsOallchildvisit Map Int (Set Identifier)
_stepsOavisitdefs Map Int (Set Identifier)
_stepsOavisituses Attributes
_stepsOchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_stepsOchildintros PP_Doc
_stepsOfollow Int
_stepsOindex VisitKind
_stepsOkind Map Identifier (VisitKind -> Either Error PP_Doc)
_stepsOmrules Options
_stepsOoptions Int
_stepsOprevMaxSimRefs Map Identifier (Set [Char])
_stepsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_stepsOruleuses Bool
_stepsOuseParallel)
_lhsOallvisits :: VisitStateState
_lhsOallvisits :: VisitStateState
_lhsOallvisits = Int -> Int -> Int -> VisitStateState
forall b a c. b -> a -> c -> (a, b, c)
rule544 Int
arg_from_ Int
arg_ident_ Int
arg_to_
_nameTIn_visit :: PP_Doc
_nameTIn_visit = Identifier -> Int -> PP_Doc
rule545 Identifier
_lhsInt Int
arg_ident_
_nameTOut_visit :: PP_Doc
_nameTOut_visit = Identifier -> Int -> PP_Doc
rule546 Identifier
_lhsInt Int
arg_ident_
_nameNextState :: PP_Doc
_nameNextState = Identifier -> Int -> PP_Doc
rule547 Identifier
_lhsInt Int
arg_to_
_nameCaller_visit :: PP_Doc
_nameCaller_visit = Identifier -> Int -> PP_Doc
rule548 Identifier
_lhsInt Int
arg_ident_
_nextVisitInfo :: StateCtx
_nextVisitInfo = Map Int StateCtx -> Int -> StateCtx
rule549 Map Int StateCtx
_lhsInextVisits Int
arg_to_
_t_params :: PP_Doc
_t_params = [Identifier] -> PP_Doc
rule550 [Identifier]
_lhsIparams
_t_c_params :: PP_Doc
_t_c_params = [Identifier] -> PP_Doc
rule551 [Identifier]
_lhsIparams
_lhsOt_visits :: PP_Doc
_lhsOt_visits :: PP_Doc
_lhsOt_visits = [PP_Doc]
-> [PP_Doc]
-> Identifier
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> [PP_Doc]
-> PP_Doc
-> PP_Doc
-> Int
-> PP_Doc
rule552 [PP_Doc]
_contpart [PP_Doc]
_inhpart Identifier
_lhsInt PP_Doc
_nameCaller_visit PP_Doc
_nameTIn_visit PP_Doc
_nameTOut_visit [PP_Doc]
_synpart PP_Doc
_t_c_params PP_Doc
_t_params Int
arg_ident_
_contpart :: [PP_Doc]
_contpart = Identifier -> PP_Doc -> StateCtx -> PP_Doc -> Int -> [PP_Doc]
rule553 Identifier
_lhsInt PP_Doc
_nameNextState StateCtx
_nextVisitInfo PP_Doc
_t_params Int
arg_ident_
_inhpart :: [PP_Doc]
_inhpart = Attributes
-> ((Identifier -> Identifier -> Int -> PP_Doc)
-> Set Identifier -> Attributes -> [PP_Doc])
-> Set Identifier
-> [PP_Doc]
forall t t.
Attributes
-> ((Identifier -> Identifier -> Int -> PP_Doc)
-> t -> Attributes -> t)
-> t
-> t
rule554 Attributes
_lhsIinhmap (Identifier -> Identifier -> Int -> PP_Doc)
-> Set Identifier -> Attributes -> [PP_Doc]
_ppTypeList Set Identifier
arg_inh_
_synpart :: [PP_Doc]
_synpart = Attributes
-> ((Identifier -> Identifier -> Int -> PP_Doc)
-> Set Identifier -> Attributes -> [PP_Doc])
-> Set Identifier
-> [PP_Doc]
forall t t.
Attributes
-> ((Identifier -> Identifier -> Int -> PP_Doc)
-> t -> Attributes -> t)
-> t
-> t
rule555 Attributes
_lhsIsynmap (Identifier -> Identifier -> Int -> PP_Doc)
-> Set Identifier -> Attributes -> [PP_Doc]
_ppTypeList Set Identifier
arg_syn_
_ppTypeList :: (Identifier -> Identifier -> Int -> PP_Doc)
-> Set Identifier -> Attributes -> [PP_Doc]
_ppTypeList = Identifier
-> Int
-> (Identifier -> Identifier -> Int -> PP_Doc)
-> Set Identifier
-> Attributes
-> [PP_Doc]
forall t.
Identifier
-> t
-> (Identifier -> Identifier -> t -> PP_Doc)
-> Set Identifier
-> Attributes
-> [PP_Doc]
rule556 Identifier
_lhsInt Int
arg_ident_
_o_sigs :: Bool
_o_sigs = Options -> Bool
rule557 Options
_lhsIoptions
_lhsOsem_visit :: (StateIdentifier,PP_Doc)
_lhsOsem_visit :: (Int, PP_Doc)
_lhsOsem_visit = Identifier
-> Options
-> PP_Doc
-> PP_Doc
-> Bool
-> PP_Doc
-> PP_Doc
-> Int
-> Int
-> Set Identifier
-> (Int, PP_Doc)
forall a.
Identifier
-> Options
-> PP_Doc
-> PP_Doc
-> Bool
-> PP_Doc
-> PP_Doc
-> a
-> Int
-> Set Identifier
-> (a, PP_Doc)
rule558 Identifier
_lhsInt Options
_lhsIoptions PP_Doc
_nameTIn_visit PP_Doc
_nameTOut_visit Bool
_o_sigs PP_Doc
_stepsIsem_steps PP_Doc
_t_params Int
arg_from_ Int
arg_ident_ Set Identifier
arg_inh_
_stepsOfollow :: PP_Doc
_stepsOfollow = PP_Doc -> PP_Doc -> PP_Doc
rule559 PP_Doc
_nextStBuild PP_Doc
_resultval
_nextArgsMp :: Map [Char] (Maybe NonLocalAttr)
_nextArgsMp = Map Int (Map [Char] (Maybe NonLocalAttr))
-> Int -> Map [Char] (Maybe NonLocalAttr)
rule560 Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Int
arg_to_
_nextArgs :: PP_Doc
_nextArgs = Map [Char] (Maybe NonLocalAttr) -> PP_Doc
forall a. Map [Char] a -> PP_Doc
rule561 Map [Char] (Maybe NonLocalAttr)
_nextArgsMp
_nextStExp :: PP_Doc
_nextStExp = Options
-> PP_Doc -> Map [Char] (Maybe NonLocalAttr) -> Int -> PP_Doc
forall k a. Options -> PP_Doc -> Map k a -> Int -> PP_Doc
rule562 Options
_lhsIoptions PP_Doc
_nextArgs Map [Char] (Maybe NonLocalAttr)
_nextArgsMp Int
arg_to_
_resultval :: PP_Doc
_resultval = Identifier -> Options -> PP_Doc -> Int -> Set Identifier -> PP_Doc
rule563 Identifier
_lhsInt Options
_lhsIoptions PP_Doc
_nextStRefExp Int
arg_ident_ Set Identifier
arg_syn_
(PP_Doc
_nextStBuild,PP_Doc
_nextStRefExp) = Identifier -> PP_Doc -> StateCtx -> Int -> (PP_Doc, PP_Doc)
rule564 Identifier
_lhsInt PP_Doc
_nextStExp StateCtx
_nextVisitInfo Int
arg_ident_
_stepsOkind :: VisitKind
_stepsOkind = VisitKind -> VisitKind
forall a. a -> a
rule565 VisitKind
arg_kind_
_stepsOindex :: Int
_stepsOindex = () -> Int
rule566 ()
_stepsOprevMaxSimRefs :: Int
_stepsOprevMaxSimRefs = () -> Int
rule567 ()
_stepsOuseParallel :: Bool
_stepsOuseParallel = () -> Bool
rule568 ()
_prevVisitInfo :: StateCtx
_prevVisitInfo = Map Int StateCtx -> Int -> StateCtx
rule569 Map Int StateCtx
_lhsInextVisits Int
arg_from_
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit = (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Int
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
forall a k. a -> k -> Map k a
rule570 Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc
_invokecode Int
arg_ident_
_invokecode :: Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc
_invokecode = Identifier
-> Options
-> PP_Doc
-> StateCtx
-> Bool
-> StateCtx
-> Int
-> Int
-> Set Identifier
-> VisitKind
-> Set Identifier
-> Int
-> Identifier
-> Type
-> VisitKind
-> PP_Doc
-> Either Error PP_Doc
rule571 Identifier
_lhsInt Options
_lhsIoptions PP_Doc
_nameTOut_visit StateCtx
_nextVisitInfo Bool
_o_sigs StateCtx
_prevVisitInfo Int
arg_from_ Int
arg_ident_ Set Identifier
arg_inh_ VisitKind
arg_kind_ Set Identifier
arg_syn_ Int
arg_to_
_thisintra :: Map [Char] (Maybe NonLocalAttr)
_thisintra = Map [Char] (Maybe Any)
-> Map [Char] (Maybe NonLocalAttr)
-> Map [Char] (Maybe NonLocalAttr)
-> Map [Char] (Maybe NonLocalAttr)
forall b a.
Map [Char] b -> Map [Char] a -> Map [Char] a -> Map [Char] a
rule572 Map [Char] (Maybe Any)
_defsAsMap Map [Char] (Maybe NonLocalAttr)
_nextintra Map [Char] (Maybe NonLocalAttr)
_uses
_lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))
_lhsOintramap :: Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap = Map [Char] (Maybe NonLocalAttr)
-> Int -> Map Int (Map [Char] (Maybe NonLocalAttr))
forall a k. a -> k -> Map k a
rule573 Map [Char] (Maybe NonLocalAttr)
_thisintra Int
arg_from_
_nextintra :: Map [Char] (Maybe NonLocalAttr)
_nextintra = Map Int (Map [Char] (Maybe NonLocalAttr))
-> Int -> Map [Char] (Maybe NonLocalAttr)
rule574 Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Int
arg_to_
_uses :: Map [Char] (Maybe NonLocalAttr)
_uses = Options
-> Map [Char] (Maybe NonLocalAttr)
-> Set Identifier
-> Map [Char] (Maybe NonLocalAttr)
rule575 Options
_lhsIoptions Map [Char] (Maybe NonLocalAttr)
_stepsIuses Set Identifier
arg_syn_
_inhVarNms :: Set [Char]
_inhVarNms = Options -> Set Identifier -> Set [Char]
rule576 Options
_lhsIoptions Set Identifier
arg_inh_
_defs :: Set [Char]
_defs = Set [Char] -> Set [Char] -> Set [Char] -> Set [Char]
rule577 Set [Char]
_inhVarNms Set [Char]
_lhsIterminaldefs Set [Char]
_stepsIdefs
_defsAsMap :: Map [Char] (Maybe Any)
_defsAsMap = Set [Char] -> Map [Char] (Maybe Any)
forall a. Set [Char] -> Map [Char] (Maybe a)
rule578 Set [Char]
_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
rule579 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
rule580 Int
arg_ident_ Set Identifier
arg_inh_
_lazyIntrasInh :: Set [Char]
_lazyIntrasInh = Set [Char] -> Set [Char] -> VisitKind -> Set [Char]
rule581 Set [Char]
_inhVarNms Set [Char]
_stepsIdefs VisitKind
arg_kind_
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = Set [Char] -> Set [Char] -> Set [Char]
rule582 Set [Char]
_lazyIntrasInh Set [Char]
_stepsIlazyIntras
_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)
rule583 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
rule584 Int
arg_ident_ VisitKind
arg_kind_
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule585 Seq Error
_stepsIerrors
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule586 Map Identifier (Set VisitKind)
_stepsIruleKinds
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = Map Identifier Int -> Map Identifier Int
rule587 Map Identifier Int
_stepsIruleUsage
_stepsOallFromToStates :: Map Int (Int, Int)
_stepsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule588 Map Int (Int, Int)
_lhsIallFromToStates
_stepsOallInitStates :: Map Identifier Int
_stepsOallInitStates = Map Identifier Int -> Map Identifier Int
rule589 Map Identifier Int
_lhsIallInitStates
_stepsOallVisitKinds :: Map Int VisitKind
_stepsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule590 Map Int VisitKind
_lhsIallVisitKinds
_stepsOallchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_stepsOallchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule591 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit
_stepsOavisitdefs :: Map Int (Set Identifier)
_stepsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule592 Map Int (Set Identifier)
_lhsIavisitdefs
_stepsOavisituses :: Map Int (Set Identifier)
_stepsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule593 Map Int (Set Identifier)
_lhsIavisituses
_stepsOchildTypes :: Attributes
_stepsOchildTypes = Attributes -> Attributes
rule594 Attributes
_lhsIchildTypes
_stepsOchildintros :: Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_stepsOchildintros = Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule595 Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
_stepsOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)
_stepsOmrules = Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> Either Error PP_Doc)
rule596 Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules
_stepsOoptions :: Options
_stepsOoptions = Options -> Options
rule597 Options
_lhsIoptions
_stepsOruledefs :: Map Identifier (Set [Char])
_stepsOruledefs = Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule598 Map Identifier (Set [Char])
_lhsIruledefs
_stepsOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_stepsOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule599 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
__result_ :: T_Visit_vOut46
__result_ = VisitStateState
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Seq Error
-> Map Int (Int, Int)
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Set [Char]
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> (Int, PP_Doc)
-> PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_Visit_vOut46
T_Visit_vOut46 VisitStateState
_lhsOallvisits Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap Set [Char]
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage (Int, PP_Doc)
_lhsOsem_visit PP_Doc
_lhsOt_visits 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 rule544 #-}
{-# LINE 436 "src-ag/ExecutionPlan2Caml.ag" #-}
rule544 = \ from_ ident_ to_ ->
{-# LINE 436 "src-ag/ExecutionPlan2Caml.ag" #-}
(ident_, from_, to_)
{-# LINE 4507 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule545 #-}
{-# LINE 539 "src-ag/ExecutionPlan2Caml.ag" #-}
rule545 = \ ((_lhsInt) :: NontermIdent) ident_ ->
{-# LINE 539 "src-ag/ExecutionPlan2Caml.ag" #-}
conNmTVisitIn _lhsInt ident_
{-# LINE 4513 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule546 #-}
{-# LINE 540 "src-ag/ExecutionPlan2Caml.ag" #-}
rule546 = \ ((_lhsInt) :: NontermIdent) ident_ ->
{-# LINE 540 "src-ag/ExecutionPlan2Caml.ag" #-}
conNmTVisitOut _lhsInt ident_
{-# LINE 4519 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule547 #-}
{-# LINE 541 "src-ag/ExecutionPlan2Caml.ag" #-}
rule547 = \ ((_lhsInt) :: NontermIdent) to_ ->
{-# LINE 541 "src-ag/ExecutionPlan2Caml.ag" #-}
type_nt_sem _lhsInt to_
{-# LINE 4525 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule548 #-}
{-# LINE 542 "src-ag/ExecutionPlan2Caml.ag" #-}
rule548 = \ ((_lhsInt) :: NontermIdent) ident_ ->
{-# LINE 542 "src-ag/ExecutionPlan2Caml.ag" #-}
type_caller_visit _lhsInt ident_
{-# LINE 4531 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule549 #-}
{-# LINE 544 "src-ag/ExecutionPlan2Caml.ag" #-}
rule549 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) to_ ->
{-# LINE 544 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.findWithDefault ManyVis to_ _lhsInextVisits
{-# LINE 4537 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule550 #-}
{-# LINE 546 "src-ag/ExecutionPlan2Caml.ag" #-}
rule550 = \ ((_lhsIparams) :: [Identifier]) ->
{-# LINE 546 "src-ag/ExecutionPlan2Caml.ag" #-}
ppTypeParams _lhsIparams
{-# LINE 4543 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule551 #-}
{-# LINE 547 "src-ag/ExecutionPlan2Caml.ag" #-}
rule551 = \ ((_lhsIparams) :: [Identifier]) ->
{-# LINE 547 "src-ag/ExecutionPlan2Caml.ag" #-}
ppTypeParams (cont_tvar : map pp _lhsIparams)
{-# LINE 4549 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule552 #-}
{-# LINE 551 "src-ag/ExecutionPlan2Caml.ag" #-}
rule552 = \ _contpart _inhpart ((_lhsInt) :: NontermIdent) _nameCaller_visit _nameTIn_visit _nameTOut_visit _synpart _t_c_params _t_params ident_ ->
{-# LINE 551 "src-ag/ExecutionPlan2Caml.ag" #-}
"and" >#< _t_c_params >#< _nameCaller_visit >#< "=" >#< ppRecordTp
[ nm_inh _lhsInt ident_ >#< ":" >#< _t_params >#< conNmTVisitIn _lhsInt ident_
, nm_cont _lhsInt ident_ >#< ":" >#< _t_params >#< conNmTVisitOut _lhsInt ident_ >#< "->" >#< cont_tvar
]
>-< "and" >#< _t_params >#< _nameTIn_visit >#< "=" >#< ppRecordTp _inhpart
>-< "and" >#< _t_params >#< _nameTOut_visit >#< "=" >#< ppRecordTp (_synpart ++ _contpart )
{-# LINE 4560 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule553 #-}
{-# LINE 558 "src-ag/ExecutionPlan2Caml.ag" #-}
rule553 = \ ((_lhsInt) :: NontermIdent) _nameNextState _nextVisitInfo _t_params ident_ ->
{-# LINE 558 "src-ag/ExecutionPlan2Caml.ag" #-}
case _nextVisitInfo of
NoneVis -> []
_ -> [ nm_outarg_cont _lhsInt ident_ >#< ":" >#< _t_params >#< _nameNextState ]
{-# LINE 4568 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule554 #-}
{-# LINE 562 "src-ag/ExecutionPlan2Caml.ag" #-}
rule554 = \ ((_lhsIinhmap) :: Attributes) _ppTypeList inh_ ->
{-# LINE 562 "src-ag/ExecutionPlan2Caml.ag" #-}
_ppTypeList nm_inarg inh_ _lhsIinhmap
{-# LINE 4574 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule555 #-}
{-# LINE 563 "src-ag/ExecutionPlan2Caml.ag" #-}
rule555 = \ ((_lhsIsynmap) :: Attributes) _ppTypeList syn_ ->
{-# LINE 563 "src-ag/ExecutionPlan2Caml.ag" #-}
_ppTypeList nm_outarg syn_ _lhsIsynmap
{-# LINE 4580 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule556 #-}
{-# LINE 564 "src-ag/ExecutionPlan2Caml.ag" #-}
rule556 = \ ((_lhsInt) :: NontermIdent) ident_ ->
{-# LINE 564 "src-ag/ExecutionPlan2Caml.ag" #-}
\f s m -> map (\i -> case Map.lookup i m of
Just tp -> f i _lhsInt ident_ >#< ":" >#< ppTp tp ) $ Set.toList s
{-# LINE 4587 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule557 #-}
{-# LINE 798 "src-ag/ExecutionPlan2Caml.ag" #-}
rule557 = \ ((_lhsIoptions) :: Options) ->
{-# LINE 798 "src-ag/ExecutionPlan2Caml.ag" #-}
typeSigs _lhsIoptions
{-# LINE 4593 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule558 #-}
{-# LINE 799 "src-ag/ExecutionPlan2Caml.ag" #-}
rule558 = \ ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) _nameTIn_visit _nameTOut_visit _o_sigs ((_stepsIsem_steps) :: PP_Doc) _t_params from_ ident_ inh_ ->
{-# LINE 799 "src-ag/ExecutionPlan2Caml.ag" #-}
( from_
, let resTp = _t_params >#< _nameTOut_visit
argTp = _t_params >#< _nameTIn_visit
argMatch = ppRecordVal [ nm_inarg i _lhsInt ident_ >#< "=" >#< lhsname _lhsIoptions True i | i <- Set.toList inh_ ]
in ppFunDecl _o_sigs (nm_visit ident_) [(argMatch, argTp)] resTp _stepsIsem_steps
)
{-# LINE 4604 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule559 #-}
{-# LINE 806 "src-ag/ExecutionPlan2Caml.ag" #-}
rule559 = \ _nextStBuild _resultval ->
{-# LINE 806 "src-ag/ExecutionPlan2Caml.ag" #-}
_nextStBuild >-< _resultval
{-# LINE 4610 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule560 #-}
{-# LINE 808 "src-ag/ExecutionPlan2Caml.ag" #-}
rule560 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) to_ ->
{-# LINE 808 "src-ag/ExecutionPlan2Caml.ag" #-}
maybe Map.empty id $ Map.lookup to_ _lhsIallintramap
{-# LINE 4616 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule561 #-}
{-# LINE 809 "src-ag/ExecutionPlan2Caml.ag" #-}
rule561 = \ _nextArgsMp ->
{-# LINE 809 "src-ag/ExecutionPlan2Caml.ag" #-}
ppSpaced $ Map.keys $ _nextArgsMp
{-# LINE 4622 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule562 #-}
{-# LINE 810 "src-ag/ExecutionPlan2Caml.ag" #-}
rule562 = \ ((_lhsIoptions) :: Options) _nextArgs _nextArgsMp to_ ->
{-# LINE 810 "src-ag/ExecutionPlan2Caml.ag" #-}
nm_st to_ >#< _nextArgs >#< dummyArg _lhsIoptions (Map.null _nextArgsMp )
{-# LINE 4628 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule563 #-}
{-# LINE 812 "src-ag/ExecutionPlan2Caml.ag" #-}
rule563 = \ ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) _nextStRefExp ident_ syn_ ->
{-# LINE 812 "src-ag/ExecutionPlan2Caml.ag" #-}
ppRecordVal
( [ nm_outarg i _lhsInt ident_ >#< "=" >#< lhsname _lhsIoptions False i | i <- Set.toList syn_ ]
++ [ _nextStRefExp ])
{-# LINE 4636 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule564 #-}
{-# LINE 817 "src-ag/ExecutionPlan2Caml.ag" #-}
rule564 = \ ((_lhsInt) :: NontermIdent) _nextStExp _nextVisitInfo ident_ ->
{-# LINE 817 "src-ag/ExecutionPlan2Caml.ag" #-}
case _nextVisitInfo of
NoneVis -> (empty, empty)
_ -> ( "let" >#< nextStName >#< "=" >#< _nextStExp >#< "in"
, nm_outarg_cont _lhsInt ident_ >#< "=" >#< nextStName)
{-# LINE 4645 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule565 #-}
{-# LINE 832 "src-ag/ExecutionPlan2Caml.ag" #-}
rule565 = \ kind_ ->
{-# LINE 832 "src-ag/ExecutionPlan2Caml.ag" #-}
kind_
{-# LINE 4651 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule566 #-}
{-# LINE 884 "src-ag/ExecutionPlan2Caml.ag" #-}
rule566 = \ (_ :: ()) ->
{-# LINE 884 "src-ag/ExecutionPlan2Caml.ag" #-}
0
{-# LINE 4657 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule567 #-}
{-# LINE 891 "src-ag/ExecutionPlan2Caml.ag" #-}
rule567 = \ (_ :: ()) ->
{-# LINE 891 "src-ag/ExecutionPlan2Caml.ag" #-}
0
{-# LINE 4663 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule568 #-}
{-# LINE 908 "src-ag/ExecutionPlan2Caml.ag" #-}
rule568 = \ (_ :: ()) ->
{-# LINE 908 "src-ag/ExecutionPlan2Caml.ag" #-}
False
{-# LINE 4669 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule569 #-}
{-# LINE 1165 "src-ag/ExecutionPlan2Caml.ag" #-}
rule569 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) from_ ->
{-# LINE 1165 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.findWithDefault ManyVis from_ _lhsInextVisits
{-# LINE 4675 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule570 #-}
{-# LINE 1166 "src-ag/ExecutionPlan2Caml.ag" #-}
rule570 = \ _invokecode ident_ ->
{-# LINE 1166 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton ident_ _invokecode
{-# LINE 4681 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule571 #-}
{-# LINE 1168 "src-ag/ExecutionPlan2Caml.ag" #-}
rule571 = \ ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) _nameTOut_visit _nextVisitInfo _o_sigs _prevVisitInfo from_ ident_ inh_ kind_ syn_ to_ ->
{-# LINE 1168 "src-ag/ExecutionPlan2Caml.ag" #-}
\chld childTp kind follow ->
let code = cont >-< inps >-< call
childNmTo = text $ stname chld to_
childNmFrom = text $ stname chld from_
childTpArgs = case childTp of
NT _ args _ -> args
_ -> error "generate visit call: type of the child is not a nonterminal!"
cont = "let" >#< contNm >#< ppArg _o_sigs (ppRecordVal cont_in) cont_in_tp >#< "="
>-< indent 2 follow
>#< "in"
cont_in = [ nm_outarg i _lhsInt ident_ >#< "=" >#< attrname _lhsIoptions True chld i | i <- Set.toList syn_ ]
++ case _nextVisitInfo of
NoneVis -> []
_ -> [ nm_outarg_cont _lhsInt ident_ >#< "=" >#< childNmTo ]
cont_in_tp = ppTypeParams childTpArgs >#< _nameTOut_visit
inps = "let" >#< inpsNm >#< "=" >#< ppRecordVal
[ nm_inh _lhsInt ident_ >#< "=" >#< ppRecordVal inps_in
, nm_cont _lhsInt ident_ >#< "=" >#< contNm
] >#< "in"
inps_in = [ nm_inarg i _lhsInt ident_ >#< "=" >#< attrname _lhsIoptions False chld i | i <- Set.toList inh_ ]
call = childNmFrom >|< "." >|< nm_invoke _lhsInt from_ >#< arg
arg = case _prevVisitInfo of
NoneVis -> error "error: invocation of a visit from a state that has no next visits"
OneVis _ -> pp inpsNm
ManyVis -> pp_parens (con_visit _lhsInt ident_ >#< inpsNm)
in if kind `compatibleKind` kind_
then Right code
else Left $ IncompatibleVisitKind chld ident_ kind kind_
{-# LINE 4714 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule572 #-}
{-# LINE 1273 "src-ag/ExecutionPlan2Caml.ag" #-}
rule572 = \ _defsAsMap _nextintra _uses ->
{-# LINE 1273 "src-ag/ExecutionPlan2Caml.ag" #-}
(_uses `Map.union` _nextintra ) `Map.difference` _defsAsMap
{-# LINE 4720 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule573 #-}
{-# LINE 1274 "src-ag/ExecutionPlan2Caml.ag" #-}
rule573 = \ _thisintra from_ ->
{-# LINE 1274 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton from_ _thisintra
{-# LINE 4726 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule574 #-}
{-# LINE 1275 "src-ag/ExecutionPlan2Caml.ag" #-}
rule574 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) to_ ->
{-# LINE 1275 "src-ag/ExecutionPlan2Caml.ag" #-}
maybe Map.empty id $ Map.lookup to_ _lhsIallintramap
{-# LINE 4732 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule575 #-}
{-# LINE 1276 "src-ag/ExecutionPlan2Caml.ag" #-}
rule575 = \ ((_lhsIoptions) :: Options) ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) syn_ ->
{-# LINE 1276 "src-ag/ExecutionPlan2Caml.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 4740 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule576 #-}
{-# LINE 1279 "src-ag/ExecutionPlan2Caml.ag" #-}
rule576 = \ ((_lhsIoptions) :: Options) inh_ ->
{-# LINE 1279 "src-ag/ExecutionPlan2Caml.ag" #-}
Set.map (lhsname _lhsIoptions True) inh_
{-# LINE 4746 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule577 #-}
{-# LINE 1280 "src-ag/ExecutionPlan2Caml.ag" #-}
rule577 = \ _inhVarNms ((_lhsIterminaldefs) :: Set String) ((_stepsIdefs) :: Set String) ->
{-# LINE 1280 "src-ag/ExecutionPlan2Caml.ag" #-}
_stepsIdefs `Set.union` _inhVarNms `Set.union` _lhsIterminaldefs
{-# LINE 4752 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule578 #-}
{-# LINE 1281 "src-ag/ExecutionPlan2Caml.ag" #-}
rule578 = \ _defs ->
{-# LINE 1281 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.fromList [ (a, Nothing) | a <- Set.elems _defs ]
{-# LINE 4758 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule579 #-}
{-# LINE 1305 "src-ag/ExecutionPlan2Caml.ag" #-}
rule579 = \ ident_ syn_ ->
{-# LINE 1305 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton ident_ syn_
{-# LINE 4764 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule580 #-}
{-# LINE 1306 "src-ag/ExecutionPlan2Caml.ag" #-}
rule580 = \ ident_ inh_ ->
{-# LINE 1306 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton ident_ inh_
{-# LINE 4770 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule581 #-}
{-# LINE 1338 "src-ag/ExecutionPlan2Caml.ag" #-}
rule581 = \ _inhVarNms ((_stepsIdefs) :: Set String) kind_ ->
{-# LINE 1338 "src-ag/ExecutionPlan2Caml.ag" #-}
case kind_ of
VisitPure False -> _inhVarNms `Set.union` _stepsIdefs
_ -> Set.empty
{-# LINE 4778 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule582 #-}
{-# LINE 1341 "src-ag/ExecutionPlan2Caml.ag" #-}
rule582 = \ _lazyIntrasInh ((_stepsIlazyIntras) :: Set String) ->
{-# LINE 1341 "src-ag/ExecutionPlan2Caml.ag" #-}
_lazyIntrasInh `Set.union` _stepsIlazyIntras
{-# LINE 4784 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule583 #-}
{-# LINE 1404 "src-ag/ExecutionPlan2Caml.ag" #-}
rule583 = \ from_ ident_ to_ ->
{-# LINE 1404 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton ident_ (from_, to_)
{-# LINE 4790 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule584 #-}
{-# LINE 1448 "src-ag/ExecutionPlan2Caml.ag" #-}
rule584 = \ ident_ kind_ ->
{-# LINE 1448 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton ident_ kind_
{-# LINE 4796 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule585 #-}
rule585 = \ ((_stepsIerrors) :: Seq Error) ->
_stepsIerrors
{-# INLINE rule586 #-}
rule586 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->
_stepsIruleKinds
{-# INLINE rule587 #-}
rule587 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->
_stepsIruleUsage
{-# INLINE rule588 #-}
rule588 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule589 #-}
rule589 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule590 #-}
rule590 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule591 #-}
rule591 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
_lhsIallchildvisit
{-# INLINE rule592 #-}
rule592 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule593 #-}
rule593 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule594 #-}
rule594 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->
_lhsIchildTypes
{-# INLINE rule595 #-}
rule595 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
_lhsIchildintros
{-# INLINE rule596 #-}
rule596 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->
_lhsImrules
{-# INLINE rule597 #-}
rule597 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule598 #-}
rule598 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->
_lhsIruledefs
{-# INLINE rule599 #-}
rule599 = \ ((_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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
allchildvisit_Inh_VisitStep :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error 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
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
childintros_Inh_VisitStep :: (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), Inh_VisitStep -> PP_Doc
follow_Inh_VisitStep :: (PP_Doc), 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 -> Either Error PP_Doc)
mrules_Inh_VisitStep :: (Map Identifier (VisitKind -> Either Error PP_Doc)), Inh_VisitStep -> Options
options_Inh_VisitStep :: (Options), Inh_VisitStep -> Int
prevMaxSimRefs_Inh_VisitStep :: (Int), Inh_VisitStep -> Map Identifier (Set [Char])
ruledefs_Inh_VisitStep :: (Map Identifier (Set String)), Inh_VisitStep -> Map Identifier (Map [Char] (Maybe NonLocalAttr))
ruleuses_Inh_VisitStep :: (Map Identifier (Map String (Maybe NonLocalAttr))), Inh_VisitStep -> Bool
useParallel_Inh_VisitStep :: (Bool) }
data Syn_VisitStep = Syn_VisitStep { Syn_VisitStep -> Set [Char]
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 [Char]
lazyIntras_Syn_VisitStep :: (Set String), Syn_VisitStep -> Int
prevMaxSimRefs_Syn_VisitStep :: (Int), 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 -> Map [Char] (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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros PP_Doc
_lhsIfollow Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) =
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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> PP_Doc
-> Int
-> Bool
-> VisitKind
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Options
-> Int
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Bool
-> T_VisitStep_vIn49
T_VisitStep_vIn49 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros PP_Doc
_lhsIfollow Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel
(T_VisitStep_vOut49 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Map [Char] (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 [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> Syn_VisitStep
Syn_VisitStep Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Map [Char] (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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (PP_Doc) (Int) (Bool) (VisitKind) (Map Identifier (VisitKind -> Either Error PP_Doc)) (Options) (Int) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Bool)
data T_VisitStep_vOut49 = T_VisitStep_vOut49 (Set String) (Seq Error) (Int) (Bool) (Set String) (Int) (Map Identifier (Set VisitKind)) (Map Identifier Int) (PP_Doc) (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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros PP_Doc
_lhsIfollow Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) -> ( let
_ruleItf :: VisitKind -> Either Error PP_Doc
_ruleItf = Map Identifier (VisitKind -> Either Error PP_Doc)
-> Identifier -> VisitKind -> Either Error PP_Doc
rule600 Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Identifier
arg_name_
_lhsOerrors :: Seq Error
(Seq Error
_lhsOerrors,PP_Doc
_sem_steps) = VisitKind
-> (VisitKind -> Either Error PP_Doc) -> (Seq Error, PP_Doc)
forall a.
VisitKind -> (VisitKind -> Either a PP_Doc) -> (Seq a, PP_Doc)
rule601 VisitKind
_lhsIkind VisitKind -> Either Error PP_Doc
_ruleItf
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps = PP_Doc -> PP_Doc -> PP_Doc
rule602 PP_Doc
_lhsIfollow PP_Doc
_sem_steps
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = Identifier -> Map Identifier Int
forall k. k -> Map k Int
rule603 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)
rule604 VisitKind
_lhsIkind Identifier
arg_name_
_lhsOdefs :: Set String
_lhsOdefs :: Set [Char]
_lhsOdefs = Map Identifier (Set [Char]) -> Identifier -> Set [Char]
rule605 Map Identifier (Set [Char])
_lhsIruledefs Identifier
arg_name_
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses :: Map [Char] (Maybe NonLocalAttr)
_lhsOuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Identifier -> Map [Char] (Maybe NonLocalAttr)
rule606 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Identifier
arg_name_
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = () -> Set [Char]
forall a. () -> Set a
rule607 ()
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule608 ()
_lhsOindex :: Int
_lhsOindex :: Int
_lhsOindex = Int -> Int
rule609 Int
_lhsIindex
_lhsOisLast :: Bool
_lhsOisLast :: Bool
_lhsOisLast = Bool -> Bool
rule610 Bool
_lhsIisLast
_lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs = Int -> Int
rule611 Int
_lhsIprevMaxSimRefs
__result_ :: T_VisitStep_vOut49
__result_ = Set [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitStep_vOut49
T_VisitStep_vOut49 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Map [Char] (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 rule600 #-}
{-# LINE 849 "src-ag/ExecutionPlan2Caml.ag" #-}
rule600 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) name_ ->
{-# LINE 849 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.findWithDefault (error $ "Rule " ++ show name_ ++ " not found") name_ _lhsImrules
{-# LINE 4915 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule601 #-}
{-# LINE 850 "src-ag/ExecutionPlan2Caml.ag" #-}
rule601 = \ ((_lhsIkind) :: VisitKind) _ruleItf ->
{-# LINE 850 "src-ag/ExecutionPlan2Caml.ag" #-}
case _ruleItf _lhsIkind of
Left e -> (Seq.singleton e, empty)
Right stmt -> (Seq.empty, stmt)
{-# LINE 4923 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule602 #-}
{-# LINE 853 "src-ag/ExecutionPlan2Caml.ag" #-}
rule602 = \ ((_lhsIfollow) :: PP_Doc) _sem_steps ->
{-# LINE 853 "src-ag/ExecutionPlan2Caml.ag" #-}
_sem_steps >-< _lhsIfollow
{-# LINE 4929 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule603 #-}
{-# LINE 1226 "src-ag/ExecutionPlan2Caml.ag" #-}
rule603 = \ name_ ->
{-# LINE 1226 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton name_ 1
{-# LINE 4935 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule604 #-}
{-# LINE 1236 "src-ag/ExecutionPlan2Caml.ag" #-}
rule604 = \ ((_lhsIkind) :: VisitKind) name_ ->
{-# LINE 1236 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.singleton name_ (Set.singleton _lhsIkind)
{-# LINE 4941 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule605 #-}
{-# LINE 1321 "src-ag/ExecutionPlan2Caml.ag" #-}
rule605 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) name_ ->
{-# LINE 1321 "src-ag/ExecutionPlan2Caml.ag" #-}
maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruledefs
{-# LINE 4947 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule606 #-}
{-# LINE 1322 "src-ag/ExecutionPlan2Caml.ag" #-}
rule606 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) name_ ->
{-# LINE 1322 "src-ag/ExecutionPlan2Caml.ag" #-}
maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruleuses
{-# LINE 4953 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule607 #-}
rule607 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule608 #-}
rule608 = \ (_ :: ()) ->
mempty
{-# INLINE rule609 #-}
rule609 = \ ((_lhsIindex) :: Int) ->
_lhsIindex
{-# INLINE rule610 #-}
rule610 = \ ((_lhsIisLast) :: Bool) ->
_lhsIisLast
{-# INLINE rule611 #-}
rule611 = \ ((_lhsIprevMaxSimRefs) :: Int) ->
_lhsIprevMaxSimRefs
{-# 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros PP_Doc
_lhsIfollow Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) -> ( let
_visitItf :: Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc
_visitItf = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Int
-> Identifier
-> Type
-> VisitKind
-> PP_Doc
-> Either Error PP_Doc
rule612 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Int
arg_visit_
_childType :: Type
_childType = Attributes -> Identifier -> Type
rule613 Attributes
_lhsIchildTypes Identifier
arg_child_
_lhsOerrors :: Seq Error
_lhsOsem_steps :: PP_Doc
(Seq Error
_lhsOerrors,PP_Doc
_lhsOsem_steps) = Type
-> PP_Doc
-> VisitKind
-> (Identifier
-> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Identifier
-> (Seq Error, PP_Doc)
forall t t a.
t
-> PP_Doc
-> VisitKind
-> (t -> t -> VisitKind -> PP_Doc -> Either a PP_Doc)
-> t
-> (Seq a, PP_Doc)
rule614 Type
_childType PP_Doc
_lhsIfollow VisitKind
_lhsIkind Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc
_visitItf Identifier
arg_child_
_lhsOdefs :: Set String
_lhsOdefs :: Set [Char]
_lhsOdefs = Map Int (Set Identifier)
-> Options -> Int -> Identifier -> Int -> Set [Char]
rule615 Map Int (Set Identifier)
_lhsIavisitdefs Options
_lhsIoptions Int
_to Identifier
arg_child_ Int
arg_visit_
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses :: Map [Char] (Maybe NonLocalAttr)
_lhsOuses = Int
-> Map Int (Set Identifier)
-> Options
-> Identifier
-> Int
-> Map [Char] (Maybe NonLocalAttr)
rule616 Int
_from Map Int (Set Identifier)
_lhsIavisituses Options
_lhsIoptions Identifier
arg_child_ Int
arg_visit_
(Int
_from,Int
_to) = Map Int (Int, Int) -> Int -> (Int, Int)
rule617 Map Int (Int, Int)
_lhsIallFromToStates Int
arg_visit_
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = () -> Set [Char]
forall a. () -> Set a
rule618 ()
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = () -> Map Identifier (Set VisitKind)
forall k a. () -> Map k a
rule619 ()
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = () -> Map Identifier Int
forall k a. () -> Map k a
rule620 ()
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule621 ()
_lhsOindex :: Int
_lhsOindex :: Int
_lhsOindex = Int -> Int
rule622 Int
_lhsIindex
_lhsOisLast :: Bool
_lhsOisLast :: Bool
_lhsOisLast = Bool -> Bool
rule623 Bool
_lhsIisLast
_lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs = Int -> Int
rule624 Int
_lhsIprevMaxSimRefs
__result_ :: T_VisitStep_vOut49
__result_ = Set [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitStep_vOut49
T_VisitStep_vOut49 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Map [Char] (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 rule612 #-}
{-# LINE 860 "src-ag/ExecutionPlan2Caml.ag" #-}
rule612 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) visit_ ->
{-# LINE 860 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.findWithDefault (error $ "Visit " ++ show visit_ ++ " not found") visit_ _lhsIallchildvisit
{-# LINE 5008 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule613 #-}
{-# LINE 861 "src-ag/ExecutionPlan2Caml.ag" #-}
rule613 = \ ((_lhsIchildTypes) :: Map Identifier Type) child_ ->
{-# LINE 861 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.findWithDefault (error ("type of child " ++ show child_ ++ " is not in the childTypes map! " ++ show _lhsIchildTypes)) child_ _lhsIchildTypes
{-# LINE 5014 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule614 #-}
{-# LINE 862 "src-ag/ExecutionPlan2Caml.ag" #-}
rule614 = \ _childType ((_lhsIfollow) :: PP_Doc) ((_lhsIkind) :: VisitKind) _visitItf child_ ->
{-# LINE 862 "src-ag/ExecutionPlan2Caml.ag" #-}
case _visitItf child_ _childType _lhsIkind _lhsIfollow of
Left e -> (Seq.singleton e, empty)
Right steps -> (Seq.empty, steps)
{-# LINE 5022 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule615 #-}
{-# LINE 1323 "src-ag/ExecutionPlan2Caml.ag" #-}
rule615 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_lhsIoptions) :: Options) _to child_ visit_ ->
{-# LINE 1323 "src-ag/ExecutionPlan2Caml.ag" #-}
Set.insert (stname child_ _to) $ maybe (error "Visit not found") (Set.map $ attrname _lhsIoptions True child_) $ Map.lookup visit_ _lhsIavisitdefs
{-# LINE 5028 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule616 #-}
{-# LINE 1324 "src-ag/ExecutionPlan2Caml.ag" #-}
rule616 = \ _from ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ((_lhsIoptions) :: Options) child_ visit_ ->
{-# LINE 1324 "src-ag/ExecutionPlan2Caml.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 5036 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule617 #-}
{-# LINE 1410 "src-ag/ExecutionPlan2Caml.ag" #-}
rule617 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) visit_ ->
{-# LINE 1410 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.findWithDefault (error "visit not in allFromToStates") visit_ _lhsIallFromToStates
{-# LINE 5042 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule618 #-}
rule618 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule619 #-}
rule619 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule620 #-}
rule620 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule621 #-}
rule621 = \ (_ :: ()) ->
mempty
{-# INLINE rule622 #-}
rule622 = \ ((_lhsIindex) :: Int) ->
_lhsIindex
{-# INLINE rule623 #-}
rule623 = \ ((_lhsIisLast) :: Bool) ->
_lhsIisLast
{-# INLINE rule624 #-}
rule624 = \ ((_lhsIprevMaxSimRefs) :: Int) ->
_lhsIprevMaxSimRefs
{-# 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros PP_Doc
_lhsIfollow Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) -> ( 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 [Char]
_stepsIdefs Seq Error
_stepsIerrors Int
_stepsIindex Bool
_stepsIisLast Set [Char]
_stepsIlazyIntras Int
_stepsIprevMaxSimRefs Map Identifier (Set VisitKind)
_stepsIruleKinds Map Identifier Int
_stepsIruleUsage PP_Doc
_stepsIsem_steps Int
_stepsIsize Map [Char] (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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> PP_Doc
-> Int
-> VisitKind
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Options
-> Int
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Bool
-> T_VisitSteps_vIn52
T_VisitSteps_vIn52 Map Int (Int, Int)
_stepsOallFromToStates Map Identifier Int
_stepsOallInitStates Map Int VisitKind
_stepsOallVisitKinds Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_stepsOallchildvisit Map Int (Set Identifier)
_stepsOavisitdefs Map Int (Set Identifier)
_stepsOavisituses Attributes
_stepsOchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_stepsOchildintros PP_Doc
_stepsOfollow Int
_stepsOindex VisitKind
_stepsOkind Map Identifier (VisitKind -> Either Error PP_Doc)
_stepsOmrules Options
_stepsOoptions Int
_stepsOprevMaxSimRefs Map Identifier (Set [Char])
_stepsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_stepsOruleuses Bool
_stepsOuseParallel)
_stepsOkind :: VisitKind
_stepsOkind = Bool -> VisitKind
rule625 Bool
arg_ordered_
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = Set [Char] -> Set [Char] -> Bool -> Set [Char]
rule626 Set [Char]
_stepsIdefs Set [Char]
_stepsIlazyIntras Bool
arg_ordered_
_lhsOdefs :: Set String
_lhsOdefs :: Set [Char]
_lhsOdefs = Set [Char] -> Set [Char]
rule627 Set [Char]
_stepsIdefs
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule628 Seq Error
_stepsIerrors
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule629 Map Identifier (Set VisitKind)
_stepsIruleKinds
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = Map Identifier Int -> Map Identifier Int
rule630 Map Identifier Int
_stepsIruleUsage
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps = PP_Doc -> PP_Doc
rule631 PP_Doc
_stepsIsem_steps
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses :: Map [Char] (Maybe NonLocalAttr)
_lhsOuses = Map [Char] (Maybe NonLocalAttr) -> Map [Char] (Maybe NonLocalAttr)
rule632 Map [Char] (Maybe NonLocalAttr)
_stepsIuses
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind
rule633 Map Int VisitKind
_stepsIvisitKinds
_lhsOindex :: Int
_lhsOindex :: Int
_lhsOindex = Int -> Int
rule634 Int
_stepsIindex
_lhsOisLast :: Bool
_lhsOisLast :: Bool
_lhsOisLast = Bool -> Bool
rule635 Bool
_stepsIisLast
_lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs = Int -> Int
rule636 Int
_stepsIprevMaxSimRefs
_stepsOallFromToStates :: Map Int (Int, Int)
_stepsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule637 Map Int (Int, Int)
_lhsIallFromToStates
_stepsOallInitStates :: Map Identifier Int
_stepsOallInitStates = Map Identifier Int -> Map Identifier Int
rule638 Map Identifier Int
_lhsIallInitStates
_stepsOallVisitKinds :: Map Int VisitKind
_stepsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule639 Map Int VisitKind
_lhsIallVisitKinds
_stepsOallchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_stepsOallchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule640 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit
_stepsOavisitdefs :: Map Int (Set Identifier)
_stepsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule641 Map Int (Set Identifier)
_lhsIavisitdefs
_stepsOavisituses :: Map Int (Set Identifier)
_stepsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule642 Map Int (Set Identifier)
_lhsIavisituses
_stepsOchildTypes :: Attributes
_stepsOchildTypes = Attributes -> Attributes
rule643 Attributes
_lhsIchildTypes
_stepsOchildintros :: Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_stepsOchildintros = Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule644 Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
_stepsOfollow :: PP_Doc
_stepsOfollow = PP_Doc -> PP_Doc
rule645 PP_Doc
_lhsIfollow
_stepsOindex :: Int
_stepsOindex = Int -> Int
rule646 Int
_lhsIindex
_stepsOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)
_stepsOmrules = Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> Either Error PP_Doc)
rule647 Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules
_stepsOoptions :: Options
_stepsOoptions = Options -> Options
rule648 Options
_lhsIoptions
_stepsOprevMaxSimRefs :: Int
_stepsOprevMaxSimRefs = Int -> Int
rule649 Int
_lhsIprevMaxSimRefs
_stepsOruledefs :: Map Identifier (Set [Char])
_stepsOruledefs = Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule650 Map Identifier (Set [Char])
_lhsIruledefs
_stepsOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_stepsOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule651 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
_stepsOuseParallel :: Bool
_stepsOuseParallel = Bool -> Bool
rule652 Bool
_lhsIuseParallel
__result_ :: T_VisitStep_vOut49
__result_ = Set [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitStep_vOut49
T_VisitStep_vOut49 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Map [Char] (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 rule625 #-}
{-# LINE 836 "src-ag/ExecutionPlan2Caml.ag" #-}
rule625 = \ ordered_ ->
{-# LINE 836 "src-ag/ExecutionPlan2Caml.ag" #-}
VisitPure ordered_
{-# LINE 5120 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule626 #-}
{-# LINE 1344 "src-ag/ExecutionPlan2Caml.ag" #-}
rule626 = \ ((_stepsIdefs) :: Set String) ((_stepsIlazyIntras) :: Set String) ordered_ ->
{-# LINE 1344 "src-ag/ExecutionPlan2Caml.ag" #-}
if ordered_
then _stepsIlazyIntras
else _stepsIdefs
{-# LINE 5128 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule627 #-}
rule627 = \ ((_stepsIdefs) :: Set String) ->
_stepsIdefs
{-# INLINE rule628 #-}
rule628 = \ ((_stepsIerrors) :: Seq Error) ->
_stepsIerrors
{-# INLINE rule629 #-}
rule629 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->
_stepsIruleKinds
{-# INLINE rule630 #-}
rule630 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->
_stepsIruleUsage
{-# INLINE rule631 #-}
rule631 = \ ((_stepsIsem_steps) :: PP_Doc) ->
_stepsIsem_steps
{-# INLINE rule632 #-}
rule632 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) ->
_stepsIuses
{-# INLINE rule633 #-}
rule633 = \ ((_stepsIvisitKinds) :: Map VisitIdentifier VisitKind) ->
_stepsIvisitKinds
{-# INLINE rule634 #-}
rule634 = \ ((_stepsIindex) :: Int) ->
_stepsIindex
{-# INLINE rule635 #-}
rule635 = \ ((_stepsIisLast) :: Bool) ->
_stepsIisLast
{-# INLINE rule636 #-}
rule636 = \ ((_stepsIprevMaxSimRefs) :: Int) ->
_stepsIprevMaxSimRefs
{-# INLINE rule637 #-}
rule637 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule638 #-}
rule638 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule639 #-}
rule639 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule640 #-}
rule640 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
_lhsIallchildvisit
{-# INLINE rule641 #-}
rule641 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule642 #-}
rule642 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule643 #-}
rule643 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->
_lhsIchildTypes
{-# INLINE rule644 #-}
rule644 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
_lhsIchildintros
{-# INLINE rule645 #-}
rule645 = \ ((_lhsIfollow) :: PP_Doc) ->
_lhsIfollow
{-# INLINE rule646 #-}
rule646 = \ ((_lhsIindex) :: Int) ->
_lhsIindex
{-# INLINE rule647 #-}
rule647 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->
_lhsImrules
{-# INLINE rule648 #-}
rule648 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule649 #-}
rule649 = \ ((_lhsIprevMaxSimRefs) :: Int) ->
_lhsIprevMaxSimRefs
{-# INLINE rule650 #-}
rule650 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->
_lhsIruledefs
{-# INLINE rule651 #-}
rule651 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
_lhsIruleuses
{-# INLINE rule652 #-}
rule652 = \ ((_lhsIuseParallel) :: Bool) ->
_lhsIuseParallel
{-# 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros PP_Doc
_lhsIfollow Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) -> ( 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 [Char]
_stepsIdefs Seq Error
_stepsIerrors Int
_stepsIindex Bool
_stepsIisLast Set [Char]
_stepsIlazyIntras Int
_stepsIprevMaxSimRefs Map Identifier (Set VisitKind)
_stepsIruleKinds Map Identifier Int
_stepsIruleUsage PP_Doc
_stepsIsem_steps Int
_stepsIsize Map [Char] (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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> PP_Doc
-> Int
-> VisitKind
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Options
-> Int
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Bool
-> T_VisitSteps_vIn52
T_VisitSteps_vIn52 Map Int (Int, Int)
_stepsOallFromToStates Map Identifier Int
_stepsOallInitStates Map Int VisitKind
_stepsOallVisitKinds Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_stepsOallchildvisit Map Int (Set Identifier)
_stepsOavisitdefs Map Int (Set Identifier)
_stepsOavisituses Attributes
_stepsOchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_stepsOchildintros PP_Doc
_stepsOfollow Int
_stepsOindex VisitKind
_stepsOkind Map Identifier (VisitKind -> Either Error PP_Doc)
_stepsOmrules Options
_stepsOoptions Int
_stepsOprevMaxSimRefs Map Identifier (Set [Char])
_stepsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_stepsOruleuses Bool
_stepsOuseParallel)
_stepsOindex :: Int
_stepsOindex = () -> Int
rule653 ()
_lhsOindex :: Int
_lhsOindex :: Int
_lhsOindex = Int -> Int
rule654 Int
_lhsIindex
_lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs = Int -> Int -> Bool -> Int
rule655 Int
_lhsIprevMaxSimRefs Int
_stepsIindex Bool
_useParallel
_useParallel :: Bool
_useParallel = Options -> Int -> Bool
rule656 Options
_lhsIoptions Int
_stepsIsize
_lhsOdefs :: Set String
_lhsOdefs :: Set [Char]
_lhsOdefs = Set [Char] -> Set [Char]
rule657 Set [Char]
_stepsIdefs
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule658 Seq Error
_stepsIerrors
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = Set [Char] -> Set [Char]
rule659 Set [Char]
_stepsIlazyIntras
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule660 Map Identifier (Set VisitKind)
_stepsIruleKinds
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = Map Identifier Int -> Map Identifier Int
rule661 Map Identifier Int
_stepsIruleUsage
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps = PP_Doc -> PP_Doc
rule662 PP_Doc
_stepsIsem_steps
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses :: Map [Char] (Maybe NonLocalAttr)
_lhsOuses = Map [Char] (Maybe NonLocalAttr) -> Map [Char] (Maybe NonLocalAttr)
rule663 Map [Char] (Maybe NonLocalAttr)
_stepsIuses
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind
rule664 Map Int VisitKind
_stepsIvisitKinds
_lhsOisLast :: Bool
_lhsOisLast :: Bool
_lhsOisLast = Bool -> Bool
rule665 Bool
_stepsIisLast
_stepsOallFromToStates :: Map Int (Int, Int)
_stepsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule666 Map Int (Int, Int)
_lhsIallFromToStates
_stepsOallInitStates :: Map Identifier Int
_stepsOallInitStates = Map Identifier Int -> Map Identifier Int
rule667 Map Identifier Int
_lhsIallInitStates
_stepsOallVisitKinds :: Map Int VisitKind
_stepsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule668 Map Int VisitKind
_lhsIallVisitKinds
_stepsOallchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_stepsOallchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule669 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit
_stepsOavisitdefs :: Map Int (Set Identifier)
_stepsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule670 Map Int (Set Identifier)
_lhsIavisitdefs
_stepsOavisituses :: Map Int (Set Identifier)
_stepsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule671 Map Int (Set Identifier)
_lhsIavisituses
_stepsOchildTypes :: Attributes
_stepsOchildTypes = Attributes -> Attributes
rule672 Attributes
_lhsIchildTypes
_stepsOchildintros :: Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_stepsOchildintros = Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule673 Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
_stepsOfollow :: PP_Doc
_stepsOfollow = PP_Doc -> PP_Doc
rule674 PP_Doc
_lhsIfollow
_stepsOkind :: VisitKind
_stepsOkind = VisitKind -> VisitKind
rule675 VisitKind
_lhsIkind
_stepsOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)
_stepsOmrules = Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> Either Error PP_Doc)
rule676 Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules
_stepsOoptions :: Options
_stepsOoptions = Options -> Options
rule677 Options
_lhsIoptions
_stepsOprevMaxSimRefs :: Int
_stepsOprevMaxSimRefs = Int -> Int
rule678 Int
_lhsIprevMaxSimRefs
_stepsOruledefs :: Map Identifier (Set [Char])
_stepsOruledefs = Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule679 Map Identifier (Set [Char])
_lhsIruledefs
_stepsOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_stepsOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule680 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
_stepsOuseParallel :: Bool
_stepsOuseParallel = Bool -> Bool
forall a. a -> a
rule681 Bool
_useParallel
__result_ :: T_VisitStep_vOut49
__result_ = Set [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitStep_vOut49
T_VisitStep_vOut49 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Map [Char] (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 rule653 #-}
{-# LINE 885 "src-ag/ExecutionPlan2Caml.ag" #-}
rule653 = \ (_ :: ()) ->
{-# LINE 885 "src-ag/ExecutionPlan2Caml.ag" #-}
0
{-# LINE 5264 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule654 #-}
{-# LINE 886 "src-ag/ExecutionPlan2Caml.ag" #-}
rule654 = \ ((_lhsIindex) :: Int) ->
{-# LINE 886 "src-ag/ExecutionPlan2Caml.ag" #-}
_lhsIindex
{-# LINE 5270 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule655 #-}
{-# LINE 893 "src-ag/ExecutionPlan2Caml.ag" #-}
rule655 = \ ((_lhsIprevMaxSimRefs) :: Int) ((_stepsIindex) :: Int) _useParallel ->
{-# LINE 893 "src-ag/ExecutionPlan2Caml.ag" #-}
if _useParallel
then _lhsIprevMaxSimRefs `max` (_stepsIindex - 1)
else _lhsIprevMaxSimRefs
{-# LINE 5278 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule656 #-}
{-# LINE 909 "src-ag/ExecutionPlan2Caml.ag" #-}
rule656 = \ ((_lhsIoptions) :: Options) ((_stepsIsize) :: Int) ->
{-# LINE 909 "src-ag/ExecutionPlan2Caml.ag" #-}
parallelInvoke _lhsIoptions && _stepsIsize > 1
{-# LINE 5284 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule657 #-}
rule657 = \ ((_stepsIdefs) :: Set String) ->
_stepsIdefs
{-# INLINE rule658 #-}
rule658 = \ ((_stepsIerrors) :: Seq Error) ->
_stepsIerrors
{-# INLINE rule659 #-}
rule659 = \ ((_stepsIlazyIntras) :: Set String) ->
_stepsIlazyIntras
{-# INLINE rule660 #-}
rule660 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->
_stepsIruleKinds
{-# INLINE rule661 #-}
rule661 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->
_stepsIruleUsage
{-# INLINE rule662 #-}
rule662 = \ ((_stepsIsem_steps) :: PP_Doc) ->
_stepsIsem_steps
{-# INLINE rule663 #-}
rule663 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) ->
_stepsIuses
{-# INLINE rule664 #-}
rule664 = \ ((_stepsIvisitKinds) :: Map VisitIdentifier VisitKind) ->
_stepsIvisitKinds
{-# INLINE rule665 #-}
rule665 = \ ((_stepsIisLast) :: Bool) ->
_stepsIisLast
{-# INLINE rule666 #-}
rule666 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule667 #-}
rule667 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule668 #-}
rule668 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule669 #-}
rule669 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
_lhsIallchildvisit
{-# INLINE rule670 #-}
rule670 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule671 #-}
rule671 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule672 #-}
rule672 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->
_lhsIchildTypes
{-# INLINE rule673 #-}
rule673 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
_lhsIchildintros
{-# INLINE rule674 #-}
rule674 = \ ((_lhsIfollow) :: PP_Doc) ->
_lhsIfollow
{-# INLINE rule675 #-}
rule675 = \ ((_lhsIkind) :: VisitKind) ->
_lhsIkind
{-# INLINE rule676 #-}
rule676 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->
_lhsImrules
{-# INLINE rule677 #-}
rule677 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule678 #-}
rule678 = \ ((_lhsIprevMaxSimRefs) :: Int) ->
_lhsIprevMaxSimRefs
{-# INLINE rule679 #-}
rule679 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->
_lhsIruledefs
{-# INLINE rule680 #-}
rule680 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
_lhsIruleuses
{-# INLINE rule681 #-}
rule681 = \ _useParallel ->
_useParallel
{-# 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros PP_Doc
_lhsIfollow Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) -> ( let
_attachItf :: VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr))
_attachItf = Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Identifier
-> VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr))
rule682 Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
arg_child_
_lhsOerrors :: Seq Error
_lhsOdefs :: Set String
_lhsOuses :: Map String (Maybe NonLocalAttr)
(Seq Error
_lhsOerrors,PP_Doc
_sem_steps,Set [Char]
_lhsOdefs,Map [Char] (Maybe NonLocalAttr)
_lhsOuses) = (VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> VisitKind
-> (Seq Error, PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr))
forall a a k a.
(VisitKind -> Either a (PP_Doc, Set a, Map k a))
-> VisitKind -> (Seq a, PP_Doc, Set a, Map k a)
rule683 VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr))
_attachItf VisitKind
_lhsIkind
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps = PP_Doc -> PP_Doc -> PP_Doc
rule684 PP_Doc
_lhsIfollow PP_Doc
_sem_steps
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = () -> Set [Char]
forall a. () -> Set a
rule685 ()
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = () -> Map Identifier (Set VisitKind)
forall k a. () -> Map k a
rule686 ()
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = () -> Map Identifier Int
forall k a. () -> Map k a
rule687 ()
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule688 ()
_lhsOindex :: Int
_lhsOindex :: Int
_lhsOindex = Int -> Int
rule689 Int
_lhsIindex
_lhsOisLast :: Bool
_lhsOisLast :: Bool
_lhsOisLast = Bool -> Bool
rule690 Bool
_lhsIisLast
_lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs = Int -> Int
rule691 Int
_lhsIprevMaxSimRefs
__result_ :: T_VisitStep_vOut49
__result_ = Set [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitStep_vOut49
T_VisitStep_vOut49 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Map [Char] (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 rule682 #-}
{-# LINE 854 "src-ag/ExecutionPlan2Caml.ag" #-}
rule682 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) child_ ->
{-# LINE 854 "src-ag/ExecutionPlan2Caml.ag" #-}
Map.findWithDefault (error $ "Child " ++ show child_ ++ " not found") child_ _lhsIchildintros
{-# LINE 5396 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule683 #-}
{-# LINE 856 "src-ag/ExecutionPlan2Caml.ag" #-}
rule683 = \ _attachItf ((_lhsIkind) :: VisitKind) ->
{-# LINE 856 "src-ag/ExecutionPlan2Caml.ag" #-}
case _attachItf _lhsIkind of
Left e -> (Seq.singleton e, empty, Set.empty, Map.empty)
Right (code, defs, uses) -> (Seq.empty, code, defs, uses)
{-# LINE 5404 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule684 #-}
{-# LINE 859 "src-ag/ExecutionPlan2Caml.ag" #-}
rule684 = \ ((_lhsIfollow) :: PP_Doc) _sem_steps ->
{-# LINE 859 "src-ag/ExecutionPlan2Caml.ag" #-}
_sem_steps >-< _lhsIfollow
{-# LINE 5410 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule685 #-}
rule685 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule686 #-}
rule686 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule687 #-}
rule687 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule688 #-}
rule688 = \ (_ :: ()) ->
mempty
{-# INLINE rule689 #-}
rule689 = \ ((_lhsIindex) :: Int) ->
_lhsIindex
{-# INLINE rule690 #-}
rule690 = \ ((_lhsIisLast) :: Bool) ->
_lhsIisLast
{-# INLINE rule691 #-}
rule691 = \ ((_lhsIprevMaxSimRefs) :: Int) ->
_lhsIprevMaxSimRefs
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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
allchildvisit_Inh_VisitSteps :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error 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
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
childintros_Inh_VisitSteps :: (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), Inh_VisitSteps -> PP_Doc
follow_Inh_VisitSteps :: (PP_Doc), Inh_VisitSteps -> Int
index_Inh_VisitSteps :: (Int), Inh_VisitSteps -> VisitKind
kind_Inh_VisitSteps :: (VisitKind), Inh_VisitSteps -> Map Identifier (VisitKind -> Either Error PP_Doc)
mrules_Inh_VisitSteps :: (Map Identifier (VisitKind -> Either Error PP_Doc)), Inh_VisitSteps -> Options
options_Inh_VisitSteps :: (Options), Inh_VisitSteps -> Int
prevMaxSimRefs_Inh_VisitSteps :: (Int), Inh_VisitSteps -> Map Identifier (Set [Char])
ruledefs_Inh_VisitSteps :: (Map Identifier (Set String)), Inh_VisitSteps -> Map Identifier (Map [Char] (Maybe NonLocalAttr))
ruleuses_Inh_VisitSteps :: (Map Identifier (Map String (Maybe NonLocalAttr))), Inh_VisitSteps -> Bool
useParallel_Inh_VisitSteps :: (Bool) }
data Syn_VisitSteps = Syn_VisitSteps { Syn_VisitSteps -> Set [Char]
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 [Char]
lazyIntras_Syn_VisitSteps :: (Set String), Syn_VisitSteps -> Int
prevMaxSimRefs_Syn_VisitSteps :: (Int), 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 -> Map [Char] (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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros PP_Doc
_lhsIfollow Int
_lhsIindex VisitKind
_lhsIkind Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) =
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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> PP_Doc
-> Int
-> VisitKind
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Options
-> Int
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Bool
-> T_VisitSteps_vIn52
T_VisitSteps_vIn52 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros PP_Doc
_lhsIfollow Int
_lhsIindex VisitKind
_lhsIkind Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel
(T_VisitSteps_vOut52 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Int
_lhsOsize Map [Char] (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 [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Int
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> Syn_VisitSteps
Syn_VisitSteps Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Int
_lhsOsize Map [Char] (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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (PP_Doc) (Int) (VisitKind) (Map Identifier (VisitKind -> Either Error PP_Doc)) (Options) (Int) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Bool)
data T_VisitSteps_vOut52 = T_VisitSteps_vOut52 (Set String) (Seq Error) (Int) (Bool) (Set String) (Int) (Map Identifier (Set VisitKind)) (Map Identifier Int) (PP_Doc) (Int) (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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros PP_Doc
_lhsIfollow Int
_lhsIindex VisitKind
_lhsIkind Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) -> ( 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 [Char]
_hdIdefs Seq Error
_hdIerrors Int
_hdIindex Bool
_hdIisLast Set [Char]
_hdIlazyIntras Int
_hdIprevMaxSimRefs Map Identifier (Set VisitKind)
_hdIruleKinds Map Identifier Int
_hdIruleUsage PP_Doc
_hdIsem_steps Map [Char] (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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> PP_Doc
-> Int
-> Bool
-> VisitKind
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Options
-> Int
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Bool
-> T_VisitStep_vIn49
T_VisitStep_vIn49 Map Int (Int, Int)
_hdOallFromToStates Map Identifier Int
_hdOallInitStates Map Int VisitKind
_hdOallVisitKinds Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdOallchildvisit Map Int (Set Identifier)
_hdOavisitdefs Map Int (Set Identifier)
_hdOavisituses Attributes
_hdOchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_hdOchildintros PP_Doc
_hdOfollow Int
_hdOindex Bool
_hdOisLast VisitKind
_hdOkind Map Identifier (VisitKind -> Either Error PP_Doc)
_hdOmrules Options
_hdOoptions Int
_hdOprevMaxSimRefs Map Identifier (Set [Char])
_hdOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_hdOruleuses Bool
_hdOuseParallel)
(T_VisitSteps_vOut52 Set [Char]
_tlIdefs Seq Error
_tlIerrors Int
_tlIindex Bool
_tlIisLast Set [Char]
_tlIlazyIntras Int
_tlIprevMaxSimRefs Map Identifier (Set VisitKind)
_tlIruleKinds Map Identifier Int
_tlIruleUsage PP_Doc
_tlIsem_steps Int
_tlIsize Map [Char] (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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> PP_Doc
-> Int
-> VisitKind
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Options
-> Int
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Bool
-> T_VisitSteps_vIn52
T_VisitSteps_vIn52 Map Int (Int, Int)
_tlOallFromToStates Map Identifier Int
_tlOallInitStates Map Int VisitKind
_tlOallVisitKinds Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlOallchildvisit Map Int (Set Identifier)
_tlOavisitdefs Map Int (Set Identifier)
_tlOavisituses Attributes
_tlOchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_tlOchildintros PP_Doc
_tlOfollow Int
_tlOindex VisitKind
_tlOkind Map Identifier (VisitKind -> Either Error PP_Doc)
_tlOmrules Options
_tlOoptions Int
_tlOprevMaxSimRefs Map Identifier (Set [Char])
_tlOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_tlOruleuses Bool
_tlOuseParallel)
_hdOfollow :: PP_Doc
_hdOfollow = PP_Doc -> PP_Doc
rule692 PP_Doc
_tlIsem_steps
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps = PP_Doc -> PP_Doc
rule693 PP_Doc
_hdIsem_steps
_lhsOsize :: Int
_lhsOsize :: Int
_lhsOsize = Int -> Int
rule694 Int
_tlIsize
_hdOindex :: Int
_hdOindex = Int -> Int
rule695 Int
_lhsIindex
_tlOindex :: Int
_tlOindex = Int -> Int
rule696 Int
_lhsIindex
_lhsOindex :: Int
_lhsOindex :: Int
_lhsOindex = Int -> Int
rule697 Int
_tlIindex
_lhsOisLast :: Bool
_lhsOisLast :: Bool
_lhsOisLast = () -> Bool
rule698 ()
_hdOisLast :: Bool
_hdOisLast = Bool -> Bool
rule699 Bool
_tlIisLast
_lhsOdefs :: Set String
_lhsOdefs :: Set [Char]
_lhsOdefs = Set [Char] -> Set [Char] -> Set [Char]
rule700 Set [Char]
_hdIdefs Set [Char]
_tlIdefs
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule701 Seq Error
_hdIerrors Seq Error
_tlIerrors
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = Set [Char] -> Set [Char] -> Set [Char]
rule702 Set [Char]
_hdIlazyIntras Set [Char]
_tlIlazyIntras
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = Map Identifier (Set VisitKind)
-> Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule703 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
rule704 Map Identifier Int
_hdIruleUsage Map Identifier Int
_tlIruleUsage
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses :: Map [Char] (Maybe NonLocalAttr)
_lhsOuses = Map [Char] (Maybe NonLocalAttr)
-> Map [Char] (Maybe NonLocalAttr)
-> Map [Char] (Maybe NonLocalAttr)
rule705 Map [Char] (Maybe NonLocalAttr)
_hdIuses Map [Char] (Maybe NonLocalAttr)
_tlIuses
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
rule706 Map Int VisitKind
_hdIvisitKinds Map Int VisitKind
_tlIvisitKinds
_lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs = Int -> Int
rule707 Int
_tlIprevMaxSimRefs
_hdOallFromToStates :: Map Int (Int, Int)
_hdOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule708 Map Int (Int, Int)
_lhsIallFromToStates
_hdOallInitStates :: Map Identifier Int
_hdOallInitStates = Map Identifier Int -> Map Identifier Int
rule709 Map Identifier Int
_lhsIallInitStates
_hdOallVisitKinds :: Map Int VisitKind
_hdOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule710 Map Int VisitKind
_lhsIallVisitKinds
_hdOallchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdOallchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule711 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit
_hdOavisitdefs :: Map Int (Set Identifier)
_hdOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule712 Map Int (Set Identifier)
_lhsIavisitdefs
_hdOavisituses :: Map Int (Set Identifier)
_hdOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule713 Map Int (Set Identifier)
_lhsIavisituses
_hdOchildTypes :: Attributes
_hdOchildTypes = Attributes -> Attributes
rule714 Attributes
_lhsIchildTypes
_hdOchildintros :: Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_hdOchildintros = Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule715 Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
_hdOkind :: VisitKind
_hdOkind = VisitKind -> VisitKind
rule716 VisitKind
_lhsIkind
_hdOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)
_hdOmrules = Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> Either Error PP_Doc)
rule717 Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule718 Options
_lhsIoptions
_hdOprevMaxSimRefs :: Int
_hdOprevMaxSimRefs = Int -> Int
rule719 Int
_lhsIprevMaxSimRefs
_hdOruledefs :: Map Identifier (Set [Char])
_hdOruledefs = Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule720 Map Identifier (Set [Char])
_lhsIruledefs
_hdOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_hdOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule721 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
_hdOuseParallel :: Bool
_hdOuseParallel = Bool -> Bool
rule722 Bool
_lhsIuseParallel
_tlOallFromToStates :: Map Int (Int, Int)
_tlOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule723 Map Int (Int, Int)
_lhsIallFromToStates
_tlOallInitStates :: Map Identifier Int
_tlOallInitStates = Map Identifier Int -> Map Identifier Int
rule724 Map Identifier Int
_lhsIallInitStates
_tlOallVisitKinds :: Map Int VisitKind
_tlOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule725 Map Int VisitKind
_lhsIallVisitKinds
_tlOallchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlOallchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule726 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit
_tlOavisitdefs :: Map Int (Set Identifier)
_tlOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule727 Map Int (Set Identifier)
_lhsIavisitdefs
_tlOavisituses :: Map Int (Set Identifier)
_tlOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule728 Map Int (Set Identifier)
_lhsIavisituses
_tlOchildTypes :: Attributes
_tlOchildTypes = Attributes -> Attributes
rule729 Attributes
_lhsIchildTypes
_tlOchildintros :: Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_tlOchildintros = Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule730 Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
_tlOfollow :: PP_Doc
_tlOfollow = PP_Doc -> PP_Doc
rule731 PP_Doc
_lhsIfollow
_tlOkind :: VisitKind
_tlOkind = VisitKind -> VisitKind
rule732 VisitKind
_lhsIkind
_tlOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)
_tlOmrules = Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> Either Error PP_Doc)
rule733 Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule734 Options
_lhsIoptions
_tlOprevMaxSimRefs :: Int
_tlOprevMaxSimRefs = Int -> Int
rule735 Int
_hdIprevMaxSimRefs
_tlOruledefs :: Map Identifier (Set [Char])
_tlOruledefs = Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule736 Map Identifier (Set [Char])
_lhsIruledefs
_tlOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_tlOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule737 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
_tlOuseParallel :: Bool
_tlOuseParallel = Bool -> Bool
rule738 Bool
_lhsIuseParallel
__result_ :: T_VisitSteps_vOut52
__result_ = Set [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Int
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitSteps_vOut52
T_VisitSteps_vOut52 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Int
_lhsOsize Map [Char] (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 rule692 #-}
{-# LINE 844 "src-ag/ExecutionPlan2Caml.ag" #-}
rule692 = \ ((_tlIsem_steps) :: PP_Doc) ->
{-# LINE 844 "src-ag/ExecutionPlan2Caml.ag" #-}
_tlIsem_steps
{-# LINE 5541 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule693 #-}
{-# LINE 845 "src-ag/ExecutionPlan2Caml.ag" #-}
rule693 = \ ((_hdIsem_steps) :: PP_Doc) ->
{-# LINE 845 "src-ag/ExecutionPlan2Caml.ag" #-}
_hdIsem_steps
{-# LINE 5547 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule694 #-}
{-# LINE 876 "src-ag/ExecutionPlan2Caml.ag" #-}
rule694 = \ ((_tlIsize) :: Int) ->
{-# LINE 876 "src-ag/ExecutionPlan2Caml.ag" #-}
1 + _tlIsize
{-# LINE 5553 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule695 #-}
{-# LINE 881 "src-ag/ExecutionPlan2Caml.ag" #-}
rule695 = \ ((_lhsIindex) :: Int) ->
{-# LINE 881 "src-ag/ExecutionPlan2Caml.ag" #-}
_lhsIindex
{-# LINE 5559 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule696 #-}
{-# LINE 882 "src-ag/ExecutionPlan2Caml.ag" #-}
rule696 = \ ((_lhsIindex) :: Int) ->
{-# LINE 882 "src-ag/ExecutionPlan2Caml.ag" #-}
1 + _lhsIindex
{-# LINE 5565 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule697 #-}
{-# LINE 883 "src-ag/ExecutionPlan2Caml.ag" #-}
rule697 = \ ((_tlIindex) :: Int) ->
{-# LINE 883 "src-ag/ExecutionPlan2Caml.ag" #-}
_tlIindex
{-# LINE 5571 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule698 #-}
{-# LINE 902 "src-ag/ExecutionPlan2Caml.ag" #-}
rule698 = \ (_ :: ()) ->
{-# LINE 902 "src-ag/ExecutionPlan2Caml.ag" #-}
False
{-# LINE 5577 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule699 #-}
{-# LINE 903 "src-ag/ExecutionPlan2Caml.ag" #-}
rule699 = \ ((_tlIisLast) :: Bool) ->
{-# LINE 903 "src-ag/ExecutionPlan2Caml.ag" #-}
_tlIisLast
{-# LINE 5583 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule700 #-}
rule700 = \ ((_hdIdefs) :: Set String) ((_tlIdefs) :: Set String) ->
_hdIdefs `Set.union` _tlIdefs
{-# INLINE rule701 #-}
rule701 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->
_hdIerrors Seq.>< _tlIerrors
{-# INLINE rule702 #-}
rule702 = \ ((_hdIlazyIntras) :: Set String) ((_tlIlazyIntras) :: Set String) ->
_hdIlazyIntras `Set.union` _tlIlazyIntras
{-# INLINE rule703 #-}
rule703 = \ ((_hdIruleKinds) :: Map Identifier (Set VisitKind)) ((_tlIruleKinds) :: Map Identifier (Set VisitKind)) ->
_hdIruleKinds `unionWithMappend` _tlIruleKinds
{-# INLINE rule704 #-}
rule704 = \ ((_hdIruleUsage) :: Map Identifier Int) ((_tlIruleUsage) :: Map Identifier Int) ->
_hdIruleUsage `unionWithSum` _tlIruleUsage
{-# INLINE rule705 #-}
rule705 = \ ((_hdIuses) :: Map String (Maybe NonLocalAttr)) ((_tlIuses) :: Map String (Maybe NonLocalAttr)) ->
_hdIuses `Map.union` _tlIuses
{-# INLINE rule706 #-}
rule706 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->
_hdIvisitKinds `mappend` _tlIvisitKinds
{-# INLINE rule707 #-}
rule707 = \ ((_tlIprevMaxSimRefs) :: Int) ->
_tlIprevMaxSimRefs
{-# INLINE rule708 #-}
rule708 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule709 #-}
rule709 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule710 #-}
rule710 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule711 #-}
rule711 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
_lhsIallchildvisit
{-# INLINE rule712 #-}
rule712 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule713 #-}
rule713 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule714 #-}
rule714 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->
_lhsIchildTypes
{-# INLINE rule715 #-}
rule715 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
_lhsIchildintros
{-# INLINE rule716 #-}
rule716 = \ ((_lhsIkind) :: VisitKind) ->
_lhsIkind
{-# INLINE rule717 #-}
rule717 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->
_lhsImrules
{-# INLINE rule718 #-}
rule718 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule719 #-}
rule719 = \ ((_lhsIprevMaxSimRefs) :: Int) ->
_lhsIprevMaxSimRefs
{-# INLINE rule720 #-}
rule720 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->
_lhsIruledefs
{-# INLINE rule721 #-}
rule721 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
_lhsIruleuses
{-# INLINE rule722 #-}
rule722 = \ ((_lhsIuseParallel) :: Bool) ->
_lhsIuseParallel
{-# INLINE rule723 #-}
rule723 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
_lhsIallFromToStates
{-# INLINE rule724 #-}
rule724 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
_lhsIallInitStates
{-# INLINE rule725 #-}
rule725 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
_lhsIallVisitKinds
{-# INLINE rule726 #-}
rule726 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
_lhsIallchildvisit
{-# INLINE rule727 #-}
rule727 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisitdefs
{-# INLINE rule728 #-}
rule728 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
_lhsIavisituses
{-# INLINE rule729 #-}
rule729 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->
_lhsIchildTypes
{-# INLINE rule730 #-}
rule730 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
_lhsIchildintros
{-# INLINE rule731 #-}
rule731 = \ ((_lhsIfollow) :: PP_Doc) ->
_lhsIfollow
{-# INLINE rule732 #-}
rule732 = \ ((_lhsIkind) :: VisitKind) ->
_lhsIkind
{-# INLINE rule733 #-}
rule733 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->
_lhsImrules
{-# INLINE rule734 #-}
rule734 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule735 #-}
rule735 = \ ((_hdIprevMaxSimRefs) :: Int) ->
_hdIprevMaxSimRefs
{-# INLINE rule736 #-}
rule736 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->
_lhsIruledefs
{-# INLINE rule737 #-}
rule737 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
_lhsIruleuses
{-# INLINE rule738 #-}
rule738 = \ ((_lhsIuseParallel) :: Bool) ->
_lhsIuseParallel
{-# 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros PP_Doc
_lhsIfollow Int
_lhsIindex VisitKind
_lhsIkind Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) -> ( let
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps :: PP_Doc
_lhsOsem_steps = PP_Doc -> PP_Doc
rule739 PP_Doc
_lhsIfollow
_lhsOsize :: Int
_lhsOsize :: Int
_lhsOsize = () -> Int
rule740 ()
_lhsOisLast :: Bool
_lhsOisLast :: Bool
_lhsOisLast = () -> Bool
rule741 ()
_lhsOdefs :: Set String
_lhsOdefs :: Set [Char]
_lhsOdefs = () -> Set [Char]
forall a. () -> Set a
rule742 ()
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule743 ()
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = () -> Set [Char]
forall a. () -> Set a
rule744 ()
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = () -> Map Identifier (Set VisitKind)
forall k a. () -> Map k a
rule745 ()
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = () -> Map Identifier Int
forall k a. () -> Map k a
rule746 ()
_lhsOuses :: Map String (Maybe NonLocalAttr)
_lhsOuses :: Map [Char] (Maybe NonLocalAttr)
_lhsOuses = () -> Map [Char] (Maybe NonLocalAttr)
forall k a. () -> Map k a
rule747 ()
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule748 ()
_lhsOindex :: Int
_lhsOindex :: Int
_lhsOindex = Int -> Int
rule749 Int
_lhsIindex
_lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs = Int -> Int
rule750 Int
_lhsIprevMaxSimRefs
__result_ :: T_VisitSteps_vOut52
__result_ = Set [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Int
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitSteps_vOut52
T_VisitSteps_vOut52 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Int
_lhsOsize Map [Char] (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 rule739 #-}
{-# LINE 846 "src-ag/ExecutionPlan2Caml.ag" #-}
rule739 = \ ((_lhsIfollow) :: PP_Doc) ->
{-# LINE 846 "src-ag/ExecutionPlan2Caml.ag" #-}
_lhsIfollow
{-# LINE 5740 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule740 #-}
{-# LINE 875 "src-ag/ExecutionPlan2Caml.ag" #-}
rule740 = \ (_ :: ()) ->
{-# LINE 875 "src-ag/ExecutionPlan2Caml.ag" #-}
0
{-# LINE 5746 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule741 #-}
{-# LINE 901 "src-ag/ExecutionPlan2Caml.ag" #-}
rule741 = \ (_ :: ()) ->
{-# LINE 901 "src-ag/ExecutionPlan2Caml.ag" #-}
True
{-# LINE 5752 "src-generated/ExecutionPlan2Caml.hs" #-}
{-# INLINE rule742 #-}
rule742 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule743 #-}
rule743 = \ (_ :: ()) ->
Seq.empty
{-# INLINE rule744 #-}
rule744 = \ (_ :: ()) ->
Set.empty
{-# INLINE rule745 #-}
rule745 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule746 #-}
rule746 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule747 #-}
rule747 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule748 #-}
rule748 = \ (_ :: ()) ->
mempty
{-# INLINE rule749 #-}
rule749 = \ ((_lhsIindex) :: Int) ->
_lhsIindex
{-# INLINE rule750 #-}
rule750 = \ ((_lhsIprevMaxSimRefs) :: Int) ->
_lhsIprevMaxSimRefs
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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
allchildvisit_Inh_Visits :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), Inh_Visits -> Map Int (Map [Char] (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
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
childintros_Inh_Visits :: (Map Identifier (VisitKind -> 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 -> Either Error PP_Doc)
mrules_Inh_Visits :: (Map Identifier (VisitKind -> 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 [Char])
ruledefs_Inh_Visits :: (Map Identifier (Set String)), Inh_Visits -> Map Identifier (Map [Char] (Maybe NonLocalAttr))
ruleuses_Inh_Visits :: (Map Identifier (Map String (Maybe NonLocalAttr))), Inh_Visits -> Attributes
synmap_Inh_Visits :: (Attributes), Inh_Visits -> Set [Char]
terminaldefs_Inh_Visits :: (Set String) }
data Syn_Visits = Syn_Visits { Syn_Visits -> [VisitStateState]
allvisits_Syn_Visits :: ([VisitStateState]), Syn_Visits
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
childvisit_Syn_Visits :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error 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 [Char] (Maybe NonLocalAttr))
intramap_Syn_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), Syn_Visits -> Set [Char]
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, PP_Doc)]
sem_visit_Syn_Visits :: ( [(StateIdentifier,PP_Doc)] ), Syn_Visits -> PP_Doc
t_visits_Syn_Visits :: (PP_Doc), 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set [Char]
_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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Identifier
-> Attributes
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Int StateCtx
-> Identifier
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Attributes
-> Set [Char]
-> 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set [Char]
_lhsIterminaldefs
(T_Visits_vOut55 [VisitStateState]
_lhsOallvisits Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap Set [Char]
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage [(Int, PP_Doc)]
_lhsOsem_visit PP_Doc
_lhsOt_visits 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Seq Error
-> Map Int (Int, Int)
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Set [Char]
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> [(Int, PP_Doc)]
-> PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Syn_Visits
Syn_Visits [VisitStateState]
_lhsOallvisits Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap Set [Char]
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage [(Int, PP_Doc)]
_lhsOsem_visit PP_Doc
_lhsOt_visits 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (ConstructorIdent) (Attributes) (Map Identifier (VisitKind -> 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) ( [(StateIdentifier,PP_Doc)] ) (PP_Doc) (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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set [Char]
_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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdIchildvisit Seq Error
_hdIerrors Map Int (Int, Int)
_hdIfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_hdIintramap Set [Char]
_hdIlazyIntras Map Identifier (Set VisitKind)
_hdIruleKinds Map Identifier Int
_hdIruleUsage (Int, PP_Doc)
_hdIsem_visit PP_Doc
_hdIt_visits 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Identifier
-> Attributes
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Int StateCtx
-> Identifier
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Attributes
-> Set [Char]
-> 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdOallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_hdOallintramap Map Int (Set Identifier)
_hdOavisitdefs Map Int (Set Identifier)
_hdOavisituses Attributes
_hdOchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_hdOchildintros Identifier
_hdOcon Attributes
_hdOinhmap Map Identifier (VisitKind -> Either Error PP_Doc)
_hdOmrules Map Int StateCtx
_hdOnextVisits Identifier
_hdOnt Options
_hdOoptions [Identifier]
_hdOparams Map Int StateCtx
_hdOprevVisits Map Identifier (Set [Char])
_hdOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_hdOruleuses Attributes
_hdOsynmap Set [Char]
_hdOterminaldefs)
(T_Visits_vOut55 [VisitStateState]
_tlIallvisits Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlIchildvisit Seq Error
_tlIerrors Map Int (Int, Int)
_tlIfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_tlIintramap Set [Char]
_tlIlazyIntras Map Identifier (Set VisitKind)
_tlIruleKinds Map Identifier Int
_tlIruleUsage [(Int, PP_Doc)]
_tlIsem_visit PP_Doc
_tlIt_visits 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Identifier
-> Attributes
-> Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Int StateCtx
-> Identifier
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Attributes
-> Set [Char]
-> 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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlOallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_tlOallintramap Map Int (Set Identifier)
_tlOavisitdefs Map Int (Set Identifier)
_tlOavisituses Attributes
_tlOchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_tlOchildintros Identifier
_tlOcon Attributes
_tlOinhmap Map Identifier (VisitKind -> Either Error PP_Doc)
_tlOmrules Map Int StateCtx
_tlOnextVisits Identifier
_tlOnt Options
_tlOoptions [Identifier]
_tlOparams Map Int StateCtx
_tlOprevVisits Map Identifier (Set [Char])
_tlOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_tlOruleuses Attributes
_tlOsynmap Set [Char]
_tlOterminaldefs)
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits = VisitStateState -> [VisitStateState] -> [VisitStateState]
rule751 VisitStateState
_hdIallvisits [VisitStateState]
_tlIallvisits
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule752 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdIchildvisit Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlIchildvisit
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule753 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)
rule754 Map Int (Int, Int)
_hdIfromToStates Map Int (Int, Int)
_tlIfromToStates
_lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))
_lhsOintramap :: Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap = Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
rule755 Map Int (Map [Char] (Maybe NonLocalAttr))
_hdIintramap Map Int (Map [Char] (Maybe NonLocalAttr))
_tlIintramap
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = Set [Char] -> Set [Char] -> Set [Char]
rule756 Set [Char]
_hdIlazyIntras Set [Char]
_tlIlazyIntras
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = Map Identifier (Set VisitKind)
-> Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule757 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
rule758 Map Identifier Int
_hdIruleUsage Map Identifier Int
_tlIruleUsage
_lhsOsem_visit :: [(StateIdentifier,PP_Doc)]
_lhsOsem_visit :: [(Int, PP_Doc)]
_lhsOsem_visit = (Int, PP_Doc) -> [(Int, PP_Doc)] -> [(Int, PP_Doc)]
rule759 (Int, PP_Doc)
_hdIsem_visit [(Int, PP_Doc)]
_tlIsem_visit
_lhsOt_visits :: PP_Doc
_lhsOt_visits :: PP_Doc
_lhsOt_visits = PP_Doc -> PP_Doc -> PP_Doc
rule760 PP_Doc
_hdIt_visits PP_Doc
_tlIt_visits
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
rule761 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)
rule762 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)
rule763 Map Int (Set Identifier)
_hdIvisituses Map Int (Set Identifier)
_tlIvisituses
_hdOallFromToStates :: Map Int (Int, Int)
_hdOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule764 Map Int (Int, Int)
_lhsIallFromToStates
_hdOallInhmap :: Map Identifier Attributes
_hdOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule765 Map Identifier Attributes
_lhsIallInhmap
_hdOallInitStates :: Map Identifier Int
_hdOallInitStates = Map Identifier Int -> Map Identifier Int
rule766 Map Identifier Int
_lhsIallInitStates
_hdOallSynmap :: Map Identifier Attributes
_hdOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule767 Map Identifier Attributes
_lhsIallSynmap
_hdOallVisitKinds :: Map Int VisitKind
_hdOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule768 Map Int VisitKind
_lhsIallVisitKinds
_hdOallchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdOallchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule769 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit
_hdOallintramap :: Map Int (Map [Char] (Maybe NonLocalAttr))
_hdOallintramap = Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
rule770 Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap
_hdOavisitdefs :: Map Int (Set Identifier)
_hdOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule771 Map Int (Set Identifier)
_lhsIavisitdefs
_hdOavisituses :: Map Int (Set Identifier)
_hdOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule772 Map Int (Set Identifier)
_lhsIavisituses
_hdOchildTypes :: Attributes
_hdOchildTypes = Attributes -> Attributes
rule773 Attributes
_lhsIchildTypes
_hdOchildintros :: Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_hdOchildintros = Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule774 Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
_hdOcon :: Identifier
_hdOcon = Identifier -> Identifier
rule775 Identifier
_lhsIcon
_hdOinhmap :: Attributes
_hdOinhmap = Attributes -> Attributes
rule776 Attributes
_lhsIinhmap
_hdOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)
_hdOmrules = Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> Either Error PP_Doc)
rule777 Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules
_hdOnextVisits :: Map Int StateCtx
_hdOnextVisits = Map Int StateCtx -> Map Int StateCtx
rule778 Map Int StateCtx
_lhsInextVisits
_hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule779 Identifier
_lhsInt
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule780 Options
_lhsIoptions
_hdOparams :: [Identifier]
_hdOparams = [Identifier] -> [Identifier]
rule781 [Identifier]
_lhsIparams
_hdOprevVisits :: Map Int StateCtx
_hdOprevVisits = Map Int StateCtx -> Map Int StateCtx
rule782 Map Int StateCtx
_lhsIprevVisits
_hdOruledefs :: Map Identifier (Set [Char])
_hdOruledefs = Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule783 Map Identifier (Set [Char])
_lhsIruledefs
_hdOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_hdOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule784 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
_hdOsynmap :: Attributes
_hdOsynmap = Attributes -> Attributes
rule785 Attributes
_lhsIsynmap
_hdOterminaldefs :: Set [Char]
_hdOterminaldefs = Set [Char] -> Set [Char]
rule786 Set [Char]
_lhsIterminaldefs
_tlOallFromToStates :: Map Int (Int, Int)
_tlOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule787 Map Int (Int, Int)
_lhsIallFromToStates
_tlOallInhmap :: Map Identifier Attributes
_tlOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule788 Map Identifier Attributes
_lhsIallInhmap
_tlOallInitStates :: Map Identifier Int
_tlOallInitStates = Map Identifier Int -> Map Identifier Int
rule789 Map Identifier Int
_lhsIallInitStates
_tlOallSynmap :: Map Identifier Attributes
_tlOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule790 Map Identifier Attributes
_lhsIallSynmap
_tlOallVisitKinds :: Map Int VisitKind
_tlOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule791 Map Int VisitKind
_lhsIallVisitKinds
_tlOallchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlOallchildvisit = Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule792 Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit
_tlOallintramap :: Map Int (Map [Char] (Maybe NonLocalAttr))
_tlOallintramap = Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
rule793 Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap
_tlOavisitdefs :: Map Int (Set Identifier)
_tlOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule794 Map Int (Set Identifier)
_lhsIavisitdefs
_tlOavisituses :: Map Int (Set Identifier)
_tlOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule795 Map Int (Set Identifier)
_lhsIavisituses
_tlOchildTypes :: Attributes
_tlOchildTypes = Attributes -> Attributes
rule796 Attributes
_lhsIchildTypes
_tlOchildintros :: Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_tlOchildintros = Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule797 Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
_tlOcon :: Identifier
_tlOcon = Identifier -> Identifier
rule798 Identifier
_lhsIcon
_tlOinhmap :: Attributes
_tlOinhmap = Attributes -> Attributes
rule799 Attributes
_lhsIinhmap
_tlOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)
_tlOmrules = Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> Either Error PP_Doc)
rule800 Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules
_tlOnextVisits :: Map Int StateCtx
_tlOnextVisits = Map Int StateCtx -> Map Int StateCtx
rule801 Map Int StateCtx
_lhsInextVisits
_tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule802 Identifier
_lhsInt
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule803 Options
_lhsIoptions
_tlOparams :: [Identifier]
_tlOparams = [Identifier] -> [Identifier]
rule804 [Identifier]
_lhsIparams
_tlOprevVisits :: Map Int StateCtx
_tlOprevVisits = Map Int StateCtx -> Map Int StateCtx
rule805 Map Int StateCtx
_lhsIprevVisits
_tlOruledefs :: Map Identifier (Set [Char])
_tlOruledefs = Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule806 Map Identifier (Set [Char])
_lhsIruledefs
_tlOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_tlOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule807 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
_tlOsynmap :: Attributes
_tlOsynmap = Attributes -> Attributes
rule808 Attributes
_lhsIsynmap
_tlOterminaldefs :: Set [Char]
_tlOterminaldefs = Set [Char] -> Set [Char]
rule809 Set [Char]
_lhsIterminaldefs
__result_ :: T_Visits_vOut55
__result_ = [VisitStateState]
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Seq Error
-> Map Int (Int, Int)
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Set [Char]
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> [(Int, PP_Doc)]
-> PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_Visits_vOut55
T_Visits_vOut55 [VisitStateState]
_lhsOallvisits Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap Set [Char]
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage [(Int, PP_Doc)]
_lhsOsem_visit PP_Doc
_lhsOt_visits 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 rule751 #-}
rule751 :: VisitStateState -> [VisitStateState] -> [VisitStateState]
rule751 = \ ((VisitStateState
_hdIallvisits) :: VisitStateState ) (([VisitStateState]
_tlIallvisits) :: [VisitStateState]) ->
VisitStateState
_hdIallvisits VisitStateState -> [VisitStateState] -> [VisitStateState]
forall a. a -> [a] -> [a]
: [VisitStateState]
_tlIallvisits
{-# INLINE rule752 #-}
rule752 :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule752 = \ ((Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ((Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_hdIchildvisit Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_tlIchildvisit
{-# INLINE rule753 #-}
rule753 :: Seq Error -> Seq Error -> Seq Error
rule753 = \ ((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 rule754 #-}
rule754 :: Map Int (Int, Int) -> Map Int (Int, Int) -> Map Int (Int, Int)
rule754 = \ ((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 rule755 #-}
rule755 :: Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
rule755 = \ ((Map Int (Map [Char] (Maybe NonLocalAttr))
_hdIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ((Map Int (Map [Char] (Maybe NonLocalAttr))
_tlIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->
Map Int (Map [Char] (Maybe NonLocalAttr))
_hdIintramap Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (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 [Char] (Maybe NonLocalAttr))
_tlIintramap
{-# INLINE rule756 #-}
rule756 :: Set [Char] -> Set [Char] -> Set [Char]
rule756 = \ ((Set [Char]
_hdIlazyIntras) :: Set String) ((Set [Char]
_tlIlazyIntras) :: Set String) ->
Set [Char]
_hdIlazyIntras Set [Char] -> Set [Char] -> Set [Char]
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set [Char]
_tlIlazyIntras
{-# INLINE rule757 #-}
rule757 :: Map Identifier (Set VisitKind)
-> Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule757 = \ ((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 rule758 #-}
rule758 :: Map Identifier Int -> Map Identifier Int -> Map Identifier Int
rule758 = \ ((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 rule759 #-}
rule759 :: (Int, PP_Doc) -> [(Int, PP_Doc)] -> [(Int, PP_Doc)]
rule759 = \ (((Int, PP_Doc)
_hdIsem_visit) :: (StateIdentifier,PP_Doc) ) (([(Int, PP_Doc)]
_tlIsem_visit) :: [(StateIdentifier,PP_Doc)] ) ->
(Int, PP_Doc)
_hdIsem_visit (Int, PP_Doc) -> [(Int, PP_Doc)] -> [(Int, PP_Doc)]
forall a. a -> [a] -> [a]
: [(Int, PP_Doc)]
_tlIsem_visit
{-# INLINE rule760 #-}
rule760 :: PP_Doc -> PP_Doc -> PP_Doc
rule760 = \ ((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 rule761 #-}
rule761 :: Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
rule761 = \ ((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 rule762 #-}
rule762 :: Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule762 = \ ((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 rule763 #-}
rule763 :: Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule763 = \ ((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 rule764 #-}
rule764 :: Map Int (Int, Int) -> Map Int (Int, Int)
rule764 = \ ((Map Int (Int, Int)
_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
Map Int (Int, Int)
_lhsIallFromToStates
{-# INLINE rule765 #-}
rule765 :: Map Identifier Attributes -> Map Identifier Attributes
rule765 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallInhmap
{-# INLINE rule766 #-}
rule766 :: Map Identifier Int -> Map Identifier Int
rule766 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
Map Identifier Int
_lhsIallInitStates
{-# INLINE rule767 #-}
rule767 :: Map Identifier Attributes -> Map Identifier Attributes
rule767 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallSynmap
{-# INLINE rule768 #-}
rule768 :: Map Int VisitKind -> Map Int VisitKind
rule768 = \ ((Map Int VisitKind
_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
Map Int VisitKind
_lhsIallVisitKinds
{-# INLINE rule769 #-}
rule769 :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule769 = \ ((Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit
{-# INLINE rule770 #-}
rule770 :: Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
rule770 = \ ((Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->
Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap
{-# INLINE rule771 #-}
rule771 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule771 = \ ((Map Int (Set Identifier)
_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_lhsIavisitdefs
{-# INLINE rule772 #-}
rule772 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule772 = \ ((Map Int (Set Identifier)
_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_lhsIavisituses
{-# INLINE rule773 #-}
rule773 :: Attributes -> Attributes
rule773 = \ ((Attributes
_lhsIchildTypes) :: Map Identifier Type) ->
Attributes
_lhsIchildTypes
{-# INLINE rule774 #-}
rule774 :: Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule774 = \ ((Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
{-# INLINE rule775 #-}
rule775 :: Identifier -> Identifier
rule775 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
Identifier
_lhsIcon
{-# INLINE rule776 #-}
rule776 :: Attributes -> Attributes
rule776 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
Attributes
_lhsIinhmap
{-# INLINE rule777 #-}
rule777 :: Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> Either Error PP_Doc)
rule777 = \ ((Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->
Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules
{-# INLINE rule778 #-}
rule778 :: Map Int StateCtx -> Map Int StateCtx
rule778 = \ ((Map Int StateCtx
_lhsInextVisits) :: Map StateIdentifier StateCtx) ->
Map Int StateCtx
_lhsInextVisits
{-# INLINE rule779 #-}
rule779 :: Identifier -> Identifier
rule779 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
Identifier
_lhsInt
{-# INLINE rule780 #-}
rule780 :: Options -> Options
rule780 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule781 #-}
rule781 :: [Identifier] -> [Identifier]
rule781 = \ (([Identifier]
_lhsIparams) :: [Identifier]) ->
[Identifier]
_lhsIparams
{-# INLINE rule782 #-}
rule782 :: Map Int StateCtx -> Map Int StateCtx
rule782 = \ ((Map Int StateCtx
_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->
Map Int StateCtx
_lhsIprevVisits
{-# INLINE rule783 #-}
rule783 :: Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule783 = \ ((Map Identifier (Set [Char])
_lhsIruledefs) :: Map Identifier (Set String)) ->
Map Identifier (Set [Char])
_lhsIruledefs
{-# INLINE rule784 #-}
rule784 :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule784 = \ ((Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
{-# INLINE rule785 #-}
rule785 :: Attributes -> Attributes
rule785 = \ ((Attributes
_lhsIsynmap) :: Attributes) ->
Attributes
_lhsIsynmap
{-# INLINE rule786 #-}
rule786 :: Set [Char] -> Set [Char]
rule786 = \ ((Set [Char]
_lhsIterminaldefs) :: Set String) ->
Set [Char]
_lhsIterminaldefs
{-# INLINE rule787 #-}
rule787 :: Map Int (Int, Int) -> Map Int (Int, Int)
rule787 = \ ((Map Int (Int, Int)
_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
Map Int (Int, Int)
_lhsIallFromToStates
{-# INLINE rule788 #-}
rule788 :: Map Identifier Attributes -> Map Identifier Attributes
rule788 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallInhmap
{-# INLINE rule789 #-}
rule789 :: Map Identifier Int -> Map Identifier Int
rule789 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
Map Identifier Int
_lhsIallInitStates
{-# INLINE rule790 #-}
rule790 :: Map Identifier Attributes -> Map Identifier Attributes
rule790 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
Map Identifier Attributes
_lhsIallSynmap
{-# INLINE rule791 #-}
rule791 :: Map Int VisitKind -> Map Int VisitKind
rule791 = \ ((Map Int VisitKind
_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
Map Int VisitKind
_lhsIallVisitKinds
{-# INLINE rule792 #-}
rule792 :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
rule792 = \ ((Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->
Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit
{-# INLINE rule793 #-}
rule793 :: Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
rule793 = \ ((Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->
Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap
{-# INLINE rule794 #-}
rule794 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule794 = \ ((Map Int (Set Identifier)
_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_lhsIavisitdefs
{-# INLINE rule795 #-}
rule795 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule795 = \ ((Map Int (Set Identifier)
_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
Map Int (Set Identifier)
_lhsIavisituses
{-# INLINE rule796 #-}
rule796 :: Attributes -> Attributes
rule796 = \ ((Attributes
_lhsIchildTypes) :: Map Identifier Type) ->
Attributes
_lhsIchildTypes
{-# INLINE rule797 #-}
rule797 :: Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule797 = \ ((Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
{-# INLINE rule798 #-}
rule798 :: Identifier -> Identifier
rule798 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
Identifier
_lhsIcon
{-# INLINE rule799 #-}
rule799 :: Attributes -> Attributes
rule799 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
Attributes
_lhsIinhmap
{-# INLINE rule800 #-}
rule800 :: Map Identifier (VisitKind -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> Either Error PP_Doc)
rule800 = \ ((Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->
Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules
{-# INLINE rule801 #-}
rule801 :: Map Int StateCtx -> Map Int StateCtx
rule801 = \ ((Map Int StateCtx
_lhsInextVisits) :: Map StateIdentifier StateCtx) ->
Map Int StateCtx
_lhsInextVisits
{-# INLINE rule802 #-}
rule802 :: Identifier -> Identifier
rule802 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
Identifier
_lhsInt
{-# INLINE rule803 #-}
rule803 :: Options -> Options
rule803 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule804 #-}
rule804 :: [Identifier] -> [Identifier]
rule804 = \ (([Identifier]
_lhsIparams) :: [Identifier]) ->
[Identifier]
_lhsIparams
{-# INLINE rule805 #-}
rule805 :: Map Int StateCtx -> Map Int StateCtx
rule805 = \ ((Map Int StateCtx
_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->
Map Int StateCtx
_lhsIprevVisits
{-# INLINE rule806 #-}
rule806 :: Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule806 = \ ((Map Identifier (Set [Char])
_lhsIruledefs) :: Map Identifier (Set String)) ->
Map Identifier (Set [Char])
_lhsIruledefs
{-# INLINE rule807 #-}
rule807 :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule807 = \ ((Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
{-# INLINE rule808 #-}
rule808 :: Attributes -> Attributes
rule808 = \ ((Attributes
_lhsIsynmap) :: Attributes) ->
Attributes
_lhsIsynmap
{-# INLINE rule809 #-}
rule809 :: Set [Char] -> Set [Char]
rule809 = \ ((Set [Char]
_lhsIterminaldefs) :: Set String) ->
Set [Char]
_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 -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsIallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
Identifier
(VisitKind
-> Either
Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set [Char]
_lhsIterminaldefs) -> ( let
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits :: [VisitStateState]
_lhsOallvisits = () -> [VisitStateState]
forall a. () -> [a]
rule810 ()
_lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit :: Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit = ()
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
forall k a. () -> Map k a
rule811 ()
_lhsOerrors :: Seq Error
_lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule812 ()
_lhsOfromToStates :: Map VisitIdentifier (Int,Int)
_lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = () -> Map Int (Int, Int)
rule813 ()
_lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))
_lhsOintramap :: Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap = () -> Map Int (Map [Char] (Maybe NonLocalAttr))
forall k a. () -> Map k a
rule814 ()
_lhsOlazyIntras :: Set String
_lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = () -> Set [Char]
forall a. () -> Set a
rule815 ()
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = () -> Map Identifier (Set VisitKind)
forall k a. () -> Map k a
rule816 ()
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = () -> Map Identifier Int
forall k a. () -> Map k a
rule817 ()
_lhsOsem_visit :: [(StateIdentifier,PP_Doc)]
_lhsOsem_visit :: [(Int, PP_Doc)]
_lhsOsem_visit = () -> [(Int, PP_Doc)]
forall a. () -> [a]
rule818 ()
_lhsOt_visits :: PP_Doc
_lhsOt_visits :: PP_Doc
_lhsOt_visits = () -> PP_Doc
rule819 ()
_lhsOvisitKinds :: Map VisitIdentifier VisitKind
_lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule820 ()
_lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
_lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule821 ()
_lhsOvisituses :: Map VisitIdentifier (Set Identifier)
_lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule822 ()
__result_ :: T_Visits_vOut55
__result_ = [VisitStateState]
-> Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
-> Seq Error
-> Map Int (Int, Int)
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Set [Char]
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> [(Int, PP_Doc)]
-> PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_Visits_vOut55
T_Visits_vOut55 [VisitStateState]
_lhsOallvisits Map
Int
(Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap Set [Char]
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage [(Int, PP_Doc)]
_lhsOsem_visit PP_Doc
_lhsOt_visits 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 rule810 #-}
rule810 :: () -> [a]
rule810 = \ (()
_ :: ()) ->
[]
{-# INLINE rule811 #-}
rule811 :: () -> Map k a
rule811 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule812 #-}
rule812 :: () -> Seq a
rule812 = \ (()
_ :: ()) ->
Seq a
forall a. Seq a
Seq.empty
{-# INLINE rule813 #-}
rule813 :: () -> Map Int (Int, Int)
rule813 = \ (()
_ :: ()) ->
Map Int (Int, Int)
forall a. Monoid a => a
mempty
{-# INLINE rule814 #-}
rule814 :: () -> Map k a
rule814 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule815 #-}
rule815 :: () -> Set a
rule815 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
{-# INLINE rule816 #-}
rule816 :: () -> Map k a
rule816 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule817 #-}
rule817 :: () -> Map k a
rule817 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule818 #-}
rule818 :: () -> [a]
rule818 = \ (()
_ :: ()) ->
[]
{-# INLINE rule819 #-}
rule819 :: () -> PP_Doc
rule819 = \ (()
_ :: ()) ->
PP_Doc
empty
{-# INLINE rule820 #-}
rule820 :: () -> Map Int VisitKind
rule820 = \ (()
_ :: ()) ->
Map Int VisitKind
forall a. Monoid a => a
mempty
{-# INLINE rule821 #-}
rule821 :: () -> Map k a
rule821 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule822 #-}
rule822 :: () -> Map k a
rule822 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty