mismi-p (empty) → 0.0.1
raw patch · 5 files changed
+416/−0 lines, 5 filesdep +basedep +text
Dependencies added: base, text
Files
- CHANGELOG.md +5/−0
- LICENSE +30/−0
- README.md +2/−0
- mismi-p.cabal +52/−0
- src/P.hs +327/−0
+ CHANGELOG.md view
@@ -0,0 +1,5 @@+## Version 0.0.1 (2018-12-16)++- Replace `p` submodule with `mismi-p`+- Upgrade tests from QuickCheck to hedgehog+- Remove `amazonka`, `x`, `disorder` and `twine` submodules
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright 2017, Nick Hibberd <nhibberd@gmail.com>, All Rights Reserved.++Copyright 2017, Ambiata, All Rights Reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are+met:++ 1. Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.++ 2. Redistributions in binary form must reproduce the above copyright+ notice, this list of conditions and the following disclaimer in the+ documentation and/or other materials provided with the distribution.++ 3. Neither the name of the copyright holder nor the names of+ its contributors may be used to endorse or promote products derived+ from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ README.md view
@@ -0,0 +1,2 @@+p+=
+ mismi-p.cabal view
@@ -0,0 +1,52 @@+version: 0.0.1++name:+ mismi-p+author:+ Nick Hibberd+maintainer:+ Nick Hibberd <nhibberd@gmail.com>+homepage:+ https://github.com/nhibberd/mismi+bug-reports:+ https://github.com/nhibberd/mismi/issues+synopsis:+ A commmon prelude for the mismi project.+description:+ A commmon prelude for use throughout the mismi project.+ .+ <https://github.com/nhibberd/mismi>+category:+ Prelude+license:+ BSD3+license-file:+ LICENSE+cabal-version:+ >= 1.8+build-type:+ Simple+tested-with:+ GHC == 8.2.2+ , GHC == 8.4.3+extra-source-files:+ README.md+ CHANGELOG.md++source-repository head+ type: git+ location: git://github.com/nhibberd/mismi.git++library+ build-depends:+ base >= 3 && < 5+ , text >= 1.1 && < 1.3++ ghc-options:+ -Wall++ hs-source-dirs:+ src++ exposed-modules:+ P
+ src/P.hs view
@@ -0,0 +1,327 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+module P (+ -- * Primitive types+ -- ** Bool+ Bool (..)+ , bool+ , (&&)+ , (||)+ , not+ , otherwise+ -- ** Char+ , Char+ -- ** Int+ , Integer+ , Int+ , Int8+ , Int16+ , Int32+ , Int64+ -- ** Word+ , Word64+ -- ** Real+ , fromIntegral+ , fromRational++ -- * Algebraic structures+ -- ** Monoid+ , Monoid (..)+ , (<>)+ -- ** Functor+ , Functor (..)+ , (<$>)+ , ($>)+ , void+ , with+ -- ** Bifunctor+ , Bifunctor (..)+ -- ** Applicative+ , Applicative (..)+ , (<**>)+ -- ** Alternative+ , Alternative (..)+ , asum+ -- ** Monad+ , Monad (..)+ , (=<<)+ , join+ , forM+ , forM_+ , mapM_+ , when+ , unless+ -- ** MonadPlus+ , MonadPlus (..)+ , guard+ , msum++ -- * Data structures+ -- ** Either+ , Either (..)+ , either+ , note+ -- ** Maybe+ , Maybe (..)+ , fromMaybe+ , maybe+ , hush+ -- ** Tuple+ , fst+ , snd+ , curry+ , uncurry++ -- * Typeclasses+ -- ** Enum+ , Enum (..)+ -- ** Num+ , Num (..)+ -- ** Eq+ , Eq (..)+ -- ** Read+ , Read (..)+ , readEither+ , readMaybe+ -- ** Show+ , Show (..)+ -- *** ShowS+ , ShowS+ , showString+ -- ** Foldable+ , Foldable (..)+ , for_+ , all+ -- ** Ord+ , Ord (..)+ , Ordering (..)+ , comparing+ -- ** Traversable+ , Traversable (..)+ , for+ , traverse_++ -- * Combinators+ , id+ , (.)+ , ($)+ , ($!)+ , (&)+ , const+ , flip+ , fix+ , on+ , seq++ -- * System+ -- ** IO+ , IO+ , FilePath++ -- * Partial functions+ , undefined+ , error++ -- * Debugging facilities+ , trace+ , traceM+ , traceIO++ -- * Text+ , Text (..)++ -- * Prelude+ , Unsafe.Bounded+ ) where+++import Control.Monad as Monad (+ Monad (..)+ , MonadPlus (..)+ , (=<<)+ , guard+ , join+ , msum+ , forM+ , forM_+ , mapM_+ , when+ , unless+ )+import Control.Applicative as Applicative (+ Applicative (..)+ , (<**>)+ , Alternative (..)+ , empty+ )++import Data.Bifunctor as Bifunctor (+ Bifunctor (..)+ )+import Data.Bool as Bool (+ Bool (..)+ , bool+ , (&&)+ , (||)+ , not+ , otherwise+ )+import Data.Char as Char (+ Char+ )+import Data.Either as Either (+ Either (..)+ , either+ )+import Data.Foldable as Foldable (+ Foldable (..)+ , asum+ , traverse_+ , for_+ , all+ )+import Data.Function as Function (+ id+ , (.)+ , ($)+ , (&)+ , const+ , flip+ , fix+ , on+ )+import Data.Functor as Functor (+ Functor (..)+ , (<$>)+ , ($>)+ , void+ )+import Data.Eq as Eq (+ Eq (..)+ )+import Data.Int as Int (+ Int+ , Int8+ , Int16+ , Int32+ , Int64+ )+import Data.Maybe as Maybe (+ Maybe (..)+ , fromMaybe+ , maybe+ )+import Data.Monoid as Monoid (+ Monoid (..)+ , (<>)+ )+import Data.Ord as Ord (+ Ord (..)+ , Ordering (..)+ , comparing+ )+import Data.Traversable as Traversable (+ Traversable (..)+ , for+ )+import Data.Tuple as Tuple (+ fst+ , snd+ , curry+ , uncurry+ )+import Data.Word as Word (+ Word64+ )++import qualified Debug.Trace as Trace++import GHC.Real as Real (+ fromIntegral+ , fromRational+ )+#if MIN_VERSION_base(4,9,0)+import GHC.Stack (HasCallStack)+#endif++import Prelude as Prelude (+ Enum (..)+ , Num (..)+ , Integer+ , seq+ , ($!)+ )+import qualified Prelude as Unsafe++import System.IO as IO (+ FilePath+ , IO+ )++import Text.Read as Read (+ Read (..)+ , readEither+ , readMaybe+ )+import Text.Show as Show (+ Show (..)+ , ShowS+ , showString+ )+import Data.Text (Text)+++#if MIN_VERSION_base(4,9,0)+undefined :: HasCallStack => a+#else+undefined :: a+#endif+undefined =+ Unsafe.undefined+{-# WARNING undefined "'undefined' is unsafe" #-}++#if MIN_VERSION_base(4,9,0)+error :: HasCallStack => [Char] -> a+#else+error :: [Char] -> a+#endif+error =+ Unsafe.error+{-# WARNING error "'error' is unsafe" #-}++trace :: [Char] -> a -> a+trace =+ Trace.trace+{-# WARNING trace "'trace' should only be used while debugging" #-}++#if MIN_VERSION_base(4,9,0)+traceM :: Applicative f => [Char] -> f ()+#else+traceM :: Monad m => [Char] -> m ()+#endif+traceM =+ Trace.traceM+{-# WARNING traceM "'traceM' should only be used while debugging" #-}++traceIO :: [Char] -> IO ()+traceIO =+ Trace.traceIO+{-# WARNING traceIO "'traceIO' should only be used while debugging" #-}++with :: Functor f => f a -> (a -> b) -> f b+with =+ flip fmap+{-# INLINE with #-}++-- | Tag a 'Nothing'.+note :: a -> Maybe b -> Either a b+note a Nothing = Left a+note _ (Just b) = Right b+{-# INLINEABLE note #-}++-- | Eliminate a 'Left'.+hush :: Either a b -> Maybe b+hush (Left _) = Nothing+hush (Right b) = Just b+{-# INLINEABLE hush #-}