File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ module Data.Thyme.Clock (
4444
4545 -- * Universal Time
4646 , UniversalTime
47+ #if __GLASGOW_HASKELL__ >= 708
48+ , pattern UniversalTime
49+ #endif
4750 , modJulianDate
4851
4952 -- * Compatibility
Original file line number Diff line number Diff line change @@ -252,6 +252,14 @@ modJulianDate = iso
252252 (\ (UniversalRep t) -> toSeconds t / toSeconds posixDayLength)
253253 (UniversalRep . (*^ posixDayLength))
254254
255+ #if __GLASGOW_HASKELL__ >= 710
256+ pattern UniversalTime :: Rational -> UniversalTime
257+ pattern UniversalTime mjd <- (view modJulianDate -> mjd) where
258+ UniversalTime mjd = modJulianDate # mjd
259+ #elif __GLASGOW_HASKELL__ >= 708
260+ pattern UniversalTime mjd <- (view modJulianDate -> mjd)
261+ #endif
262+
255263------------------------------------------------------------------------
256264
257265-- | <https://en.wikipedia.org/wiki/Coordinated_Universal_Time Coördinated universal time>
You can’t perform that action at this time.
0 commit comments