summaryrefslogtreecommitdiff
path: root/compiler/deSugar/ExtractDocs.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/deSugar/ExtractDocs.hs')
-rw-r--r--compiler/deSugar/ExtractDocs.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/deSugar/ExtractDocs.hs b/compiler/deSugar/ExtractDocs.hs
index 4a5e890553..efea6248b7 100644
--- a/compiler/deSugar/ExtractDocs.hs
+++ b/compiler/deSugar/ExtractDocs.hs
@@ -136,7 +136,8 @@ sigNameNoLoc _ = []
-- Extract the source location where an instance is defined. This is used
-- to correlate InstDecls with their Instance/CoAxiom Names, via the
-- instanceMap.
-getInstLoc :: InstDecl name -> SrcSpan
+getInstLoc :: (XXHsImplicitBndrs name (LHsType name) ~ NoExtCon)
+ => InstDecl name -> SrcSpan
getInstLoc = \case
ClsInstD _ (ClsInstDecl { cid_poly_ty = ty }) -> getLoc (hsSigType ty)
DataFamInstD _ (DataFamInstDecl