[commit: packages/time] master, wip/travis: move parsing and formatting into new module (48535e6)
git at git.haskell.org
git at git.haskell.org
Sat May 7 06:44:46 UTC 2016
Repository : ssh://git@git.haskell.org/time
On branches: master,wip/travis
Link : http://git.haskell.org/packages/time.git/commitdiff/48535e6a2a85ec5545a1ff30d9f27087108bbc57
>---------------------------------------------------------------
commit 48535e6a2a85ec5545a1ff30d9f27087108bbc57
Author: Ashley Yakeley <ashley at semantic.org>
Date: Tue Feb 13 19:59:07 2007 -0800
move parsing and formatting into new module
darcs-hash:20070214035907-ac6dd-25a86dd8e9d5313cc998c300f9c524d4652749bf
>---------------------------------------------------------------
48535e6a2a85ec5545a1ff30d9f27087108bbc57
Data/Time.hs | 4 +++-
Data/Time/{LocalTime => }/Format.hs | 11 +++++------
Data/Time/{LocalTime => Format}/Parse.hs | 11 ++++-------
Data/Time/LocalTime.hs | 6 +-----
test/TestEaster.hs | 2 +-
time.cabal | 4 ++--
time.xcodeproj/project.pbxproj | 12 ++++++++++--
7 files changed, 26 insertions(+), 24 deletions(-)
diff --git a/Data/Time.hs b/Data/Time.hs
index 65926cd..4167ec6 100644
--- a/Data/Time.hs
+++ b/Data/Time.hs
@@ -4,9 +4,11 @@ module Data.Time
(
module Data.Time.Calendar,
module Data.Time.Clock,
- module Data.Time.LocalTime
+ module Data.Time.LocalTime,
+ module Data.Time.Format
) where
import Data.Time.Calendar
import Data.Time.Clock
import Data.Time.LocalTime
+import Data.Time.Format
diff --git a/Data/Time/LocalTime/Format.hs b/Data/Time/Format.hs
similarity index 97%
rename from Data/Time/LocalTime/Format.hs
rename to Data/Time/Format.hs
index 61a4e90..64f73ef 100644
--- a/Data/Time/LocalTime/Format.hs
+++ b/Data/Time/Format.hs
@@ -1,15 +1,14 @@
{-# OPTIONS -Wall -Werror #-}
--- #hide
-module Data.Time.LocalTime.Format
+module Data.Time.Format
(
-- * UNIX-style formatting
- module Data.Time.LocalTime.Format
+ module Data.Time.Format,
+ module Data.Time.Format.Parse
) where
-import Data.Time.LocalTime.LocalTime
-import Data.Time.LocalTime.TimeOfDay
-import Data.Time.LocalTime.TimeZone
+import Data.Time.Format.Parse
+import Data.Time.LocalTime
import Data.Time.Calendar.WeekDate
import Data.Time.Calendar.OrdinalDate
import Data.Time.Calendar
diff --git a/Data/Time/LocalTime/Parse.hs b/Data/Time/Format/Parse.hs
similarity index 98%
rename from Data/Time/LocalTime/Parse.hs
rename to Data/Time/Format/Parse.hs
index 605eee9..bee16e8 100644
--- a/Data/Time/LocalTime/Parse.hs
+++ b/Data/Time/Format/Parse.hs
@@ -1,7 +1,7 @@
{-# OPTIONS -Wall -Werror #-}
-- #hide
-module Data.Time.LocalTime.Parse
+module Data.Time.Format.Parse
(
-- * UNIX-style parsing
parseTime, readTime, readsTime,
@@ -9,14 +9,11 @@ module Data.Time.LocalTime.Parse
) where
import Data.Time.Clock.POSIX
-import Data.Time.Clock.UTC
-import Data.Time.Calendar.Days
-import Data.Time.Calendar.Gregorian
+import Data.Time.Clock
+import Data.Time.Calendar
import Data.Time.Calendar.OrdinalDate
import Data.Time.Calendar.WeekDate
-import Data.Time.LocalTime.LocalTime
-import Data.Time.LocalTime.TimeOfDay
-import Data.Time.LocalTime.TimeZone
+import Data.Time.LocalTime
import Control.Monad
import Data.Char
diff --git a/Data/Time/LocalTime.hs b/Data/Time/LocalTime.hs
index a5e2943..5676b58 100644
--- a/Data/Time/LocalTime.hs
+++ b/Data/Time/LocalTime.hs
@@ -4,13 +4,9 @@ module Data.Time.LocalTime
(
module Data.Time.LocalTime.TimeZone,
module Data.Time.LocalTime.TimeOfDay,
- module Data.Time.LocalTime.LocalTime,
- module Data.Time.LocalTime.Format,
- module Data.Time.LocalTime.Parse
+ module Data.Time.LocalTime.LocalTime
) where
import Data.Time.LocalTime.TimeZone
import Data.Time.LocalTime.TimeOfDay
import Data.Time.LocalTime.LocalTime
-import Data.Time.LocalTime.Format
-import Data.Time.LocalTime.Parse
diff --git a/test/TestEaster.hs b/test/TestEaster.hs
index 86a3318..290c066 100644
--- a/test/TestEaster.hs
+++ b/test/TestEaster.hs
@@ -4,7 +4,7 @@ module Main where
import Data.Time.Calendar.Easter
import Data.Time.Calendar
-import Data.Time.LocalTime
+import Data.Time.Format
import System.Locale
diff --git a/time.cabal b/time.cabal
index a4fae43..c45da8c 100644
--- a/time.cabal
+++ b/time.cabal
@@ -20,6 +20,7 @@ Exposed-Modules:
Data.Time.Clock.POSIX,
Data.Time.Clock.TAI,
Data.Time.LocalTime,
+ Data.Time.Format,
Data.Time
Extensions: ForeignFunctionInterface, CPP
C-Sources: cbits/HsTime.c
@@ -35,8 +36,7 @@ Other-Modules:
Data.Time.LocalTime.TimeZone,
Data.Time.LocalTime.TimeOfDay,
Data.Time.LocalTime.LocalTime,
- Data.Time.LocalTime.Format,
- Data.Time.LocalTime.Parse
+ Data.Time.Format.Parse
Extra-Source-Files:
aclocal.m4 configure.ac configure
include/HsTime.h include/HsTimeConfig.h.in
diff --git a/time.xcodeproj/project.pbxproj b/time.xcodeproj/project.pbxproj
index ee8c7d6..e7fab3a 100644
--- a/time.xcodeproj/project.pbxproj
+++ b/time.xcodeproj/project.pbxproj
@@ -130,6 +130,8 @@
ABD6783C0841677900CF37C0 /* Clock */,
AB01DCFD08374838003C9EF7 /* Clock.hs */,
AB2666A808A56FE30059DEC0 /* LocalTime */,
+ ABD4B1320B82BCA100CEB254 /* Format */,
+ AB01DD13083748EC003C9EF7 /* Format.hs */,
AB2666E808A571460059DEC0 /* LocalTime.hs */,
);
path = Time;
@@ -157,8 +159,6 @@
AB01DD18083748EC003C9EF7 /* TimeZone.hs */,
AB01DD17083748EC003C9EF7 /* TimeOfDay.hs */,
AB01DD12083748EC003C9EF7 /* LocalTime.hs */,
- AB01DD13083748EC003C9EF7 /* Format.hs */,
- ABD6AC650B2D52D400843342 /* Parse.hs */,
);
path = LocalTime;
sourceTree = "<group>";
@@ -197,6 +197,14 @@
name = "GHC stuff";
sourceTree = "<group>";
};
+ ABD4B1320B82BCA100CEB254 /* Format */ = {
+ isa = PBXGroup;
+ children = (
+ ABD6AC650B2D52D400843342 /* Parse.hs */,
+ );
+ path = Format;
+ sourceTree = "<group>";
+ };
ABD6783C0841677900CF37C0 /* Clock */ = {
isa = PBXGroup;
children = (
More information about the ghc-commits
mailing list