Skip to content

Commit

Permalink
removing a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Feb 6, 2023
1 parent 70119c1 commit d9a18cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fast-logger/System/Log/FastLogger/LogStr.hs
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ data LogStr = LogStr !Int Builder
instance Semi.Semigroup LogStr where
{-# INLINE (<>) #-}
LogStr s1 b1 <> LogStr s2 b2 = LogStr (s1 + s2) (b1 <> b2)
#endif

instance Monoid LogStr where
mempty = LogStr 0 (toBuilder BS.empty)
#else
instance Monoid LogStr where
mempty = LogStr 0 (toBuilder BS.empty)
{-# INLINE mappend #-}
LogStr s1 b1 `mappend` LogStr s2 b2 = LogStr (s1 + s2) (b1 <> b2)
#endif

instance IsString LogStr where
{-# INLINE fromString #-}
Expand Down

0 comments on commit d9a18cb

Please sign in to comment.