blob: c1bb4c99f04860061a9e234b9c8beef33d4a46d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
True
type S :: *
data S = MkS {foo :: Int}
-- Defined at <interactive>:3:16
type T :: * -> *
data T a = MkT {foo :: Bool, ...}
-- Defined at <interactive>:4:18
True
<interactive>:1:1: error: [GHC-87543]
Ambiguous occurrence ‘foo’
It could refer to
either the field ‘foo’ of record ‘S’, defined at <interactive>:3:16
or the field ‘foo’ of record ‘T’, defined at <interactive>:4:18
type U :: *
data U = MkU {foo :: Int}
-- Defined at <interactive>:12:16
foo :: U -> Int
42
|