Commit 93e65c8a authored by Edward Z. Yang's avatar Edward Z. Yang Committed by Ben Gamari
Browse files

Don't warn about missing methods for instances in signatures.

Test Plan: validate

Reviewers: bgamari, austin, dfeuer

Reviewed By: dfeuer

Subscribers: dfeuer, thomie

Differential Revision: https://phabricator.haskell.org/D3134
parent f90e61ad
......@@ -516,7 +516,9 @@ warnMissingAT :: Name -> TcM ()
warnMissingAT name
= do { warn <- woptM Opt_WarnMissingMethods
; traceTc "warn" (ppr name <+> ppr warn)
; warnTc (Reason Opt_WarnMissingMethods) warn -- Warn only if -Wmissing-methods
; hsc_src <- fmap tcg_src getGblEnv
-- Warn only if -Wmissing-methods AND not a signature
; warnTc (Reason Opt_WarnMissingMethods) (warn && hsc_src /= HsigFile)
(text "No explicit" <+> text "associated type"
<+> text "or default declaration for "
<+> quotes (ppr name)) }
......@@ -43,6 +43,7 @@ test('bkp48', normal, backpack_compile, [''])
test('bkp49', normal, backpack_compile, [''])
test('bkp50', normal, backpack_compile, [''])
test('bkp51', normal, backpack_compile, [''])
test('bkp52', normal, backpack_compile, [''])
test('T13149', expect_broken(13149), backpack_compile, [''])
test('T13214', normal, backpack_compile, [''])
{-# LANGUAGE TypeFamilies #-}
unit p where
module M where
class F a where
type T a :: *
unit q where
dependency p
signature A where
import M
instance F Int
[1 of 2] Processing p
Instantiating p
[1 of 1] Compiling M ( p/M.hs, bkp52.out/p/M.o )
[2 of 2] Processing q
[1 of 1] Compiling A[sig] ( q/A.hsig, nothing )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment