summaryrefslogtreecommitdiff
path: root/testsuite/tests/pmcheck/should_compile/T17248.hs
blob: 095153fb08cd71d500b43783f54b338af56dc349 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{-# LANGUAGE BangPatterns #-}
module Lib where

data T1 a = T1 a
newtype T2 a = T2 a

f :: T1 a -> Bool -> ()
f _      True = ()
f (T1 _) True = ()
f _      _    = ()

g :: T2 a -> Bool -> ()
g _      True = ()
g (T2 _) True = () -- redundant
g !_     True = () -- inaccessible
g _      _    = ()