Skip to content

Commit f8f9baf

Browse files
committed
fix compatibility on GHC < 8.10
1 parent c2ea38d commit f8f9baf

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Data/Thyme/Format.hs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
{-# LANGUAGE RecordWildCards #-}
44
{-# LANGUAGE StandaloneDeriving #-}
55
{-# LANGUAGE ViewPatterns #-}
6-
{-# OPTIONS_GHC -fno-warn-orphans -Wno-unused-record-wildcards #-}
6+
{-# OPTIONS_GHC -fno-warn-orphans #-}
7+
#if __GLASGOW_HASKELL__ >= 810
8+
{-# OPTIONS_GHC -Wno-unused-record-wildcards #-}
9+
#endif
710

811
#include "thyme.h"
912

@@ -285,7 +288,7 @@ showsY = showsYear
285288

286289
instance FormatTime TimeOfDay where
287290
{-# INLINEABLE showsTime #-}
288-
showsTime TimeLocale {..} (TimeOfDay h m (DiffTime s)) = \ def c -> case c of
291+
showsTime TimeLocale{..} (TimeOfDay h m (DiffTime s)) = \ def c -> case c of
289292
-- aggregate
290293
'R' -> shows02 h . (:) ':' . shows02 m
291294
'T' -> shows02 h . (:) ':' . shows02 m . (:) ':' . shows02 si
@@ -839,7 +842,7 @@ instance ParseTime LocalTime where
839842

840843
instance ParseTime Day where
841844
{-# INLINE buildTime #-}
842-
buildTime tp@TimeParse {..}
845+
buildTime tp
843846
| tp ^. flag IsOrdinalDate = ordinalDate # buildTime tp
844847
| tp ^. flag IsGregorian = gregorian # buildTime tp
845848
| tp ^. flag IsWeekDate = weekDate # buildTime tp

0 commit comments

Comments
 (0)