blob: b34e509ecc3b4a5415db668bc7856faa8cc6498b (
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:
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
|