blob: a5538a8723ce0754cbcdb62c226d988981b89afa (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
T8958.hs:2:31: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
TYPE CONSTRUCTORS
newtype Map{2} :: * -> * -> *
roles nominal representational
class Nominal{1} :: * -> Constraint
class Representational{1} :: * -> Constraint
roles representational
COERCION AXIOMS
axiom T8958.N:Map :: Map k v = [(k, v)]
DATA CONSTRUCTORS
MkMap :: forall k v.
(Nominal k, Representational v) =>
[(k, v)] -> Map k v
CLASS INSTANCES
instance [incoherent] Representational a
-- Defined at T8958.hs:11:10
instance [incoherent] Nominal a -- Defined at T8958.hs:8:10
Dependent modules: []
Dependent packages: [base-4.17.0.0]
==================== Typechecker ====================
T8958.$tcMap
= GHC.Types.TyCon
16542473435673943392##64 5374201132143305512##64 T8958.$trModule
(GHC.Types.TrNameS "Map"#) 0# GHC.Types.krep$*->*->*
T8958.$tc'MkMap
= GHC.Types.TyCon
2942839876828444488##64 3989137838066763457##64 T8958.$trModule
(GHC.Types.TrNameS "'MkMap"#) 2# $krep
T8958.$tcRepresentational
= GHC.Types.TyCon
12809567151893673426##64 12159693688248149156##64 T8958.$trModule
(GHC.Types.TrNameS "Representational"#) 0# $krep
T8958.$tc'C:Representational
= GHC.Types.TyCon
2358772282532242424##64 5444038897914446879##64 T8958.$trModule
(GHC.Types.TrNameS "'C:Representational"#) 1# $krep
T8958.$tcNominal
= GHC.Types.TyCon
12224997609886144634##64 9866011944332051160##64 T8958.$trModule
(GHC.Types.TrNameS "Nominal"#) 0# $krep
T8958.$tc'C:Nominal
= GHC.Types.TyCon
10562260635335201742##64 1215478186250709459##64 T8958.$trModule
(GHC.Types.TrNameS "'C:Nominal"#) 1# $krep
$krep [InlPrag=[~]] = GHC.Types.KindRepVar 0
$krep [InlPrag=[~]] = GHC.Types.KindRepVar 1
$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep
$krep [InlPrag=[~]]
= GHC.Types.KindRepFun GHC.Types.krep$* GHC.Types.krep$Constraint
$krep [InlPrag=[~]]
= GHC.Types.KindRepTyConApp
GHC.Tuple.Prim.$tc(,)
((:) @GHC.Types.KindRep
$krep ((:) @GHC.Types.KindRep $krep [] @GHC.Types.KindRep))
$krep [InlPrag=[~]]
= GHC.Types.KindRepTyConApp
T8958.$tcMap
((:) @GHC.Types.KindRep
$krep ((:) @GHC.Types.KindRep $krep [] @GHC.Types.KindRep))
$krep [InlPrag=[~]]
= GHC.Types.KindRepTyConApp
GHC.Types.$tcList
((:) @GHC.Types.KindRep $krep [] @GHC.Types.KindRep)
$krep [InlPrag=[~]]
= GHC.Types.KindRepTyConApp
T8958.$tcRepresentational
((:) @GHC.Types.KindRep $krep [] @GHC.Types.KindRep)
$krep [InlPrag=[~]]
= GHC.Types.KindRepTyConApp
T8958.$tcNominal
((:) @GHC.Types.KindRep $krep [] @GHC.Types.KindRep)
T8958.$trModule
= GHC.Types.Module
(GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "T8958"#)
AbsBinds [a] []
{Exports: [T8958.$fRepresentationala <= $dRepresentational
wrap: <>]
Exported types: T8958.$fRepresentationala [InlPrag=CONLIKE]
:: forall a. Representational a
[LclIdX[DFunId],
Unf=DFun: \ (@a) -> T8958.C:Representational TYPE: a]
Binds: $dRepresentational = T8958.C:Representational @a
Evidence: [EvBinds{}]}
AbsBinds [a] []
{Exports: [T8958.$fNominala <= $dNominal
wrap: <>]
Exported types: T8958.$fNominala [InlPrag=CONLIKE]
:: forall a. Nominal a
[LclIdX[DFunId], Unf=DFun: \ (@a) -> T8958.C:Nominal TYPE: a]
Binds: $dNominal = T8958.C:Nominal @a
Evidence: [EvBinds{}]}
T8958.hs:14:54: warning: [-Wsimplifiable-class-constraints (in -Wdefault)]
• The constraint ‘Representational v’ matches
instance Representational a -- Defined at T8958.hs:11:10
This makes type inference for inner bindings fragile;
either use MonoLocalBinds, or simplify it using the instance
• In the definition of data constructor ‘MkMap’
In the newtype declaration for ‘Map’
T8958.hs:14:54: warning: [-Wsimplifiable-class-constraints (in -Wdefault)]
• The constraint ‘Nominal k’ matches
instance Nominal a -- Defined at T8958.hs:8:10
This makes type inference for inner bindings fragile;
either use MonoLocalBinds, or simplify it using the instance
• In the definition of data constructor ‘MkMap’
In the newtype declaration for ‘Map’
|