on master help sign in
move files Streamly/Time/* to Streamly/Internal/Data
commit1604254925a1b729db9b07ed312bc72740a5a738 authorHarendra Kumar <harendra.kumar@gmail.com> dateWed 25 Sep 2019, 11:38 (7 years ago) parent623b3fd
14 files changed+36−36
Changelog.md+2 configure+2−2 configure.ac+1−1 src/Streamly/Internal/Data/Pipe.hs+1−1 src/Streamly/Internal/Data/SVar.hs+2−2 src/Streamly/Time.hs → src/Streamly/Internal/Data/Time.hs+2−2 src/Streamly/Time/Clock.hsc → src/Streamly/Internal/Data/Time/Clock.hsc+3−3 src/Streamly/Time/Darwin.c → src/Streamly/Internal/Data/Time/Darwin.c src/Streamly/Time/Units.hs → src/Streamly/Internal/Data/Time/Units.hs+2−2 src/Streamly/Time/Windows.c → src/Streamly/Internal/Data/Time/Windows.c src/Streamly/Time/config.h.in → src/Streamly/Internal/Data/Time/config.h.in+1−1 src/Streamly/Internal/Prelude.hs+1−1 src/Streamly/Streams/SVar.hs+1−1 streamly.cabal+18−20
Changelog.md+2
@@ -37,6 +37,8 @@
3737 * `foldWith`, `foldMapWith`, `forEachWith` have been moved to
3838 `Streamly.Prelude` module.
3939
40+* Remove deprecated module `Streamly.Time` (moved to Streamly.Internal)
41+
4042### Bug Fixes
4143
4244* Fix a bug that caused `uniq` function to yield the same element twice.
configure+2−2
@@ -3310,7 +3310,7 @@ done
33103310
33113311
33123312# Output
3313−ac_config_headers="$ac_config_headers src/Streamly/Time/config.h"
3313+ac_config_headers="$ac_config_headers src/Streamly/Internal/Data/Time/config.h"
33143314
33153315cat >confcache <<\_ACEOF
33163316# This file is a shell script that caches the results of configure
@@ -3984,7 +3984,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
39843984for ac_config_target in $ac_config_targets
39853985do
39863986 case $ac_config_target in
3987− "src/Streamly/Time/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/Streamly/Time/config.h" ;;
3987+ "src/Streamly/Internal/Data/Time/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/Streamly/Internal/Data/Time/config.h" ;;
39883988
39893989 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
39903990 esac
configure.ac+1−1
@@ -13,5 +13,5 @@ AC_CHECK_HEADERS([time.h])
1313AC_CHECK_FUNCS([clock_gettime])
1414
1515# Output
16−AC_CONFIG_HEADERS([src/Streamly/Time/config.h])
16+AC_CONFIG_HEADERS([src/Streamly/Internal/Data/Time/config.h])
1717AC_OUTPUT
src/Streamly/Internal/Data/Pipe.hs+1−1
@@ -258,7 +258,7 @@ import Streamly.Internal.Data.Pipe.Types
258258-- import Streamly.Memory.Ring (Ring)
259259-- import Streamly.Streams.Serial (SerialT)
260260-- import Streamly.Streams.StreamK (IsStream())
261−-- import Streamly.Time.Units
261+-- import Streamly.Internal.Data.Time.Units
262262-- (AbsTime, MilliSecond64(..), addToAbsTime, diffAbsTime, toRelTime,
263263-- toAbsTime)
264264
src/Streamly/Internal/Data/SVar.hs+2−2
@@ -139,8 +139,8 @@ import Data.Set (Set)
139139import GHC.Conc (ThreadId(..))
140140import GHC.Exts
141141import GHC.IO (IO(..))
142−import Streamly.Time.Clock (Clock(..), getTime)
143−import Streamly.Time.Units
142+import Streamly.Internal.Data.Time.Clock (Clock(..), getTime)
143+import Streamly.Internal.Data.Time.Units
144144 (AbsTime, NanoSecond64(..), MicroSecond64(..), diffAbsTime64,
145145 fromRelTime64, toRelTime64, showNanoSecond64, showRelTime64)
146146import System.IO (hPutStrLn, stderr)
src/Streamly/Time.hs → src/Streamly/Internal/Data/Time.hsrenamed+2−2
@@ -1,5 +1,5 @@
11-- |
2−-- Module : Streamly.Time
2+-- Module : Streamly.Internal.Data.Time
33-- Copyright : (c) 2017 Harendra Kumar
44--
55-- License : BSD3
@@ -9,7 +9,7 @@
99--
1010-- Time utilities for reactive programming.
1111
12−module Streamly.Time
12+module Streamly.Internal.Data.Time
1313{-# DEPRECATED
1414 "Please use the \"rate\" combinator instead of the functions in this module"
1515 #-}
src/Streamly/Time/Clock.hsc → src/Streamly/Internal/Data/Time/Clock.hscrenamed+3−3
@@ -14,7 +14,7 @@
1414#endif
1515
1616-- |
17−-- Module : Streamly.Time.Clock
17+-- Module : Streamly.Internal.Data.Time.Clock
1818-- Copyright : (c) 2019 Harendra Kumar
1919-- (c) 2009-2012, Cetin Sert
2020-- (c) 2010, Eugene Kirpichov
@@ -37,7 +37,7 @@
3737#error "Time/Clock functionality not implemented for this system"
3838#endif
3939
40−module Streamly.Time.Clock
40+module Streamly.Internal.Data.Time.Clock
4141 (
4242 -- * get time from the system clock
4343 Clock(..)
@@ -54,7 +54,7 @@ import Foreign.Ptr (Ptr)
5454import Foreign.Storable (Storable(..), peek)
5555import GHC.Generics (Generic)
5656
57−import Streamly.Time.Units (TimeSpec(..), AbsTime(..))
57+import Streamly.Internal.Data.Time.Units (TimeSpec(..), AbsTime(..))
5858
5959-------------------------------------------------------------------------------
6060-- Clock Types
src/Streamly/Time/Darwin.c → src/Streamly/Internal/Data/Time/Darwin.crenamed

The content is the same.

src/Streamly/Time/Units.hs → src/Streamly/Internal/Data/Time/Units.hsrenamed+2−2
@@ -5,7 +5,7 @@
55#include "inline.hs"
66
77-- |
8−-- Module : Streamly.Time.Units
8+-- Module : Streamly.Internal.Data.Time.Units
99-- Copyright : (c) 2019 Harendra Kumar
1010--
1111-- License : BSD3
@@ -13,7 +13,7 @@
1313-- Stability : experimental
1414-- Portability : GHC
1515
16−module Streamly.Time.Units
16+module Streamly.Internal.Data.Time.Units
1717 (
1818 -- * Time Unit Conversions
1919 TimeUnit()
src/Streamly/Time/Windows.c → src/Streamly/Internal/Data/Time/Windows.crenamed

The content is the same.

src/Streamly/Time/config.h.in → src/Streamly/Internal/Data/Time/config.h.inrenamed+1−1
@@ -1,4 +1,4 @@
1−/* src/Streamly/Time/config.h.in. Generated from configure.ac by autoheader. */
1+/* src/Streamly.Internal.Data.Time/config.h.in. Generated from configure.ac by autoheader. */
22
33/* Define to 1 if you have the `clock_gettime' function. */
44#undef HAVE_CLOCK_GETTIME
src/Streamly/Internal/Prelude.hs+1−1
@@ -416,7 +416,7 @@ import Streamly.Streams.StreamD (fromStreamD, toStreamD)
416416import Streamly.Streams.StreamK (IsStream((|:), consM))
417417import Streamly.Streams.Serial (SerialT)
418418import Streamly.Internal.Data.Pipe.Types (Pipe (..))
419−import Streamly.Time.Units
419+import Streamly.Internal.Data.Time.Units
420420 (AbsTime, MilliSecond64(..), addToAbsTime, diffAbsTime, toRelTime,
421421 toAbsTime)
422422
src/Streamly/Streams/SVar.hs+1−1
@@ -28,7 +28,7 @@ import Data.Maybe (isNothing)
2828import Data.Semigroup ((<>))
2929#endif
3030import System.IO (hPutStrLn, stderr)
31−import Streamly.Time.Clock (Clock(Monotonic), getTime)
31+import Streamly.Internal.Data.Time.Clock (Clock(Monotonic), getTime)
3232import System.Mem (performMajorGC)
3333
3434import Streamly.Internal.Data.SVar
streamly.cabal+18−20
@@ -110,13 +110,13 @@ extra-source-files:
110110 src/Streamly/Streams/inline.hs
111111 configure.ac
112112 configure
113− src/Streamly/Time/config.h.in
113+ src/Streamly/Internal/Data/Time/config.h.in
114114
115115extra-tmp-files:
116116 config.log
117117 config.status
118118 autom4te.cache
119− src/Streamly/Time/config.h
119+ src/Streamly/Internal/Data/Time/config.h
120120
121121source-repository head
122122 type: git
@@ -245,12 +245,12 @@ common bench-options
245245library
246246 import: lib-options
247247 js-sources: jsbits/clock.js
248− include-dirs: src/Streamly/Time
248+ include-dirs: src/Streamly/Internal/Data/Time
249249 , src/Streamly/Streams
250250 if os(windows)
251− c-sources: src/Streamly/Time/Windows.c
251+ c-sources: src/Streamly/Internal/Data/Time/Windows.c
252252 if os(darwin)
253− c-sources: src/Streamly/Time/Darwin.c
253+ c-sources: src/Streamly/Internal/Data/Time/Darwin.c
254254 hs-source-dirs: src
255255 other-modules: Streamly.Enumeration
256256
@@ -284,12 +284,7 @@ library
284284 , Streamly.FileSystem.FDIO
285285 , Streamly.FileSystem.FD
286286
287− -- Time
288− , Streamly.Time.Units
289− , Streamly.Time.Clock
290−
291287 exposed-modules: Streamly.Prelude
292− , Streamly.Time
293288 , Streamly
294289 , Streamly.Data.Fold
295290 , Streamly.Data.String
@@ -304,6 +299,9 @@ library
304299 , Streamly.Internal
305300 , Streamly.Internal.Data.Strict
306301 , Streamly.Internal.Data.Atomics
302+ , Streamly.Internal.Data.Time
303+ , Streamly.Internal.Data.Time.Units
304+ , Streamly.Internal.Data.Time.Clock
307305 , Streamly.Internal.Data.SVar
308306 , Streamly.Internal.Memory.Array.Types
309307 , Streamly.Internal.Memory.ArrayStream
@@ -635,18 +633,18 @@ benchmark concurrent
635633benchmark base
636634 import: bench-options
637635 type: exitcode-stdio-1.0
638− include-dirs: src/Streamly/Time
636+ include-dirs: src/Streamly/Internal/Data/Time
639637 , src/Streamly/Streams
640638 if os(windows)
641− c-sources: src/Streamly/Time/Windows.c
639+ c-sources: src/Streamly/Internal/Data/Time/Windows.c
642640 if os(darwin)
643− c-sources: src/Streamly/Time/Darwin.c
641+ c-sources: src/Streamly/Internal/Data/Time/Darwin.c
644642 hs-source-dirs: benchmark, src
645643 main-is: BaseStreams.hs
646644 other-modules: Streamly.Internal.Data.Atomics
647645 , Streamly.Internal.Data.SVar
648− , Streamly.Time.Units
649− , Streamly.Time.Clock
646+ , Streamly.Internal.Data.Time.Units
647+ , Streamly.Internal.Data.Time.Clock
650648 , Streamly.Streams.StreamDK.Type
651649 , Streamly.Streams.StreamDK
652650 , Streamly.Streams.StreamK.Type
@@ -691,17 +689,17 @@ benchmark base
691689executable nano-bench
692690 import: bench-options
693691 hs-source-dirs: benchmark, src
694− include-dirs: src/Streamly/Time
692+ include-dirs: src/Streamly/Internal/Data/Time
695693 , src/Streamly/Streams
696694 if os(windows)
697− c-sources: src/Streamly/Time/Windows.c
695+ c-sources: src/Streamly/Internal/Data/Time/Windows.c
698696 if os(darwin)
699− c-sources: src/Streamly/Time/Darwin.c
697+ c-sources: src/Streamly/Internal/Data/Time/Darwin.c
700698 main-is: NanoBenchmarks.hs
701699 other-modules: Streamly.Internal.Data.Atomics
702700 , Streamly.Internal.Data.SVar
703− , Streamly.Time.Units
704− , Streamly.Time.Clock
701+ , Streamly.Internal.Data.Time.Units
702+ , Streamly.Internal.Data.Time.Clock
705703 , Streamly.Streams.StreamK.Type
706704 , Streamly.Streams.StreamK
707705 , Streamly.Streams.StreamD.Type