[commit: ghc] wip/rae: Document that type holes kill polymorphic recursion (1076173)

git at git.haskell.org git at git.haskell.org
Wed Jul 26 14:10:43 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/rae
Link       : http://ghc.haskell.org/trac/ghc/changeset/10761735d742f4af76058a2cf7e0fe98952a0190/ghc

>---------------------------------------------------------------

commit 10761735d742f4af76058a2cf7e0fe98952a0190
Author: Richard Eisenberg <rae at cs.brynmawr.edu>
Date:   Tue Jul 18 15:55:21 2017 -0400

    Document that type holes kill polymorphic recursion
    
    This "fixes" #11995.


>---------------------------------------------------------------

10761735d742f4af76058a2cf7e0fe98952a0190
 docs/users_guide/glasgow_exts.rst | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index 7fc075a..b0da2891 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -10290,6 +10290,10 @@ warnings instead of errors. Additionally, these warnings can be silenced
 with the :ghc-flag:`-Wno-partial-type-signatures <-Wpartial-type-signatures>`
 flag.
 
+However, because GHC must *infer* the type when part of a type is left
+out, it is unable to use polymorphic recursion. The same restriction
+takes place when the type signature is omitted completely.
+
 .. _pts-syntax:
 
 Syntax



More information about the ghc-commits mailing list