summaryrefslogtreecommitdiff
path: root/compiler/types/Class.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2016-07-01 22:33:33 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2016-07-05 13:54:54 +0100
commit85aa6ef09346e841abf4e089b24c7f783286cd74 (patch)
tree7ed14c467fb650479acb542d001a74f688948d0e /compiler/types/Class.hs
parente10497b9a3622265b88caa60590ed620ff3d33e2 (diff)
downloadhaskell-85aa6ef09346e841abf4e089b24c7f783286cd74.tar.gz
Check generic-default method for ambiguity
Fixes Trac #7497 and #12151. In some earlier upheaval I introduced a bug in the ambiguity check for genreric-default method. This patch fixes it. But in fixing it I realised that the sourc-location of any such error message was bogus, so I fixed that too, which involved a slightly wider change; see the comments with TcMethInfo.
Diffstat (limited to 'compiler/types/Class.hs')
-rw-r--r--compiler/types/Class.hs10
1 files changed, 1 insertions, 9 deletions
diff --git a/compiler/types/Class.hs b/compiler/types/Class.hs
index a8626db407..169f91d3ba 100644
--- a/compiler/types/Class.hs
+++ b/compiler/types/Class.hs
@@ -10,7 +10,7 @@ module Class (
ClassOpItem,
ClassATItem(..),
ClassMinimalDef,
- DefMethInfo, pprDefMethInfo, defMethSpecOfDefMeth,
+ DefMethInfo, pprDefMethInfo,
FunDep, pprFundeps, pprFunDep,
@@ -110,14 +110,6 @@ data ClassATItem
type ClassMinimalDef = BooleanFormula Name -- Required methods
--- | Convert a `DefMethInfo` to a `DefMethSpec`, which discards the name field in
--- the `DefMeth` constructor of the `DefMeth`.
-defMethSpecOfDefMeth :: DefMethInfo -> Maybe (DefMethSpec Type)
-defMethSpecOfDefMeth meth
- = case meth of
- Nothing -> Nothing
- Just (_, spec) -> Just spec
-
{-
Note [Associated type defaults]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~