Commit 45d825bb authored by Simon Peyton Jones's avatar Simon Peyton Jones

Add an expect-broken test for Trac #8566

parent 98db754a
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
module T8566a where
data Field = forall k. APP k [Field]
data InField (u :: Field) :: * where
A :: AppVars t (ExpandField args) -> InField (APP t args)
type family ExpandField (args :: [Field]) :: [*]
type family AppVars (t :: k) (vs :: [*]) :: *
-- This function fails to compile, because we discard
-- 'given' kind equalities. See comment 7 in Trac #8566
-- This is really a bug, I claim
unA :: InField (APP t args) -> AppVars t (ExpandField args)
unA (A x) = x
......@@ -96,3 +96,4 @@ test('T8449', normal, run_command, ['$MAKE -s --no-print-directory T8449'])
test('T8534', normal, compile, [''])
test('T8566', normal, compile_fail,[''])
test('T8616', normal, compile_fail,[''])
test('T8566a', expect_broken(8566), 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