summaryrefslogtreecommitdiff
path: root/compiler/prelude/TysWiredIn.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2017-09-21 17:35:11 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2017-09-25 11:07:23 +0100
commit3c74a51232813eb733b27c43c94ce005112a0ddb (patch)
tree2b571b2641f76166f74c3c7601d649267387c3d1 /compiler/prelude/TysWiredIn.hs
parentb3ae47caf2f23cfd2c22c29dbfca646493ffe469 (diff)
downloadhaskell-3c74a51232813eb733b27c43c94ce005112a0ddb.tar.gz
Deal with large extra-contraints wildcards
For reasons explained in TcHsType Note [Extra-constraint holes in partial type signatures], if we had f :: (_) => blahs and the '_' was filled in by more than a 62-tuple of contraints, GHC crashed. The same Note explains the hacky solution I have adopted to evade this. Maybe there is some better way, but I couldn't see one that didn't involve a great deal of work. And the problem is a very narrow one! If the hack bites us we'll need to think again.
Diffstat (limited to 'compiler/prelude/TysWiredIn.hs')
-rw-r--r--compiler/prelude/TysWiredIn.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/prelude/TysWiredIn.hs b/compiler/prelude/TysWiredIn.hs
index f4e055f376..01579830f8 100644
--- a/compiler/prelude/TysWiredIn.hs
+++ b/compiler/prelude/TysWiredIn.hs
@@ -621,12 +621,13 @@ Note [How tuples work] See also Note [Known-key names] in PrelNames
- Given constraints: the superclasses automatically become available
- Wanted constraints: there is a built-in instance
instance (c1,c2) => (c1,c2)
- - Currently just go up to 16; beyond that
+ See TcInteract.matchCTuple
+ - Currently just go up to 62; beyond that
you have to use manual nesting
- Their OccNames look like (%,,,%), so they can easily be
distinguished from term tuples. But (following Haskell) we
- pretty-print saturated constraint tuples with round parens; see
- BasicTypes.tupleParens.
+ pretty-print saturated constraint tuples with round parens;
+ see BasicTypes.tupleParens.
* In quite a lot of places things are restrcted just to
BoxedTuple/UnboxedTuple, and then we used BasicTypes.Boxity to distinguish