plailude 0.1.0 → 0.2.1
raw patch · 6 files changed
+41/−6 lines, 6 filesdep +bytestringPVP ok
version bump matches the API change (PVP)
Dependencies added: bytestring
API changes (from Hackage documentation)
+ Plailude: showL8 :: Show a => a -> ByteString
Files
- plailude.cabal +7/−3
- src/Data/Text.hs +12/−0
- src/Data/Text/Show.hs +15/−0
- src/Data/Time/Conversion.hs +1/−2
- src/Function/Compose.hs +2/−0
- src/Plailude.hs +4/−1
plailude.cabal view
@@ -1,5 +1,5 @@ name: plailude-version: 0.1.0+version: 0.2.1 synopsis: plaimi's prelude description: The prelude used internally at plaimi. @@ -22,12 +22,16 @@ library exposed-modules: Plailude- other-modules: Data.Time+ other-modules: Data.Text+ Data.Text.Show+ Data.Time Data.Time.Conversion Data.Time.Units Function Function.Compose other-extensions: GeneralizedNewtypeDeriving- build-depends: base >=4.6 && <4.7, time >=1.4 && <1.5+ build-depends: base >=4.6 && <4.7,+ bytestring >=0.10 && <0.11,+ time >=1.4 && <1.5 hs-source-dirs: src default-language: Haskell2010
+ src/Data/Text.hs view
@@ -0,0 +1,12 @@+{- |+Module : $Header$+Description : Text manipulation.+Copyright : (c) plaimi 2014+License : GPL-3++Maintainer : plailude@plaimi.net+-} module Data.Text (+ showL8+ ) where++import Data.Text.Show
+ src/Data/Text/Show.hs view
@@ -0,0 +1,15 @@+{- |+Module : $Header$+Description : Show various Text formats.+Copyright : (c) plaimi 2014+License : GPL-3++Maintainer : plailude@plaimi.net+-} module Data.Text.Show where++import qualified Data.ByteString.Lazy as L+import qualified Data.ByteString.Lazy.Char8 as L8++showL8 :: Show a => a -> L.ByteString+-- | 'showL8' converts a showable value to a 'L.ByteString' using 'show'.+showL8 = L8.pack . show
src/Data/Time/Conversion.hs view
@@ -20,11 +20,10 @@ fromGregorian :: Year y -> Month mo -> Day d -> C.Day -- | fromGregorian is a wrapper for Data.Time.Calendar.fromGregorian, which--- lets us pass our 'Year'-'Month'-'Day' structures. It calls+-- lets us pass our 'Year' - 'Month' - 'Day' structures. It calls -- Data.Time.Calendar.fromGregorian with the appropriate types, and returns -- a Data.Time.Calendar.Day. fromGregorian y mo s = C.fromGregorian (timeVal y) (timeVal mo) (timeVal s)- asSeconds :: Hour h -> Minute m -> Second s -> Second t -- | asSeconds take some 'TimeUnit's and convert them to 'Second's.
src/Function/Compose.hs view
@@ -7,6 +7,8 @@ Maintainer : plailude@plaimi.net -} module Function.Compose where +-- (.) :: (b -> c) -> (a -> b) -> a -> c+-- (f . g) x = f (g x) (.:) :: (c -> d) -> (a -> b -> c) -> a -> b -> d -- | Compose two functions where the second function takes two values and
src/Plailude.hs view
@@ -9,6 +9,8 @@ -- Function (.:), (.:.),+ -- Text+ showL8, -- Data.Time Hour (MkHour), Minute (MkMinute),@@ -19,8 +21,9 @@ TimeUnit, asSeconds, fromGregorian,- timeVal+ timeVal, ) where +import Data.Text import Data.Time import Function