From 937b55549b4ba72b0392d7e139e592a40eec2101 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Apr 2017 09:39:55 -0400 Subject: rename LogMessage to AnyMessage Not related to the Log anymore. --- Types.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Types.hs') diff --git a/Types.hs b/Types.hs index 2dc5d28..75d22cf 100644 --- a/Types.hs +++ b/Types.hs @@ -160,7 +160,7 @@ mkElapsedTime start end = ElapsedTime $ fromRational $ toRational (end - start) instance DataSize ElapsedTime where dataSize _ = 16 -- 128 bit Double -data LogMessage +data AnyMessage = User (Message Seen) | Developer (Message Entered) deriving (Show, Generic) @@ -169,15 +169,15 @@ instance Binary ElapsedTime instance ToJSON ElapsedTime instance FromJSON ElapsedTime -instance DataSize LogMessage where +instance DataSize AnyMessage where dataSize (User a) = dataSize a dataSize (Developer a) = dataSize a -instance Binary LogMessage -instance ToJSON LogMessage where +instance Binary AnyMessage +instance ToJSON AnyMessage where toJSON = genericToJSON sumOptions toEncoding = genericToEncoding sumOptions -instance FromJSON LogMessage where +instance FromJSON AnyMessage where parseJSON = genericParseJSON sumOptions instance Binary Seen -- cgit v1.2.3