summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. ERDI Gergo <gergo@erdi.hu>2014-11-13 17:47:18 +0800
committerDr. ERDI Gergo <gergo@erdi.hu>2014-11-13 23:10:50 +0800
commitde3d584ea43f0f280c5f8fb3d00184a9ffa68a60 (patch)
treef8f5e2e0de3f064724c945ddae9f604a845bb5d7
parenta78ef85fff5e581b1312a3aa5c60b27906e805f7 (diff)
downloadhaskell-wip/T9732.tar.gz
When calling the success continuation of a matcher, pass existential tyvarswip/T9732
as type arguments, not value arguments
-rw-r--r--compiler/typecheck/TcPatSyn.lhs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/typecheck/TcPatSyn.lhs b/compiler/typecheck/TcPatSyn.lhs
index 8ba69fdab4..d6f6817cce 100644
--- a/compiler/typecheck/TcPatSyn.lhs
+++ b/compiler/typecheck/TcPatSyn.lhs
@@ -37,7 +37,6 @@ import Data.Monoid
import Bag
import TcEvidence
import BuildTyCl
-import TypeRep
import Data.Maybe
#include "HsVersions.h"
@@ -139,7 +138,7 @@ tcPatSynMatcher (L loc name) lpat args univ_tvs ex_tvs ev_binds prov_dicts req_d
; let tv_name = mkInternalName uniq (mkTyVarOcc "r") loc
; return $ mkTcTyVar tv_name openTypeKind (SkolemTv False) }
; matcher_name <- newImplicitBinder name mkMatcherOcc
- ; let res_ty = TyVarTy res_tv
+ ; let res_ty = mkTyVarTy res_tv
cont_args = if null args then [voidPrimId] else args
cont_ty = mkSigmaTy ex_tvs prov_theta $
mkFunTys (map varType cont_args) res_ty
@@ -154,7 +153,8 @@ tcPatSynMatcher (L loc name) lpat args univ_tvs ex_tvs ev_binds prov_dicts req_d
; scrutinee <- mkId "scrut" pat_ty
; cont <- mkId "cont" cont_ty
- ; let cont' = nlHsApps cont $ map nlHsVar (ex_tvs ++ prov_dicts ++ cont_args)
+ ; let cont' = nlHsTyApps cont (map mkTyVarTy ex_tvs) $
+ map nlHsVar (prov_dicts ++ cont_args)
; fail <- mkId "fail" fail_ty
; let fail' = nlHsApps fail [nlHsVar voidPrimId]