mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-03-30 18:35:49 +00:00
core: fix ghc 8.10.7 import
This commit is contained in:
@@ -37,7 +37,7 @@ import Data.Maybe (fromMaybe, mapMaybe)
|
||||
import Data.String
|
||||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
import Data.Text.Encoding (decodeASCII', decodeLatin1, encodeUtf8)
|
||||
import Data.Text.Encoding (decodeLatin1, encodeUtf8)
|
||||
import Data.Time.Clock (UTCTime)
|
||||
import Data.Type.Equality
|
||||
import Data.Typeable (Typeable)
|
||||
@@ -288,7 +288,7 @@ instance StrEncoding ReportReason where
|
||||
"community" -> pure RRCommunity
|
||||
"profile" -> pure RRProfile
|
||||
"other" -> pure RROther
|
||||
t -> maybe (fail "bad ReportReason") (pure . RRUnknown) $ decodeASCII' t
|
||||
t -> pure $ RRUnknown $ safeDecodeUtf8 t
|
||||
|
||||
instance FromJSON ReportReason where
|
||||
parseJSON = strParseJSON "ReportReason"
|
||||
|
||||
Reference in New Issue
Block a user