Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide Data.Time.Format.Internal module #268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/main/Test/Format/ISO8601.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ module Test.Format.ISO8601 (
testISO8601,
) where

import Data.Coerce
import Data.Ratio
import Data.Time
import Data.Time.Format.ISO8601
import Data.Time.Format.Internal
import Test.Arbitrary ()
import Test.QuickCheck.Property
import Test.Tasty
Expand Down Expand Up @@ -57,7 +57,7 @@ readShowTestsCheck skip fmts = readBoth $ \fe -> readShowTestCheck skip $ fmts f
readShowTests :: (Eq a, Show a, Arbitrary a, SpecialTestValues a) => (FormatExtension -> Format a) -> [TestTree]
readShowTests = readShowTestsCheck $ \_ -> False

newtype Durational t = MkDurational {unDurational :: t}
newtype Durational t = MkDurational t
deriving (Eq)

instance Show t => Show (Durational t) where
Expand All @@ -81,7 +81,7 @@ instance Arbitrary (Durational CalendarDiffTime) where
return $ MkDurational $ CalendarDiffTime mm $ fromRational $ ss % picofactor

durationalFormat :: Format a -> Format (Durational a)
durationalFormat (MkFormat sa ra) = MkFormat (\b -> sa $ unDurational b) (fmap MkDurational ra)
durationalFormat = coerce

testReadShowFormat :: TestTree
testReadShowFormat =
Expand Down
2 changes: 1 addition & 1 deletion time.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ library
Data.Time.Clock.TAI,
Data.Time.LocalTime,
Data.Time.Format,
Data.Time.Format.Internal,
Data.Time.Format.ISO8601,
Data.Time
other-modules:
Expand All @@ -85,6 +84,7 @@ library
Data.Time.Calendar.Private,
Data.Time.Calendar.Types,
Data.Time.Calendar.Week,
Data.Time.Format.Internal,
Data.Time.Clock.Internal.DiffTime,
Data.Time.Clock.Internal.AbsoluteTime,
Data.Time.Clock.Internal.NominalDiffTime,
Expand Down
Loading