File tree 1 file changed +11
-8
lines changed
1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,6 @@ debugPropagate :: Bool
34
34
35
35
debugInvalidateHeight :: Bool
36
36
37
- class HasNodeId a where
38
- getNodeId :: a -> Int
39
-
40
- showNodeId :: HasNodeId a => a -> String
41
- showNodeId = (" #" <> ) . show . getNodeId
42
-
43
37
#ifdef DEBUG
44
38
45
39
#define DEBUG_NODEIDS
@@ -48,6 +42,9 @@ debugPropagate = True
48
42
49
43
debugInvalidateHeight = True
50
44
45
+ class HasNodeId a where
46
+ getNodeId :: a -> Int
47
+
51
48
instance HasNodeId (Hold a ) where
52
49
getNodeId = holdNodeId
53
50
@@ -66,14 +63,20 @@ instance HasNodeId (FanSubscribed a) where
66
63
instance HasNodeId (CoincidenceSubscribed a ) where
67
64
getNodeId = coincidenceSubscribedNodeId
68
65
66
+ instance HasNodeId (RootSubscribed a ) where
67
+ getNodeId = rootSubscribedNodeId
68
+
69
+ showNodeId :: HasNodeId a => a -> String
70
+ showNodeId = (" #" <> ) . show . getNodeId
71
+
69
72
#else
70
73
71
74
debugPropagate = False
72
75
73
76
debugInvalidateHeight = False
74
77
75
- instance HasNodeId a where
76
- getNodeId = const " "
78
+ showNodeId :: a -> String
79
+ showNodeId = const " "
77
80
78
81
#endif
79
82
You can’t perform that action at this time.
0 commit comments