blob: 36d16e031f2a8ddd8f813b4f39f9b179c9f32ab6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
{-# LANGUAGE RecordWildCards, RecursiveDo #-}
{-# OPTIONS_GHC -Wno-unused-record-wildcards #-}
module TT where
data T = T {t1, t2 :: Int}
f :: T -> Int
f d = x
where T {t1 = x, ..} = d
g :: T -> Int
g (T {t1 = x, ..}) = x
-- The fix to this test also affected the dorec checking code, hence this:
h :: Maybe Int
h = do
rec
T {t1 = x, ..} <- Just $ T 1 1
return x
|