{-# LANGUAGE Rank2Types, GADTs #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ScopedTypeVariables #-}
module PrintOcamlCode where
{-# LINE 2 "src-ag/Patterns.ag" #-}
import UU.Scanner.Position(Pos)
import CommonTypes (ConstructorIdent,Identifier)
{-# LINE 12 "src-generated/PrintOcamlCode.hs" #-}
{-# LINE 2 "src-ag/Code.ag" #-}
import Patterns
import Data.Set(Set)
import qualified Data.Set as Set
import Data.Map(Map)
import qualified Data.Map as Map
{-# LINE 21 "src-generated/PrintOcamlCode.hs" #-}
{-# LINE 10 "src-ag/PrintOcamlCode.ag" #-}
import Pretty
import Code
import Patterns
import Options
import CommonTypes hiding (List,Type,Map,Maybe,IntMap,Either)
import Data.List(intersperse,intercalate)
import Data.Char(toLower)
{-# LINE 32 "src-generated/PrintOcamlCode.hs" #-}
import Control.Monad.Identity (Identity)
import qualified Control.Monad.Identity
{-# LINE 146 "src-ag/Code.ag" #-}
mkTupleExpr :: Bool -> Bool -> Exprs -> Expr
mkTupleExpr unbox' noInh exprs | not unbox' || noInh || length exprs == 1 = TupleExpr exprs
| otherwise = UnboxedTupleExpr exprs
mkTupleType :: Bool -> Bool -> Types -> Type
mkTupleType unbox' noInh tps | not unbox' || noInh || length tps == 1 = TupleType tps
| otherwise = UnboxedTupleType tps
mkTupleLhs :: Bool -> Bool -> [String] -> Lhs
mkTupleLhs unbox' noInh comps | not unbox' || noInh || length comps == 1 = TupleLhs comps
| otherwise = UnboxedTupleLhs comps
{-# LINE 52 "src-generated/PrintOcamlCode.hs" #-}
{-# LINE 21 "src-ag/PrintOcamlCode.ag" #-}
type PP_Docs = [PP_Doc]
ppMultiSeqH :: [PP_Doc] -> PP_Doc -> PP_Doc
ppMultiSeqH = ppMultiSeq' (>#<)
ppMultiSeqV :: [PP_Doc] -> PP_Doc -> PP_Doc
ppMultiSeqV = ppMultiSeq' (>-<)
ppMultiSeq' :: (PP_Doc -> PP_Doc -> PP_Doc) -> [PP_Doc] -> PP_Doc -> PP_Doc
ppMultiSeq' next strictArgs expr
= foldr (\v r -> (v >#< "`seq`") `next` pp_parens r) expr strictArgs
ppTuple :: Bool -> [PP_Doc] -> PP_Doc
ppTuple True pps = "(" >|< pp_block " " (replicate (length pps `max` 1) ')') ",(" pps
ppTuple False pps = "(" >|< pp_block " " ")" "," pps
{-# LINE 71 "src-generated/PrintOcamlCode.hs" #-}
{-# LINE 177 "src-ag/PrintOcamlCode.ag" #-}
toOcamlTC :: String -> String
toOcamlTC (c:cs) = toLower c : cs
toOcamlTC xs = xs
{-# LINE 78 "src-generated/PrintOcamlCode.hs" #-}
data Inh_CaseAlt = Inh_CaseAlt { Inh_CaseAlt -> Options
options_Inh_CaseAlt :: !(Options) }
data Syn_CaseAlt = Syn_CaseAlt { Syn_CaseAlt -> PP_Doc
pp_Syn_CaseAlt :: !(PP_Doc) }
{-# INLINABLE wrap_CaseAlt #-}
wrap_CaseAlt :: T_CaseAlt -> Inh_CaseAlt -> (Syn_CaseAlt )
wrap_CaseAlt :: T_CaseAlt -> Inh_CaseAlt -> Syn_CaseAlt
wrap_CaseAlt !(T_CaseAlt Identity T_CaseAlt_s2
act) !(Inh_CaseAlt Options
_lhsIoptions) =
Identity Syn_CaseAlt -> Syn_CaseAlt
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do !T_CaseAlt_s2
sem <- Identity T_CaseAlt_s2
act
let arg1 :: T_CaseAlt_vIn1
arg1 = Options -> T_CaseAlt_vIn1
T_CaseAlt_vIn1 Options
_lhsIoptions
!(T_CaseAlt_vOut1 PP_Doc
_lhsOpp) <- T_CaseAlt_vOut1 -> Identity T_CaseAlt_vOut1
forall (m :: * -> *) a. Monad m => a -> m a
return (T_CaseAlt_s2 -> T_CaseAlt_v1
inv_CaseAlt_s2 T_CaseAlt_s2
sem T_CaseAlt_vIn1
arg1)
Syn_CaseAlt -> Identity Syn_CaseAlt
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_CaseAlt
Syn_CaseAlt PP_Doc
_lhsOpp)
)
{-# NOINLINE sem_CaseAlt #-}
sem_CaseAlt :: CaseAlt -> T_CaseAlt
sem_CaseAlt :: CaseAlt -> T_CaseAlt
sem_CaseAlt ( CaseAlt Lhs
left_ Expr
expr_ ) = T_Lhs -> T_Expr -> T_CaseAlt
sem_CaseAlt_CaseAlt ( Lhs -> T_Lhs
sem_Lhs Lhs
left_ ) ( Expr -> T_Expr
sem_Expr Expr
expr_ )
newtype T_CaseAlt = T_CaseAlt {
T_CaseAlt -> Identity T_CaseAlt_s2
attach_T_CaseAlt :: Identity (T_CaseAlt_s2 )
}
newtype T_CaseAlt_s2 = C_CaseAlt_s2 {
T_CaseAlt_s2 -> T_CaseAlt_v1
inv_CaseAlt_s2 :: (T_CaseAlt_v1 )
}
data T_CaseAlt_s3 = C_CaseAlt_s3
type T_CaseAlt_v1 = (T_CaseAlt_vIn1 ) -> (T_CaseAlt_vOut1 )
data T_CaseAlt_vIn1 = T_CaseAlt_vIn1 (Options)
data T_CaseAlt_vOut1 = T_CaseAlt_vOut1 (PP_Doc)
{-# NOINLINE sem_CaseAlt_CaseAlt #-}
sem_CaseAlt_CaseAlt :: T_Lhs -> T_Expr -> T_CaseAlt
sem_CaseAlt_CaseAlt :: T_Lhs -> T_Expr -> T_CaseAlt
sem_CaseAlt_CaseAlt T_Lhs
arg_left_ T_Expr
arg_expr_ = Identity T_CaseAlt_s2 -> T_CaseAlt
T_CaseAlt (T_CaseAlt_s2 -> Identity T_CaseAlt_s2
forall (m :: * -> *) a. Monad m => a -> m a
return T_CaseAlt_s2
st2) where
{-# NOINLINE st2 #-}
!st2 :: T_CaseAlt_s2
st2 = let
v1 :: T_CaseAlt_v1
v1 :: T_CaseAlt_v1
v1 = \ !(T_CaseAlt_vIn1 Options
_lhsIoptions) -> ( let
_leftX32 :: T_Lhs_s32
_leftX32 = Identity T_Lhs_s32 -> T_Lhs_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs (T_Lhs
arg_left_))
_exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
(T_Lhs_vOut31 PP_Doc
_leftIpp) = T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
_leftX32 (Options -> T_Lhs_vIn31
T_Lhs_vIn31 Options
_leftOoptions)
(T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_exprOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule0 PP_Doc
_exprIpp PP_Doc
_leftIpp
_leftOoptions :: Options
_leftOoptions = Options -> Options
rule1 Options
_lhsIoptions
_exprOoptions :: Options
_exprOoptions = Options -> Options
rule2 Options
_lhsIoptions
!__result_ :: T_CaseAlt_vOut1
__result_ = PP_Doc -> T_CaseAlt_vOut1
T_CaseAlt_vOut1 PP_Doc
_lhsOpp
in T_CaseAlt_vOut1
__result_ )
in T_CaseAlt_v1 -> T_CaseAlt_s2
C_CaseAlt_s2 T_CaseAlt_v1
v1
{-# INLINE rule0 #-}
{-# LINE 184 "src-ag/PrintOcamlCode.ag" #-}
rule0 = \ ((_exprIpp) :: PP_Doc) ((_leftIpp) :: PP_Doc) ->
{-# LINE 184 "src-ag/PrintOcamlCode.ag" #-}
_leftIpp >#< "->" >#< _exprIpp
{-# LINE 132 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule1 #-}
rule1 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule2 #-}
rule2 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
data Inh_CaseAlts = Inh_CaseAlts { Inh_CaseAlts -> Options
options_Inh_CaseAlts :: !(Options) }
data Syn_CaseAlts = Syn_CaseAlts { Syn_CaseAlts -> [PP_Doc]
pps_Syn_CaseAlts :: !(PP_Docs) }
{-# INLINABLE wrap_CaseAlts #-}
wrap_CaseAlts :: T_CaseAlts -> Inh_CaseAlts -> (Syn_CaseAlts )
wrap_CaseAlts :: T_CaseAlts -> Inh_CaseAlts -> Syn_CaseAlts
wrap_CaseAlts !(T_CaseAlts Identity T_CaseAlts_s5
act) !(Inh_CaseAlts Options
_lhsIoptions) =
Identity Syn_CaseAlts -> Syn_CaseAlts
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do !T_CaseAlts_s5
sem <- Identity T_CaseAlts_s5
act
let arg4 :: T_CaseAlts_vIn4
arg4 = Options -> T_CaseAlts_vIn4
T_CaseAlts_vIn4 Options
_lhsIoptions
!(T_CaseAlts_vOut4 [PP_Doc]
_lhsOpps) <- T_CaseAlts_vOut4 -> Identity T_CaseAlts_vOut4
forall (m :: * -> *) a. Monad m => a -> m a
return (T_CaseAlts_s5 -> T_CaseAlts_v4
inv_CaseAlts_s5 T_CaseAlts_s5
sem T_CaseAlts_vIn4
arg4)
Syn_CaseAlts -> Identity Syn_CaseAlts
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc] -> Syn_CaseAlts
Syn_CaseAlts [PP_Doc]
_lhsOpps)
)
{-# NOINLINE sem_CaseAlts #-}
sem_CaseAlts :: CaseAlts -> T_CaseAlts
sem_CaseAlts :: CaseAlts -> T_CaseAlts
sem_CaseAlts CaseAlts
list = (T_CaseAlt -> T_CaseAlts -> T_CaseAlts)
-> T_CaseAlts -> [T_CaseAlt] -> T_CaseAlts
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_CaseAlt -> T_CaseAlts -> T_CaseAlts
sem_CaseAlts_Cons T_CaseAlts
sem_CaseAlts_Nil ((CaseAlt -> T_CaseAlt) -> CaseAlts -> [T_CaseAlt]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map CaseAlt -> T_CaseAlt
sem_CaseAlt CaseAlts
list)
newtype T_CaseAlts = T_CaseAlts {
T_CaseAlts -> Identity T_CaseAlts_s5
attach_T_CaseAlts :: Identity (T_CaseAlts_s5 )
}
newtype T_CaseAlts_s5 = C_CaseAlts_s5 {
T_CaseAlts_s5 -> T_CaseAlts_v4
inv_CaseAlts_s5 :: (T_CaseAlts_v4 )
}
data T_CaseAlts_s6 = C_CaseAlts_s6
type T_CaseAlts_v4 = (T_CaseAlts_vIn4 ) -> (T_CaseAlts_vOut4 )
data T_CaseAlts_vIn4 = T_CaseAlts_vIn4 (Options)
data T_CaseAlts_vOut4 = T_CaseAlts_vOut4 (PP_Docs)
{-# NOINLINE sem_CaseAlts_Cons #-}
sem_CaseAlts_Cons :: T_CaseAlt -> T_CaseAlts -> T_CaseAlts
sem_CaseAlts_Cons :: T_CaseAlt -> T_CaseAlts -> T_CaseAlts
sem_CaseAlts_Cons T_CaseAlt
arg_hd_ T_CaseAlts
arg_tl_ = Identity T_CaseAlts_s5 -> T_CaseAlts
T_CaseAlts (T_CaseAlts_s5 -> Identity T_CaseAlts_s5
forall (m :: * -> *) a. Monad m => a -> m a
return T_CaseAlts_s5
st5) where
{-# NOINLINE st5 #-}
!st5 :: T_CaseAlts_s5
st5 = let
v4 :: T_CaseAlts_v4
v4 :: T_CaseAlts_v4
v4 = \ !(T_CaseAlts_vIn4 Options
_lhsIoptions) -> ( let
_hdX2 :: T_CaseAlt_s2
_hdX2 = Identity T_CaseAlt_s2 -> T_CaseAlt_s2
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CaseAlt -> Identity T_CaseAlt_s2
attach_T_CaseAlt (T_CaseAlt
arg_hd_))
_tlX5 :: T_CaseAlts_s5
_tlX5 = Identity T_CaseAlts_s5 -> T_CaseAlts_s5
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CaseAlts -> Identity T_CaseAlts_s5
attach_T_CaseAlts (T_CaseAlts
arg_tl_))
(T_CaseAlt_vOut1 PP_Doc
_hdIpp) = T_CaseAlt_s2 -> T_CaseAlt_v1
inv_CaseAlt_s2 T_CaseAlt_s2
_hdX2 (Options -> T_CaseAlt_vIn1
T_CaseAlt_vIn1 Options
_hdOoptions)
(T_CaseAlts_vOut4 [PP_Doc]
_tlIpps) = T_CaseAlts_s5 -> T_CaseAlts_v4
inv_CaseAlts_s5 T_CaseAlts_s5
_tlX5 (Options -> T_CaseAlts_vIn4
T_CaseAlts_vIn4 Options
_tlOoptions)
_lhsOpps :: PP_Docs
_lhsOpps :: [PP_Doc]
_lhsOpps = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule3 PP_Doc
_hdIpp [PP_Doc]
_tlIpps
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule4 Options
_lhsIoptions
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule5 Options
_lhsIoptions
!__result_ :: T_CaseAlts_vOut4
__result_ = [PP_Doc] -> T_CaseAlts_vOut4
T_CaseAlts_vOut4 [PP_Doc]
_lhsOpps
in T_CaseAlts_vOut4
__result_ )
in T_CaseAlts_v4 -> T_CaseAlts_s5
C_CaseAlts_s5 T_CaseAlts_v4
v4
{-# INLINE rule3 #-}
{-# LINE 65 "src-ag/PrintOcamlCode.ag" #-}
rule3 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: PP_Docs) ->
{-# LINE 65 "src-ag/PrintOcamlCode.ag" #-}
_hdIpp : _tlIpps
{-# LINE 193 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule4 #-}
rule4 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule5 #-}
rule5 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_CaseAlts_Nil #-}
sem_CaseAlts_Nil :: T_CaseAlts
sem_CaseAlts_Nil :: T_CaseAlts
sem_CaseAlts_Nil = Identity T_CaseAlts_s5 -> T_CaseAlts
T_CaseAlts (T_CaseAlts_s5 -> Identity T_CaseAlts_s5
forall (m :: * -> *) a. Monad m => a -> m a
return T_CaseAlts_s5
st5) where
{-# NOINLINE st5 #-}
!st5 :: T_CaseAlts_s5
st5 = let
v4 :: T_CaseAlts_v4
v4 :: T_CaseAlts_v4
v4 = \ !(T_CaseAlts_vIn4 Options
_lhsIoptions) -> ( let
_lhsOpps :: PP_Docs
_lhsOpps :: [PP_Doc]
_lhsOpps = () -> [PP_Doc]
forall a. () -> [a]
rule6 ()
!__result_ :: T_CaseAlts_vOut4
__result_ = [PP_Doc] -> T_CaseAlts_vOut4
T_CaseAlts_vOut4 [PP_Doc]
_lhsOpps
in T_CaseAlts_vOut4
__result_ )
in T_CaseAlts_v4 -> T_CaseAlts_s5
C_CaseAlts_s5 T_CaseAlts_v4
v4
{-# INLINE rule6 #-}
{-# LINE 66 "src-ag/PrintOcamlCode.ag" #-}
rule6 = \ (_ :: ()) ->
{-# LINE 66 "src-ag/PrintOcamlCode.ag" #-}
[]
{-# LINE 217 "src-generated/PrintOcamlCode.hs" #-}
data Inh_Chunk = Inh_Chunk { Inh_Chunk -> Bool
isToplevel_Inh_Chunk :: !(Bool), Inh_Chunk -> Options
options_Inh_Chunk :: !(Options), Inh_Chunk -> Map BlockInfo PP_Doc
textBlockMap_Inh_Chunk :: !(Map BlockInfo PP_Doc) }
data Syn_Chunk = Syn_Chunk { Syn_Chunk -> [PP_Doc]
pps_Syn_Chunk :: !(PP_Docs) }
{-# INLINABLE wrap_Chunk #-}
wrap_Chunk :: T_Chunk -> Inh_Chunk -> (Syn_Chunk )
wrap_Chunk :: T_Chunk -> Inh_Chunk -> Syn_Chunk
wrap_Chunk !(T_Chunk Identity T_Chunk_s8
act) !(Inh_Chunk Bool
_lhsIisToplevel Options
_lhsIoptions Map BlockInfo PP_Doc
_lhsItextBlockMap) =
Identity Syn_Chunk -> Syn_Chunk
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do !T_Chunk_s8
sem <- Identity T_Chunk_s8
act
let arg7 :: T_Chunk_vIn7
arg7 = Bool -> Options -> Map BlockInfo PP_Doc -> T_Chunk_vIn7
T_Chunk_vIn7 Bool
_lhsIisToplevel Options
_lhsIoptions Map BlockInfo PP_Doc
_lhsItextBlockMap
!(T_Chunk_vOut7 [PP_Doc]
_lhsOpps) <- T_Chunk_vOut7 -> Identity T_Chunk_vOut7
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Chunk_s8 -> T_Chunk_v7
inv_Chunk_s8 T_Chunk_s8
sem T_Chunk_vIn7
arg7)
Syn_Chunk -> Identity Syn_Chunk
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc] -> Syn_Chunk
Syn_Chunk [PP_Doc]
_lhsOpps)
)
{-# INLINE sem_Chunk #-}
sem_Chunk :: Chunk -> T_Chunk
sem_Chunk :: Chunk -> T_Chunk
sem_Chunk ( Chunk !String
name_ Decl
comment_ Decls
info_ Decls
dataDef_ Decls
cataFun_ Decls
semDom_ Decls
semWrapper_ Decls
semFunctions_ ![String]
semNames_ ) = String
-> T_Decl
-> T_Decls
-> T_Decls
-> T_Decls
-> T_Decls
-> T_Decls
-> T_Decls
-> [String]
-> T_Chunk
sem_Chunk_Chunk String
name_ ( Decl -> T_Decl
sem_Decl Decl
comment_ ) ( Decls -> T_Decls
sem_Decls Decls
info_ ) ( Decls -> T_Decls
sem_Decls Decls
dataDef_ ) ( Decls -> T_Decls
sem_Decls Decls
cataFun_ ) ( Decls -> T_Decls
sem_Decls Decls
semDom_ ) ( Decls -> T_Decls
sem_Decls Decls
semWrapper_ ) ( Decls -> T_Decls
sem_Decls Decls
semFunctions_ ) [String]
semNames_
newtype T_Chunk = T_Chunk {
T_Chunk -> Identity T_Chunk_s8
attach_T_Chunk :: Identity (T_Chunk_s8 )
}
newtype T_Chunk_s8 = C_Chunk_s8 {
T_Chunk_s8 -> T_Chunk_v7
inv_Chunk_s8 :: (T_Chunk_v7 )
}
data T_Chunk_s9 = C_Chunk_s9
type T_Chunk_v7 = (T_Chunk_vIn7 ) -> (T_Chunk_vOut7 )
data T_Chunk_vIn7 = T_Chunk_vIn7 (Bool) (Options) (Map BlockInfo PP_Doc)
data T_Chunk_vOut7 = T_Chunk_vOut7 (PP_Docs)
{-# NOINLINE sem_Chunk_Chunk #-}
sem_Chunk_Chunk :: (String) -> T_Decl -> T_Decls -> T_Decls -> T_Decls -> T_Decls -> T_Decls -> T_Decls -> ([String]) -> T_Chunk
sem_Chunk_Chunk :: String
-> T_Decl
-> T_Decls
-> T_Decls
-> T_Decls
-> T_Decls
-> T_Decls
-> T_Decls
-> [String]
-> T_Chunk
sem_Chunk_Chunk !String
arg_name_ T_Decl
arg_comment_ T_Decls
arg_info_ T_Decls
arg_dataDef_ T_Decls
arg_cataFun_ T_Decls
arg_semDom_ T_Decls
arg_semWrapper_ T_Decls
arg_semFunctions_ [String]
_ = Identity T_Chunk_s8 -> T_Chunk
T_Chunk (T_Chunk_s8 -> Identity T_Chunk_s8
forall (m :: * -> *) a. Monad m => a -> m a
return T_Chunk_s8
st8) where
{-# NOINLINE st8 #-}
!st8 :: T_Chunk_s8
st8 = let
v7 :: T_Chunk_v7
v7 :: T_Chunk_v7
v7 = \ !(T_Chunk_vIn7 Bool
_lhsIisToplevel Options
_lhsIoptions Map BlockInfo PP_Doc
_lhsItextBlockMap) -> ( let
_commentX20 :: T_Decl_s20
_commentX20 = Identity T_Decl_s20 -> T_Decl_s20
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decl -> Identity T_Decl_s20
attach_T_Decl (T_Decl
arg_comment_))
_infoX23 :: T_Decls_s23
_infoX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_info_))
_dataDefX23 :: T_Decls_s23
_dataDefX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_dataDef_))
_cataFunX23 :: T_Decls_s23
_cataFunX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_cataFun_))
_semDomX23 :: T_Decls_s23
_semDomX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_semDom_))
_semWrapperX23 :: T_Decls_s23
_semWrapperX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_semWrapper_))
_semFunctionsX23 :: T_Decls_s23
_semFunctionsX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_semFunctions_))
(T_Decl_vOut19 PP_Doc
_commentIpp) = T_Decl_s20 -> T_Decl_v19
inv_Decl_s20 T_Decl_s20
_commentX20 (Bool -> Options -> T_Decl_vIn19
T_Decl_vIn19 Bool
_commentOisToplevel Options
_commentOoptions)
(T_Decls_vOut22 [PP_Doc]
_infoIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_infoX23 (Bool -> Options -> T_Decls_vIn22
T_Decls_vIn22 Bool
_infoOisToplevel Options
_infoOoptions)
(T_Decls_vOut22 [PP_Doc]
_dataDefIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_dataDefX23 (Bool -> Options -> T_Decls_vIn22
T_Decls_vIn22 Bool
_dataDefOisToplevel Options
_dataDefOoptions)
(T_Decls_vOut22 [PP_Doc]
_cataFunIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_cataFunX23 (Bool -> Options -> T_Decls_vIn22
T_Decls_vIn22 Bool
_cataFunOisToplevel Options
_cataFunOoptions)
(T_Decls_vOut22 [PP_Doc]
_semDomIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_semDomX23 (Bool -> Options -> T_Decls_vIn22
T_Decls_vIn22 Bool
_semDomOisToplevel Options
_semDomOoptions)
(T_Decls_vOut22 [PP_Doc]
_semWrapperIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_semWrapperX23 (Bool -> Options -> T_Decls_vIn22
T_Decls_vIn22 Bool
_semWrapperOisToplevel Options
_semWrapperOoptions)
(T_Decls_vOut22 [PP_Doc]
_semFunctionsIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_semFunctionsX23 (Bool -> Options -> T_Decls_vIn22
T_Decls_vIn22 Bool
_semFunctionsOisToplevel Options
_semFunctionsOoptions)
_lhsOpps :: PP_Docs
_lhsOpps :: [PP_Doc]
_lhsOpps = [PP_Doc]
-> PP_Doc
-> [PP_Doc]
-> [PP_Doc]
-> Map BlockInfo PP_Doc
-> [PP_Doc]
-> [PP_Doc]
-> [PP_Doc]
-> String
-> [PP_Doc]
rule7 [PP_Doc]
_cataFunIpps PP_Doc
_commentIpp [PP_Doc]
_dataDefIpps [PP_Doc]
_infoIpps Map BlockInfo PP_Doc
_lhsItextBlockMap [PP_Doc]
_semDomIpps [PP_Doc]
_semFunctionsIpps [PP_Doc]
_semWrapperIpps String
arg_name_
_commentOisToplevel :: Bool
_commentOisToplevel = Bool -> Bool
rule8 Bool
_lhsIisToplevel
_commentOoptions :: Options
_commentOoptions = Options -> Options
rule9 Options
_lhsIoptions
_infoOisToplevel :: Bool
_infoOisToplevel = Bool -> Bool
rule10 Bool
_lhsIisToplevel
_infoOoptions :: Options
_infoOoptions = Options -> Options
rule11 Options
_lhsIoptions
_dataDefOisToplevel :: Bool
_dataDefOisToplevel = Bool -> Bool
rule12 Bool
_lhsIisToplevel
_dataDefOoptions :: Options
_dataDefOoptions = Options -> Options
rule13 Options
_lhsIoptions
_cataFunOisToplevel :: Bool
_cataFunOisToplevel = Bool -> Bool
rule14 Bool
_lhsIisToplevel
_cataFunOoptions :: Options
_cataFunOoptions = Options -> Options
rule15 Options
_lhsIoptions
_semDomOisToplevel :: Bool
_semDomOisToplevel = Bool -> Bool
rule16 Bool
_lhsIisToplevel
_semDomOoptions :: Options
_semDomOoptions = Options -> Options
rule17 Options
_lhsIoptions
_semWrapperOisToplevel :: Bool
_semWrapperOisToplevel = Bool -> Bool
rule18 Bool
_lhsIisToplevel
_semWrapperOoptions :: Options
_semWrapperOoptions = Options -> Options
rule19 Options
_lhsIoptions
_semFunctionsOisToplevel :: Bool
_semFunctionsOisToplevel = Bool -> Bool
rule20 Bool
_lhsIisToplevel
_semFunctionsOoptions :: Options
_semFunctionsOoptions = Options -> Options
rule21 Options
_lhsIoptions
!__result_ :: T_Chunk_vOut7
__result_ = [PP_Doc] -> T_Chunk_vOut7
T_Chunk_vOut7 [PP_Doc]
_lhsOpps
in T_Chunk_vOut7
__result_ )
in T_Chunk_v7 -> T_Chunk_s8
C_Chunk_s8 T_Chunk_v7
v7
{-# INLINE rule7 #-}
{-# LINE 97 "src-ag/PrintOcamlCode.ag" #-}
rule7 = \ ((_cataFunIpps) :: PP_Docs) ((_commentIpp) :: PP_Doc) ((_dataDefIpps) :: PP_Docs) ((_infoIpps) :: PP_Docs) ((_lhsItextBlockMap) :: Map BlockInfo PP_Doc) ((_semDomIpps) :: PP_Docs) ((_semFunctionsIpps) :: PP_Docs) ((_semWrapperIpps) :: PP_Docs) name_ ->
{-# LINE 97 "src-ag/PrintOcamlCode.ag" #-}
_commentIpp
: _infoIpps
++ _dataDefIpps
++ _semDomIpps
++ _semFunctionsIpps
++ _semWrapperIpps
++ _cataFunIpps
++ [Map.findWithDefault empty (BlockOther, Just $ identifier name_) _lhsItextBlockMap]
{-# LINE 301 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule8 #-}
rule8 = \ ((_lhsIisToplevel) :: Bool) ->
_lhsIisToplevel
{-# INLINE rule9 #-}
rule9 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule10 #-}
rule10 = \ ((_lhsIisToplevel) :: Bool) ->
_lhsIisToplevel
{-# INLINE rule11 #-}
rule11 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule12 #-}
rule12 = \ ((_lhsIisToplevel) :: Bool) ->
_lhsIisToplevel
{-# INLINE rule13 #-}
rule13 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule14 #-}
rule14 = \ ((_lhsIisToplevel) :: Bool) ->
_lhsIisToplevel
{-# INLINE rule15 #-}
rule15 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule16 #-}
rule16 = \ ((_lhsIisToplevel) :: Bool) ->
_lhsIisToplevel
{-# INLINE rule17 #-}
rule17 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule18 #-}
rule18 = \ ((_lhsIisToplevel) :: Bool) ->
_lhsIisToplevel
{-# INLINE rule19 #-}
rule19 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule20 #-}
rule20 = \ ((_lhsIisToplevel) :: Bool) ->
_lhsIisToplevel
{-# INLINE rule21 #-}
rule21 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
data Inh_Chunks = Inh_Chunks { Inh_Chunks -> Bool
isToplevel_Inh_Chunks :: !(Bool), Inh_Chunks -> Options
options_Inh_Chunks :: !(Options), Inh_Chunks -> Map BlockInfo PP_Doc
textBlockMap_Inh_Chunks :: !(Map BlockInfo PP_Doc) }
data Syn_Chunks = Syn_Chunks { Syn_Chunks -> [PP_Doc]
pps_Syn_Chunks :: !(PP_Docs) }
{-# INLINABLE wrap_Chunks #-}
wrap_Chunks :: T_Chunks -> Inh_Chunks -> (Syn_Chunks )
wrap_Chunks :: T_Chunks -> Inh_Chunks -> Syn_Chunks
wrap_Chunks !(T_Chunks Identity T_Chunks_s11
act) !(Inh_Chunks Bool
_lhsIisToplevel Options
_lhsIoptions Map BlockInfo PP_Doc
_lhsItextBlockMap) =
Identity Syn_Chunks -> Syn_Chunks
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do !T_Chunks_s11
sem <- Identity T_Chunks_s11
act
let arg10 :: T_Chunks_vIn10
arg10 = Bool -> Options -> Map BlockInfo PP_Doc -> T_Chunks_vIn10
T_Chunks_vIn10 Bool
_lhsIisToplevel Options
_lhsIoptions Map BlockInfo PP_Doc
_lhsItextBlockMap
!(T_Chunks_vOut10 [PP_Doc]
_lhsOpps) <- T_Chunks_vOut10 -> Identity T_Chunks_vOut10
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Chunks_s11 -> T_Chunks_v10
inv_Chunks_s11 T_Chunks_s11
sem T_Chunks_vIn10
arg10)
Syn_Chunks -> Identity Syn_Chunks
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc] -> Syn_Chunks
Syn_Chunks [PP_Doc]
_lhsOpps)
)
{-# NOINLINE sem_Chunks #-}
sem_Chunks :: Chunks -> T_Chunks
sem_Chunks :: Chunks -> T_Chunks
sem_Chunks Chunks
list = (T_Chunk -> T_Chunks -> T_Chunks)
-> T_Chunks -> [T_Chunk] -> T_Chunks
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Chunk -> T_Chunks -> T_Chunks
sem_Chunks_Cons T_Chunks
sem_Chunks_Nil ((Chunk -> T_Chunk) -> Chunks -> [T_Chunk]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Chunk -> T_Chunk
sem_Chunk Chunks
list)
newtype T_Chunks = T_Chunks {
T_Chunks -> Identity T_Chunks_s11
attach_T_Chunks :: Identity (T_Chunks_s11 )
}
newtype T_Chunks_s11 = C_Chunks_s11 {
T_Chunks_s11 -> T_Chunks_v10
inv_Chunks_s11 :: (T_Chunks_v10 )
}
data T_Chunks_s12 = C_Chunks_s12
type T_Chunks_v10 = (T_Chunks_vIn10 ) -> (T_Chunks_vOut10 )
data T_Chunks_vIn10 = T_Chunks_vIn10 (Bool) (Options) (Map BlockInfo PP_Doc)
data T_Chunks_vOut10 = T_Chunks_vOut10 (PP_Docs)
{-# NOINLINE sem_Chunks_Cons #-}
sem_Chunks_Cons :: T_Chunk -> T_Chunks -> T_Chunks
sem_Chunks_Cons :: T_Chunk -> T_Chunks -> T_Chunks
sem_Chunks_Cons T_Chunk
arg_hd_ T_Chunks
arg_tl_ = Identity T_Chunks_s11 -> T_Chunks
T_Chunks (T_Chunks_s11 -> Identity T_Chunks_s11
forall (m :: * -> *) a. Monad m => a -> m a
return T_Chunks_s11
st11) where
{-# NOINLINE st11 #-}
!st11 :: T_Chunks_s11
st11 = let
v10 :: T_Chunks_v10
v10 :: T_Chunks_v10
v10 = \ !(T_Chunks_vIn10 Bool
_lhsIisToplevel Options
_lhsIoptions Map BlockInfo PP_Doc
_lhsItextBlockMap) -> ( let
_hdX8 :: T_Chunk_s8
_hdX8 = Identity T_Chunk_s8 -> T_Chunk_s8
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Chunk -> Identity T_Chunk_s8
attach_T_Chunk (T_Chunk
arg_hd_))
_tlX11 :: T_Chunks_s11
_tlX11 = Identity T_Chunks_s11 -> T_Chunks_s11
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Chunks -> Identity T_Chunks_s11
attach_T_Chunks (T_Chunks
arg_tl_))
(T_Chunk_vOut7 [PP_Doc]
_hdIpps) = T_Chunk_s8 -> T_Chunk_v7
inv_Chunk_s8 T_Chunk_s8
_hdX8 (Bool -> Options -> Map BlockInfo PP_Doc -> T_Chunk_vIn7
T_Chunk_vIn7 Bool
_hdOisToplevel Options
_hdOoptions Map BlockInfo PP_Doc
_hdOtextBlockMap)
(T_Chunks_vOut10 [PP_Doc]
_tlIpps) = T_Chunks_s11 -> T_Chunks_v10
inv_Chunks_s11 T_Chunks_s11
_tlX11 (Bool -> Options -> Map BlockInfo PP_Doc -> T_Chunks_vIn10
T_Chunks_vIn10 Bool
_tlOisToplevel Options
_tlOoptions Map BlockInfo PP_Doc
_tlOtextBlockMap)
_lhsOpps :: PP_Docs
_lhsOpps :: [PP_Doc]
_lhsOpps = [PP_Doc] -> [PP_Doc] -> [PP_Doc]
rule22 [PP_Doc]
_hdIpps [PP_Doc]
_tlIpps
_hdOisToplevel :: Bool
_hdOisToplevel = Bool -> Bool
rule23 Bool
_lhsIisToplevel
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule24 Options
_lhsIoptions
_hdOtextBlockMap :: Map BlockInfo PP_Doc
_hdOtextBlockMap = Map BlockInfo PP_Doc -> Map BlockInfo PP_Doc
rule25 Map BlockInfo PP_Doc
_lhsItextBlockMap
_tlOisToplevel :: Bool
_tlOisToplevel = Bool -> Bool
rule26 Bool
_lhsIisToplevel
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule27 Options
_lhsIoptions
_tlOtextBlockMap :: Map BlockInfo PP_Doc
_tlOtextBlockMap = Map BlockInfo PP_Doc -> Map BlockInfo PP_Doc
rule28 Map BlockInfo PP_Doc
_lhsItextBlockMap
!__result_ :: T_Chunks_vOut10
__result_ = [PP_Doc] -> T_Chunks_vOut10
T_Chunks_vOut10 [PP_Doc]
_lhsOpps
in T_Chunks_vOut10
__result_ )
in T_Chunks_v10 -> T_Chunks_s11
C_Chunks_s11 T_Chunks_v10
v10
{-# INLINE rule22 #-}
{-# LINE 85 "src-ag/PrintOcamlCode.ag" #-}
rule22 = \ ((_hdIpps) :: PP_Docs) ((_tlIpps) :: PP_Docs) ->
{-# LINE 85 "src-ag/PrintOcamlCode.ag" #-}
_hdIpps ++ _tlIpps
{-# LINE 402 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule23 #-}
rule23 = \ ((_lhsIisToplevel) :: Bool) ->
_lhsIisToplevel
{-# INLINE rule24 #-}
rule24 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule25 #-}
rule25 = \ ((_lhsItextBlockMap) :: Map BlockInfo PP_Doc) ->
_lhsItextBlockMap
{-# INLINE rule26 #-}
rule26 = \ ((_lhsIisToplevel) :: Bool) ->
_lhsIisToplevel
{-# INLINE rule27 #-}
rule27 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule28 #-}
rule28 = \ ((_lhsItextBlockMap) :: Map BlockInfo PP_Doc) ->
_lhsItextBlockMap
{-# NOINLINE sem_Chunks_Nil #-}
sem_Chunks_Nil :: T_Chunks
sem_Chunks_Nil :: T_Chunks
sem_Chunks_Nil = Identity T_Chunks_s11 -> T_Chunks
T_Chunks (T_Chunks_s11 -> Identity T_Chunks_s11
forall (m :: * -> *) a. Monad m => a -> m a
return T_Chunks_s11
st11) where
{-# NOINLINE st11 #-}
!st11 :: T_Chunks_s11
st11 = let
v10 :: T_Chunks_v10
v10 :: T_Chunks_v10
v10 = \ !(T_Chunks_vIn10 Bool
_lhsIisToplevel Options
_lhsIoptions Map BlockInfo PP_Doc
_lhsItextBlockMap) -> ( let
_lhsOpps :: PP_Docs
_lhsOpps :: [PP_Doc]
_lhsOpps = () -> [PP_Doc]
forall a. () -> [a]
rule29 ()
!__result_ :: T_Chunks_vOut10
__result_ = [PP_Doc] -> T_Chunks_vOut10
T_Chunks_vOut10 [PP_Doc]
_lhsOpps
in T_Chunks_vOut10
__result_ )
in T_Chunks_v10 -> T_Chunks_s11
C_Chunks_s11 T_Chunks_v10
v10
{-# INLINE rule29 #-}
{-# LINE 86 "src-ag/PrintOcamlCode.ag" #-}
rule29 = \ (_ :: ()) ->
{-# LINE 86 "src-ag/PrintOcamlCode.ag" #-}
[]
{-# LINE 438 "src-generated/PrintOcamlCode.hs" #-}
data Inh_DataAlt = Inh_DataAlt { }
data Syn_DataAlt = Syn_DataAlt { Syn_DataAlt -> PP_Doc
pp_Syn_DataAlt :: !(PP_Doc) }
{-# INLINABLE wrap_DataAlt #-}
wrap_DataAlt :: T_DataAlt -> Inh_DataAlt -> (Syn_DataAlt )
wrap_DataAlt :: T_DataAlt -> Inh_DataAlt -> Syn_DataAlt
wrap_DataAlt !(T_DataAlt Identity T_DataAlt_s14
act) !(Inh_DataAlt
Inh_DataAlt ) =
Identity Syn_DataAlt -> Syn_DataAlt
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do !T_DataAlt_s14
sem <- Identity T_DataAlt_s14
act
let arg13 :: T_DataAlt_vIn13
arg13 = T_DataAlt_vIn13
T_DataAlt_vIn13
!(T_DataAlt_vOut13 PP_Doc
_lhsOpp) <- T_DataAlt_vOut13 -> Identity T_DataAlt_vOut13
forall (m :: * -> *) a. Monad m => a -> m a
return (T_DataAlt_s14 -> T_DataAlt_v13
inv_DataAlt_s14 T_DataAlt_s14
sem T_DataAlt_vIn13
arg13)
Syn_DataAlt -> Identity Syn_DataAlt
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_DataAlt
Syn_DataAlt PP_Doc
_lhsOpp)
)
{-# NOINLINE sem_DataAlt #-}
sem_DataAlt :: DataAlt -> T_DataAlt
sem_DataAlt :: DataAlt -> T_DataAlt
sem_DataAlt ( DataAlt !String
name_ Types
args_ ) = String -> T_Types -> T_DataAlt
sem_DataAlt_DataAlt String
name_ ( Types -> T_Types
sem_Types Types
args_ )
sem_DataAlt ( Record !String
name_ NamedTypes
args_ ) = String -> T_NamedTypes -> T_DataAlt
sem_DataAlt_Record String
name_ ( NamedTypes -> T_NamedTypes
sem_NamedTypes NamedTypes
args_ )
newtype T_DataAlt = T_DataAlt {
T_DataAlt -> Identity T_DataAlt_s14
attach_T_DataAlt :: Identity (T_DataAlt_s14 )
}
newtype T_DataAlt_s14 = C_DataAlt_s14 {
T_DataAlt_s14 -> T_DataAlt_v13
inv_DataAlt_s14 :: (T_DataAlt_v13 )
}
data T_DataAlt_s15 = C_DataAlt_s15
type T_DataAlt_v13 = (T_DataAlt_vIn13 ) -> (T_DataAlt_vOut13 )
data T_DataAlt_vIn13 = T_DataAlt_vIn13
data T_DataAlt_vOut13 = T_DataAlt_vOut13 (PP_Doc)
{-# NOINLINE sem_DataAlt_DataAlt #-}
sem_DataAlt_DataAlt :: (String) -> T_Types -> T_DataAlt
sem_DataAlt_DataAlt :: String -> T_Types -> T_DataAlt
sem_DataAlt_DataAlt !String
arg_name_ T_Types
arg_args_ = Identity T_DataAlt_s14 -> T_DataAlt
T_DataAlt (T_DataAlt_s14 -> Identity T_DataAlt_s14
forall (m :: * -> *) a. Monad m => a -> m a
return T_DataAlt_s14
st14) where
{-# NOINLINE st14 #-}
!st14 :: T_DataAlt_s14
st14 = let
v13 :: T_DataAlt_v13
v13 :: T_DataAlt_v13
v13 = \ !(T_DataAlt_vIn13
T_DataAlt_vIn13 ) -> ( let
_argsX53 :: T_Types_s53
_argsX53 = Identity T_Types_s53 -> T_Types_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Types -> Identity T_Types_s53
attach_T_Types (T_Types
arg_args_))
(T_Types_vOut52 [PP_Doc]
_argsIpps) = T_Types_s53 -> T_Types_v52
inv_Types_s53 T_Types_s53
_argsX53 (T_Types_vIn52
T_Types_vIn52 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> String -> PP_Doc
rule30 [PP_Doc]
_argsIpps String
arg_name_
!__result_ :: T_DataAlt_vOut13
__result_ = PP_Doc -> T_DataAlt_vOut13
T_DataAlt_vOut13 PP_Doc
_lhsOpp
in T_DataAlt_vOut13
__result_ )
in T_DataAlt_v13 -> T_DataAlt_s14
C_DataAlt_s14 T_DataAlt_v13
v13
{-# INLINE rule30 #-}
{-# LINE 187 "src-ag/PrintOcamlCode.ag" #-}
rule30 = \ ((_argsIpps) :: PP_Docs) name_ ->
{-# LINE 187 "src-ag/PrintOcamlCode.ag" #-}
name_ >#< "of" >#< pp_block "" "" " * " (map pp_parens _argsIpps)
{-# LINE 490 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_DataAlt_Record #-}
sem_DataAlt_Record :: (String) -> T_NamedTypes -> T_DataAlt
sem_DataAlt_Record :: String -> T_NamedTypes -> T_DataAlt
sem_DataAlt_Record String
_ T_NamedTypes
arg_args_ = Identity T_DataAlt_s14 -> T_DataAlt
T_DataAlt (T_DataAlt_s14 -> Identity T_DataAlt_s14
forall (m :: * -> *) a. Monad m => a -> m a
return T_DataAlt_s14
st14) where
{-# NOINLINE st14 #-}
!st14 :: T_DataAlt_s14
st14 = let
v13 :: T_DataAlt_v13
v13 :: T_DataAlt_v13
v13 = \ !(T_DataAlt_vIn13
T_DataAlt_vIn13 ) -> ( let
_argsX38 :: T_NamedTypes_s38
_argsX38 = Identity T_NamedTypes_s38 -> T_NamedTypes_s38
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NamedTypes -> Identity T_NamedTypes_s38
attach_T_NamedTypes (T_NamedTypes
arg_args_))
(T_NamedTypes_vOut37 [PP_Doc]
_argsIpps) = T_NamedTypes_s38 -> T_NamedTypes_v37
inv_NamedTypes_s38 T_NamedTypes_s38
_argsX38 (T_NamedTypes_vIn37
T_NamedTypes_vIn37 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> PP_Doc
rule31 [PP_Doc]
_argsIpps
!__result_ :: T_DataAlt_vOut13
__result_ = PP_Doc -> T_DataAlt_vOut13
T_DataAlt_vOut13 PP_Doc
_lhsOpp
in T_DataAlt_vOut13
__result_ )
in T_DataAlt_v13 -> T_DataAlt_s14
C_DataAlt_s14 T_DataAlt_v13
v13
{-# INLINE rule31 #-}
{-# LINE 188 "src-ag/PrintOcamlCode.ag" #-}
rule31 = \ ((_argsIpps) :: PP_Docs) ->
{-# LINE 188 "src-ag/PrintOcamlCode.ag" #-}
pp_block "{" "}" ";" _argsIpps
{-# LINE 510 "src-generated/PrintOcamlCode.hs" #-}
data Inh_DataAlts = Inh_DataAlts { }
data Syn_DataAlts = Syn_DataAlts { Syn_DataAlts -> [PP_Doc]
pps_Syn_DataAlts :: !(PP_Docs) }
{-# INLINABLE wrap_DataAlts #-}
wrap_DataAlts :: T_DataAlts -> Inh_DataAlts -> (Syn_DataAlts )
wrap_DataAlts :: T_DataAlts -> Inh_DataAlts -> Syn_DataAlts
wrap_DataAlts !(T_DataAlts Identity T_DataAlts_s17
act) !(Inh_DataAlts
Inh_DataAlts ) =
Identity Syn_DataAlts -> Syn_DataAlts
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do !T_DataAlts_s17
sem <- Identity T_DataAlts_s17
act
let arg16 :: T_DataAlts_vIn16
arg16 = T_DataAlts_vIn16
T_DataAlts_vIn16
!(T_DataAlts_vOut16 [PP_Doc]
_lhsOpps) <- T_DataAlts_vOut16 -> Identity T_DataAlts_vOut16
forall (m :: * -> *) a. Monad m => a -> m a
return (T_DataAlts_s17 -> T_DataAlts_v16
inv_DataAlts_s17 T_DataAlts_s17
sem T_DataAlts_vIn16
arg16)
Syn_DataAlts -> Identity Syn_DataAlts
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc] -> Syn_DataAlts
Syn_DataAlts [PP_Doc]
_lhsOpps)
)
{-# NOINLINE sem_DataAlts #-}
sem_DataAlts :: DataAlts -> T_DataAlts
sem_DataAlts :: DataAlts -> T_DataAlts
sem_DataAlts DataAlts
list = (T_DataAlt -> T_DataAlts -> T_DataAlts)
-> T_DataAlts -> [T_DataAlt] -> T_DataAlts
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_DataAlt -> T_DataAlts -> T_DataAlts
sem_DataAlts_Cons T_DataAlts
sem_DataAlts_Nil ((DataAlt -> T_DataAlt) -> DataAlts -> [T_DataAlt]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map DataAlt -> T_DataAlt
sem_DataAlt DataAlts
list)
newtype T_DataAlts = T_DataAlts {
T_DataAlts -> Identity T_DataAlts_s17
attach_T_DataAlts :: Identity (T_DataAlts_s17 )
}
newtype T_DataAlts_s17 = C_DataAlts_s17 {
T_DataAlts_s17 -> T_DataAlts_v16
inv_DataAlts_s17 :: (T_DataAlts_v16 )
}
data T_DataAlts_s18 = C_DataAlts_s18
type T_DataAlts_v16 = (T_DataAlts_vIn16 ) -> (T_DataAlts_vOut16 )
data T_DataAlts_vIn16 = T_DataAlts_vIn16
data T_DataAlts_vOut16 = T_DataAlts_vOut16 (PP_Docs)
{-# NOINLINE sem_DataAlts_Cons #-}
sem_DataAlts_Cons :: T_DataAlt -> T_DataAlts -> T_DataAlts
sem_DataAlts_Cons :: T_DataAlt -> T_DataAlts -> T_DataAlts
sem_DataAlts_Cons T_DataAlt
arg_hd_ T_DataAlts
arg_tl_ = Identity T_DataAlts_s17 -> T_DataAlts
T_DataAlts (T_DataAlts_s17 -> Identity T_DataAlts_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_DataAlts_s17
st17) where
{-# NOINLINE st17 #-}
!st17 :: T_DataAlts_s17
st17 = let
v16 :: T_DataAlts_v16
v16 :: T_DataAlts_v16
v16 = \ !(T_DataAlts_vIn16
T_DataAlts_vIn16 ) -> ( let
_hdX14 :: T_DataAlt_s14
_hdX14 = Identity T_DataAlt_s14 -> T_DataAlt_s14
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_DataAlt -> Identity T_DataAlt_s14
attach_T_DataAlt (T_DataAlt
arg_hd_))
_tlX17 :: T_DataAlts_s17
_tlX17 = Identity T_DataAlts_s17 -> T_DataAlts_s17
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_DataAlts -> Identity T_DataAlts_s17
attach_T_DataAlts (T_DataAlts
arg_tl_))
(T_DataAlt_vOut13 PP_Doc
_hdIpp) = T_DataAlt_s14 -> T_DataAlt_v13
inv_DataAlt_s14 T_DataAlt_s14
_hdX14 (T_DataAlt_vIn13
T_DataAlt_vIn13 )
(T_DataAlts_vOut16 [PP_Doc]
_tlIpps) = T_DataAlts_s17 -> T_DataAlts_v16
inv_DataAlts_s17 T_DataAlts_s17
_tlX17 (T_DataAlts_vIn16
T_DataAlts_vIn16 )
_lhsOpps :: PP_Docs
_lhsOpps :: [PP_Doc]
_lhsOpps = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule32 PP_Doc
_hdIpp [PP_Doc]
_tlIpps
!__result_ :: T_DataAlts_vOut16
__result_ = [PP_Doc] -> T_DataAlts_vOut16
T_DataAlts_vOut16 [PP_Doc]
_lhsOpps
in T_DataAlts_vOut16
__result_ )
in T_DataAlts_v16 -> T_DataAlts_s17
C_DataAlts_s17 T_DataAlts_v16
v16
{-# INLINE rule32 #-}
{-# LINE 69 "src-ag/PrintOcamlCode.ag" #-}
rule32 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: PP_Docs) ->
{-# LINE 69 "src-ag/PrintOcamlCode.ag" #-}
_hdIpp : _tlIpps
{-# LINE 563 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_DataAlts_Nil #-}
sem_DataAlts_Nil :: T_DataAlts
sem_DataAlts_Nil :: T_DataAlts
sem_DataAlts_Nil = Identity T_DataAlts_s17 -> T_DataAlts
T_DataAlts (T_DataAlts_s17 -> Identity T_DataAlts_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_DataAlts_s17
st17) where
{-# NOINLINE st17 #-}
!st17 :: T_DataAlts_s17
st17 = let
v16 :: T_DataAlts_v16
v16 :: T_DataAlts_v16
v16 = \ !(T_DataAlts_vIn16
T_DataAlts_vIn16 ) -> ( let
_lhsOpps :: PP_Docs
_lhsOpps :: [PP_Doc]
_lhsOpps = () -> [PP_Doc]
forall a. () -> [a]
rule33 ()
!__result_ :: T_DataAlts_vOut16
__result_ = [PP_Doc] -> T_DataAlts_vOut16
T_DataAlts_vOut16 [PP_Doc]
_lhsOpps
in T_DataAlts_vOut16
__result_ )
in T_DataAlts_v16 -> T_DataAlts_s17
C_DataAlts_s17 T_DataAlts_v16
v16
{-# INLINE rule33 #-}
{-# LINE 70 "src-ag/PrintOcamlCode.ag" #-}
rule33 = \ (_ :: ()) ->
{-# LINE 70 "src-ag/PrintOcamlCode.ag" #-}
[]
{-# LINE 581 "src-generated/PrintOcamlCode.hs" #-}
data Inh_Decl = Inh_Decl { Inh_Decl -> Bool
isToplevel_Inh_Decl :: !(Bool), Inh_Decl -> Options
options_Inh_Decl :: !(Options) }
data Syn_Decl = Syn_Decl { Syn_Decl -> PP_Doc
pp_Syn_Decl :: !(PP_Doc) }
{-# INLINABLE wrap_Decl #-}
wrap_Decl :: T_Decl -> Inh_Decl -> (Syn_Decl )
wrap_Decl :: T_Decl -> Inh_Decl -> Syn_Decl
wrap_Decl !(T_Decl Identity T_Decl_s20
act) !(Inh_Decl Bool
_lhsIisToplevel Options
_lhsIoptions) =
Identity Syn_Decl -> Syn_Decl
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do !T_Decl_s20
sem <- Identity T_Decl_s20
act
let arg19 :: T_Decl_vIn19
arg19 = Bool -> Options -> T_Decl_vIn19
T_Decl_vIn19 Bool
_lhsIisToplevel Options
_lhsIoptions
!(T_Decl_vOut19 PP_Doc
_lhsOpp) <- T_Decl_vOut19 -> Identity T_Decl_vOut19
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Decl_s20 -> T_Decl_v19
inv_Decl_s20 T_Decl_s20
sem T_Decl_vIn19
arg19)
Syn_Decl -> Identity Syn_Decl
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_Decl
Syn_Decl PP_Doc
_lhsOpp)
)
{-# NOINLINE sem_Decl #-}
sem_Decl :: Decl -> T_Decl
sem_Decl :: Decl -> T_Decl
sem_Decl ( Decl Lhs
left_ Expr
rhs_ !Set String
binds_ !Set String
uses_ ) = T_Lhs -> T_Expr -> Set String -> Set String -> T_Decl
sem_Decl_Decl ( Lhs -> T_Lhs
sem_Lhs Lhs
left_ ) ( Expr -> T_Expr
sem_Expr Expr
rhs_ ) Set String
binds_ Set String
uses_
sem_Decl ( Bind Lhs
left_ Expr
rhs_ ) = T_Lhs -> T_Expr -> T_Decl
sem_Decl_Bind ( Lhs -> T_Lhs
sem_Lhs Lhs
left_ ) ( Expr -> T_Expr
sem_Expr Expr
rhs_ )
sem_Decl ( BindLet Lhs
left_ Expr
rhs_ ) = T_Lhs -> T_Expr -> T_Decl
sem_Decl_BindLet ( Lhs -> T_Lhs
sem_Lhs Lhs
left_ ) ( Expr -> T_Expr
sem_Expr Expr
rhs_ )
sem_Decl ( Data !String
name_ ![String]
params_ DataAlts
alts_ !Bool
strict_ ![String]
derivings_ ) = String -> [String] -> T_DataAlts -> Bool -> [String] -> T_Decl
sem_Decl_Data String
name_ [String]
params_ ( DataAlts -> T_DataAlts
sem_DataAlts DataAlts
alts_ ) Bool
strict_ [String]
derivings_
sem_Decl ( NewType !String
name_ ![String]
params_ !String
con_ Type
tp_ ) = String -> [String] -> String -> T_Type -> T_Decl
sem_Decl_NewType String
name_ [String]
params_ String
con_ ( Type -> T_Type
sem_Type Type
tp_ )
sem_Decl ( Type !String
name_ ![String]
params_ Type
tp_ ) = String -> [String] -> T_Type -> T_Decl
sem_Decl_Type String
name_ [String]
params_ ( Type -> T_Type
sem_Type Type
tp_ )
sem_Decl ( TSig !String
name_ Type
tp_ ) = String -> T_Type -> T_Decl
sem_Decl_TSig String
name_ ( Type -> T_Type
sem_Type Type
tp_ )
sem_Decl ( Comment !String
txt_ ) = String -> T_Decl
sem_Decl_Comment String
txt_
sem_Decl ( PragmaDecl !String
txt_ ) = String -> T_Decl
sem_Decl_PragmaDecl String
txt_
sem_Decl ( Resume !Bool
monadic_ !String
nt_ Lhs
left_ Expr
rhs_ ) = Bool -> String -> T_Lhs -> T_Expr -> T_Decl
sem_Decl_Resume Bool
monadic_ String
nt_ ( Lhs -> T_Lhs
sem_Lhs Lhs
left_ ) ( Expr -> T_Expr
sem_Expr Expr
rhs_ )
sem_Decl ( EvalDecl !String
nt_ Lhs
left_ Expr
rhs_ ) = String -> T_Lhs -> T_Expr -> T_Decl
sem_Decl_EvalDecl String
nt_ ( Lhs -> T_Lhs
sem_Lhs Lhs
left_ ) ( Expr -> T_Expr
sem_Expr Expr
rhs_ )
newtype T_Decl = T_Decl {
T_Decl -> Identity T_Decl_s20
attach_T_Decl :: Identity (T_Decl_s20 )
}
newtype T_Decl_s20 = C_Decl_s20 {
T_Decl_s20 -> T_Decl_v19
inv_Decl_s20 :: (T_Decl_v19 )
}
data T_Decl_s21 = C_Decl_s21
type T_Decl_v19 = (T_Decl_vIn19 ) -> (T_Decl_vOut19 )
data T_Decl_vIn19 = T_Decl_vIn19 (Bool) (Options)
data T_Decl_vOut19 = T_Decl_vOut19 (PP_Doc)
{-# NOINLINE sem_Decl_Decl #-}
sem_Decl_Decl :: T_Lhs -> T_Expr -> (Set String) -> (Set String) -> T_Decl
sem_Decl_Decl :: T_Lhs -> T_Expr -> Set String -> Set String -> T_Decl
sem_Decl_Decl T_Lhs
arg_left_ T_Expr
arg_rhs_ Set String
_ Set String
_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
{-# NOINLINE st20 #-}
!st20 :: T_Decl_s20
st20 = let
v19 :: T_Decl_v19
v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisToplevel Options
_lhsIoptions) -> ( let
_leftX32 :: T_Lhs_s32
_leftX32 = Identity T_Lhs_s32 -> T_Lhs_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs (T_Lhs
arg_left_))
_rhsX26 :: T_Expr_s26
_rhsX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_rhs_))
(T_Lhs_vOut31 PP_Doc
_leftIpp) = T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
_leftX32 (Options -> T_Lhs_vIn31
T_Lhs_vIn31 Options
_leftOoptions)
(T_Expr_vOut25 PP_Doc
_rhsIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_rhsX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_rhsOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> Bool -> PP_Doc -> PP_Doc
rule34 PP_Doc
_leftIpp Bool
_lhsIisToplevel PP_Doc
_rhsIpp
_leftOoptions :: Options
_leftOoptions = Options -> Options
rule35 Options
_lhsIoptions
_rhsOoptions :: Options
_rhsOoptions = Options -> Options
rule36 Options
_lhsIoptions
!__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp
in T_Decl_vOut19
__result_ )
in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
{-# INLINE rule34 #-}
{-# LINE 107 "src-ag/PrintOcamlCode.ag" #-}
rule34 = \ ((_leftIpp) :: PP_Doc) ((_lhsIisToplevel) :: Bool) ((_rhsIpp) :: PP_Doc) ->
{-# LINE 107 "src-ag/PrintOcamlCode.ag" #-}
if _lhsIisToplevel
then "let" >#< _leftIpp >#< "="
>-< indent 4 _rhsIpp >#< ";;"
else "let" >#< _leftIpp >#< "="
>-< indent 4 _rhsIpp >#< "in"
{-# LINE 650 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule35 #-}
rule35 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule36 #-}
rule36 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Decl_Bind #-}
sem_Decl_Bind :: T_Lhs -> T_Expr -> T_Decl
sem_Decl_Bind :: T_Lhs -> T_Expr -> T_Decl
sem_Decl_Bind T_Lhs
arg_left_ T_Expr
arg_rhs_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
{-# NOINLINE st20 #-}
!st20 :: T_Decl_s20
st20 = let
v19 :: T_Decl_v19
v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisToplevel Options
_lhsIoptions) -> ( let
_leftX32 :: T_Lhs_s32
_leftX32 = Identity T_Lhs_s32 -> T_Lhs_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs (T_Lhs
arg_left_))
_rhsX26 :: T_Expr_s26
_rhsX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_rhs_))
(T_Lhs_vOut31 PP_Doc
_leftIpp) = T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
_leftX32 (Options -> T_Lhs_vIn31
T_Lhs_vIn31 Options
_leftOoptions)
(T_Expr_vOut25 PP_Doc
_rhsIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_rhsX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_rhsOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
forall a. () -> a
rule37 ()
_leftOoptions :: Options
_leftOoptions = Options -> Options
rule38 Options
_lhsIoptions
_rhsOoptions :: Options
_rhsOoptions = Options -> Options
rule39 Options
_lhsIoptions
!__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp
in T_Decl_vOut19
__result_ )
in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
{-# INLINE rule37 #-}
{-# LINE 112 "src-ag/PrintOcamlCode.ag" #-}
rule37 = \ (_ :: ()) ->
{-# LINE 112 "src-ag/PrintOcamlCode.ag" #-}
error "pp of Decl.Bind not supported"
{-# LINE 680 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule38 #-}
rule38 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule39 #-}
rule39 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Decl_BindLet #-}
sem_Decl_BindLet :: T_Lhs -> T_Expr -> T_Decl
sem_Decl_BindLet :: T_Lhs -> T_Expr -> T_Decl
sem_Decl_BindLet T_Lhs
arg_left_ T_Expr
arg_rhs_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
{-# NOINLINE st20 #-}
!st20 :: T_Decl_s20
st20 = let
v19 :: T_Decl_v19
v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisToplevel Options
_lhsIoptions) -> ( let
_leftX32 :: T_Lhs_s32
_leftX32 = Identity T_Lhs_s32 -> T_Lhs_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs (T_Lhs
arg_left_))
_rhsX26 :: T_Expr_s26
_rhsX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_rhs_))
(T_Lhs_vOut31 PP_Doc
_leftIpp) = T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
_leftX32 (Options -> T_Lhs_vIn31
T_Lhs_vIn31 Options
_leftOoptions)
(T_Expr_vOut25 PP_Doc
_rhsIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_rhsX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_rhsOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
forall a. () -> a
rule40 ()
_leftOoptions :: Options
_leftOoptions = Options -> Options
rule41 Options
_lhsIoptions
_rhsOoptions :: Options
_rhsOoptions = Options -> Options
rule42 Options
_lhsIoptions
!__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp
in T_Decl_vOut19
__result_ )
in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
{-# INLINE rule40 #-}
{-# LINE 113 "src-ag/PrintOcamlCode.ag" #-}
rule40 = \ (_ :: ()) ->
{-# LINE 113 "src-ag/PrintOcamlCode.ag" #-}
error "pp of Decl.BindLet not supported"
{-# LINE 710 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule41 #-}
rule41 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule42 #-}
rule42 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Decl_Data #-}
sem_Decl_Data :: (String) -> ([String]) -> T_DataAlts -> (Bool) -> ([String]) -> T_Decl
sem_Decl_Data :: String -> [String] -> T_DataAlts -> Bool -> [String] -> T_Decl
sem_Decl_Data !String
arg_name_ ![String]
arg_params_ T_DataAlts
arg_alts_ Bool
_ [String]
_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
{-# NOINLINE st20 #-}
!st20 :: T_Decl_s20
st20 = let
v19 :: T_Decl_v19
v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisToplevel Options
_lhsIoptions) -> ( let
_altsX17 :: T_DataAlts_s17
_altsX17 = Identity T_DataAlts_s17 -> T_DataAlts_s17
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_DataAlts -> Identity T_DataAlts_s17
attach_T_DataAlts (T_DataAlts
arg_alts_))
(T_DataAlts_vOut16 [PP_Doc]
_altsIpps) = T_DataAlts_s17 -> T_DataAlts_v16
inv_DataAlts_s17 T_DataAlts_s17
_altsX17 (T_DataAlts_vIn16
T_DataAlts_vIn16 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> String -> [String] -> PP_Doc
rule43 [PP_Doc]
_altsIpps String
arg_name_ [String]
arg_params_
!__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp
in T_Decl_vOut19
__result_ )
in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
{-# INLINE rule43 #-}
{-# LINE 114 "src-ag/PrintOcamlCode.ag" #-}
rule43 = \ ((_altsIpps) :: PP_Docs) name_ params_ ->
{-# LINE 114 "src-ag/PrintOcamlCode.ag" #-}
"type" >#< hv_sp (map (\p -> "'" >|< p) params_ ++ [text $ toOcamlTC name_])
>#< ( case _altsIpps of
[] -> empty
(x:xs) -> "=" >#< x
>-< vlist (map ("|" >#<) xs)
)
>#< ";;"
{-# LINE 742 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Decl_NewType #-}
sem_Decl_NewType :: (String) -> ([String]) -> (String) -> T_Type -> T_Decl
sem_Decl_NewType :: String -> [String] -> String -> T_Type -> T_Decl
sem_Decl_NewType String
_ [String]
_ String
_ T_Type
arg_tp_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
{-# NOINLINE st20 #-}
!st20 :: T_Decl_s20
st20 = let
v19 :: T_Decl_v19
v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisToplevel Options
_lhsIoptions) -> ( let
_tpX50 :: T_Type_s50
_tpX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_tp_))
(T_Type_vOut49 PP_Doc
_tpIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_tpX50 (T_Type_vIn49
T_Type_vIn49 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
forall a. () -> a
rule44 ()
!__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp
in T_Decl_vOut19
__result_ )
in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
{-# INLINE rule44 #-}
{-# LINE 121 "src-ag/PrintOcamlCode.ag" #-}
rule44 = \ (_ :: ()) ->
{-# LINE 121 "src-ag/PrintOcamlCode.ag" #-}
error "pp of Decl.NewType not supported"
{-# LINE 762 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Decl_Type #-}
sem_Decl_Type :: (String) -> ([String]) -> T_Type -> T_Decl
sem_Decl_Type :: String -> [String] -> T_Type -> T_Decl
sem_Decl_Type !String
arg_name_ ![String]
arg_params_ T_Type
arg_tp_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
{-# NOINLINE st20 #-}
!st20 :: T_Decl_s20
st20 = let
v19 :: T_Decl_v19
v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisToplevel Options
_lhsIoptions) -> ( let
_tpX50 :: T_Type_s50
_tpX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_tp_))
(T_Type_vOut49 PP_Doc
_tpIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_tpX50 (T_Type_vIn49
T_Type_vIn49 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> String -> [String] -> PP_Doc
rule45 PP_Doc
_tpIpp String
arg_name_ [String]
arg_params_
!__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp
in T_Decl_vOut19
__result_ )
in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
{-# INLINE rule45 #-}
{-# LINE 122 "src-ag/PrintOcamlCode.ag" #-}
rule45 = \ ((_tpIpp) :: PP_Doc) name_ params_ ->
{-# LINE 122 "src-ag/PrintOcamlCode.ag" #-}
"type" >#< hv_sp (map (\p -> "'" >|< p) params_ ++ [text $ toOcamlTC name_]) >#< "=" >#< _tpIpp >#< ";;"
{-# LINE 782 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Decl_TSig #-}
sem_Decl_TSig :: (String) -> T_Type -> T_Decl
sem_Decl_TSig :: String -> T_Type -> T_Decl
sem_Decl_TSig !String
arg_name_ T_Type
arg_tp_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
{-# NOINLINE st20 #-}
!st20 :: T_Decl_s20
st20 = let
v19 :: T_Decl_v19
v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisToplevel Options
_lhsIoptions) -> ( let
_tpX50 :: T_Type_s50
_tpX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_tp_))
(T_Type_vOut49 PP_Doc
_tpIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_tpX50 (T_Type_vIn49
T_Type_vIn49 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> String -> PP_Doc
rule46 PP_Doc
_tpIpp String
arg_name_
!__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp
in T_Decl_vOut19
__result_ )
in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
{-# INLINE rule46 #-}
{-# LINE 123 "src-ag/PrintOcamlCode.ag" #-}
rule46 = \ ((_tpIpp) :: PP_Doc) name_ ->
{-# LINE 123 "src-ag/PrintOcamlCode.ag" #-}
"(*" >#< name_ >#< ":" >#< _tpIpp >#< "*)"
{-# LINE 802 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Decl_Comment #-}
sem_Decl_Comment :: (String) -> T_Decl
!String
arg_txt_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
{-# NOINLINE st20 #-}
!st20 :: T_Decl_s20
st20 = let
v19 :: T_Decl_v19
v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisToplevel Options
_lhsIoptions) -> ( let
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = String -> PP_Doc
rule47 String
arg_txt_
!__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp
in T_Decl_vOut19
__result_ )
in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
{-# INLINE rule47 #-}
{-# LINE 124 "src-ag/PrintOcamlCode.ag" #-}
rule47 = \ txt_ ->
{-# LINE 124 "src-ag/PrintOcamlCode.ag" #-}
if '\n' `elem` txt_
then "(* " >-< vlist (lines txt_) >-< "*)"
else "(*" >#< txt_ >#< "*)"
{-# LINE 822 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Decl_PragmaDecl #-}
sem_Decl_PragmaDecl :: (String) -> T_Decl
sem_Decl_PragmaDecl :: String -> T_Decl
sem_Decl_PragmaDecl String
_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
{-# NOINLINE st20 #-}
!st20 :: T_Decl_s20
st20 = let
v19 :: T_Decl_v19
v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisToplevel Options
_lhsIoptions) -> ( let
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
forall a. () -> a
rule48 ()
!__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp
in T_Decl_vOut19
__result_ )
in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
{-# INLINE rule48 #-}
{-# LINE 127 "src-ag/PrintOcamlCode.ag" #-}
rule48 = \ (_ :: ()) ->
{-# LINE 127 "src-ag/PrintOcamlCode.ag" #-}
error "pp of Decl.PragmaDecl not supported"
{-# LINE 840 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Decl_Resume #-}
sem_Decl_Resume :: (Bool) -> (String) -> T_Lhs -> T_Expr -> T_Decl
sem_Decl_Resume :: Bool -> String -> T_Lhs -> T_Expr -> T_Decl
sem_Decl_Resume Bool
_ String
_ T_Lhs
arg_left_ T_Expr
arg_rhs_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
{-# NOINLINE st20 #-}
!st20 :: T_Decl_s20
st20 = let
v19 :: T_Decl_v19
v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisToplevel Options
_lhsIoptions) -> ( let
_leftX32 :: T_Lhs_s32
_leftX32 = Identity T_Lhs_s32 -> T_Lhs_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs (T_Lhs
arg_left_))
_rhsX26 :: T_Expr_s26
_rhsX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_rhs_))
(T_Lhs_vOut31 PP_Doc
_leftIpp) = T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
_leftX32 (Options -> T_Lhs_vIn31
T_Lhs_vIn31 Options
_leftOoptions)
(T_Expr_vOut25 PP_Doc
_rhsIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_rhsX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_rhsOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule49 PP_Doc
_rhsIpp
_leftOoptions :: Options
_leftOoptions = Options -> Options
rule50 Options
_lhsIoptions
_rhsOoptions :: Options
_rhsOoptions = Options -> Options
rule51 Options
_lhsIoptions
!__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp
in T_Decl_vOut19
__result_ )
in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
{-# INLINE rule49 #-}
rule49 :: PP_Doc -> PP_Doc
rule49 = \ ((PP_Doc
_rhsIpp) :: PP_Doc) ->
PP_Doc
_rhsIpp
{-# INLINE rule50 #-}
rule50 :: Options -> Options
rule50 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule51 #-}
rule51 :: Options -> Options
rule51 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# NOINLINE sem_Decl_EvalDecl #-}
sem_Decl_EvalDecl :: (String) -> T_Lhs -> T_Expr -> T_Decl
sem_Decl_EvalDecl :: String -> T_Lhs -> T_Expr -> T_Decl
sem_Decl_EvalDecl String
_ T_Lhs
arg_left_ T_Expr
arg_rhs_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
{-# NOINLINE st20 #-}
!st20 :: T_Decl_s20
st20 = let
v19 :: T_Decl_v19
v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisToplevel Options
_lhsIoptions) -> ( let
_leftX32 :: T_Lhs_s32
_leftX32 = Identity T_Lhs_s32 -> T_Lhs_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs (T_Lhs
arg_left_))
_rhsX26 :: T_Expr_s26
_rhsX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_rhs_))
(T_Lhs_vOut31 PP_Doc
_leftIpp) = T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
_leftX32 (Options -> T_Lhs_vIn31
T_Lhs_vIn31 Options
_leftOoptions)
(T_Expr_vOut25 PP_Doc
_rhsIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_rhsX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_rhsOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule52 PP_Doc
_rhsIpp
_leftOoptions :: Options
_leftOoptions = Options -> Options
rule53 Options
_lhsIoptions
_rhsOoptions :: Options
_rhsOoptions = Options -> Options
rule54 Options
_lhsIoptions
!__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp
in T_Decl_vOut19
__result_ )
in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
{-# INLINE rule52 #-}
rule52 :: PP_Doc -> PP_Doc
rule52 = \ ((PP_Doc
_rhsIpp) :: PP_Doc) ->
PP_Doc
_rhsIpp
{-# INLINE rule53 #-}
rule53 :: Options -> Options
rule53 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule54 #-}
rule54 :: Options -> Options
rule54 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
data Inh_Decls = Inh_Decls { Inh_Decls -> Bool
isToplevel_Inh_Decls :: !(Bool), Inh_Decls -> Options
options_Inh_Decls :: !(Options) }
data Syn_Decls = Syn_Decls { Syn_Decls -> [PP_Doc]
pps_Syn_Decls :: !(PP_Docs) }
{-# INLINABLE wrap_Decls #-}
wrap_Decls :: T_Decls -> Inh_Decls -> (Syn_Decls )
wrap_Decls :: T_Decls -> Inh_Decls -> Syn_Decls
wrap_Decls !(T_Decls Identity T_Decls_s23
act) !(Inh_Decls Bool
_lhsIisToplevel Options
_lhsIoptions) =
Identity Syn_Decls -> Syn_Decls
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do !T_Decls_s23
sem <- Identity T_Decls_s23
act
let arg22 :: T_Decls_vIn22
arg22 = Bool -> Options -> T_Decls_vIn22
T_Decls_vIn22 Bool
_lhsIisToplevel Options
_lhsIoptions
!(T_Decls_vOut22 [PP_Doc]
_lhsOpps) <- T_Decls_vOut22 -> Identity T_Decls_vOut22
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
sem T_Decls_vIn22
arg22)
Syn_Decls -> Identity Syn_Decls
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc] -> Syn_Decls
Syn_Decls [PP_Doc]
_lhsOpps)
)
{-# NOINLINE sem_Decls #-}
sem_Decls :: Decls -> T_Decls
sem_Decls :: Decls -> T_Decls
sem_Decls Decls
list = (T_Decl -> T_Decls -> T_Decls) -> T_Decls -> [T_Decl] -> T_Decls
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Decl -> T_Decls -> T_Decls
sem_Decls_Cons T_Decls
sem_Decls_Nil ((Decl -> T_Decl) -> Decls -> [T_Decl]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Decl -> T_Decl
sem_Decl Decls
list)
newtype T_Decls = T_Decls {
T_Decls -> Identity T_Decls_s23
attach_T_Decls :: Identity (T_Decls_s23 )
}
newtype T_Decls_s23 = C_Decls_s23 {
T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 :: (T_Decls_v22 )
}
data T_Decls_s24 = C_Decls_s24
type T_Decls_v22 = (T_Decls_vIn22 ) -> (T_Decls_vOut22 )
data T_Decls_vIn22 = T_Decls_vIn22 (Bool) (Options)
data T_Decls_vOut22 = T_Decls_vOut22 (PP_Docs)
{-# NOINLINE sem_Decls_Cons #-}
sem_Decls_Cons :: T_Decl -> T_Decls -> T_Decls
sem_Decls_Cons :: T_Decl -> T_Decls -> T_Decls
sem_Decls_Cons T_Decl
arg_hd_ T_Decls
arg_tl_ = Identity T_Decls_s23 -> T_Decls
T_Decls (T_Decls_s23 -> Identity T_Decls_s23
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decls_s23
st23) where
{-# NOINLINE st23 #-}
!st23 :: T_Decls_s23
st23 = let
v22 :: T_Decls_v22
v22 :: T_Decls_v22
v22 = \ !(T_Decls_vIn22 Bool
_lhsIisToplevel Options
_lhsIoptions) -> ( let
_hdX20 :: T_Decl_s20
_hdX20 = Identity T_Decl_s20 -> T_Decl_s20
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decl -> Identity T_Decl_s20
attach_T_Decl (T_Decl
arg_hd_))
_tlX23 :: T_Decls_s23
_tlX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_tl_))
(T_Decl_vOut19 PP_Doc
_hdIpp) = T_Decl_s20 -> T_Decl_v19
inv_Decl_s20 T_Decl_s20
_hdX20 (Bool -> Options -> T_Decl_vIn19
T_Decl_vIn19 Bool
_hdOisToplevel Options
_hdOoptions)
(T_Decls_vOut22 [PP_Doc]
_tlIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_tlX23 (Bool -> Options -> T_Decls_vIn22
T_Decls_vIn22 Bool
_tlOisToplevel Options
_tlOoptions)
_lhsOpps :: PP_Docs
_lhsOpps :: [PP_Doc]
_lhsOpps = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule55 PP_Doc
_hdIpp [PP_Doc]
_tlIpps
_hdOisToplevel :: Bool
_hdOisToplevel = Bool -> Bool
rule56 Bool
_lhsIisToplevel
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule57 Options
_lhsIoptions
_tlOisToplevel :: Bool
_tlOisToplevel = Bool -> Bool
rule58 Bool
_lhsIisToplevel
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule59 Options
_lhsIoptions
!__result_ :: T_Decls_vOut22
__result_ = [PP_Doc] -> T_Decls_vOut22
T_Decls_vOut22 [PP_Doc]
_lhsOpps
in T_Decls_vOut22
__result_ )
in T_Decls_v22 -> T_Decls_s23
C_Decls_s23 T_Decls_v22
v22
{-# INLINE rule55 #-}
{-# LINE 81 "src-ag/PrintOcamlCode.ag" #-}
rule55 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: PP_Docs) ->
{-# LINE 81 "src-ag/PrintOcamlCode.ag" #-}
_hdIpp : _tlIpps
{-# LINE 951 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule56 #-}
rule56 = \ ((_lhsIisToplevel) :: Bool) ->
_lhsIisToplevel
{-# INLINE rule57 #-}
rule57 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule58 #-}
rule58 = \ ((_lhsIisToplevel) :: Bool) ->
_lhsIisToplevel
{-# INLINE rule59 #-}
rule59 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Decls_Nil #-}
sem_Decls_Nil :: T_Decls
sem_Decls_Nil :: T_Decls
sem_Decls_Nil = Identity T_Decls_s23 -> T_Decls
T_Decls (T_Decls_s23 -> Identity T_Decls_s23
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decls_s23
st23) where
{-# NOINLINE st23 #-}
!st23 :: T_Decls_s23
st23 = let
v22 :: T_Decls_v22
v22 :: T_Decls_v22
v22 = \ !(T_Decls_vIn22 Bool
_lhsIisToplevel Options
_lhsIoptions) -> ( let
_lhsOpps :: PP_Docs
_lhsOpps :: [PP_Doc]
_lhsOpps = () -> [PP_Doc]
forall a. () -> [a]
rule60 ()
!__result_ :: T_Decls_vOut22
__result_ = [PP_Doc] -> T_Decls_vOut22
T_Decls_vOut22 [PP_Doc]
_lhsOpps
in T_Decls_vOut22
__result_ )
in T_Decls_v22 -> T_Decls_s23
C_Decls_s23 T_Decls_v22
v22
{-# INLINE rule60 #-}
{-# LINE 82 "src-ag/PrintOcamlCode.ag" #-}
rule60 = \ (_ :: ()) ->
{-# LINE 82 "src-ag/PrintOcamlCode.ag" #-}
[]
{-# LINE 981 "src-generated/PrintOcamlCode.hs" #-}
data Inh_Expr = Inh_Expr { Inh_Expr -> Options
options_Inh_Expr :: !(Options) }
data Syn_Expr = Syn_Expr { Syn_Expr -> PP_Doc
pp_Syn_Expr :: !(PP_Doc) }
{-# INLINABLE wrap_Expr #-}
wrap_Expr :: T_Expr -> Inh_Expr -> (Syn_Expr )
wrap_Expr :: T_Expr -> Inh_Expr -> Syn_Expr
wrap_Expr !(T_Expr Identity T_Expr_s26
act) !(Inh_Expr Options
_lhsIoptions) =
Identity Syn_Expr -> Syn_Expr
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do !T_Expr_s26
sem <- Identity T_Expr_s26
act
let arg25 :: T_Expr_vIn25
arg25 = Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_lhsIoptions
!(T_Expr_vOut25 PP_Doc
_lhsOpp) <- T_Expr_vOut25 -> Identity T_Expr_vOut25
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
sem T_Expr_vIn25
arg25)
Syn_Expr -> Identity Syn_Expr
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_Expr
Syn_Expr PP_Doc
_lhsOpp)
)
{-# NOINLINE sem_Expr #-}
sem_Expr :: Expr -> T_Expr
sem_Expr :: Expr -> T_Expr
sem_Expr ( Let Decls
decls_ Expr
body_ ) = T_Decls -> T_Expr -> T_Expr
sem_Expr_Let ( Decls -> T_Decls
sem_Decls Decls
decls_ ) ( Expr -> T_Expr
sem_Expr Expr
body_ )
sem_Expr ( Case Expr
expr_ CaseAlts
alts_ ) = T_Expr -> T_CaseAlts -> T_Expr
sem_Expr_Case ( Expr -> T_Expr
sem_Expr Expr
expr_ ) ( CaseAlts -> T_CaseAlts
sem_CaseAlts CaseAlts
alts_ )
sem_Expr ( Do Decls
stmts_ Expr
body_ ) = T_Decls -> T_Expr -> T_Expr
sem_Expr_Do ( Decls -> T_Decls
sem_Decls Decls
stmts_ ) ( Expr -> T_Expr
sem_Expr Expr
body_ )
sem_Expr ( Lambda Exprs
args_ Expr
body_ ) = T_Exprs -> T_Expr -> T_Expr
sem_Expr_Lambda ( Exprs -> T_Exprs
sem_Exprs Exprs
args_ ) ( Expr -> T_Expr
sem_Expr Expr
body_ )
sem_Expr ( TupleExpr Exprs
exprs_ ) = T_Exprs -> T_Expr
sem_Expr_TupleExpr ( Exprs -> T_Exprs
sem_Exprs Exprs
exprs_ )
sem_Expr ( UnboxedTupleExpr Exprs
exprs_ ) = T_Exprs -> T_Expr
sem_Expr_UnboxedTupleExpr ( Exprs -> T_Exprs
sem_Exprs Exprs
exprs_ )
sem_Expr ( App !String
name_ Exprs
args_ ) = String -> T_Exprs -> T_Expr
sem_Expr_App String
name_ ( Exprs -> T_Exprs
sem_Exprs Exprs
args_ )
sem_Expr ( SimpleExpr !String
txt_ ) = String -> T_Expr
sem_Expr_SimpleExpr String
txt_
sem_Expr ( TextExpr ![String]
lns_ ) = [String] -> T_Expr
sem_Expr_TextExpr [String]
lns_
sem_Expr ( Trace !String
txt_ Expr
expr_ ) = String -> T_Expr -> T_Expr
sem_Expr_Trace String
txt_ ( Expr -> T_Expr
sem_Expr Expr
expr_ )
sem_Expr ( PragmaExpr !Bool
onLeftSide_ !Bool
onNewLine_ !String
txt_ Expr
expr_ ) = Bool -> Bool -> String -> T_Expr -> T_Expr
sem_Expr_PragmaExpr Bool
onLeftSide_ Bool
onNewLine_ String
txt_ ( Expr -> T_Expr
sem_Expr Expr
expr_ )
sem_Expr ( LineExpr Expr
expr_ ) = T_Expr -> T_Expr
sem_Expr_LineExpr ( Expr -> T_Expr
sem_Expr Expr
expr_ )
sem_Expr ( TypedExpr Expr
expr_ Type
tp_ ) = T_Expr -> T_Type -> T_Expr
sem_Expr_TypedExpr ( Expr -> T_Expr
sem_Expr Expr
expr_ ) ( Type -> T_Type
sem_Type Type
tp_ )
sem_Expr ( ResultExpr !String
nt_ Expr
expr_ ) = String -> T_Expr -> T_Expr
sem_Expr_ResultExpr String
nt_ ( Expr -> T_Expr
sem_Expr Expr
expr_ )
sem_Expr ( InvokeExpr !String
nt_ Expr
expr_ Exprs
args_ ) = String -> T_Expr -> T_Exprs -> T_Expr
sem_Expr_InvokeExpr String
nt_ ( Expr -> T_Expr
sem_Expr Expr
expr_ ) ( Exprs -> T_Exprs
sem_Exprs Exprs
args_ )
sem_Expr ( ResumeExpr !String
nt_ Expr
expr_ Lhs
left_ Expr
rhs_ ) = String -> T_Expr -> T_Lhs -> T_Expr -> T_Expr
sem_Expr_ResumeExpr String
nt_ ( Expr -> T_Expr
sem_Expr Expr
expr_ ) ( Lhs -> T_Lhs
sem_Lhs Lhs
left_ ) ( Expr -> T_Expr
sem_Expr Expr
rhs_ )
sem_Expr ( SemFun !String
nt_ Exprs
args_ Expr
body_ ) = String -> T_Exprs -> T_Expr -> T_Expr
sem_Expr_SemFun String
nt_ ( Exprs -> T_Exprs
sem_Exprs Exprs
args_ ) ( Expr -> T_Expr
sem_Expr Expr
body_ )
newtype T_Expr = T_Expr {
T_Expr -> Identity T_Expr_s26
attach_T_Expr :: Identity (T_Expr_s26 )
}
newtype T_Expr_s26 = C_Expr_s26 {
T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 :: (T_Expr_v25 )
}
data T_Expr_s27 = C_Expr_s27
type T_Expr_v25 = (T_Expr_vIn25 ) -> (T_Expr_vOut25 )
data T_Expr_vIn25 = T_Expr_vIn25 (Options)
data T_Expr_vOut25 = T_Expr_vOut25 (PP_Doc)
{-# NOINLINE sem_Expr_Let #-}
sem_Expr_Let :: T_Decls -> T_Expr -> T_Expr
sem_Expr_Let :: T_Decls -> T_Expr -> T_Expr
sem_Expr_Let T_Decls
arg_decls_ T_Expr
arg_body_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
{-# NOINLINE st26 #-}
!st26 :: T_Expr_s26
st26 = let
v25 :: T_Expr_v25
v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Options
_lhsIoptions) -> ( let
_declsX23 :: T_Decls_s23
_declsX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_decls_))
_bodyX26 :: T_Expr_s26
_bodyX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_body_))
(T_Decls_vOut22 [PP_Doc]
_declsIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_declsX23 (Bool -> Options -> T_Decls_vIn22
T_Decls_vIn22 Bool
_declsOisToplevel Options
_declsOoptions)
(T_Expr_vOut25 PP_Doc
_bodyIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_bodyX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_bodyOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> [PP_Doc] -> PP_Doc
rule61 PP_Doc
_bodyIpp [PP_Doc]
_declsIpps
_declsOisToplevel :: Bool
_declsOisToplevel = () -> Bool
rule62 ()
_declsOoptions :: Options
_declsOoptions = Options -> Options
rule63 Options
_lhsIoptions
_bodyOoptions :: Options
_bodyOoptions = Options -> Options
rule64 Options
_lhsIoptions
!__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
in T_Expr_vOut25
__result_ )
in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
{-# INLINE rule61 #-}
{-# LINE 131 "src-ag/PrintOcamlCode.ag" #-}
rule61 = \ ((_bodyIpp) :: PP_Doc) ((_declsIpps) :: PP_Docs) ->
{-# LINE 131 "src-ag/PrintOcamlCode.ag" #-}
pp_parens $ vlist (_declsIpps ++ [_bodyIpp])
{-# LINE 1053 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule62 #-}
{-# LINE 220 "src-ag/PrintOcamlCode.ag" #-}
rule62 = \ (_ :: ()) ->
{-# LINE 220 "src-ag/PrintOcamlCode.ag" #-}
False
{-# LINE 1059 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule63 #-}
rule63 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule64 #-}
rule64 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Expr_Case #-}
sem_Expr_Case :: T_Expr -> T_CaseAlts -> T_Expr
sem_Expr_Case :: T_Expr -> T_CaseAlts -> T_Expr
sem_Expr_Case T_Expr
arg_expr_ T_CaseAlts
arg_alts_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
{-# NOINLINE st26 #-}
!st26 :: T_Expr_s26
st26 = let
v25 :: T_Expr_v25
v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Options
_lhsIoptions) -> ( let
_exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
_altsX5 :: T_CaseAlts_s5
_altsX5 = Identity T_CaseAlts_s5 -> T_CaseAlts_s5
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CaseAlts -> Identity T_CaseAlts_s5
attach_T_CaseAlts (T_CaseAlts
arg_alts_))
(T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_exprOoptions)
(T_CaseAlts_vOut4 [PP_Doc]
_altsIpps) = T_CaseAlts_s5 -> T_CaseAlts_v4
inv_CaseAlts_s5 T_CaseAlts_s5
_altsX5 (Options -> T_CaseAlts_vIn4
T_CaseAlts_vIn4 Options
_altsOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> PP_Doc -> PP_Doc
rule65 [PP_Doc]
_altsIpps PP_Doc
_exprIpp
_exprOoptions :: Options
_exprOoptions = Options -> Options
rule66 Options
_lhsIoptions
_altsOoptions :: Options
_altsOoptions = Options -> Options
rule67 Options
_lhsIoptions
!__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
in T_Expr_vOut25
__result_ )
in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
{-# INLINE rule65 #-}
{-# LINE 132 "src-ag/PrintOcamlCode.ag" #-}
rule65 = \ ((_altsIpps) :: PP_Docs) ((_exprIpp) :: PP_Doc) ->
{-# LINE 132 "src-ag/PrintOcamlCode.ag" #-}
pp_parens ( "match" >#< _exprIpp >#< "with"
>-< indent 2 ( case _altsIpps of
[] -> empty
(x:xs) -> " " >#< x
>-< vlist (map ("|" >#<) xs)
)
)
{-# LINE 1095 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule66 #-}
rule66 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule67 #-}
rule67 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Expr_Do #-}
sem_Expr_Do :: T_Decls -> T_Expr -> T_Expr
sem_Expr_Do :: T_Decls -> T_Expr -> T_Expr
sem_Expr_Do T_Decls
arg_stmts_ T_Expr
arg_body_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
{-# NOINLINE st26 #-}
!st26 :: T_Expr_s26
st26 = let
v25 :: T_Expr_v25
v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Options
_lhsIoptions) -> ( let
_stmtsX23 :: T_Decls_s23
_stmtsX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_stmts_))
_bodyX26 :: T_Expr_s26
_bodyX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_body_))
(T_Decls_vOut22 [PP_Doc]
_stmtsIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_stmtsX23 (Bool -> Options -> T_Decls_vIn22
T_Decls_vIn22 Bool
_stmtsOisToplevel Options
_stmtsOoptions)
(T_Expr_vOut25 PP_Doc
_bodyIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_bodyX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_bodyOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
forall a. () -> a
rule68 ()
_stmtsOisToplevel :: Bool
_stmtsOisToplevel = () -> Bool
rule69 ()
_stmtsOoptions :: Options
_stmtsOoptions = Options -> Options
rule70 Options
_lhsIoptions
_bodyOoptions :: Options
_bodyOoptions = Options -> Options
rule71 Options
_lhsIoptions
!__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
in T_Expr_vOut25
__result_ )
in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
{-# INLINE rule68 #-}
{-# LINE 139 "src-ag/PrintOcamlCode.ag" #-}
rule68 = \ (_ :: ()) ->
{-# LINE 139 "src-ag/PrintOcamlCode.ag" #-}
error "pp of Expr.Do not supported"
{-# LINE 1126 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule69 #-}
{-# LINE 222 "src-ag/PrintOcamlCode.ag" #-}
rule69 = \ (_ :: ()) ->
{-# LINE 222 "src-ag/PrintOcamlCode.ag" #-}
False
{-# LINE 1132 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule70 #-}
rule70 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule71 #-}
rule71 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Expr_Lambda #-}
sem_Expr_Lambda :: T_Exprs -> T_Expr -> T_Expr
sem_Expr_Lambda :: T_Exprs -> T_Expr -> T_Expr
sem_Expr_Lambda T_Exprs
arg_args_ T_Expr
arg_body_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
{-# NOINLINE st26 #-}
!st26 :: T_Expr_s26
st26 = let
v25 :: T_Expr_v25
v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Options
_lhsIoptions) -> ( let
_argsX29 :: T_Exprs_s29
_argsX29 = Identity T_Exprs_s29 -> T_Exprs_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs (T_Exprs
arg_args_))
_bodyX26 :: T_Expr_s26
_bodyX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_body_))
(T_Exprs_vOut28 [PP_Doc]
_argsIpps) = T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
_argsX29 (Options -> T_Exprs_vIn28
T_Exprs_vIn28 Options
_argsOoptions)
(T_Expr_vOut25 PP_Doc
_bodyIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_bodyX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_bodyOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> PP_Doc -> PP_Doc
rule72 [PP_Doc]
_argsIpps PP_Doc
_bodyIpp
_argsOoptions :: Options
_argsOoptions = Options -> Options
rule73 Options
_lhsIoptions
_bodyOoptions :: Options
_bodyOoptions = Options -> Options
rule74 Options
_lhsIoptions
!__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
in T_Expr_vOut25
__result_ )
in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
{-# INLINE rule72 #-}
{-# LINE 140 "src-ag/PrintOcamlCode.ag" #-}
rule72 = \ ((_argsIpps) :: PP_Docs) ((_bodyIpp) :: PP_Doc) ->
{-# LINE 140 "src-ag/PrintOcamlCode.ag" #-}
pp_parens ( pp "fun" >#< hv_sp _argsIpps >#< "->"
>-< indent 2 _bodyIpp )
{-# LINE 1163 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule73 #-}
rule73 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule74 #-}
rule74 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Expr_TupleExpr #-}
sem_Expr_TupleExpr :: T_Exprs -> T_Expr
sem_Expr_TupleExpr :: T_Exprs -> T_Expr
sem_Expr_TupleExpr T_Exprs
arg_exprs_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
{-# NOINLINE st26 #-}
!st26 :: T_Expr_s26
st26 = let
v25 :: T_Expr_v25
v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Options
_lhsIoptions) -> ( let
_exprsX29 :: T_Exprs_s29
_exprsX29 = Identity T_Exprs_s29 -> T_Exprs_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs (T_Exprs
arg_exprs_))
(T_Exprs_vOut28 [PP_Doc]
_exprsIpps) = T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
_exprsX29 (Options -> T_Exprs_vIn28
T_Exprs_vIn28 Options
_exprsOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> PP_Doc
rule75 [PP_Doc]
_exprsIpps
_exprsOoptions :: Options
_exprsOoptions = Options -> Options
rule76 Options
_lhsIoptions
!__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
in T_Expr_vOut25
__result_ )
in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
{-# INLINE rule75 #-}
{-# LINE 142 "src-ag/PrintOcamlCode.ag" #-}
rule75 = \ ((_exprsIpps) :: PP_Docs) ->
{-# LINE 142 "src-ag/PrintOcamlCode.ag" #-}
ppTuple False _exprsIpps
{-# LINE 1190 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule76 #-}
rule76 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Expr_UnboxedTupleExpr #-}
sem_Expr_UnboxedTupleExpr :: T_Exprs -> T_Expr
sem_Expr_UnboxedTupleExpr :: T_Exprs -> T_Expr
sem_Expr_UnboxedTupleExpr T_Exprs
arg_exprs_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
{-# NOINLINE st26 #-}
!st26 :: T_Expr_s26
st26 = let
v25 :: T_Expr_v25
v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Options
_lhsIoptions) -> ( let
_exprsX29 :: T_Exprs_s29
_exprsX29 = Identity T_Exprs_s29 -> T_Exprs_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs (T_Exprs
arg_exprs_))
(T_Exprs_vOut28 [PP_Doc]
_exprsIpps) = T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
_exprsX29 (Options -> T_Exprs_vIn28
T_Exprs_vIn28 Options
_exprsOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
forall a. () -> a
rule77 ()
_exprsOoptions :: Options
_exprsOoptions = Options -> Options
rule78 Options
_lhsIoptions
!__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
in T_Expr_vOut25
__result_ )
in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
{-# INLINE rule77 #-}
{-# LINE 143 "src-ag/PrintOcamlCode.ag" #-}
rule77 = \ (_ :: ()) ->
{-# LINE 143 "src-ag/PrintOcamlCode.ag" #-}
error "pp of Expr.UnboxedTupleExpr not supported"
{-# LINE 1214 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule78 #-}
rule78 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Expr_App #-}
sem_Expr_App :: (String) -> T_Exprs -> T_Expr
sem_Expr_App :: String -> T_Exprs -> T_Expr
sem_Expr_App !String
arg_name_ T_Exprs
arg_args_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
{-# NOINLINE st26 #-}
!st26 :: T_Expr_s26
st26 = let
v25 :: T_Expr_v25
v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Options
_lhsIoptions) -> ( let
_argsX29 :: T_Exprs_s29
_argsX29 = Identity T_Exprs_s29 -> T_Exprs_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs (T_Exprs
arg_args_))
(T_Exprs_vOut28 [PP_Doc]
_argsIpps) = T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
_argsX29 (Options -> T_Exprs_vIn28
T_Exprs_vIn28 Options
_argsOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> String -> PP_Doc
rule79 [PP_Doc]
_argsIpps String
arg_name_
_argsOoptions :: Options
_argsOoptions = Options -> Options
rule80 Options
_lhsIoptions
!__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
in T_Expr_vOut25
__result_ )
in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
{-# INLINE rule79 #-}
{-# LINE 144 "src-ag/PrintOcamlCode.ag" #-}
rule79 = \ ((_argsIpps) :: PP_Docs) name_ ->
{-# LINE 144 "src-ag/PrintOcamlCode.ag" #-}
pp_parens $ name_ >#< hv_sp _argsIpps
{-# LINE 1238 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule80 #-}
rule80 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Expr_SimpleExpr #-}
sem_Expr_SimpleExpr :: (String) -> T_Expr
sem_Expr_SimpleExpr :: String -> T_Expr
sem_Expr_SimpleExpr !String
arg_txt_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
{-# NOINLINE st26 #-}
!st26 :: T_Expr_s26
st26 = let
v25 :: T_Expr_v25
v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Options
_lhsIoptions) -> ( let
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = String -> PP_Doc
rule81 String
arg_txt_
!__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
in T_Expr_vOut25
__result_ )
in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
{-# INLINE rule81 #-}
{-# LINE 145 "src-ag/PrintOcamlCode.ag" #-}
rule81 = \ txt_ ->
{-# LINE 145 "src-ag/PrintOcamlCode.ag" #-}
text txt_
{-# LINE 1259 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Expr_TextExpr #-}
sem_Expr_TextExpr :: ([String]) -> T_Expr
sem_Expr_TextExpr :: [String] -> T_Expr
sem_Expr_TextExpr ![String]
arg_lns_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
{-# NOINLINE st26 #-}
!st26 :: T_Expr_s26
st26 = let
v25 :: T_Expr_v25
v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Options
_lhsIoptions) -> ( let
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [String] -> PP_Doc
rule82 [String]
arg_lns_
!__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
in T_Expr_vOut25
__result_ )
in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
{-# INLINE rule82 #-}
{-# LINE 146 "src-ag/PrintOcamlCode.ag" #-}
rule82 = \ lns_ ->
{-# LINE 146 "src-ag/PrintOcamlCode.ag" #-}
vlist (map text lns_)
{-# LINE 1277 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Expr_Trace #-}
sem_Expr_Trace :: (String) -> T_Expr -> T_Expr
sem_Expr_Trace :: String -> T_Expr -> T_Expr
sem_Expr_Trace String
_ T_Expr
arg_expr_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
{-# NOINLINE st26 #-}
!st26 :: T_Expr_s26
st26 = let
v25 :: T_Expr_v25
v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Options
_lhsIoptions) -> ( let
_exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
(T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_exprOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule83 PP_Doc
_exprIpp
_exprOoptions :: Options
_exprOoptions = Options -> Options
rule84 Options
_lhsIoptions
!__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
in T_Expr_vOut25
__result_ )
in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
{-# INLINE rule83 #-}
{-# LINE 147 "src-ag/PrintOcamlCode.ag" #-}
rule83 = \ ((_exprIpp) :: PP_Doc) ->
{-# LINE 147 "src-ag/PrintOcamlCode.ag" #-}
_exprIpp
{-# LINE 1298 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule84 #-}
rule84 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Expr_PragmaExpr #-}
sem_Expr_PragmaExpr :: (Bool) -> (Bool) -> (String) -> T_Expr -> T_Expr
sem_Expr_PragmaExpr :: Bool -> Bool -> String -> T_Expr -> T_Expr
sem_Expr_PragmaExpr Bool
_ Bool
_ String
_ T_Expr
arg_expr_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
{-# NOINLINE st26 #-}
!st26 :: T_Expr_s26
st26 = let
v25 :: T_Expr_v25
v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Options
_lhsIoptions) -> ( let
_exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
(T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_exprOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule85 PP_Doc
_exprIpp
_exprOoptions :: Options
_exprOoptions = Options -> Options
rule86 Options
_lhsIoptions
!__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
in T_Expr_vOut25
__result_ )
in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
{-# INLINE rule85 #-}
{-# LINE 148 "src-ag/PrintOcamlCode.ag" #-}
rule85 = \ ((_exprIpp) :: PP_Doc) ->
{-# LINE 148 "src-ag/PrintOcamlCode.ag" #-}
_exprIpp
{-# LINE 1322 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule86 #-}
rule86 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Expr_LineExpr #-}
sem_Expr_LineExpr :: T_Expr -> T_Expr
sem_Expr_LineExpr :: T_Expr -> T_Expr
sem_Expr_LineExpr T_Expr
arg_expr_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
{-# NOINLINE st26 #-}
!st26 :: T_Expr_s26
st26 = let
v25 :: T_Expr_v25
v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Options
_lhsIoptions) -> ( let
_exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
(T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_exprOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule87 PP_Doc
_exprIpp
_exprOoptions :: Options
_exprOoptions = Options -> Options
rule88 Options
_lhsIoptions
!__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
in T_Expr_vOut25
__result_ )
in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
{-# INLINE rule87 #-}
{-# LINE 149 "src-ag/PrintOcamlCode.ag" #-}
rule87 = \ ((_exprIpp) :: PP_Doc) ->
{-# LINE 149 "src-ag/PrintOcamlCode.ag" #-}
_exprIpp
{-# LINE 1346 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule88 #-}
rule88 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Expr_TypedExpr #-}
sem_Expr_TypedExpr :: T_Expr -> T_Type -> T_Expr
sem_Expr_TypedExpr :: T_Expr -> T_Type -> T_Expr
sem_Expr_TypedExpr T_Expr
arg_expr_ T_Type
arg_tp_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
{-# NOINLINE st26 #-}
!st26 :: T_Expr_s26
st26 = let
v25 :: T_Expr_v25
v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Options
_lhsIoptions) -> ( let
_exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
_tpX50 :: T_Type_s50
_tpX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_tp_))
(T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_exprOoptions)
(T_Type_vOut49 PP_Doc
_tpIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_tpX50 (T_Type_vIn49
T_Type_vIn49 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule89 PP_Doc
_exprIpp
_exprOoptions :: Options
_exprOoptions = Options -> Options
rule90 Options
_lhsIoptions
!__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
in T_Expr_vOut25
__result_ )
in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
{-# INLINE rule89 #-}
{-# LINE 150 "src-ag/PrintOcamlCode.ag" #-}
rule89 = \ ((_exprIpp) :: PP_Doc) ->
{-# LINE 150 "src-ag/PrintOcamlCode.ag" #-}
_exprIpp
{-# LINE 1372 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule90 #-}
rule90 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Expr_ResultExpr #-}
sem_Expr_ResultExpr :: (String) -> T_Expr -> T_Expr
sem_Expr_ResultExpr :: String -> T_Expr -> T_Expr
sem_Expr_ResultExpr String
_ T_Expr
arg_expr_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
{-# NOINLINE st26 #-}
!st26 :: T_Expr_s26
st26 = let
v25 :: T_Expr_v25
v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Options
_lhsIoptions) -> ( let
_exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
(T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_exprOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule91 PP_Doc
_exprIpp
_exprOoptions :: Options
_exprOoptions = Options -> Options
rule92 Options
_lhsIoptions
!__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
in T_Expr_vOut25
__result_ )
in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
{-# INLINE rule91 #-}
rule91 :: PP_Doc -> PP_Doc
rule91 = \ ((PP_Doc
_exprIpp) :: PP_Doc) ->
PP_Doc
_exprIpp
{-# INLINE rule92 #-}
rule92 :: Options -> Options
rule92 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# NOINLINE sem_Expr_InvokeExpr #-}
sem_Expr_InvokeExpr :: (String) -> T_Expr -> T_Exprs -> T_Expr
sem_Expr_InvokeExpr :: String -> T_Expr -> T_Exprs -> T_Expr
sem_Expr_InvokeExpr String
_ T_Expr
arg_expr_ T_Exprs
arg_args_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
{-# NOINLINE st26 #-}
!st26 :: T_Expr_s26
st26 = let
v25 :: T_Expr_v25
v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Options
_lhsIoptions) -> ( let
_exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
_argsX29 :: T_Exprs_s29
_argsX29 = Identity T_Exprs_s29 -> T_Exprs_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs (T_Exprs
arg_args_))
(T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_exprOoptions)
(T_Exprs_vOut28 [PP_Doc]
_argsIpps) = T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
_argsX29 (Options -> T_Exprs_vIn28
T_Exprs_vIn28 Options
_argsOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule93 PP_Doc
_exprIpp
_exprOoptions :: Options
_exprOoptions = Options -> Options
rule94 Options
_lhsIoptions
_argsOoptions :: Options
_argsOoptions = Options -> Options
rule95 Options
_lhsIoptions
!__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
in T_Expr_vOut25
__result_ )
in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
{-# INLINE rule93 #-}
rule93 :: PP_Doc -> PP_Doc
rule93 = \ ((PP_Doc
_exprIpp) :: PP_Doc) ->
PP_Doc
_exprIpp
{-# INLINE rule94 #-}
rule94 :: Options -> Options
rule94 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule95 #-}
rule95 :: Options -> Options
rule95 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# NOINLINE sem_Expr_ResumeExpr #-}
sem_Expr_ResumeExpr :: (String) -> T_Expr -> T_Lhs -> T_Expr -> T_Expr
sem_Expr_ResumeExpr :: String -> T_Expr -> T_Lhs -> T_Expr -> T_Expr
sem_Expr_ResumeExpr String
_ T_Expr
arg_expr_ T_Lhs
arg_left_ T_Expr
arg_rhs_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
{-# NOINLINE st26 #-}
!st26 :: T_Expr_s26
st26 = let
v25 :: T_Expr_v25
v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Options
_lhsIoptions) -> ( let
_exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
_leftX32 :: T_Lhs_s32
_leftX32 = Identity T_Lhs_s32 -> T_Lhs_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs (T_Lhs
arg_left_))
_rhsX26 :: T_Expr_s26
_rhsX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_rhs_))
(T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_exprOoptions)
(T_Lhs_vOut31 PP_Doc
_leftIpp) = T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
_leftX32 (Options -> T_Lhs_vIn31
T_Lhs_vIn31 Options
_leftOoptions)
(T_Expr_vOut25 PP_Doc
_rhsIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_rhsX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_rhsOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule96 PP_Doc
_rhsIpp
_exprOoptions :: Options
_exprOoptions = Options -> Options
rule97 Options
_lhsIoptions
_leftOoptions :: Options
_leftOoptions = Options -> Options
rule98 Options
_lhsIoptions
_rhsOoptions :: Options
_rhsOoptions = Options -> Options
rule99 Options
_lhsIoptions
!__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
in T_Expr_vOut25
__result_ )
in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
{-# INLINE rule96 #-}
rule96 :: PP_Doc -> PP_Doc
rule96 = \ ((PP_Doc
_rhsIpp) :: PP_Doc) ->
PP_Doc
_rhsIpp
{-# INLINE rule97 #-}
rule97 :: Options -> Options
rule97 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule98 #-}
rule98 :: Options -> Options
rule98 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule99 #-}
rule99 :: Options -> Options
rule99 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# NOINLINE sem_Expr_SemFun #-}
sem_Expr_SemFun :: (String) -> T_Exprs -> T_Expr -> T_Expr
sem_Expr_SemFun :: String -> T_Exprs -> T_Expr -> T_Expr
sem_Expr_SemFun String
_ T_Exprs
arg_args_ T_Expr
arg_body_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
{-# NOINLINE st26 #-}
!st26 :: T_Expr_s26
st26 = let
v25 :: T_Expr_v25
v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Options
_lhsIoptions) -> ( let
_argsX29 :: T_Exprs_s29
_argsX29 = Identity T_Exprs_s29 -> T_Exprs_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs (T_Exprs
arg_args_))
_bodyX26 :: T_Expr_s26
_bodyX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_body_))
(T_Exprs_vOut28 [PP_Doc]
_argsIpps) = T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
_argsX29 (Options -> T_Exprs_vIn28
T_Exprs_vIn28 Options
_argsOoptions)
(T_Expr_vOut25 PP_Doc
_bodyIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_bodyX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_bodyOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule100 PP_Doc
_bodyIpp
_argsOoptions :: Options
_argsOoptions = Options -> Options
rule101 Options
_lhsIoptions
_bodyOoptions :: Options
_bodyOoptions = Options -> Options
rule102 Options
_lhsIoptions
!__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
in T_Expr_vOut25
__result_ )
in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
{-# INLINE rule100 #-}
rule100 :: PP_Doc -> PP_Doc
rule100 = \ ((PP_Doc
_bodyIpp) :: PP_Doc) ->
PP_Doc
_bodyIpp
{-# INLINE rule101 #-}
rule101 :: Options -> Options
rule101 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule102 #-}
rule102 :: Options -> Options
rule102 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
data Inh_Exprs = Inh_Exprs { Inh_Exprs -> Options
options_Inh_Exprs :: !(Options) }
data Syn_Exprs = Syn_Exprs { Syn_Exprs -> [PP_Doc]
pps_Syn_Exprs :: !(PP_Docs) }
{-# INLINABLE wrap_Exprs #-}
wrap_Exprs :: T_Exprs -> Inh_Exprs -> (Syn_Exprs )
wrap_Exprs :: T_Exprs -> Inh_Exprs -> Syn_Exprs
wrap_Exprs !(T_Exprs Identity T_Exprs_s29
act) !(Inh_Exprs Options
_lhsIoptions) =
Identity Syn_Exprs -> Syn_Exprs
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do !T_Exprs_s29
sem <- Identity T_Exprs_s29
act
let arg28 :: T_Exprs_vIn28
arg28 = Options -> T_Exprs_vIn28
T_Exprs_vIn28 Options
_lhsIoptions
!(T_Exprs_vOut28 [PP_Doc]
_lhsOpps) <- T_Exprs_vOut28 -> Identity T_Exprs_vOut28
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
sem T_Exprs_vIn28
arg28)
Syn_Exprs -> Identity Syn_Exprs
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc] -> Syn_Exprs
Syn_Exprs [PP_Doc]
_lhsOpps)
)
{-# NOINLINE sem_Exprs #-}
sem_Exprs :: Exprs -> T_Exprs
sem_Exprs :: Exprs -> T_Exprs
sem_Exprs Exprs
list = (T_Expr -> T_Exprs -> T_Exprs) -> T_Exprs -> [T_Expr] -> T_Exprs
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Expr -> T_Exprs -> T_Exprs
sem_Exprs_Cons T_Exprs
sem_Exprs_Nil ((Expr -> T_Expr) -> Exprs -> [T_Expr]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Expr -> T_Expr
sem_Expr Exprs
list)
newtype T_Exprs = T_Exprs {
T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs :: Identity (T_Exprs_s29 )
}
newtype T_Exprs_s29 = C_Exprs_s29 {
T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 :: (T_Exprs_v28 )
}
data T_Exprs_s30 = C_Exprs_s30
type T_Exprs_v28 = (T_Exprs_vIn28 ) -> (T_Exprs_vOut28 )
data T_Exprs_vIn28 = T_Exprs_vIn28 (Options)
data T_Exprs_vOut28 = T_Exprs_vOut28 (PP_Docs)
{-# NOINLINE sem_Exprs_Cons #-}
sem_Exprs_Cons :: T_Expr -> T_Exprs -> T_Exprs
sem_Exprs_Cons :: T_Expr -> T_Exprs -> T_Exprs
sem_Exprs_Cons T_Expr
arg_hd_ T_Exprs
arg_tl_ = Identity T_Exprs_s29 -> T_Exprs
T_Exprs (T_Exprs_s29 -> Identity T_Exprs_s29
forall (m :: * -> *) a. Monad m => a -> m a
return T_Exprs_s29
st29) where
{-# NOINLINE st29 #-}
!st29 :: T_Exprs_s29
st29 = let
v28 :: T_Exprs_v28
v28 :: T_Exprs_v28
v28 = \ !(T_Exprs_vIn28 Options
_lhsIoptions) -> ( let
_hdX26 :: T_Expr_s26
_hdX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_hd_))
_tlX29 :: T_Exprs_s29
_tlX29 = Identity T_Exprs_s29 -> T_Exprs_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs (T_Exprs
arg_tl_))
(T_Expr_vOut25 PP_Doc
_hdIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_hdX26 (Options -> T_Expr_vIn25
T_Expr_vIn25 Options
_hdOoptions)
(T_Exprs_vOut28 [PP_Doc]
_tlIpps) = T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
_tlX29 (Options -> T_Exprs_vIn28
T_Exprs_vIn28 Options
_tlOoptions)
_lhsOpps :: PP_Docs
_lhsOpps :: [PP_Doc]
_lhsOpps = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule103 PP_Doc
_hdIpp [PP_Doc]
_tlIpps
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule104 Options
_lhsIoptions
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule105 Options
_lhsIoptions
!__result_ :: T_Exprs_vOut28
__result_ = [PP_Doc] -> T_Exprs_vOut28
T_Exprs_vOut28 [PP_Doc]
_lhsOpps
in T_Exprs_vOut28
__result_ )
in T_Exprs_v28 -> T_Exprs_s29
C_Exprs_s29 T_Exprs_v28
v28
{-# INLINE rule103 #-}
{-# LINE 61 "src-ag/PrintOcamlCode.ag" #-}
rule103 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: PP_Docs) ->
{-# LINE 61 "src-ag/PrintOcamlCode.ag" #-}
_hdIpp : _tlIpps
{-# LINE 1538 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule104 #-}
rule104 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule105 #-}
rule105 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Exprs_Nil #-}
sem_Exprs_Nil :: T_Exprs
sem_Exprs_Nil :: T_Exprs
sem_Exprs_Nil = Identity T_Exprs_s29 -> T_Exprs
T_Exprs (T_Exprs_s29 -> Identity T_Exprs_s29
forall (m :: * -> *) a. Monad m => a -> m a
return T_Exprs_s29
st29) where
{-# NOINLINE st29 #-}
!st29 :: T_Exprs_s29
st29 = let
v28 :: T_Exprs_v28
v28 :: T_Exprs_v28
v28 = \ !(T_Exprs_vIn28 Options
_lhsIoptions) -> ( let
_lhsOpps :: PP_Docs
_lhsOpps :: [PP_Doc]
_lhsOpps = () -> [PP_Doc]
forall a. () -> [a]
rule106 ()
!__result_ :: T_Exprs_vOut28
__result_ = [PP_Doc] -> T_Exprs_vOut28
T_Exprs_vOut28 [PP_Doc]
_lhsOpps
in T_Exprs_vOut28
__result_ )
in T_Exprs_v28 -> T_Exprs_s29
C_Exprs_s29 T_Exprs_v28
v28
{-# INLINE rule106 #-}
{-# LINE 62 "src-ag/PrintOcamlCode.ag" #-}
rule106 = \ (_ :: ()) ->
{-# LINE 62 "src-ag/PrintOcamlCode.ag" #-}
[]
{-# LINE 1562 "src-generated/PrintOcamlCode.hs" #-}
data Inh_Lhs = Inh_Lhs { Inh_Lhs -> Options
options_Inh_Lhs :: !(Options) }
data Syn_Lhs = Syn_Lhs { Syn_Lhs -> PP_Doc
pp_Syn_Lhs :: !(PP_Doc) }
{-# INLINABLE wrap_Lhs #-}
wrap_Lhs :: T_Lhs -> Inh_Lhs -> (Syn_Lhs )
wrap_Lhs :: T_Lhs -> Inh_Lhs -> Syn_Lhs
wrap_Lhs !(T_Lhs Identity T_Lhs_s32
act) !(Inh_Lhs Options
_lhsIoptions) =
Identity Syn_Lhs -> Syn_Lhs
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do !T_Lhs_s32
sem <- Identity T_Lhs_s32
act
let arg31 :: T_Lhs_vIn31
arg31 = Options -> T_Lhs_vIn31
T_Lhs_vIn31 Options
_lhsIoptions
!(T_Lhs_vOut31 PP_Doc
_lhsOpp) <- T_Lhs_vOut31 -> Identity T_Lhs_vOut31
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
sem T_Lhs_vIn31
arg31)
Syn_Lhs -> Identity Syn_Lhs
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_Lhs
Syn_Lhs PP_Doc
_lhsOpp)
)
{-# NOINLINE sem_Lhs #-}
sem_Lhs :: Lhs -> T_Lhs
sem_Lhs :: Lhs -> T_Lhs
sem_Lhs ( Pattern3 Pattern
pat3_ ) = T_Pattern -> T_Lhs
sem_Lhs_Pattern3 ( Pattern -> T_Pattern
sem_Pattern Pattern
pat3_ )
sem_Lhs ( Pattern3SM Pattern
pat3_ ) = T_Pattern -> T_Lhs
sem_Lhs_Pattern3SM ( Pattern -> T_Pattern
sem_Pattern Pattern
pat3_ )
sem_Lhs ( TupleLhs ![String]
comps_ ) = [String] -> T_Lhs
sem_Lhs_TupleLhs [String]
comps_
sem_Lhs ( UnboxedTupleLhs ![String]
comps_ ) = [String] -> T_Lhs
sem_Lhs_UnboxedTupleLhs [String]
comps_
sem_Lhs ( Fun !String
name_ Exprs
args_ ) = String -> T_Exprs -> T_Lhs
sem_Lhs_Fun String
name_ ( Exprs -> T_Exprs
sem_Exprs Exprs
args_ )
sem_Lhs ( Unwrap !String
name_ Lhs
sub_ ) = String -> T_Lhs -> T_Lhs
sem_Lhs_Unwrap String
name_ ( Lhs -> T_Lhs
sem_Lhs Lhs
sub_ )
newtype T_Lhs = T_Lhs {
T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs :: Identity (T_Lhs_s32 )
}
newtype T_Lhs_s32 = C_Lhs_s32 {
T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 :: (T_Lhs_v31 )
}
data T_Lhs_s33 = C_Lhs_s33
type T_Lhs_v31 = (T_Lhs_vIn31 ) -> (T_Lhs_vOut31 )
data T_Lhs_vIn31 = T_Lhs_vIn31 (Options)
data T_Lhs_vOut31 = T_Lhs_vOut31 (PP_Doc)
{-# NOINLINE sem_Lhs_Pattern3 #-}
sem_Lhs_Pattern3 :: T_Pattern -> T_Lhs
sem_Lhs_Pattern3 :: T_Pattern -> T_Lhs
sem_Lhs_Pattern3 T_Pattern
arg_pat3_ = Identity T_Lhs_s32 -> T_Lhs
T_Lhs (T_Lhs_s32 -> Identity T_Lhs_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Lhs_s32
st32) where
{-# NOINLINE st32 #-}
!st32 :: T_Lhs_s32
st32 = let
v31 :: T_Lhs_v31
v31 :: T_Lhs_v31
v31 = \ !(T_Lhs_vIn31 Options
_lhsIoptions) -> ( let
_pat3X41 :: T_Pattern_s41
_pat3X41 = 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_pat3_))
(T_Pattern_vOut40 Pattern
_pat3Icopy Bool
_pat3IisUnderscore PP_Doc
_pat3Ipp) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_pat3X41 (Options -> T_Pattern_vIn40
T_Pattern_vIn40 Options
_pat3Ooptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule107 PP_Doc
_pat3Ipp
_pat3Ooptions :: Options
_pat3Ooptions = Options -> Options
rule108 Options
_lhsIoptions
!__result_ :: T_Lhs_vOut31
__result_ = PP_Doc -> T_Lhs_vOut31
T_Lhs_vOut31 PP_Doc
_lhsOpp
in T_Lhs_vOut31
__result_ )
in T_Lhs_v31 -> T_Lhs_s32
C_Lhs_s32 T_Lhs_v31
v31
{-# INLINE rule107 #-}
{-# LINE 153 "src-ag/PrintOcamlCode.ag" #-}
rule107 = \ ((_pat3Ipp) :: PP_Doc) ->
{-# LINE 153 "src-ag/PrintOcamlCode.ag" #-}
_pat3Ipp
{-# LINE 1619 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule108 #-}
rule108 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Lhs_Pattern3SM #-}
sem_Lhs_Pattern3SM :: T_Pattern -> T_Lhs
sem_Lhs_Pattern3SM :: T_Pattern -> T_Lhs
sem_Lhs_Pattern3SM T_Pattern
arg_pat3_ = Identity T_Lhs_s32 -> T_Lhs
T_Lhs (T_Lhs_s32 -> Identity T_Lhs_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Lhs_s32
st32) where
{-# NOINLINE st32 #-}
!st32 :: T_Lhs_s32
st32 = let
v31 :: T_Lhs_v31
v31 :: T_Lhs_v31
v31 = \ !(T_Lhs_vIn31 Options
_lhsIoptions) -> ( let
_pat3X41 :: T_Pattern_s41
_pat3X41 = 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_pat3_))
(T_Pattern_vOut40 Pattern
_pat3Icopy Bool
_pat3IisUnderscore PP_Doc
_pat3Ipp) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_pat3X41 (Options -> T_Pattern_vIn40
T_Pattern_vIn40 Options
_pat3Ooptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
forall a. () -> a
rule109 ()
_pat3Ooptions :: Options
_pat3Ooptions = Options -> Options
rule110 Options
_lhsIoptions
!__result_ :: T_Lhs_vOut31
__result_ = PP_Doc -> T_Lhs_vOut31
T_Lhs_vOut31 PP_Doc
_lhsOpp
in T_Lhs_vOut31
__result_ )
in T_Lhs_v31 -> T_Lhs_s32
C_Lhs_s32 T_Lhs_v31
v31
{-# INLINE rule109 #-}
{-# LINE 154 "src-ag/PrintOcamlCode.ag" #-}
rule109 = \ (_ :: ()) ->
{-# LINE 154 "src-ag/PrintOcamlCode.ag" #-}
error "pp of Lhs.Pattern3SM not supported"
{-# LINE 1643 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule110 #-}
rule110 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Lhs_TupleLhs #-}
sem_Lhs_TupleLhs :: ([String]) -> T_Lhs
sem_Lhs_TupleLhs :: [String] -> T_Lhs
sem_Lhs_TupleLhs ![String]
arg_comps_ = Identity T_Lhs_s32 -> T_Lhs
T_Lhs (T_Lhs_s32 -> Identity T_Lhs_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Lhs_s32
st32) where
{-# NOINLINE st32 #-}
!st32 :: T_Lhs_s32
st32 = let
v31 :: T_Lhs_v31
v31 :: T_Lhs_v31
v31 = \ !(T_Lhs_vIn31 Options
_lhsIoptions) -> ( let
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [String] -> PP_Doc
rule111 [String]
arg_comps_
!__result_ :: T_Lhs_vOut31
__result_ = PP_Doc -> T_Lhs_vOut31
T_Lhs_vOut31 PP_Doc
_lhsOpp
in T_Lhs_vOut31
__result_ )
in T_Lhs_v31 -> T_Lhs_s32
C_Lhs_s32 T_Lhs_v31
v31
{-# INLINE rule111 #-}
{-# LINE 155 "src-ag/PrintOcamlCode.ag" #-}
rule111 = \ comps_ ->
{-# LINE 155 "src-ag/PrintOcamlCode.ag" #-}
ppTuple False (map text comps_)
{-# LINE 1664 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Lhs_UnboxedTupleLhs #-}
sem_Lhs_UnboxedTupleLhs :: ([String]) -> T_Lhs
sem_Lhs_UnboxedTupleLhs :: [String] -> T_Lhs
sem_Lhs_UnboxedTupleLhs [String]
_ = Identity T_Lhs_s32 -> T_Lhs
T_Lhs (T_Lhs_s32 -> Identity T_Lhs_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Lhs_s32
st32) where
{-# NOINLINE st32 #-}
!st32 :: T_Lhs_s32
st32 = let
v31 :: T_Lhs_v31
v31 :: T_Lhs_v31
v31 = \ !(T_Lhs_vIn31 Options
_lhsIoptions) -> ( let
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
forall a. () -> a
rule112 ()
!__result_ :: T_Lhs_vOut31
__result_ = PP_Doc -> T_Lhs_vOut31
T_Lhs_vOut31 PP_Doc
_lhsOpp
in T_Lhs_vOut31
__result_ )
in T_Lhs_v31 -> T_Lhs_s32
C_Lhs_s32 T_Lhs_v31
v31
{-# INLINE rule112 #-}
{-# LINE 156 "src-ag/PrintOcamlCode.ag" #-}
rule112 = \ (_ :: ()) ->
{-# LINE 156 "src-ag/PrintOcamlCode.ag" #-}
error "pp of Lhs.UnboxedTupleLhs not supported"
{-# LINE 1682 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Lhs_Fun #-}
sem_Lhs_Fun :: (String) -> T_Exprs -> T_Lhs
sem_Lhs_Fun :: String -> T_Exprs -> T_Lhs
sem_Lhs_Fun !String
arg_name_ T_Exprs
arg_args_ = Identity T_Lhs_s32 -> T_Lhs
T_Lhs (T_Lhs_s32 -> Identity T_Lhs_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Lhs_s32
st32) where
{-# NOINLINE st32 #-}
!st32 :: T_Lhs_s32
st32 = let
v31 :: T_Lhs_v31
v31 :: T_Lhs_v31
v31 = \ !(T_Lhs_vIn31 Options
_lhsIoptions) -> ( let
_argsX29 :: T_Exprs_s29
_argsX29 = Identity T_Exprs_s29 -> T_Exprs_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs (T_Exprs
arg_args_))
(T_Exprs_vOut28 [PP_Doc]
_argsIpps) = T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
_argsX29 (Options -> T_Exprs_vIn28
T_Exprs_vIn28 Options
_argsOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> String -> PP_Doc
rule113 [PP_Doc]
_argsIpps String
arg_name_
_argsOoptions :: Options
_argsOoptions = Options -> Options
rule114 Options
_lhsIoptions
!__result_ :: T_Lhs_vOut31
__result_ = PP_Doc -> T_Lhs_vOut31
T_Lhs_vOut31 PP_Doc
_lhsOpp
in T_Lhs_vOut31
__result_ )
in T_Lhs_v31 -> T_Lhs_s32
C_Lhs_s32 T_Lhs_v31
v31
{-# INLINE rule113 #-}
{-# LINE 157 "src-ag/PrintOcamlCode.ag" #-}
rule113 = \ ((_argsIpps) :: PP_Docs) name_ ->
{-# LINE 157 "src-ag/PrintOcamlCode.ag" #-}
name_ >#< hv_sp _argsIpps
{-# LINE 1703 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule114 #-}
rule114 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# NOINLINE sem_Lhs_Unwrap #-}
sem_Lhs_Unwrap :: (String) -> T_Lhs -> T_Lhs
sem_Lhs_Unwrap :: String -> T_Lhs -> T_Lhs
sem_Lhs_Unwrap !String
arg_name_ T_Lhs
arg_sub_ = Identity T_Lhs_s32 -> T_Lhs
T_Lhs (T_Lhs_s32 -> Identity T_Lhs_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Lhs_s32
st32) where
{-# NOINLINE st32 #-}
!st32 :: T_Lhs_s32
st32 = let
v31 :: T_Lhs_v31
v31 :: T_Lhs_v31
v31 = \ !(T_Lhs_vIn31 Options
_lhsIoptions) -> ( let
_subX32 :: T_Lhs_s32
_subX32 = Identity T_Lhs_s32 -> T_Lhs_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs (T_Lhs
arg_sub_))
(T_Lhs_vOut31 PP_Doc
_subIpp) = T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
_subX32 (Options -> T_Lhs_vIn31
T_Lhs_vIn31 Options
_subOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> String -> PP_Doc
rule115 PP_Doc
_subIpp String
arg_name_
_subOoptions :: Options
_subOoptions = Options -> Options
rule116 Options
_lhsIoptions
!__result_ :: T_Lhs_vOut31
__result_ = PP_Doc -> T_Lhs_vOut31
T_Lhs_vOut31 PP_Doc
_lhsOpp
in T_Lhs_vOut31
__result_ )
in T_Lhs_v31 -> T_Lhs_s32
C_Lhs_s32 T_Lhs_v31
v31
{-# INLINE rule115 #-}
{-# LINE 158 "src-ag/PrintOcamlCode.ag" #-}
rule115 = \ ((_subIpp) :: PP_Doc) name_ ->
{-# LINE 158 "src-ag/PrintOcamlCode.ag" #-}
pp_parens (name_ >#< _subIpp)
{-# LINE 1727 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule116 #-}
rule116 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
data Inh_NamedType = Inh_NamedType { }
data Syn_NamedType = Syn_NamedType { Syn_NamedType -> PP_Doc
pp_Syn_NamedType :: !(PP_Doc) }
{-# INLINABLE wrap_NamedType #-}
wrap_NamedType :: T_NamedType -> Inh_NamedType -> (Syn_NamedType )
wrap_NamedType :: T_NamedType -> Inh_NamedType -> Syn_NamedType
wrap_NamedType !(T_NamedType Identity T_NamedType_s35
act) !(Inh_NamedType
Inh_NamedType ) =
Identity Syn_NamedType -> Syn_NamedType
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do !T_NamedType_s35
sem <- Identity T_NamedType_s35
act
let arg34 :: T_NamedType_vIn34
arg34 = T_NamedType_vIn34
T_NamedType_vIn34
!(T_NamedType_vOut34 PP_Doc
_lhsOpp) <- T_NamedType_vOut34 -> Identity T_NamedType_vOut34
forall (m :: * -> *) a. Monad m => a -> m a
return (T_NamedType_s35 -> T_NamedType_v34
inv_NamedType_s35 T_NamedType_s35
sem T_NamedType_vIn34
arg34)
Syn_NamedType -> Identity Syn_NamedType
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_NamedType
Syn_NamedType PP_Doc
_lhsOpp)
)
{-# INLINE sem_NamedType #-}
sem_NamedType :: NamedType -> T_NamedType
sem_NamedType :: NamedType -> T_NamedType
sem_NamedType ( Named !Bool
strict_ !String
name_ Type
tp_ ) = Bool -> String -> T_Type -> T_NamedType
sem_NamedType_Named Bool
strict_ String
name_ ( Type -> T_Type
sem_Type Type
tp_ )
newtype T_NamedType = T_NamedType {
T_NamedType -> Identity T_NamedType_s35
attach_T_NamedType :: Identity (T_NamedType_s35 )
}
newtype T_NamedType_s35 = C_NamedType_s35 {
T_NamedType_s35 -> T_NamedType_v34
inv_NamedType_s35 :: (T_NamedType_v34 )
}
data T_NamedType_s36 = C_NamedType_s36
type T_NamedType_v34 = (T_NamedType_vIn34 ) -> (T_NamedType_vOut34 )
data T_NamedType_vIn34 = T_NamedType_vIn34
data T_NamedType_vOut34 = T_NamedType_vOut34 (PP_Doc)
{-# NOINLINE sem_NamedType_Named #-}
sem_NamedType_Named :: (Bool) -> (String) -> T_Type -> T_NamedType
sem_NamedType_Named :: Bool -> String -> T_Type -> T_NamedType
sem_NamedType_Named Bool
_ !String
arg_name_ T_Type
arg_tp_ = Identity T_NamedType_s35 -> T_NamedType
T_NamedType (T_NamedType_s35 -> Identity T_NamedType_s35
forall (m :: * -> *) a. Monad m => a -> m a
return T_NamedType_s35
st35) where
{-# NOINLINE st35 #-}
!st35 :: T_NamedType_s35
st35 = let
v34 :: T_NamedType_v34
v34 :: T_NamedType_v34
v34 = \ !(T_NamedType_vIn34
T_NamedType_vIn34 ) -> ( let
_tpX50 :: T_Type_s50
_tpX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_tp_))
(T_Type_vOut49 PP_Doc
_tpIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_tpX50 (T_Type_vIn49
T_Type_vIn49 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> String -> PP_Doc
rule117 PP_Doc
_tpIpp String
arg_name_
!__result_ :: T_NamedType_vOut34
__result_ = PP_Doc -> T_NamedType_vOut34
T_NamedType_vOut34 PP_Doc
_lhsOpp
in T_NamedType_vOut34
__result_ )
in T_NamedType_v34 -> T_NamedType_s35
C_NamedType_s35 T_NamedType_v34
v34
{-# INLINE rule117 #-}
{-# LINE 191 "src-ag/PrintOcamlCode.ag" #-}
rule117 = \ ((_tpIpp) :: PP_Doc) name_ ->
{-# LINE 191 "src-ag/PrintOcamlCode.ag" #-}
name_ >#< ":" >#< _tpIpp
{-# LINE 1781 "src-generated/PrintOcamlCode.hs" #-}
data Inh_NamedTypes = Inh_NamedTypes { }
data Syn_NamedTypes = Syn_NamedTypes { Syn_NamedTypes -> [PP_Doc]
pps_Syn_NamedTypes :: !(PP_Docs) }
{-# INLINABLE wrap_NamedTypes #-}
wrap_NamedTypes :: T_NamedTypes -> Inh_NamedTypes -> (Syn_NamedTypes )
wrap_NamedTypes :: T_NamedTypes -> Inh_NamedTypes -> Syn_NamedTypes
wrap_NamedTypes !(T_NamedTypes Identity T_NamedTypes_s38
act) !(Inh_NamedTypes
Inh_NamedTypes ) =
Identity Syn_NamedTypes -> Syn_NamedTypes
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do !T_NamedTypes_s38
sem <- Identity T_NamedTypes_s38
act
let arg37 :: T_NamedTypes_vIn37
arg37 = T_NamedTypes_vIn37
T_NamedTypes_vIn37
!(T_NamedTypes_vOut37 [PP_Doc]
_lhsOpps) <- T_NamedTypes_vOut37 -> Identity T_NamedTypes_vOut37
forall (m :: * -> *) a. Monad m => a -> m a
return (T_NamedTypes_s38 -> T_NamedTypes_v37
inv_NamedTypes_s38 T_NamedTypes_s38
sem T_NamedTypes_vIn37
arg37)
Syn_NamedTypes -> Identity Syn_NamedTypes
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc] -> Syn_NamedTypes
Syn_NamedTypes [PP_Doc]
_lhsOpps)
)
{-# NOINLINE sem_NamedTypes #-}
sem_NamedTypes :: NamedTypes -> T_NamedTypes
sem_NamedTypes :: NamedTypes -> T_NamedTypes
sem_NamedTypes NamedTypes
list = (T_NamedType -> T_NamedTypes -> T_NamedTypes)
-> T_NamedTypes -> [T_NamedType] -> T_NamedTypes
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_NamedType -> T_NamedTypes -> T_NamedTypes
sem_NamedTypes_Cons T_NamedTypes
sem_NamedTypes_Nil ((NamedType -> T_NamedType) -> NamedTypes -> [T_NamedType]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map NamedType -> T_NamedType
sem_NamedType NamedTypes
list)
newtype T_NamedTypes = T_NamedTypes {
T_NamedTypes -> Identity T_NamedTypes_s38
attach_T_NamedTypes :: Identity (T_NamedTypes_s38 )
}
newtype T_NamedTypes_s38 = C_NamedTypes_s38 {
T_NamedTypes_s38 -> T_NamedTypes_v37
inv_NamedTypes_s38 :: (T_NamedTypes_v37 )
}
data T_NamedTypes_s39 = C_NamedTypes_s39
type T_NamedTypes_v37 = (T_NamedTypes_vIn37 ) -> (T_NamedTypes_vOut37 )
data T_NamedTypes_vIn37 = T_NamedTypes_vIn37
data T_NamedTypes_vOut37 = T_NamedTypes_vOut37 (PP_Docs)
{-# NOINLINE sem_NamedTypes_Cons #-}
sem_NamedTypes_Cons :: T_NamedType -> T_NamedTypes -> T_NamedTypes
sem_NamedTypes_Cons :: T_NamedType -> T_NamedTypes -> T_NamedTypes
sem_NamedTypes_Cons T_NamedType
arg_hd_ T_NamedTypes
arg_tl_ = Identity T_NamedTypes_s38 -> T_NamedTypes
T_NamedTypes (T_NamedTypes_s38 -> Identity T_NamedTypes_s38
forall (m :: * -> *) a. Monad m => a -> m a
return T_NamedTypes_s38
st38) where
{-# NOINLINE st38 #-}
!st38 :: T_NamedTypes_s38
st38 = let
v37 :: T_NamedTypes_v37
v37 :: T_NamedTypes_v37
v37 = \ !(T_NamedTypes_vIn37
T_NamedTypes_vIn37 ) -> ( let
_hdX35 :: T_NamedType_s35
_hdX35 = Identity T_NamedType_s35 -> T_NamedType_s35
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NamedType -> Identity T_NamedType_s35
attach_T_NamedType (T_NamedType
arg_hd_))
_tlX38 :: T_NamedTypes_s38
_tlX38 = Identity T_NamedTypes_s38 -> T_NamedTypes_s38
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NamedTypes -> Identity T_NamedTypes_s38
attach_T_NamedTypes (T_NamedTypes
arg_tl_))
(T_NamedType_vOut34 PP_Doc
_hdIpp) = T_NamedType_s35 -> T_NamedType_v34
inv_NamedType_s35 T_NamedType_s35
_hdX35 (T_NamedType_vIn34
T_NamedType_vIn34 )
(T_NamedTypes_vOut37 [PP_Doc]
_tlIpps) = T_NamedTypes_s38 -> T_NamedTypes_v37
inv_NamedTypes_s38 T_NamedTypes_s38
_tlX38 (T_NamedTypes_vIn37
T_NamedTypes_vIn37 )
_lhsOpps :: PP_Docs
_lhsOpps :: [PP_Doc]
_lhsOpps = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule118 PP_Doc
_hdIpp [PP_Doc]
_tlIpps
!__result_ :: T_NamedTypes_vOut37
__result_ = [PP_Doc] -> T_NamedTypes_vOut37
T_NamedTypes_vOut37 [PP_Doc]
_lhsOpps
in T_NamedTypes_vOut37
__result_ )
in T_NamedTypes_v37 -> T_NamedTypes_s38
C_NamedTypes_s38 T_NamedTypes_v37
v37
{-# INLINE rule118 #-}
{-# LINE 77 "src-ag/PrintOcamlCode.ag" #-}
rule118 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: PP_Docs) ->
{-# LINE 77 "src-ag/PrintOcamlCode.ag" #-}
_hdIpp : _tlIpps
{-# LINE 1834 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_NamedTypes_Nil #-}
sem_NamedTypes_Nil :: T_NamedTypes
sem_NamedTypes_Nil :: T_NamedTypes
sem_NamedTypes_Nil = Identity T_NamedTypes_s38 -> T_NamedTypes
T_NamedTypes (T_NamedTypes_s38 -> Identity T_NamedTypes_s38
forall (m :: * -> *) a. Monad m => a -> m a
return T_NamedTypes_s38
st38) where
{-# NOINLINE st38 #-}
!st38 :: T_NamedTypes_s38
st38 = let
v37 :: T_NamedTypes_v37
v37 :: T_NamedTypes_v37
v37 = \ !(T_NamedTypes_vIn37
T_NamedTypes_vIn37 ) -> ( let
_lhsOpps :: PP_Docs
_lhsOpps :: [PP_Doc]
_lhsOpps = () -> [PP_Doc]
forall a. () -> [a]
rule119 ()
!__result_ :: T_NamedTypes_vOut37
__result_ = [PP_Doc] -> T_NamedTypes_vOut37
T_NamedTypes_vOut37 [PP_Doc]
_lhsOpps
in T_NamedTypes_vOut37
__result_ )
in T_NamedTypes_v37 -> T_NamedTypes_s38
C_NamedTypes_s38 T_NamedTypes_v37
v37
{-# INLINE rule119 #-}
{-# LINE 78 "src-ag/PrintOcamlCode.ag" #-}
rule119 = \ (_ :: ()) ->
{-# LINE 78 "src-ag/PrintOcamlCode.ag" #-}
[]
{-# LINE 1852 "src-generated/PrintOcamlCode.hs" #-}
data Inh_Pattern = Inh_Pattern { Inh_Pattern -> Options
options_Inh_Pattern :: !(Options) }
data Syn_Pattern = Syn_Pattern { Syn_Pattern -> Pattern
copy_Syn_Pattern :: !(Pattern), Syn_Pattern -> Bool
isUnderscore_Syn_Pattern :: !(Bool), Syn_Pattern -> PP_Doc
pp_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 Options
_lhsIoptions) =
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 = Options -> T_Pattern_vIn40
T_Pattern_vIn40 Options
_lhsIoptions
!(T_Pattern_vOut40 Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOpp) <- 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 (Pattern -> Bool -> PP_Doc -> Syn_Pattern
Syn_Pattern Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOpp)
)
{-# 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 (Options)
data T_Pattern_vOut40 = T_Pattern_vOut40 (Pattern) (Bool) (PP_Doc)
{-# NOINLINE sem_Pattern_Constr #-}
sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns -> T_Pattern
sem_Pattern_Constr :: Identifier -> T_Patterns -> T_Pattern
sem_Pattern_Constr !Identifier
arg_name_ T_Patterns
arg_pats_ = Identity T_Pattern_s41 -> T_Pattern
T_Pattern (T_Pattern_s41 -> Identity T_Pattern_s41
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s41
st41) where
{-# NOINLINE st41 #-}
!st41 :: T_Pattern_s41
st41 = let
v40 :: T_Pattern_v40
v40 :: T_Pattern_v40
v40 = \ !(T_Pattern_vIn40 Options
_lhsIoptions) -> ( 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 Patterns
_patsIcopy [PP_Doc]
_patsIpps) = T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
_patsX44 (Options -> T_Patterns_vIn43
T_Patterns_vIn43 Options
_patsOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> Identifier -> PP_Doc
rule120 [PP_Doc]
_patsIpps Identifier
arg_name_
_lhsOisUnderscore :: Bool
_lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule121 ()
_copy :: Pattern
_copy = Patterns -> Identifier -> Pattern
rule122 Patterns
_patsIcopy Identifier
arg_name_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall p. p -> p
rule123 Pattern
_copy
_patsOoptions :: Options
_patsOoptions = Options -> Options
rule124 Options
_lhsIoptions
!__result_ :: T_Pattern_vOut40
__result_ = Pattern -> Bool -> PP_Doc -> T_Pattern_vOut40
T_Pattern_vOut40 Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOpp
in T_Pattern_vOut40
__result_ )
in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
{-# INLINE rule120 #-}
{-# LINE 194 "src-ag/PrintOcamlCode.ag" #-}
rule120 = \ ((_patsIpps) :: PP_Docs) name_ ->
{-# LINE 194 "src-ag/PrintOcamlCode.ag" #-}
pp_parens $ name_ >#< hv_sp _patsIpps
{-# LINE 1913 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule121 #-}
{-# LINE 204 "src-ag/PrintOcamlCode.ag" #-}
rule121 = \ (_ :: ()) ->
{-# LINE 204 "src-ag/PrintOcamlCode.ag" #-}
False
{-# LINE 1919 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule122 #-}
rule122 = \ ((_patsIcopy) :: Patterns) name_ ->
Constr name_ _patsIcopy
{-# INLINE rule123 #-}
rule123 = \ _copy ->
_copy
{-# INLINE rule124 #-}
rule124 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# 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 Options
_lhsIoptions) -> ( 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 Patterns
_patsIcopy [PP_Doc]
_patsIpps) = T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
_patsX44 (Options -> T_Patterns_vIn43
T_Patterns_vIn43 Options
_patsOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> PP_Doc
rule125 [PP_Doc]
_patsIpps
_lhsOisUnderscore :: Bool
_lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule126 ()
_copy :: Pattern
_copy = Patterns -> Pos -> Pattern
rule127 Patterns
_patsIcopy Pos
arg_pos_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall p. p -> p
rule128 Pattern
_copy
_patsOoptions :: Options
_patsOoptions = Options -> Options
rule129 Options
_lhsIoptions
!__result_ :: T_Pattern_vOut40
__result_ = Pattern -> Bool -> PP_Doc -> T_Pattern_vOut40
T_Pattern_vOut40 Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOpp
in T_Pattern_vOut40
__result_ )
in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
{-# INLINE rule125 #-}
{-# LINE 195 "src-ag/PrintOcamlCode.ag" #-}
rule125 = \ ((_patsIpps) :: PP_Docs) ->
{-# LINE 195 "src-ag/PrintOcamlCode.ag" #-}
pp_block "(" ")" "," _patsIpps
{-# LINE 1954 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule126 #-}
{-# LINE 205 "src-ag/PrintOcamlCode.ag" #-}
rule126 = \ (_ :: ()) ->
{-# LINE 205 "src-ag/PrintOcamlCode.ag" #-}
False
{-# LINE 1960 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule127 #-}
rule127 = \ ((_patsIcopy) :: Patterns) pos_ ->
Product pos_ _patsIcopy
{-# INLINE rule128 #-}
rule128 = \ _copy ->
_copy
{-# INLINE rule129 #-}
rule129 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# 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 Options
_lhsIoptions) -> ( 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 Pattern
_patIcopy Bool
_patIisUnderscore PP_Doc
_patIpp) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_patX41 (Options -> T_Pattern_vIn40
T_Pattern_vIn40 Options
_patOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = Options -> Bool -> Identifier -> Identifier -> PP_Doc
rule130 Options
_lhsIoptions Bool
_patIisUnderscore Identifier
arg_attr_ Identifier
arg_field_
_lhsOisUnderscore :: Bool
_lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule131 ()
_copy :: Pattern
_copy = Pattern -> Identifier -> Identifier -> Pattern
rule132 Pattern
_patIcopy Identifier
arg_attr_ Identifier
arg_field_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall p. p -> p
rule133 Pattern
_copy
_patOoptions :: Options
_patOoptions = Options -> Options
rule134 Options
_lhsIoptions
!__result_ :: T_Pattern_vOut40
__result_ = Pattern -> Bool -> PP_Doc -> T_Pattern_vOut40
T_Pattern_vOut40 Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOpp
in T_Pattern_vOut40
__result_ )
in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
{-# INLINE rule130 #-}
{-# LINE 197 "src-ag/PrintOcamlCode.ag" #-}
rule130 = \ ((_lhsIoptions) :: Options) ((_patIisUnderscore) :: Bool) attr_ field_ ->
{-# LINE 197 "src-ag/PrintOcamlCode.ag" #-}
if _patIisUnderscore
then pp (attrname _lhsIoptions False field_ attr_)
else error "pp of Pattern.Alias is only supported in the form (x@_)"
{-# LINE 1997 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule131 #-}
{-# LINE 206 "src-ag/PrintOcamlCode.ag" #-}
rule131 = \ (_ :: ()) ->
{-# LINE 206 "src-ag/PrintOcamlCode.ag" #-}
False
{-# LINE 2003 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule132 #-}
rule132 = \ ((_patIcopy) :: Pattern) attr_ field_ ->
Alias field_ attr_ _patIcopy
{-# INLINE rule133 #-}
rule133 = \ _copy ->
_copy
{-# INLINE rule134 #-}
rule134 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# 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 Options
_lhsIoptions) -> ( 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 Pattern
_patIcopy Bool
_patIisUnderscore PP_Doc
_patIpp) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_patX41 (Options -> T_Pattern_vIn40
T_Pattern_vIn40 Options
_patOoptions)
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
forall a. () -> a
rule135 ()
_copy :: Pattern
_copy = Pattern -> Pattern
rule136 Pattern
_patIcopy
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall p. p -> p
rule137 Pattern
_copy
_lhsOisUnderscore :: Bool
_lhsOisUnderscore :: Bool
_lhsOisUnderscore = Bool -> Bool
rule138 Bool
_patIisUnderscore
_patOoptions :: Options
_patOoptions = Options -> Options
rule139 Options
_lhsIoptions
!__result_ :: T_Pattern_vOut40
__result_ = Pattern -> Bool -> PP_Doc -> T_Pattern_vOut40
T_Pattern_vOut40 Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOpp
in T_Pattern_vOut40
__result_ )
in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
{-# INLINE rule135 #-}
{-# LINE 200 "src-ag/PrintOcamlCode.ag" #-}
rule135 = \ (_ :: ()) ->
{-# LINE 200 "src-ag/PrintOcamlCode.ag" #-}
error "pp of Pattern.Irrefutable not supported"
{-# LINE 2038 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule136 #-}
rule136 = \ ((_patIcopy) :: Pattern) ->
Irrefutable _patIcopy
{-# INLINE rule137 #-}
rule137 = \ _copy ->
_copy
{-# INLINE rule138 #-}
rule138 = \ ((_patIisUnderscore) :: Bool) ->
_patIisUnderscore
{-# INLINE rule139 #-}
rule139 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# 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 Options
_lhsIoptions) -> ( let
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
rule140 ()
_lhsOisUnderscore :: Bool
_lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule141 ()
_copy :: Pattern
_copy = Pos -> Pattern
rule142 Pos
arg_pos_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall p. p -> p
rule143 Pattern
_copy
!__result_ :: T_Pattern_vOut40
__result_ = Pattern -> Bool -> PP_Doc -> T_Pattern_vOut40
T_Pattern_vOut40 Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOpp
in T_Pattern_vOut40
__result_ )
in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
{-# INLINE rule140 #-}
{-# LINE 201 "src-ag/PrintOcamlCode.ag" #-}
rule140 = \ (_ :: ()) ->
{-# LINE 201 "src-ag/PrintOcamlCode.ag" #-}
text "_"
{-# LINE 2073 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule141 #-}
{-# LINE 207 "src-ag/PrintOcamlCode.ag" #-}
rule141 = \ (_ :: ()) ->
{-# LINE 207 "src-ag/PrintOcamlCode.ag" #-}
True
{-# LINE 2079 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule142 #-}
rule142 = \ pos_ ->
Underscore pos_
{-# INLINE rule143 #-}
rule143 = \ _copy ->
_copy
data Inh_Patterns = Inh_Patterns { Inh_Patterns -> Options
options_Inh_Patterns :: !(Options) }
data Syn_Patterns = Syn_Patterns { Syn_Patterns -> Patterns
copy_Syn_Patterns :: !(Patterns), Syn_Patterns -> [PP_Doc]
pps_Syn_Patterns :: !(PP_Docs) }
{-# 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 Options
_lhsIoptions) =
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 = Options -> T_Patterns_vIn43
T_Patterns_vIn43 Options
_lhsIoptions
!(T_Patterns_vOut43 Patterns
_lhsOcopy [PP_Doc]
_lhsOpps) <- 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 (Patterns -> [PP_Doc] -> Syn_Patterns
Syn_Patterns Patterns
_lhsOcopy [PP_Doc]
_lhsOpps)
)
{-# 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 (Options)
data T_Patterns_vOut43 = T_Patterns_vOut43 (Patterns) (PP_Docs)
{-# 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 Options
_lhsIoptions) -> ( 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 Pattern
_hdIcopy Bool
_hdIisUnderscore PP_Doc
_hdIpp) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_hdX41 (Options -> T_Pattern_vIn40
T_Pattern_vIn40 Options
_hdOoptions)
(T_Patterns_vOut43 Patterns
_tlIcopy [PP_Doc]
_tlIpps) = T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
_tlX44 (Options -> T_Patterns_vIn43
T_Patterns_vIn43 Options
_tlOoptions)
_lhsOpps :: PP_Docs
_lhsOpps :: [PP_Doc]
_lhsOpps = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule144 PP_Doc
_hdIpp [PP_Doc]
_tlIpps
_copy :: Patterns
_copy = Pattern -> Patterns -> Patterns
rule145 Pattern
_hdIcopy Patterns
_tlIcopy
_lhsOcopy :: Patterns
_lhsOcopy :: Patterns
_lhsOcopy = Patterns -> Patterns
forall p. p -> p
rule146 Patterns
_copy
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule147 Options
_lhsIoptions
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule148 Options
_lhsIoptions
!__result_ :: T_Patterns_vOut43
__result_ = Patterns -> [PP_Doc] -> T_Patterns_vOut43
T_Patterns_vOut43 Patterns
_lhsOcopy [PP_Doc]
_lhsOpps
in T_Patterns_vOut43
__result_ )
in T_Patterns_v43 -> T_Patterns_s44
C_Patterns_s44 T_Patterns_v43
v43
{-# INLINE rule144 #-}
{-# LINE 89 "src-ag/PrintOcamlCode.ag" #-}
rule144 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: PP_Docs) ->
{-# LINE 89 "src-ag/PrintOcamlCode.ag" #-}
_hdIpp : _tlIpps
{-# LINE 2143 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule145 #-}
rule145 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->
(:) _hdIcopy _tlIcopy
{-# INLINE rule146 #-}
rule146 = \ _copy ->
_copy
{-# INLINE rule147 #-}
rule147 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule148 #-}
rule148 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# 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 Options
_lhsIoptions) -> ( let
_lhsOpps :: PP_Docs
_lhsOpps :: [PP_Doc]
_lhsOpps = () -> [PP_Doc]
forall a. () -> [a]
rule149 ()
_copy :: [a]
_copy = () -> [a]
forall a. () -> [a]
rule150 ()
_lhsOcopy :: Patterns
_lhsOcopy :: Patterns
_lhsOcopy = Patterns -> Patterns
forall p. p -> p
rule151 Patterns
forall a. [a]
_copy
!__result_ :: T_Patterns_vOut43
__result_ = Patterns -> [PP_Doc] -> T_Patterns_vOut43
T_Patterns_vOut43 Patterns
_lhsOcopy [PP_Doc]
_lhsOpps
in T_Patterns_vOut43
__result_ )
in T_Patterns_v43 -> T_Patterns_s44
C_Patterns_s44 T_Patterns_v43
v43
{-# INLINE rule149 #-}
{-# LINE 90 "src-ag/PrintOcamlCode.ag" #-}
rule149 = \ (_ :: ()) ->
{-# LINE 90 "src-ag/PrintOcamlCode.ag" #-}
[]
{-# LINE 2176 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule150 #-}
rule150 = \ (_ :: ()) ->
[]
{-# INLINE rule151 #-}
rule151 = \ _copy ->
_copy
data Inh_Program = Inh_Program { Inh_Program -> Options
options_Inh_Program :: !(Options), Inh_Program -> Map BlockInfo PP_Doc
textBlockMap_Inh_Program :: !(Map BlockInfo PP_Doc) }
data Syn_Program = Syn_Program { Syn_Program -> [PP_Doc]
output_Syn_Program :: !(PP_Docs) }
{-# INLINABLE wrap_Program #-}
wrap_Program :: T_Program -> Inh_Program -> (Syn_Program )
wrap_Program :: T_Program -> Inh_Program -> Syn_Program
wrap_Program !(T_Program Identity T_Program_s47
act) !(Inh_Program Options
_lhsIoptions Map BlockInfo PP_Doc
_lhsItextBlockMap) =
Identity Syn_Program -> Syn_Program
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do !T_Program_s47
sem <- Identity T_Program_s47
act
let arg46 :: T_Program_vIn46
arg46 = Options -> Map BlockInfo PP_Doc -> T_Program_vIn46
T_Program_vIn46 Options
_lhsIoptions Map BlockInfo PP_Doc
_lhsItextBlockMap
!(T_Program_vOut46 [PP_Doc]
_lhsOoutput) <- T_Program_vOut46 -> Identity T_Program_vOut46
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Program_s47 -> T_Program_v46
inv_Program_s47 T_Program_s47
sem T_Program_vIn46
arg46)
Syn_Program -> Identity Syn_Program
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc] -> Syn_Program
Syn_Program [PP_Doc]
_lhsOoutput)
)
{-# INLINE sem_Program #-}
sem_Program :: Program -> T_Program
sem_Program :: Program -> T_Program
sem_Program ( Program Chunks
chunks_ !Bool
ordered_ ) = T_Chunks -> Bool -> T_Program
sem_Program_Program ( Chunks -> T_Chunks
sem_Chunks Chunks
chunks_ ) Bool
ordered_
newtype T_Program = T_Program {
T_Program -> Identity T_Program_s47
attach_T_Program :: Identity (T_Program_s47 )
}
newtype T_Program_s47 = C_Program_s47 {
T_Program_s47 -> T_Program_v46
inv_Program_s47 :: (T_Program_v46 )
}
data T_Program_s48 = C_Program_s48
type T_Program_v46 = (T_Program_vIn46 ) -> (T_Program_vOut46 )
data T_Program_vIn46 = T_Program_vIn46 (Options) (Map BlockInfo PP_Doc)
data T_Program_vOut46 = T_Program_vOut46 (PP_Docs)
{-# NOINLINE sem_Program_Program #-}
sem_Program_Program :: T_Chunks -> (Bool) -> T_Program
sem_Program_Program :: T_Chunks -> Bool -> T_Program
sem_Program_Program T_Chunks
arg_chunks_ Bool
_ = Identity T_Program_s47 -> T_Program
T_Program (T_Program_s47 -> Identity T_Program_s47
forall (m :: * -> *) a. Monad m => a -> m a
return T_Program_s47
st47) where
{-# NOINLINE st47 #-}
!st47 :: T_Program_s47
st47 = let
v46 :: T_Program_v46
v46 :: T_Program_v46
v46 = \ !(T_Program_vIn46 Options
_lhsIoptions Map BlockInfo PP_Doc
_lhsItextBlockMap) -> ( let
_chunksX11 :: T_Chunks_s11
_chunksX11 = Identity T_Chunks_s11 -> T_Chunks_s11
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Chunks -> Identity T_Chunks_s11
attach_T_Chunks (T_Chunks
arg_chunks_))
(T_Chunks_vOut10 [PP_Doc]
_chunksIpps) = T_Chunks_s11 -> T_Chunks_v10
inv_Chunks_s11 T_Chunks_s11
_chunksX11 (Bool -> Options -> Map BlockInfo PP_Doc -> T_Chunks_vIn10
T_Chunks_vIn10 Bool
_chunksOisToplevel Options
_chunksOoptions Map BlockInfo PP_Doc
_chunksOtextBlockMap)
_lhsOoutput :: PP_Docs
_lhsOoutput :: [PP_Doc]
_lhsOoutput = [PP_Doc] -> [PP_Doc]
rule152 [PP_Doc]
_chunksIpps
_chunksOisToplevel :: Bool
_chunksOisToplevel = () -> Bool
rule153 ()
_chunksOoptions :: Options
_chunksOoptions = Options -> Options
rule154 Options
_lhsIoptions
_chunksOtextBlockMap :: Map BlockInfo PP_Doc
_chunksOtextBlockMap = Map BlockInfo PP_Doc -> Map BlockInfo PP_Doc
rule155 Map BlockInfo PP_Doc
_lhsItextBlockMap
!__result_ :: T_Program_vOut46
__result_ = [PP_Doc] -> T_Program_vOut46
T_Program_vOut46 [PP_Doc]
_lhsOoutput
in T_Program_vOut46
__result_ )
in T_Program_v46 -> T_Program_s47
C_Program_s47 T_Program_v46
v46
{-# INLINE rule152 #-}
{-# LINE 58 "src-ag/PrintOcamlCode.ag" #-}
rule152 = \ ((_chunksIpps) :: PP_Docs) ->
{-# LINE 58 "src-ag/PrintOcamlCode.ag" #-}
_chunksIpps
{-# LINE 2236 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule153 #-}
{-# LINE 216 "src-ag/PrintOcamlCode.ag" #-}
rule153 = \ (_ :: ()) ->
{-# LINE 216 "src-ag/PrintOcamlCode.ag" #-}
True
{-# LINE 2242 "src-generated/PrintOcamlCode.hs" #-}
{-# INLINE rule154 #-}
rule154 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule155 #-}
rule155 = \ ((_lhsItextBlockMap) :: Map BlockInfo PP_Doc) ->
_lhsItextBlockMap
data Inh_Type = Inh_Type { }
data Syn_Type = Syn_Type { Syn_Type -> PP_Doc
pp_Syn_Type :: !(PP_Doc) }
{-# INLINABLE wrap_Type #-}
wrap_Type :: T_Type -> Inh_Type -> (Syn_Type )
wrap_Type :: T_Type -> Inh_Type -> Syn_Type
wrap_Type !(T_Type Identity T_Type_s50
act) !(Inh_Type
Inh_Type ) =
Identity Syn_Type -> Syn_Type
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do !T_Type_s50
sem <- Identity T_Type_s50
act
let arg49 :: T_Type_vIn49
arg49 = T_Type_vIn49
T_Type_vIn49
!(T_Type_vOut49 PP_Doc
_lhsOpp) <- T_Type_vOut49 -> Identity T_Type_vOut49
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
sem T_Type_vIn49
arg49)
Syn_Type -> Identity Syn_Type
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_Type
Syn_Type PP_Doc
_lhsOpp)
)
{-# NOINLINE sem_Type #-}
sem_Type :: Type -> T_Type
sem_Type :: Type -> T_Type
sem_Type ( Arr Type
left_ Type
right_ ) = T_Type -> T_Type -> T_Type
sem_Type_Arr ( Type -> T_Type
sem_Type Type
left_ ) ( Type -> T_Type
sem_Type Type
right_ )
sem_Type ( CtxApp ![(String, [String])]
left_ Type
right_ ) = [(String, [String])] -> T_Type -> T_Type
sem_Type_CtxApp [(String, [String])]
left_ ( Type -> T_Type
sem_Type Type
right_ )
sem_Type ( QuantApp !String
left_ Type
right_ ) = String -> T_Type -> T_Type
sem_Type_QuantApp String
left_ ( Type -> T_Type
sem_Type Type
right_ )
sem_Type ( TypeApp Type
func_ Types
args_ ) = T_Type -> T_Types -> T_Type
sem_Type_TypeApp ( Type -> T_Type
sem_Type Type
func_ ) ( Types -> T_Types
sem_Types Types
args_ )
sem_Type ( TupleType Types
tps_ ) = T_Types -> T_Type
sem_Type_TupleType ( Types -> T_Types
sem_Types Types
tps_ )
sem_Type ( UnboxedTupleType Types
tps_ ) = T_Types -> T_Type
sem_Type_UnboxedTupleType ( Types -> T_Types
sem_Types Types
tps_ )
sem_Type ( List Type
tp_ ) = T_Type -> T_Type
sem_Type_List ( Type -> T_Type
sem_Type Type
tp_ )
sem_Type ( SimpleType !String
txt_ ) = String -> T_Type
sem_Type_SimpleType String
txt_
sem_Type ( NontermType !String
name_ ![String]
params_ !Bool
deforested_ ) = String -> [String] -> Bool -> T_Type
sem_Type_NontermType String
name_ [String]
params_ Bool
deforested_
sem_Type ( TMaybe Type
tp_ ) = T_Type -> T_Type
sem_Type_TMaybe ( Type -> T_Type
sem_Type Type
tp_ )
sem_Type ( TEither Type
left_ Type
right_ ) = T_Type -> T_Type -> T_Type
sem_Type_TEither ( Type -> T_Type
sem_Type Type
left_ ) ( Type -> T_Type
sem_Type Type
right_ )
sem_Type ( TMap Type
key_ Type
value_ ) = T_Type -> T_Type -> T_Type
sem_Type_TMap ( Type -> T_Type
sem_Type Type
key_ ) ( Type -> T_Type
sem_Type Type
value_ )
sem_Type ( TIntMap Type
value_ ) = T_Type -> T_Type
sem_Type_TIntMap ( Type -> T_Type
sem_Type Type
value_ )
sem_Type ( TSet Type
tp_ ) = T_Type -> T_Type
sem_Type_TSet ( Type -> T_Type
sem_Type Type
tp_ )
sem_Type ( Type
TIntSet ) = T_Type
sem_Type_TIntSet
newtype T_Type = T_Type {
T_Type -> Identity T_Type_s50
attach_T_Type :: Identity (T_Type_s50 )
}
newtype T_Type_s50 = C_Type_s50 {
T_Type_s50 -> T_Type_v49
inv_Type_s50 :: (T_Type_v49 )
}
data T_Type_s51 = C_Type_s51
type T_Type_v49 = (T_Type_vIn49 ) -> (T_Type_vOut49 )
data T_Type_vIn49 = T_Type_vIn49
data T_Type_vOut49 = T_Type_vOut49 (PP_Doc)
{-# NOINLINE sem_Type_Arr #-}
sem_Type_Arr :: T_Type -> T_Type -> T_Type
sem_Type_Arr :: T_Type -> T_Type -> T_Type
sem_Type_Arr T_Type
arg_left_ T_Type
arg_right_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
{-# NOINLINE st50 #-}
!st50 :: T_Type_s50
st50 = let
v49 :: T_Type_v49
v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49
T_Type_vIn49 ) -> ( let
_leftX50 :: T_Type_s50
_leftX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_left_))
_rightX50 :: T_Type_s50
_rightX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_right_))
(T_Type_vOut49 PP_Doc
_leftIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_leftX50 (T_Type_vIn49
T_Type_vIn49 )
(T_Type_vOut49 PP_Doc
_rightIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_rightX50 (T_Type_vIn49
T_Type_vIn49 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule156 PP_Doc
_leftIpp PP_Doc
_rightIpp
!__result_ :: T_Type_vOut49
__result_ = PP_Doc -> T_Type_vOut49
T_Type_vOut49 PP_Doc
_lhsOpp
in T_Type_vOut49
__result_ )
in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
{-# INLINE rule156 #-}
{-# LINE 161 "src-ag/PrintOcamlCode.ag" #-}
rule156 = \ ((_leftIpp) :: PP_Doc) ((_rightIpp) :: PP_Doc) ->
{-# LINE 161 "src-ag/PrintOcamlCode.ag" #-}
pp_parens (_leftIpp >#< "->" >#< _rightIpp)
{-# LINE 2315 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Type_CtxApp #-}
sem_Type_CtxApp :: ([(String, [String])]) -> T_Type -> T_Type
sem_Type_CtxApp :: [(String, [String])] -> T_Type -> T_Type
sem_Type_CtxApp [(String, [String])]
_ T_Type
arg_right_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
{-# NOINLINE st50 #-}
!st50 :: T_Type_s50
st50 = let
v49 :: T_Type_v49
v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49
T_Type_vIn49 ) -> ( let
_rightX50 :: T_Type_s50
_rightX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_right_))
(T_Type_vOut49 PP_Doc
_rightIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_rightX50 (T_Type_vIn49
T_Type_vIn49 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
forall a. () -> a
rule157 ()
!__result_ :: T_Type_vOut49
__result_ = PP_Doc -> T_Type_vOut49
T_Type_vOut49 PP_Doc
_lhsOpp
in T_Type_vOut49
__result_ )
in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
{-# INLINE rule157 #-}
{-# LINE 162 "src-ag/PrintOcamlCode.ag" #-}
rule157 = \ (_ :: ()) ->
{-# LINE 162 "src-ag/PrintOcamlCode.ag" #-}
error "pp of Type.CtxApp not supported"
{-# LINE 2335 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Type_QuantApp #-}
sem_Type_QuantApp :: (String) -> T_Type -> T_Type
sem_Type_QuantApp :: String -> T_Type -> T_Type
sem_Type_QuantApp String
_ T_Type
arg_right_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
{-# NOINLINE st50 #-}
!st50 :: T_Type_s50
st50 = let
v49 :: T_Type_v49
v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49
T_Type_vIn49 ) -> ( let
_rightX50 :: T_Type_s50
_rightX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_right_))
(T_Type_vOut49 PP_Doc
_rightIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_rightX50 (T_Type_vIn49
T_Type_vIn49 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule158 PP_Doc
_rightIpp
!__result_ :: T_Type_vOut49
__result_ = PP_Doc -> T_Type_vOut49
T_Type_vOut49 PP_Doc
_lhsOpp
in T_Type_vOut49
__result_ )
in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
{-# INLINE rule158 #-}
rule158 :: PP_Doc -> PP_Doc
rule158 = \ ((PP_Doc
_rightIpp) :: PP_Doc) ->
PP_Doc
_rightIpp
{-# NOINLINE sem_Type_TypeApp #-}
sem_Type_TypeApp :: T_Type -> T_Types -> T_Type
sem_Type_TypeApp :: T_Type -> T_Types -> T_Type
sem_Type_TypeApp T_Type
arg_func_ T_Types
arg_args_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
{-# NOINLINE st50 #-}
!st50 :: T_Type_s50
st50 = let
v49 :: T_Type_v49
v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49
T_Type_vIn49 ) -> ( let
_funcX50 :: T_Type_s50
_funcX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_func_))
_argsX53 :: T_Types_s53
_argsX53 = Identity T_Types_s53 -> T_Types_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Types -> Identity T_Types_s53
attach_T_Types (T_Types
arg_args_))
(T_Type_vOut49 PP_Doc
_funcIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_funcX50 (T_Type_vIn49
T_Type_vIn49 )
(T_Types_vOut52 [PP_Doc]
_argsIpps) = T_Types_s53 -> T_Types_v52
inv_Types_s53 T_Types_s53
_argsX53 (T_Types_vIn52
T_Types_vIn52 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> PP_Doc -> PP_Doc
rule159 [PP_Doc]
_argsIpps PP_Doc
_funcIpp
!__result_ :: T_Type_vOut49
__result_ = PP_Doc -> T_Type_vOut49
T_Type_vOut49 PP_Doc
_lhsOpp
in T_Type_vOut49
__result_ )
in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
{-# INLINE rule159 #-}
{-# LINE 163 "src-ag/PrintOcamlCode.ag" #-}
rule159 = \ ((_argsIpps) :: PP_Docs) ((_funcIpp) :: PP_Doc) ->
{-# LINE 163 "src-ag/PrintOcamlCode.ag" #-}
pp_parens (hv_sp (_argsIpps ++ [_funcIpp]))
{-# LINE 2374 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Type_TupleType #-}
sem_Type_TupleType :: T_Types -> T_Type
sem_Type_TupleType :: T_Types -> T_Type
sem_Type_TupleType T_Types
arg_tps_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
{-# NOINLINE st50 #-}
!st50 :: T_Type_s50
st50 = let
v49 :: T_Type_v49
v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49
T_Type_vIn49 ) -> ( let
_tpsX53 :: T_Types_s53
_tpsX53 = Identity T_Types_s53 -> T_Types_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Types -> Identity T_Types_s53
attach_T_Types (T_Types
arg_tps_))
(T_Types_vOut52 [PP_Doc]
_tpsIpps) = T_Types_s53 -> T_Types_v52
inv_Types_s53 T_Types_s53
_tpsX53 (T_Types_vIn52
T_Types_vIn52 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> PP_Doc
rule160 [PP_Doc]
_tpsIpps
!__result_ :: T_Type_vOut49
__result_ = PP_Doc -> T_Type_vOut49
T_Type_vOut49 PP_Doc
_lhsOpp
in T_Type_vOut49
__result_ )
in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
{-# INLINE rule160 #-}
{-# LINE 164 "src-ag/PrintOcamlCode.ag" #-}
rule160 = \ ((_tpsIpps) :: PP_Docs) ->
{-# LINE 164 "src-ag/PrintOcamlCode.ag" #-}
pp_block "(" ")" "," _tpsIpps
{-# LINE 2394 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Type_UnboxedTupleType #-}
sem_Type_UnboxedTupleType :: T_Types -> T_Type
sem_Type_UnboxedTupleType :: T_Types -> T_Type
sem_Type_UnboxedTupleType T_Types
arg_tps_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
{-# NOINLINE st50 #-}
!st50 :: T_Type_s50
st50 = let
v49 :: T_Type_v49
v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49
T_Type_vIn49 ) -> ( let
_tpsX53 :: T_Types_s53
_tpsX53 = Identity T_Types_s53 -> T_Types_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Types -> Identity T_Types_s53
attach_T_Types (T_Types
arg_tps_))
(T_Types_vOut52 [PP_Doc]
_tpsIpps) = T_Types_s53 -> T_Types_v52
inv_Types_s53 T_Types_s53
_tpsX53 (T_Types_vIn52
T_Types_vIn52 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
forall a. () -> a
rule161 ()
!__result_ :: T_Type_vOut49
__result_ = PP_Doc -> T_Type_vOut49
T_Type_vOut49 PP_Doc
_lhsOpp
in T_Type_vOut49
__result_ )
in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
{-# INLINE rule161 #-}
{-# LINE 166 "src-ag/PrintOcamlCode.ag" #-}
rule161 = \ (_ :: ()) ->
{-# LINE 166 "src-ag/PrintOcamlCode.ag" #-}
error "pp of Type.UnboxedTupleType is not supported"
{-# LINE 2414 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Type_List #-}
sem_Type_List :: T_Type -> T_Type
sem_Type_List :: T_Type -> T_Type
sem_Type_List T_Type
arg_tp_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
{-# NOINLINE st50 #-}
!st50 :: T_Type_s50
st50 = let
v49 :: T_Type_v49
v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49
T_Type_vIn49 ) -> ( let
_tpX50 :: T_Type_s50
_tpX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_tp_))
(T_Type_vOut49 PP_Doc
_tpIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_tpX50 (T_Type_vIn49
T_Type_vIn49 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule162 PP_Doc
_tpIpp
!__result_ :: T_Type_vOut49
__result_ = PP_Doc -> T_Type_vOut49
T_Type_vOut49 PP_Doc
_lhsOpp
in T_Type_vOut49
__result_ )
in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
{-# INLINE rule162 #-}
{-# LINE 167 "src-ag/PrintOcamlCode.ag" #-}
rule162 = \ ((_tpIpp) :: PP_Doc) ->
{-# LINE 167 "src-ag/PrintOcamlCode.ag" #-}
_tpIpp >#< "list"
{-# LINE 2434 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Type_SimpleType #-}
sem_Type_SimpleType :: (String) -> T_Type
sem_Type_SimpleType :: String -> T_Type
sem_Type_SimpleType !String
arg_txt_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
{-# NOINLINE st50 #-}
!st50 :: T_Type_s50
st50 = let
v49 :: T_Type_v49
v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49
T_Type_vIn49 ) -> ( let
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = String -> PP_Doc
rule163 String
arg_txt_
!__result_ :: T_Type_vOut49
__result_ = PP_Doc -> T_Type_vOut49
T_Type_vOut49 PP_Doc
_lhsOpp
in T_Type_vOut49
__result_ )
in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
{-# INLINE rule163 #-}
{-# LINE 168 "src-ag/PrintOcamlCode.ag" #-}
rule163 = \ txt_ ->
{-# LINE 168 "src-ag/PrintOcamlCode.ag" #-}
text txt_
{-# LINE 2452 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Type_NontermType #-}
sem_Type_NontermType :: (String) -> ([String]) -> (Bool) -> T_Type
sem_Type_NontermType :: String -> [String] -> Bool -> T_Type
sem_Type_NontermType !String
arg_name_ ![String]
arg_params_ Bool
_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
{-# NOINLINE st50 #-}
!st50 :: T_Type_s50
st50 = let
v49 :: T_Type_v49
v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49
T_Type_vIn49 ) -> ( let
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = String -> [String] -> PP_Doc
rule164 String
arg_name_ [String]
arg_params_
!__result_ :: T_Type_vOut49
__result_ = PP_Doc -> T_Type_vOut49
T_Type_vOut49 PP_Doc
_lhsOpp
in T_Type_vOut49
__result_ )
in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
{-# INLINE rule164 #-}
{-# LINE 169 "src-ag/PrintOcamlCode.ag" #-}
rule164 = \ name_ params_ ->
{-# LINE 169 "src-ag/PrintOcamlCode.ag" #-}
pp_block "(" ")" " " (map text params_ ++ [text $ toOcamlTC name_])
{-# LINE 2470 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Type_TMaybe #-}
sem_Type_TMaybe :: T_Type -> T_Type
sem_Type_TMaybe :: T_Type -> T_Type
sem_Type_TMaybe T_Type
arg_tp_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
{-# NOINLINE st50 #-}
!st50 :: T_Type_s50
st50 = let
v49 :: T_Type_v49
v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49
T_Type_vIn49 ) -> ( let
_tpX50 :: T_Type_s50
_tpX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_tp_))
(T_Type_vOut49 PP_Doc
_tpIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_tpX50 (T_Type_vIn49
T_Type_vIn49 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule165 PP_Doc
_tpIpp
!__result_ :: T_Type_vOut49
__result_ = PP_Doc -> T_Type_vOut49
T_Type_vOut49 PP_Doc
_lhsOpp
in T_Type_vOut49
__result_ )
in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
{-# INLINE rule165 #-}
{-# LINE 170 "src-ag/PrintOcamlCode.ag" #-}
rule165 = \ ((_tpIpp) :: PP_Doc) ->
{-# LINE 170 "src-ag/PrintOcamlCode.ag" #-}
_tpIpp >#< "opt"
{-# LINE 2490 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Type_TEither #-}
sem_Type_TEither :: T_Type -> T_Type -> T_Type
sem_Type_TEither :: T_Type -> T_Type -> T_Type
sem_Type_TEither T_Type
arg_left_ T_Type
arg_right_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
{-# NOINLINE st50 #-}
!st50 :: T_Type_s50
st50 = let
v49 :: T_Type_v49
v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49
T_Type_vIn49 ) -> ( let
_leftX50 :: T_Type_s50
_leftX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_left_))
_rightX50 :: T_Type_s50
_rightX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_right_))
(T_Type_vOut49 PP_Doc
_leftIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_leftX50 (T_Type_vIn49
T_Type_vIn49 )
(T_Type_vOut49 PP_Doc
_rightIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_rightX50 (T_Type_vIn49
T_Type_vIn49 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
forall a. () -> a
rule166 ()
!__result_ :: T_Type_vOut49
__result_ = PP_Doc -> T_Type_vOut49
T_Type_vOut49 PP_Doc
_lhsOpp
in T_Type_vOut49
__result_ )
in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
{-# INLINE rule166 #-}
{-# LINE 171 "src-ag/PrintOcamlCode.ag" #-}
rule166 = \ (_ :: ()) ->
{-# LINE 171 "src-ag/PrintOcamlCode.ag" #-}
error "pp of Type.TEither is not supported"
{-# LINE 2512 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Type_TMap #-}
sem_Type_TMap :: T_Type -> T_Type -> T_Type
sem_Type_TMap :: T_Type -> T_Type -> T_Type
sem_Type_TMap T_Type
arg_key_ T_Type
arg_value_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
{-# NOINLINE st50 #-}
!st50 :: T_Type_s50
st50 = let
v49 :: T_Type_v49
v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49
T_Type_vIn49 ) -> ( let
_keyX50 :: T_Type_s50
_keyX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_key_))
_valueX50 :: T_Type_s50
_valueX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_value_))
(T_Type_vOut49 PP_Doc
_keyIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_keyX50 (T_Type_vIn49
T_Type_vIn49 )
(T_Type_vOut49 PP_Doc
_valueIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_valueX50 (T_Type_vIn49
T_Type_vIn49 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
forall a. () -> a
rule167 ()
!__result_ :: T_Type_vOut49
__result_ = PP_Doc -> T_Type_vOut49
T_Type_vOut49 PP_Doc
_lhsOpp
in T_Type_vOut49
__result_ )
in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
{-# INLINE rule167 #-}
{-# LINE 172 "src-ag/PrintOcamlCode.ag" #-}
rule167 = \ (_ :: ()) ->
{-# LINE 172 "src-ag/PrintOcamlCode.ag" #-}
error "pp of Type.TMap is not supported"
{-# LINE 2534 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Type_TIntMap #-}
sem_Type_TIntMap :: T_Type -> T_Type
sem_Type_TIntMap :: T_Type -> T_Type
sem_Type_TIntMap T_Type
arg_value_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
{-# NOINLINE st50 #-}
!st50 :: T_Type_s50
st50 = let
v49 :: T_Type_v49
v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49
T_Type_vIn49 ) -> ( let
_valueX50 :: T_Type_s50
_valueX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_value_))
(T_Type_vOut49 PP_Doc
_valueIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_valueX50 (T_Type_vIn49
T_Type_vIn49 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
forall a. () -> a
rule168 ()
!__result_ :: T_Type_vOut49
__result_ = PP_Doc -> T_Type_vOut49
T_Type_vOut49 PP_Doc
_lhsOpp
in T_Type_vOut49
__result_ )
in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
{-# INLINE rule168 #-}
{-# LINE 173 "src-ag/PrintOcamlCode.ag" #-}
rule168 = \ (_ :: ()) ->
{-# LINE 173 "src-ag/PrintOcamlCode.ag" #-}
error "pp of Type.TIntMap is not supported"
{-# LINE 2554 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Type_TSet #-}
sem_Type_TSet :: T_Type -> T_Type
sem_Type_TSet :: T_Type -> T_Type
sem_Type_TSet T_Type
arg_tp_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
{-# NOINLINE st50 #-}
!st50 :: T_Type_s50
st50 = let
v49 :: T_Type_v49
v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49
T_Type_vIn49 ) -> ( let
_tpX50 :: T_Type_s50
_tpX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_tp_))
(T_Type_vOut49 PP_Doc
_tpIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_tpX50 (T_Type_vIn49
T_Type_vIn49 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
forall a. () -> a
rule169 ()
!__result_ :: T_Type_vOut49
__result_ = PP_Doc -> T_Type_vOut49
T_Type_vOut49 PP_Doc
_lhsOpp
in T_Type_vOut49
__result_ )
in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
{-# INLINE rule169 #-}
{-# LINE 174 "src-ag/PrintOcamlCode.ag" #-}
rule169 = \ (_ :: ()) ->
{-# LINE 174 "src-ag/PrintOcamlCode.ag" #-}
error "pp of Type.TSet is not supported"
{-# LINE 2574 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Type_TIntSet #-}
sem_Type_TIntSet :: T_Type
sem_Type_TIntSet :: T_Type
sem_Type_TIntSet = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
{-# NOINLINE st50 #-}
!st50 :: T_Type_s50
st50 = let
v49 :: T_Type_v49
v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49
T_Type_vIn49 ) -> ( let
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
forall a. () -> a
rule170 ()
!__result_ :: T_Type_vOut49
__result_ = PP_Doc -> T_Type_vOut49
T_Type_vOut49 PP_Doc
_lhsOpp
in T_Type_vOut49
__result_ )
in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
{-# INLINE rule170 #-}
{-# LINE 175 "src-ag/PrintOcamlCode.ag" #-}
rule170 = \ (_ :: ()) ->
{-# LINE 175 "src-ag/PrintOcamlCode.ag" #-}
error "pp of Type.TIntSet is not supported"
{-# LINE 2592 "src-generated/PrintOcamlCode.hs" #-}
data Inh_Types = Inh_Types { }
data Syn_Types = Syn_Types { Syn_Types -> [PP_Doc]
pps_Syn_Types :: !(PP_Docs) }
{-# INLINABLE wrap_Types #-}
wrap_Types :: T_Types -> Inh_Types -> (Syn_Types )
wrap_Types :: T_Types -> Inh_Types -> Syn_Types
wrap_Types !(T_Types Identity T_Types_s53
act) !(Inh_Types
Inh_Types ) =
Identity Syn_Types -> Syn_Types
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do !T_Types_s53
sem <- Identity T_Types_s53
act
let arg52 :: T_Types_vIn52
arg52 = T_Types_vIn52
T_Types_vIn52
!(T_Types_vOut52 [PP_Doc]
_lhsOpps) <- T_Types_vOut52 -> Identity T_Types_vOut52
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Types_s53 -> T_Types_v52
inv_Types_s53 T_Types_s53
sem T_Types_vIn52
arg52)
Syn_Types -> Identity Syn_Types
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc] -> Syn_Types
Syn_Types [PP_Doc]
_lhsOpps)
)
{-# NOINLINE sem_Types #-}
sem_Types :: Types -> T_Types
sem_Types :: Types -> T_Types
sem_Types Types
list = (T_Type -> T_Types -> T_Types) -> T_Types -> [T_Type] -> T_Types
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Type -> T_Types -> T_Types
sem_Types_Cons T_Types
sem_Types_Nil ((Type -> T_Type) -> Types -> [T_Type]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Type -> T_Type
sem_Type Types
list)
newtype T_Types = T_Types {
T_Types -> Identity T_Types_s53
attach_T_Types :: Identity (T_Types_s53 )
}
newtype T_Types_s53 = C_Types_s53 {
T_Types_s53 -> T_Types_v52
inv_Types_s53 :: (T_Types_v52 )
}
data T_Types_s54 = C_Types_s54
type T_Types_v52 = (T_Types_vIn52 ) -> (T_Types_vOut52 )
data T_Types_vIn52 = T_Types_vIn52
data T_Types_vOut52 = T_Types_vOut52 (PP_Docs)
{-# NOINLINE sem_Types_Cons #-}
sem_Types_Cons :: T_Type -> T_Types -> T_Types
sem_Types_Cons :: T_Type -> T_Types -> T_Types
sem_Types_Cons T_Type
arg_hd_ T_Types
arg_tl_ = Identity T_Types_s53 -> T_Types
T_Types (T_Types_s53 -> Identity T_Types_s53
forall (m :: * -> *) a. Monad m => a -> m a
return T_Types_s53
st53) where
{-# NOINLINE st53 #-}
!st53 :: T_Types_s53
st53 = let
v52 :: T_Types_v52
v52 :: T_Types_v52
v52 = \ !(T_Types_vIn52
T_Types_vIn52 ) -> ( let
_hdX50 :: T_Type_s50
_hdX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_hd_))
_tlX53 :: T_Types_s53
_tlX53 = Identity T_Types_s53 -> T_Types_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Types -> Identity T_Types_s53
attach_T_Types (T_Types
arg_tl_))
(T_Type_vOut49 PP_Doc
_hdIpp) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_hdX50 (T_Type_vIn49
T_Type_vIn49 )
(T_Types_vOut52 [PP_Doc]
_tlIpps) = T_Types_s53 -> T_Types_v52
inv_Types_s53 T_Types_s53
_tlX53 (T_Types_vIn52
T_Types_vIn52 )
_lhsOpps :: PP_Docs
_lhsOpps :: [PP_Doc]
_lhsOpps = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule171 PP_Doc
_hdIpp [PP_Doc]
_tlIpps
!__result_ :: T_Types_vOut52
__result_ = [PP_Doc] -> T_Types_vOut52
T_Types_vOut52 [PP_Doc]
_lhsOpps
in T_Types_vOut52
__result_ )
in T_Types_v52 -> T_Types_s53
C_Types_s53 T_Types_v52
v52
{-# INLINE rule171 #-}
{-# LINE 73 "src-ag/PrintOcamlCode.ag" #-}
rule171 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: PP_Docs) ->
{-# LINE 73 "src-ag/PrintOcamlCode.ag" #-}
_hdIpp : _tlIpps
{-# LINE 2645 "src-generated/PrintOcamlCode.hs" #-}
{-# NOINLINE sem_Types_Nil #-}
sem_Types_Nil :: T_Types
sem_Types_Nil :: T_Types
sem_Types_Nil = Identity T_Types_s53 -> T_Types
T_Types (T_Types_s53 -> Identity T_Types_s53
forall (m :: * -> *) a. Monad m => a -> m a
return T_Types_s53
st53) where
{-# NOINLINE st53 #-}
!st53 :: T_Types_s53
st53 = let
v52 :: T_Types_v52
v52 :: T_Types_v52
v52 = \ !(T_Types_vIn52
T_Types_vIn52 ) -> ( let
_lhsOpps :: PP_Docs
_lhsOpps :: [PP_Doc]
_lhsOpps = () -> [PP_Doc]
forall a. () -> [a]
rule172 ()
!__result_ :: T_Types_vOut52
__result_ = [PP_Doc] -> T_Types_vOut52
T_Types_vOut52 [PP_Doc]
_lhsOpps
in T_Types_vOut52
__result_ )
in T_Types_v52 -> T_Types_s53
C_Types_s53 T_Types_v52
v52
{-# INLINE rule172 #-}
{-# LINE 74 "src-ag/PrintOcamlCode.ag" #-}
rule172 = \ (_ :: ()) ->
{-# LINE 74 "src-ag/PrintOcamlCode.ag" #-}
[]
{-# LINE 2663 "src-generated/PrintOcamlCode.hs" #-}