Commit 13fdca3d authored by Simon Peyton Jones's avatar Simon Peyton Jones

Add a missing zonk in TcDerivInfer.simplifyDeriv

I'm astonished that anything worked without this!

Fixes Trac #14339
parent 4bb54a45
......@@ -676,6 +676,8 @@ simplifyDeriv pred tvs thetas
-- Simplify the constraints
; solved_implics <- runTcSDeriveds $ solveWantedsAndDrop
$ unionsWC wanteds
-- It's not yet zonked! Obviously zonk it before peering at it
; solved_implics <- zonkWC solved_implics
-- See [STEP DAC HOIST]
-- Split the resulting constraints into bad and good constraints,
......
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE UndecidableInstances #-}
module Bug where
import GHC.TypeLits
newtype Baz = Baz Foo
deriving Bar
newtype Foo = Foo Int
class Bar a where
bar :: a
instance (TypeError (Text "Boo")) => Bar Foo where
bar = undefined
......@@ -96,3 +96,4 @@ test('T13919', normal, compile, [''])
test('T13998', normal, compile, [''])
test('T14045b', normal, compile, [''])
test('T14094', normal, compile, [''])
test('T14339', 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