aboutsummaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authordavve <davve@dtek.chalmers.se>2006-09-18 22:17:11 +0000
committerdavve <davve@dtek.chalmers.se>2006-09-18 22:17:11 +0000
commit1a52d1b4ce943627f0f1bcd49e08c1cb5518ce66 (patch)
treeafef35d7120005f11a7b33d26f980464ad1d7bea /src/Main.hs
parent06aaa77949c2c12b87e47baac85ef181a6930e17 (diff)
Comments and spacing change
Diffstat (limited to 'src/Main.hs')
-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