Skip to content

Commit 6bbf502

Browse files
committed
Sneaky bug in Eq instance definition that made Decompilation nonterminating
1 parent 17fae59 commit 6bbf502

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Act/Syntax/TimeAgnostic.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ data Ref (k :: RefKind) (t :: Timing) where
186186
deriving instance Show (Ref k t)
187187

188188
instance Eq (Ref k t) where
189+
CVar _ at x == CVar _ at' x' = at == at' && x == x'
189190
SVar _ c x == SVar _ c' x' = c == c' && x == x'
190191
SMapping _ r ixs == SMapping _ r' ixs' = r == r' && ixs == ixs'
191192
SField _ r c x == SField _ r' c' x' = r == r' && c == c' && x == x'
@@ -367,6 +368,7 @@ instance Timable (Exp a) where
367368
go :: Timable c => c Untimed -> c Timed
368369
go = setTime time
369370

371+
370372
instance Timable (TItem a k) where
371373
setTime time (Item t vt ref) = Item t vt $ setTime time ref
372374

0 commit comments

Comments
 (0)