summaryrefslogtreecommitdiff
path: root/compiler/iface/BinIface.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-06-22 11:46:03 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2011-06-22 11:46:03 +0100
commita9d48fd94ae92b979610f5efe5d66506928118eb (patch)
treef456de82c3eaa4939e5be2c2fc63c809d3a31514 /compiler/iface/BinIface.hs
parent089cc2928c8c0e8107448e62b29b6392a1abe30f (diff)
downloadhaskell-a9d48fd94ae92b979610f5efe5d66506928118eb.tar.gz
Remove "silent superclass parameters"
We introduced silent superclass parameters as a way to avoid superclass loops, but we now solve that problem a different way ("derived" superclass constraints carry no evidence). So they aren't needed any more. Apart from being a needless complication, they broke DoCon. Admittedly in a very obscure way, but still the result is hard to explain. To see the details see Trac #5051, with test case typecheck/should_compile/T5051. (The test is nice and small!)
Diffstat (limited to 'compiler/iface/BinIface.hs')
-rw-r--r--compiler/iface/BinIface.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/iface/BinIface.hs b/compiler/iface/BinIface.hs
index 0fab2d28c8..1e24f34dd3 100644
--- a/compiler/iface/BinIface.hs
+++ b/compiler/iface/BinIface.hs
@@ -1173,7 +1173,7 @@ instance Binary IfaceBinding where
instance Binary IfaceIdDetails where
put_ bh IfVanillaId = putByte bh 0
put_ bh (IfRecSelId a b) = do { putByte bh 1; put_ bh a; put_ bh b }
- put_ bh (IfDFunId n) = do { putByte bh 2; put_ bh n }
+ put_ bh IfDFunId = putByte bh 2
get bh = do
h <- getByte bh
case h of
@@ -1181,7 +1181,7 @@ instance Binary IfaceIdDetails where
1 -> do a <- get bh
b <- get bh
return (IfRecSelId a b)
- _ -> do { n <- get bh; return (IfDFunId n) }
+ _ -> return IfDFunId
instance Binary IfaceIdInfo where
put_ bh NoInfo = putByte bh 0
@@ -1276,12 +1276,10 @@ instance Binary IfaceUnfolding where
instance Binary (DFunArg IfaceExpr) where
put_ bh (DFunPolyArg e) = putByte bh 0 >> put_ bh e
put_ bh (DFunConstArg e) = putByte bh 1 >> put_ bh e
- put_ bh (DFunLamArg i) = putByte bh 2 >> put_ bh i
get bh = do { h <- getByte bh
; case h of
0 -> do { a <- get bh; return (DFunPolyArg a) }
- 1 -> do { a <- get bh; return (DFunConstArg a) }
- _ -> do { a <- get bh; return (DFunLamArg a) } }
+ _ -> do { a <- get bh; return (DFunConstArg a) } }
instance Binary IfaceNote where
put_ bh (IfaceSCC aa) = do