summaryrefslogtreecommitdiff
path: root/testsuite/tests/gadt/gadt19.hs
blob: 34b0d291b575bb7b218e3920d5905ab2b58df881 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE GADTs #-}

-- Involves an equality that is not an existential

module Foo2 where

data T t a where
  T :: a -> T () a

foo :: (a -> a) -> T t a -> T t a
foo f (T x) = T (f x)

bar :: T t Int -> T t Int
bar t@(T _) = foo (+1) t