diff options
Diffstat (limited to 'compiler/deSugar')
| -rw-r--r-- | compiler/deSugar/Desugar.lhs | 9 | ||||
| -rw-r--r-- | compiler/deSugar/DsMeta.hs | 5 |
2 files changed, 9 insertions, 5 deletions
diff --git a/compiler/deSugar/Desugar.lhs b/compiler/deSugar/Desugar.lhs index f49a84c839..29801f28cd 100644 --- a/compiler/deSugar/Desugar.lhs +++ b/compiler/deSugar/Desugar.lhs @@ -13,7 +13,7 @@ import StaticFlags ( opt_SccProfilingOn, opt_AutoSccsOnAllToplevs, opt_AutoSccsOnExportedToplevs ) import DriverPhases ( isHsBoot ) -import HscTypes ( ModGuts(..), HscEnv(..), +import HscTypes ( ModGuts(..), HscEnv(..), availsToNameSet, Dependencies(..), ForeignStubs(..), TypeEnv, IsBootInterface ) import HsSyn ( RuleDecl(..), RuleBndr(..), LHsExpr, LRuleDecl ) import TcRnTypes ( TcGblEnv(..), ImportAvails(..) ) @@ -78,7 +78,8 @@ deSugar hsc_env = do { showPass dflags "Desugar" -- Desugar the program - ; let auto_scc = mkAutoScc mod exports + ; let export_set = availsToNameSet exports + ; let auto_scc = mkAutoScc mod export_set ; mb_res <- case ghcMode dflags of JustTypecheck -> return (Just ([], [], NoStubs)) @@ -96,8 +97,8 @@ deSugar hsc_env { -- Add export flags to bindings keep_alive <- readIORef keep_var - ; let final_prs = addExportFlags ghci_mode exports keep_alive - all_prs ds_rules + ; let final_prs = addExportFlags ghci_mode export_set + keep_alive all_prs ds_rules ds_binds = [Rec final_prs] -- Notice that we put the whole lot in a big Rec, even the foreign binds -- When compiling PrelFloat, which defines data Float = F# Float# diff --git a/compiler/deSugar/DsMeta.hs b/compiler/deSugar/DsMeta.hs index b4ecf01eb5..6c04002558 100644 --- a/compiler/deSugar/DsMeta.hs +++ b/compiler/deSugar/DsMeta.hs @@ -22,7 +22,7 @@ module DsMeta( dsBracket, import {-# SOURCE #-} DsExpr ( dsExpr ) import MatchLit ( dsLit ) -import DsUtils ( mkListExpr, mkStringExpr, mkIntExpr ) +import DsUtils ( mkListExpr, mkStringExpr, mkCoreTup, mkIntExpr ) import DsMonad import qualified Language.Haskell.TH as TH @@ -1306,6 +1306,9 @@ nonEmptyCoreList :: [Core a] -> Core [a] nonEmptyCoreList [] = panic "coreList: empty argument" nonEmptyCoreList xs@(MkC x:_) = MkC (mkListExpr (exprType x) (map unC xs)) +corePair :: (Core a, Core b) -> Core (a,b) +corePair (MkC x, MkC y) = MkC (mkCoreTup [x,y]) + coreStringLit :: String -> DsM (Core String) coreStringLit s = do { z <- mkStringExpr s; return(MkC z) } |
