diff options
-rw-r--r-- | compiler/prelude/TysWiredIn.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T15214.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T15214.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/all.T | 1 |
4 files changed, 10 insertions, 0 deletions
diff --git a/compiler/prelude/TysWiredIn.hs b/compiler/prelude/TysWiredIn.hs index 0817a75898..9ba2f1f45a 100644 --- a/compiler/prelude/TysWiredIn.hs +++ b/compiler/prelude/TysWiredIn.hs @@ -679,6 +679,9 @@ isBuiltInOcc_maybe occ = "[]" -> Just $ choose_ns listTyConName nilDataConName ":" -> Just consDataConName + -- equality tycon + "~" -> Just eqTyConName + -- boxed tuple data/tycon "()" -> Just $ tup_name Boxed 0 _ | Just rest <- "(" `BS.stripPrefix` name diff --git a/testsuite/tests/rename/should_fail/T15214.hs b/testsuite/tests/rename/should_fail/T15214.hs new file mode 100644 index 0000000000..55f15593be --- /dev/null +++ b/testsuite/tests/rename/should_fail/T15214.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE TypeOperators #-} +module T15214 where + +type (~) = Either diff --git a/testsuite/tests/rename/should_fail/T15214.stderr b/testsuite/tests/rename/should_fail/T15214.stderr new file mode 100644 index 0000000000..399438adb5 --- /dev/null +++ b/testsuite/tests/rename/should_fail/T15214.stderr @@ -0,0 +1,2 @@ + +T15214.hs:4:1: error: Illegal binding of built-in syntax: ~ diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T index fb53d3306a..413b24f7d2 100644 --- a/testsuite/tests/rename/should_fail/all.T +++ b/testsuite/tests/rename/should_fail/all.T @@ -130,3 +130,4 @@ test('T13947', normal, compile_fail, ['']) test('T13847', normal, multimod_compile_fail, ['T13847','-v0']) test('T14307', normal, compile_fail, ['']) test('T14591', normal, compile_fail, ['']) +test('T15214', normal, compile_fail, ['']) |