[commit: ghc] ghc-8.2: Document that type holes kill polymorphic recursion (c850aed)

git at git.haskell.org git at git.haskell.org
Wed Aug 2 21:40:44 UTC 2017


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

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/c850aed3221a1811f60a0c794ea813fe1220e55f/ghc

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

commit c850aed3221a1811f60a0c794ea813fe1220e55f
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.
    
    (cherry picked from commit ca471860494484210b6291dd96d1e0868da750e7)


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

c850aed3221a1811f60a0c794ea813fe1220e55f
 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 0b82b3d..3f039a2 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -10151,6 +10151,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