diff --git a/compiler/rename/RnTypes.hs b/compiler/rename/RnTypes.hs index 35b67a2fd1b0305ca179f1b93fe447f1ba865e3b..014d4850c85379011aa4c69665610a56f6319534 100644 --- a/compiler/rename/RnTypes.hs +++ b/compiler/rename/RnTypes.hs @@ -1431,8 +1431,9 @@ sectionPrecErr op@(n1,_) arg_op@(n2,_) section nest 4 (text "in the section:" <+> quotes (ppr section))] is_unbound :: OpName -> Bool -is_unbound UnboundOp{} = True -is_unbound _ = False +is_unbound (NormalOp n) = isUnboundName n +is_unbound UnboundOp{} = True +is_unbound _ = False ppr_opfix :: (OpName, Fixity) -> SDoc ppr_opfix (op, fixity) = pp_op <+> brackets (ppr fixity) diff --git a/testsuite/tests/rename/should_fail/T13947.hs b/testsuite/tests/rename/should_fail/T13947.hs new file mode 100644 index 0000000000000000000000000000000000000000..bc435e70eb9add5ac08e559360d24c41d5443fb5 --- /dev/null +++ b/testsuite/tests/rename/should_fail/T13947.hs @@ -0,0 +1,5 @@ +{-# LANGUAGE TypeOperators #-} +module T13947 where + +f :: () -> Int :~: Int +f = undefined diff --git a/testsuite/tests/rename/should_fail/T13947.stderr b/testsuite/tests/rename/should_fail/T13947.stderr new file mode 100644 index 0000000000000000000000000000000000000000..8a636a2bb98789c8dcf217256c7250d037e8f5bd --- /dev/null +++ b/testsuite/tests/rename/should_fail/T13947.stderr @@ -0,0 +1,3 @@ + +T13947.hs:4:12: error: + Not in scope: type constructor or class ‘:~:’ diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T index 457f4010b1273564cd3b87afea9f067bbaa51dfc..f7f77192c846411ed651e40c1d0a21ad842653f2 100644 --- a/testsuite/tests/rename/should_fail/all.T +++ b/testsuite/tests/rename/should_fail/all.T @@ -127,3 +127,4 @@ test('T11592', normal, compile_fail, ['']) test('T12879', normal, compile_fail, ['']) test('T13644', expect_broken(13644), multimod_compile_fail, ['T13644','-v0']) test('T13568', normal, multimod_compile_fail, ['T13568','-v0']) +test('T13947', normal, compile_fail, [''])