[commit: ghc] master: No need to check ambiguity for visible type args (959a623)

git at git.haskell.org git at git.haskell.org
Thu Sep 14 09:12:37 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/959a623e29309fbd4f206432ba534177ec804e18/ghc

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

commit 959a623e29309fbd4f206432ba534177ec804e18
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Aug 25 18:14:16 2017 +0100

    No need to check ambiguity for visible type args
    
    Seems unnecesarry to me.


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

959a623e29309fbd4f206432ba534177ec804e18
 compiler/typecheck/TcValidity.hs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/compiler/typecheck/TcValidity.hs b/compiler/typecheck/TcValidity.hs
index 65c7afd..fdff7e9 100644
--- a/compiler/typecheck/TcValidity.hs
+++ b/compiler/typecheck/TcValidity.hs
@@ -225,6 +225,7 @@ wantAmbiguityCheck ctxt
   = case ctxt of  -- See Note [When we don't check for ambiguity]
       GhciCtxt     -> False
       TySynCtxt {} -> False
+      TypeAppCtxt  -> False
       _            -> True
 
 checkUserTypeError :: Type -> TcM ()
@@ -269,6 +270,10 @@ In a few places we do not want to check a user-specified type for ambiguity
   from doing an ambiguity check on a type with TyVars in it.  Fixing this
   would not be hard, but let's wait till there's a reason.
 
+* TypeAppCtxt: visible type application
+     f @ty
+  No need to check ty for ambiguity
+
 
 ************************************************************************
 *                                                                      *



More information about the ghc-commits mailing list