aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Main.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Main.hs b/src/Main.hs
index f3de2acd..34c9634a 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -1101,14 +1101,15 @@ funTyConName = mkWiredInName gHC_PRIM
toHsInstHead :: ([TyVar], [PredType], Class, [Type]) -> InstHead2 Name
toHsInstHead (_, preds, cls, ts) = (map toHsPred preds, className cls, map toHsType ts)
+--------------------------------------------------------------------------------
+-- Type -> HsType conversion
+--------------------------------------------------------------------------------
toHsPred :: PredType -> HsPred Name
toHsPred (ClassP cls ts) = HsClassP (className cls) (map toLHsType ts)
toHsPred (IParam n t) = HsIParam n (toLHsType t)
-
toLHsType = noLoc . toHsType
-
toHsType :: Type -> HsType Name
toHsType t = case t of
@@ -1128,7 +1129,6 @@ toHsType t = case t of
cvForAll vs t = mkExplicitHsForAllTy (tyvarbinders vs) (noLoc []) (toLHsType t)
tyvarbinders vs = map (noLoc . UserTyVar . tyVarName) vs
-
-- -----------------------------------------------------------------------------
-- A monad which collects error messages
@@ -1225,6 +1225,7 @@ getPackages session dynflags = do
-- no better way to do this?
notRTS p = pkgName (package p) /= packageIdString rtsPackageId
+ -- try to get a PackageData, warn if we can't
tryGetPackage pkgInfo = do
result <- getPackage session pkgInfo
case result of