Commit 6b7bad92 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Test Trac #10931

parent e737a512
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE RankNTypes #-}
{-# OPTIONS_GHC -Wall #-}
module T10931 ( BugC(..) ) where
data IdT f a = IdC (f a)
class ( m ~ Outer m (Inner m) ) => BugC (m :: * -> *) where
type Inner m :: * -> *
type Outer m :: (* -> *) -> * -> *
bug :: ( forall n. ( n ~ Outer n (Inner n)
, Outer n ~ Outer m
)
=> Inner n a)
-> m a
instance BugC (IdT m) where
type Inner (IdT m) = m
type Outer (IdT m) = IdT
bug f = IdC f
......@@ -264,3 +264,4 @@ test('T10713', normal, compile, [''])
test('T10753', normal, compile, [''])
test('T10806', normal, compile_fail, [''])
test('T10815', normal, compile, [''])
test('T10931', 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