summaryrefslogtreecommitdiff
path: root/testsuite/tests/gadt/lazypatok.hs
blob: 44fae2fa10a26d8a47262d769dca278b73d7845d (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 succeed or fail,
-- Arguably it should succeed because the type refinement on
-- T1 should make (y::Int).  Currently, though, it fails.

module ShouldFail where

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

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