blob: 434138eb7697f900da870d4e3eed8293f735c102 (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
T10598_TH.hs:(27,3)-(42,50): Splicing declarations
do fooDataName <- newName "Foo"
mkFooConName <- newName "MkFoo"
let fooType = conT fooDataName
sequence
[newtypeD
(cxt [])
fooDataName
[]
Nothing
(normalC
mkFooConName
[bangType
(bang noSourceUnpackedness noSourceStrictness) [t| Int |]])
[derivClause (Just Stock) [[t| Eq |]],
derivClause (Just Anyclass) [[t| C |]],
derivClause (Just Newtype) [[t| Read |]]],
standaloneDerivWithStrategyD
(Just Stock)
(cxt [])
[t| Ord $(fooType) |]
pending(rn) [<splice, fooType>],
standaloneDerivWithStrategyD
(Just Anyclass)
(cxt [])
[t| D $(fooType) |]
pending(rn) [<splice, fooType>],
standaloneDerivWithStrategyD
(Just Newtype)
(cxt [])
[t| Show $(fooType) |]
pending(rn) [<splice, fooType>]]
======>
newtype Foo
= MkFoo Int
deriving stock Eq
deriving anyclass C
deriving newtype Read
deriving stock instance () => Ord Foo
deriving anyclass instance () => D Foo
deriving newtype instance () => Show Foo
|