intro 0.1.0.7 → 0.1.0.8
raw patch · 3 files changed
+28/−9 lines, 3 filesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ Intro: showT :: Show a => a -> Text
Files
- README.md +2/−2
- intro.cabal +2/−3
- src/Intro.hs +24/−4
README.md view
@@ -11,11 +11,11 @@ Most important - this Prelude tries to keep things simple. This means it just reexports from base and commonly used libraries-and doesn't invent its own stuff. Furthermore the Prelude is not scattered over many files.+and adds only very few additional functions. List of design decisions: -* Keep everything at one place (There are one two source files, we need Intro.Trustworthy for Safe Haskell)+* Keep everything at one place (There are one two modules and Intro.Trustworthy is only there for Safe Haskell) * Conservative extension over the base Prelude * Rely only on very common external libraries * Avoid writing custom functions
intro.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack name: intro-version: 0.1.0.7+version: 0.1.0.8 synopsis: "Fixed Prelude" - Mostly total and safe, provides Text and Monad transformers description: Intro is a modern Prelude which provides safe alternatives for most of the partial functions and follows other@@ -13,8 +13,7 @@ . Most important - this Prelude tries to keep things simple. This means it just reexports from base and commonly used libraries- and doesn\'t invent its own stuff.- Furthermore the Prelude is not scattered over many files.+ and adds only very few additional functions. Everything is exported explicitly to provide a stable interface and to improve the quality of the documentation. category: Prelude
src/Intro.hs view
@@ -24,12 +24,11 @@ -- -- Most important - this Prelude tries to keep things simple. -- This means it just reexports from base and commonly used libraries--- and doesn\'t invent its own stuff.--- Furthermore the Prelude is not scattered over many files.+-- and adds only very few additional functions. -- -- List of design decisions: ----- * Keep everything at one place (There are one two source files, we need Intro.Trustworthy for Safe Haskell)+-- * Keep everything at one place (There are one two modules and Intro.Trustworthy is only there for Safe Haskell) -- * Conservative extension over the base Prelude -- * Rely only on very common external libraries -- * Avoid writing custom functions@@ -70,9 +69,22 @@ -- * 'lex' is not commonly used. Use a parser combinator library instead. -- * 'gcd' and 'lcm' are not commonly used. -- * 'error' and 'errorWithoutStackTrace' are not provided. Use 'panic' instead.--- * 'ioError' and 'userError' are not provided. Import separately if needed.+-- * 'ioError' and 'userError' are not provided. Import modules for exception handling separately if needed. -- * Some 'Text.Read' and 'Text.Show' class functions are not provided. Don't write these instances yourself. --+-- Additional types and functions:+--+-- * 'LText' alias for lazy 'Text'+-- * 'LByteString' alias for lazy 'ByteString'+-- * 'fromFoldable' to convert from 'Data.Foldable.Foldable' to an 'IsList' type+-- * 'convertList' to convert between two 'IsList' types. This function can be used instead of the 'toList' function+-- originally provided by the 'IsList' class.+-- * 'showT' and 'showS' are monomorphic 'show' functions.+-- * '<>^' lifted composition+-- * '.:' function composition+-- * '?:' as an alias for 'fromMaybe'+-- * 'skip' as an alias for @pure ()@+-- * 'panic' as a replacement for 'error' ----------------------------------------------------------------------------- module Intro (@@ -332,6 +344,7 @@ , Data.Functor.Classes.Show2 #endif , show+ , showT , showS -- ** Read@@ -732,6 +745,8 @@ {-# INLINE fromFoldable #-} -- | Convert between two different 'IsList' types.+-- This function can be used instead of the 'toList' function+-- originally provided by the 'IsList' class. convertList :: (IsList a, IsList b, Item a ~ Item b) => a -> b convertList = fromList . toList {-# INLINE convertList #-}@@ -747,6 +762,11 @@ show :: (Show a, ConvertibleStrings String b) => a -> b show = convertString . showS {-# INLINE show #-}++-- | Convert a value to a readable 'Text' using the 'Show' instance.+showT :: Show a => a -> Text+showT = show+{-# INLINE showT #-} -- | Convert a value to a readable 'String' using the 'Show' instance. showS :: Show a => a -> String