module UHC.Light.Compiler.CoreRun.ModImpExp(crmodImpExp', Inh_AGItf (..), Syn_AGItf (..)) where
import UHC.Light.Compiler.Base.Common
import UHC.Light.Compiler.Opts
import UHC.Light.Compiler.Error
import UHC.Light.Compiler.CoreRun
import qualified UHC.Util.Rel as Rel
import qualified UHC.Util.RelMap as RelMap
import qualified UHC.Light.Compiler.Module.ImportExport as ModImpExp
deriving instance Typeable Syn_AGItf
crmodImpExp'
:: Inh_AGItf
-> Mod
-> Syn_AGItf
crmodImpExp' inh crmod
= t
where t = wrap_AGItf
(sem_AGItf (AGItf_AGItf crmod))
inh
sem_AGItf :: AGItf ->
T_AGItf
sem_AGItf (AGItf_AGItf _module) =
(sem_AGItf_AGItf (sem_Mod _module))
type T_AGItf = HsName ->
( Bool,([HsName]),(ModImpExp.Mod),HsName)
data Inh_AGItf = Inh_AGItf {moduleNm_Inh_AGItf :: !(HsName)}
data Syn_AGItf = Syn_AGItf {hasMain_Syn_AGItf :: !(Bool),impModNmL_Syn_AGItf :: !(([HsName])),mod_Syn_AGItf :: !((ModImpExp.Mod)),realModuleNm_Syn_AGItf :: !(HsName)}
wrap_AGItf :: T_AGItf ->
Inh_AGItf ->
Syn_AGItf
wrap_AGItf sem (Inh_AGItf _lhsImoduleNm) =
(let ( _lhsOhasMain,_lhsOimpModNmL,_lhsOmod,_lhsOrealModuleNm) = sem _lhsImoduleNm
in (Syn_AGItf _lhsOhasMain _lhsOimpModNmL _lhsOmod _lhsOrealModuleNm))
sem_AGItf_AGItf :: T_Mod ->
T_AGItf
sem_AGItf_AGItf module_ =
(\ _lhsImoduleNm ->
(case (_lhsImoduleNm) of
{ _moduleOmoduleNm ->
(case (module_ _moduleOmoduleNm) of
{ ( _moduleIhasMain,_moduleIimpModNmL,_moduleImod,_moduleIrealModuleNm) ->
(case (_moduleIhasMain) of
{ _lhsOhasMain ->
(case (_moduleIimpModNmL) of
{ _lhsOimpModNmL ->
(case (_moduleImod) of
{ _lhsOmod ->
(case (_moduleIrealModuleNm) of
{ _lhsOrealModuleNm ->
( _lhsOhasMain,_lhsOimpModNmL,_lhsOmod,_lhsOrealModuleNm) }) }) }) }) }) }))
sem_Alt :: Alt ->
T_Alt
sem_Alt (Alt_Alt _ref2nm _expr) =
(sem_Alt_Alt _ref2nm (sem_Exp _expr))
type T_Alt = ( )
sem_Alt_Alt :: Ref2Nm ->
T_Exp ->
T_Alt
sem_Alt_Alt ref2nm_ expr_ =
( )
sem_DataCon :: DataCon ->
T_DataCon
sem_DataCon (DataCon_Con _conNm _tagNr) =
(sem_DataCon_Con _conNm _tagNr)
type T_DataCon = ( )
sem_DataCon_Con :: HsName ->
Int ->
T_DataCon
sem_DataCon_Con conNm_ tagNr_ =
( )
sem_DataConL :: DataConL ->
T_DataConL
sem_DataConL list =
(Prelude.foldr sem_DataConL_Cons sem_DataConL_Nil (Prelude.map sem_DataCon list))
type T_DataConL = ( )
sem_DataConL_Cons :: T_DataCon ->
T_DataConL ->
T_DataConL
sem_DataConL_Cons hd_ tl_ =
( )
sem_DataConL_Nil :: T_DataConL
sem_DataConL_Nil =
( )
sem_Exp :: Exp ->
T_Exp
sem_Exp (Exp_SExp _sexpr) =
(sem_Exp_SExp (sem_SExp _sexpr))
sem_Exp (Exp_Tup _tag _args) =
(sem_Exp_Tup _tag _args)
sem_Exp (Exp_Let _firstOff _ref2nm _binds _body) =
(sem_Exp_Let _firstOff _ref2nm _binds (sem_Exp _body))
sem_Exp (Exp_App _func _args) =
(sem_Exp_App (sem_Exp _func) _args)
sem_Exp (Exp_Lam _mbNm _nrArgs _stkDepth _ref2nm _body) =
(sem_Exp_Lam _mbNm _nrArgs _stkDepth _ref2nm (sem_Exp _body))
sem_Exp (Exp_Force _expr) =
(sem_Exp_Force (sem_Exp _expr))
sem_Exp (Exp_Tail _expr) =
(sem_Exp_Tail (sem_Exp _expr))
sem_Exp (Exp_Case _expr _alts) =
(sem_Exp_Case (sem_SExp _expr) _alts)
sem_Exp (Exp_FFI _prim _args) =
(sem_Exp_FFI _prim _args)
type T_Exp = ( )
sem_Exp_SExp :: T_SExp ->
T_Exp
sem_Exp_SExp sexpr_ =
( )
sem_Exp_Tup :: Int ->
(CRArray SExp) ->
T_Exp
sem_Exp_Tup tag_ args_ =
( )
sem_Exp_Let :: Int ->
Ref2Nm ->
(CRArray Bind) ->
T_Exp ->
T_Exp
sem_Exp_Let firstOff_ ref2nm_ binds_ body_ =
( )
sem_Exp_App :: T_Exp ->
(CRArray SExp) ->
T_Exp
sem_Exp_App func_ args_ =
( )
sem_Exp_Lam :: (Maybe HsName) ->
Int ->
Int ->
Ref2Nm ->
T_Exp ->
T_Exp
sem_Exp_Lam mbNm_ nrArgs_ stkDepth_ ref2nm_ body_ =
( )
sem_Exp_Force :: T_Exp ->
T_Exp
sem_Exp_Force expr_ =
( )
sem_Exp_Tail :: T_Exp ->
T_Exp
sem_Exp_Tail expr_ =
( )
sem_Exp_Case :: T_SExp ->
(CRArray Alt) ->
T_Exp
sem_Exp_Case expr_ alts_ =
( )
sem_Exp_FFI :: RunPrim ->
(CRArray SExp) ->
T_Exp
sem_Exp_FFI prim_ args_ =
( )
sem_Export :: Export ->
T_Export
sem_Export (Export_Export _nm _offset) =
(sem_Export_Export _nm _offset)
type T_Export = ( )
sem_Export_Export :: HsName ->
Int ->
T_Export
sem_Export_Export nm_ offset_ =
( )
sem_ExportL :: ExportL ->
T_ExportL
sem_ExportL list =
(Prelude.foldr sem_ExportL_Cons sem_ExportL_Nil (Prelude.map sem_Export list))
type T_ExportL = ( )
sem_ExportL_Cons :: T_Export ->
T_ExportL ->
T_ExportL
sem_ExportL_Cons hd_ tl_ =
( )
sem_ExportL_Nil :: T_ExportL
sem_ExportL_Nil =
( )
sem_Import :: Import ->
T_Import
sem_Import (Import_Import _nm) =
(sem_Import_Import _nm)
type T_Import = ( ([HsName]),([ModImpExp.ModImp]))
sem_Import_Import :: HsName ->
T_Import
sem_Import_Import nm_ =
(case ([nm_]) of
{ _lhsOimpModNmL ->
(case ([ModImpExp.ModImp True nm_ nm_ False [] emptyRange]) of
{ _lhsOmodImpL ->
( _lhsOimpModNmL,_lhsOmodImpL) }) })
sem_ImportL :: ImportL ->
T_ImportL
sem_ImportL list =
(Prelude.foldr sem_ImportL_Cons sem_ImportL_Nil (Prelude.map sem_Import list))
type T_ImportL = ( ([HsName]),([ModImpExp.ModImp]))
sem_ImportL_Cons :: T_Import ->
T_ImportL ->
T_ImportL
sem_ImportL_Cons hd_ tl_ =
(case (tl_) of
{ ( _tlIimpModNmL,_tlImodImpL) ->
(case (hd_) of
{ ( _hdIimpModNmL,_hdImodImpL) ->
(case (_hdIimpModNmL ++ _tlIimpModNmL) of
{ _lhsOimpModNmL ->
(case (_hdImodImpL ++ _tlImodImpL) of
{ _lhsOmodImpL ->
( _lhsOimpModNmL,_lhsOmodImpL) }) }) }) })
sem_ImportL_Nil :: T_ImportL
sem_ImportL_Nil =
(case ([]) of
{ _lhsOimpModNmL ->
(case ([]) of
{ _lhsOmodImpL ->
( _lhsOimpModNmL,_lhsOmodImpL) }) })
sem_MbExp :: MbExp ->
T_MbExp
sem_MbExp (Prelude.Just x) =
(sem_MbExp_Just (sem_Exp x))
sem_MbExp Prelude.Nothing =
sem_MbExp_Nothing
type T_MbExp = ( Bool)
sem_MbExp_Just :: T_Exp ->
T_MbExp
sem_MbExp_Just just_ =
(case (True) of
{ _lhsOisJust ->
( _lhsOisJust) })
sem_MbExp_Nothing :: T_MbExp
sem_MbExp_Nothing =
(case (False) of
{ _lhsOisJust ->
( _lhsOisJust) })
sem_Meta :: Meta ->
T_Meta
sem_Meta (Meta_Data _tyNm _dataCons) =
(sem_Meta_Data _tyNm (sem_DataConL _dataCons))
type T_Meta = ( )
sem_Meta_Data :: HsName ->
T_DataConL ->
T_Meta
sem_Meta_Data tyNm_ dataCons_ =
( )
sem_MetaL :: MetaL ->
T_MetaL
sem_MetaL list =
(Prelude.foldr sem_MetaL_Cons sem_MetaL_Nil (Prelude.map sem_Meta list))
type T_MetaL = ( )
sem_MetaL_Cons :: T_Meta ->
T_MetaL ->
T_MetaL
sem_MetaL_Cons hd_ tl_ =
( )
sem_MetaL_Nil :: T_MetaL
sem_MetaL_Nil =
( )
sem_Mod :: Mod ->
T_Mod
sem_Mod (Mod_Mod _ref2nm _moduleNm _moduleNr _stkDepth _imports _exports _metas _binds _mbbody) =
(sem_Mod_Mod _ref2nm _moduleNm _moduleNr _stkDepth (sem_ImportL _imports) (sem_ExportL _exports) (sem_MetaL _metas) _binds (sem_MbExp _mbbody))
type T_Mod = HsName ->
( Bool,([HsName]),(ModImpExp.Mod),HsName)
sem_Mod_Mod :: Ref2Nm ->
HsName ->
(Maybe Int) ->
Int ->
T_ImportL ->
T_ExportL ->
T_MetaL ->
(CRArray Bind) ->
T_MbExp ->
T_Mod
sem_Mod_Mod ref2nm_ moduleNm_ moduleNr_ stkDepth_ imports_ exports_ metas_ binds_ mbbody_ =
(\ _lhsImoduleNm ->
(case (mbbody_) of
{ ( _mbbodyIisJust) ->
(case (_mbbodyIisJust) of
{ _lhsOhasMain ->
(case (imports_) of
{ ( _importsIimpModNmL,_importsImodImpL) ->
(case (_importsIimpModNmL) of
{ _lhsOimpModNmL ->
(case (moduleNm_) of
{ _realModuleNm ->
(case (ModImpExp.Mod
_realModuleNm (Just _realModuleNm) Nothing _importsImodImpL
Rel.empty
Rel.empty
[]) of
{ _lhsOmod ->
(case (_realModuleNm) of
{ _lhsOrealModuleNm ->
( _lhsOhasMain,_lhsOimpModNmL,_lhsOmod,_lhsOrealModuleNm) }) }) }) }) }) }) }))
sem_Pat :: Pat ->
T_Pat
sem_Pat (Pat_Con _tag) =
(sem_Pat_Con _tag)
type T_Pat = ( )
sem_Pat_Con :: Int ->
T_Pat
sem_Pat_Con tag_ =
( )
sem_SExp :: SExp ->
T_SExp
sem_SExp (SExp_Var _ref) =
(sem_SExp_Var _ref)
sem_SExp (SExp_Int _int) =
(sem_SExp_Int _int)
sem_SExp (SExp_Char _char) =
(sem_SExp_Char _char)
sem_SExp (SExp_String _str) =
(sem_SExp_String _str)
sem_SExp (SExp_Integer _integer) =
(sem_SExp_Integer _integer)
sem_SExp (SExp_Dbg _msg) =
(sem_SExp_Dbg _msg)
type T_SExp = ( )
sem_SExp_Var :: RRef ->
T_SExp
sem_SExp_Var ref_ =
( )
sem_SExp_Int :: Int ->
T_SExp
sem_SExp_Int int_ =
( )
sem_SExp_Char :: Char ->
T_SExp
sem_SExp_Char char_ =
( )
sem_SExp_String :: String ->
T_SExp
sem_SExp_String str_ =
( )
sem_SExp_Integer :: Integer ->
T_SExp
sem_SExp_Integer integer_ =
( )
sem_SExp_Dbg :: String ->
T_SExp
sem_SExp_Dbg msg_ =
( )