blob: d8045484802e887b75d10fd0874bb843ce2740e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
-- The original test case for #12957
module T12957a where
data T = A | B
data Fields (t :: T) where
BFields :: { list :: [()] } -> Fields 'B
AFields :: Fields 'A
EmptyFields :: Fields t
emptyA :: Fields 'A
emptyA = AFields
data S t = S { sFields :: Fields t }
f :: () -> S 'A
f a = (S EmptyFields) { sFields = emptyA { list = [ a ] } }
|