Skip to content
Snippets Groups Projects
Commit 21e9d4f5 authored by Ryan Scott's avatar Ryan Scott Committed by Ben Gamari
Browse files

Fix #15214 by listing (~) in isBuiltInOcc_maybe

This changes an obscure error (which mistakenly mentions
Template Haskell) to one that makes more sense.

Test Plan: make test TEST=T15214

Reviewers: bgamari, mpickering

Reviewed By: bgamari, mpickering

Subscribers: mpickering, rwbarton, thomie, carter

GHC Trac Issues: #15214

Differential Revision: https://phabricator.haskell.org/D4768
parent 18cb4f5e
No related merge requests found
......@@ -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
......
{-# LANGUAGE TypeOperators #-}
module T15214 where
type (~) = Either
T15214.hs:4:1: error: Illegal binding of built-in syntax: ~
......@@ -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, [''])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment