blob: 01dd578ab76a61628301d6150582d6c1face61b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
-- Record construction should fail statically
-- if there are any strict fields,
-- including in the non-record case.
module ShouldFail where
data S = S { x::Int, y:: ! Int }
data T = T Int !Int
data U = U Int Int
s1 = S {} -- Bad
s2 = S { x=3 } -- Bad
s3 = S { y=3 } -- Ok
t = T {} -- Bad
u = U {} -- Ok
|