Skip to content

Commit

Permalink
Sneaky bug in Eq instance definition that made Decompilation nontermi…
Browse files Browse the repository at this point in the history
…nating
  • Loading branch information
zoep committed Dec 14, 2024
1 parent 17fae59 commit 6bbf502
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Act/Syntax/TimeAgnostic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ data Ref (k :: RefKind) (t :: Timing) where
deriving instance Show (Ref k t)

instance Eq (Ref k t) where
CVar _ at x == CVar _ at' x' = at == at' && x == x'
SVar _ c x == SVar _ c' x' = c == c' && x == x'
SMapping _ r ixs == SMapping _ r' ixs' = r == r' && ixs == ixs'
SField _ r c x == SField _ r' c' x' = r == r' && c == c' && x == x'
Expand Down Expand Up @@ -367,6 +368,7 @@ instance Timable (Exp a) where
go :: Timable c => c Untimed -> c Timed
go = setTime time


instance Timable (TItem a k) where
setTime time (Item t vt ref) = Item t vt $ setTime time ref

Expand Down

0 comments on commit 6bbf502

Please sign in to comment.