Commit a1c3ad04 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Add solveLocalEqualities to tcHsPatSigType

This call plain missing, and as a result the casts
messed up deep-skolemisation in tcSubType

Fixes Trac #16033
parent 55717861
......@@ -2323,7 +2323,11 @@ tcHsPatSigType ctxt sig_ty
= addSigCtxt ctxt hs_ty $
do { sig_tkvs <- mapM new_implicit_tv sig_vars
; (wcs, sig_ty)
<- tcWildCardBinders sig_wcs $ \ wcs ->
<- solveLocalEqualities "tcHsPatSigType" $
-- Always solve local equalities if possible,
-- else casts get in the way of deep skolemisation
-- (Trac #16033)
tcWildCardBinders sig_wcs $ \ wcs ->
tcExtendTyVarEnv sig_tkvs $
do { sig_ty <- tcHsOpenType hs_ty
; return (wcs, sig_ty) }
......
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
module T16033 where
f :: (forall x. x -> forall y. y -> c) -> ()
f (_ :: forall a. a -> forall b. b -> c) = ()
......@@ -657,3 +657,4 @@ test('T15645', normal, compile, ['-Wwarn=missing-monadfail-instances'])
test('T15778', normal, compile, [''])
test('T14761c', normal, compile, [''])
test('T16008', normal, compile, [''])
test('T16033', normal, compile, [''])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment