Skip to content

Commit

Permalink
add Eq Report
Browse files Browse the repository at this point in the history
  • Loading branch information
tek committed Oct 9, 2023
1 parent 0beacf8 commit e16fb14
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/host/lib/Ribosome/Host/Data/Report.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,14 @@ data Report where
severity :: !Severity
} -> Report

instance Eq Report where
Report luser llog lseverity == Report ruser rlog rseverity =
luser == ruser && llog == rlog && lseverity == rseverity

instance Show Report where
showsPrec d Report {..} =
showParen (d > 10)
[exon|LogReport { user = #{showsPrec 11 user}, log = #{showsPrec 11 log}, severity = #{showsPrec 11 severity} }|]
[exon|Report { user = #{showsPrec 11 user}, log = #{showsPrec 11 log}, severity = #{showsPrec 11 severity} }|]

instance IsString Report where
fromString (toText -> s) =
Expand Down

0 comments on commit e16fb14

Please sign in to comment.