[commit: ghc] wip/spj-wildcard-refactor: More progress (b1d372a)

git at git.haskell.org git at git.haskell.org
Sat Oct 31 22:16:03 UTC 2015


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

On branch  : wip/spj-wildcard-refactor
Link       : http://ghc.haskell.org/trac/ghc/changeset/b1d372a627c6c9527c9da12ce049c4ec98a3f6de/ghc

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

commit b1d372a627c6c9527c9da12ce049c4ec98a3f6de
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Sat Oct 31 22:15:40 2015 +0000

    More progress
    
    Update haddock submodule


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

b1d372a627c6c9527c9da12ce049c4ec98a3f6de
 compiler/typecheck/TcExpr.hs | 12 ++++++------
 utils/haddock                |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/compiler/typecheck/TcExpr.hs b/compiler/typecheck/TcExpr.hs
index 7ed0cf1..3c8a6ee 100644
--- a/compiler/typecheck/TcExpr.hs
+++ b/compiler/typecheck/TcExpr.hs
@@ -973,7 +973,7 @@ tcApp (L loc (HsVar fun)) args res_ty
 -- with type signatures, see Note [Disambiguating record fields]
 tcApp (L loc (HsRecFld (Ambiguous lbl _))) args@(L _ arg:_) res_ty
   | Just sig_ty <- obviousSig arg
-  = do { sig_tc_ty <- tcHsSigType ExprSigCtxt sig_ty
+  = do { sig_tc_ty <- tcHsSigWcType ExprSigCtxt sig_ty
        ; sel_name <- disambiguateSelector lbl sig_tc_ty
        ; tcApp (L loc (HsRecFld (Unambiguous lbl sel_name))) args res_ty }
 
@@ -1645,7 +1645,7 @@ disambiguateRecordBinds record_expr record_tau rbnds res_ty
         -- If so, try to extract a parent TyCon from it
             | Just {} <- obviousSig (unLoc record_expr)
             , Just tc <- tyConOf fam_inst_envs record_tau
-            -> RecSelData tc
+            -> return (RecSelData tc)
 
         -- Nothing else we can try...
         _ -> failWithTc badOverloadedUpdate
@@ -1711,10 +1711,10 @@ lookupParents rdr
 -- A type signature on the argument of an ambiguous record selector or
 -- the record expression in an update must be "obvious", i.e. the
 -- outermost constructor ignoring parentheses.
-obviousSig :: HsExpr Name -> Maybe (LHsType Name)
-obviousSig (ExprWithTySig _ ty _) = Just ty
-obviousSig (HsPar p)              = obviousSig (unLoc p)
-obviousSig _                      = Nothing
+obviousSig :: HsExpr Name -> Maybe (LHsSigWcType Name)
+obviousSig (ExprWithTySig _ ty) = Just ty
+obviousSig (HsPar p)            = obviousSig (unLoc p)
+obviousSig _                    = Nothing
 
 
 {-
diff --git a/utils/haddock b/utils/haddock
index b2d4b23..0413c54 160000
--- a/utils/haddock
+++ b/utils/haddock
@@ -1 +1 @@
-Subproject commit b2d4b230c2446d241fd8730cd158e4fe6b7305df
+Subproject commit 0413c544b60c063ef286777d3008c4e33b4afbcd



More information about the ghc-commits mailing list