summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T3155.hs
blob: 81f8c7d1396440b04feb6eb6529023664191421c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{-# LANGUAGE GADTs, TypeOperators #-}
module T3155 where

-- Test #3155
-- Gave bad error message in GHC 6.10

data Any s where
  Any :: s ix -> ix -> Any s

data AnyR s r where
  AnyR :: s ix -> r ix -> AnyR s r

unR :: (forall ix. r ix -> ix) -> AnyR s r -> Any s
unR f (AnyR ix rix) = Any ix (f rix)