Re-layout validate script
[ghc.git] / testsuite / tests / typecheck / should_fail / tcfail112.hs
1 -- Record construction should fail statically
2 -- if there are any strict fields,
3 -- including in the non-record case.
4
5 module ShouldFail where
6
7 data S = S { x::Int, y:: !Int }
8 data T = T Int !Int
9 data U = U Int Int
10
11 s1 = S {} -- Bad
12 s2 = S { x=3 } -- Bad
13 s3 = S { y=3 } -- Ok
14 t = T {} -- Bad
15 u = U {} -- Ok