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

-- It's not clear whether this one should succed or fail,
-- Arguably it should succeed because the type refinement on
-- T1 should make (y::Int).  Currently, though, it succeeds

module ShouldFail where

data T a where
  T1 :: Int -> T Int

f :: (T a, a) -> Int
f ~(T1 x, y) = x+y