From 29b854cf98d28b7dcb3f19e5559d2e17d775cfdb Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 7 Apr 2016 15:22:44 -0400 Subject: [PATCH 001/295] initial commit --- .ghci | 1 + .gitignore | 2 + LICENSE | 19 ++++ protolude.cabal | 51 +++++++++ src/Applicative.hs | 18 +++ src/Bool.hs | 27 +++++ src/Debug.hs | 46 ++++++++ src/Either.hs | 22 ++++ src/Function.hs | 0 src/List.hs | 29 +++++ src/Monad.hs | 56 ++++++++++ src/Protolude.hs | 268 +++++++++++++++++++++++++++++++++++++++++++++ src/Show.hs | 55 ++++++++++ src/Unsafe.hs | 28 +++++ stack.yaml | 34 ++++++ 15 files changed, 656 insertions(+) create mode 100644 .ghci create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 protolude.cabal create mode 100644 src/Applicative.hs create mode 100644 src/Bool.hs create mode 100644 src/Debug.hs create mode 100644 src/Either.hs create mode 100644 src/Function.hs create mode 100644 src/List.hs create mode 100644 src/Monad.hs create mode 100644 src/Protolude.hs create mode 100644 src/Show.hs create mode 100644 src/Unsafe.hs create mode 100644 stack.yaml diff --git a/.ghci b/.ghci new file mode 100644 index 0000000000..29a3cb319a --- /dev/null +++ b/.ghci @@ -0,0 +1 @@ +:set -XNoImplicitPrelude diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..002f475233 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.stack-work +dist diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..d7e3e5b9c9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014-2016, Stephen Diehl + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/protolude.cabal b/protolude.cabal new file mode 100644 index 0000000000..942553ea9c --- /dev/null +++ b/protolude.cabal @@ -0,0 +1,51 @@ +name: protolude +version: 0.1.0 +synopsis: A sensible start of defaults +homepage: https://github.com/sdiehl/protolude +license: MIT +license-file: LICENSE +author: Stephen Diehl +maintainer: stephen.m.diehl@gmail.com +copyright: 2016 Stephen Diehl +category: Prelude +build-type: Simple +cabal-version: >=1.10 +tested-with: + GHC == 7.6.3, + GHC == 7.8.0 + GHC == 7.10.3 +Bug-Reports: https://github.com/sdiehl/protolude/issues + +library + exposed-modules: + Protolude + + other-modules: + Applicative + Bool + Debug + List + Monad + + default-extensions: + NoImplicitPrelude + + ghc-options: + -Wall + -Werror + + build-depends: + base >= 4.6 && <4.10, + safe >= 0.3 && <0.4, + async >= 2.1 && <2.2, + deepseq >= 1.3 && <= 1.5, + containers >= 0.5 && <0.6, + semiring-simple >= 1.0 && <1.1, + mtl >= 2.1 && <2.3, + transformers >= 0.4 && < 0.6, + text >= 1.2 && <1.3, + string-conv >= 0.1 && <0.2, + bytestring >= 0.10 && <0.11 + + hs-source-dirs: src + default-language: Haskell2010 diff --git a/src/Applicative.hs b/src/Applicative.hs new file mode 100644 index 0000000000..5964376540 --- /dev/null +++ b/src/Applicative.hs @@ -0,0 +1,18 @@ +module Applicative ( + orAlt, + orEmpty, + eitherA, +) where + +import Data.Monoid +import Control.Applicative +import Prelude (Bool, Either(..)) + +orAlt :: (Alternative f, Monoid a) => f a -> f a +orAlt f = f <|> pure mempty + +orEmpty :: Alternative f => Bool -> a -> f a +orEmpty b a = if b then pure a else empty + +eitherA :: (Alternative f) => f a -> f b -> f (Either a b) +eitherA a b = (Left <$> a) <|> (Right <$> b) diff --git a/src/Bool.hs b/src/Bool.hs new file mode 100644 index 0000000000..797f96c888 --- /dev/null +++ b/src/Bool.hs @@ -0,0 +1,27 @@ +module Bool ( + whenM + , unlessM + , ifM + , guardM + , bool + ) where + +import Prelude +import Control.Monad (MonadPlus, when, unless, guard) + +bool :: a -> a -> Bool -> a +bool f t p = if p then t else f + +whenM :: Monad m => m Bool -> m () -> m () +whenM p m = + p >>= flip when m + +unlessM :: Monad m => m Bool -> m () -> m () +unlessM p m = + p >>= flip unless m + +ifM :: Monad m => m Bool -> m a -> m a -> m a +ifM p x y = p >>= \b -> if b then x else y + +guardM :: MonadPlus m => m Bool -> m () +guardM f = guard =<< f diff --git a/src/Debug.hs b/src/Debug.hs new file mode 100644 index 0000000000..0e3eaade4d --- /dev/null +++ b/src/Debug.hs @@ -0,0 +1,46 @@ +{-# LANGUAGE NoImplicitPrelude #-} + +module Debug ( + undefined + , error + , trace + , traceM + , traceIO + , traceShow + , traceShowM + , notImplemented + ) where + +import qualified Prelude as P +import qualified Debug.Trace as T + +--{-# WARNING undefined "Do not use 'undefined' in production code" #-} +undefined :: a +undefined = P.undefined + +--{-# WARNING error "Do not use 'error' in production code" #-} +error :: P.String -> a +error = P.error + +--{-# WARNING trace "Do not use 'trace' in production code" #-} +trace :: P.String -> a -> a +trace = T.trace + +--{-# WARNING trace "Do not use 'trace' in production code" #-} +traceShow :: P.Show a => a -> a +traceShow a = T.trace (P.show a) a + +--{-# WARNING trace "Do not use 'trace' in production code" #-} +traceShowM :: (P.Show a, P.Monad m) => a -> m () +traceShowM a = T.traceM (P.show a) + +--{-# WARNING traceM "Do not use 'traceM' in production code" #-} +traceM :: P.Monad m => P.String -> m () +traceM = T.traceM + +--{-# WARNING traceIO "Do not use 'traceIO' in production code" #-} +traceIO :: P.String -> P.IO () +traceIO = T.traceIO + +notImplemented :: a +notImplemented = P.error "Not implemented" diff --git a/src/Either.hs b/src/Either.hs new file mode 100644 index 0000000000..1e7809a22d --- /dev/null +++ b/src/Either.hs @@ -0,0 +1,22 @@ +module P.Either ( + maybeToLeft +, maybeToRight +, leftToMaybe +, rightToMaybe +, maybeToEither +) where + +leftToMaybe :: Either l r -> Maybe l +leftToMaybe = either Just (const Nothing) + +rightToMaybe :: Either l r -> Maybe r +rightToMaybe = either (const Nothing) Just + +maybeToRight :: l -> Maybe r -> Either l r +maybeToRight l = maybe (Left l) Right + +maybeToLeft :: r -> Maybe l -> Either l r +maybeToLeft r = maybe (Right r) Left + +maybeToEither :: Monoid b => Maybe a -> Either b a +maybeToEither = maybe mempty diff --git a/src/Function.hs b/src/Function.hs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/List.hs b/src/List.hs new file mode 100644 index 0000000000..d3555ae347 --- /dev/null +++ b/src/List.hs @@ -0,0 +1,29 @@ +module List ( + head, + ordNub, + sortOn, +) where + +import Data.List (sortBy) +import Data.Maybe (Maybe(..)) +import Data.Ord (Ord, comparing) +import Data.Foldable (Foldable, foldr) +import Data.Function ((.)) +import Control.Monad (return) +import qualified Data.Set as Set + +head :: (Foldable f) => f a -> Maybe a +head = foldr (\x _ -> return x) Nothing + +sortOn :: (Ord o) => (a -> o) -> [a] -> [a] +sortOn = sortBy . comparing + +-- O(n * log n) +ordNub :: (Ord a) => [a] -> [a] +ordNub l = go Set.empty l + where + go _ [] = [] + go s (x:xs) = + if x `Set.member` s + then go s xs + else x : go (Set.insert x s) xs diff --git a/src/Monad.hs b/src/Monad.hs new file mode 100644 index 0000000000..027fdd1719 --- /dev/null +++ b/src/Monad.hs @@ -0,0 +1,56 @@ +{-# LANGUAGE NoImplicitPrelude #-} + +module Monad ( + Monad(..) + , MonadPlus(..) + + , (=<<) + , (>=>) + , (<=<) + , forever + + , join + , mfilter + , filterM + , mapAndUnzipM + , zipWithM + , zipWithM_ + , foldM + , foldM_ + , replicateM + , replicateM_ + , concatMapM + + , guard + , when + , unless + + , liftM + , liftM2 + , liftM3 + , liftM4 + , liftM5 + , liftM' + , liftM2' + , ap + + , (<$!>) + ) where + +import Prelude (concat, seq) +import Control.Monad + +concatMapM :: (Monad m) => (a -> m [b]) -> [a] -> m [b] +concatMapM f xs = liftM concat (mapM f xs) + +liftM' :: Monad m => (a -> b) -> m a -> m b +liftM' = (<$!>) +{-# INLINE liftM' #-} + +liftM2' :: (Monad m) => (a -> b -> c) -> m a -> m b -> m c +liftM2' f a b = do + x <- a + y <- b + let z = f x y + z `seq` return z +{-# INLINE liftM2' #-} diff --git a/src/Protolude.hs b/src/Protolude.hs new file mode 100644 index 0000000000..be5adaf8fe --- /dev/null +++ b/src/Protolude.hs @@ -0,0 +1,268 @@ +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +module Protolude ( + module X, + identity, + bool, + (&), + uncons, + applyN, + print, + + LText, + LByteString, +) where + +import qualified Prelude as P + +import qualified List as X +import qualified Show as X +import qualified Bool as X +import qualified Debug as X +import qualified Monad as X +import qualified Applicative as X + +-- Maybe'ized version of partial functions +import Safe as X ( + headMay, + initMay, + tailMay + ) + +-- Applicatives +import Control.Applicative as X ( + Applicative(..) + , Alternative(..) + , Const(..) + , ZipList(..) + , (<**>) + , liftA + , liftA2 + , liftA3 + , optional + ) + +-- Base typeclasses +import Data.Eq as X +import Data.Ord as X +import Data.Monoid as X +import Data.Traversable as X +import Data.Foldable as X hiding ( + foldr1 + , foldl1 + , maximum + , maximumBy + , minimum + , minimumBy + ) +import Data.Semiring as X +import Data.Functor.Identity as X +import Data.Functor as X ( + Functor(..) + , ($>) + , (<$>) + , void + ) + +-- Deepseq +import Control.DeepSeq as X ( + NFData(..) + , ($!!) + , deepseq + , force + ) + +-- Data structures +import Data.Tuple as X +import Data.List as X ( + splitAt + , break + , intercalate + , isPrefixOf + , drop + , filter + , reverse + , replicate + ) + +import Control.Monad.State as X ( + MonadState, + State, + StateT, + put, + get, + gets, + modify, + withState, + + runStateT, + execStateT, + evalStateT, + ) + +import Control.Monad.Reader as X ( + MonadReader, + Reader, + ReaderT, + ask, + asks, + local, + runReader, + runReaderT, + ) + +import Control.Monad.Except as X ( + MonadError, + Except, + ExceptT, + throwError, + catchError, + runExcept, + runExceptT, + ) + +import Control.Monad.Trans as X ( + MonadIO, + lift, + liftIO, + ) + +-- Common data structure types +import Data.Map as X (Map) +import Data.Set as X (Set) +import Data.Sequence as X (Seq) +import Data.IntMap as X (IntMap) +import Data.IntSet as X (IntSet) + +-- Base types +import Data.Int as X +import Data.Bits as X +import Data.Word as X +import Data.Bool as X hiding (bool) +import Data.Char as X (Char) +import Data.Maybe as X hiding (fromJust) +import Data.Either as X +import Data.Complex as X + +import Data.Function as X ( + id + , const + , (.) + , flip + , fix + , on + ) + +-- Base GHC types +import GHC.Num as X +import GHC.Real as X +import GHC.Float as X +import GHC.Show as X +import GHC.Exts as X ( + Constraint + , Ptr + , FunPtr + , the + ) + +import GHC.Generics ( + Generic(..) + , Rep + , K1(..) + , M1(..) + , U1(..) + , V1 + , D1 + , C1 + , S1 + , (:+:) + , (:*:) + , NoSelector + , Rec0 + , Par0 + , Constructor(..) + , Selector(..) + , Arity(..) + , Fixity(..) + ) + +-- ByteString +import qualified Data.ByteString.Lazy +import qualified Data.ByteString as X (ByteString) + +-- Text +import Data.Text as X (Text) +import qualified Data.Text.Lazy +import qualified Data.Text.IO +import Text.Printf as X (printf) + +import Data.Text.Lazy ( + toStrict + , fromStrict + ) + +import Data.String.Conv as X ( + strConv + , toS + , toSL + , Leniency(..) + ) + +-- Printf +import Text.Printf as Exports ( + PrintfArg + , printf + , hPrintf + ) + +-- IO +import System.Exit as X +import System.Environment as X (getArgs) +import System.IO as X ( + Handle + , hClose + ) + +-- ST +import Control.Monad.ST as ST + +-- Concurrency and Parallelism +import Control.Exception as X +import Control.Concurrent as X +import Control.Concurrent.Async as X + + +import Foreign.Storable as Exports (Storable) + +-- Read instances hiding unsafe builtins (read) +import Text.Read as X ( + Read + , reads + , readMaybe + , readEither + ) + +-- Type synonymss for lazy texts +type LText = Data.Text.Lazy.Text +type LByteString = Data.ByteString.Lazy.ByteString + +infixl 1 & + +(&) :: a -> (a -> b) -> b +x & f = f x + +bool :: a -> a -> Bool -> a +bool f t b = if b then t else f + +identity :: a -> a +identity x = x + +uncons :: [a] -> Maybe (a, [a]) +uncons [] = Nothing +uncons (x:xs) = Just (x, xs) + +applyN :: Int -> (a -> a) -> a -> a +applyN n f = X.foldr (.) id (X.replicate n f) + +print :: (X.MonadIO m, P.Show a) => a -> m () +print = liftIO . P.print diff --git a/src/Show.hs b/src/Show.hs new file mode 100644 index 0000000000..1c3d267168 --- /dev/null +++ b/src/Show.hs @@ -0,0 +1,55 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE TypeSynonymInstances #-} + +module Show ( + Print(..), + putText, + putLText, +) where + +import Prelude ((.), Char, IO) +import qualified Prelude + +import Control.Monad.IO.Class (MonadIO, liftIO) +import qualified Data.ByteString.Char8 as BS +import qualified Data.ByteString.Lazy.Char8 as BL + +import qualified Data.Text as T +import qualified Data.Text.IO as T + +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.IO as TL + +class Print a where + putStr :: MonadIO m => a -> m () + putStrLn :: MonadIO m => a -> m () + +instance Print T.Text where + putStr = liftIO . T.putStr + putStrLn = liftIO . T.putStrLn + +instance Print TL.Text where + putStr = liftIO . TL.putStr + putStrLn = liftIO . TL.putStrLn + +instance Print BS.ByteString where + putStr = liftIO . BS.putStr + putStrLn = liftIO . BS.putStrLn + +instance Print BL.ByteString where + putStr = liftIO . BL.putStr + putStrLn = liftIO . BL.putStrLn + +instance Print [Char] where + putStr = liftIO . Prelude.putStr + putStrLn = liftIO . Prelude.putStrLn + +-- For forcing type inference +putText :: MonadIO m => T.Text -> m () +putText = putStrLn +{-# SPECIALIZE putText :: T.Text -> IO () #-} + +putLText :: MonadIO m => TL.Text -> m () +putLText = putStrLn +{-# SPECIALIZE putLText :: TL.Text -> IO () #-} diff --git a/src/Unsafe.hs b/src/Unsafe.hs new file mode 100644 index 0000000000..49d0eb0d73 --- /dev/null +++ b/src/Unsafe.hs @@ -0,0 +1,28 @@ +{-# LANGUAGE NoImplicitPrelude #-} + +module Unsafe where + +import qualified Prelude +import qualified Data.Maybe +import qualified Data.List + +unsafeHead :: [a] -> a +unsafeHead = Prelude.head + +unsafeTail :: [a] -> [a] +unsafeTail = Prelude.tail + +unsafeInit :: [a] -> [a] +unsafeInit = Prelude.init + +unsafeLast :: [a] -> a +unsafeLast = Prelude.last + +fromJust :: Prelude.Maybe a -> a +fromJust = Data.Maybe.fromJust + +unsafeIndex :: [a] -> Prelude.Int -> a +unsafeIndex = (Data.List.!!) + +(!!) :: [a] -> Prelude.Int -> a +(!!) = (Data.List.!!) diff --git a/stack.yaml b/stack.yaml new file mode 100644 index 0000000000..029f3726ed --- /dev/null +++ b/stack.yaml @@ -0,0 +1,34 @@ +# For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md + +# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2) +resolver: lts-5.10 + +# Local packages, usually specified by relative directory name +packages: +- '.' + +# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3) +extra-deps: +- semiring-simple-1.0.0.1 +- string-conv-0.1 + +# Override default flag values for local packages and extra-deps +flags: {} + +# Extra package databases containing global packages +extra-package-dbs: [] + +# Control whether we use the GHC we find on the path +# system-ghc: true + +# Require a specific version of stack, using version ranges +# require-stack-version: -any # Default +# require-stack-version: >= 0.1.4.0 + +# Override the architecture used by stack, especially useful on Windows +# arch: i386 +# arch: x86_64 + +# Extra directories used by stack for building +# extra-include-dirs: [/path/to/dir] +# extra-lib-dirs: [/path/to/dir] From e94c364d65178a6bc0c1e83003f5a315d854076a Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 7 Apr 2016 15:34:56 -0400 Subject: [PATCH 002/295] readme --- README.md | 4 ++++ src/Protolude.hs | 1 + 2 files changed, 5 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000000..b31ff5e22b --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +Protolude +========= + +A sensible starting Prelude. diff --git a/src/Protolude.hs b/src/Protolude.hs index be5adaf8fe..1c56561cdb 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -154,6 +154,7 @@ import Data.Function as X ( ) -- Base GHC types +import GHC.IO as X (IO) import GHC.Num as X import GHC.Real as X import GHC.Float as X From 28dad7fca16bdb8813d805b55dde933da08024f5 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 7 Apr 2016 17:14:42 -0400 Subject: [PATCH 003/295] fix warnings --- protolude.cabal | 1 + src/Debug.hs | 15 ++++++++------- src/Either.hs | 2 +- src/Function.hs | 0 src/Protolude.hs | 14 +++++++------- 5 files changed, 17 insertions(+), 15 deletions(-) delete mode 100644 src/Function.hs diff --git a/protolude.cabal b/protolude.cabal index 942553ea9c..2ad777ed48 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -26,6 +26,7 @@ library Debug List Monad + Unsafe default-extensions: NoImplicitPrelude diff --git a/src/Debug.hs b/src/Debug.hs index 0e3eaade4d..9e843f35ce 100644 --- a/src/Debug.hs +++ b/src/Debug.hs @@ -14,33 +14,34 @@ module Debug ( import qualified Prelude as P import qualified Debug.Trace as T ---{-# WARNING undefined "Do not use 'undefined' in production code" #-} +{-# WARNING undefined "'undefined' remains in code" #-} undefined :: a undefined = P.undefined ---{-# WARNING error "Do not use 'error' in production code" #-} +{-# WARNING error "'error' remains in code" #-} error :: P.String -> a error = P.error ---{-# WARNING trace "Do not use 'trace' in production code" #-} +{-# WARNING trace "'trace' remains in code" #-} trace :: P.String -> a -> a trace = T.trace ---{-# WARNING trace "Do not use 'trace' in production code" #-} +{-# WARNING traceShow "'traceShow' remains in code" #-} traceShow :: P.Show a => a -> a traceShow a = T.trace (P.show a) a ---{-# WARNING trace "Do not use 'trace' in production code" #-} +{-# WARNING traceShowM "'traceShowM' remains in code" #-} traceShowM :: (P.Show a, P.Monad m) => a -> m () traceShowM a = T.traceM (P.show a) ---{-# WARNING traceM "Do not use 'traceM' in production code" #-} +{-# WARNING traceM "'traceM' remains in code" #-} traceM :: P.Monad m => P.String -> m () traceM = T.traceM ---{-# WARNING traceIO "Do not use 'traceIO' in production code" #-} +{-# WARNING traceIO "'traceIO' remains in code" #-} traceIO :: P.String -> P.IO () traceIO = T.traceIO +{-# WARNING notImplemented "'notImplemented' remains in code" #-} notImplemented :: a notImplemented = P.error "Not implemented" diff --git a/src/Either.hs b/src/Either.hs index 1e7809a22d..416c372d2e 100644 --- a/src/Either.hs +++ b/src/Either.hs @@ -1,4 +1,4 @@ -module P.Either ( +module Either ( maybeToLeft , maybeToRight , leftToMaybe diff --git a/src/Function.hs b/src/Function.hs deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/Protolude.hs b/src/Protolude.hs index 1c56561cdb..a5054b338f 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -84,7 +84,13 @@ import Data.List as X ( , reverse , replicate ) +import Data.Map as X (Map) +import Data.Set as X (Set) +import Data.Sequence as X (Seq) +import Data.IntMap as X (IntMap) +import Data.IntSet as X (IntSet) +-- Monad transformers import Control.Monad.State as X ( MonadState, State, @@ -127,13 +133,6 @@ import Control.Monad.Trans as X ( liftIO, ) --- Common data structure types -import Data.Map as X (Map) -import Data.Set as X (Set) -import Data.Sequence as X (Seq) -import Data.IntMap as X (IntMap) -import Data.IntSet as X (IntSet) - -- Base types import Data.Int as X import Data.Bits as X @@ -166,6 +165,7 @@ import GHC.Exts as X ( , the ) +-- Genericss import GHC.Generics ( Generic(..) , Rep From 8417d2a031004d9be21b8f5813ef9894b4882d8a Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 7 Apr 2016 17:14:57 -0400 Subject: [PATCH 004/295] fix gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 002f475233..f0c16e58ff 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +*.sw[po] .stack-work dist From ccf89378f80724bf7a3413f76af9f547fb26a7c2 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 7 Apr 2016 17:33:20 -0400 Subject: [PATCH 005/295] fix import formatting --- src/Protolude.hs | 66 ++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index a5054b338f..ba794e6a41 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -24,9 +24,9 @@ import qualified Applicative as X -- Maybe'ized version of partial functions import Safe as X ( - headMay, - initMay, - tailMay + headMay + , initMay + , tailMay ) -- Applicatives @@ -92,45 +92,45 @@ import Data.IntSet as X (IntSet) -- Monad transformers import Control.Monad.State as X ( - MonadState, - State, - StateT, - put, - get, - gets, - modify, - withState, - - runStateT, - execStateT, - evalStateT, + MonadState + , State + , StateT + , put + , get + , gets + , modify + , withState + + , runStateT + , execStateT + , evalStateT ) import Control.Monad.Reader as X ( - MonadReader, - Reader, - ReaderT, - ask, - asks, - local, - runReader, - runReaderT, + MonadReader + , Reader + , ReaderT + , ask + , asks + , local + , runReader + , runReaderT ) import Control.Monad.Except as X ( - MonadError, - Except, - ExceptT, - throwError, - catchError, - runExcept, - runExceptT, + MonadError + , Except + , ExceptT + , throwError + , catchError + , runExcept + , runExceptT ) import Control.Monad.Trans as X ( - MonadIO, - lift, - liftIO, + MonadIO + , lift + , liftIO ) -- Base types From dd6a97adfafe1f3fd088e2b4f627d6c9cf20754a Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 8 Apr 2016 11:25:58 -0400 Subject: [PATCH 006/295] hackage package --- .gitignore | 2 ++ Setup.hs | 2 ++ protolude.cabal | 11 +++++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 Setup.hs diff --git a/.gitignore b/.gitignore index f0c16e58ff..36c32bd7fd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ *.sw[po] .stack-work dist +.cabal-sandbox +cabal.sandbox.config diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000000..9a994af677 --- /dev/null +++ b/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/protolude.cabal b/protolude.cabal index 2ad777ed48..63a79ff412 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,6 +1,7 @@ name: protolude version: 0.1.0 -synopsis: A sensible start of defaults +synopsis: A sensible set of defaults for writing custom Preludes. +description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude license: MIT license-file: LICENSE @@ -16,6 +17,12 @@ tested-with: GHC == 7.10.3 Bug-Reports: https://github.com/sdiehl/protolude/issues +description: + A sensible set of defaults for writing custom Preludes. +Source-Repository head + type: git + location: git@github.com:sdiehl/protolude.git + library exposed-modules: Protolude @@ -41,7 +48,7 @@ library async >= 2.1 && <2.2, deepseq >= 1.3 && <= 1.5, containers >= 0.5 && <0.6, - semiring-simple >= 1.0 && <1.1, + semiring-simple >= 0.1 && <1.1, mtl >= 2.1 && <2.3, transformers >= 0.4 && < 0.6, text >= 1.2 && <1.3, From 6ede03c8ce1a630d1b687850d590ed4e682c738c Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 13:07:45 -0400 Subject: [PATCH 007/295] travis build --- .travis.yml | 106 ++++++++++++++++++++++++++++++++++++++++++++++++ protolude.cabal | 1 - 2 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..3ff64861b0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,106 @@ +# NB: don't set `language: haskell` here +language: c + +# See also https://github.com/hvr/multi-ghc-travis for more information + +# The following lines enable several GHC versions and/or HP versions +# to be tested; often it's enough to test only against the last +# release of a major GHC version. Setting HPVER implictly sets +# GHCVER. Omit lines with versions you don't need/want testing for. +env: + - CABALVER=1.16 GHCVER=6.12.3 + - CABALVER=1.16 GHCVER=7.0.1 + - CABALVER=1.16 GHCVER=7.0.2 + - CABALVER=1.16 GHCVER=7.0.3 + - CABALVER=1.16 GHCVER=7.0.4 + - CABALVER=1.16 GHCVER=7.2.1 + - CABALVER=1.16 GHCVER=7.2.2 + - CABALVER=1.16 GHCVER=7.4.1 + - CABALVER=1.16 GHCVER=7.4.2 + - CABALVER=1.16 GHCVER=7.6.1 + - CABALVER=1.16 GHCVER=7.6.2 + - CABALVER=1.18 GHCVER=7.6.3 + - CABALVER=1.18 GHCVER=7.8.1 + - CABALVER=1.18 GHCVER=7.8.2 + - CABALVER=1.18 GHCVER=7.8.3 + - CABALVER=1.18 GHCVER=7.8.4 + - CABALVER=1.22 GHCVER=7.10.1 + - CABALVER=1.22 GHCVER=7.10.2 +# - CABALVER=head GHCVER=head + - HPVER=2013.2.0.0 + - HPVER=2012.4.0.0 + - HPVER=2012.2.0.0 + - HPVER=2011.4.0.0 + +# Note: the distinction between `before_install` and `install` is not +# important. +before_install: + - case "$HPVER" in + "") ;; + + "2014.2.0.0") + export CABALVER=1.18 ; + export GHCVER=7.8.3 ; + echo "constraints:async==2.0.1.5,attoparsec==0.10.4.0,case-insensitive==1.1.0.3,fgl==5.5.0.1,GLUT==2.5.1.1,GLURaw==1.4.0.1,haskell-src==1.0.1.6,hashable==1.2.2.0,html==1.0.1.2,HTTP==4000.2.10,HUnit==1.2.5.2,mtl==2.1.3.1,network==2.4.2.3,OpenGL==2.9.2.0,OpenGLRaw==1.5.0.0,parallel==3.2.0.4,parsec==3.1.5,primitive==0.5.2.1,QuickCheck==2.6,random==1.0.1.1,regex-base==0.93.2,regex-compat==0.95.1,regex-posix==0.95.2,split==0.2.2,stm==2.4.2,syb==0.4.1,text==1.1.0.0,transformers==0.3.0.0,unordered-containers==0.2.4.0,vector==0.10.9.1,xhtml==3000.2.1,zlib==0.5.4.1" > cabal.config ;; + + "2013.2.0.0") + export CABALVER=1.16 ; + export GHCVER=7.6.3 ; + echo "constraints:async==2.0.1.4,attoparsec==0.10.4.0,case-insensitive==1.0.0.1,cgi==3001.1.7.5,fgl==5.4.2.4,GLUT==2.4.0.0,GLURaw==1.3.0.0,haskell-src==1.0.1.5,hashable==1.1.2.5,html==1.0.1.2,HTTP==4000.2.8,HUnit==1.2.5.2,mtl==2.1.2,network==2.4.1.2,OpenGL==2.8.0.0,OpenGLRaw==1.3.0.0,parallel==3.2.0.3,parsec==3.1.3,QuickCheck==2.6,random==1.0.1.1,regex-base==0.93.2,regex-compat==0.95.1,regex-posix==0.95.2,split==0.2.2,stm==2.4.2,syb==0.4.0,text==0.11.3.1,transformers==0.3.0.0,unordered-containers==0.2.3.0,vector==0.10.0.1,xhtml==3000.2.1,zlib==0.5.4.1" > cabal.config ;; + + "2012.4.0.0") + export CABALVER=1.16 ; + export GHCVER=7.6.2 ; + echo "constraints:async==2.0.1.3,cgi==3001.1.7.4,fgl==5.4.2.4,GLUT==2.1.2.1,haskell-src==1.0.1.5,html==1.0.1.2,HTTP==4000.2.5,HUnit==1.2.5.1,mtl==2.1.2,network==2.3.1.0,OpenGL==2.2.3.1,parallel==3.2.0.3,parsec==3.1.3,QuickCheck==2.5.1.1,random==1.0.1.1,regex-base==0.93.2,regex-compat==0.95.1,regex-posix==0.95.2,split==0.2.1.1,stm==2.4,syb==0.3.7,text==0.11.2.3,transformers==0.3.0.0,vector==0.10.0.1,xhtml==3000.2.1,zlib==0.5.4.0" > cabal.config ;; + + "2012.2.0.0") + export CABALVER=1.16 ; + export GHCVER=7.4.1 ; + echo "constraints:cgi==3001.1.7.4,fgl==5.4.2.4,GLUT==2.1.2.1,haskell-src==1.0.1.5,html==1.0.1.2,HTTP==4000.2.3,HUnit==1.2.4.2,mtl==2.1.1,network==2.3.0.13,OpenGL==2.2.3.1,parallel==3.2.0.2,parsec==3.1.2,QuickCheck==2.4.2,random==1.0.1.1,regex-base==0.93.2,regex-compat==0.95.1,regex-posix==0.95.1,stm==2.3,syb==0.3.6.1,text==0.11.2.0,transformers==0.3.0.0,xhtml==3000.2.1,zlib==0.5.3.3" > cabal.config ;; + + "2011.4.0.0") + export CABALVER=1.16 ; + export GHCVER=7.0.4 ; + echo "constraints:cgi==3001.1.7.4,fgl==5.4.2.4,GLUT==2.1.2.1,haskell-src==1.0.1.4,html==1.0.1.2,HUnit==1.2.4.2,network==2.3.0.5,OpenGL==2.2.3.0,parallel==3.1.0.1,parsec==3.1.1,QuickCheck==2.4.1.1,regex-base==0.93.2,regex-compat==0.95.1,regex-posix==0.95.1,stm==2.2.0.1,syb==0.3.3,xhtml==3000.2.0.4,zlib==0.5.3.1,HTTP==4000.1.2,deepseq==1.1.0.2" > cabal.config ;; + + *) + export GHCVER=unknown ; + echo "unknown/invalid Haskell Platform requested" ; + exit 1 ;; + + esac + + - travis_retry sudo add-apt-repository -y ppa:hvr/ghc + - travis_retry sudo apt-get update + - travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER + - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH + +install: + - cabal --version + - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]" + - travis_retry cabal update + - cabal install --only-dependencies --enable-tests --enable-benchmarks + +# Here starts the actual work to be performed for the package under +# test; any command which exits with a non-zero exit code causes the +# build to fail. +script: + - if [ -f configure.ac ]; then autoreconf -i; fi + # -v2 provides useful information for debugging + - cabal configure --enable-tests --enable-benchmarks -v2 + + # this builds all libraries and executables + # (including tests/benchmarks) + - cabal build + + - cabal test + - cabal check + + # tests that a source-distribution can be generated + - cabal sdist + + # check that the generated source-distribution can be built & installed + - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && + (cd dist && cabal install --force-reinstalls "$SRC_TGZ") + +# EOF diff --git a/protolude.cabal b/protolude.cabal index 63a79ff412..3c7c7f011f 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -40,7 +40,6 @@ library ghc-options: -Wall - -Werror build-depends: base >= 4.6 && <4.10, From 4bd0ed3e83b5762cb23f98051f877c7415b05560 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 13:20:05 -0400 Subject: [PATCH 008/295] modern ghc only --- .travis.yml | 17 ++--------------- protolude.cabal | 1 + src/Monad.hs | 13 +++++++++++++ 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3ff64861b0..4698c6a7ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,15 +8,6 @@ language: c # release of a major GHC version. Setting HPVER implictly sets # GHCVER. Omit lines with versions you don't need/want testing for. env: - - CABALVER=1.16 GHCVER=6.12.3 - - CABALVER=1.16 GHCVER=7.0.1 - - CABALVER=1.16 GHCVER=7.0.2 - - CABALVER=1.16 GHCVER=7.0.3 - - CABALVER=1.16 GHCVER=7.0.4 - - CABALVER=1.16 GHCVER=7.2.1 - - CABALVER=1.16 GHCVER=7.2.2 - - CABALVER=1.16 GHCVER=7.4.1 - - CABALVER=1.16 GHCVER=7.4.2 - CABALVER=1.16 GHCVER=7.6.1 - CABALVER=1.16 GHCVER=7.6.2 - CABALVER=1.18 GHCVER=7.6.3 @@ -26,11 +17,8 @@ env: - CABALVER=1.18 GHCVER=7.8.4 - CABALVER=1.22 GHCVER=7.10.1 - CABALVER=1.22 GHCVER=7.10.2 -# - CABALVER=head GHCVER=head - - HPVER=2013.2.0.0 - - HPVER=2012.4.0.0 - - HPVER=2012.2.0.0 - - HPVER=2011.4.0.0 + - CABALVER=1.22 GHCVER=7.10.3 + - CABALVER=head GHCVER=head # Note: the distinction between `before_install` and `install` is not # important. @@ -93,7 +81,6 @@ script: # (including tests/benchmarks) - cabal build - - cabal test - cabal check # tests that a source-distribution can be generated diff --git a/protolude.cabal b/protolude.cabal index 3c7c7f011f..d69217b4c4 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -33,6 +33,7 @@ library Debug List Monad + Show Unsafe default-extensions: diff --git a/src/Monad.hs b/src/Monad.hs index 027fdd1719..cc31e98cbe 100644 --- a/src/Monad.hs +++ b/src/Monad.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE NoImplicitPrelude #-} module Monad ( @@ -38,7 +39,12 @@ module Monad ( ) where import Prelude (concat, seq) + +#if (__GLASGOW_HASKELL__ >= 710) +import Control.Monad hiding ((<$!>)) +#else import Control.Monad +#endif concatMapM :: (Monad m) => (a -> m [b]) -> [a] -> m [b] concatMapM f xs = liftM concat (mapM f xs) @@ -54,3 +60,10 @@ liftM2' f a b = do let z = f x y z `seq` return z {-# INLINE liftM2' #-} + +(<$!>) :: Monad m => (a -> b) -> m a -> m b +f <$!> m = do + x <- m + let z = f x + z `seq` return z +{-# INLINE (<$!>) #-} From 8f6e97633c39363a26fe605f9b9462d1b258ce7b Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 14:25:20 -0400 Subject: [PATCH 009/295] backwards compat for traceM --- src/Debug.hs | 4 ++-- src/Protolude.hs | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Debug.hs b/src/Debug.hs index 9e843f35ce..d518153918 100644 --- a/src/Debug.hs +++ b/src/Debug.hs @@ -35,8 +35,8 @@ traceShowM :: (P.Show a, P.Monad m) => a -> m () traceShowM a = T.traceM (P.show a) {-# WARNING traceM "'traceM' remains in code" #-} -traceM :: P.Monad m => P.String -> m () -traceM = T.traceM +traceM :: (P.Monad m) => P.String -> m () +traceM s = T.trace s (P.return ()) {-# WARNING traceIO "'traceIO' remains in code" #-} traceIO :: P.String -> P.IO () diff --git a/src/Protolude.hs b/src/Protolude.hs index ba794e6a41..a82763e83e 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -178,12 +178,9 @@ import GHC.Generics ( , S1 , (:+:) , (:*:) - , NoSelector , Rec0 - , Par0 , Constructor(..) , Selector(..) - , Arity(..) , Fixity(..) ) From d5bdaf0c883b9457248a02c1fb6bf1537ea1c896 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 14:49:16 -0400 Subject: [PATCH 010/295] use in module traceM --- src/Debug.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Debug.hs b/src/Debug.hs index d518153918..5ca28c52e5 100644 --- a/src/Debug.hs +++ b/src/Debug.hs @@ -32,7 +32,7 @@ traceShow a = T.trace (P.show a) a {-# WARNING traceShowM "'traceShowM' remains in code" #-} traceShowM :: (P.Show a, P.Monad m) => a -> m () -traceShowM a = T.traceM (P.show a) +traceShowM a = traceM (P.show a) {-# WARNING traceM "'traceM' remains in code" #-} traceM :: (P.Monad m) => P.String -> m () @@ -44,4 +44,4 @@ traceIO = T.traceIO {-# WARNING notImplemented "'notImplemented' remains in code" #-} notImplemented :: a -notImplemented = P.error "Not implemented" +otImplemented = P.error "Not implemented" From 8cd2b4ffd3155193cb971c1e4c764b824b41b789 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 14:50:45 -0400 Subject: [PATCH 011/295] build status --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b31ff5e22b..09d600c0c4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ Protolude ========= +[![Build Status](https://travis-ci.org/sdiehl/protolude.svg?branch=master)](https://travis-ci.org/sdiehl/protolude) + A sensible starting Prelude. From 959cd272f7124948701fc11a446a04eab0dd520a Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 14:56:55 -0400 Subject: [PATCH 012/295] fix typo in fun name --- src/Debug.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Debug.hs b/src/Debug.hs index 5ca28c52e5..090351df34 100644 --- a/src/Debug.hs +++ b/src/Debug.hs @@ -44,4 +44,4 @@ traceIO = T.traceIO {-# WARNING notImplemented "'notImplemented' remains in code" #-} notImplemented :: a -otImplemented = P.error "Not implemented" +notImplemented = P.error "Not implemented" From 7a62c5d4898bb3a71d0de7570a5c86e12dfe6d25 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 15:13:13 -0400 Subject: [PATCH 013/295] functor module --- protolude.cabal | 1 + src/Debug.hs | 18 +++++++++--------- src/Functor.hs | 29 +++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 src/Functor.hs diff --git a/protolude.cabal b/protolude.cabal index d69217b4c4..56b1d6e82f 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -35,6 +35,7 @@ library Monad Show Unsafe + Functor default-extensions: NoImplicitPrelude diff --git a/src/Debug.hs b/src/Debug.hs index 090351df34..7880373dc4 100644 --- a/src/Debug.hs +++ b/src/Debug.hs @@ -1,15 +1,15 @@ {-# LANGUAGE NoImplicitPrelude #-} module Debug ( - undefined - , error - , trace - , traceM - , traceIO - , traceShow - , traceShowM - , notImplemented - ) where + undefined, + error, + trace, + traceM, + traceIO, + traceShow, + traceShowM, + notImplemented, +) where import qualified Prelude as P import qualified Debug.Trace as T diff --git a/src/Functor.hs b/src/Functor.hs new file mode 100644 index 0000000000..11addfc7bf --- /dev/null +++ b/src/Functor.hs @@ -0,0 +1,29 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE NoImplicitPrelude #-} + +module Functor ( + Functor(..), + ($>), + (<$>), + void, +) where + +#if (__GLASGOW_HASKELL__ >= 710) +import Data.Functor ( + Functor(..) + , ($>) + , (<$>) + , void + ) +#else +import Data.Functor ( + Functor(..) + , (<$>) + ) + +($>) :: Functor f => f a -> b -> f b +($>) = flip (<$) + +void :: Functor f => f a -> f () +void x = () <$ x +#endif From b3674708d48d4528c8ac587823885cf6531714e2 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 15:14:21 -0400 Subject: [PATCH 014/295] functor module --- src/Functor.hs | 2 ++ src/Protolude.hs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/Functor.hs b/src/Functor.hs index 11addfc7bf..fcb82a3fff 100644 --- a/src/Functor.hs +++ b/src/Functor.hs @@ -21,6 +21,8 @@ import Data.Functor ( , (<$>) ) +infixl 4 $> + ($>) :: Functor f => f a -> b -> f b ($>) = flip (<$) diff --git a/src/Protolude.hs b/src/Protolude.hs index a82763e83e..c6c4b8a37d 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -20,6 +20,7 @@ import qualified Show as X import qualified Bool as X import qualified Debug as X import qualified Monad as X +import qualified Functor as X import qualified Applicative as X -- Maybe'ized version of partial functions From 22fda7cedc5f4f9b9be7bf12ce3bf220c7a075eb Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 15:16:56 -0400 Subject: [PATCH 015/295] added enum class --- src/Protolude.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Protolude.hs b/src/Protolude.hs index c6c4b8a37d..23ed3f91f5 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -156,6 +156,7 @@ import Data.Function as X ( -- Base GHC types import GHC.IO as X (IO) import GHC.Num as X +import GHC.Enum as X import GHC.Real as X import GHC.Float as X import GHC.Show as X From 1c8fc29c4a028b53b14ef311e4875a9a1002ac5f Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 15:18:30 -0400 Subject: [PATCH 016/295] bring flip into scope --- src/Functor.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Functor.hs b/src/Functor.hs index fcb82a3fff..5f228b5013 100644 --- a/src/Functor.hs +++ b/src/Functor.hs @@ -21,6 +21,8 @@ import Data.Functor ( , (<$>) ) +import Data.Function (flip) + infixl 4 $> ($>) :: Functor f => f a -> b -> f b From cff538114d8dd3f852bc6a586c58e9146098435d Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 15:34:30 -0400 Subject: [PATCH 017/295] fix data.functor exports --- protolude.cabal | 9 ++++++++- src/Protolude.hs | 6 ------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/protolude.cabal b/protolude.cabal index 56b1d6e82f..7c0a233daf 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -12,8 +12,15 @@ category: Prelude build-type: Simple cabal-version: >=1.10 tested-with: + GHC == 7.6.1, + GHC == 7.6.2, GHC == 7.6.3, - GHC == 7.8.0 + GHC == 7.8.1, + GHC == 7.8.2, + GHC == 7.8.3, + GHC == 7.8.4, + GHC == 7.10.1, + GHC == 7.10.2, GHC == 7.10.3 Bug-Reports: https://github.com/sdiehl/protolude/issues diff --git a/src/Protolude.hs b/src/Protolude.hs index 23ed3f91f5..b7222a1936 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -58,12 +58,6 @@ import Data.Foldable as X hiding ( ) import Data.Semiring as X import Data.Functor.Identity as X -import Data.Functor as X ( - Functor(..) - , ($>) - , (<$>) - , void - ) -- Deepseq import Control.DeepSeq as X ( From 2c47ec726277125c8cb19981cd4751914b8c2cc3 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 15:53:25 -0400 Subject: [PATCH 018/295] selectively expose more of ghc.base --- src/Protolude.hs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index b7222a1936..edf505fc80 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Protolude ( @@ -51,10 +52,6 @@ import Data.Traversable as X import Data.Foldable as X hiding ( foldr1 , foldl1 - , maximum - , maximumBy - , minimum - , minimumBy ) import Data.Semiring as X import Data.Functor.Identity as X @@ -78,6 +75,7 @@ import Data.List as X ( , filter , reverse , replicate + , take ) import Data.Map as X (Map) import Data.Set as X (Set) @@ -139,9 +137,9 @@ import Data.Either as X import Data.Complex as X import Data.Function as X ( - id - , const + const , (.) + , ($) , flip , fix , on @@ -160,6 +158,10 @@ import GHC.Exts as X ( , FunPtr , the ) +import GHC.Base as X ( + (++) + , ($!) + ) -- Genericss import GHC.Generics ( @@ -256,7 +258,7 @@ uncons [] = Nothing uncons (x:xs) = Just (x, xs) applyN :: Int -> (a -> a) -> a -> a -applyN n f = X.foldr (.) id (X.replicate n f) +applyN n f = X.foldr (.) identity (X.replicate n f) print :: (X.MonadIO m, P.Show a) => a -> m () print = liftIO . P.print From bd5f8f1b2375ed0b4097330c244c3ba7fa775727 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 19:25:55 -0400 Subject: [PATCH 019/295] fix backwards compart for ($!) --- src/Protolude.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index edf505fc80..98f4d390b3 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -6,6 +6,7 @@ module Protolude ( identity, bool, (&), + ($!), uncons, applyN, print, @@ -160,7 +161,6 @@ import GHC.Exts as X ( ) import GHC.Base as X ( (++) - , ($!) ) -- Genericss @@ -247,6 +247,11 @@ infixl 1 & (&) :: a -> (a -> b) -> b x & f = f x +infixr 0 $! + +($!) :: (a -> b) -> a -> b +($!) = (P.$!) + bool :: a -> a -> Bool -> a bool f t b = if b then t else f From 806939605a3d3c41ed5f416e2d7b321de96bcfbe Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 19:35:23 -0400 Subject: [PATCH 020/295] better readme --- LICENSE | 2 +- README.md | 31 ++++++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index d7e3e5b9c9..4c9be4152d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014-2016, Stephen Diehl +Copyright (c) 2016, Stephen Diehl Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/README.md b/README.md index 09d600c0c4..adff75ad5c 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,33 @@ Protolude [![Build Status](https://travis-ci.org/sdiehl/protolude.svg?branch=master)](https://travis-ci.org/sdiehl/protolude) -A sensible starting Prelude. +A sensible starting Prelude for building custom Preludes. + +Supports: + + * GHC 7.6.1 + * GHC 7.6.2 + * GHC 7.6.3 + * GHC 7.8.1 + * GHC 7.8.2 + * GHC 7.8.3 + * GHC 7.8.4 + * GHC 7.10.1 + * GHC 7.10.2 + * GHC 7.10.3 + * GHC HEAD + +Usage +----- + +```haskell +{-# LANGUAGE NoImplicitPrelude #-} + +import Protolude +``` + +License +------- + +Released under the MIT License. +Copyright (c) 2016, Stephen Diehl From 1f0a5a95767ff63158aa35d8d64ecc14f9e343fa Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 19:57:02 -0400 Subject: [PATCH 021/295] backport bifunctor --- protolude.cabal | 1 + src/Applicative.hs | 3 +++ src/Bifunctor.hs | 47 ++++++++++++++++++++++++++++++++++++++++++++++ src/Bool.hs | 8 ++++++-- src/Debug.hs | 1 + src/Either.hs | 10 +++++++++- src/List.hs | 3 +++ src/Monad.hs | 4 +++- src/Protolude.hs | 9 +++++++++ src/Show.hs | 2 ++ 10 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 src/Bifunctor.hs diff --git a/protolude.cabal b/protolude.cabal index 7c0a233daf..18d006df89 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -43,6 +43,7 @@ library Show Unsafe Functor + Bifunctor default-extensions: NoImplicitPrelude diff --git a/src/Applicative.hs b/src/Applicative.hs index 5964376540..e58d8eac00 100644 --- a/src/Applicative.hs +++ b/src/Applicative.hs @@ -1,3 +1,6 @@ +{-# LANGUAGE Safe #-} +{-# LANGUAGE NoImplicitPrelude #-} + module Applicative ( orAlt, orEmpty, diff --git a/src/Bifunctor.hs b/src/Bifunctor.hs new file mode 100644 index 0000000000..62c03de6a3 --- /dev/null +++ b/src/Bifunctor.hs @@ -0,0 +1,47 @@ +{-# LANGUAGE Safe #-} +{-# LANGUAGE NoImplicitPrelude #-} + +module Bifunctor ( + Bifunctor(..) +) where + +import Data.Function (id, (.)) +import Data.Either (Either(..)) +import Control.Applicative ( Const(..) ) + +class Bifunctor p where + {-# MINIMAL bimap | first, second #-} + + bimap :: (a -> b) -> (c -> d) -> p a c -> p b d + bimap f g = first f . second g + + first :: (a -> b) -> p a c -> p b c + first f = bimap f id + + second :: (b -> c) -> p a b -> p a c + second = bimap id + +instance Bifunctor (,) where + bimap f g ~(a, b) = (f a, g b) + +instance Bifunctor ((,,) x1) where + bimap f g ~(x1, a, b) = (x1, f a, g b) + +instance Bifunctor ((,,,) x1 x2) where + bimap f g ~(x1, x2, a, b) = (x1, x2, f a, g b) + +instance Bifunctor ((,,,,) x1 x2 x3) where + bimap f g ~(x1, x2, x3, a, b) = (x1, x2, x3, f a, g b) + +instance Bifunctor ((,,,,,) x1 x2 x3 x4) where + bimap f g ~(x1, x2, x3, x4, a, b) = (x1, x2, x3, x4, f a, g b) + +instance Bifunctor ((,,,,,,) x1 x2 x3 x4 x5) where + bimap f g ~(x1, x2, x3, x4, x5, a, b) = (x1, x2, x3, x4, x5, f a, g b) + +instance Bifunctor Either where + bimap f _ (Left a) = Left (f a) + bimap _ g (Right b) = Right (g b) + +instance Bifunctor Const where + bimap f _ (Const a) = Const (f a) diff --git a/src/Bool.hs b/src/Bool.hs index 797f96c888..3b0a3a419d 100644 --- a/src/Bool.hs +++ b/src/Bool.hs @@ -1,3 +1,6 @@ +{-# LANGUAGE Safe #-} +{-# LANGUAGE NoImplicitPrelude #-} + module Bool ( whenM , unlessM @@ -6,8 +9,9 @@ module Bool ( , bool ) where -import Prelude -import Control.Monad (MonadPlus, when, unless, guard) +import Data.Bool (Bool) +import Data.Function (flip) +import Control.Monad (Monad, MonadPlus, when, unless, guard, (>>=), (=<<)) bool :: a -> a -> Bool -> a bool f t p = if p then t else f diff --git a/src/Debug.hs b/src/Debug.hs index 7880373dc4..5fd3dcd633 100644 --- a/src/Debug.hs +++ b/src/Debug.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Unsafe #-} {-# LANGUAGE NoImplicitPrelude #-} module Debug ( diff --git a/src/Either.hs b/src/Either.hs index 416c372d2e..5a18c4f5ac 100644 --- a/src/Either.hs +++ b/src/Either.hs @@ -1,3 +1,6 @@ +{-# LANGUAGE Safe #-} +{-# LANGUAGE NoImplicitPrelude #-} + module Either ( maybeToLeft , maybeToRight @@ -6,6 +9,11 @@ module Either ( , maybeToEither ) where +import Data.Function (const) +import Data.Monoid (Monoid, mempty) +import Data.Maybe (Maybe(..), maybe) +import Data.Either (Either(..), either) + leftToMaybe :: Either l r -> Maybe l leftToMaybe = either Just (const Nothing) @@ -18,5 +26,5 @@ maybeToRight l = maybe (Left l) Right maybeToLeft :: r -> Maybe l -> Either l r maybeToLeft r = maybe (Right r) Left -maybeToEither :: Monoid b => Maybe a -> Either b a +maybeToEither :: Monoid b => (a -> b) -> Maybe a -> b maybeToEither = maybe mempty diff --git a/src/List.hs b/src/List.hs index d3555ae347..efde12ce56 100644 --- a/src/List.hs +++ b/src/List.hs @@ -1,3 +1,6 @@ +{-# LANGUAGE Safe #-} +{-# LANGUAGE NoImplicitPrelude #-} + module List ( head, ordNub, diff --git a/src/Monad.hs b/src/Monad.hs index cc31e98cbe..106bf493d6 100644 --- a/src/Monad.hs +++ b/src/Monad.hs @@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-} +{-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} module Monad ( @@ -38,7 +39,8 @@ module Monad ( , (<$!>) ) where -import Prelude (concat, seq) +import Data.List (concat) +import Prelude (seq) #if (__GLASGOW_HASKELL__ >= 710) import Control.Monad hiding ((<$!>)) diff --git a/src/Protolude.hs b/src/Protolude.hs index 98f4d390b3..b145422110 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} @@ -23,6 +24,7 @@ import qualified Bool as X import qualified Debug as X import qualified Monad as X import qualified Functor as X +import qualified Either as X import qualified Applicative as X -- Maybe'ized version of partial functions @@ -57,6 +59,12 @@ import Data.Foldable as X hiding ( import Data.Semiring as X import Data.Functor.Identity as X +#if (__GLASGOW_HASKELL__ >= 710) +import Data.Bifunctor as X (Bifunctor(..)) +#else +import Bifunctor as X (Bifunctor(..)) +#endif + -- Deepseq import Control.DeepSeq as X ( NFData(..) @@ -67,6 +75,7 @@ import Control.DeepSeq as X ( -- Data structures import Data.Tuple as X +import Data.Semiring as X import Data.List as X ( splitAt , break diff --git a/src/Show.hs b/src/Show.hs index 1c3d267168..321aadb5ac 100644 --- a/src/Show.hs +++ b/src/Show.hs @@ -1,5 +1,7 @@ +{-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeSynonymInstances #-} module Show ( From 1a6ce9436f39d98b9dbb17b0ca2a7fdec9e57436 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 20:02:11 -0400 Subject: [PATCH 022/295] include either module --- protolude.cabal | 1 + 1 file changed, 1 insertion(+) diff --git a/protolude.cabal b/protolude.cabal index 18d006df89..f91c94ea9c 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -42,6 +42,7 @@ library Monad Show Unsafe + Either Functor Bifunctor From 26c148510e031b6039cc7a0ca6e8e27293d8c225 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 20:17:55 -0400 Subject: [PATCH 023/295] expose rest of safe functions --- protolude.cabal | 1 + src/Bool.hs | 12 ++++++------ src/Protolude.hs | 15 ++++++++++++++- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/protolude.cabal b/protolude.cabal index f91c94ea9c..98e2d5fd7c 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -62,6 +62,7 @@ library mtl >= 2.1 && <2.3, transformers >= 0.4 && < 0.6, text >= 1.2 && <1.3, + stm >= 2.4 && <2.5, string-conv >= 0.1 && <0.2, bytestring >= 0.10 && <0.11 diff --git a/src/Bool.hs b/src/Bool.hs index 3b0a3a419d..6dbe285b86 100644 --- a/src/Bool.hs +++ b/src/Bool.hs @@ -2,12 +2,12 @@ {-# LANGUAGE NoImplicitPrelude #-} module Bool ( - whenM - , unlessM - , ifM - , guardM - , bool - ) where + whenM +, unlessM +, ifM +, guardM +, bool +) where import Data.Bool (Bool) import Data.Function (flip) diff --git a/src/Protolude.hs b/src/Protolude.hs index b145422110..b2c0b02172 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -30,8 +30,21 @@ import qualified Applicative as X -- Maybe'ized version of partial functions import Safe as X ( headMay + , headDef , initMay + , initDef + , initSafe , tailMay + , tailDef + , tailSafe + , lastDef + , lastMay + , lookupJust + , findJust + , foldr1May + , foldl1May + , atMay + , atDef ) -- Applicatives @@ -233,10 +246,10 @@ import Control.Monad.ST as ST -- Concurrency and Parallelism import Control.Exception as X +import Control.Monad.STM as X import Control.Concurrent as X import Control.Concurrent.Async as X - import Foreign.Storable as Exports (Storable) -- Read instances hiding unsafe builtins (read) From ef5b47b4f79d9fcad28d05c88d70b3d8ab3d45ec Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 20:43:26 -0400 Subject: [PATCH 024/295] expose seq and asTypeOf --- src/Protolude.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Protolude.hs b/src/Protolude.hs index b2c0b02172..4164ea27c6 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -183,6 +183,8 @@ import GHC.Exts as X ( ) import GHC.Base as X ( (++) + , seq + , asTypeOf ) -- Genericss From 949d62cc129d1b91e1548d0e9ff854d547c990c3 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 12 Apr 2016 09:43:59 -0400 Subject: [PATCH 025/295] qualified import of ByteString fixes #4 --- protolude.cabal | 2 +- src/Protolude.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/protolude.cabal b/protolude.cabal index 98e2d5fd7c..2b570cd834 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.1.0 +version: 0.1.1 synopsis: A sensible set of defaults for writing custom Preludes. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude diff --git a/src/Protolude.hs b/src/Protolude.hs index 4164ea27c6..98acfcb7db 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -208,7 +208,7 @@ import GHC.Generics ( -- ByteString import qualified Data.ByteString.Lazy -import qualified Data.ByteString as X (ByteString) +import Data.ByteString as X (ByteString) -- Text import Data.Text as X (Text) From 33d029c1b0557dd1a2c98d1aa5f9689003cc9813 Mon Sep 17 00:00:00 2001 From: Mitchell Rosen Date: Wed, 13 Apr 2016 11:03:23 -0400 Subject: [PATCH 026/295] Fix some re-exports --- src/Protolude.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index 98acfcb7db..304b3200bc 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -214,7 +214,6 @@ import Data.ByteString as X (ByteString) import Data.Text as X (Text) import qualified Data.Text.Lazy import qualified Data.Text.IO -import Text.Printf as X (printf) import Data.Text.Lazy ( toStrict @@ -229,7 +228,7 @@ import Data.String.Conv as X ( ) -- Printf -import Text.Printf as Exports ( +import Text.Printf as X ( PrintfArg , printf , hPrintf @@ -244,7 +243,7 @@ import System.IO as X ( ) -- ST -import Control.Monad.ST as ST +import Control.Monad.ST as X -- Concurrency and Parallelism import Control.Exception as X @@ -252,7 +251,7 @@ import Control.Monad.STM as X import Control.Concurrent as X import Control.Concurrent.Async as X -import Foreign.Storable as Exports (Storable) +import Foreign.Storable as X (Storable) -- Read instances hiding unsafe builtins (read) import Text.Read as X ( From 5388b8cd4b0407749e17139d6392ee7210e9ed2e Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 13 Apr 2016 13:51:47 -0400 Subject: [PATCH 027/295] Squashed commit of the following: commit a6f62265f345c8b7a7226515171752586b0d66e5 Author: Stephen Diehl Date: Wed Apr 13 13:41:05 2016 -0400 bump version commit 1a809623cd1484ce215612e6b3ecef15015bc602 Author: Stephen Diehl Date: Wed Apr 13 13:26:11 2016 -0400 masking for ghc 8.0 specific type commit 54bafb0bb80c8450863eac53a1f3a20a21c8b0c9 Author: Stephen Diehl Date: Wed Apr 13 12:55:08 2016 -0400 bump ghc-prim for GHC 8.0 compat commit 8808d5f37369107b3e5961255089a8a9e02bf3d5 Author: Stephen Diehl Date: Wed Apr 13 12:53:39 2016 -0400 expose base State transformers commit 05c32a4542aa66f715aea3855e140f74e97d4852 Author: Stephen Diehl Date: Wed Apr 13 12:46:00 2016 -0400 adds compiler-independent base module --- protolude.cabal | 30 +++++++++++--------- src/Applicative.hs | 5 ++-- src/Base.hs | 57 ++++++++++++++++++++++++++++++++++++++ src/Monad.hs | 4 +-- src/Protolude.hs | 69 +++++++++++++++++++--------------------------- src/Show.hs | 18 ++++++------ src/Unsafe.hs | 35 +++++++++++++---------- 7 files changed, 137 insertions(+), 81 deletions(-) create mode 100644 src/Base.hs diff --git a/protolude.cabal b/protolude.cabal index 2b570cd834..f4b82b4993 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.1.1 +version: 0.1.2 synopsis: A sensible set of defaults for writing custom Preludes. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude @@ -33,37 +33,41 @@ Source-Repository head library exposed-modules: Protolude + Unsafe other-modules: + Base Applicative Bool Debug List Monad Show - Unsafe Either Functor Bifunctor default-extensions: NoImplicitPrelude + OverloadedStrings + MultiParamTypeClasses ghc-options: -Wall build-depends: - base >= 4.6 && <4.10, - safe >= 0.3 && <0.4, - async >= 2.1 && <2.2, - deepseq >= 1.3 && <= 1.5, - containers >= 0.5 && <0.6, - semiring-simple >= 0.1 && <1.1, - mtl >= 2.1 && <2.3, - transformers >= 0.4 && < 0.6, - text >= 1.2 && <1.3, - stm >= 2.4 && <2.5, - string-conv >= 0.1 && <0.2, + base >= 4.6 && <4.10, + ghc-prim >= 0.3 && <0.6, + safe >= 0.3 && <0.4, + async >= 2.1 && <2.2, + deepseq >= 1.3 && <= 1.5, + containers >= 0.5 && <0.6, + semiring-simple >= 0.1 && <1.1, + mtl >= 2.1 && <2.3, + transformers >= 0.4 && < 0.6, + text >= 1.2 && <1.3, + stm >= 2.4 && <2.5, + string-conv >= 0.1 && <0.2, bytestring >= 0.10 && <0.11 hs-source-dirs: src diff --git a/src/Applicative.hs b/src/Applicative.hs index e58d8eac00..fe2cbed97a 100644 --- a/src/Applicative.hs +++ b/src/Applicative.hs @@ -7,9 +7,10 @@ module Applicative ( eitherA, ) where -import Data.Monoid +import Data.Bool (Bool) +import Data.Either (Either(..)) +import Data.Monoid (Monoid(..)) import Control.Applicative -import Prelude (Bool, Either(..)) orAlt :: (Alternative f, Monoid a) => f a -> f a orAlt f = f <|> pure mempty diff --git a/src/Base.hs b/src/Base.hs new file mode 100644 index 0000000000..280c7b11fc --- /dev/null +++ b/src/Base.hs @@ -0,0 +1,57 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE Unsafe #-} +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE NoImplicitPrelude #-} + +module Base ( + module X, + ($!), +) where + +-- Glorious Glashgow Haskell Compiler +#if defined(__GLASGOW_HASKELL__) && ( __GLASGOW_HASKELL__ >= 600 ) + +-- Base GHC types +import GHC.Num as X +import GHC.Enum as X +import GHC.Real as X +import GHC.Float as X +import GHC.Show as X +import GHC.Exts as X ( + Constraint + , Ptr + , FunPtr + , the + ) +import GHC.Base as X ( + (++) + , seq + , asTypeOf + ) +import System.IO as X ( + print + , putStr + , putStrLn + ) + +#if ( __GLASGOW_HASKELL__ >= 800 ) +import GHC.Types as X hiding (Any) +#else +import GHC.Types as X +#endif + +infixr 0 $! + +($!) :: (a -> b) -> a -> b +f $! x = let !vx = x in f vx + +#endif + +-- Simple Haskell Compiler +#if defined(__SHC_HASKELL__) + +import SHC.Prim as X +import SHC.Types as X +import SHC.Classes as X + +#endif diff --git a/src/Monad.hs b/src/Monad.hs index 106bf493d6..0befd9cec8 100644 --- a/src/Monad.hs +++ b/src/Monad.hs @@ -1,5 +1,5 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE Safe #-} +{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} module Monad ( @@ -39,8 +39,8 @@ module Monad ( , (<$!>) ) where +import Base (seq) import Data.List (concat) -import Prelude (seq) #if (__GLASGOW_HASKELL__ >= 710) import Control.Monad hiding ((<$!>)) diff --git a/src/Protolude.hs b/src/Protolude.hs index 304b3200bc..d3fc34d765 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -1,13 +1,13 @@ {-# LANGUAGE CPP #-} +{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Protolude ( module X, + module Base, identity, - bool, (&), - ($!), uncons, applyN, print, @@ -16,16 +16,23 @@ module Protolude ( LByteString, ) where -import qualified Prelude as P - -import qualified List as X -import qualified Show as X -import qualified Bool as X -import qualified Debug as X -import qualified Monad as X -import qualified Functor as X -import qualified Either as X -import qualified Applicative as X +{-import qualified Prelude as P-} + +import List as X +import Show as X +import Bool as X +import Debug as X +import Monad as X +import Functor as X +import Either as X +import Applicative as X + +import Base as Base hiding ( + putStr + , putStrLn + , print + ) +import qualified Base as PBase -- Maybe'ized version of partial functions import Safe as X ( @@ -88,7 +95,6 @@ import Control.DeepSeq as X ( -- Data structures import Data.Tuple as X -import Data.Semiring as X import Data.List as X ( splitAt , break @@ -99,6 +105,8 @@ import Data.List as X ( , reverse , replicate , take + , zipWith + , zip ) import Data.Map as X (Map) import Data.Set as X (Set) @@ -117,6 +125,10 @@ import Control.Monad.State as X ( , modify , withState + , runState + , execState + , evalState + , runStateT , execStateT , evalStateT @@ -168,24 +180,6 @@ import Data.Function as X ( , on ) --- Base GHC types -import GHC.IO as X (IO) -import GHC.Num as X -import GHC.Enum as X -import GHC.Real as X -import GHC.Float as X -import GHC.Show as X -import GHC.Exts as X ( - Constraint - , Ptr - , FunPtr - , the - ) -import GHC.Base as X ( - (++) - , seq - , asTypeOf - ) -- Genericss import GHC.Generics ( @@ -225,6 +219,7 @@ import Data.String.Conv as X ( , toS , toSL , Leniency(..) + , StringConv ) -- Printf @@ -270,14 +265,6 @@ infixl 1 & (&) :: a -> (a -> b) -> b x & f = f x -infixr 0 $! - -($!) :: (a -> b) -> a -> b -($!) = (P.$!) - -bool :: a -> a -> Bool -> a -bool f t b = if b then t else f - identity :: a -> a identity x = x @@ -288,5 +275,5 @@ uncons (x:xs) = Just (x, xs) applyN :: Int -> (a -> a) -> a -> a applyN n f = X.foldr (.) identity (X.replicate n f) -print :: (X.MonadIO m, P.Show a) => a -> m () -print = liftIO . P.print +print :: (X.MonadIO m, PBase.Show a) => a -> m () +print = liftIO . PBase.print diff --git a/src/Show.hs b/src/Show.hs index 321aadb5ac..a4beda42f5 100644 --- a/src/Show.hs +++ b/src/Show.hs @@ -1,8 +1,9 @@ -{-# LANGUAGE Safe #-} +{-# LANGUAGE Trustworthy #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeSynonymInstances #-} +{-# LANGUAGE ExtendedDefaultRules #-} module Show ( Print(..), @@ -10,8 +11,8 @@ module Show ( putLText, ) where -import Prelude ((.), Char, IO) -import qualified Prelude +import qualified Base +import Data.Function ((.)) import Control.Monad.IO.Class (MonadIO, liftIO) import qualified Data.ByteString.Char8 as BS @@ -23,6 +24,7 @@ import qualified Data.Text.IO as T import qualified Data.Text.Lazy as TL import qualified Data.Text.Lazy.IO as TL + class Print a where putStr :: MonadIO m => a -> m () putStrLn :: MonadIO m => a -> m () @@ -43,15 +45,15 @@ instance Print BL.ByteString where putStr = liftIO . BL.putStr putStrLn = liftIO . BL.putStrLn -instance Print [Char] where - putStr = liftIO . Prelude.putStr - putStrLn = liftIO . Prelude.putStrLn +instance Print [Base.Char] where + putStr = liftIO . Base.putStr + putStrLn = liftIO . Base.putStrLn -- For forcing type inference putText :: MonadIO m => T.Text -> m () putText = putStrLn -{-# SPECIALIZE putText :: T.Text -> IO () #-} +{-# SPECIALIZE putText :: T.Text -> Base.IO () #-} putLText :: MonadIO m => TL.Text -> m () putLText = putStrLn -{-# SPECIALIZE putLText :: TL.Text -> IO () #-} +{-# SPECIALIZE putLText :: TL.Text -> Base.IO () #-} diff --git a/src/Unsafe.hs b/src/Unsafe.hs index 49d0eb0d73..5e0ba5b83d 100644 --- a/src/Unsafe.hs +++ b/src/Unsafe.hs @@ -1,28 +1,33 @@ +{-# LANGUAGE Unsafe #-} {-# LANGUAGE NoImplicitPrelude #-} -module Unsafe where +module Unsafe ( + unsafeHead, + unsafeTail, + unsafeInit, + unsafeLast, + fromJust, + unsafeIndex, +) where -import qualified Prelude -import qualified Data.Maybe -import qualified Data.List +import Base (Int) +import qualified Data.List as List +import qualified Data.Maybe as Maybe unsafeHead :: [a] -> a -unsafeHead = Prelude.head +unsafeHead = List.head unsafeTail :: [a] -> [a] -unsafeTail = Prelude.tail +unsafeTail = List.tail unsafeInit :: [a] -> [a] -unsafeInit = Prelude.init +unsafeInit = List.init unsafeLast :: [a] -> a -unsafeLast = Prelude.last +unsafeLast = List.last -fromJust :: Prelude.Maybe a -> a -fromJust = Data.Maybe.fromJust +fromJust :: Maybe.Maybe a -> a +fromJust = Maybe.fromJust -unsafeIndex :: [a] -> Prelude.Int -> a -unsafeIndex = (Data.List.!!) - -(!!) :: [a] -> Prelude.Int -> a -(!!) = (Data.List.!!) +unsafeIndex :: [a] -> Int -> a +unsafeIndex = (List.!!) From a14ad9bdd6b0922909360f177f3b15f6f41d5779 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 13 Apr 2016 15:20:15 -0400 Subject: [PATCH 028/295] all non-partial list functions --- src/Protolude.hs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/Protolude.hs b/src/Protolude.hs index d3fc34d765..04bddec928 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -105,6 +105,23 @@ import Data.List as X ( , reverse , replicate , take + , sortBy + , sort + , intersperse + , transpose + , subsequences + , permutations + , scanl + , scanr + , iterate + , repeat + , cycle + , unfoldr + , takeWhile + , dropWhile + , group + , inits + , tails , zipWith , zip ) From 26d679e25775db94762b1bd583497268d849b240 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 13 Apr 2016 16:12:55 -0400 Subject: [PATCH 029/295] explicit base types, IsString export, Proxy --- src/Base.hs | 23 ++++++++++++++++------- src/Protolude.hs | 16 ++++++++++++---- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/Base.hs b/src/Base.hs index 280c7b11fc..791592322e 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -16,17 +16,21 @@ import GHC.Num as X import GHC.Enum as X import GHC.Real as X import GHC.Float as X -import GHC.Show as X +import GHC.Show as X ( + Show(..) + ) import GHC.Exts as X ( Constraint , Ptr , FunPtr - , the ) import GHC.Base as X ( (++) , seq , asTypeOf + , ord + , maxInt + , minInt ) import System.IO as X ( print @@ -34,11 +38,15 @@ import System.IO as X ( , putStrLn ) -#if ( __GLASGOW_HASKELL__ >= 800 ) -import GHC.Types as X hiding (Any) -#else -import GHC.Types as X -#endif +import GHC.Types as X ( + Bool + , Char + , Int + , Word + , Ordering + , IO + , Coercible + ) infixr 0 $! @@ -47,6 +55,7 @@ f $! x = let !vx = x in f vx #endif + -- Simple Haskell Compiler #if defined(__SHC_HASKELL__) diff --git a/src/Protolude.hs b/src/Protolude.hs index 04bddec928..1ccbf09780 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -16,8 +16,6 @@ module Protolude ( LByteString, ) where -{-import qualified Prelude as P-} - import List as X import Show as X import Bool as X @@ -130,6 +128,9 @@ import Data.Set as X (Set) import Data.Sequence as X (Seq) import Data.IntMap as X (IntMap) import Data.IntSet as X (IntSet) +import Data.Proxy as X ( + Proxy(..) + ) -- Monad transformers import Control.Monad.State as X ( @@ -183,10 +184,15 @@ import Data.Int as X import Data.Bits as X import Data.Word as X import Data.Bool as X hiding (bool) -import Data.Char as X (Char) +import Data.Char as X (chr) import Data.Maybe as X hiding (fromJust) import Data.Either as X import Data.Complex as X +import Data.Void as X ( + Void + , absurd + , vacuous + ) import Data.Function as X ( const @@ -197,7 +203,6 @@ import Data.Function as X ( , on ) - -- Genericss import GHC.Generics ( Generic(..) @@ -239,6 +244,8 @@ import Data.String.Conv as X ( , StringConv ) +import Data.String as X (IsString) + -- Printf import Text.Printf as X ( PrintfArg @@ -248,6 +255,7 @@ import Text.Printf as X ( -- IO import System.Exit as X +--import System.Info as X import System.Environment as X (getArgs) import System.IO as X ( Handle From f6fca1059d209f8d152ede3f73376c9a88ad3919 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 13 Apr 2016 16:28:37 -0400 Subject: [PATCH 030/295] not worth backporting void --- src/Protolude.hs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index 1ccbf09780..8b01cd3ff1 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -188,11 +188,6 @@ import Data.Char as X (chr) import Data.Maybe as X hiding (fromJust) import Data.Either as X import Data.Complex as X -import Data.Void as X ( - Void - , absurd - , vacuous - ) import Data.Function as X ( const From ef52c8d507eae812ca52096efd3b46020c4573be Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 13 Apr 2016 16:36:42 -0400 Subject: [PATCH 031/295] gracefully handle 7.10 modules if present --- src/Base.hs | 2 ++ src/Protolude.hs | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/src/Base.hs b/src/Base.hs index 791592322e..239f25d18a 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -45,7 +45,9 @@ import GHC.Types as X ( , Word , Ordering , IO +#if ( __GLASGOW_HASKELL__ >= 710 ) , Coercible +#endif ) infixr 0 $! diff --git a/src/Protolude.hs b/src/Protolude.hs index 8b01cd3ff1..e9d9efb377 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -128,10 +128,19 @@ import Data.Set as X (Set) import Data.Sequence as X (Seq) import Data.IntMap as X (IntMap) import Data.IntSet as X (IntSet) + +#if ( __GLASGOW_HASKELL__ >= 710 ) import Data.Proxy as X ( Proxy(..) ) +import Data.Void as X ( + Void + , absurd + , vacuous + ) +#endif + -- Monad transformers import Control.Monad.State as X ( MonadState From cbaa117b8a3ff67d70fdc8094ed9d6ab5a24a98f Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 13 Apr 2016 16:39:47 -0400 Subject: [PATCH 032/295] brenden's list function --- src/List.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/List.hs b/src/List.hs index efde12ce56..c820ae8731 100644 --- a/src/List.hs +++ b/src/List.hs @@ -5,6 +5,7 @@ module List ( head, ordNub, sortOn, + list, ) where import Data.List (sortBy) @@ -30,3 +31,8 @@ ordNub l = go Set.empty l if x `Set.member` s then go s xs else x : go (Set.insert x s) xs + +list :: [b] -> (a -> b) -> [a] -> [b] +list def f xs = case xs of + [] -> def + _ -> fmap f xs From 76bc617db9566a2762eb176d7c84e39f58772642 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 13 Apr 2016 17:09:10 -0400 Subject: [PATCH 033/295] functor include --- src/List.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/List.hs b/src/List.hs index c820ae8731..6d1261ec8a 100644 --- a/src/List.hs +++ b/src/List.hs @@ -13,6 +13,7 @@ import Data.Maybe (Maybe(..)) import Data.Ord (Ord, comparing) import Data.Foldable (Foldable, foldr) import Data.Function ((.)) +import Data.Functor (fmap) import Control.Monad (return) import qualified Data.Set as Set From 8bf3029d011bba7eefba2cc969160152c5a8b1dd Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 13 Apr 2016 18:39:39 -0400 Subject: [PATCH 034/295] design points in readme --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index adff75ad5c..49483fdcc5 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,23 @@ Protolude ========= [![Build Status](https://travis-ci.org/sdiehl/protolude.svg?branch=master)](https://travis-ci.org/sdiehl/protolude) +[![Hackage](https://img.shields.io/hackage/v/protolude.svg)](https://hackage.haskell.org/package/protolude) A sensible starting Prelude for building custom Preludes. +Design points: + +* Banishes String. +* Banishes partial functions. +* compiler warning on bottoms. +* Foldable / Traversable by default. +* Polymorphic string IO functions. +* Automatic string conversions. +* Type synonyms for major data structures. +* Basic monad transformers in scope by default. +* Unsafe functions are prefixed with "unsafe" in separate module. +* Compiler agnostic, GHC internal modules are abstracted out into Base. + Supports: * GHC 7.6.1 From ea709c29458c70e62336016df42daaf6d619e71c Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 14 Apr 2016 14:01:38 -0400 Subject: [PATCH 035/295] Squashed commit of the following: commit 416dc35d5a6ead5ce62063b56539d899e91bfd36 Author: Stephen Diehl Date: Thu Apr 14 14:00:23 2016 -0400 fix readme formatting commit 8bf3029d011bba7eefba2cc969160152c5a8b1dd Author: Stephen Diehl Date: Wed Apr 13 18:39:39 2016 -0400 design points in readme commit 76bc617db9566a2762eb176d7c84e39f58772642 Author: Stephen Diehl Date: Wed Apr 13 17:09:10 2016 -0400 functor include commit cbaa117b8a3ff67d70fdc8094ed9d6ab5a24a98f Author: Stephen Diehl Date: Wed Apr 13 16:39:47 2016 -0400 brenden's list function commit ef52c8d507eae812ca52096efd3b46020c4573be Author: Stephen Diehl Date: Wed Apr 13 16:36:42 2016 -0400 gracefully handle 7.10 modules if present commit f6fca1059d209f8d152ede3f73376c9a88ad3919 Author: Stephen Diehl Date: Wed Apr 13 16:28:37 2016 -0400 not worth backporting void commit 26d679e25775db94762b1bd583497268d849b240 Author: Stephen Diehl Date: Wed Apr 13 16:12:55 2016 -0400 explicit base types, IsString export, Proxy commit a14ad9bdd6b0922909360f177f3b15f6f41d5779 Author: Stephen Diehl Date: Wed Apr 13 15:20:15 2016 -0400 all non-partial list functions --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 49483fdcc5..aa2fbec7cf 100644 --- a/README.md +++ b/README.md @@ -10,12 +10,12 @@ Design points: * Banishes String. * Banishes partial functions. -* compiler warning on bottoms. -* Foldable / Traversable by default. +* Compiler warning on bottoms. * Polymorphic string IO functions. * Automatic string conversions. * Type synonyms for major data structures. * Basic monad transformers in scope by default. +* Foldable / Traversable functions in scope by default. * Unsafe functions are prefixed with "unsafe" in separate module. * Compiler agnostic, GHC internal modules are abstracted out into Base. From ed6d680c700616a3bc8112f7b0304264034fa9e6 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 16 Apr 2016 11:08:30 -0400 Subject: [PATCH 036/295] bump version --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index f4b82b4993..54811fd5fc 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.1.2 +version: 0.1.3 synopsis: A sensible set of defaults for writing custom Preludes. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude From e442b31203f101ab8e5086fa2650c297bcaecc93 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 18 Apr 2016 10:35:34 -0400 Subject: [PATCH 037/295] polymorphic show func --- protolude.cabal | 1 + src/Protolude.hs | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/protolude.cabal b/protolude.cabal index 54811fd5fc..d0eb8df5dc 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -50,6 +50,7 @@ library default-extensions: NoImplicitPrelude OverloadedStrings + FlexibleContexts MultiParamTypeClasses ghc-options: diff --git a/src/Protolude.hs b/src/Protolude.hs index e9d9efb377..6c6a056f04 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -7,10 +7,12 @@ module Protolude ( module X, module Base, identity, + map, (&), uncons, applyN, print, + show, LText, LByteString, @@ -29,9 +31,13 @@ import Base as Base hiding ( putStr , putStrLn , print + , show ) import qualified Base as PBase +-- Used for 'show' +import Data.String (String) + -- Maybe'ized version of partial functions import Safe as X ( headMay @@ -297,6 +303,9 @@ x & f = f x identity :: a -> a identity x = x +map :: Functor f => (a -> b) -> f a -> f b +map = fmap + uncons :: [a] -> Maybe (a, [a]) uncons [] = Nothing uncons (x:xs) = Just (x, xs) @@ -306,3 +315,6 @@ applyN n f = X.foldr (.) identity (X.replicate n f) print :: (X.MonadIO m, PBase.Show a) => a -> m () print = liftIO . PBase.print + +show :: (Show a, StringConv String b) => a -> b +show x = toS (PBase.show x) From da7da2fe75148e34112dea20fc130027801b99d5 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 18 Apr 2016 10:51:02 -0400 Subject: [PATCH 038/295] mask fail function --- src/Monad.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Monad.hs b/src/Monad.hs index 0befd9cec8..9c38e65ccb 100644 --- a/src/Monad.hs +++ b/src/Monad.hs @@ -3,7 +3,7 @@ {-# LANGUAGE NoImplicitPrelude #-} module Monad ( - Monad(..) + Monad((>>=), return) , MonadPlus(..) , (=<<) From 4b3caa5c1850b0a05d6e8bf0ff7346863985c848 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 18 Apr 2016 11:09:03 -0400 Subject: [PATCH 039/295] bring 7.10 type-level equality into scope --- README.md | 6 ++++-- src/Monad.hs | 4 ++-- src/Protolude.hs | 26 +++++++++++++++++++++++--- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index aa2fbec7cf..1a12f9c0e3 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,11 @@ Design points: * Banishes partial functions. * Compiler warning on bottoms. * Polymorphic string IO functions. +* Polymorphic show. * Automatic string conversions. -* Type synonyms for major data structures. -* Basic monad transformers in scope by default. +* Type for common data structures in scope. +* Type for all common string types in scope. +* StateT/ReaderT/ExceptT transformers in scope by default. * Foldable / Traversable functions in scope by default. * Unsafe functions are prefixed with "unsafe" in separate module. * Compiler agnostic, GHC internal modules are abstracted out into Base. diff --git a/src/Monad.hs b/src/Monad.hs index 9c38e65ccb..370e641ba5 100644 --- a/src/Monad.hs +++ b/src/Monad.hs @@ -48,8 +48,8 @@ import Control.Monad hiding ((<$!>)) import Control.Monad #endif -concatMapM :: (Monad m) => (a -> m [b]) -> [a] -> m [b] -concatMapM f xs = liftM concat (mapM f xs) +concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b] +concatMapM f xs = fmap concat (mapM f xs) liftM' :: Monad m => (a -> b) -> m a -> m b liftM' = (<$!>) diff --git a/src/Protolude.hs b/src/Protolude.hs index 6c6a056f04..97a731aa22 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -1,6 +1,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE ExplicitNamespaces #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Protolude ( @@ -129,6 +130,7 @@ import Data.List as X ( , zipWith , zip ) + import Data.Map as X (Map) import Data.Set as X (Set) import Data.Sequence as X (Seq) @@ -140,6 +142,24 @@ import Data.Proxy as X ( Proxy(..) ) +import Data.Typeable as X ( + TypeRep, + ) + +import Data.Type.Coercion as X ( + Coercion(..) + , coerceWith + ) + +import Data.Type.Equality as X ( + (:~:)(..) + , type (==) + , sym + , trans + , castWith + , gcastWith + ) + import Data.Void as X ( Void , absurd @@ -198,11 +218,11 @@ import Control.Monad.Trans as X ( import Data.Int as X import Data.Bits as X import Data.Word as X -import Data.Bool as X hiding (bool) -import Data.Char as X (chr) -import Data.Maybe as X hiding (fromJust) import Data.Either as X import Data.Complex as X +import Data.Char as X (chr) +import Data.Bool as X hiding (bool) +import Data.Maybe as X hiding (fromJust) import Data.Function as X ( const From 8756b6507b7c799f1a4c7ca3d0e637a6ef7c1990 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 18 Apr 2016 11:17:02 -0400 Subject: [PATCH 040/295] unbreak functor/monad issue in old ghc vers --- src/Monad.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Monad.hs b/src/Monad.hs index 370e641ba5..a29c7f7b68 100644 --- a/src/Monad.hs +++ b/src/Monad.hs @@ -49,7 +49,7 @@ import Control.Monad #endif concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b] -concatMapM f xs = fmap concat (mapM f xs) +concatMapM f xs = liftM concat (mapM f xs) liftM' :: Monad m => (a -> b) -> m a -> m b liftM' = (<$!>) From aecd72fa5c88b5b6221121744e6a8813f917136b Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 18 Apr 2016 13:39:36 -0400 Subject: [PATCH 041/295] ghc 8.0 record and typeintype prelude objects --- src/Base.hs | 12 ++++++++++++ src/Protolude.hs | 15 +++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/Base.hs b/src/Base.hs index 239f25d18a..d3a3aeb2a8 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -1,6 +1,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE Unsafe #-} {-# LANGUAGE BangPatterns #-} +{-# LANGUAGE ExplicitNamespaces #-} {-# LANGUAGE NoImplicitPrelude #-} module Base ( @@ -50,6 +51,17 @@ import GHC.Types as X ( #endif ) +#if ( __GLASGOW_HASKELL__ >= 800 ) +import GHC.OverloadedLabels as X ( + IsLabel(..) + ) + +import Data.Kind as X ( + type (*) + , type Type + ) +#endif + infixr 0 $! ($!) :: (a -> b) -> a -> b diff --git a/src/Protolude.hs b/src/Protolude.hs index 97a731aa22..282838d93e 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -1,7 +1,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} -{-# LANGUAGE ExplicitNamespaces #-} +{-# LANGUAGE ExplicitNamespaces #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Protolude ( @@ -84,6 +84,10 @@ import Data.Foldable as X hiding ( import Data.Semiring as X import Data.Functor.Identity as X +#if ( __GLASGOW_HASKELL__ >= 800 ) +import Data.Semigroup as X ( Semigroup(..) ) +#endif + #if (__GLASGOW_HASKELL__ >= 710) import Data.Bifunctor as X (Bifunctor(..)) #else @@ -143,7 +147,11 @@ import Data.Proxy as X ( ) import Data.Typeable as X ( - TypeRep, + TypeRep + , Typeable + , typeRep + , cast + , eqT ) import Data.Type.Coercion as X ( @@ -250,6 +258,9 @@ import GHC.Generics ( , Constructor(..) , Selector(..) , Fixity(..) +#if ( __GLASGOW_HASKELL__ >= 800 ) + , Meta(..) +#endif ) -- ByteString From 5c8186f6181ed6ad9fe7b273ea1b4dc2e4a845fd Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 18 Apr 2016 13:50:18 -0400 Subject: [PATCH 042/295] handle semigroup monoid 8.0 compat --- README.md | 1 + src/Base.hs | 4 ++++ src/Protolude.hs | 7 ++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a12f9c0e3..058399f0d3 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Design points: * Foldable / Traversable functions in scope by default. * Unsafe functions are prefixed with "unsafe" in separate module. * Compiler agnostic, GHC internal modules are abstracted out into Base. +* Compatibility with GHC 8.0. Supports: diff --git a/src/Base.hs b/src/Base.hs index d3a3aeb2a8..f77805d995 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -56,6 +56,10 @@ import GHC.OverloadedLabels as X ( IsLabel(..) ) +import GHC.Records as X ( + HasField(..) + ) + import Data.Kind as X ( type (*) , type Type diff --git a/src/Protolude.hs b/src/Protolude.hs index 282838d93e..0d821a3e89 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -75,7 +75,6 @@ import Control.Applicative as X ( -- Base typeclasses import Data.Eq as X import Data.Ord as X -import Data.Monoid as X import Data.Traversable as X import Data.Foldable as X hiding ( foldr1 @@ -85,7 +84,10 @@ import Data.Semiring as X import Data.Functor.Identity as X #if ( __GLASGOW_HASKELL__ >= 800 ) +import Data.Monoid as X hiding ((<>)) import Data.Semigroup as X ( Semigroup(..) ) +#else +import Data.Monoid as X #endif #if (__GLASGOW_HASKELL__ >= 710) @@ -349,3 +351,6 @@ print = liftIO . PBase.print show :: (Show a, StringConv String b) => a -> b show x = toS (PBase.show x) +{-# SPECIALIZE show :: Show a => a -> String #-} +{-# SPECIALIZE show :: Show a => a -> Text #-} +{-# SPECIALIZE show :: Show a => a -> LText #-} From 2c83d2dbf682664b1c92328110e1502b00708064 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 18 Apr 2016 14:02:58 -0400 Subject: [PATCH 043/295] data.records still in flux upstream --- README.md | 3 +++ src/Base.hs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 058399f0d3..4c7512b8af 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,9 @@ Design points: * Unsafe functions are prefixed with "unsafe" in separate module. * Compiler agnostic, GHC internal modules are abstracted out into Base. * Compatibility with GHC 8.0. +* Includes Semiring for GHC >= 7.6. +* Includes Bifunctor for GHC >= 7.6. +* Includes Semigroup for GHC >= 7.6. Supports: diff --git a/src/Base.hs b/src/Base.hs index f77805d995..ce4e3dfacc 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -56,9 +56,11 @@ import GHC.OverloadedLabels as X ( IsLabel(..) ) +{- import GHC.Records as X ( HasField(..) ) +-} import Data.Kind as X ( type (*) From c0b161602d090d940f8c693eed137a85a84d935c Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 18 Apr 2016 18:09:50 -0400 Subject: [PATCH 044/295] export generics --- .ghci | 2 ++ protolude.cabal | 1 + src/Protolude.hs | 7 ++----- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.ghci b/.ghci index 29a3cb319a..0d49fe5cb3 100644 --- a/.ghci +++ b/.ghci @@ -1 +1,3 @@ :set -XNoImplicitPrelude +:set -XOverloadedStrings +import Prelude () diff --git a/protolude.cabal b/protolude.cabal index d0eb8df5dc..558b004ace 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -55,6 +55,7 @@ library ghc-options: -Wall + -fwarn-implicit-prelude build-depends: base >= 4.6 && <4.10, diff --git a/src/Protolude.hs b/src/Protolude.hs index 0d821a3e89..7c7a2d5e07 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -244,7 +244,7 @@ import Data.Function as X ( ) -- Genericss -import GHC.Generics ( +import GHC.Generics as X ( Generic(..) , Rep , K1(..) @@ -300,10 +300,7 @@ import Text.Printf as X ( import System.Exit as X --import System.Info as X import System.Environment as X (getArgs) -import System.IO as X ( - Handle - , hClose - ) +import System.IO as X (Handle) -- ST import Control.Monad.ST as X From fba329438fe9eb15a0dea8e38c3c125b7c0886f7 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 19 Apr 2016 09:13:06 -0400 Subject: [PATCH 045/295] bump version --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index 558b004ace..9df665958a 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.1.3 +version: 0.1.4 synopsis: A sensible set of defaults for writing custom Preludes. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude From 0b3090973e612063f8a99a9275316aea4cb6a14f Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 19 Apr 2016 09:32:59 -0400 Subject: [PATCH 046/295] pulling semiring in module --- protolude.cabal | 2 +- src/Protolude.hs | 2 +- src/Semiring.hs | 19 +++++++++++++++++++ stack.yaml | 27 --------------------------- 4 files changed, 21 insertions(+), 29 deletions(-) create mode 100644 src/Semiring.hs diff --git a/protolude.cabal b/protolude.cabal index 9df665958a..f7d830376a 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -45,6 +45,7 @@ library Show Either Functor + Semiring Bifunctor default-extensions: @@ -64,7 +65,6 @@ library async >= 2.1 && <2.2, deepseq >= 1.3 && <= 1.5, containers >= 0.5 && <0.6, - semiring-simple >= 0.1 && <1.1, mtl >= 2.1 && <2.3, transformers >= 0.4 && < 0.6, text >= 1.2 && <1.3, diff --git a/src/Protolude.hs b/src/Protolude.hs index 7c7a2d5e07..9fb1847ce5 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -80,7 +80,7 @@ import Data.Foldable as X hiding ( foldr1 , foldl1 ) -import Data.Semiring as X +import Semiring as X import Data.Functor.Identity as X #if ( __GLASGOW_HASKELL__ >= 800 ) diff --git a/src/Semiring.hs b/src/Semiring.hs new file mode 100644 index 0000000000..8699015f2c --- /dev/null +++ b/src/Semiring.hs @@ -0,0 +1,19 @@ +{-# LANGUAGE Safe #-} +{-# LANGUAGE NoImplicitPrelude #-} + +module Semiring ( + Semiring(..), + zero, +) where + +import Data.Monoid + +-- | Alias for 'mempty' +zero :: Monoid m => m +zero = mempty + +class Monoid m => Semiring m where + {-# MINIMAL one, (<.>) #-} + + one :: m + (<.>) :: m -> m -> m diff --git a/stack.yaml b/stack.yaml index 029f3726ed..5681c69450 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,34 +1,7 @@ -# For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md - -# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2) resolver: lts-5.10 - -# Local packages, usually specified by relative directory name packages: - '.' - -# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3) extra-deps: -- semiring-simple-1.0.0.1 - string-conv-0.1 - -# Override default flag values for local packages and extra-deps flags: {} - -# Extra package databases containing global packages extra-package-dbs: [] - -# Control whether we use the GHC we find on the path -# system-ghc: true - -# Require a specific version of stack, using version ranges -# require-stack-version: -any # Default -# require-stack-version: >= 0.1.4.0 - -# Override the architecture used by stack, especially useful on Windows -# arch: i386 -# arch: x86_64 - -# Extra directories used by stack for building -# extra-include-dirs: [/path/to/dir] -# extra-lib-dirs: [/path/to/dir] From a9cc28f3b1fa2a80ebef26f7d198f305bc85828d Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 21 Apr 2016 18:50:01 -0400 Subject: [PATCH 047/295] remove partial functions --- src/Bifunctor.hs | 32 ++++++++++++++++---------------- src/Protolude.hs | 2 -- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/Bifunctor.hs b/src/Bifunctor.hs index 62c03de6a3..3b2d1cca26 100644 --- a/src/Bifunctor.hs +++ b/src/Bifunctor.hs @@ -10,38 +10,38 @@ import Data.Either (Either(..)) import Control.Applicative ( Const(..) ) class Bifunctor p where - {-# MINIMAL bimap | first, second #-} + {-# MINIMAL bimap | first, second #-} - bimap :: (a -> b) -> (c -> d) -> p a c -> p b d - bimap f g = first f . second g + bimap :: (a -> b) -> (c -> d) -> p a c -> p b d + bimap f g = first f . second g - first :: (a -> b) -> p a c -> p b c - first f = bimap f id + first :: (a -> b) -> p a c -> p b c + first f = bimap f id - second :: (b -> c) -> p a b -> p a c - second = bimap id + second :: (b -> c) -> p a b -> p a c + second = bimap id instance Bifunctor (,) where - bimap f g ~(a, b) = (f a, g b) + bimap f g ~(a, b) = (f a, g b) instance Bifunctor ((,,) x1) where - bimap f g ~(x1, a, b) = (x1, f a, g b) + bimap f g ~(x1, a, b) = (x1, f a, g b) instance Bifunctor ((,,,) x1 x2) where - bimap f g ~(x1, x2, a, b) = (x1, x2, f a, g b) + bimap f g ~(x1, x2, a, b) = (x1, x2, f a, g b) instance Bifunctor ((,,,,) x1 x2 x3) where - bimap f g ~(x1, x2, x3, a, b) = (x1, x2, x3, f a, g b) + bimap f g ~(x1, x2, x3, a, b) = (x1, x2, x3, f a, g b) instance Bifunctor ((,,,,,) x1 x2 x3 x4) where - bimap f g ~(x1, x2, x3, x4, a, b) = (x1, x2, x3, x4, f a, g b) + bimap f g ~(x1, x2, x3, x4, a, b) = (x1, x2, x3, x4, f a, g b) instance Bifunctor ((,,,,,,) x1 x2 x3 x4 x5) where - bimap f g ~(x1, x2, x3, x4, x5, a, b) = (x1, x2, x3, x4, x5, f a, g b) + bimap f g ~(x1, x2, x3, x4, x5, a, b) = (x1, x2, x3, x4, x5, f a, g b) instance Bifunctor Either where - bimap f _ (Left a) = Left (f a) - bimap _ g (Right b) = Right (g b) + bimap f _ (Left a) = Left (f a) + bimap _ g (Right b) = Right (g b) instance Bifunctor Const where - bimap f _ (Const a) = Const (f a) + bimap f _ (Const a) = Const (f a) diff --git a/src/Protolude.hs b/src/Protolude.hs index 9fb1847ce5..36024b242c 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -51,8 +51,6 @@ import Safe as X ( , tailSafe , lastDef , lastMay - , lookupJust - , findJust , foldr1May , foldl1May , atMay From 561ee5077e75b617cf5bb78de381176f04bc62dc Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 27 Apr 2016 15:27:42 -0400 Subject: [PATCH 048/295] fix traceShow fixes #10 --- src/Base.hs | 4 ++++ src/Debug.hs | 21 ++++++++++++--------- src/Protolude.hs | 2 ++ 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/Base.hs b/src/Base.hs index ce4e3dfacc..8be3685038 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -17,6 +17,10 @@ import GHC.Num as X import GHC.Enum as X import GHC.Real as X import GHC.Float as X +import GHC.Err as X ( + undefined + , error + ) import GHC.Show as X ( Show(..) ) diff --git a/src/Debug.hs b/src/Debug.hs index 5fd3dcd633..d6cfcb2f34 100644 --- a/src/Debug.hs +++ b/src/Debug.hs @@ -12,7 +12,10 @@ module Debug ( notImplemented, ) where -import qualified Prelude as P +import Data.String (String) +import Control.Monad (Monad, return) + +import qualified Base as P import qualified Debug.Trace as T {-# WARNING undefined "'undefined' remains in code" #-} @@ -20,27 +23,27 @@ undefined :: a undefined = P.undefined {-# WARNING error "'error' remains in code" #-} -error :: P.String -> a +error :: String -> a error = P.error {-# WARNING trace "'trace' remains in code" #-} -trace :: P.String -> a -> a +trace :: String -> a -> a trace = T.trace {-# WARNING traceShow "'traceShow' remains in code" #-} -traceShow :: P.Show a => a -> a -traceShow a = T.trace (P.show a) a +traceShow :: P.Show a => a -> b -> b +traceShow a b = T.trace (P.show a) b {-# WARNING traceShowM "'traceShowM' remains in code" #-} -traceShowM :: (P.Show a, P.Monad m) => a -> m () +traceShowM :: (P.Show a, Monad m) => a -> m () traceShowM a = traceM (P.show a) {-# WARNING traceM "'traceM' remains in code" #-} -traceM :: (P.Monad m) => P.String -> m () -traceM s = T.trace s (P.return ()) +traceM :: (Monad m) => String -> m () +traceM s = T.trace s (return ()) {-# WARNING traceIO "'traceIO' remains in code" #-} -traceIO :: P.String -> P.IO () +traceIO :: String -> P.IO () traceIO = T.traceIO {-# WARNING notImplemented "'notImplemented' remains in code" #-} diff --git a/src/Protolude.hs b/src/Protolude.hs index 36024b242c..2737e6633d 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -33,6 +33,8 @@ import Base as Base hiding ( , putStrLn , print , show + , error + , undefined ) import qualified Base as PBase From a70f6e2d84577e11791eb20a0f1132f19d1a3519 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 7 May 2016 09:43:20 -0400 Subject: [PATCH 049/295] bump version --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index f7d830376a..f2125c6b09 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.1.4 +version: 0.1.5 synopsis: A sensible set of defaults for writing custom Preludes. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude From 75f5f4d88fab359946335d09abbcdae4ba4e0635 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 9 May 2016 14:22:13 -0400 Subject: [PATCH 050/295] pull Conv into core --- protolude.cabal | 1 + src/Conv.hs | 75 ++++++++++++++++++++++++++++++++++++++++++++++++ src/Protolude.hs | 9 +----- 3 files changed, 77 insertions(+), 8 deletions(-) create mode 100644 src/Conv.hs diff --git a/protolude.cabal b/protolude.cabal index f2125c6b09..eb55ad86d9 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -43,6 +43,7 @@ library List Monad Show + Conv Either Functor Semiring diff --git a/src/Conv.hs b/src/Conv.hs new file mode 100644 index 0000000000..2b092b56f4 --- /dev/null +++ b/src/Conv.hs @@ -0,0 +1,75 @@ +{-# LANGUAGE TypeSynonymInstances #-} +{-# LANGUAGE FlexibleInstances #-} + + +module Conv ( + StringConv (..) +, toS +, toSL +, Leniency (..) +) where + +import Data.ByteString.Char8 as B +import Data.ByteString.Lazy.Char8 as LB +import Data.Text as T +import Data.Text.Encoding as T +import Data.Text.Encoding.Error as T +import Data.Text.Lazy as LT +import Data.Text.Lazy.Encoding as LT + +import Base +import Data.Eq (Eq(..)) +import Data.Ord (Ord(..)) +import Data.Function ((.), id) +import Data.String (String) +import Control.Applicative (pure) + +data Leniency = Lenient | Strict + deriving (Eq,Show,Ord,Enum,Bounded) + +class StringConv a b where + strConv :: Leniency -> a -> b + +toS :: StringConv a b => a -> b +toS = strConv Strict + +toSL :: StringConv a b => a -> b +toSL = strConv Lenient + +instance StringConv String String where strConv _ = id +instance StringConv String B.ByteString where strConv _ = B.pack +instance StringConv String LB.ByteString where strConv _ = LB.pack +instance StringConv String T.Text where strConv _ = T.pack +instance StringConv String LT.Text where strConv _ = LT.pack + +instance StringConv B.ByteString String where strConv _ = B.unpack +instance StringConv B.ByteString B.ByteString where strConv _ = id +instance StringConv B.ByteString LB.ByteString where strConv _ = LB.fromChunks . pure +instance StringConv B.ByteString T.Text where strConv = decodeUtf8T +instance StringConv B.ByteString LT.Text where strConv l = strConv l . LB.fromChunks . pure + +instance StringConv LB.ByteString String where strConv _ = LB.unpack +instance StringConv LB.ByteString B.ByteString where strConv _ = B.concat . LB.toChunks +instance StringConv LB.ByteString LB.ByteString where strConv _ = id +instance StringConv LB.ByteString T.Text where strConv l = decodeUtf8T l . strConv l +instance StringConv LB.ByteString LT.Text where strConv = decodeUtf8LT + +instance StringConv T.Text String where strConv _ = T.unpack +instance StringConv T.Text B.ByteString where strConv _ = T.encodeUtf8 +instance StringConv T.Text LB.ByteString where strConv l = strConv l . T.encodeUtf8 +instance StringConv T.Text LT.Text where strConv _ = LT.fromStrict +instance StringConv T.Text T.Text where strConv _ = id + +instance StringConv LT.Text String where strConv _ = LT.unpack +instance StringConv LT.Text T.Text where strConv _ = LT.toStrict +instance StringConv LT.Text LT.Text where strConv _ = id +instance StringConv LT.Text LB.ByteString where strConv _ = LT.encodeUtf8 +instance StringConv LT.Text B.ByteString where strConv l = strConv l . LT.encodeUtf8 + +decodeUtf8T :: Leniency -> B.ByteString -> T.Text +decodeUtf8T Lenient = T.decodeUtf8With T.lenientDecode +decodeUtf8T Strict = T.decodeUtf8With T.strictDecode + +decodeUtf8LT :: Leniency -> LB.ByteString -> LT.Text +decodeUtf8LT Lenient = LT.decodeUtf8With T.lenientDecode +decodeUtf8LT Strict = LT.decodeUtf8With T.strictDecode diff --git a/src/Protolude.hs b/src/Protolude.hs index 2737e6633d..8a03b27f88 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -27,6 +27,7 @@ import Monad as X import Functor as X import Either as X import Applicative as X +import Conv as X import Base as Base hiding ( putStr @@ -279,14 +280,6 @@ import Data.Text.Lazy ( , fromStrict ) -import Data.String.Conv as X ( - strConv - , toS - , toSL - , Leniency(..) - , StringConv - ) - import Data.String as X (IsString) -- Printf From d39e014533909c5e4071093b5d4fcf9fa74ef46d Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 6 Jun 2016 08:50:12 -0400 Subject: [PATCH 051/295] unsafeFromJust --- README.md | 2 +- src/Unsafe.hs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4c7512b8af..8ae1123304 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Supports: * GHC 7.10.1 * GHC 7.10.2 * GHC 7.10.3 - * GHC HEAD + * GHC 8.0.1 Usage ----- diff --git a/src/Unsafe.hs b/src/Unsafe.hs index 5e0ba5b83d..57c01e47f9 100644 --- a/src/Unsafe.hs +++ b/src/Unsafe.hs @@ -6,7 +6,7 @@ module Unsafe ( unsafeTail, unsafeInit, unsafeLast, - fromJust, + unsafeFromJust, unsafeIndex, ) where @@ -26,8 +26,8 @@ unsafeInit = List.init unsafeLast :: [a] -> a unsafeLast = List.last -fromJust :: Maybe.Maybe a -> a -fromJust = Maybe.fromJust +unsafeFromJust :: Maybe.Maybe a -> a +unsafeFromJust = Maybe.fromJust unsafeIndex :: [a] -> Int -> a unsafeIndex = (List.!!) From f05079bf989b155023f54152e8202ec91c8eb304 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 8 Jun 2016 19:05:43 -0400 Subject: [PATCH 052/295] Add 8.0.1 support to Travis. --- .gitignore | 2 ++ .travis.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 36c32bd7fd..65b76a939d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ dist .cabal-sandbox cabal.sandbox.config +*.hi +*.o diff --git a/.travis.yml b/.travis.yml index 4698c6a7ad..061e383c6f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,7 @@ env: - CABALVER=1.22 GHCVER=7.10.1 - CABALVER=1.22 GHCVER=7.10.2 - CABALVER=1.22 GHCVER=7.10.3 + - CABALVER=1.24 GHCVER=8.0.1 - CABALVER=head GHCVER=head # Note: the distinction between `before_install` and `install` is not From 1e690a9e78360cf011606cd84eadfd31889d3048 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 8 Jun 2016 19:15:03 -0400 Subject: [PATCH 053/295] bump version --- README.md | 1 + protolude.cabal | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ae1123304..97021e4cac 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ Supports: * GHC 7.10.2 * GHC 7.10.3 * GHC 8.0.1 + * GHC HEAD Usage ----- diff --git a/protolude.cabal b/protolude.cabal index eb55ad86d9..6e4fd5a76b 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.1.5 +version: 0.1.6 synopsis: A sensible set of defaults for writing custom Preludes. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude From 6df421ad7299f6d5bf03763cc4af752616ead417 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 8 Jun 2016 19:32:03 -0400 Subject: [PATCH 054/295] Panic module. --- protolude.cabal | 1 + src/Debug.hs | 8 +++----- src/Panic.hs | 17 +++++++++++++++++ src/Protolude.hs | 1 + 4 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 src/Panic.hs diff --git a/protolude.cabal b/protolude.cabal index 6e4fd5a76b..08ed9d1c09 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -48,6 +48,7 @@ library Functor Semiring Bifunctor + Panic default-extensions: NoImplicitPrelude diff --git a/src/Debug.hs b/src/Debug.hs index d6cfcb2f34..dd78726573 100644 --- a/src/Debug.hs +++ b/src/Debug.hs @@ -18,10 +18,6 @@ import Control.Monad (Monad, return) import qualified Base as P import qualified Debug.Trace as T -{-# WARNING undefined "'undefined' remains in code" #-} -undefined :: a -undefined = P.undefined - {-# WARNING error "'error' remains in code" #-} error :: String -> a error = P.error @@ -46,6 +42,8 @@ traceM s = T.trace s (return ()) traceIO :: String -> P.IO () traceIO = T.traceIO -{-# WARNING notImplemented "'notImplemented' remains in code" #-} notImplemented :: a notImplemented = P.error "Not implemented" + +undefined :: a +undefined = P.undefined diff --git a/src/Panic.hs b/src/Panic.hs new file mode 100644 index 0000000000..fd7a2d5af3 --- /dev/null +++ b/src/Panic.hs @@ -0,0 +1,17 @@ +module Panic ( + FatalError(..), + panic, +) where + +import Base (Show) +import Data.Text(Text) +import Control.Exception as X + +-- | Uncatchable exceptions thrown and never caught. +data FatalError = FatalError { msg :: Text } + deriving (Show) + +instance Exception FatalError + +panic :: Text -> a +panic a = throw (FatalError a) diff --git a/src/Protolude.hs b/src/Protolude.hs index 8a03b27f88..8ec142b5b2 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -28,6 +28,7 @@ import Functor as X import Either as X import Applicative as X import Conv as X +import Panic as X import Base as Base hiding ( putStr From 6ae19be4b70d1c09d7e9884d5e7993d517d843c7 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 8 Jun 2016 19:38:45 -0400 Subject: [PATCH 055/295] Explicit Typeable for older GHC. --- src/Panic.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Panic.hs b/src/Panic.hs index fd7a2d5af3..bc506f9dd3 100644 --- a/src/Panic.hs +++ b/src/Panic.hs @@ -4,12 +4,13 @@ module Panic ( ) where import Base (Show) -import Data.Text(Text) +import Data.Text (Text) +import Data.Typeable (Typeable) import Control.Exception as X -- | Uncatchable exceptions thrown and never caught. data FatalError = FatalError { msg :: Text } - deriving (Show) + deriving (Show, Typeable) instance Exception FatalError From 6edc320b69e9c318541307242f4eb855cb533efe Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 8 Jun 2016 19:45:33 -0400 Subject: [PATCH 056/295] DeriveTyepable pragma. --- src/Panic.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Panic.hs b/src/Panic.hs index bc506f9dd3..863feddb98 100644 --- a/src/Panic.hs +++ b/src/Panic.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE DeriveDataTypeable #-} + module Panic ( FatalError(..), panic, From a9c8d300a5d47e56fc610888aba47f039f0f238d Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 8 Jun 2016 19:47:08 -0400 Subject: [PATCH 057/295] Remove string-conv dependency. --- protolude.cabal | 1 - stack.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/protolude.cabal b/protolude.cabal index 08ed9d1c09..cd90dd6f0b 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -71,7 +71,6 @@ library transformers >= 0.4 && < 0.6, text >= 1.2 && <1.3, stm >= 2.4 && <2.5, - string-conv >= 0.1 && <0.2, bytestring >= 0.10 && <0.11 hs-source-dirs: src diff --git a/stack.yaml b/stack.yaml index 5681c69450..38583d04ed 100644 --- a/stack.yaml +++ b/stack.yaml @@ -2,6 +2,5 @@ resolver: lts-5.10 packages: - '.' extra-deps: -- string-conv-0.1 flags: {} extra-package-dbs: [] From 30d0bbca938acd5b2f5e657984d36cd02abcbb26 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 8 Jun 2016 20:08:21 -0400 Subject: [PATCH 058/295] Debug functions to use Text. --- src/Debug.hs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Debug.hs b/src/Debug.hs index dd78726573..1266aa06fc 100644 --- a/src/Debug.hs +++ b/src/Debug.hs @@ -12,19 +12,19 @@ module Debug ( notImplemented, ) where -import Data.String (String) +import Data.Text (Text, unpack) import Control.Monad (Monad, return) import qualified Base as P import qualified Debug.Trace as T {-# WARNING error "'error' remains in code" #-} -error :: String -> a -error = P.error +error :: Text -> a +error s = P.error (unpack s) {-# WARNING trace "'trace' remains in code" #-} -trace :: String -> a -> a -trace = T.trace +trace :: Text -> a -> a +trace s = T.trace (unpack s) {-# WARNING traceShow "'traceShow' remains in code" #-} traceShow :: P.Show a => a -> b -> b @@ -32,15 +32,15 @@ traceShow a b = T.trace (P.show a) b {-# WARNING traceShowM "'traceShowM' remains in code" #-} traceShowM :: (P.Show a, Monad m) => a -> m () -traceShowM a = traceM (P.show a) +traceShowM a = T.trace (P.show a) (return ()) {-# WARNING traceM "'traceM' remains in code" #-} -traceM :: (Monad m) => String -> m () -traceM s = T.trace s (return ()) +traceM :: (Monad m) => Text -> m () +traceM s = T.trace (unpack s) (return ()) {-# WARNING traceIO "'traceIO' remains in code" #-} -traceIO :: String -> P.IO () -traceIO = T.traceIO +traceIO :: Text -> P.IO () +traceIO s = T.traceIO (unpack s) notImplemented :: a notImplemented = P.error "Not implemented" From 173b86de453e296273f4f07528619e272e25ca3c Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 8 Jun 2016 23:02:57 -0400 Subject: [PATCH 059/295] Read actions for Strict text in scope by default. --- src/Base.hs | 2 +- src/Protolude.hs | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/Base.hs b/src/Base.hs index 8be3685038..67d6b14b31 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -9,7 +9,7 @@ module Base ( ($!), ) where --- Glorious Glashgow Haskell Compiler +-- Glorious Glasgow Haskell Compiler #if defined(__GLASGOW_HASKELL__) && ( __GLASGOW_HASKELL__ >= 600 ) -- Base GHC types diff --git a/src/Protolude.hs b/src/Protolude.hs index 8ec142b5b2..54435ace8d 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -31,16 +31,16 @@ import Conv as X import Panic as X import Base as Base hiding ( - putStr - , putStrLn - , print - , show - , error - , undefined + putStr -- Overriden by Show.putStr + , putStrLn -- Overriden by Show.putStrLn + , print -- Overriden by Protolude.print + , show -- Overriden by Protolude.show + , error -- Overriden by Debug.error + , undefined -- Overriden by Debug.undefined ) import qualified Base as PBase --- Used for 'show' +-- Used for 'show', not exported. import Data.String (String) -- Maybe'ized version of partial functions @@ -276,6 +276,12 @@ import Data.Text as X (Text) import qualified Data.Text.Lazy import qualified Data.Text.IO +import Data.Text.IO as X ( + getLine + , getContents + , interact + ) + import Data.Text.Lazy ( toStrict , fromStrict From 78b16ebcfad24ea63bbef391f330dcdd4e6f8b43 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 9 Jun 2016 20:18:55 -0400 Subject: [PATCH 060/295] IO handle functions. --- src/Protolude.hs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index 54435ace8d..53eb7e55c8 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -42,6 +42,7 @@ import qualified Base as PBase -- Used for 'show', not exported. import Data.String (String) +import Data.String as X (IsString) -- Maybe'ized version of partial functions import Safe as X ( @@ -280,6 +281,9 @@ import Data.Text.IO as X ( getLine , getContents , interact + , readFile + , writeFile + , appendFile ) import Data.Text.Lazy ( @@ -287,8 +291,6 @@ import Data.Text.Lazy ( , fromStrict ) -import Data.String as X (IsString) - -- Printf import Text.Printf as X ( PrintfArg @@ -300,7 +302,16 @@ import Text.Printf as X ( import System.Exit as X --import System.Info as X import System.Environment as X (getArgs) -import System.IO as X (Handle) +import System.IO as X ( + Handle + , FilePath + , IOMode(..) + , stdin + , stdout + , stderr + , withFile + , openFile + ) -- ST import Control.Monad.ST as X From 8d794da86c23205ed855e1291b32232b4c35d990 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 9 Jun 2016 21:18:10 -0400 Subject: [PATCH 061/295] Remove printf. --- src/Protolude.hs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index 53eb7e55c8..f1d9c09cb7 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -291,13 +291,6 @@ import Data.Text.Lazy ( , fromStrict ) --- Printf -import Text.Printf as X ( - PrintfArg - , printf - , hPrintf - ) - -- IO import System.Exit as X --import System.Info as X From e0cace8a4d3acdc88d85ef5dc773635a0ba283de Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 11 Jun 2016 16:19:03 -0400 Subject: [PATCH 062/295] Symbols list. --- README.md | 4 +- Symbols.md | 1147 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1149 insertions(+), 2 deletions(-) create mode 100644 Symbols.md diff --git a/README.md b/README.md index 97021e4cac..0462ad0a14 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ Design points: * Polymorphic string IO functions. * Polymorphic show. * Automatic string conversions. -* Type for common data structures in scope. -* Type for all common string types in scope. +* Types for common data structures in scope. +* Types for all common string types in scope. * StateT/ReaderT/ExceptT transformers in scope by default. * Foldable / Traversable functions in scope by default. * Unsafe functions are prefixed with "unsafe" in separate module. diff --git a/Symbols.md b/Symbols.md new file mode 100644 index 0000000000..179fa1f8c0 --- /dev/null +++ b/Symbols.md @@ -0,0 +1,1147 @@ +* Applicative +* Bool +* Monad +* Show +* Either +* Functor +* Semiring +* Bifunctor +* Exception +* Coercion +* TypeRep +* State +* Foldable +* Traversable +* Maybe +* Monoid +* String +* Bounded +* Enum +* Floating +* RealFloat +* Num +* Fractional +* Integral +* Rational +* Real +* RealFrac +* FilePath +* Double# +* Float# +* RealWorld +* Any +* Constraint +* Char +* Double +* Float +* Int +* Word +* Coercible +* V1 +* U1 +* K1 +* M1 +* :+: +* :*: +* Rec0 +* D1 +* C1 +* S1 +* Rep +* IO +* Ratio +* Integer +* Eq +* Ord +* IsString +* Alternative +* Typeable +* == +* Read +* Ptr +* FunPtr +* Int8 +* Int16 +* Int32 +* Int64 +* Word8 +* Word16 +* Word32 +* Word64 +* MonadPlus +* Ordering +* Generic +* Constructor +* Selector +* FFFormat +* Const +* ZipList +* Identity +* NFData +* Map +* Set +* Seq +* IntMap +* IntSet +* Proxy +* :~: +* Void +* MonadState +* StateT +* Reader +* MonadReader +* ReaderT +* Except +* MonadError +* ExceptT +* MonadIO +* Bits +* Complex +* Fixity +* ByteString +* ByteString +* Text +* Text +* Handle +* IOMode +* ST +* STM +* Async +* Storable +* FatalError +* StringConv +* Leniency +* Print +* All +* Alt +* Dual +* Endo +* First +* Last +* Product +* Sum +* Down +* SomeException +* IOException +* FiniteBits +* NestedAtomically +* NoMethodError +* NonTermination +* PatternMatchFail +* RecConError +* RecSelError +* RecUpdError +* ArithException +* ErrorCall +* MaskingState +* Handler +* AllocationLimitExceeded +* ArrayException +* AssertionFailed +* AsyncException +* BlockedIndefinitelyOnMVar +* BlockedIndefinitelyOnSTM +* Deadlock +* SomeAsyncException +* ThreadId +* ExitCode +* Chan +* QSem +* QSemN +* MVar +* Concurrently +* Coercion +* Left +* Right +* Just +* Nothing +* Any +* False +* True +* D# +* F# +* U1 +* K1 +* M1 +* :% +* LT +* EQ +* GT +* FFExponent +* FFFixed +* FFGeneric +* Const +* ZipList +* Identity +* Proxy +* FatalError +* All +* Alt +* Dual +* Endo +* First +* Last +* Product +* Sum +* Prefix +* Infix +* Refl +* Down +* AppendMode +* ReadMode +* ReadWriteMode +* WriteMode +* SomeException +* Lenient +* Strict +* NestedAtomically +* NoMethodError +* NonTermination +* PatternMatchFail +* RecConError +* RecSelError +* RecUpdError +* Denormal +* DivideByZero +* ErrorCall +* LossOfPrecision +* Overflow +* RatioZeroDenominator +* Underflow +* MaskedInterruptible +* MaskedUninterruptible +* Unmasked +* Handler +* AllocationLimitExceeded +* IndexOutOfBounds +* UndefinedElement +* AssertionFailed +* HeapOverflow +* StackOverflow +* ThreadKilled +* UserInterrupt +* BlockedIndefinitelyOnMVar +* BlockedIndefinitelyOnSTM +* Deadlock +* SomeAsyncException +* :+ +* ExitFailure +* ExitSuccess +* Concurrently +* deepseq +* split +* split +* async +* void +* smallInteger +* wordToInteger +* integerToWord +* integerToInt +* plusInteger +* minusInteger +* timesInteger +* negateInteger +* eqInteger# +* neqInteger# +* absInteger +* signumInteger +* leInteger# +* gtInteger# +* ltInteger# +* geInteger# +* compareInteger +* encodeFloatInteger +* floatFromInteger +* encodeDoubleInteger +* decodeDoubleInteger +* doubleFromInteger +* rationalToFloat +* rationalToDouble +* andInteger +* orInteger +* xorInteger +* complementInteger +* shiftLInteger +* shiftRInteger +* quotInteger +* remInteger +* divInteger +* modInteger +* divModInteger +* quotRemInteger +* group +* group +* group +* either +* all +* all +* all +* and +* any +* any +* any +* concat +* concat +* concat +* concatMap +* concatMap +* concatMap +* elem +* elem +* foldMap +* foldl +* foldl +* foldl +* foldl1 +* foldl1 +* foldr +* foldr +* foldr +* foldr1 +* foldr1 +* length +* length +* length +* mapM_ +* maximum +* maximum +* maximum +* minimum +* minimum +* minimum +* notElem +* notElem +* null +* null +* null +* or +* product +* sequence_ +* sum +* <$> +* maybe +* mapM +* sequence +* sequenceA +* traverse +* curry +* fst +* snd +* uncurry +* $! +* *> +* ++ +* . +* <$ +* <* +* <*> +* =<< +* >>= +* asTypeOf +* const +* flip +* fmap +* map +* map +* mappend +* mconcat +* mempty +* otherwise +* pure +* return +* enumFrom +* enumFromThen +* enumFromThenTo +* enumFromTo +* fromEnum +* maxBound +* minBound +* pred +* succ +* toEnum +* ** +* acos +* acosh +* asin +* asinh +* atan +* atan2 +* atanh +* cos +* cosh +* decodeFloat +* encodeFloat +* exp +* exponent +* floatDigits +* floatRadix +* floatRange +* isDenormalized +* isIEEE +* isInfinite +* isNaN +* isNegativeZero +* log +* logBase +* pi +* scaleFloat +* significand +* sin +* sinh +* sqrt +* tan +* tanh +* * +* + +* - +* abs +* fromInteger +* negate +* signum +* subtract +* / +* ^ +* ^^ +* ceiling +* div +* divMod +* even +* floor +* fromIntegral +* fromRational +* gcd +* lcm +* mod +* odd +* properFraction +* quot +* quotRem +* realToFrac +* recip +* rem +* round +* toInteger +* toRational +* truncate +* show +* showList +* showsPrec +* appendFile +* appendFile +* getContents +* getContents +* getLine +* interact +* interact +* print +* putStr +* putStr +* putStr +* putStr +* putStrLn +* putStrLn +* putStrLn +* putStrLn +* readFile +* readFile +* writeFile +* writeFile +* reads +* lines +* unlines +* unwords +* words +* ioError +* break +* break +* break +* cycle +* cycle +* cycle +* drop +* drop +* drop +* dropWhile +* dropWhile +* dropWhile +* head +* head +* head +* init +* init +* iterate +* iterate +* iterate +* last +* last +* repeat +* repeat +* repeat +* replicate +* replicate +* replicate +* reverse +* reverse +* reverse +* scanl +* scanl +* scanl +* scanl1 +* scanr +* scanr +* scanr1 +* span +* span +* splitAt +* splitAt +* splitAt +* tail +* tail +* take +* take +* take +* takeWhile +* takeWhile +* takeWhile +* unzip +* zipWith +* zipWith +* zipWith +* && +* not +* || +* /= +* < +* <= +* > +* compare +* max +* min +* $ +* error +* error +* undefined +* undefined +* seq +* >= +* == +* join +* first +* toList +* filter +* filter +* filter +* zip +* zip +* zip +* assert +* mkInteger +* guard +* liftM +* lift +* <|> +* <**> +* empty +* empty +* empty +* some +* many +* mzero +* mplus +* ap +* liftA +* liftA2 +* liftA3 +* liftM2 +* liftM3 +* liftM4 +* liftM5 +* maxInt +* minInt +* ord +* when +* unpack +* unpack +* .&. +* shiftL +* shiftR +* double2Int +* float2Int +* int2Double +* int2Float +* denominator +* numerator +* numericEnumFrom +* numericEnumFromThen +* numericEnumFromThenTo +* numericEnumFromTo +* isDoubleDenormalized +* isDoubleInfinite +* isDoubleNaN +* isDoubleNegativeZero +* isFloatDenormalized +* isFloatInfinite +* isFloatNaN +* isFloatNegativeZero +* isDoubleFinite +* isFloatFinite +* acosDouble +* acosFloat +* asinDouble +* asinFloat +* atanDouble +* atanFloat +* clamp +* cosDouble +* cosFloat +* coshDouble +* coshFloat +* divideDouble +* divideFloat +* double2Float +* eqDouble +* eqFloat +* expDouble +* expFloat +* expt +* expts +* expts10 +* float2Double +* floatToDigits +* formatRealFloat +* formatRealFloatAlt +* fromRat +* fromRat' +* fromRat'' +* geDouble +* geFloat +* gtDouble +* gtFloat +* integerLogBase +* leDouble +* leFloat +* logDouble +* logFloat +* ltDouble +* ltFloat +* maxExpt +* maxExpt10 +* minExpt +* minusDouble +* minusFloat +* neDouble +* neFloat +* negateDouble +* negateFloat +* plusDouble +* plusFloat +* powerDouble +* powerFloat +* roundTo +* showFloat +* showSignedFloat +* sinDouble +* sinFloat +* sinhDouble +* sinhFloat +* sqrtDouble +* sqrtFloat +* tanDouble +* tanFloat +* tanhDouble +* tanhFloat +* timesDouble +* timesFloat +* word2Double +* word2Float +* eqInteger +* divZeroError +* uncons +* uncons +* headMay +* headDef +* initMay +* initDef +* initSafe +* tailMay +* tailDef +* tailSafe +* lastDef +* lastMay +* foldr1May +* foldl1May +* atMay +* atDef +* optional +* $!! +* force +* intercalate +* intercalate +* intercalate +* isPrefixOf +* isPrefixOf +* isPrefixOf +* sortBy +* sort +* intersperse +* intersperse +* intersperse +* transpose +* transpose +* transpose +* subsequences +* permutations +* unfoldr +* unfoldr +* unfoldr +* inits +* inits +* inits +* tails +* tails +* tails +* typeRep +* cast +* eqT +* coerceWith +* sym +* trans +* castWith +* gcastWith +* absurd +* vacuous +* put +* get +* gets +* modify +* withState +* runState +* execState +* evalState +* runStateT +* execStateT +* evalStateT +* ask +* asks +* local +* runReader +* runReaderT +* throwError +* catchError +* runExcept +* runExceptT +* liftIO +* chr +* bool +* fix +* on +* toStrict +* toStrict +* fromStrict +* fromStrict +* getArgs +* stdin +* stdout +* stderr +* withFile +* openFile +* readMaybe +* readEither +* zero +* panic +* toS +* toSL +* orAlt +* orEmpty +* eitherA +* maybeToLeft +* maybeToRight +* leftToMaybe +* rightToMaybe +* maybeToEither +* $> +* >=> +* <=< +* forever +* mfilter +* filterM +* mapAndUnzipM +* zipWithM +* zipWithM_ +* foldM +* foldM_ +* replicateM +* replicateM_ +* concatMapM +* unless +* liftM' +* liftM2' +* <$!> +* trace +* traceM +* traceIO +* traceShow +* traceShowM +* notImplemented +* whenM +* unlessM +* ifM +* guardM +* putText +* putLText +* ordNub +* sortOn +* list +* comparing +* one +* <.> +* conIsRecord +* conName +* from +* selName +* to +* <> +* getAll +* getAlt +* getAny +* getDual +* appEndo +* getFirst +* getLast +* getProduct +* getSum +* isLeft +* isRight +* lefts +* partitionEithers +* rights +* conFixity +* unK1 +* unM1 +* geInteger +* gtInteger +* hashInteger +* leInteger +* ltInteger +* neqInteger +* testBitInteger +* catMaybes +* fromMaybe +* isJust +* isNothing +* listToMaybe +* mapMaybe +* cons +* cons +* maybeToList +* find +* find +* find +* foldl' +* foldl' +* foldl' +* maximumBy +* minimumBy +* dropWhileEnd +* elemIndex +* elemIndices +* findIndex +* findIndices +* groupBy +* groupBy +* isInfixOf +* isSuffixOf +* isSuffixOf +* partition +* partition +* stripPrefix +* mapAccumL +* mapAccumL +* mapAccumL +* mapAccumR +* mapAccumR +* mapAccumR +* foldl1' +* foldl1' +* fold +* foldr' +* asum +* foldlM +* foldrM +* forM_ +* for_ +* msum +* sequenceA_ +* traverse_ +* forM +* singleton +* singleton +* link +* getConst +* getZipList +* boundedEnumFrom +* boundedEnumFromThen +* fromEnumError +* predError +* succError +* toEnumError +* % +* ^%^ +* ^^%^^ +* gcdInt' +* gcdWord' +* infinity +* integralEnumFrom +* integralEnumFromThen +* integralEnumFromThenTo +* integralEnumFromTo +* notANumber +* overflowError +* ratioPrec +* ratioPrec1 +* ratioZeroDenominatorError +* reduce +* showSigned +* bracket +* .|. +* hGetContents +* hGetContents +* hGetLine +* hPutStr +* hPutStr +* hPutStrLn +* newEmptyMVar +* putMVar +* takeMVar +* index +* index +* unfoldrN +* append +* append +* snoc +* snoc +* toCaseFold +* toLower +* toTitle +* toUpper +* breakOn +* breakOnAll +* breakOnEnd +* center +* chunksOf +* commonPrefixes +* compareLength +* copy +* count +* count +* dropAround +* dropEnd +* justifyLeft +* justifyRight +* pack +* pack +* replace +* second +* splitOn +* strip +* stripEnd +* stripStart +* stripSuffix +* takeEnd +* takeWhileEnd +* msg +* hPut +* mask +* runIdentity +* fmapDefault +* foldMapDefault +* for +* runST +* elemIndexEnd +* hGet +* hGetNonBlocking +* hPutNonBlocking +* splitWith +* unsnoc +* cons' +* fromChunks +* fromChunks +* toChunks +* toChunks +* hGetChunk +* foldlChunks +* foldlChunks +* foldrChunks +* foldrChunks +* strConv +* try +* evaluate +* bit +* bitDefault +* bitSize +* bitSizeMaybe +* complement +* countLeadingZeros +* countTrailingZeros +* finiteBitSize +* isSigned +* popCount +* rotate +* shift +* testBit +* testBitDefault +* unsafeShiftL +* unsafeShiftR +* xor +* byteSwap16 +* byteSwap32 +* byteSwap64 +* throw +* bracketOnError +* bracket_ +* catch +* catchJust +* finally +* handle +* handleJust +* mapException +* onException +* tryJust +* displayException +* fromException +* toException +* getMaskingState +* mask_ +* throwIO +* uninterruptibleMask +* uninterruptibleMask_ +* allowInterrupt +* catches +* throwTo +* asyncExceptionFromException +* asyncExceptionToException +* bimap +* rnf +* swap +* rotateL +* rotateR +* zeroBits +* setBit +* clearBit +* complementBit +* popCountDefault +* toIntegralSized +* cis +* conjugate +* imagPart +* magnitude +* mkPolar +* phase +* polar +* realPart +* die +* exitFailure +* exitSuccess +* exitWith +* stToIO +* fixST +* check +* always +* alwaysSucceeds +* atomically +* catchSTM +* orElse +* retry +* throwSTM +* dupChan +* getChanContents +* isEmptyChan +* newChan +* readChan +* unGetChan +* writeChan +* writeList2Chan +* addMVarFinalizer +* mkWeakMVar +* modifyMVar +* modifyMVarMasked +* modifyMVarMasked_ +* modifyMVar_ +* swapMVar +* withMVar +* withMVarMasked +* newQSem +* signalQSem +* waitQSem +* newQSemN +* signalQSemN +* waitQSemN +* threadDelay +* threadWaitRead +* threadWaitReadSTM +* threadWaitWrite +* threadWaitWriteSTM +* forkIO +* forkIOWithUnmask +* forkOn +* forkOnWithUnmask +* getNumCapabilities +* killThread +* mkWeakThreadId +* myThreadId +* setNumCapabilities +* threadCapability +* yield +* isEmptyMVar +* newMVar +* readMVar +* tryPutMVar +* tryReadMVar +* tryTakeMVar +* forkFinally +* forkOS +* rtsSupportsBoundThreads +* isCurrentThreadBound +* runInBoundThread +* runInUnboundThread +* asyncThreadId +* runConcurrently +* asyncBound +* asyncOn +* asyncOnWithUnmask +* asyncWithUnmask +* cancel +* cancelWith +* concurrently +* forConcurrently +* link2 +* mapConcurrently +* poll +* pollSTM +* race +* race_ +* wait +* waitAny +* waitAnyCancel +* waitAnyCatch +* waitAnyCatchCancel +* waitAnyCatchSTM +* waitAnySTM +* waitBoth +* waitBothSTM +* waitCatch +* waitCatchSTM +* waitEither +* waitEitherCancel +* waitEitherCatch +* waitEitherCatchCancel +* waitEitherCatchSTM +* waitEitherSTM +* waitEitherSTM_ +* waitEither_ +* waitSTM +* withAsync +* withAsyncBound +* withAsyncOn +* withAsyncOnWithUnmask +* withAsyncWithUnmask From b6805513f6b86dbd434e9ec9aea4632468e6ccff Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 17 Jun 2016 09:49:49 -0400 Subject: [PATCH 063/295] Dependencies note. --- README.md | 24 ++++++++++++++++++++++++ protolude.cabal | 4 ++-- src/Protolude.hs | 1 + 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0462ad0a14..ba9e12e9d1 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,30 @@ Usage import Protolude ``` +Dependencies +------------ + +Protolude tries to be light on dependencies and only pulls in *essential* +libraries that are universally common across most real-world projects. + +Dependencies Bound +----------- -------- +array 0.5.1.0 +async 2.1.0 +base 4.8.2.0 +binary 0.7.5.0 +bytestring 0.10.6.0 +containers 0.5.6.2 +deepseq 1.4.1.1 +ghc-prim 0.4.0.0 +integer-gmp 1.0.0.0 +mtl 2.2.1 +protolude 0.1.6 +safe 0.3.9 +stm 2.4.4.1 +text 1.2.2.1 +transformers 0.4.2.0 + License ------- diff --git a/protolude.cabal b/protolude.cabal index cd90dd6f0b..0744221cf0 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -34,8 +34,6 @@ library exposed-modules: Protolude Unsafe - - other-modules: Base Applicative Bool @@ -50,6 +48,8 @@ library Bifunctor Panic + other-modules: + default-extensions: NoImplicitPrelude OverloadedStrings diff --git a/src/Protolude.hs b/src/Protolude.hs index f1d9c09cb7..dae0dd2dd0 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -1,5 +1,6 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE Trustworthy #-} +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ExplicitNamespaces #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} From dce9f0c9d5c67e99772da8336a6e0c623ae6706b Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 17 Jun 2016 09:51:34 -0400 Subject: [PATCH 064/295] github table formatting --- README.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index ba9e12e9d1..5bfb829ee4 100644 --- a/README.md +++ b/README.md @@ -55,23 +55,23 @@ Dependencies Protolude tries to be light on dependencies and only pulls in *essential* libraries that are universally common across most real-world projects. -Dependencies Bound ------------ -------- -array 0.5.1.0 -async 2.1.0 -base 4.8.2.0 -binary 0.7.5.0 -bytestring 0.10.6.0 -containers 0.5.6.2 -deepseq 1.4.1.1 -ghc-prim 0.4.0.0 -integer-gmp 1.0.0.0 -mtl 2.2.1 -protolude 0.1.6 -safe 0.3.9 -stm 2.4.4.1 -text 1.2.2.1 -transformers 0.4.2.0 +| Dependencies | Bound | +| ----------- | -------- | +| array | 0.5.1.0 | +| async | 2.1.0 | +| base | 4.8.2.0 | +| binary | 0.7.5.0 | +| bytestring | 0.10.6.0 | +| containers | 0.5.6.2 | +| deepseq | 1.4.1.1 | +| ghc-prim | 0.4.0.0 | +| integer-gmp | 1.0.0.0 | +| mtl | 2.2.1 | +| protolude | 0.1.6 | +| safe | 0.3.9 | +| stm | 2.4.4.1 | +| text | 1.2.2.1 | +| transformers | 0.4.2.0 | License ------- From 0aa40b8b21f2667b645d43603c161a04363f291e Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 30 Jun 2016 10:41:55 -0400 Subject: [PATCH 065/295] Don't support alternative Base. --- README.md | 1 - src/Base.hs | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/README.md b/README.md index 5bfb829ee4..0b39e6768c 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,6 @@ libraries that are universally common across most real-world projects. | ghc-prim | 0.4.0.0 | | integer-gmp | 1.0.0.0 | | mtl | 2.2.1 | -| protolude | 0.1.6 | | safe | 0.3.9 | | stm | 2.4.4.1 | | text | 1.2.2.1 | diff --git a/src/Base.hs b/src/Base.hs index 67d6b14b31..cdbfadca69 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -78,13 +78,3 @@ infixr 0 $! f $! x = let !vx = x in f vx #endif - - --- Simple Haskell Compiler -#if defined(__SHC_HASKELL__) - -import SHC.Prim as X -import SHC.Types as X -import SHC.Classes as X - -#endif From a7bc40452f17ae7e244d0e669da83a078f24f35c Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 30 Jun 2016 10:49:13 -0400 Subject: [PATCH 066/295] Fix up bound documentation. --- README.md | 36 +++++++++++++++++++----------------- protolude.cabal | 4 ++-- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 0b39e6768c..7d9dc4311a 100644 --- a/README.md +++ b/README.md @@ -53,24 +53,26 @@ Dependencies ------------ Protolude tries to be light on dependencies and only pulls in *essential* -libraries that are universally common across most real-world projects. +libraries that are universally common across most real-world projects. Lower and +upper bounds are fully specified and compatible with both vanilla Cabal tracks +Stack LTS resolver. -| Dependencies | Bound | -| ----------- | -------- | -| array | 0.5.1.0 | -| async | 2.1.0 | -| base | 4.8.2.0 | -| binary | 0.7.5.0 | -| bytestring | 0.10.6.0 | -| containers | 0.5.6.2 | -| deepseq | 1.4.1.1 | -| ghc-prim | 0.4.0.0 | -| integer-gmp | 1.0.0.0 | -| mtl | 2.2.1 | -| safe | 0.3.9 | -| stm | 2.4.4.1 | -| text | 1.2.2.1 | -| transformers | 0.4.2.0 | +| Dependencies | Lower | Upper | +| ----------- | -------- | -------- | +| array | | 0.5 | +| async | 2.1 | 2.2 | +| base | 4.6 | 4.10 | +| binary | | 0.7 | +| bytestring | 0.10 | 0.11 | +| containers | 0.5 | 0.6 | +| deepseq | 1.3 | 1.5 | +| ghc-prim | 0.3 | 0.6 | +| integer-gmp | 1.0 | 1.0 | +| mtl | 2.1 | 2.3 | +| safe | 0.3 | 0.4 | +| stm | 2.4 | 2.5 | +| text | 1.2 | 1.3 | +| transformers | 0.4 | 0.6 | License ------- diff --git a/protolude.cabal b/protolude.cabal index 0744221cf0..cee05882b2 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -65,10 +65,10 @@ library ghc-prim >= 0.3 && <0.6, safe >= 0.3 && <0.4, async >= 2.1 && <2.2, - deepseq >= 1.3 && <= 1.5, + deepseq >= 1.3 && <1.5, containers >= 0.5 && <0.6, mtl >= 2.1 && <2.3, - transformers >= 0.4 && < 0.6, + transformers >= 0.4 && <0.6, text >= 1.2 && <1.3, stm >= 2.4 && <2.5, bytestring >= 0.10 && <0.11 From e2b886bb649f2a4359aa1474a51cd97fc0c27358 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 30 Jun 2016 10:59:15 -0400 Subject: [PATCH 067/295] MOre specializers. --- src/Protolude.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Protolude.hs b/src/Protolude.hs index dae0dd2dd0..8dfcc64894 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -356,3 +356,5 @@ show x = toS (PBase.show x) {-# SPECIALIZE show :: Show a => a -> String #-} {-# SPECIALIZE show :: Show a => a -> Text #-} {-# SPECIALIZE show :: Show a => a -> LText #-} +{-# SPECIALIZE show :: Show a => a -> ByteString #-} +{-# SPECIALIZE show :: Show a => a -> LByteString #-} From f4178f047284730ffb476a7089789c8fb8c0f3f8 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 30 Jun 2016 11:04:51 -0400 Subject: [PATCH 068/295] FAQ section. --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 7d9dc4311a..d60f4bfb45 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,35 @@ Stack LTS resolver. | text | 1.2 | 1.3 | | transformers | 0.4 | 0.6 | +FAQs +---- + +1. My ``putStrLn`` and ``putStr`` instances are no longer inferred in the presense +of the ``-XOverloadedStrings`` extension? + +Because the print functions are polymorphic the type of the print functions may +require annotations if the type is not fully specified by inference. To force a +specific type at the call site use either + +```haskell +putText :: MonadIO m => T.Text -> m () +putLText :: MonadIO m => TL.Text -> m () +``` + +2. How do I write manual Show instances if ``show`` isn't provided? + +Generally speaking writing manual instances of Show is a [Haskell antipattern]( +http://www.stephendiehl.com/posts/strings.html) because it produces +law-violating instances of Show. You probably want to use a pretty printer +library for custom printing. + +If backwards compatibility is needed then the base library can be imported +manually. + +```haskell +import GHC.Show (Show(..)) +``` + License ------- From 22c0e743f9a088c37e6600336a2aaf7cd8fbe830 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 30 Jun 2016 11:09:58 -0400 Subject: [PATCH 069/295] Added changelog. --- CHANGES.md | 7 +++++++ README.md | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 CHANGES.md diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000000..0d6da130e8 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,7 @@ +0.1.6 +===== + +* Removes ``printf`` + +0.1.5 +===== diff --git a/README.md b/README.md index d60f4bfb45..ec08ffccc6 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,8 @@ Dependencies Protolude tries to be light on dependencies and only pulls in *essential* libraries that are universally common across most real-world projects. Lower and -upper bounds are fully specified and compatible with both vanilla Cabal tracks -Stack LTS resolver. +upper bounds are fully specified and compatible with both vanilla Cabal and +tracks Stack LTS resolver. | Dependencies | Lower | Upper | | ----------- | -------- | -------- | From fa58c5452af8d106c9e73b8e22aad0532efd54a2 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 30 Jun 2016 11:14:47 -0400 Subject: [PATCH 070/295] Added changelog. --- CHANGES.md | 1 + README.md | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 0d6da130e8..86a10719b3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,7 @@ ===== * Removes ``printf`` +* Removes ``string-conv`` dependency so Stack build works without ``extra-deps``. 0.1.5 ===== diff --git a/README.md b/README.md index ec08ffccc6..fd2671141b 100644 --- a/README.md +++ b/README.md @@ -43,12 +43,22 @@ Supports: Usage ----- +In your project simply disable the default Prelude and import Protolude. + ```haskell {-# LANGUAGE NoImplicitPrelude #-} import Protolude ``` +To try out standalone prelude at the interactive shell, from the Protolude +project directory run. + +```haskell +$ stack exec ghci +> import Protolude +``` + Dependencies ------------ @@ -77,7 +87,7 @@ tracks Stack LTS resolver. FAQs ---- -1. My ``putStrLn`` and ``putStr`` instances are no longer inferred in the presense +* My ``putStrLn`` and ``putStr`` instances are no longer inferred in the presense of the ``-XOverloadedStrings`` extension? Because the print functions are polymorphic the type of the print functions may @@ -89,7 +99,7 @@ putText :: MonadIO m => T.Text -> m () putLText :: MonadIO m => TL.Text -> m () ``` -2. How do I write manual Show instances if ``show`` isn't provided? +* How do I write manual Show instances if ``show`` isn't provided? Generally speaking writing manual instances of Show is a [Haskell antipattern]( http://www.stephendiehl.com/posts/strings.html) because it produces From 205643ea1459e794ea30c33294038384c84667b2 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 30 Jun 2016 17:45:39 -0400 Subject: [PATCH 071/295] Callstack for GHC 8.x. --- CHANGES.md | 1 + src/Base.hs | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 86a10719b3..e8cf01504d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,7 @@ * Removes ``printf`` * Removes ``string-conv`` dependency so Stack build works without ``extra-deps``. +* Brings ``Callstack`` machinery in for GHC 8.x. 0.1.5 ===== diff --git a/src/Base.hs b/src/Base.hs index cdbfadca69..2aa51cc6fd 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -60,6 +60,25 @@ import GHC.OverloadedLabels as X ( IsLabel(..) ) +import GHC.ExecutionStack as X ( + Location(..), + , SrcLoc(..) + , getStackTrace + , showStackTrace + ) + +import GHC.Stack as X ( + , CallStack + , HasCallStack + , callStack + , SrcLoc + , prettySrcLoc + , currentCallStack + , getCallStack + , showCallStack + , prettyCallStack + ) + {- import GHC.Records as X ( HasField(..) From cef28ed3a0d62b592dcb5a2b3bb7e1bdc535701d Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 30 Jun 2016 17:59:09 -0400 Subject: [PATCH 072/295] Remove throw and assert exports. --- CHANGES.md | 2 ++ src/Base.hs | 4 ++-- src/Protolude.hs | 5 ++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index e8cf01504d..8561917373 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,9 +1,11 @@ 0.1.6 ===== +* Adds uncatchable panic exception throwing using Text message. * Removes ``printf`` * Removes ``string-conv`` dependency so Stack build works without ``extra-deps``. * Brings ``Callstack`` machinery in for GHC 8.x. +* Removes ``throw`` and ``assert`` from ``Control.Exception`` exports. 0.1.5 ===== diff --git a/src/Base.hs b/src/Base.hs index 2aa51cc6fd..879c69430d 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -61,14 +61,14 @@ import GHC.OverloadedLabels as X ( ) import GHC.ExecutionStack as X ( - Location(..), + Location(..) , SrcLoc(..) , getStackTrace , showStackTrace ) import GHC.Stack as X ( - , CallStack + CallStack , HasCallStack , callStack , SrcLoc diff --git a/src/Protolude.hs b/src/Protolude.hs index 8dfcc64894..24fc3645fe 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -311,7 +311,10 @@ import System.IO as X ( import Control.Monad.ST as X -- Concurrency and Parallelism -import Control.Exception as X +import Control.Exception as X hiding ( + throw + , assert + ) import Control.Monad.STM as X import Control.Concurrent as X import Control.Concurrent.Async as X From cf1fa981ef918202f3b07ad00ccac9a5ec42dc3d Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 30 Jun 2016 18:14:30 -0400 Subject: [PATCH 073/295] Remove showCallStack. --- src/Base.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Base.hs b/src/Base.hs index 879c69430d..ca44e7bede 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -75,7 +75,6 @@ import GHC.Stack as X ( , prettySrcLoc , currentCallStack , getCallStack - , showCallStack , prettyCallStack ) From 89fdc587e088006a171d1f14900587fd80d4d2d4 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 30 Jun 2016 18:28:21 -0400 Subject: [PATCH 074/295] Single SrcLoc export. --- src/Base.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Base.hs b/src/Base.hs index ca44e7bede..2a34b8a455 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -71,7 +71,6 @@ import GHC.Stack as X ( CallStack , HasCallStack , callStack - , SrcLoc , prettySrcLoc , currentCallStack , getCallStack From b8479ebcb5873024e7503eb1ea2025858ae44ab3 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 30 Jun 2016 18:48:55 -0400 Subject: [PATCH 075/295] Move throw to Unsafe exports. --- CHANGES.md | 2 ++ src/Protolude.hs | 5 ++++- src/Unsafe.hs | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 8561917373..cf65a613c9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,8 @@ * Removes ``string-conv`` dependency so Stack build works without ``extra-deps``. * Brings ``Callstack`` machinery in for GHC 8.x. * Removes ``throw`` and ``assert`` from ``Control.Exception`` exports. +* Removes ``unsafeShiftL`` and ``unsafeShiftR`` from ``Data.Bits`` exports. +* Reexport ``throw`` as ``unsafeThrow`` via Unsafe module. 0.1.5 ===== diff --git a/src/Protolude.hs b/src/Protolude.hs index 24fc3645fe..9a0b9bb434 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -230,7 +230,10 @@ import Control.Monad.Trans as X ( -- Base types import Data.Int as X -import Data.Bits as X +import Data.Bits as X hiding ( + unsafeShiftL + , unsafeShiftR + ) import Data.Word as X import Data.Either as X import Data.Complex as X diff --git a/src/Unsafe.hs b/src/Unsafe.hs index 57c01e47f9..ff4d58f341 100644 --- a/src/Unsafe.hs +++ b/src/Unsafe.hs @@ -8,9 +8,11 @@ module Unsafe ( unsafeLast, unsafeFromJust, unsafeIndex, + unsafeThrow, ) where import Base (Int) +import Control.Exception as Exc import qualified Data.List as List import qualified Data.Maybe as Maybe @@ -31,3 +33,6 @@ unsafeFromJust = Maybe.fromJust unsafeIndex :: [a] -> Int -> a unsafeIndex = (List.!!) + +unsafeThrow :: Exc.Exception e => e -> a +unsafeThrow = Exc.throw From c2ca1677c8e988c54b53b97c07a67a09869561b4 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 30 Jun 2016 18:49:28 -0400 Subject: [PATCH 076/295] Control.Exception as qualified import. --- src/Unsafe.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unsafe.hs b/src/Unsafe.hs index ff4d58f341..1e1bdc3f15 100644 --- a/src/Unsafe.hs +++ b/src/Unsafe.hs @@ -12,9 +12,9 @@ module Unsafe ( ) where import Base (Int) -import Control.Exception as Exc import qualified Data.List as List import qualified Data.Maybe as Maybe +import qualified Control.Exception as Exc unsafeHead :: [a] -> a unsafeHead = List.head From 63d5ed625de05fdd122bba50471135c5b568d11a Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 30 Jun 2016 22:56:00 -0400 Subject: [PATCH 077/295] Encoding functions in scope by default. --- CHANGES.md | 3 +++ README.md | 1 + src/Protolude.hs | 31 +++++++++++++++++++++---------- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index cf65a613c9..099d6444a2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,9 @@ * Removes ``throw`` and ``assert`` from ``Control.Exception`` exports. * Removes ``unsafeShiftL`` and ``unsafeShiftR`` from ``Data.Bits`` exports. * Reexport ``throw`` as ``unsafeThrow`` via Unsafe module. +* Hides all Show class functions. Only the Class itself is exported. Forbids +* custom instances that are not GHC derived. +* Export`` encodeUtf8`` and ``decodeUtf8`` functions by default. 0.1.5 ===== diff --git a/README.md b/README.md index fd2671141b..aca9971995 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Design points: * Automatic string conversions. * Types for common data structures in scope. * Types for all common string types in scope. +* Banishes impure exception throwing outside of IO. * StateT/ReaderT/ExceptT transformers in scope by default. * Foldable / Traversable functions in scope by default. * Unsafe functions are prefixed with "unsafe" in separate module. diff --git a/src/Protolude.hs b/src/Protolude.hs index 9a0b9bb434..cd79d98d08 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -32,12 +32,17 @@ import Conv as X import Panic as X import Base as Base hiding ( - putStr -- Overriden by Show.putStr - , putStrLn -- Overriden by Show.putStrLn - , print -- Overriden by Protolude.print - , show -- Overriden by Protolude.show - , error -- Overriden by Debug.error - , undefined -- Overriden by Debug.undefined + putStr -- Overriden by Show.putStr + , putStrLn -- Overriden by Show.putStrLn + , print -- Overriden by Protolude.print + , error -- Overriden by Debug.error + , undefined -- Overriden by Debug.undefined + , show -- Overriden by Protolude.show + , showFloat -- Custom Show instances deprecated. + , showList -- Custom Show instances deprecated. + , showSigned -- Custom Show instances deprecated. + , showSignedFloat -- Custom Show instances deprecated. + , showsPrec -- Custom Show instances deprecated. ) import qualified Base as PBase @@ -279,7 +284,6 @@ import Data.ByteString as X (ByteString) -- Text import Data.Text as X (Text) import qualified Data.Text.Lazy -import qualified Data.Text.IO import Data.Text.IO as X ( getLine @@ -290,14 +294,20 @@ import Data.Text.IO as X ( , appendFile ) -import Data.Text.Lazy ( +import Data.Text.Lazy as X ( toStrict , fromStrict ) +import Data.Text.Encoding as X ( + encodeUtf8 + , decodeUtf8 + , decodeUtf8' + , decodeUtf8With + ) + -- IO import System.Exit as X ---import System.Info as X import System.Environment as X (getArgs) import System.IO as X ( Handle @@ -317,6 +327,7 @@ import Control.Monad.ST as X import Control.Exception as X hiding ( throw , assert + , displayException ) import Control.Monad.STM as X import Control.Concurrent as X @@ -359,8 +370,8 @@ print = liftIO . PBase.print show :: (Show a, StringConv String b) => a -> b show x = toS (PBase.show x) -{-# SPECIALIZE show :: Show a => a -> String #-} {-# SPECIALIZE show :: Show a => a -> Text #-} {-# SPECIALIZE show :: Show a => a -> LText #-} {-# SPECIALIZE show :: Show a => a -> ByteString #-} {-# SPECIALIZE show :: Show a => a -> LByteString #-} +{-# SPECIALIZE show :: Show a => a -> String #-} From f6586ba8b4eba11122ffce3a4fad84b60f8f2c93 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 30 Jun 2016 23:02:39 -0400 Subject: [PATCH 078/295] Change safety language flags. --- src/Conv.hs | 4 ++-- src/Debug.hs | 2 +- src/Functor.hs | 1 + src/Panic.hs | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Conv.hs b/src/Conv.hs index 2b092b56f4..99826e127a 100644 --- a/src/Conv.hs +++ b/src/Conv.hs @@ -1,6 +1,6 @@ -{-# LANGUAGE TypeSynonymInstances #-} +{-# LANGUAGE Trustworthy #-} {-# LANGUAGE FlexibleInstances #-} - +{-# LANGUAGE TypeSynonymInstances #-} module Conv ( StringConv (..) diff --git a/src/Debug.hs b/src/Debug.hs index 1266aa06fc..42be4c443d 100644 --- a/src/Debug.hs +++ b/src/Debug.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE Unsafe #-} +{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} module Debug ( diff --git a/src/Functor.hs b/src/Functor.hs index 5f228b5013..87d6bf3490 100644 --- a/src/Functor.hs +++ b/src/Functor.hs @@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-} +{-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} module Functor ( diff --git a/src/Panic.hs b/src/Panic.hs index 863feddb98..19e994ebf8 100644 --- a/src/Panic.hs +++ b/src/Panic.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE Trustworthy #-} {-# LANGUAGE DeriveDataTypeable #-} module Panic ( From f0fd11791c363222d73b34133a87bcb356cd6c26 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 1 Jul 2016 11:25:10 -0400 Subject: [PATCH 079/295] Add unsnoc function. --- CHANGES.md | 1 + src/Protolude.hs | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 099d6444a2..2330e0a6f1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,7 @@ * Hides all Show class functions. Only the Class itself is exported. Forbids * custom instances that are not GHC derived. * Export`` encodeUtf8`` and ``decodeUtf8`` functions by default. +* Adds ``unsnoc`` function. 0.1.5 ===== diff --git a/src/Protolude.hs b/src/Protolude.hs index cd79d98d08..429192b01d 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -12,6 +12,7 @@ module Protolude ( map, (&), uncons, + unsnoc, applyN, print, show, @@ -362,6 +363,13 @@ uncons :: [a] -> Maybe (a, [a]) uncons [] = Nothing uncons (x:xs) = Just (x, xs) +unsnoc :: [x] -> Maybe ([x],x) +unsnoc = foldr go Nothing + where + go x mxs = Just (case mxs of + Nothing -> ([], x) + Just (xs, e) -> (x:xs, e)) + applyN :: Int -> (a -> a) -> a -> a applyN n f = X.foldr (.) identity (X.replicate n f) From 21be7f290823943a9b484edb23d3b384b5f94d69 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 2 Jul 2016 13:50:31 -0400 Subject: [PATCH 080/295] Fix 0.1.6 changelog. --- CHANGES.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 2330e0a6f1..0ba14b036b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,8 +8,7 @@ * Removes ``throw`` and ``assert`` from ``Control.Exception`` exports. * Removes ``unsafeShiftL`` and ``unsafeShiftR`` from ``Data.Bits`` exports. * Reexport ``throw`` as ``unsafeThrow`` via Unsafe module. -* Hides all Show class functions. Only the Class itself is exported. Forbids -* custom instances that are not GHC derived. +* Hides all Show class functions. Only the Class itself is exported. Forbids custom instances that are not GHC derived. * Export`` encodeUtf8`` and ``decodeUtf8`` functions by default. * Adds ``unsnoc`` function. From 6b6f8967accf50f811a6c10189ddb90cb58b8315 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 2 Jul 2016 14:00:26 -0400 Subject: [PATCH 081/295] Note about exception handling. --- README.md | 13 +++++++++++++ protolude.cabal | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aca9971995..d04bbda446 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,19 @@ manually. import GHC.Show (Show(..)) ``` +* Partial functions like ``undefined`` and ``error`` raise compiler warnings on + usage. + +This is by design. For fatal uncatchable errors use the provided ``panic`` +function if you intend the program to immediately abort. + +```haskell +panic "This is fatal my failure" +``` + +If inside of IO simply use ``throwIO`` for exception handling, or if in pure +business logic use well-typed checked exceptions of the ``ExceptT`` and variety. + License ------- diff --git a/protolude.cabal b/protolude.cabal index cee05882b2..1ee0ca4510 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -34,6 +34,8 @@ library exposed-modules: Protolude Unsafe + + other-modules: Base Applicative Bool @@ -48,8 +50,6 @@ library Bifunctor Panic - other-modules: - default-extensions: NoImplicitPrelude OverloadedStrings From 827c0ef87b980bedb3569af6c9e040ce80212a62 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 2 Jul 2016 17:27:40 -0400 Subject: [PATCH 082/295] Formatting for FAQ. --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d04bbda446..ef58707b0c 100644 --- a/README.md +++ b/README.md @@ -88,8 +88,8 @@ tracks Stack LTS resolver. FAQs ---- -* My ``putStrLn`` and ``putStr`` instances are no longer inferred in the presense -of the ``-XOverloadedStrings`` extension? +* **My ``putStrLn`` and ``putStr`` instances are no longer inferred in the presense +of the ``-XOverloadedStrings`` extension?** Because the print functions are polymorphic the type of the print functions may require annotations if the type is not fully specified by inference. To force a @@ -100,7 +100,7 @@ putText :: MonadIO m => T.Text -> m () putLText :: MonadIO m => TL.Text -> m () ``` -* How do I write manual Show instances if ``show`` isn't provided? +* **How do I write manual Show instances if ``show`` isn't provided?** Generally speaking writing manual instances of Show is a [Haskell antipattern]( http://www.stephendiehl.com/posts/strings.html) because it produces @@ -114,8 +114,8 @@ manually. import GHC.Show (Show(..)) ``` -* Partial functions like ``undefined`` and ``error`` raise compiler warnings on - usage. +* **Partial functions like ``undefined`` and ``error`` raise compiler warnings on + usage.** This is by design. For fatal uncatchable errors use the provided ``panic`` function if you intend the program to immediately abort. From b621258ce7869773a561bca6154e9aa714e4182a Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 2 Jul 2016 17:31:00 -0400 Subject: [PATCH 083/295] Better example text for panic. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ef58707b0c..520ea7e016 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ This is by design. For fatal uncatchable errors use the provided ``panic`` function if you intend the program to immediately abort. ```haskell -panic "This is fatal my failure" +panic "Thus I die. Thus, thus, thus. Now I am dead" ``` If inside of IO simply use ``throwIO`` for exception handling, or if in pure From b658b4c8efb5b3ba42d4a4de3d12d78da220604d Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 2 Jul 2016 17:32:11 -0400 Subject: [PATCH 084/295] Note explicit String types. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 520ea7e016..61e46f96a3 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Design points: * Polymorphic show. * Automatic string conversions. * Types for common data structures in scope. -* Types for all common string types in scope. +* Types for all common string types (Text/ByteString) in scope. * Banishes impure exception throwing outside of IO. * StateT/ReaderT/ExceptT transformers in scope by default. * Foldable / Traversable functions in scope by default. @@ -125,7 +125,7 @@ panic "Thus I die. Thus, thus, thus. Now I am dead" ``` If inside of IO simply use ``throwIO`` for exception handling, or if in pure -business logic use well-typed checked exceptions of the ``ExceptT`` and variety. +business logic use well-typed checked exceptions of the ``ExceptT`` variety. License ------- From 2f619f3ebd721990c363b2be72844ddcb851f47d Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 2 Jul 2016 17:57:44 -0400 Subject: [PATCH 085/295] Link to pretty printer library. --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 61e46f96a3..5c329cd931 100644 --- a/README.md +++ b/README.md @@ -104,8 +104,9 @@ putLText :: MonadIO m => TL.Text -> m () Generally speaking writing manual instances of Show is a [Haskell antipattern]( http://www.stephendiehl.com/posts/strings.html) because it produces -law-violating instances of Show. You probably want to use a pretty printer -library for custom printing. +law-violating instances of Show. You probably want to use a [pretty +printer](https://hackage.haskell.org/package/wl-pprint-text) library for custom +printing. If backwards compatibility is needed then the base library can be imported manually. @@ -114,6 +115,9 @@ manually. import GHC.Show (Show(..)) ``` +Automatic deriving of ``Show`` for your types is still supported since the class +is in scope by default. + * **Partial functions like ``undefined`` and ``error`` raise compiler warnings on usage.** From 245dd5190eb6936c5b10b943d55f4e43c07a1461 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 2 Jul 2016 20:11:20 -0400 Subject: [PATCH 086/295] Explicitly lift throwIO and throwTo. --- src/Protolude.hs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index 429192b01d..5056733226 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -15,6 +15,8 @@ module Protolude ( unsnoc, applyN, print, + throwIO, + throwTo, show, LText, @@ -326,12 +328,19 @@ import Control.Monad.ST as X -- Concurrency and Parallelism import Control.Exception as X hiding ( - throw + throw -- Impure throw is forbidden. + , throwIO + , throwTo , assert , displayException ) + +import qualified Control.Exception + import Control.Monad.STM as X -import Control.Concurrent as X +import Control.Concurrent as X hiding ( + throwTo + ) import Control.Concurrent.Async as X import Foreign.Storable as X (Storable) @@ -376,6 +385,12 @@ applyN n f = X.foldr (.) identity (X.replicate n f) print :: (X.MonadIO m, PBase.Show a) => a -> m () print = liftIO . PBase.print +throwIO :: (X.MonadIO m, Exception e) => e -> m a +throwIO = liftIO . Control.Exception.throwIO + +throwTo :: (X.MonadIO m, Exception e) => ThreadId -> e -> m () +throwTo tid e = liftIO (Control.Exception.throwTo tid e) + show :: (Show a, StringConv String b) => a -> b show x = toS (PBase.show x) {-# SPECIALIZE show :: Show a => a -> Text #-} From 7aa8b6646eae355c6bbef0d1975cb8154b869e3e Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 5 Jul 2016 07:22:46 -0400 Subject: [PATCH 087/295] Expose ``state` and ``reader`` functions. --- src/Protolude.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Protolude.hs b/src/Protolude.hs index 5056733226..592e9e4b9e 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -198,6 +198,7 @@ import Control.Monad.State as X ( , get , gets , modify + , state , withState , runState @@ -216,6 +217,7 @@ import Control.Monad.Reader as X ( , ask , asks , local + , reader , runReader , runReaderT ) From 1cb06305292cb01719251891365496de2c20b850 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 21 Jul 2016 14:49:09 -0400 Subject: [PATCH 088/295] New symbol documentation. --- Symbols.md | 1851 ++++++++++++++++++++++---------------------------- src/Monad.hs | 1 + 2 files changed, 829 insertions(+), 1023 deletions(-) diff --git a/Symbols.md b/Symbols.md index 179fa1f8c0..93cf202e98 100644 --- a/Symbols.md +++ b/Symbols.md @@ -1,1125 +1,906 @@ -* Applicative -* Bool -* Monad -* Show -* Either -* Functor -* Semiring -* Bifunctor -* Exception -* Coercion -* TypeRep -* State -* Foldable -* Traversable -* Maybe -* Monoid -* String -* Bounded -* Enum -* Floating -* RealFloat -* Num -* Fractional -* Integral -* Rational -* Real -* RealFrac -* FilePath -* Double# -* Float# -* RealWorld -* Any -* Constraint -* Char -* Double -* Float -* Int -* Word -* Coercible -* V1 -* U1 -* K1 -* M1 -* :+: +* $ +* $! +* $!! +* $> +* % +* & +* && +* * +* ** +* *> +* + +* ++ +* - +* . +* .&. +* .|. +* / +* /= +* :% * :*: -* Rec0 -* D1 -* C1 -* S1 -* Rep -* IO -* Ratio -* Integer -* Eq -* Ord -* IsString -* Alternative -* Typeable -* == -* Read -* Ptr -* FunPtr -* Int8 -* Int16 -* Int32 -* Int64 -* Word8 -* Word16 -* Word32 -* Word64 -* MonadPlus -* Ordering -* Generic -* Constructor -* Selector -* FFFormat -* Const -* ZipList -* Identity -* NFData -* Map -* Set -* Seq -* IntMap -* IntSet -* Proxy +* :+ +* :+: * :~: -* Void -* MonadState -* StateT -* Reader -* MonadReader -* ReaderT -* Except -* MonadError -* ExceptT -* MonadIO -* Bits -* Complex -* Fixity -* ByteString -* ByteString -* Text -* Text -* Handle -* IOMode -* ST -* STM -* Async -* Storable -* FatalError -* StringConv -* Leniency -* Print +* < +* <$ +* <$!> +* <$> +* <* +* <**> +* <*> +* <.> +* <= +* <=< +* <> +* <|> +* =<< +* == +* == +* > +* >= +* >=> +* >> +* >>= * All +* AllocationLimitExceeded * Alt -* Dual -* Endo -* First -* Last -* Product -* Sum -* Down -* SomeException -* IOException -* FiniteBits -* NestedAtomically -* NoMethodError -* NonTermination -* PatternMatchFail -* RecConError -* RecSelError -* RecUpdError +* Alternative +* Any +* Any +* AppendMode +* Applicative * ArithException -* ErrorCall -* MaskingState -* Handler -* AllocationLimitExceeded * ArrayException * AssertionFailed +* AssertionFailed +* Async * AsyncException +* Bifunctor +* Bits +* BlockedIndefinitelyOnMVar * BlockedIndefinitelyOnMVar * BlockedIndefinitelyOnSTM -* Deadlock -* SomeAsyncException -* ThreadId -* ExitCode +* BlockedIndefinitelyOnSTM +* Bool +* Bool +* Bounded +* ByteString +* C1 * Chan -* QSem -* QSemN -* MVar -* Concurrently +* Char +* Coercible * Coercion -* Left -* Right -* Just -* Nothing -* Any -* False -* True +* Coercion +* Complex +* Concurrently +* Concurrently +* Const +* Const +* Constraint +* Constructor * D# -* F# -* U1 -* K1 -* M1 -* :% -* LT +* D1 +* Deadlock +* Deadlock +* Denormal +* DivideByZero +* Double +* Double# +* Down +* Down +* Dual +* Dual * EQ -* GT +* Either +* Endo +* Endo +* Enum +* Eq +* ErrorCall +* ErrorCall +* Except +* ExceptT +* Exception +* ExitCode +* ExitFailure +* ExitSuccess +* F# * FFExponent * FFFixed +* FFFormat * FFGeneric -* Const -* ZipList -* Identity -* Proxy +* False * FatalError -* All -* Alt -* Dual -* Endo +* FatalError +* FilePath +* FiniteBits * First -* Last -* Product -* Sum -* Prefix +* First +* Fixity +* Float +* Float# +* Floating +* Foldable +* Fractional +* FunPtr +* Functor +* GT +* Generic +* Handle +* Handler +* Handler +* HeapOverflow +* IO +* IOException +* IOMode +* Identity +* Identity +* IndexOutOfBounds * Infix -* Refl -* Down -* AppendMode -* ReadMode -* ReadWriteMode -* WriteMode -* SomeException +* Int +* Int +* Int16 +* Int32 +* Int64 +* Int8 +* IntMap +* IntSet +* Integer +* Integral +* IsString +* Just +* K1 +* K1 +* LByteString +* LT +* LText +* Last +* Last +* Left +* Leniency * Lenient -* Strict +* LossOfPrecision +* M1 +* M1 +* MVar +* Map +* MaskedInterruptible +* MaskedUninterruptible +* MaskingState +* Maybe +* Monad +* MonadError +* MonadIO +* MonadPlus +* MonadReader +* MonadState +* Monoid +* NFData * NestedAtomically +* NestedAtomically +* NoMethodError * NoMethodError * NonTermination +* NonTermination +* Nothing +* Num +* Ord +* Ordering +* Ordering +* Overflow +* PatternMatchFail * PatternMatchFail +* Prefix +* Print +* Product +* Product +* Proxy +* Proxy +* Ptr +* QSem +* QSemN +* Ratio +* RatioZeroDenominator +* Rational +* Read +* ReadMode +* ReadWriteMode +* Reader +* ReaderT +* Real +* RealFloat +* RealFrac +* RealWorld +* Rec0 * RecConError +* RecConError +* RecSelError * RecSelError * RecUpdError -* Denormal -* DivideByZero -* ErrorCall -* LossOfPrecision -* Overflow -* RatioZeroDenominator -* Underflow -* MaskedInterruptible -* MaskedUninterruptible -* Unmasked -* Handler -* AllocationLimitExceeded -* IndexOutOfBounds -* UndefinedElement -* AssertionFailed -* HeapOverflow +* RecUpdError +* Refl +* Rep +* Rep +* Right +* S1 +* ST +* STM +* Selector +* Semiring +* Seq +* Set +* Show +* SomeAsyncException +* SomeAsyncException +* SomeException +* SomeException * StackOverflow +* State +* StateT +* Storable +* Strict +* String +* StringConv +* Sum +* Sum +* Text +* ThreadId * ThreadKilled +* Traversable +* True +* TypeRep +* Typeable +* U1 +* U1 +* UndefinedElement +* Underflow +* Unmasked * UserInterrupt -* BlockedIndefinitelyOnMVar -* BlockedIndefinitelyOnSTM -* Deadlock -* SomeAsyncException -* :+ -* ExitFailure -* ExitSuccess -* Concurrently -* deepseq -* split -* split -* async -* void -* smallInteger -* wordToInteger -* integerToWord -* integerToInt -* plusInteger -* minusInteger -* timesInteger -* negateInteger -* eqInteger# -* neqInteger# +* V1 +* Void +* Word +* Word +* Word16 +* Word32 +* Word64 +* Word8 +* WriteMode +* ZipList +* ZipList +* ^ +* ^%^ +* ^^ +* ^^%^^ +* abs * absInteger -* signumInteger -* leInteger# -* gtInteger# -* ltInteger# -* geInteger# -* compareInteger -* encodeFloatInteger -* floatFromInteger -* encodeDoubleInteger -* decodeDoubleInteger -* doubleFromInteger -* rationalToFloat -* rationalToDouble -* andInteger -* orInteger -* xorInteger -* complementInteger -* shiftLInteger -* shiftRInteger -* quotInteger -* remInteger -* divInteger -* modInteger -* divModInteger -* quotRemInteger -* group -* group -* group -* either -* all -* all +* absurd +* acos +* acosDouble +* acosFloat +* acosh +* addMVarFinalizer * all +* allowInterrupt +* always +* alwaysSucceeds * and +* andInteger * any -* any -* any -* concat -* concat -* concat -* concatMap -* concatMap -* concatMap -* elem -* elem -* foldMap -* foldl -* foldl -* foldl -* foldl1 -* foldl1 -* foldr -* foldr -* foldr -* foldr1 -* foldr1 -* length -* length -* length -* mapM_ -* maximum -* maximum -* maximum -* minimum -* minimum -* minimum -* notElem -* notElem -* null -* null -* null -* or -* product -* sequence_ -* sum -* <$> -* maybe -* mapM -* sequence -* sequenceA -* traverse -* curry -* fst -* snd -* uncurry -* $! -* *> -* ++ -* . -* <$ -* <* -* <*> -* =<< -* >>= +* ap +* appEndo +* appendFile +* applyN * asTypeOf -* const -* flip -* fmap -* map -* map -* mappend -* mconcat -* mempty -* otherwise -* pure -* return -* enumFrom -* enumFromThen -* enumFromThenTo -* enumFromTo -* fromEnum -* maxBound -* minBound -* pred -* succ -* toEnum -* ** -* acos -* acosh * asin +* asinDouble +* asinFloat * asinh +* ask +* asks +* asum +* async +* asyncBound +* asyncExceptionFromException +* asyncExceptionToException +* asyncOn +* asyncOnWithUnmask +* asyncThreadId +* asyncWithUnmask +* atDef +* atMay * atan * atan2 +* atanDouble +* atanFloat * atanh +* atomically +* bimap +* bit +* bitDefault +* bitSize +* bitSizeMaybe +* bool +* boundedEnumFrom +* boundedEnumFromThen +* bracket +* bracketOnError +* bracket_ +* break +* byteSwap16 +* byteSwap32 +* byteSwap64 +* cancel +* cancelWith +* cast +* castWith +* catMaybes +* catch +* catchError +* catchJust +* catchSTM +* catches +* ceiling +* check +* chr +* cis +* clamp +* clearBit +* coerceWith +* compare +* compareInteger +* comparing +* complement +* complementBit +* complementInteger +* conFixity +* conIsRecord +* conName +* concat +* concatMap +* concatMapM +* concurrently +* conjugate +* const * cos +* cosDouble +* cosFloat * cosh +* coshDouble +* coshFloat +* countLeadingZeros +* countTrailingZeros +* curry +* cycle +* decodeDoubleInteger * decodeFloat +* decodeUtf8 +* decodeUtf8' +* decodeUtf8With +* deepseq +* denominator +* die +* div +* divInteger +* divMod +* divModInteger +* divZeroError +* divideDouble +* divideFloat +* double2Float +* double2Int +* doubleFromInteger +* drop +* dropWhile +* dupChan +* either +* eitherA +* elem +* empty +* encodeDoubleInteger * encodeFloat +* encodeFloatInteger +* encodeUtf8 +* enumFrom +* enumFromThen +* enumFromThenTo +* enumFromTo +* eqDouble +* eqFloat +* eqInteger +* eqInteger# +* eqT +* error +* evalState +* evalStateT +* evaluate +* even +* execState +* execStateT +* exitFailure +* exitSuccess +* exitWith * exp +* expDouble +* expFloat * exponent +* expt +* expts +* expts10 +* filter +* filterM +* finally +* find +* finiteBitSize +* first +* fix +* fixST +* flip +* float2Double +* float2Int * floatDigits +* floatFromInteger * floatRadix * floatRange -* isDenormalized -* isIEEE -* isInfinite -* isNaN -* isNegativeZero -* log -* logBase -* pi -* scaleFloat -* significand -* sin -* sinh -* sqrt -* tan -* tanh -* * -* + -* - -* abs -* fromInteger -* negate -* signum -* subtract -* / -* ^ -* ^^ -* ceiling -* div -* divMod -* even +* floatToDigits * floor -* fromIntegral -* fromRational -* gcd -* lcm -* mod -* odd -* properFraction -* quot -* quotRem -* realToFrac -* recip -* rem -* round -* toInteger -* toRational -* truncate -* show -* showList -* showsPrec -* appendFile -* appendFile -* getContents -* getContents -* getLine -* interact -* interact -* print -* putStr -* putStr -* putStr -* putStr -* putStrLn -* putStrLn -* putStrLn -* putStrLn -* readFile -* readFile -* writeFile -* writeFile -* reads -* lines -* unlines -* unwords -* words -* ioError -* break -* break -* break -* cycle -* cycle -* cycle -* drop -* drop -* drop -* dropWhile -* dropWhile -* dropWhile -* head -* head -* head -* init -* init -* iterate -* iterate -* iterate -* last -* last -* repeat -* repeat -* repeat -* replicate -* replicate -* replicate -* reverse -* reverse -* reverse -* scanl -* scanl -* scanl -* scanl1 -* scanr -* scanr -* scanr1 -* span -* span -* splitAt -* splitAt -* splitAt -* tail -* tail -* take -* take -* take -* takeWhile -* takeWhile -* takeWhile -* unzip -* zipWith -* zipWith -* zipWith -* && -* not -* || -* /= -* < -* <= -* > -* compare -* max -* min -* $ -* error -* error -* undefined -* undefined -* seq -* >= -* == -* join -* first -* toList -* filter -* filter -* filter -* zip -* zip -* zip -* assert -* mkInteger +* fmap +* fmapDefault +* fold +* foldM +* foldM_ +* foldMap +* foldMapDefault +* foldl +* foldl' +* foldl1May +* foldlM +* foldr +* foldr' +* foldr1May +* foldrM +* for +* forConcurrently +* forM +* forM_ +* for_ +* force +* forever +* forkFinally +* forkIO +* forkIOWithUnmask +* forkOS +* forkOn +* forkOnWithUnmask +* formatRealFloat +* formatRealFloatAlt +* from +* fromEnum +* fromEnumError +* fromException +* fromInteger +* fromIntegral +* fromMaybe +* fromRat +* fromRat' +* fromRat'' +* fromRational +* fromStrict +* fst +* gcastWith +* gcd +* gcdInt' +* gcdWord' +* geDouble +* geFloat +* geInteger +* geInteger# +* get +* getAll +* getAlt +* getAny +* getArgs +* getChanContents +* getConst +* getContents +* getDual +* getFirst +* getLast +* getLine +* getMaskingState +* getNumCapabilities +* getProduct +* getSum +* getZipList +* gets +* group +* gtDouble +* gtFloat +* gtInteger +* gtInteger# * guard -* liftM -* lift -* <|> -* <**> -* empty -* empty -* empty -* some -* many -* mzero -* mplus -* ap -* liftA -* liftA2 -* liftA3 -* liftM2 -* liftM3 -* liftM4 -* liftM5 -* maxInt -* minInt -* ord -* when -* unpack -* unpack -* .&. -* shiftL -* shiftR -* double2Int -* float2Int +* guardM +* handle +* handleJust +* hashInteger +* head +* headDef +* headMay +* identity +* ifM +* imagPart +* infinity +* initDef +* initMay +* initSafe +* inits * int2Double * int2Float -* denominator -* numerator -* numericEnumFrom -* numericEnumFromThen -* numericEnumFromThenTo -* numericEnumFromTo +* integerLogBase +* integerToInt +* integerToWord +* integralEnumFrom +* integralEnumFromThen +* integralEnumFromThenTo +* integralEnumFromTo +* interact +* intercalate +* intersperse +* ioError +* isCurrentThreadBound +* isDenormalized * isDoubleDenormalized +* isDoubleFinite * isDoubleInfinite * isDoubleNaN * isDoubleNegativeZero +* isEmptyChan +* isEmptyMVar * isFloatDenormalized +* isFloatFinite * isFloatInfinite * isFloatNaN * isFloatNegativeZero -* isDoubleFinite -* isFloatFinite -* acosDouble -* acosFloat -* asinDouble -* asinFloat -* atanDouble -* atanFloat -* clamp -* cosDouble -* cosFloat -* coshDouble -* coshFloat -* divideDouble -* divideFloat -* double2Float -* eqDouble -* eqFloat -* expDouble -* expFloat -* expt -* expts -* expts10 -* float2Double -* floatToDigits -* formatRealFloat -* formatRealFloatAlt -* fromRat -* fromRat' -* fromRat'' -* geDouble -* geFloat -* gtDouble -* gtFloat -* integerLogBase -* leDouble -* leFloat +* isIEEE +* isInfinite +* isJust +* isLeft +* isNaN +* isNegativeZero +* isNothing +* isPrefixOf +* isRight +* isSigned +* iterate +* join +* killThread +* lastDef +* lastMay +* lcm +* leDouble +* leFloat +* leInteger +* leInteger# +* leftToMaybe +* lefts +* length +* lift +* liftA +* liftA2 +* liftA3 +* liftIO +* liftM +* liftM' +* liftM2 +* liftM2' +* liftM3 +* liftM4 +* liftM5 +* link +* link2 +* list +* listToMaybe +* local +* log +* logBase * logDouble * logFloat * ltDouble * ltFloat +* ltInteger +* ltInteger# +* magnitude +* many +* map +* mapAccumL +* mapAccumR +* mapAndUnzipM +* mapConcurrently +* mapException +* mapM +* mapM_ +* mapMaybe +* mappend +* mask +* mask_ +* max +* maxBound * maxExpt * maxExpt10 +* maxInt +* maximum +* maximumBy +* maybe +* maybeToEither +* maybeToLeft +* maybeToList +* maybeToRight +* mconcat +* mempty +* mfilter +* min +* minBound * minExpt +* minInt +* minimum +* minimumBy * minusDouble * minusFloat +* minusInteger +* mkInteger +* mkPolar +* mkWeakMVar +* mkWeakThreadId +* mod +* modInteger +* modify +* modifyMVar +* modifyMVarMasked +* modifyMVarMasked_ +* modifyMVar_ +* mplus +* msg +* msum +* myThreadId +* mzero * neDouble * neFloat +* negate * negateDouble * negateFloat -* plusDouble -* plusFloat -* powerDouble -* powerFloat -* roundTo -* showFloat -* showSignedFloat -* sinDouble -* sinFloat -* sinhDouble -* sinhFloat -* sqrtDouble -* sqrtFloat -* tanDouble -* tanFloat -* tanhDouble -* tanhFloat -* timesDouble -* timesFloat -* word2Double -* word2Float -* eqInteger -* divZeroError -* uncons -* uncons -* headMay -* headDef -* initMay -* initDef -* initSafe -* tailMay -* tailDef -* tailSafe -* lastDef -* lastMay -* foldr1May -* foldl1May -* atMay -* atDef -* optional -* $!! -* force -* intercalate -* intercalate -* intercalate -* isPrefixOf -* isPrefixOf -* isPrefixOf -* sortBy -* sort -* intersperse -* intersperse -* intersperse -* transpose -* transpose -* transpose -* subsequences -* permutations -* unfoldr -* unfoldr -* unfoldr -* inits -* inits -* inits -* tails -* tails -* tails -* typeRep -* cast -* eqT -* coerceWith -* sym -* trans -* castWith -* gcastWith -* absurd -* vacuous -* put -* get -* gets -* modify -* withState -* runState -* execState -* evalState -* runStateT -* execStateT -* evalStateT -* ask -* asks -* local -* runReader -* runReaderT -* throwError -* catchError -* runExcept -* runExceptT -* liftIO -* chr -* bool -* fix +* negateInteger +* neqInteger +* neqInteger# +* newChan +* newEmptyMVar +* newMVar +* newQSem +* newQSemN +* not +* notANumber +* notElem +* notImplemented +* null +* numerator +* numericEnumFrom +* numericEnumFromThen +* numericEnumFromThenTo +* numericEnumFromTo +* odd * on -* toStrict -* toStrict -* fromStrict -* fromStrict -* getArgs -* stdin -* stdout -* stderr -* withFile +* onException +* one * openFile -* readMaybe -* readEither -* zero -* panic -* toS -* toSL +* optional +* or * orAlt +* orElse * orEmpty -* eitherA -* maybeToLeft -* maybeToRight -* leftToMaybe -* rightToMaybe -* maybeToEither -* $> -* >=> -* <=< -* forever -* mfilter -* filterM -* mapAndUnzipM -* zipWithM -* zipWithM_ -* foldM -* foldM_ -* replicateM -* replicateM_ -* concatMapM -* unless -* liftM' -* liftM2' -* <$!> -* trace -* traceM -* traceIO -* traceShow -* traceShowM -* notImplemented -* whenM -* unlessM -* ifM -* guardM -* putText -* putLText +* orInteger +* ord * ordNub -* sortOn -* list -* comparing -* one -* <.> -* conIsRecord -* conName -* from -* selName -* to -* <> -* getAll -* getAlt -* getAny -* getDual -* appEndo -* getFirst -* getLast -* getProduct -* getSum -* isLeft -* isRight -* lefts +* otherwise +* overflowError +* panic * partitionEithers -* rights -* conFixity -* unK1 -* unM1 -* geInteger -* gtInteger -* hashInteger -* leInteger -* ltInteger -* neqInteger -* testBitInteger -* catMaybes -* fromMaybe -* isJust -* isNothing -* listToMaybe -* mapMaybe -* cons -* cons -* maybeToList -* find -* find -* find -* foldl' -* foldl' -* foldl' -* maximumBy -* minimumBy -* dropWhileEnd -* elemIndex -* elemIndices -* findIndex -* findIndices -* groupBy -* groupBy -* isInfixOf -* isSuffixOf -* isSuffixOf -* partition -* partition -* stripPrefix -* mapAccumL -* mapAccumL -* mapAccumL -* mapAccumR -* mapAccumR -* mapAccumR -* foldl1' -* foldl1' -* fold -* foldr' -* asum -* foldlM -* foldrM -* forM_ -* for_ -* msum -* sequenceA_ -* traverse_ -* forM -* singleton -* singleton -* link -* getConst -* getZipList -* boundedEnumFrom -* boundedEnumFromThen -* fromEnumError +* permutations +* phase +* pi +* plusDouble +* plusFloat +* plusInteger +* polar +* poll +* pollSTM +* popCount +* popCountDefault +* powerDouble +* powerFloat +* pred * predError -* succError -* toEnumError -* % -* ^%^ -* ^^%^^ -* gcdInt' -* gcdWord' -* infinity -* integralEnumFrom -* integralEnumFromThen -* integralEnumFromThenTo -* integralEnumFromTo -* notANumber -* overflowError +* print +* product +* properFraction +* pure +* put +* putLText +* putMVar +* putStr +* putStrLn +* putText +* quot +* quotInteger +* quotRem +* quotRemInteger +* race +* race_ * ratioPrec * ratioPrec1 * ratioZeroDenominatorError -* reduce -* showSigned -* bracket -* .|. -* hGetContents -* hGetContents -* hGetLine -* hPutStr -* hPutStr -* hPutStrLn -* newEmptyMVar -* putMVar -* takeMVar -* index -* index -* unfoldrN -* append -* append -* snoc -* snoc -* toCaseFold -* toLower -* toTitle -* toUpper -* breakOn -* breakOnAll -* breakOnEnd -* center -* chunksOf -* commonPrefixes -* compareLength -* copy -* count -* count -* dropAround -* dropEnd -* justifyLeft -* justifyRight -* pack -* pack -* replace -* second -* splitOn -* strip -* stripEnd -* stripStart -* stripSuffix -* takeEnd -* takeWhileEnd -* msg -* hPut -* mask -* runIdentity -* fmapDefault -* foldMapDefault -* for -* runST -* elemIndexEnd -* hGet -* hGetNonBlocking -* hPutNonBlocking -* splitWith -* unsnoc -* cons' -* fromChunks -* fromChunks -* toChunks -* toChunks -* hGetChunk -* foldlChunks -* foldlChunks -* foldrChunks -* foldrChunks -* strConv -* try -* evaluate -* bit -* bitDefault -* bitSize -* bitSizeMaybe -* complement -* countLeadingZeros -* countTrailingZeros -* finiteBitSize -* isSigned -* popCount -* rotate -* shift -* testBit -* testBitDefault -* unsafeShiftL -* unsafeShiftR -* xor -* byteSwap16 -* byteSwap32 -* byteSwap64 -* throw -* bracketOnError -* bracket_ -* catch -* catchJust -* finally -* handle -* handleJust -* mapException -* onException -* tryJust -* displayException -* fromException -* toException -* getMaskingState -* mask_ -* throwIO -* uninterruptibleMask -* uninterruptibleMask_ -* allowInterrupt -* catches -* throwTo -* asyncExceptionFromException -* asyncExceptionToException -* bimap +* rationalToDouble +* rationalToFloat +* readChan +* readEither +* readFile +* readMVar +* readMaybe +* reader +* reads +* realPart +* realToFrac +* recip +* reduce +* rem +* remInteger +* repeat +* replicate +* replicateM +* replicateM_ +* retry +* return +* reverse +* rightToMaybe +* rights * rnf -* swap +* rotate * rotateL * rotateR -* zeroBits +* round +* roundTo +* rtsSupportsBoundThreads +* runConcurrently +* runExcept +* runExceptT +* runIdentity +* runInBoundThread +* runInUnboundThread +* runReader +* runReaderT +* runST +* runState +* runStateT +* scaleFloat +* scanl +* scanr +* second +* selName +* seq +* sequence +* sequenceA +* sequenceA_ +* sequence_ * setBit -* clearBit -* complementBit -* popCountDefault -* toIntegralSized -* cis -* conjugate -* imagPart -* magnitude -* mkPolar -* phase -* polar -* realPart -* die -* exitFailure -* exitSuccess -* exitWith -* stToIO -* fixST -* check -* always -* alwaysSucceeds -* atomically -* catchSTM -* orElse -* retry -* throwSTM -* dupChan -* getChanContents -* isEmptyChan -* newChan -* readChan -* unGetChan -* writeChan -* writeList2Chan -* addMVarFinalizer -* mkWeakMVar -* modifyMVar -* modifyMVarMasked -* modifyMVarMasked_ -* modifyMVar_ -* swapMVar -* withMVar -* withMVarMasked -* newQSem +* setNumCapabilities +* shift +* shiftL +* shiftLInteger +* shiftR +* shiftRInteger +* show * signalQSem -* waitQSem -* newQSemN * signalQSemN -* waitQSemN +* significand +* signum +* signumInteger +* sin +* sinDouble +* sinFloat +* sinh +* sinhDouble +* sinhFloat +* smallInteger +* snd +* some +* sort +* sortBy +* sortOn +* splitAt +* sqrt +* sqrtDouble +* sqrtFloat +* stToIO +* state +* stderr +* stdin +* stdout +* strConv +* subsequences +* subtract +* succ +* succError +* sum +* swap +* swapMVar +* sym +* tailDef +* tailMay +* tailSafe +* tails +* take +* takeMVar +* takeWhile +* tan +* tanDouble +* tanFloat +* tanh +* tanhDouble +* tanhFloat +* testBit +* testBitDefault +* testBitInteger +* threadCapability * threadDelay * threadWaitRead * threadWaitReadSTM * threadWaitWrite * threadWaitWriteSTM -* forkIO -* forkIOWithUnmask -* forkOn -* forkOnWithUnmask -* getNumCapabilities -* killThread -* mkWeakThreadId -* myThreadId -* setNumCapabilities -* threadCapability -* yield -* isEmptyMVar -* newMVar -* readMVar +* throwError +* throwIO +* throwSTM +* throwTo +* timesDouble +* timesFloat +* timesInteger +* to +* toEnum +* toEnumError +* toException +* toInteger +* toIntegralSized +* toList +* toRational +* toS +* toSL +* toStrict +* trace +* traceIO +* traceM +* traceShow +* traceShowM +* trans +* transpose +* traverse +* traverse_ +* truncate +* try +* tryJust * tryPutMVar * tryReadMVar * tryTakeMVar -* forkFinally -* forkOS -* rtsSupportsBoundThreads -* isCurrentThreadBound -* runInBoundThread -* runInUnboundThread -* asyncThreadId -* runConcurrently -* asyncBound -* asyncOn -* asyncOnWithUnmask -* asyncWithUnmask -* cancel -* cancelWith -* concurrently -* forConcurrently -* link2 -* mapConcurrently -* poll -* pollSTM -* race -* race_ +* typeRep +* unGetChan +* unK1 +* unM1 +* uncons +* uncurry +* undefined +* unfoldr +* uninterruptibleMask +* uninterruptibleMask_ +* unless +* unlessM +* unsnoc +* vacuous +* void * wait * waitAny * waitAnyCancel @@ -1139,9 +920,33 @@ * waitEitherSTM * waitEitherSTM_ * waitEither_ +* waitQSem +* waitQSemN * waitSTM +* when +* whenM * withAsync * withAsyncBound * withAsyncOn * withAsyncOnWithUnmask * withAsyncWithUnmask +* withFile +* withMVar +* withMVarMasked +* withState +* word2Double +* word2Float +* wordToInteger +* writeChan +* writeFile +* writeList2Chan +* xor +* xorInteger +* yield +* zero +* zeroBits +* zip +* zipWith +* zipWithM +* zipWithM_ +* || diff --git a/src/Monad.hs b/src/Monad.hs index a29c7f7b68..1d9cdda030 100644 --- a/src/Monad.hs +++ b/src/Monad.hs @@ -9,6 +9,7 @@ module Monad ( , (=<<) , (>=>) , (<=<) + , (>>) , forever , join From 76f3f9f17cfb65adaa0736ef3f2af4df24f7acf6 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 29 Jul 2016 11:33:32 -0400 Subject: [PATCH 089/295] monad docs --- docs/Index.md | 3 ++ docs/Monad.md | 133 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 docs/Index.md create mode 100644 docs/Monad.md diff --git a/docs/Index.md b/docs/Index.md new file mode 100644 index 0000000000..286b3e8050 --- /dev/null +++ b/docs/Index.md @@ -0,0 +1,3 @@ +Welcome to project documentation. + +- [Monad and Monadic Functions](docs/Monad.md) diff --git a/docs/Monad.md b/docs/Monad.md new file mode 100644 index 0000000000..53452fdc21 --- /dev/null +++ b/docs/Monad.md @@ -0,0 +1,133 @@ +Monads +====== + +#### Monad + +```haskell +class Applicative m => Monad (m :: * -> *) where + (>>=) :: m a -> (a -> m b) -> m b + (>>) :: m a -> m b -> m b + return :: a -> m a + GHC.Base.fail :: GHC.Base.String -> m a +``` + +```haskell +(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c +``` + +```haskell +(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c +``` + +```haskell +(>>) :: Monad m => m a -> m b -> m b +``` + +```haskell +(>>=) :: Monad m => m a -> (a -> m b) -> m b +``` + +```haskell +forever :: Monad m => m a -> m b +``` + +```haskell +join :: Monad m => m (m a) -> m a +``` + +```haskell +filterM :: Monad m => (a -> m Bool) -> [a] -> m [a] +``` + +```haskell +mapAndUnzipM :: Monad m => (a -> m (b, c)) -> [a] -> m ([b], [c]) +``` + +```haskell +zipWithM :: Monad m => (a -> b -> m c) -> [a] -> [b] -> m [c] +``` + +```haskell +zipWithM_ :: Monad m => (a -> b -> m c) -> [a] -> [b] -> m () +``` + +```haskell +foldM :: (Monad m, Foldable t) => (b -> a -> m b) -> b -> t a -> m b +``` + +```haskell +foldM_ :: (Monad m, Foldable t) => (b -> a -> m b) -> b -> t a -> m () +``` + +```haskell +replicateM :: Monad m => Int -> m a -> m [a] +``` + +```haskell +replicateM_ :: Monad m => Int -> m a -> m () +``` + +```haskell +concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b] +``` + +```haskell +guard :: Alternative f => Bool -> f () +``` + +```haskell +when :: Applicative f => Bool -> f () -> f () +``` + +```haskell +unless :: Applicative f => Bool -> f () -> f () +``` + +```haskell +liftM :: Monad m => (a1 -> r) -> m a1 -> m r +``` + +```haskell +liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r +``` + +```haskell +liftM3 :: Monad m => (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r +``` + +```haskell +liftM4 :: Monad m => (a1 -> a2 -> a3 -> a4 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m r +``` + +```haskell +liftM5 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r +``` + +```haskell +liftM' :: Monad m => (a -> b) -> m a -> m b +``` + +```haskell +liftM2' :: Monad m => (a -> b -> c) -> m a -> m b -> m c +``` + +```haskell +ap :: Monad m => m (a -> b) -> m a -> m b +``` + +```haskell +(<$!>) :: Monad m => (a -> b) -> m a -> m b +``` + +#### MonadPlus + +```haskell +class (Alternative m, Monad m) => MonadPlus (m :: * -> *) where + mzero :: m a + mplus :: m a -> m a -> m a + -- Defined in ‘GHC.Base’ +``` + +```haskell +mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a +``` From 4437583e3ff6c4a176a4f3cf3099f98f02fa8710 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 29 Jul 2016 11:36:38 -0400 Subject: [PATCH 090/295] Fix links. --- docs/Index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Index.md b/docs/Index.md index 286b3e8050..92adb1fff9 100644 --- a/docs/Index.md +++ b/docs/Index.md @@ -1,3 +1,3 @@ Welcome to project documentation. -- [Monad and Monadic Functions](docs/Monad.md) +- [Monad](Monad.md) From 5de8f471389d0d0892d3551b57478aa502a3e8fd Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 29 Jul 2016 12:07:32 -0400 Subject: [PATCH 091/295] Stubs. --- docs/Applicative.md | 78 ++++++++++++++++++++++++++++++++++ docs/Exceptions.md | 62 +++++++++++++++++++++++++++ docs/Function.md | 50 ++++++++++++++++++++++ docs/Index.md | 8 ++++ docs/List.md | 100 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 298 insertions(+) create mode 100644 docs/Applicative.md create mode 100644 docs/Exceptions.md create mode 100644 docs/Function.md create mode 100644 docs/List.md diff --git a/docs/Applicative.md b/docs/Applicative.md new file mode 100644 index 0000000000..1474840bcb --- /dev/null +++ b/docs/Applicative.md @@ -0,0 +1,78 @@ +Applicative +=========== + +#### Functor + +```haskell +class Functor (f :: * -> *) where + fmap :: (a -> b) -> f a -> f b + (<$) :: a -> f b -> f a +``` + +```haskell +(<$>) :: Functor f => (a -> b) -> f a -> f b +``` + +```haskell +($>) :: Functor f => f a -> b -> f b +``` + +#### Applicatives + +```haskell +class Functor f => Applicative (f :: * -> *) where + pure :: a -> f a + (<*>) :: f (a -> b) -> f a -> f b + (*>) :: f a -> f b -> f b + (<*) :: f a -> f b -> f a +``` + +```haskell +(<$>) :: Functor f => (a -> b) -> f a -> f b +``` + +```haskell +orAlt :: (Alternative f, Monoid a) => f a -> f a +``` + +```haskell +orEmpty :: Alternative f => Bool -> a -> f a +``` + +```haskell +eitherA :: (Alternative f) => f a -> f b -> f (Either a b) +``` + +#### Alternative + +```haskell +class Applicative f => Alternative (f :: * -> *) where + empty :: f a + (<|>) :: f a -> f a -> f a + some :: f a -> f [a] + many :: f a -> f [a] +``` + +```haskell +(<|>) :: Alternative f => f a -> f a -> f a +``` + +```haskell +many :: Alternative f => f a -> f [a] +``` + +```haskell +some :: Alternative f => f a -> f [a] +``` + +```haskell +optional :: Alternative f => f a -> f (Maybe a) +``` + +```haskell +liftA :: Applicative f => (a -> b) -> f a -> f b +``` + +```haskell +empty :: Alternative f => f a +``` diff --git a/docs/Exceptions.md b/docs/Exceptions.md new file mode 100644 index 0000000000..99a3d1585e --- /dev/null +++ b/docs/Exceptions.md @@ -0,0 +1,62 @@ +Exception Handling +================== + +#### MonadError + +```haskell +class Monad m => MonadError e (m :: * -> *) | m -> e where + throwError :: e -> m a + catchError :: m a -> (e -> m a) -> m a +``` + +```haskell +type Except e = ExceptT e Identity +``` + + +```haskell +newtype ExceptT e (m :: * -> *) a + = Control.Monad.Trans.Except.ExceptT (m (Either e a)) +``` + + +```haskell +throwError :: MonadError e m => e -> m a +``` + +```haskell +catchError :: MonadError e m => m a -> (e -> m a) -> m a +``` + +```haskell +runExcept :: Except e a -> Either e a +``` + +```haskell +runExceptT :: ExceptT e m a -> m (Either e a) +``` + +#### Exceptions + +```haskell +class (Typeable e, Show e) => Exception e where + toException :: e -> SomeException + fromException :: SomeException -> Maybe e + GHC.Exception.displayException :: e -> String +``` + +```haskell +throwIO :: (MonadIO m, Exception e) => e -> m a +``` + +```haskell +throwTo :: (MonadIO m, Exception e) => ThreadId -> e -> m () +``` + +```haskell +throwSTM :: Exception e => e -> STM a +``` + +```haskell +throwError :: MonadError e m => e -> m a +``` diff --git a/docs/Function.md b/docs/Function.md new file mode 100644 index 0000000000..a8f23e8cde --- /dev/null +++ b/docs/Function.md @@ -0,0 +1,50 @@ +Functions +========= + +```haskell +($) :: (a -> b) -> a -> b +``` + +```haskell +(&) :: a -> (a -> b) -> b +``` + +```haskell +(.) :: (b -> c) -> (a -> b) -> a -> c +``` + +```haskell +flip :: (a -> b -> c) -> b -> a -> c +``` + +```haskell +on :: (b -> b -> c) -> (a -> b) -> a -> a -> c +``` + +```haskell +const :: a -> b -> a +``` + +```haskell +fix :: (a -> a) -> a +``` + +```haskell +($!) :: (a -> b) -> a -> b +``` + +```haskell +identity :: a -> a +``` + +```haskell +($!!) :: NFData a => (a -> b) -> a -> b +``` + +```haskell +($!!) :: NFData a => (a -> b) -> a -> b +``` + +```haskell +force :: NFData a => a -> a +``` diff --git a/docs/Index.md b/docs/Index.md index 92adb1fff9..a441e740fd 100644 --- a/docs/Index.md +++ b/docs/Index.md @@ -1,3 +1,11 @@ Welcome to project documentation. +- [Functions](Function.md) +- [Functors](Applicative.md) - [Monad](Monad.md) +- [Maybe](Maybe.md) +- [Lists](List.md) +- [Folds](Folds.md) +- [Dictionaries](Map.md) +- [Sets](Set.md) +- [Exception Handling](Exceptions.md) diff --git a/docs/List.md b/docs/List.md new file mode 100644 index 0000000000..3c4057d0a0 --- /dev/null +++ b/docs/List.md @@ -0,0 +1,100 @@ +List +==== + +#### Slicing + +```haskell +head :: Foldable f => f a -> Maybe a +``` + +```haskell +tailMay :: [a] -> Maybe [a] +``` + +```haskell +tailSafe :: [a] -> [a] +``` + +```haskell +initMay :: [a] -> Maybe [a] +``` + +```haskell +initSafe :: [a] -> [a] +``` + +```haskell +initDef :: [a] -> [a] -> [a] +``` + +```haskell +lastMay :: [a] -> Maybe a +``` + +```haskell +lastDef :: a -> [a] -> a +``` + +```haskell +list :: [b] -> (a -> b) -> [a] -> [b] +``` + +```haskell +drop :: Int -> [a] -> [a] +``` + +```haskell +take :: Int -> [a] -> [a] +``` + +#### Unpacking + +```haskell +uncons :: [a] -> Maybe (a, [a]) +``` + +```haskell +unsnoc :: [x] -> Maybe ([x],x) +``` + +#### Sorting + +```haskell +sortOn :: Ord o => (a -> o) -> [a] -> [a] +``` + +#### Removing + +```haskell +ordNub :: Ord a => [a] -> [a] +``` + +#### Splitting + +```haskell +splitAt :: Int -> [a] -> ([a], [a]) +``` + +```haskell +splitAt :: Int -> [a] -> ([a], [a]) +``` + +```haskell +intercalate :: [a] -> [[a]] -> [a] +``` + +#### Comparison + +```haskell +isPrefixOf :: Eq a => [a] -> [a] -> Bool +``` + +#### Filter + +```haskell +filter :: (a -> Bool) -> [a] -> [a] +``` + +```haskell +replicate :: Int -> a -> [a] +``` From 5bf3b7f812dd3ddb73c4975645604f14b2e1533f Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 29 Jul 2016 12:28:29 -0400 Subject: [PATCH 092/295] Full outline. --- docs/Exceptions.md | 10 ++++++++ docs/Index.md | 22 +++++++++++++++++- docs/List.md | 4 ++++ docs/Tuple.md | 22 ++++++++++++++++++ docs/TypeLevel.md | 57 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 docs/Tuple.md create mode 100644 docs/TypeLevel.md diff --git a/docs/Exceptions.md b/docs/Exceptions.md index 99a3d1585e..6a33cef03a 100644 --- a/docs/Exceptions.md +++ b/docs/Exceptions.md @@ -60,3 +60,13 @@ throwSTM :: Exception e => e -> STM a ```haskell throwError :: MonadError e m => e -> m a ``` + +#### Panic + +```haskell +data FatalError = FatalError {msg :: Text} +``` + +```haskell +panic :: Text -> a +``` diff --git a/docs/Index.md b/docs/Index.md index a441e740fd..4ac04b050f 100644 --- a/docs/Index.md +++ b/docs/Index.md @@ -1,11 +1,31 @@ Welcome to project documentation. +- [Printing](Printing.md) +- [File Handling](Files.md) +- [Strings](Strings.md) - [Functions](Function.md) - [Functors](Applicative.md) - [Monad](Monad.md) - [Maybe](Maybe.md) +- [Either](Either.md) +- [Booleans](Bool.md) +- [Numbers](Numbers.md) +- [Monoid](Monoid.md) +- [Semigroup](Semigroup.md) +- [Bifunctor](Bifunctor.md) - [Lists](List.md) - [Folds](Folds.md) +- [Traversals](Traversals.md) +- [Transformers](Transformers.md) +- [Reader](Reader.md) +- [State](State.md) +- [Exception Handling](Exceptions.md) +- [ST](ST.md) +- [Async & Concurrency](Concurrency.md) +- [Storable & Bytes](Storable.md) +- [System](Systsem.md) - [Dictionaries](Map.md) - [Sets](Set.md) -- [Exception Handling](Exceptions.md) +- [Tuples](Tuples.md) +- [Generics](Generics.md) +- [Type Level Programming](TypeLevel.md) diff --git a/docs/List.md b/docs/List.md index 3c4057d0a0..3135a4926d 100644 --- a/docs/List.md +++ b/docs/List.md @@ -98,3 +98,7 @@ filter :: (a -> Bool) -> [a] -> [a] ```haskell replicate :: Int -> a -> [a] ``` + +```haskell +map :: Functor f => (a -> b) -> f a -> f b +``` diff --git a/docs/Tuple.md b/docs/Tuple.md new file mode 100644 index 0000000000..3b59ad4599 --- /dev/null +++ b/docs/Tuple.md @@ -0,0 +1,22 @@ +Tuples +====== + +```haskell +fst :: (a, b) -> a +``` + +```haskell +snd :: (a, b) -> b +``` + +```haskell +swap :: (a, b) -> (b, a) +``` + +```haskell +curry :: ((a, b) -> c) -> a -> b -> c +``` + +```haskell +uncurry :: (a -> b -> c) -> (a, b) -> c +``` diff --git a/docs/TypeLevel.md b/docs/TypeLevel.md new file mode 100644 index 0000000000..3a0346a3d7 --- /dev/null +++ b/docs/TypeLevel.md @@ -0,0 +1,57 @@ +Type Level +========== + +```haskell +data Coercion (a :: k) (b :: k) where + Coercion :: forall (k :: BOX) (a :: k) (b :: k). Coercible a b => Coercion a b +``` + +```haskell +coerceWith :: Coercion a b -> a -> b +``` + +#### Empty + +```haskell +data Void +``` + +```haskell +absurd :: Void -> a +``` + +```haskell +vacuous :: Functor f => f Void -> f a +``` + +#### Proxy + +```haskell +data Proxy (t :: k) = Proxy +``` + +#### Type Equality + +```haskell +(:~:) :: k -> k -> * +``` + +```haskell +(==) :: k -> k -> Bool +``` + +```haskell +sym :: a :~: b -> b :~: a +``` + +```haskell +trans :: a :~: b -> b :~: c -> a :~: c +``` + +```haskell +castWith :: a :~: b -> a -> b +``` + +```haskell +gcastWith :: a :~: b -> ((a ~ b) => r) -> r +``` From d17fc9aab3c90189d6f40a867efc984efc893230 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 13 Aug 2016 16:14:15 -0400 Subject: [PATCH 093/295] traceShow and traceShowId for #16 --- docs/Index.md | 1 + src/Debug.hs | 38 +++++++++++++++++++++++++++----------- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/docs/Index.md b/docs/Index.md index 4ac04b050f..1b1b3dab7a 100644 --- a/docs/Index.md +++ b/docs/Index.md @@ -29,3 +29,4 @@ Welcome to project documentation. - [Tuples](Tuples.md) - [Generics](Generics.md) - [Type Level Programming](TypeLevel.md) +- [Unsafe](Unsafe.md) diff --git a/src/Debug.hs b/src/Debug.hs index 42be4c443d..647549b117 100644 --- a/src/Debug.hs +++ b/src/Debug.hs @@ -6,8 +6,10 @@ module Debug ( error, trace, traceM, + traceId, traceIO, traceShow, + traceShowId, traceShowM, notImplemented, ) where @@ -16,31 +18,45 @@ import Data.Text (Text, unpack) import Control.Monad (Monad, return) import qualified Base as P -import qualified Debug.Trace as T +import Show (Print, putStrLn) + +import System.IO.Unsafe (unsafePerformIO) + +{-# WARNING trace "'trace' remains in code" #-} +trace :: Print b => b -> a -> a +trace string expr = unsafePerformIO (do + putStrLn string + return expr) + +{-# WARNING traceIO "'traceIO' remains in code" #-} +traceIO :: Print b => b -> a -> P.IO a +traceIO string expr = do + putStrLn string + return expr {-# WARNING error "'error' remains in code" #-} error :: Text -> a error s = P.error (unpack s) -{-# WARNING trace "'trace' remains in code" #-} -trace :: Text -> a -> a -trace s = T.trace (unpack s) - {-# WARNING traceShow "'traceShow' remains in code" #-} traceShow :: P.Show a => a -> b -> b -traceShow a b = T.trace (P.show a) b +traceShow a b = trace (P.show a) b + +{-# WARNING traceShowId "'traceShowId' remains in code" #-} +traceShowId :: P.Show a => a -> a +traceShowId a = trace (P.show a) a {-# WARNING traceShowM "'traceShowM' remains in code" #-} traceShowM :: (P.Show a, Monad m) => a -> m () -traceShowM a = T.trace (P.show a) (return ()) +traceShowM a = trace (P.show a) (return ()) {-# WARNING traceM "'traceM' remains in code" #-} traceM :: (Monad m) => Text -> m () -traceM s = T.trace (unpack s) (return ()) +traceM s = trace (unpack s) (return ()) -{-# WARNING traceIO "'traceIO' remains in code" #-} -traceIO :: Text -> P.IO () -traceIO s = T.traceIO (unpack s) +{-# WARNING traceId "'traceM' remains in code" #-} +traceId :: Text -> Text +traceId s = trace s s notImplemented :: a notImplemented = P.error "Not implemented" From e14e1e3613a12d5c1215ac3fc2f567b3c32997c1 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 15 Aug 2016 08:43:55 -0400 Subject: [PATCH 094/295] Change log for 0.1.7. --- CHANGES.md | 8 ++++++++ README.md | 7 +++++++ protolude.cabal | 6 +++--- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 0ba14b036b..60d482d3e9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,11 @@ +0.1.7 +===== + +* Exports monadic ``(>>)`` operator by default. +* Adds ``traceId`` and ``traceShowId`` functions. +* Exports``reader`` and ``state`` functions by default. +* Export lifted ``throwIO`` and ``throwTo`` functions. + 0.1.6 ===== diff --git a/README.md b/README.md index 5c329cd931..72ffdd0c6d 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,13 @@ $ stack exec ghci > import Protolude ``` +Exported Functions +------------------ + +The list of exports is given in the [Symbols.md](./Symbols.md) file. Haddock +unfortunately breaks in the presence of module reexports and is unable to render +documentation. + Dependencies ------------ diff --git a/protolude.cabal b/protolude.cabal index 1ee0ca4510..6af9af06fe 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.1.6 +version: 0.1.7 synopsis: A sensible set of defaults for writing custom Preludes. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude @@ -34,8 +34,6 @@ library exposed-modules: Protolude Unsafe - - other-modules: Base Applicative Bool @@ -50,6 +48,8 @@ library Bifunctor Panic + other-modules: + default-extensions: NoImplicitPrelude OverloadedStrings From 36b56ad3a247cee960101f2814daa8fea7ca0d1c Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 14 Sep 2016 09:47:47 +0100 Subject: [PATCH 095/295] for function for #19 --- src/Protolude.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Protolude.hs b/src/Protolude.hs index 592e9e4b9e..2ac666b977 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -17,6 +17,7 @@ module Protolude ( print, throwIO, throwTo, + foreach, show, LText, @@ -393,6 +394,9 @@ throwIO = liftIO . Control.Exception.throwIO throwTo :: (X.MonadIO m, Exception e) => ThreadId -> e -> m () throwTo tid e = liftIO (Control.Exception.throwTo tid e) +foreach :: Functor f => f a -> (a -> b) -> f b +foreach = flip fmap + show :: (Show a, StringConv String b) => a -> b show x = toS (PBase.show x) {-# SPECIALIZE show :: Show a => a -> Text #-} From a678ca3b60d1df963ecf988f4edb9e60decc9461 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 14 Sep 2016 16:33:02 +0100 Subject: [PATCH 096/295] Remove head test from travis. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 061e383c6f..f04bb57ce7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,6 @@ env: - CABALVER=1.22 GHCVER=7.10.2 - CABALVER=1.22 GHCVER=7.10.3 - CABALVER=1.24 GHCVER=8.0.1 - - CABALVER=head GHCVER=head # Note: the distinction between `before_install` and `install` is not # important. From ee06770742861bda1adb243ce49d464b2ac9193e Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 10 Oct 2016 11:00:42 +0100 Subject: [PATCH 097/295] ``pass`` function, fixes #25 . --- src/Protolude.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Protolude.hs b/src/Protolude.hs index 2ac666b977..4740ee2954 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -19,6 +19,7 @@ module Protolude ( throwTo, foreach, show, + pass, LText, LByteString, @@ -397,6 +398,9 @@ throwTo tid e = liftIO (Control.Exception.throwTo tid e) foreach :: Functor f => f a -> (a -> b) -> f b foreach = flip fmap +pass :: Applicative f => f () +pass = pure () + show :: (Show a, StringConv String b) => a -> b show x = toS (PBase.show x) {-# SPECIALIZE show :: Show a => a -> Text #-} From 0346b366ee97c611dad997e544bce7f8b3dbe044 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 10 Oct 2016 11:02:24 +0100 Subject: [PATCH 098/295] Remove Handler export, fixes #25. --- src/Protolude.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Protolude.hs b/src/Protolude.hs index 4740ee2954..e129ed4378 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -337,6 +337,7 @@ import Control.Exception as X hiding ( , throwTo , assert , displayException + , Handler(..) ) import qualified Control.Exception From 2010cec78ec15ad17105ca882dd452de6470477a Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 10 Oct 2016 11:05:40 +0100 Subject: [PATCH 099/295] Mask yield, fixes #23 --- src/Protolude.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Protolude.hs b/src/Protolude.hs index e129ed4378..f2bd9d2e3d 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -345,6 +345,7 @@ import qualified Control.Exception import Control.Monad.STM as X import Control.Concurrent as X hiding ( throwTo + , yield ) import Control.Concurrent.Async as X From 7a0e274b20347bc51e7c43680ba4b5c3e5cefe0f Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 10 Oct 2016 11:13:26 +0100 Subject: [PATCH 100/295] note and hush for #22 --- protolude.cabal | 1 + src/Exceptions.hs | 28 ++++++++++++++++++++++++++++ src/Protolude.hs | 1 + 3 files changed, 30 insertions(+) create mode 100644 src/Exceptions.hs diff --git a/protolude.cabal b/protolude.cabal index 6af9af06fe..a0c5fcc050 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -46,6 +46,7 @@ library Functor Semiring Bifunctor + Exceptions Panic other-modules: diff --git a/src/Exceptions.hs b/src/Exceptions.hs new file mode 100644 index 0000000000..ec77b1f431 --- /dev/null +++ b/src/Exceptions.hs @@ -0,0 +1,28 @@ +{-# LANGUAGE Trustworthy #-} +{-# LANGUAGE NoImplicitPrelude #-} + +module Exceptions ( + hush, + note, + tryIO, +) where + +import Base (IO) +import Data.Function ((.)) +import Control.Monad.Trans (liftIO) +import Control.Monad.IO.Class (MonadIO) +import Control.Monad.Except (ExceptT(..), MonadError, throwError) +import Control.Exception as Exception +import Control.Applicative +import Data.Maybe (Maybe, maybe) +import Data.Either (Either(..)) + +hush :: Alternative m => Either e a -> m a +hush (Left _) = empty +hush (Right x) = pure x + +note :: (MonadError e m) => e -> Maybe a -> m a +note err = maybe (throwError err) pure + +tryIO :: MonadIO m => IO a -> ExceptT IOException m a +tryIO = ExceptT . liftIO . Exception.try diff --git a/src/Protolude.hs b/src/Protolude.hs index f2bd9d2e3d..32b8d786f9 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -35,6 +35,7 @@ import Either as X import Applicative as X import Conv as X import Panic as X +import Exceptions as X import Base as Base hiding ( putStr -- Overriden by Show.putStr From 9e4f374811eaec205ef670828ab32debac211642 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 10 Oct 2016 11:15:12 +0100 Subject: [PATCH 101/295] Bump version. --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index a0c5fcc050..482208d24b 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.1.7 +version: 0.1.8 synopsis: A sensible set of defaults for writing custom Preludes. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude From 4f96a523da4e0a09e9112a07e629573b12bb3466 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 10 Oct 2016 12:36:09 +0100 Subject: [PATCH 102/295] AMP fallout compatability fix. --- src/Exceptions.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Exceptions.hs b/src/Exceptions.hs index ec77b1f431..ec629e2f0d 100644 --- a/src/Exceptions.hs +++ b/src/Exceptions.hs @@ -21,7 +21,7 @@ hush :: Alternative m => Either e a -> m a hush (Left _) = empty hush (Right x) = pure x -note :: (MonadError e m) => e -> Maybe a -> m a +note :: (MonadError e m, Applicative m) => e -> Maybe a -> m a note err = maybe (throwError err) pure tryIO :: MonadIO m => IO a -> ExceptT IOException m a From e3e2857424a106fa2d72e63cfe6d58f4525702c7 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 10 Oct 2016 12:50:31 +0100 Subject: [PATCH 103/295] Changelog for 0.1.8. --- CHANGES.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 60d482d3e9..d7ddcff9d5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,13 @@ +0.1.8 +===== + +* ``foreach`` for applicative traversals. +* ``hush`` function for error handling. +* ``tryIO`` function for error handling. +* ``pass`` function for noop applicative branches. +* Mask ``Handler`` typeclass export. +* Mask ``yield`` function export. + 0.1.7 ===== From a2e97dc936c3f01fbf1a46463a3efeb9ef71fb96 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 12 Oct 2016 11:05:39 +0100 Subject: [PATCH 104/295] Update FAQ. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 72ffdd0c6d..f9cf616c5b 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,11 @@ panic "Thus I die. Thus, thus, thus. Now I am dead" If inside of IO simply use ``throwIO`` for exception handling, or if in pure business logic use well-typed checked exceptions of the ``ExceptT`` variety. +* **Why is ``id`` not in scope?** + +It has been renamed to ``identity`` to reserve the ``id`` identifier for the +more common use case of business logic. + License ------- From c061df8f069b58ca6bb5ce1fceeb0b62f47d842f Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 14 Oct 2016 10:56:37 +0100 Subject: [PATCH 105/295] Applicative combinators. --- src/Applicative.hs | 25 ++++++++++++++++++++++++- src/Functor.hs | 3 +++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/Applicative.hs b/src/Applicative.hs index fe2cbed97a..063ba4abc0 100644 --- a/src/Applicative.hs +++ b/src/Applicative.hs @@ -5,9 +5,16 @@ module Applicative ( orAlt, orEmpty, eitherA, + guarded, + guardedA, + purer, + liftAA2, + (<<*>>), ) where -import Data.Bool (Bool) +import Data.Bool (Bool, bool) +import Data.Function ((.)) +import Data.Functor (Functor) import Data.Either (Either(..)) import Data.Monoid (Monoid(..)) import Control.Applicative @@ -20,3 +27,19 @@ orEmpty b a = if b then pure a else empty eitherA :: (Alternative f) => f a -> f b -> f (Either a b) eitherA a b = (Left <$> a) <|> (Right <$> b) + +guarded :: (Alternative f) => (a -> Bool) -> a -> f a +guarded p x = bool empty (pure x) (p x) + +guardedA :: (Functor f, Alternative t) => (a -> f Bool) -> a -> f (t a) +guardedA p x = bool empty (pure x) <$> p x + +purer :: (Applicative f, Applicative g) => a -> f (g a) +purer = pure . pure + +liftAA2 :: (Applicative f, Applicative g) => (a -> b -> c) -> f (g a) -> f (g b) -> f (g c) +liftAA2 = liftA2 . liftA2 + +(<<*>>) :: (Applicative f, Applicative g) => f (g (a -> b)) -> f (g a) -> f (g b) +(<<*>>) = liftA2 (<*>) + diff --git a/src/Functor.hs b/src/Functor.hs index 87d6bf3490..03bbf01fe7 100644 --- a/src/Functor.hs +++ b/src/Functor.hs @@ -29,6 +29,9 @@ infixl 4 $> ($>) :: Functor f => f a -> b -> f b ($>) = flip (<$) +(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b) +(<<$>>) = fmap . fmap + void :: Functor f => f a -> f () void x = () <$ x #endif From a86046b654103b6135ba4ac307b13fc79781a494 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 14 Oct 2016 11:03:37 +0100 Subject: [PATCH 106/295] guarded and guardedA added to root. --- src/Applicative.hs | 11 +---------- src/Protolude.hs | 10 +++++++++- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/Applicative.hs b/src/Applicative.hs index 063ba4abc0..2bdaab0be7 100644 --- a/src/Applicative.hs +++ b/src/Applicative.hs @@ -5,16 +5,13 @@ module Applicative ( orAlt, orEmpty, eitherA, - guarded, - guardedA, purer, liftAA2, (<<*>>), ) where -import Data.Bool (Bool, bool) +import Data.Bool (Bool) import Data.Function ((.)) -import Data.Functor (Functor) import Data.Either (Either(..)) import Data.Monoid (Monoid(..)) import Control.Applicative @@ -28,12 +25,6 @@ orEmpty b a = if b then pure a else empty eitherA :: (Alternative f) => f a -> f b -> f (Either a b) eitherA a b = (Left <$> a) <|> (Right <$> b) -guarded :: (Alternative f) => (a -> Bool) -> a -> f a -guarded p x = bool empty (pure x) (p x) - -guardedA :: (Functor f, Alternative t) => (a -> f Bool) -> a -> f (t a) -guardedA p x = bool empty (pure x) <$> p x - purer :: (Applicative f, Applicative g) => a -> f (g a) purer = pure . pure diff --git a/src/Protolude.hs b/src/Protolude.hs index 32b8d786f9..f78d5f05ad 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -20,7 +20,8 @@ module Protolude ( foreach, show, pass, - + guarded, + guardedA, LText, LByteString, ) where @@ -404,6 +405,13 @@ foreach = flip fmap pass :: Applicative f => f () pass = pure () +guarded :: (Alternative f) => (a -> Bool) -> a -> f a +guarded p x = bool empty (pure x) (p x) + +guardedA :: (Functor f, Alternative t) => (a -> f Bool) -> a -> f (t a) +guardedA p x = bool empty (pure x) <$> p x + + show :: (Show a, StringConv String b) => a -> b show x = toS (PBase.show x) {-# SPECIALIZE show :: Show a => a -> Text #-} From 860f74b3c2323fbf2d5d12954292b3e4e171e437 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 14 Oct 2016 14:06:57 +0100 Subject: [PATCH 107/295] Use explicit 'bool' import. --- src/Protolude.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index f78d5f05ad..371aea749e 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -406,11 +406,10 @@ pass :: Applicative f => f () pass = pure () guarded :: (Alternative f) => (a -> Bool) -> a -> f a -guarded p x = bool empty (pure x) (p x) +guarded p x = X.bool empty (pure x) (p x) guardedA :: (Functor f, Alternative t) => (a -> f Bool) -> a -> f (t a) -guardedA p x = bool empty (pure x) <$> p x - +guardedA p x = X.bool empty (pure x) <$> p x show :: (Show a, StringConv String b) => a -> b show x = toS (PBase.show x) From 547aca5af46151d41a34a9b3dfb0e0d71fc707fa Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 14 Oct 2016 17:21:57 +0100 Subject: [PATCH 108/295] fix nested functor composition --- src/Applicative.hs | 1 - src/Functor.hs | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Applicative.hs b/src/Applicative.hs index 2bdaab0be7..34da016d1d 100644 --- a/src/Applicative.hs +++ b/src/Applicative.hs @@ -33,4 +33,3 @@ liftAA2 = liftA2 . liftA2 (<<*>>) :: (Applicative f, Applicative g) => f (g (a -> b)) -> f (g a) -> f (g b) (<<*>>) = liftA2 (<*>) - diff --git a/src/Functor.hs b/src/Functor.hs index 03bbf01fe7..80683396e8 100644 --- a/src/Functor.hs +++ b/src/Functor.hs @@ -23,6 +23,7 @@ import Data.Functor ( ) import Data.Function (flip) +import Data.Function ((.)) infixl 4 $> From 961f71b9717dcdbde9822018c2901aec90eb04f4 Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Fri, 14 Oct 2016 22:06:44 +0200 Subject: [PATCH 109/295] Export strict versions of sum and product --- CHANGES.md | 5 +++++ src/List.hs | 13 ++++++++++++- src/Protolude.hs | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index d7ddcff9d5..8d116dba12 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +0.1.9 +==== + +* Make `sum` and `product` strict + 0.1.8 ===== diff --git a/src/List.hs b/src/List.hs index 6d1261ec8a..66b325248b 100644 --- a/src/List.hs +++ b/src/List.hs @@ -6,16 +6,19 @@ module List ( ordNub, sortOn, list, + product, + sum ) where import Data.List (sortBy) import Data.Maybe (Maybe(..)) import Data.Ord (Ord, comparing) -import Data.Foldable (Foldable, foldr) +import Data.Foldable (Foldable, foldr, foldl') import Data.Function ((.)) import Data.Functor (fmap) import Control.Monad (return) import qualified Data.Set as Set +import GHC.Num (Num, (+)) head :: (Foldable f) => f a -> Maybe a head = foldr (\x _ -> return x) Nothing @@ -37,3 +40,11 @@ list :: [b] -> (a -> b) -> [a] -> [b] list def f xs = case xs of [] -> def _ -> fmap f xs + +{-# INLINE product #-} +product :: (Foldable f, Num a) => f a -> a +product = foldl' (+) 1 + +{-# INLINE sum #-} +sum :: (Foldable f, Num a) => f a -> a +sum = foldl' (+) 0 diff --git a/src/Protolude.hs b/src/Protolude.hs index 371aea749e..fd74c5f533 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -95,6 +95,8 @@ import Data.Traversable as X import Data.Foldable as X hiding ( foldr1 , foldl1 + , product + , sum ) import Semiring as X import Data.Functor.Identity as X From cf2fb7cd3a8b019bb1e4c2df9bec9bf69d9b57d1 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sun, 16 Oct 2016 20:12:49 +0100 Subject: [PATCH 110/295] Note about strictness --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f9cf616c5b..a32dc14bae 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Design points: * Foldable / Traversable functions in scope by default. * Unsafe functions are prefixed with "unsafe" in separate module. * Compiler agnostic, GHC internal modules are abstracted out into Base. +* ``sum`` and ``product`` are strict by default. * Compatibility with GHC 8.0. * Includes Semiring for GHC >= 7.6. * Includes Bifunctor for GHC >= 7.6. From bccd31e32752b15f2a78f25b38c97fd28067a86c Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Tue, 18 Oct 2016 15:13:01 +0200 Subject: [PATCH 111/295] Fix product implementation --- src/List.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/List.hs b/src/List.hs index 66b325248b..9c22f1785e 100644 --- a/src/List.hs +++ b/src/List.hs @@ -18,7 +18,7 @@ import Data.Function ((.)) import Data.Functor (fmap) import Control.Monad (return) import qualified Data.Set as Set -import GHC.Num (Num, (+)) +import GHC.Num (Num, (+), (*)) head :: (Foldable f) => f a -> Maybe a head = foldr (\x _ -> return x) Nothing @@ -43,7 +43,7 @@ list def f xs = case xs of {-# INLINE product #-} product :: (Foldable f, Num a) => f a -> a -product = foldl' (+) 1 +product = foldl' (*) 1 {-# INLINE sum #-} sum :: (Foldable f, Num a) => f a -> a From d0904112074826cfdda7709903f990c830854421 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 27 Oct 2016 10:05:52 +0100 Subject: [PATCH 112/295] bump version --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index 482208d24b..3a2400060f 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.1.8 +version: 0.1.9 synopsis: A sensible set of defaults for writing custom Preludes. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude From 250cfe2b7fbf9c76084bb5fc98e59ec20e7927a0 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 27 Oct 2016 10:12:29 +0100 Subject: [PATCH 113/295] version bump --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index 3a2400060f..ac10baa858 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.1.9 +version: 0.1.10 synopsis: A sensible set of defaults for writing custom Preludes. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude From aeacdd9630aebde2884cc5b028c1f99f967804c2 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 28 Oct 2016 16:41:28 +0100 Subject: [PATCH 114/295] include hashable --- protolude.cabal | 1 + src/Protolude.hs | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/protolude.cabal b/protolude.cabal index ac10baa858..a35fe7487c 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -68,6 +68,7 @@ library async >= 2.1 && <2.2, deepseq >= 1.3 && <1.5, containers >= 0.5 && <0.6, + hashable >= 1.2 && <1.3, mtl >= 2.1 && <2.3, transformers >= 0.4 && <0.6, text >= 1.2 && <1.3, diff --git a/src/Protolude.hs b/src/Protolude.hs index fd74c5f533..18729c1975 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -155,6 +155,14 @@ import Data.List as X ( , zip ) +-- Hashing +import Data.Hashable as X ( + Hashable + , hash + , hashWithSalt + , hashUsing + ) + import Data.Map as X (Map) import Data.Set as X (Set) import Data.Sequence as X (Seq) From 5b6bc27cbe78361b5e847373caef14613982629b Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 28 Oct 2016 19:04:58 +0100 Subject: [PATCH 115/295] constrainted bytestring print functions --- src/Show.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Show.hs b/src/Show.hs index a4beda42f5..94dc2cb181 100644 --- a/src/Show.hs +++ b/src/Show.hs @@ -9,6 +9,8 @@ module Show ( Print(..), putText, putLText, + putByteString, + putLByteString, ) where import qualified Base @@ -57,3 +59,11 @@ putText = putStrLn putLText :: MonadIO m => TL.Text -> m () putLText = putStrLn {-# SPECIALIZE putLText :: TL.Text -> Base.IO () #-} + +putByteString :: MonadIO m => BS.ByteString -> m () +putByteString = putStrLn +{-# SPECIALIZE putByteString :: BS.ByteString -> Base.IO () #-} + +putLByteString :: MonadIO m => BL.ByteString -> m () +putLByteString = putStrLn +{-# SPECIALIZE putLByteString :: BL.ByteString -> Base.IO () #-} From 7560af09551784a6e1f6caead4d233a70175465d Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 8 Nov 2016 01:40:20 +0000 Subject: [PATCH 116/295] relax lower async bound --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index a35fe7487c..65468bd189 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -65,7 +65,7 @@ library base >= 4.6 && <4.10, ghc-prim >= 0.3 && <0.6, safe >= 0.3 && <0.4, - async >= 2.1 && <2.2, + async >= 2.0 && <2.2, deepseq >= 1.3 && <1.5, containers >= 0.5 && <0.6, hashable >= 1.2 && <1.3, From 82e0b04e4dfbb043fa39f1869821087dd2fafb9f Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 15 Nov 2016 14:57:16 +0000 Subject: [PATCH 117/295] use default monoid (<>) instead of semigroup --- src/Protolude.hs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index 18729c1975..73ed2bd29c 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -102,8 +102,19 @@ import Semiring as X import Data.Functor.Identity as X #if ( __GLASGOW_HASKELL__ >= 800 ) -import Data.Monoid as X hiding ((<>)) -import Data.Semigroup as X ( Semigroup(..) ) +import Data.Monoid as X +import Data.Semigroup as X ( + Semigroup(sconcat, stimes) + , WrappedMonoid + , Option(..) + , option + , diff + , cycle1 + , stimesMonoid + , stimesIdempotent + , stimesIdempotentMonoid + , mtimesDefault + ) #else import Data.Monoid as X #endif From 3972d847e6fe9fa973b508c3d50d658057cf08a0 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 15 Nov 2016 15:14:16 +0000 Subject: [PATCH 118/295] constrain safe upper bound for backwards compat with ghc 7.6 --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index 65468bd189..38b6d01219 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -64,7 +64,7 @@ library build-depends: base >= 4.6 && <4.10, ghc-prim >= 0.3 && <0.6, - safe >= 0.3 && <0.4, + safe >= 0.3 && <0.3.10, async >= 2.0 && <2.2, deepseq >= 1.3 && <1.5, containers >= 0.5 && <0.6, From fa482cfd460ba807249a8a82496c84fc0bed1046 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 15 Nov 2016 16:18:43 +0000 Subject: [PATCH 119/295] bump version to 0.1.11 --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index 38b6d01219..b211b3774b 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.1.10 +version: 0.1.11 synopsis: A sensible set of defaults for writing custom Preludes. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude From 2b729aaadc9c512705ded8cfaa45da4d0fd2d4cd Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 3 Dec 2016 14:17:49 +0000 Subject: [PATCH 120/295] Type level literals --- src/Base.hs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Base.hs b/src/Base.hs index 2a34b8a455..3df48b9828 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -83,6 +83,22 @@ import GHC.Records as X ( ) -} +#if ( __GLASGOW_HASKELL__ >= 710 ) +import GHC.TypeLits ( + Symbol, + SomeSymbol(..), + Nat, + SomeNat(..), + CmpNat, + KnownSymbol, + KnownNat, + natVal, + someNatVal, + symbolVal, + someSymbolVal + ) +#endif + import Data.Kind as X ( type (*) , type Type From 7060f55fdf97e83bbd7914116c696fc5ea3bae88 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 3 Dec 2016 14:31:42 +0000 Subject: [PATCH 121/295] export typelits symbols from base --- src/Base.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Base.hs b/src/Base.hs index 3df48b9828..4351c62bae 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -84,7 +84,7 @@ import GHC.Records as X ( -} #if ( __GLASGOW_HASKELL__ >= 710 ) -import GHC.TypeLits ( +import GHC.TypeLits as X ( Symbol, SomeSymbol(..), Nat, From 6da0d42e8d4b21947c24ad71604c21fc4b29ba61 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sun, 4 Dec 2016 08:46:11 +0000 Subject: [PATCH 122/295] updated changelog --- CHANGES.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 8d116dba12..3cfe82cde1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,10 @@ +0.1.11 +==== + +* Expose `Symbol` and `Nat` types from `GHC.TypeLits` by default. +* Switch exported `(<>)` to be from `Data.Monoid` instead of Semigroup. +* Expose `putByteString` and `putLByteString` monomorphic versions of `putStrLn` functions + 0.1.9 ==== @@ -37,3 +44,5 @@ 0.1.5 ===== + +* Initial release. From d5db73dbbfdc0f6bc6b25c305a712a2ce7e3f21b Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 6 Dec 2016 09:06:47 +0000 Subject: [PATCH 123/295] conditional safe version bounds for ghc --- protolude.cabal | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index b211b3774b..859d57ef13 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -64,7 +64,6 @@ library build-depends: base >= 4.6 && <4.10, ghc-prim >= 0.3 && <0.6, - safe >= 0.3 && <0.3.10, async >= 2.0 && <2.2, deepseq >= 1.3 && <1.5, containers >= 0.5 && <0.6, @@ -75,5 +74,12 @@ library stm >= 2.4 && <2.5, bytestring >= 0.10 && <0.11 + if impl(ghc >= 7.8.0) + build-depends: + safe >= 0.3 && <0.4 + else + build-depends: + safe >= 0.3 && <0.3.10 + hs-source-dirs: src default-language: Haskell2010 From 50faedad802913e949a3bb7deca959501b50bfd6 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 6 Dec 2016 09:39:23 +0000 Subject: [PATCH 124/295] added ghc 8.0.1 test --- protolude.cabal | 3 ++- src/Exceptions.hs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index 859d57ef13..3f84c0de17 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -21,7 +21,8 @@ tested-with: GHC == 7.8.4, GHC == 7.10.1, GHC == 7.10.2, - GHC == 7.10.3 + GHC == 7.10.3, + GHC == 8.0.1 Bug-Reports: https://github.com/sdiehl/protolude/issues description: diff --git a/src/Exceptions.hs b/src/Exceptions.hs index ec629e2f0d..c5dc984824 100644 --- a/src/Exceptions.hs +++ b/src/Exceptions.hs @@ -1,5 +1,6 @@ {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} +{-# OPTIONS_GHC -Wno-redundant-constraints #-} module Exceptions ( hush, From dac4888f6164a7075e259e0ed2f6b7c9737ddb81 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 6 Dec 2016 13:57:48 +0000 Subject: [PATCH 125/295] ignore ghc 8.0 only pragma --- src/Exceptions.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Exceptions.hs b/src/Exceptions.hs index c5dc984824..ec629e2f0d 100644 --- a/src/Exceptions.hs +++ b/src/Exceptions.hs @@ -1,6 +1,5 @@ {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} -{-# OPTIONS_GHC -Wno-redundant-constraints #-} module Exceptions ( hush, From fb6f00b90b1cf102b7674c6734f810921ddb145c Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 8 Dec 2016 09:03:22 +0000 Subject: [PATCH 126/295] clearer directions --- README.md | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a32dc14bae..6569908ec4 100644 --- a/README.md +++ b/README.md @@ -45,20 +45,33 @@ Supports: Usage ----- -In your project simply disable the default Prelude and import Protolude. +To try out standalone prelude at the interactive shell, from the Protolude +project directory run. + +```haskell +$ stack exec ghci +> import Protolude +``` + +Swapping out the old Prelude +---------------------------- + +Disable the built-in prelude at the top of your file: ```haskell {-# LANGUAGE NoImplicitPrelude #-} +``` -import Protolude +Or directly in your project cabal file: + +```haskell +default-extensions: NoImplicitPrelude ``` -To try out standalone prelude at the interactive shell, from the Protolude -project directory run. +Then in your modules: ```haskell -$ stack exec ghci -> import Protolude +import Protolude ``` Exported Functions From 60ca33fecb6a8b292a45fdfa16b62c4bc0479154 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 8 Dec 2016 09:36:00 +0000 Subject: [PATCH 127/295] begin conversion to rst --- docs/{Applicative.md => Applicative.rst} | 0 docs/{Exceptions.md => Exceptions.rst} | 0 docs/Function.md | 50 ---- docs/Function.rst | 83 ++++++ docs/Index.md | 32 --- docs/{List.md => List.rst} | 0 docs/{Monad.md => Monad.rst} | 0 docs/Tuple.md | 22 -- docs/Tuple.rst | 84 ++++++ docs/{TypeLevel.md => TypeLevel.rst} | 0 docs/conf.py | 340 +++++++++++++++++++++++ docs/index.rst | 44 +++ 12 files changed, 551 insertions(+), 104 deletions(-) rename docs/{Applicative.md => Applicative.rst} (100%) rename docs/{Exceptions.md => Exceptions.rst} (100%) delete mode 100644 docs/Function.md create mode 100644 docs/Function.rst delete mode 100644 docs/Index.md rename docs/{List.md => List.rst} (100%) rename docs/{Monad.md => Monad.rst} (100%) delete mode 100644 docs/Tuple.md create mode 100644 docs/Tuple.rst rename docs/{TypeLevel.md => TypeLevel.rst} (100%) create mode 100644 docs/conf.py create mode 100644 docs/index.rst diff --git a/docs/Applicative.md b/docs/Applicative.rst similarity index 100% rename from docs/Applicative.md rename to docs/Applicative.rst diff --git a/docs/Exceptions.md b/docs/Exceptions.rst similarity index 100% rename from docs/Exceptions.md rename to docs/Exceptions.rst diff --git a/docs/Function.md b/docs/Function.md deleted file mode 100644 index a8f23e8cde..0000000000 --- a/docs/Function.md +++ /dev/null @@ -1,50 +0,0 @@ -Functions -========= - -```haskell -($) :: (a -> b) -> a -> b -``` - -```haskell -(&) :: a -> (a -> b) -> b -``` - -```haskell -(.) :: (b -> c) -> (a -> b) -> a -> c -``` - -```haskell -flip :: (a -> b -> c) -> b -> a -> c -``` - -```haskell -on :: (b -> b -> c) -> (a -> b) -> a -> a -> c -``` - -```haskell -const :: a -> b -> a -``` - -```haskell -fix :: (a -> a) -> a -``` - -```haskell -($!) :: (a -> b) -> a -> b -``` - -```haskell -identity :: a -> a -``` - -```haskell -($!!) :: NFData a => (a -> b) -> a -> b -``` - -```haskell -($!!) :: NFData a => (a -> b) -> a -> b -``` - -```haskell -force :: NFData a => a -> a -``` diff --git a/docs/Function.rst b/docs/Function.rst new file mode 100644 index 0000000000..2f5f1ed708 --- /dev/null +++ b/docs/Function.rst @@ -0,0 +1,83 @@ +Functions +========= + +.. highlight:: haskell + +$ +*** + +:: + + ($) :: (a -> b) -> a -> b + +& +*** + +:: + + (&) :: a -> (a -> b) -> b + +. +*** + +:: + + (.) :: (b -> c) -> (a -> b) -> a -> c + + +flip +**** + +:: + + flip :: (a -> b -> c) -> b -> a -> c + + +on +*** + +:: + + on :: (b -> b -> c) -> (a -> b) -> a -> a -> c + +const +***** + +:: + + const :: a -> b -> a + +fix +*** + +:: + + fix :: (a -> a) -> a + +identity +******** + +:: + + identity :: a -> a + +$! +*** + +:: + + ($!) :: NFData a => (a -> b) -> a -> b + +$!! +*** + +:: + + ($!!) :: NFData a => (a -> b) -> a -> b + +force +***** + +:: + + force :: NFData a => a -> a diff --git a/docs/Index.md b/docs/Index.md deleted file mode 100644 index 1b1b3dab7a..0000000000 --- a/docs/Index.md +++ /dev/null @@ -1,32 +0,0 @@ -Welcome to project documentation. - -- [Printing](Printing.md) -- [File Handling](Files.md) -- [Strings](Strings.md) -- [Functions](Function.md) -- [Functors](Applicative.md) -- [Monad](Monad.md) -- [Maybe](Maybe.md) -- [Either](Either.md) -- [Booleans](Bool.md) -- [Numbers](Numbers.md) -- [Monoid](Monoid.md) -- [Semigroup](Semigroup.md) -- [Bifunctor](Bifunctor.md) -- [Lists](List.md) -- [Folds](Folds.md) -- [Traversals](Traversals.md) -- [Transformers](Transformers.md) -- [Reader](Reader.md) -- [State](State.md) -- [Exception Handling](Exceptions.md) -- [ST](ST.md) -- [Async & Concurrency](Concurrency.md) -- [Storable & Bytes](Storable.md) -- [System](Systsem.md) -- [Dictionaries](Map.md) -- [Sets](Set.md) -- [Tuples](Tuples.md) -- [Generics](Generics.md) -- [Type Level Programming](TypeLevel.md) -- [Unsafe](Unsafe.md) diff --git a/docs/List.md b/docs/List.rst similarity index 100% rename from docs/List.md rename to docs/List.rst diff --git a/docs/Monad.md b/docs/Monad.rst similarity index 100% rename from docs/Monad.md rename to docs/Monad.rst diff --git a/docs/Tuple.md b/docs/Tuple.md deleted file mode 100644 index 3b59ad4599..0000000000 --- a/docs/Tuple.md +++ /dev/null @@ -1,22 +0,0 @@ -Tuples -====== - -```haskell -fst :: (a, b) -> a -``` - -```haskell -snd :: (a, b) -> b -``` - -```haskell -swap :: (a, b) -> (b, a) -``` - -```haskell -curry :: ((a, b) -> c) -> a -> b -> c -``` - -```haskell -uncurry :: (a -> b -> c) -> (a, b) -> c -``` diff --git a/docs/Tuple.rst b/docs/Tuple.rst new file mode 100644 index 0000000000..5ce5679d2d --- /dev/null +++ b/docs/Tuple.rst @@ -0,0 +1,84 @@ +Tuples +====== + +.. highlight:: haskell + +fst +*** + +:: + + fst :: (a, b) -> a + +Extract the first component of a pair. + +*Example*: + +:: + + > fst (1,2) + 1 + +snd +*** + +:: + + snd :: (a, b) -> b + +Extract the second component of a pair. + +*Example*: + +:: + + > snd (1,2) + 2 + +swap +**** + +:: + + swap :: (a, b) -> (b, a) + +Swap the components of a pair. + +*Example*: + +:: + + > swap (1,2) + (2,1) + +curry +***** + +:: + + curry :: ((a, b) -> c) -> a -> b -> c + +curry converts an uncurried function to a curried function. + +*Example*: + +:: + + > curry fst 1 2 + 1 + +uncurry +******* + +:: + + uncurry :: (a -> b -> c) -> (a, b) -> c + +uncurry converts a curried function to a function on pairs. + +*Example*: + +:: + + > uncurry (+) (1,2) + 3 diff --git a/docs/TypeLevel.md b/docs/TypeLevel.rst similarity index 100% rename from docs/TypeLevel.md rename to docs/TypeLevel.rst diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000000..2b8a07eaf7 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,340 @@ +# -*- coding: utf-8 -*- +# +# protolude documentation build configuration file, created by +# sphinx-quickstart on Thu Dec 8 09:08:30 2016. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.githubpages', +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The encoding of source files. +# +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'protolude' +copyright = u'2016, Stephen Diehl' +author = u'Stephen Diehl' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = u'0.1.11' +# The full version, including alpha/beta/rc tags. +release = u'0.1.11' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +# +# today = '' +# +# Else, today_fmt is used as the format for a strftime call. +# +# today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +# +# default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +# +# add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +# +# add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +# +# show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +# modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +# keep_warnings = False + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'alabaster' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +# html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +# html_theme_path = [] + +# The name for this set of Sphinx documents. +# " v documentation" by default. +# +# html_title = u'protolude v0.1.11' + +# A shorter title for the navigation bar. Default is the same as html_title. +# +# html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +# +# html_logo = None + +# The name of an image file (relative to this directory) to use as a favicon of +# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +# +# html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +# +# html_extra_path = [] + +# If not None, a 'Last updated on:' timestamp is inserted at every page +# bottom, using the given strftime format. +# The empty string is equivalent to '%b %d, %Y'. +# +# html_last_updated_fmt = None + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +# +# html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +# +# html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +# +# html_additional_pages = {} + +# If false, no module index is generated. +# +# html_domain_indices = True + +# If false, no index is generated. +# +# html_use_index = True + +# If true, the index is split into individual pages for each letter. +# +# html_split_index = False + +# If true, links to the reST sources are added to the pages. +# +# html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +# +# html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +# +# html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +# +# html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Language to be used for generating the HTML full-text search index. +# Sphinx supports the following languages: +# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' +# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh' +# +# html_search_language = 'en' + +# A dictionary with options for the search language support, empty by default. +# 'ja' uses this config value. +# 'zh' user can custom change `jieba` dictionary path. +# +# html_search_options = {'type': 'default'} + +# The name of a javascript file (relative to the configuration directory) that +# implements a search results scorer. If empty, the default will be used. +# +# html_search_scorer = 'scorer.js' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'protoludedoc' + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'protolude.tex', u'protolude Documentation', + u'Stephen Diehl', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# +# latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# +# latex_use_parts = False + +# If true, show page references after internal links. +# +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# +# latex_appendices = [] + +# It false, will not define \strong, \code, itleref, \crossref ... but only +# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added +# packages. +# +# latex_keep_old_macro_names = True + +# If false, no module index is generated. +# +# latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'protolude', u'protolude Documentation', + [author], 1) +] + +# If true, show URL addresses after external links. +# +# man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'protolude', u'protolude Documentation', + author, 'protolude', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +# +# texinfo_appendices = [] + +# If false, no module index is generated. +# +# texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +# +# texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +# +# texinfo_no_detailmenu = False diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000000..127aba2499 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,44 @@ +Protolude Documentation +======================= + +An alternative Prelude. + +.. toctree:: + :maxdepth: 1 + Printing + Files + Strings + Function + Applicative + Monad + Maybe + Either + Bool + Numbers + Monoid + Semigroup + Bifunctor + List + Folds + Traversals + Transformers + Reader + State + Exceptions + ST + Concurrency + Storable + Systsem + Map + Set + Tuple + Generics + TypeLevel + Unsafe + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` From ca74e2901d52ab934f5b042a12d61d8477704cb0 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 8 Dec 2016 09:47:06 +0000 Subject: [PATCH 128/295] document structure --- docs/Applicative.rst | 9 ++++++--- docs/Bool.rst | 2 ++ docs/Either.rst | 2 ++ docs/Folds.rst | 2 ++ docs/List.rst | 21 ++++++++++++++------- docs/Maybe.rst | 2 ++ docs/Monad.rst | 6 ++++-- docs/Monoid.rst | 2 ++ docs/Numbers.rst | 2 ++ docs/Strings.rst | 14 ++++++++++++++ docs/index.rst | 4 ++-- 11 files changed, 52 insertions(+), 14 deletions(-) create mode 100644 docs/Bool.rst create mode 100644 docs/Either.rst create mode 100644 docs/Folds.rst create mode 100644 docs/Maybe.rst create mode 100644 docs/Monoid.rst create mode 100644 docs/Numbers.rst create mode 100644 docs/Strings.rst diff --git a/docs/Applicative.rst b/docs/Applicative.rst index 1474840bcb..f1f42eb7e2 100644 --- a/docs/Applicative.rst +++ b/docs/Applicative.rst @@ -1,7 +1,8 @@ Applicative =========== -#### Functor +Functor +~~~~~~~ ```haskell class Functor (f :: * -> *) where @@ -17,7 +18,8 @@ class Functor (f :: * -> *) where ($>) :: Functor f => f a -> b -> f b ``` -#### Applicatives +Applicatives +~~~~~~~~~~~~ ```haskell class Functor f => Applicative (f :: * -> *) where @@ -43,7 +45,8 @@ orEmpty :: Alternative f => Bool -> a -> f a eitherA :: (Alternative f) => f a -> f b -> f (Either a b) ``` -#### Alternative +Alternative +~~~~~~~~~~~ ```haskell class Applicative f => Alternative (f :: * -> *) where diff --git a/docs/Bool.rst b/docs/Bool.rst new file mode 100644 index 0000000000..897a6ae654 --- /dev/null +++ b/docs/Bool.rst @@ -0,0 +1,2 @@ +Bool +===== diff --git a/docs/Either.rst b/docs/Either.rst new file mode 100644 index 0000000000..4b0819784e --- /dev/null +++ b/docs/Either.rst @@ -0,0 +1,2 @@ +Either +====== diff --git a/docs/Folds.rst b/docs/Folds.rst new file mode 100644 index 0000000000..3a76da4ad4 --- /dev/null +++ b/docs/Folds.rst @@ -0,0 +1,2 @@ +Folds +===== diff --git a/docs/List.rst b/docs/List.rst index 3135a4926d..53f6275d26 100644 --- a/docs/List.rst +++ b/docs/List.rst @@ -1,7 +1,8 @@ List ==== -#### Slicing +Slicing +~~~~~~~ ```haskell head :: Foldable f => f a -> Maybe a @@ -47,7 +48,8 @@ drop :: Int -> [a] -> [a] take :: Int -> [a] -> [a] ``` -#### Unpacking +Unpacking +~~~~~~~~~ ```haskell uncons :: [a] -> Maybe (a, [a]) @@ -57,19 +59,22 @@ uncons :: [a] -> Maybe (a, [a]) unsnoc :: [x] -> Maybe ([x],x) ``` -#### Sorting +Sorting +~~~~~~~~~ ```haskell sortOn :: Ord o => (a -> o) -> [a] -> [a] ``` -#### Removing +Removing +~~~~~~~~~ ```haskell ordNub :: Ord a => [a] -> [a] ``` -#### Splitting +Splitting +~~~~~~~~~ ```haskell splitAt :: Int -> [a] -> ([a], [a]) @@ -83,13 +88,15 @@ splitAt :: Int -> [a] -> ([a], [a]) intercalate :: [a] -> [[a]] -> [a] ``` -#### Comparison +Comparison +~~~~~~~~~ ```haskell isPrefixOf :: Eq a => [a] -> [a] -> Bool ``` -#### Filter +Filtering +~~~~~~~~~ ```haskell filter :: (a -> Bool) -> [a] -> [a] diff --git a/docs/Maybe.rst b/docs/Maybe.rst new file mode 100644 index 0000000000..39fcdbb685 --- /dev/null +++ b/docs/Maybe.rst @@ -0,0 +1,2 @@ +Maybe +===== diff --git a/docs/Monad.rst b/docs/Monad.rst index 53452fdc21..9441ef5dfa 100644 --- a/docs/Monad.rst +++ b/docs/Monad.rst @@ -1,7 +1,8 @@ Monads ====== -#### Monad +Monad +~~~~~ ```haskell class Applicative m => Monad (m :: * -> *) where @@ -119,7 +120,8 @@ ap :: Monad m => m (a -> b) -> m a -> m b (<$!>) :: Monad m => (a -> b) -> m a -> m b ``` -#### MonadPlus +MonadPlus +~~~~~~~~~ ```haskell class (Alternative m, Monad m) => MonadPlus (m :: * -> *) where diff --git a/docs/Monoid.rst b/docs/Monoid.rst new file mode 100644 index 0000000000..86bbceb38a --- /dev/null +++ b/docs/Monoid.rst @@ -0,0 +1,2 @@ +Monoid +====== diff --git a/docs/Numbers.rst b/docs/Numbers.rst new file mode 100644 index 0000000000..fcaa14edce --- /dev/null +++ b/docs/Numbers.rst @@ -0,0 +1,2 @@ +Numbers +======= diff --git a/docs/Strings.rst b/docs/Strings.rst new file mode 100644 index 0000000000..2d218dd04a --- /dev/null +++ b/docs/Strings.rst @@ -0,0 +1,14 @@ +Strings +======= + +Text +~~~~ + +LText +~~~~ + +Bytestring +~~~~~~~~~~ + +LBytestring +~~~~~~~~~~~ diff --git a/docs/index.rst b/docs/index.rst index 127aba2499..2a0ea5ad91 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,7 +4,7 @@ Protolude Documentation An alternative Prelude. .. toctree:: - :maxdepth: 1 + :maxdepth: 0 Printing Files Strings @@ -28,7 +28,7 @@ An alternative Prelude. ST Concurrency Storable - Systsem + System Map Set Tuple From fb6a942954ff0958350782b0cbd04f783c58f22f Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 8 Dec 2016 09:55:27 +0000 Subject: [PATCH 129/295] export generic list functions --- CHANGES.md | 1 + src/Protolude.hs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 3cfe82cde1..529ff542ad 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ * Expose `Symbol` and `Nat` types from `GHC.TypeLits` by default. * Switch exported `(<>)` to be from `Data.Monoid` instead of Semigroup. * Expose `putByteString` and `putLByteString` monomorphic versions of `putStrLn` functions +* Export `genericLength` and other generic list return functions. 0.1.9 ==== diff --git a/src/Protolude.hs b/src/Protolude.hs index 73ed2bd29c..dc51c42fff 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -164,6 +164,11 @@ import Data.List as X ( , tails , zipWith , zip + , genericLength + , genericTake + , genericDrop + , genericSplitAt + , genericReplicate ) -- Hashing From 7cdf6f1cc83e69cc78b5a610389143d7f3e53335 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 8 Dec 2016 12:23:15 +0000 Subject: [PATCH 130/295] markdown source processor --- docs/{Either.rst => Either.md} | 0 docs/conf.py | 12 ++++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) rename docs/{Either.rst => Either.md} (100%) diff --git a/docs/Either.rst b/docs/Either.md similarity index 100% rename from docs/Either.rst rename to docs/Either.md diff --git a/docs/conf.py b/docs/conf.py index 2b8a07eaf7..afc5b41fc6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,6 +20,9 @@ # import sys # sys.path.insert(0, os.path.abspath('.')) +import sphinx_rtd_theme +from recommonmark.parser import CommonMarkParser + # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. @@ -40,7 +43,11 @@ # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] -source_suffix = '.rst' + +source_parsers = { + '.md': CommonMarkParser, +} +source_suffix = ['.rst', '.md'] # The encoding of source files. # @@ -121,7 +128,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'alabaster' +html_theme = "sphinx_rtd_theme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -131,6 +138,7 @@ # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] +html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # The name for this set of Sphinx documents. # " v documentation" by default. From e041d6de8a0ef7ba9ee50f2bb171059168d6bacc Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 8 Dec 2016 12:23:56 +0000 Subject: [PATCH 131/295] added makefile --- docs/.gitignore | 1 + docs/Makefile | 225 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 226 insertions(+) create mode 100644 docs/.gitignore create mode 100644 docs/Makefile diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000000..e35d8850c9 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +_build diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000000..e0d0d9ad33 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,225 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " applehelp to make an Apple Help Book" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " epub3 to make an epub3" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " coverage to run coverage check of the documentation (if enabled)" + @echo " dummy to check syntax errors of document sources" + +.PHONY: clean +clean: + rm -rf $(BUILDDIR)/* + +.PHONY: html +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +.PHONY: dirhtml +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +.PHONY: singlehtml +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +.PHONY: pickle +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +.PHONY: json +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +.PHONY: htmlhelp +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +.PHONY: qthelp +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/protolude.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/protolude.qhc" + +.PHONY: applehelp +applehelp: + $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp + @echo + @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." + @echo "N.B. You won't be able to view it unless you put it in" \ + "~/Library/Documentation/Help or install it in your application" \ + "bundle." + +.PHONY: devhelp +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/protolude" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/protolude" + @echo "# devhelp" + +.PHONY: epub +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +.PHONY: epub3 +epub3: + $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 + @echo + @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." + +.PHONY: latex +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +.PHONY: latexpdf +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +.PHONY: latexpdfja +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +.PHONY: text +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +.PHONY: man +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +.PHONY: texinfo +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +.PHONY: info +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +.PHONY: gettext +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +.PHONY: changes +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +.PHONY: linkcheck +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +.PHONY: doctest +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +.PHONY: coverage +coverage: + $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage + @echo "Testing of coverage in the sources finished, look at the " \ + "results in $(BUILDDIR)/coverage/python.txt." + +.PHONY: xml +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +.PHONY: pseudoxml +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." + +.PHONY: dummy +dummy: + $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy + @echo + @echo "Build finished. Dummy builder generates no files." From c28fa6b00ce87285d8150dd1f8dadd366c63a056 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 8 Dec 2016 13:12:42 +0000 Subject: [PATCH 132/295] debug module --- docs/{Applicative.rst => Applicative.md} | 6 ++-- docs/{Bool.rst => Bool.md} | 0 docs/Debug.md | 38 ++++++++++++++++++++++++ docs/{Exceptions.rst => Exceptions.md} | 0 docs/{Folds.rst => Folds.md} | 0 docs/{List.rst => List.md} | 14 ++++----- docs/{Maybe.rst => Maybe.md} | 0 docs/{Monad.rst => Monad.md} | 4 +-- docs/{Monoid.rst => Monoid.md} | 0 docs/{Numbers.rst => Numbers.md} | 0 docs/{Strings.rst => Strings.md} | 0 docs/{Tuple.rst => Tuple.md} | 0 docs/{TypeLevel.rst => TypeLevel.md} | 10 +++++++ docs/index.rst | 1 + 14 files changed, 61 insertions(+), 12 deletions(-) rename docs/{Applicative.rst => Applicative.md} (97%) rename docs/{Bool.rst => Bool.md} (100%) create mode 100644 docs/Debug.md rename docs/{Exceptions.rst => Exceptions.md} (100%) rename docs/{Folds.rst => Folds.md} (100%) rename docs/{List.rst => List.md} (94%) rename docs/{Maybe.rst => Maybe.md} (100%) rename docs/{Monad.rst => Monad.md} (99%) rename docs/{Monoid.rst => Monoid.md} (100%) rename docs/{Numbers.rst => Numbers.md} (100%) rename docs/{Strings.rst => Strings.md} (100%) rename docs/{Tuple.rst => Tuple.md} (100%) rename docs/{TypeLevel.rst => TypeLevel.md} (90%) diff --git a/docs/Applicative.rst b/docs/Applicative.md similarity index 97% rename from docs/Applicative.rst rename to docs/Applicative.md index f1f42eb7e2..80fc3d8f12 100644 --- a/docs/Applicative.rst +++ b/docs/Applicative.md @@ -2,7 +2,7 @@ Applicative =========== Functor -~~~~~~~ +------- ```haskell class Functor (f :: * -> *) where @@ -19,7 +19,7 @@ class Functor (f :: * -> *) where ``` Applicatives -~~~~~~~~~~~~ +------- ```haskell class Functor f => Applicative (f :: * -> *) where @@ -46,7 +46,7 @@ eitherA :: (Alternative f) => f a -> f b -> f (Either a b) ``` Alternative -~~~~~~~~~~~ +------- ```haskell class Applicative f => Alternative (f :: * -> *) where diff --git a/docs/Bool.rst b/docs/Bool.md similarity index 100% rename from docs/Bool.rst rename to docs/Bool.md diff --git a/docs/Debug.md b/docs/Debug.md new file mode 100644 index 0000000000..0a1030ff5c --- /dev/null +++ b/docs/Debug.md @@ -0,0 +1,38 @@ +Debug +===== + +```haskell +undefined :: a +``` + +```haskell +notImplemented :: a +``` + +```haskell +trace :: Print b => b -> a -> a +``` + +```haskell +traceM :: (Monad m) => Text -> m () +``` + +```haskell +traceId :: Text -> Text +``` + +```haskell +traceShowM :: (P.Show a, Monad m) => a -> m () +``` + +```haskell +traceShowId :: P.Show a => a -> a +``` + +```haskell +traceShow :: P.Show a => a -> b -> b +``` + +```haskell +traceIO :: Print b => b -> a -> IO a +``` diff --git a/docs/Exceptions.rst b/docs/Exceptions.md similarity index 100% rename from docs/Exceptions.rst rename to docs/Exceptions.md diff --git a/docs/Folds.rst b/docs/Folds.md similarity index 100% rename from docs/Folds.rst rename to docs/Folds.md diff --git a/docs/List.rst b/docs/List.md similarity index 94% rename from docs/List.rst rename to docs/List.md index 53f6275d26..97e40763e2 100644 --- a/docs/List.rst +++ b/docs/List.md @@ -2,7 +2,7 @@ List ==== Slicing -~~~~~~~ +------- ```haskell head :: Foldable f => f a -> Maybe a @@ -49,7 +49,7 @@ take :: Int -> [a] -> [a] ``` Unpacking -~~~~~~~~~ +--------- ```haskell uncons :: [a] -> Maybe (a, [a]) @@ -60,21 +60,21 @@ unsnoc :: [x] -> Maybe ([x],x) ``` Sorting -~~~~~~~~~ +--------- ```haskell sortOn :: Ord o => (a -> o) -> [a] -> [a] ``` Removing -~~~~~~~~~ +--------- ```haskell ordNub :: Ord a => [a] -> [a] ``` Splitting -~~~~~~~~~ +--------- ```haskell splitAt :: Int -> [a] -> ([a], [a]) @@ -89,14 +89,14 @@ intercalate :: [a] -> [[a]] -> [a] ``` Comparison -~~~~~~~~~ +--------- ```haskell isPrefixOf :: Eq a => [a] -> [a] -> Bool ``` Filtering -~~~~~~~~~ +--------- ```haskell filter :: (a -> Bool) -> [a] -> [a] diff --git a/docs/Maybe.rst b/docs/Maybe.md similarity index 100% rename from docs/Maybe.rst rename to docs/Maybe.md diff --git a/docs/Monad.rst b/docs/Monad.md similarity index 99% rename from docs/Monad.rst rename to docs/Monad.md index 9441ef5dfa..4b7282f8ec 100644 --- a/docs/Monad.rst +++ b/docs/Monad.md @@ -2,7 +2,7 @@ Monads ====== Monad -~~~~~ +----- ```haskell class Applicative m => Monad (m :: * -> *) where @@ -121,7 +121,7 @@ ap :: Monad m => m (a -> b) -> m a -> m b ``` MonadPlus -~~~~~~~~~ +----- ```haskell class (Alternative m, Monad m) => MonadPlus (m :: * -> *) where diff --git a/docs/Monoid.rst b/docs/Monoid.md similarity index 100% rename from docs/Monoid.rst rename to docs/Monoid.md diff --git a/docs/Numbers.rst b/docs/Numbers.md similarity index 100% rename from docs/Numbers.rst rename to docs/Numbers.md diff --git a/docs/Strings.rst b/docs/Strings.md similarity index 100% rename from docs/Strings.rst rename to docs/Strings.md diff --git a/docs/Tuple.rst b/docs/Tuple.md similarity index 100% rename from docs/Tuple.rst rename to docs/Tuple.md diff --git a/docs/TypeLevel.rst b/docs/TypeLevel.md similarity index 90% rename from docs/TypeLevel.rst rename to docs/TypeLevel.md index 3a0346a3d7..7da15d2fc8 100644 --- a/docs/TypeLevel.rst +++ b/docs/TypeLevel.md @@ -30,6 +30,16 @@ vacuous :: Functor f => f Void -> f a data Proxy (t :: k) = Proxy ``` +#### Symbol + +* symbolVal +* someSymbolVal + +#### Nat + +* natVal +* someNatVal + #### Type Equality ```haskell diff --git a/docs/index.rst b/docs/index.rst index 2a0ea5ad91..87fc5185f0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,6 +6,7 @@ An alternative Prelude. .. toctree:: :maxdepth: 0 Printing + Debug Files Strings Function From b32c80d0bbb6ebd391f075b1027472e7bb21733a Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 10 Dec 2016 12:46:48 +0000 Subject: [PATCH 133/295] basic hierarchy in place --- docs/Applicative.md | 4 -- docs/Debug.md | 58 +++++++++++++++++++++++++++ docs/Exceptions.md | 2 +- docs/Function.md | 98 +++++++++++++++++++++++++++++++++++++++++++++ docs/Function.rst | 83 -------------------------------------- docs/Monad.md | 1 - docs/Strings.md | 52 ++++++++++++++++++++++-- docs/Tuple.md | 86 ++++++++++++++++++--------------------- docs/index.rst | 8 ++-- src/Protolude.hs | 13 +++++- stack.yaml | 2 +- 11 files changed, 261 insertions(+), 146 deletions(-) create mode 100644 docs/Function.md delete mode 100644 docs/Function.rst diff --git a/docs/Applicative.md b/docs/Applicative.md index 80fc3d8f12..ef14d9b283 100644 --- a/docs/Applicative.md +++ b/docs/Applicative.md @@ -29,10 +29,6 @@ class Functor f => Applicative (f :: * -> *) where (<*) :: f a -> f b -> f a ``` -```haskell -(<$>) :: Functor f => (a -> b) -> f a -> f b -``` - ```haskell orAlt :: (Alternative f, Monoid a) => f a -> f a ``` diff --git a/docs/Debug.md b/docs/Debug.md index 0a1030ff5c..37363798c1 100644 --- a/docs/Debug.md +++ b/docs/Debug.md @@ -1,38 +1,96 @@ Debug ===== +Stubbing +-------- + +#### undefined + ```haskell undefined :: a ``` +An undefined expression standing in for an incomplete program, unevaluated type +witness, or unreachable code branch. + +*Example*: + +```haskell +> import Foreign.Storable +> print (sizeOf (undefined :: Int)) +8 +``` + +#### notImplemented + ```haskell notImplemented :: a ``` +An undefined expression standing in for a yet to completed program. + +*Example*: + +```haskell +main :: IO () +main = notImplemented +``` + +Tracing +------- + +#### trace + ```haskell trace :: Print b => b -> a -> a ``` +*Example*: + +#### traceM + ```haskell traceM :: (Monad m) => Text -> m () ``` +*Example*: + +#### traceId + ```haskell traceId :: Text -> Text ``` +*Example*: + +#### traceShowM + ```haskell traceShowM :: (P.Show a, Monad m) => a -> m () ``` +*Example*: + +#### traceShowId + ```haskell traceShowId :: P.Show a => a -> a ``` +*Example*: + +#### traceShow + ```haskell traceShow :: P.Show a => a -> b -> b ``` +*Example*: + +#### traceIO + ```haskell traceIO :: Print b => b -> a -> IO a ``` + +*Example*: diff --git a/docs/Exceptions.md b/docs/Exceptions.md index 6a33cef03a..4817c97bd3 100644 --- a/docs/Exceptions.md +++ b/docs/Exceptions.md @@ -61,7 +61,7 @@ throwSTM :: Exception e => e -> STM a throwError :: MonadError e m => e -> m a ``` -#### Panic +#### Fatal Errors ```haskell data FatalError = FatalError {msg :: Text} diff --git a/docs/Function.md b/docs/Function.md new file mode 100644 index 0000000000..c28a7b4e29 --- /dev/null +++ b/docs/Function.md @@ -0,0 +1,98 @@ +Functions +========= + +Composition +----------- + +#### $ + +```haskell +($) :: (a -> b) -> a -> b +``` + +*Example*: + +#### . + +```haskell +(.) :: (b -> c) -> (a -> b) -> a -> c +``` + +*Example*: + +#### & + +```haskell +(&) :: a -> (a -> b) -> b +``` + +*Example*: + +#### flip + +```haskell +flip :: (a -> b -> c) -> b -> a -> c +``` + +*Example*: + +#### on + +```haskell +on :: (b -> b -> c) -> (a -> b) -> a -> a -> c +``` + +*Example*: + +#### const + +```haskell +const :: a -> b -> a +``` + +*Example*: + +#### fix + +```haskell +fix :: (a -> a) -> a +``` + +*Example*: + +#### identity + +```haskell +identity :: a -> a +``` + +The identity function maps any value to itself. + +*Example*: + +Strictness +----------- + +#### $! + +```haskell +($!) :: NFData a => (a -> b) -> a -> b +``` + +*Example*: + +#### $!! + +```haskell +($!!) :: NFData a => (a -> b) -> a -> b +``` + +*Example*: + +#### force + +```haskell +force :: NFData a => a -> a +``` + +*Example*: diff --git a/docs/Function.rst b/docs/Function.rst deleted file mode 100644 index 2f5f1ed708..0000000000 --- a/docs/Function.rst +++ /dev/null @@ -1,83 +0,0 @@ -Functions -========= - -.. highlight:: haskell - -$ -*** - -:: - - ($) :: (a -> b) -> a -> b - -& -*** - -:: - - (&) :: a -> (a -> b) -> b - -. -*** - -:: - - (.) :: (b -> c) -> (a -> b) -> a -> c - - -flip -**** - -:: - - flip :: (a -> b -> c) -> b -> a -> c - - -on -*** - -:: - - on :: (b -> b -> c) -> (a -> b) -> a -> a -> c - -const -***** - -:: - - const :: a -> b -> a - -fix -*** - -:: - - fix :: (a -> a) -> a - -identity -******** - -:: - - identity :: a -> a - -$! -*** - -:: - - ($!) :: NFData a => (a -> b) -> a -> b - -$!! -*** - -:: - - ($!!) :: NFData a => (a -> b) -> a -> b - -force -***** - -:: - - force :: NFData a => a -> a diff --git a/docs/Monad.md b/docs/Monad.md index 4b7282f8ec..9e0e3e6eec 100644 --- a/docs/Monad.md +++ b/docs/Monad.md @@ -9,7 +9,6 @@ class Applicative m => Monad (m :: * -> *) where (>>=) :: m a -> (a -> m b) -> m b (>>) :: m a -> m b -> m b return :: a -> m a - GHC.Base.fail :: GHC.Base.String -> m a ``` ```haskell diff --git a/docs/Strings.md b/docs/Strings.md index 2d218dd04a..57ffd8776f 100644 --- a/docs/Strings.md +++ b/docs/Strings.md @@ -1,14 +1,58 @@ Strings ======= +```haskell +import qualified Data.Text as T +import qualified Data.Text.Lazy as L +``` + Text -~~~~ +---- + +The Text type represents Unicode character strings, in a time and space-efficient manner. This package provides text processing capabilities that are optimized for performance critical use, both in terms of large data quantities and high speed. LText -~~~~ +----- Bytestring -~~~~~~~~~~ +---------- LBytestring -~~~~~~~~~~~ +----------- + +Conversion +---------- + +```haskell +class StringConv a b where + strConv :: Leniency -> a -> b + +data Leniency = Lenient | Strict +``` + +```haskell +toS :: StringConv a b => a -> b +``` + +```haskell +toSL :: StringConv a b => a -> b +``` + +*Example*: + +```haskell +a :: LByteString +a = "Einstein" + +b :: Text +b = "Feynmann" + +c :: ByteString +c = "Schrödinger" + +example1 :: ByteString +example1 = toS b + +example2 :: Bool +example2 = (a == toS b) && (toS b == c) +``` diff --git a/docs/Tuple.md b/docs/Tuple.md index 5ce5679d2d..f9cbb5b731 100644 --- a/docs/Tuple.md +++ b/docs/Tuple.md @@ -1,84 +1,76 @@ Tuples ====== -.. highlight:: haskell +#### fst -fst -*** - -:: - - fst :: (a, b) -> a +```haskell +fst :: (a, b) -> a +``` Extract the first component of a pair. *Example*: -:: - - > fst (1,2) - 1 +```haskell +> fst (1,2) +``` -snd -*** +#### snd -:: - - snd :: (a, b) -> b +```haskell +snd :: (a, b) -> b +``` Extract the second component of a pair. *Example*: -:: - - > snd (1,2) - 2 - -swap -**** +```haskell +> snd (1,2) +2 +``` -:: +#### swap - swap :: (a, b) -> (b, a) +```haskell +swap :: (a, b) -> (b, a) +``` Swap the components of a pair. *Example*: -:: - - > swap (1,2) - (2,1) +```haskell +> swap (1,2) +(2,1) +``` -curry -***** +#### curry -:: - - curry :: ((a, b) -> c) -> a -> b -> c +```haskell +curry :: ((a, b) -> c) -> a -> b -> c +``` curry converts an uncurried function to a curried function. *Example*: -:: - - > curry fst 1 2 - 1 +```haskell +> curry fst 1 2 +1 +``` -uncurry -******* +#### uncurry -:: - - uncurry :: (a -> b -> c) -> (a, b) -> c +```haskell +uncurry :: (a -> b -> c) -> (a, b) -> c +``` uncurry converts a curried function to a function on pairs. *Example*: -:: - - > uncurry (+) (1,2) - 3 +```haskell +> uncurry (+) (1,2) +3 +``` diff --git a/docs/index.rst b/docs/index.rst index 87fc5185f0..48f8161c2f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -5,17 +5,17 @@ An alternative Prelude. .. toctree:: :maxdepth: 0 + Function + Strings + Bool + Numbers Printing Debug Files - Strings - Function Applicative Monad Maybe Either - Bool - Numbers Monoid Semigroup Bifunctor diff --git a/src/Protolude.hs b/src/Protolude.hs index 73ed2bd29c..90c89de480 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -196,6 +196,7 @@ import Data.Typeable as X ( import Data.Type.Coercion as X ( Coercion(..) , coerceWith + , repr ) import Data.Type.Equality as X ( @@ -269,7 +270,17 @@ import Data.Bits as X hiding ( unsafeShiftL , unsafeShiftR ) -import Data.Word as X +import Data.Word as X ( + byteSwap16 + , byteSwap32 + , byteSwap64 + , Word + , Word16 + , Word32 + , Word64 + , Word8 + ) + import Data.Either as X import Data.Complex as X import Data.Char as X (chr) diff --git a/stack.yaml b/stack.yaml index 38583d04ed..bb517b9f04 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-5.10 +resolver: lts-6.2 packages: - '.' extra-deps: From 8995aa71f3f846e82ad8f05690ee679e0259eee6 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 10 Dec 2016 13:28:32 +0000 Subject: [PATCH 134/295] bits and files --- docs/Bits.md | 147 ++++++++++++++++++++++++++++++++++++++++++++++ docs/Files.md | 28 +++++++++ docs/Numbers.md | 11 ++++ docs/Strings.md | 8 +++ docs/TypeLevel.md | 36 ++++++++++-- docs/index.rst | 3 +- 6 files changed, 228 insertions(+), 5 deletions(-) create mode 100644 docs/Bits.md create mode 100644 docs/Files.md diff --git a/docs/Bits.md b/docs/Bits.md new file mode 100644 index 0000000000..c9c32e97ea --- /dev/null +++ b/docs/Bits.md @@ -0,0 +1,147 @@ +Bits +==== + +Bit Operations +-------------- + +#### .&. + +```haskell +(.&.) :: Bits a => a -> a -> a +``` + +*Example*: + +#### .|. + +```haskell +(.|.) :: Bits a => a -> a -> a +``` + +*Example*: + +#### xor + +```haskell +xor :: Bits a => a -> a -> a +``` + +*Example*: + +#### complement + +```haskell +complement :: Bits a => a -> a +``` + +*Example*: + +#### shift + +*Example*: + +```haskell +shift :: Bits a => a -> Int -> a +``` + +*Example*: + +#### rotate + +```haskell +rotate :: Bits a => a -> Int -> a +``` + +*Example*: + +#### zeroBits + +```haskell +zeroBits :: Bits a => a +``` + +*Example*: + +#### bit + +```haskell +bit :: Bits a => Int -> a +``` + +*Example*: + +Bit Testing +------------ + +```haskell +setBit :: Bits a => a -> Int -> a +``` + +```haskell +clearBit :: Bits a => a -> Int -> a +``` + +```haskell +complementBit :: Bits a => a -> Int -> a +``` + +```haskell +testBit :: Bits a => a -> Int -> Bool +``` + + +```haskell +isSigned :: Bits a => a -> Bool +``` + +Bit Size +------------ + +```haskell +bitSize :: Bits a => a -> Int +``` + +```haskell +popCount :: Bits a => a -> Int +``` + +Bit Shifting +------------ + +```haskell +shiftL :: Bits a => a -> Int -> a +``` + +```haskell +shiftR :: Bits a => a -> Int -> a +``` + +Bit Rotation +------------ + +```haskell +rotate :: Bits a => a -> Int -> a +``` + +```haskell +rotateL :: Bits a => a -> Int -> a +``` + +```haskell +rotateR :: Bits a => a -> Int -> a +``` + +Byte Swapping +------------ + +```haskell +byteSwap16 :: Word16 -> Word16 +``` + +```haskell +byteSwap32 :: Word32 -> Word32 +``` + +```haskell +byteSwap64 :: Word64 -> Word64 +``` diff --git a/docs/Files.md b/docs/Files.md new file mode 100644 index 0000000000..6b887e6066 --- /dev/null +++ b/docs/Files.md @@ -0,0 +1,28 @@ +Files +===== + +Basic IO +-------- + +* readFile +* writeFile +* appendFile +* openFile +* withFile + +Console +------- + +* getLine +* getContents +* interact + +File Handles +------------ + +* stdin +* stdout +* stderr +* Handle +* FilePath +* IOMode(..) diff --git a/docs/Numbers.md b/docs/Numbers.md index fcaa14edce..d5de5acb09 100644 --- a/docs/Numbers.md +++ b/docs/Numbers.md @@ -1,2 +1,13 @@ Numbers ======= + +* Int8 +* Int16 +* Int32 +* Int64 +* Integer +* Word +* Word8 +* Word16 +* Word32 +* Word64 diff --git a/docs/Strings.md b/docs/Strings.md index 57ffd8776f..699838302c 100644 --- a/docs/Strings.md +++ b/docs/Strings.md @@ -20,6 +20,14 @@ Bytestring LBytestring ----------- +Encoding +---------- + +* encodeUtf8 +* decodeUtf8 +* decodeUtf8' +* decodeUtf8With + Conversion ---------- diff --git a/docs/TypeLevel.md b/docs/TypeLevel.md index 7da15d2fc8..2ac0468722 100644 --- a/docs/TypeLevel.md +++ b/docs/TypeLevel.md @@ -32,13 +32,41 @@ data Proxy (t :: k) = Proxy #### Symbol -* symbolVal -* someSymbolVal +```haskell +symbolVal :: KnownSymbol n => proxy n -> String +``` + +*Example*: + +```haskell +b :: String +b = symbolVal (Proxy :: Proxy "foo") +``` + +```haskell +someSymbolVal :: String -> SomeSymbol +``` + +*Example*: #### Nat -* natVal -* someNatVal +```haskell +natVal :: KnownNat n => proxy n -> Integer +``` + +*Example*: + +```haskell +a :: Integer +a = natVal (Proxy :: Proxy 1) +``` + +```haskell +someNatVal :: Integer -> Maybe SomeNat +``` + +*Example*: #### Type Equality diff --git a/docs/index.rst b/docs/index.rst index 48f8161c2f..74f7088dc3 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,8 +10,9 @@ An alternative Prelude. Bool Numbers Printing - Debug Files + Debug + Bits Applicative Monad Maybe From 00c2fce11afb4ed549daf67f391f1911e991935b Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 10 Dec 2016 14:51:33 +0000 Subject: [PATCH 135/295] console functions --- docs/Files.md | 74 +++++++++++++++++----- docs/Folds.md | 160 +++++++++++++++++++++++++++++++++++++++++++++++ docs/Generics.md | 2 + docs/Hashing.md | 14 +++++ docs/Numbers.md | 18 ++++++ docs/index.rst | 1 + 6 files changed, 255 insertions(+), 14 deletions(-) create mode 100644 docs/Generics.md create mode 100644 docs/Hashing.md diff --git a/docs/Files.md b/docs/Files.md index 6b887e6066..eb39fa4885 100644 --- a/docs/Files.md +++ b/docs/Files.md @@ -4,25 +4,71 @@ Files Basic IO -------- -* readFile -* writeFile -* appendFile -* openFile -* withFile +#### readFile + +```haskell +readFile :: FilePath -> IO Text +``` + +#### writeFile + +```haskell +writeFile :: FilePath -> Text -> IO () +``` + +#### appendFile + +```haskell +appendFile :: FilePath -> Text -> IO () +``` Console ------- -* getLine -* getContents -* interact +#### getLine + +```haskell +getLine :: IO Text +``` + +#### getContents + +```haskell +getContents :: IO Text +``` + +#### interact + +```haskell +interact :: (Text -> Text) -> IO () +``` File Handles ------------ -* stdin -* stdout -* stderr -* Handle -* FilePath -* IOMode(..) +```haskell +data IOMode + = ReadMode + | WriteMode + | AppendMode + | ReadWriteMode +``` + +#### openFile + +```haskell +openFile :: FilePath -> IOMode -> IO Handle +``` + +#### withFile + +```haskell +withFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r +``` + + +#### stdin +#### stdout +#### stderr +#### Handle +#### FilePath diff --git a/docs/Folds.md b/docs/Folds.md index 3a76da4ad4..0e31472180 100644 --- a/docs/Folds.md +++ b/docs/Folds.md @@ -1,2 +1,162 @@ Folds ===== + +Basic Folds +----------- + +```haskell +foldMap :: (Foldable t, Monoid m) => (a -> m) -> t a -> m +``` + +```haskell +foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b +``` + +```haskell +foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b +``` + +```haskell +foldr' :: Foldable t => (a -> b -> b) -> b -> t a -> b +``` + +```haskell +foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> b +``` + +```haskell +fold :: Foldable t => Monoid m => t m -> m +``` + +```haskell +toList :: Foldable t => t a -> [a] +``` + +```haskell +null :: Foldable t => t a -> Bool +``` + +```haskell +length :: Foldable t => t a -> Int +``` + +```haskell +elem :: (Eq a, Foldable t) => a -> t a -> Bool +``` + +```haskell +maximum :: (Ord a, Foldable t) => t a -> a +``` + +```haskell +minimum :: (Ord a, Foldable t) => t a -> a +``` + +```haskell +sum :: (Num a, Foldable f) => f a -> a +``` + +```haskell +product :: (Num a, Foldable f) => f a -> a +``` + +#### Folding actions + +```haskell +traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f () +``` + +```haskell +for_ :: (Foldable t, Applicative f) => t a -> (a -> f b) -> f () +``` + +*Example*: + +```haskell +>>> for_ [1..4] print +1 +2 +3 +4 +``` + + +#### Applicative Folds + +```haskell +sequenceA_ :: (Foldable t, Applicative f) => t (f a) -> f () +``` + +```haskell +asum :: (Foldable t, Alternative f) => t (f a) -> f a +``` + +#### Monadic Folds + +```haskell +mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m () +``` + +```haskell +forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m () +``` + +```haskell +sequence_ :: (Foldable t, Monad m) => t (m a) -> m () +``` + +```haskell +msum :: (Foldable t, MonadPlus m) => t (m a) -> m a +``` + +```haskell +foldrM :: (Foldable t, Monad m) => (a -> b -> m b) -> b -> t a -> m b +``` + +```haskell +foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b +``` + +#### Specialized folds + +```haskell +concat :: Foldable t => t [a] -> [a] +``` + +```haskell +concatMap :: Foldable t => (a -> [b]) -> t a -> [b] +``` + +```haskell +and :: Foldable t => t Bool -> Bool +``` + +```haskell +or :: Foldable t => t Bool -> Bool +``` + +```haskell +any :: Foldable t => (a -> Bool) -> t a -> Bool +``` + +```haskell +all :: Foldable t => (a -> Bool) -> t a -> Bool +``` + +```haskell +maximumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a +``` + +```haskell +minimumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a +``` + +#### Searches + +```haskell +notElem :: (Foldable t, Eq a) => a -> t a -> Bool +``` + +```haskell +find :: Foldable t => (a -> Bool) -> t a -> Maybe a +``` diff --git a/docs/Generics.md b/docs/Generics.md new file mode 100644 index 0000000000..ab46d3cda8 --- /dev/null +++ b/docs/Generics.md @@ -0,0 +1,2 @@ +Generics +======== diff --git a/docs/Hashing.md b/docs/Hashing.md new file mode 100644 index 0000000000..db193d9778 --- /dev/null +++ b/docs/Hashing.md @@ -0,0 +1,14 @@ +Hashing +======= + +```haskell +hashWithSalt :: Hashable a => Int -> a -> Int +``` + +```haskell +hash :: Hashable a => a -> Int +``` + +```haskell +hashUsing :: Hashable b => (a -> b) -> Int -> a -> Int +``` diff --git a/docs/Numbers.md b/docs/Numbers.md index d5de5acb09..134ae728f3 100644 --- a/docs/Numbers.md +++ b/docs/Numbers.md @@ -11,3 +11,21 @@ Numbers * Word16 * Word32 * Word64 + +Arithemtic +---------- + +Trigonometric +------------- + +Comparisons +----------- + +Ratios +------ + +Complex Numbers +--------------- + +Conversions +----------- diff --git a/docs/index.rst b/docs/index.rst index 74f7088dc3..98aedfc9d7 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -35,6 +35,7 @@ An alternative Prelude. Set Tuple Generics + Hashable TypeLevel Unsafe From 6cb17bb94b8bc31bd0a32e3c2d0a4453bc914eab Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 10 Dec 2016 16:01:47 +0000 Subject: [PATCH 136/295] utility functions --- docs/Applicative.md | 13 +++++++++++ docs/Bits.md | 55 +++++++++++++++++++++++++++++++++++++++++++++ docs/Bool.md | 4 ++++ docs/Exceptions.md | 18 +++++++++++++-- docs/Function.md | 16 +++++++++++++ docs/List.md | 4 ++++ docs/Monad.md | 16 +++++++++++++ docs/Monoid.md | 35 +++++++++++++++++++++++++++++ 8 files changed, 159 insertions(+), 2 deletions(-) diff --git a/docs/Applicative.md b/docs/Applicative.md index ef14d9b283..d21dd9b990 100644 --- a/docs/Applicative.md +++ b/docs/Applicative.md @@ -41,6 +41,11 @@ orEmpty :: Alternative f => Bool -> a -> f a eitherA :: (Alternative f) => f a -> f b -> f (Either a b) ``` +```haskell +pass :: Applicative f => f () +``` + + Alternative ------- @@ -75,3 +80,11 @@ liftA :: Applicative f => (a -> b) -> f a -> f b ```haskell empty :: Alternative f => f a ``` + +```haskell +guarded :: (Alternative f) => (a -> Bool) -> a -> f a +``` + +```haskell +guardedA :: (Functor f, Alternative t) => (a -> f Bool) -> a -> f (t a) +``` diff --git a/docs/Bits.md b/docs/Bits.md index c9c32e97ea..9fd8afc4ef 100644 --- a/docs/Bits.md +++ b/docs/Bits.md @@ -1,6 +1,14 @@ Bits ==== +```haskell +{-# LANGUAGE BinaryLiterals #-} +``` + +```python +42 = 0b101010 +``` + Bit Operations -------------- @@ -28,12 +36,31 @@ xor :: Bits a => a -> a -> a *Example*: +```haskell +> True `xor` False +True + +> True `xor` True +False + +> 0b101 `xor` 0b011 +6 -- 0b110 +``` + #### complement ```haskell complement :: Bits a => a -> a ``` +```haskell +> complement True +False + +> complement 0b101 +-2 -- -0b010 +``` + *Example*: #### shift @@ -81,19 +108,47 @@ setBit :: Bits a => a -> Int -> a clearBit :: Bits a => a -> Int -> a ``` +#### complementBit + ```haskell complementBit :: Bits a => a -> Int -> a ``` +*Example*: + +```haskell +λ> 0b100 `complementBit` 1 +6 -- 0b110 +``` + +#### testBit + ```haskell testBit :: Bits a => a -> Int -> Bool ``` +*Example*: + +```haskell +> 0b10 `testBit` 0 +False +> 0b10 `testBit` 1 +True +``` + +#### isSigned ```haskell isSigned :: Bits a => a -> Bool ``` +```haskell +> isSigned 42 +True +> isSigned True +False +``` + Bit Size ------------ diff --git a/docs/Bool.md b/docs/Bool.md index 897a6ae654..d1ea2ca21f 100644 --- a/docs/Bool.md +++ b/docs/Bool.md @@ -1,2 +1,6 @@ Bool ===== + +```haskell +bool :: a -> a -> Bool -> a +``` diff --git a/docs/Exceptions.md b/docs/Exceptions.md index 4817c97bd3..88bd82f895 100644 --- a/docs/Exceptions.md +++ b/docs/Exceptions.md @@ -1,5 +1,5 @@ -Exception Handling -================== +Exceptions +========== #### MonadError @@ -61,6 +61,20 @@ throwSTM :: Exception e => e -> STM a throwError :: MonadError e m => e -> m a ``` +#### Utilities + +```haskell +hush :: Alternative m => Either e a -> m a +``` + +```haskell +note :: (MonadError e m, Applicative m) => e -> Maybe a -> m a +``` + +```haskell +tryIO :: MonadIO m => IO a -> ExceptT IOException m a +``` + #### Fatal Errors ```haskell diff --git a/docs/Function.md b/docs/Function.md index c28a7b4e29..120377cc65 100644 --- a/docs/Function.md +++ b/docs/Function.md @@ -68,8 +68,24 @@ identity :: a -> a The identity function maps any value to itself. +#### applyN + +Apply a function to a value `n` times. + *Example*: +```haskell +applyN :: Int -> (a -> a) -> a -> a +``` + +```haskell +> applyN 25 (+2) 0 +50 + +> applyN 3 (1:) [] +[1,1,1] +``` + Strictness ----------- diff --git a/docs/List.md b/docs/List.md index 97e40763e2..7c3b64ba6f 100644 --- a/docs/List.md +++ b/docs/List.md @@ -59,6 +59,10 @@ uncons :: [a] -> Maybe (a, [a]) unsnoc :: [x] -> Maybe ([x],x) ``` +```haskell +list :: [b] -> (a -> b) -> [a] -> [b] +``` + Sorting --------- diff --git a/docs/Monad.md b/docs/Monad.md index 9e0e3e6eec..78d0ea4fae 100644 --- a/docs/Monad.md +++ b/docs/Monad.md @@ -119,6 +119,22 @@ ap :: Monad m => m (a -> b) -> m a -> m b (<$!>) :: Monad m => (a -> b) -> m a -> m b ``` +```haskell +whenM :: Monad m => m Bool -> m () -> m () +``` + +```haskell +unlessM :: Monad m => m Bool -> m () -> m () +``` + +```haskell +ifM :: Monad m => m Bool -> m a -> m a -> m a +``` + +```haskell +guardM :: MonadPlus m => m Bool -> m () +``` + MonadPlus ----- diff --git a/docs/Monoid.md b/docs/Monoid.md index 86bbceb38a..fbe4c79560 100644 --- a/docs/Monoid.md +++ b/docs/Monoid.md @@ -1,2 +1,37 @@ Monoid ====== + +Monoid +------ + +Semigroup +--------- + + +```haskell +option :: b -> (a -> b) -> Option a -> b +``` + +```haskell +diff :: Semigroup m => m -> Endo m +``` + +```haskell +cycle1 :: Semigroup m => m -> m +``` + +```haskell +stimesMonoid :: (Integral b, Monoid a) => b -> a -> a +``` + +```haskell +stimesIdempotent :: Integral b => b -> a -> a +``` + +```haskell +stimesIdempotentMonoid :: (Integral b, Monoid a) => b -> a -> a +``` + +```haskell +mtimesDefault :: (Integral b, Monoid a) => b -> a -> a +``` From a33669ca6dabf827785a50019524624388f1f42b Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 12 Dec 2016 11:03:34 +0000 Subject: [PATCH 137/295] maybe functions --- docs/Bifunctor.md | 2 ++ docs/Maybe.md | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 docs/Bifunctor.md diff --git a/docs/Bifunctor.md b/docs/Bifunctor.md new file mode 100644 index 0000000000..a3878ece5c --- /dev/null +++ b/docs/Bifunctor.md @@ -0,0 +1,2 @@ +Bifunctor +========= diff --git a/docs/Maybe.md b/docs/Maybe.md index 39fcdbb685..e155d41221 100644 --- a/docs/Maybe.md +++ b/docs/Maybe.md @@ -1,2 +1,38 @@ Maybe ===== + +```haskell +maybe :: b -> (a -> b) -> Maybe a -> b +``` + +```haskell +isJust :: Maybe a -> Bool +``` + +```haskell +isNothing :: Maybe a -> Bool +``` + +```haskell +fromJust :: Maybe a -> a +``` + +```haskell +fromMaybe :: a -> Maybe a -> a +``` + +```haskell +listToMaybe :: [a] -> Maybe a +``` + +```haskell +maybeToList :: Maybe a -> [a] +``` + +```haskell +catMaybes :: [Maybe a] -> [a] +``` + +```haskell +mapMaybe :: (a -> Maybe b) -> [a] -> [b] +``` From c692eb03fbae6f4a74a76ed4fd3e4fef68671233 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 12 Dec 2016 11:04:52 +0000 Subject: [PATCH 138/295] only export byteswap functions for ghc >7.6 --- src/Protolude.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index 90c89de480..385099bcb8 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -271,14 +271,16 @@ import Data.Bits as X hiding ( , unsafeShiftR ) import Data.Word as X ( - byteSwap16 - , byteSwap32 - , byteSwap64 - , Word + Word , Word16 , Word32 , Word64 , Word8 +#if (__GLASGOW_HASKELL__ >= 710) + , byteSwap16 + , byteSwap32 + , byteSwap64 +#endif ) import Data.Either as X From 66958def935e728e454f5773cb3c732aa763afdf Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 12 Dec 2016 11:14:42 +0000 Subject: [PATCH 139/295] export encoding error handlers --- docs/Strings.md | 27 +++++++++++++++++++++++---- src/Protolude.hs | 9 +++++++++ 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/docs/Strings.md b/docs/Strings.md index 699838302c..2f77d78b1b 100644 --- a/docs/Strings.md +++ b/docs/Strings.md @@ -23,10 +23,29 @@ LBytestring Encoding ---------- -* encodeUtf8 -* decodeUtf8 -* decodeUtf8' -* decodeUtf8With +#### encodeUtf8 + +```haskell +encodeUtf8 :: Text -> ByteString +``` + +#### decodeUtf8 + +```haskell +decodeUtf8 :: ByteString -> Text +``` + +#### decodeUtf8' + +```haskell +decodeUtf8' :: ByteString -> Text +``` + +#### decodeUtf8With + +```haskell +decodeUtf8With :: Data.Text.Encoding.Error.OnDecodeError -> ByteString -> Text +``` Conversion ---------- diff --git a/src/Protolude.hs b/src/Protolude.hs index 385099bcb8..c9d020d5cb 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -349,6 +349,15 @@ import Data.Text.Encoding as X ( , decodeUtf8With ) +import Data.Text.Encoding.Error as X ( + OnDecodeError + , OnError + , lenientDecode + , strictDecode + , ignore + , replace + ) + -- IO import System.Exit as X import System.Environment as X (getArgs) From 257a38f68fbba6a6b16d357a61aeb4ff5fa1b0ca Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 12 Dec 2016 13:09:18 +0000 Subject: [PATCH 140/295] functor module --- docs/Functor.md | 26 ++++++++++++++++++++++++++ docs/List.md | 4 ---- docs/Strings.md | 14 ++++++++++++-- docs/index.rst | 1 + src/Protolude.hs | 1 + 5 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 docs/Functor.md diff --git a/docs/Functor.md b/docs/Functor.md new file mode 100644 index 0000000000..a557294b13 --- /dev/null +++ b/docs/Functor.md @@ -0,0 +1,26 @@ +Functor +======= + +```haskell +foreach :: Functor f => f a -> (a -> b) -> f b +``` + +```haskell +map :: Functor f => (a -> b) -> f a -> f b +``` + +```haskell +($>) :: Functor f => f a -> b -> f b +``` + +```haskell +(<$>) :: Functor f => (a -> b) -> f a -> f b +``` + +```haskell +(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b) +``` + +```haskell +void :: Functor f => f a -> f () +``` diff --git a/docs/List.md b/docs/List.md index 7c3b64ba6f..fdc7b64425 100644 --- a/docs/List.md +++ b/docs/List.md @@ -109,7 +109,3 @@ filter :: (a -> Bool) -> [a] -> [a] ```haskell replicate :: Int -> a -> [a] ``` - -```haskell -map :: Functor f => (a -> b) -> f a -> f b -``` diff --git a/docs/Strings.md b/docs/Strings.md index 2f77d78b1b..17f86d104c 100644 --- a/docs/Strings.md +++ b/docs/Strings.md @@ -29,22 +29,32 @@ Encoding encodeUtf8 :: Text -> ByteString ``` +```haskell +> encodeUtf8 "ポケット" +"\227\131\157\227\130\177\227\131\131\227\131\136" +``` + #### decodeUtf8 ```haskell decodeUtf8 :: ByteString -> Text ``` +```haskell +> putStrLn $ decodeUtf8 "\227\131\157\227\130\177\227\131\131\227\131\136" +ポケット +``` + #### decodeUtf8' ```haskell -decodeUtf8' :: ByteString -> Text +decodeUtf8' :: ByteString -> Either UnicodeException Text ``` #### decodeUtf8With ```haskell -decodeUtf8With :: Data.Text.Encoding.Error.OnDecodeError -> ByteString -> Text +decodeUtf8With :: OnDecodeError -> ByteString -> Text ``` Conversion diff --git a/docs/index.rst b/docs/index.rst index 98aedfc9d7..b195c67753 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -13,6 +13,7 @@ An alternative Prelude. Files Debug Bits + Functor Applicative Monad Maybe diff --git a/src/Protolude.hs b/src/Protolude.hs index c9d020d5cb..8f28055234 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -352,6 +352,7 @@ import Data.Text.Encoding as X ( import Data.Text.Encoding.Error as X ( OnDecodeError , OnError + , UnicodeException , lenientDecode , strictDecode , ignore From c7eeb5349e8e690add8065b853c5a38052bbdd88 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 12 Dec 2016 16:10:49 +0000 Subject: [PATCH 141/295] fix exports for functor module --- src/Functor.hs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Functor.hs b/src/Functor.hs index 80683396e8..7d0a31d9f9 100644 --- a/src/Functor.hs +++ b/src/Functor.hs @@ -6,9 +6,12 @@ module Functor ( Functor(..), ($>), (<$>), + (<<$>>), void, ) where +import Data.Function ((.)) + #if (__GLASGOW_HASKELL__ >= 710) import Data.Functor ( Functor(..) @@ -23,16 +26,17 @@ import Data.Functor ( ) import Data.Function (flip) -import Data.Function ((.)) infixl 4 $> ($>) :: Functor f => f a -> b -> f b ($>) = flip (<$) -(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b) -(<<$>>) = fmap . fmap - void :: Functor f => f a -> f () void x = () <$ x #endif + +infixl 4 <<$>> + +(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b) +(<<$>>) = fmap . fmap From d6d1004070ec7d8457b0a02c152676563ee6f911 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 12 Dec 2016 16:21:49 +0000 Subject: [PATCH 142/295] monoid module --- docs/Functor.md | 20 +++++++++++++++++--- docs/Monoid.md | 22 ++++++++++++++++++++++ 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/docs/Functor.md b/docs/Functor.md index a557294b13..44c4419058 100644 --- a/docs/Functor.md +++ b/docs/Functor.md @@ -1,26 +1,40 @@ Functor ======= -```haskell -foreach :: Functor f => f a -> (a -> b) -> f b -``` +#### map ```haskell map :: Functor f => (a -> b) -> f a -> f b ``` +#### $> + ```haskell ($>) :: Functor f => f a -> b -> f b ``` +#### <$> + ```haskell (<$>) :: Functor f => (a -> b) -> f a -> f b ``` +#### <<$>> + ```haskell (<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b) ``` +#### void + ```haskell void :: Functor f => f a -> f () ``` + +#### foreach + +```haskell +foreach :: Functor f => f a -> (a -> b) -> f b +``` + + diff --git a/docs/Monoid.md b/docs/Monoid.md index fbe4c79560..41c3624879 100644 --- a/docs/Monoid.md +++ b/docs/Monoid.md @@ -4,6 +4,28 @@ Monoid Monoid ------ +#### mempty + +```haskell +mempty :: Monoid a => a +``` + +#### <> + +```haskell +(<>) :: Monoid m => m -> m -> m +``` + +```haskell +mappend :: Monoid a => a -> a -> a +``` + +#### mconcat + +```haskell +mconcat :: Monoid a => [a] -> a +``` + Semigroup --------- From 0fb7730b0c540c1be28cc18601a39cea50677eb7 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 12 Dec 2016 16:30:52 +0000 Subject: [PATCH 143/295] expand semigroup --- docs/Monoid.md | 14 ++++++++++++++ src/Protolude.hs | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/docs/Monoid.md b/docs/Monoid.md index 41c3624879..c9aa006222 100644 --- a/docs/Monoid.md +++ b/docs/Monoid.md @@ -29,6 +29,17 @@ mconcat :: Monoid a => [a] -> a Semigroup --------- +```haskell +(<>) :: Semigroup a => a -> a -> a +``` + +```haskell +sconcat :: Semigroup a => NonEmpty a -> a +``` + +```haskell +stimes :: (Semigroup a, Integral b) => b -> a -> a +``` ```haskell option :: b -> (a -> b) -> Option a -> b @@ -57,3 +68,6 @@ stimesIdempotentMonoid :: (Integral b, Monoid a) => b -> a -> a ```haskell mtimesDefault :: (Integral b, Monoid a) => b -> a -> a ``` + +NonEmpty +--------- diff --git a/src/Protolude.hs b/src/Protolude.hs index 8f28055234..1cb87e2ad6 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -103,6 +103,10 @@ import Data.Functor.Identity as X #if ( __GLASGOW_HASKELL__ >= 800 ) import Data.Monoid as X +import Data.List.NonEmpty as X ( + NonEmpty(..) + , nonEmpty + ) import Data.Semigroup as X ( Semigroup(sconcat, stimes) , WrappedMonoid From cc0565112fa3cb380be4435083b823a9e6b031ab Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 13 Dec 2016 09:14:39 +0000 Subject: [PATCH 144/295] monoid and fold rearranging --- docs/Folds.md | 9 +++++++++ docs/List.md | 11 +++++++++++ docs/Monoid.md | 6 ++++++ src/Protolude.hs | 1 + 4 files changed, 27 insertions(+) diff --git a/docs/Folds.md b/docs/Folds.md index 0e31472180..80f5791214 100644 --- a/docs/Folds.md +++ b/docs/Folds.md @@ -160,3 +160,12 @@ notElem :: (Foldable t, Eq a) => a -> t a -> Bool ```haskell find :: Foldable t => (a -> Bool) -> t a -> Maybe a ``` + + +```haskell +foldr1May :: (a -> a -> a) -> [a] -> Maybe a +``` + +```haskell +foldl1May :: (a -> a -> a) -> [a] -> Maybe a +``` diff --git a/docs/List.md b/docs/List.md index fdc7b64425..ad72c8cf80 100644 --- a/docs/List.md +++ b/docs/List.md @@ -109,3 +109,14 @@ filter :: (a -> Bool) -> [a] -> [a] ```haskell replicate :: Int -> a -> [a] ``` + +Indexing +-------- + +```haskell +atMay :: [a] -> Int -> Maybe a +``` + +```haskell +atDef :: a -> [a] -> Int -> a +``` diff --git a/docs/Monoid.md b/docs/Monoid.md index c9aa006222..55b8a68f2e 100644 --- a/docs/Monoid.md +++ b/docs/Monoid.md @@ -29,14 +29,20 @@ mconcat :: Monoid a => [a] -> a Semigroup --------- +#### <> + ```haskell (<>) :: Semigroup a => a -> a -> a ``` +#### sconcat + ```haskell sconcat :: Semigroup a => NonEmpty a -> a ``` +#### stimes + ```haskell stimes :: (Semigroup a, Integral b) => b -> a -> a ``` diff --git a/src/Protolude.hs b/src/Protolude.hs index 1cb87e2ad6..73892ba613 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -305,6 +305,7 @@ import Data.Function as X ( -- Genericss import GHC.Generics as X ( Generic(..) + , Generic1 , Rep , K1(..) , M1(..) From 1f2ed3e4cb3c4432ba97a6f8ca680c045fb94695 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 13 Dec 2016 12:31:47 +0000 Subject: [PATCH 145/295] fix lower bounds --- CHANGES.md | 1 + README.md | 4 ++-- src/Protolude.hs | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3cfe82cde1..dcb35dcdee 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ * Expose `Symbol` and `Nat` types from `GHC.TypeLits` by default. * Switch exported `(<>)` to be from `Data.Monoid` instead of Semigroup. * Expose `putByteString` and `putLByteString` monomorphic versions of `putStrLn` functions +* Export `ExceptT`, `ReaderT`, and `StateT` constructors. 0.1.9 ==== diff --git a/README.md b/README.md index 6569908ec4..c12b2451a9 100644 --- a/README.md +++ b/README.md @@ -92,9 +92,8 @@ tracks Stack LTS resolver. | Dependencies | Lower | Upper | | ----------- | -------- | -------- | | array | | 0.5 | -| async | 2.1 | 2.2 | +| async | 2.0 | 2.2 | | base | 4.6 | 4.10 | -| binary | | 0.7 | | bytestring | 0.10 | 0.11 | | containers | 0.5 | 0.6 | | deepseq | 1.3 | 1.5 | @@ -104,6 +103,7 @@ tracks Stack LTS resolver. | safe | 0.3 | 0.4 | | stm | 2.4 | 2.5 | | text | 1.2 | 1.3 | +| hashable | 1.2 | 1.3 | | transformers | 0.4 | 0.6 | FAQs diff --git a/src/Protolude.hs b/src/Protolude.hs index 73892ba613..d9c9909493 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -223,7 +223,7 @@ import Data.Void as X ( import Control.Monad.State as X ( MonadState , State - , StateT + , StateT(StateT) , put , get , gets @@ -243,7 +243,7 @@ import Control.Monad.State as X ( import Control.Monad.Reader as X ( MonadReader , Reader - , ReaderT + , ReaderT(ReaderT) , ask , asks , local @@ -255,7 +255,7 @@ import Control.Monad.Reader as X ( import Control.Monad.Except as X ( MonadError , Except - , ExceptT + , ExceptT(ExceptT) , throwError , catchError , runExcept From ed6fa9c8ea8cf1e2f358667c6a42ea410fb867fb Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 14 Dec 2016 17:16:20 +0000 Subject: [PATCH 146/295] refine monaderror section --- docs/Exceptions.md | 50 ++++++++++++++++++++++++++++++++++++++-------- src/Protolude.hs | 2 +- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/docs/Exceptions.md b/docs/Exceptions.md index 88bd82f895..a5a1f137a8 100644 --- a/docs/Exceptions.md +++ b/docs/Exceptions.md @@ -1,7 +1,8 @@ Exceptions ========== -#### MonadError +MonadError +---------- ```haskell class Monad m => MonadError e (m :: * -> *) | m -> e where @@ -9,34 +10,55 @@ class Monad m => MonadError e (m :: * -> *) | m -> e where catchError :: m a -> (e -> m a) -> m a ``` +#### Except + ```haskell type Except e = ExceptT e Identity ``` +*Example*: + +```haskell +``` + +#### ExceptT ```haskell newtype ExceptT e (m :: * -> *) a = Control.Monad.Trans.Except.ExceptT (m (Either e a)) ``` +*Example*: + +```haskell +``` + +#### throwError ```haskell throwError :: MonadError e m => e -> m a ``` +#### catchError + ```haskell catchError :: MonadError e m => m a -> (e -> m a) -> m a ``` +#### runExcept + ```haskell runExcept :: Except e a -> Either e a ``` +#### runExceptT + ```haskell runExceptT :: ExceptT e m a -> m (Either e a) ``` -#### Exceptions +Exceptions +---------- ```haskell class (Typeable e, Show e) => Exception e where @@ -45,42 +67,54 @@ class (Typeable e, Show e) => Exception e where GHC.Exception.displayException :: e -> String ``` +#### throwIO + ```haskell throwIO :: (MonadIO m, Exception e) => e -> m a ``` -```haskell -throwTo :: (MonadIO m, Exception e) => ThreadId -> e -> m () -``` +#### throwSTM ```haskell throwSTM :: Exception e => e -> STM a ``` +#### throwTo + ```haskell -throwError :: MonadError e m => e -> m a +throwTo :: (MonadIO m, Exception e) => ThreadId -> e -> m () ``` -#### Utilities +Utilities +--------- + +#### hush ```haskell hush :: Alternative m => Either e a -> m a ``` +#### note + ```haskell note :: (MonadError e m, Applicative m) => e -> Maybe a -> m a ``` +#### tryIO + ```haskell tryIO :: MonadIO m => IO a -> ExceptT IOException m a ``` -#### Fatal Errors +Fatal Errors +------------ ```haskell data FatalError = FatalError {msg :: Text} ``` +#### panic + ```haskell panic :: Text -> a ``` diff --git a/src/Protolude.hs b/src/Protolude.hs index d9c9909493..eccb878cfa 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -426,7 +426,7 @@ map :: Functor f => (a -> b) -> f a -> f b map = fmap uncons :: [a] -> Maybe (a, [a]) -uncons [] = Nothing +uncons [] = Nothing uncons (x:xs) = Just (x, xs) unsnoc :: [x] -> Maybe ([x],x) From 1140df0f912e8241470b88685917297f99791c30 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 15 Dec 2016 15:06:15 +0000 Subject: [PATCH 147/295] stub out rest of toc --- docs/Concurrency.md | 2 ++ docs/Reader.md | 2 ++ docs/ST.md | 2 ++ docs/State.md | 2 ++ docs/Transformers.md | 2 ++ docs/Traversals.md | 2 ++ docs/Unsafe.md | 2 ++ docs/index.rst | 3 +-- 8 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 docs/Concurrency.md create mode 100644 docs/Reader.md create mode 100644 docs/ST.md create mode 100644 docs/State.md create mode 100644 docs/Transformers.md create mode 100644 docs/Traversals.md create mode 100644 docs/Unsafe.md diff --git a/docs/Concurrency.md b/docs/Concurrency.md new file mode 100644 index 0000000000..92c552d0eb --- /dev/null +++ b/docs/Concurrency.md @@ -0,0 +1,2 @@ +Concurrency +=========== diff --git a/docs/Reader.md b/docs/Reader.md new file mode 100644 index 0000000000..b8c4c7e81a --- /dev/null +++ b/docs/Reader.md @@ -0,0 +1,2 @@ +Reader +====== diff --git a/docs/ST.md b/docs/ST.md new file mode 100644 index 0000000000..2c23fbea4f --- /dev/null +++ b/docs/ST.md @@ -0,0 +1,2 @@ +ST +== diff --git a/docs/State.md b/docs/State.md new file mode 100644 index 0000000000..b81674eedd --- /dev/null +++ b/docs/State.md @@ -0,0 +1,2 @@ +State +===== diff --git a/docs/Transformers.md b/docs/Transformers.md new file mode 100644 index 0000000000..90200db722 --- /dev/null +++ b/docs/Transformers.md @@ -0,0 +1,2 @@ +Transformers +============ diff --git a/docs/Traversals.md b/docs/Traversals.md new file mode 100644 index 0000000000..31a1c1607b --- /dev/null +++ b/docs/Traversals.md @@ -0,0 +1,2 @@ +Traversals +========== diff --git a/docs/Unsafe.md b/docs/Unsafe.md new file mode 100644 index 0000000000..24da25e38d --- /dev/null +++ b/docs/Unsafe.md @@ -0,0 +1,2 @@ +Unsafe +====== diff --git a/docs/index.rst b/docs/index.rst index b195c67753..b95e877bc1 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -36,7 +36,7 @@ An alternative Prelude. Set Tuple Generics - Hashable + Hashing TypeLevel Unsafe @@ -44,5 +44,4 @@ Indices and tables ================== * :ref:`genindex` -* :ref:`modindex` * :ref:`search` From 5ce97cd0e997dc3a071ab49f49003c693f968ec7 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 15 Dec 2016 15:38:15 +0000 Subject: [PATCH 148/295] expand list processing functions --- docs/List.md | 48 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/docs/List.md b/docs/List.md index ad72c8cf80..d70db3a193 100644 --- a/docs/List.md +++ b/docs/List.md @@ -4,46 +4,62 @@ List Slicing ------- +#### head + ```haskell head :: Foldable f => f a -> Maybe a ``` +#### tailMay + ```haskell tailMay :: [a] -> Maybe [a] ``` +#### tailSafe + ```haskell tailSafe :: [a] -> [a] ``` +#### initMay + ```haskell initMay :: [a] -> Maybe [a] ``` +#### initSafe + ```haskell initSafe :: [a] -> [a] ``` +#### initDef + ```haskell initDef :: [a] -> [a] -> [a] ``` +#### lastMay + ```haskell lastMay :: [a] -> Maybe a ``` +#### lastDef + ```haskell lastDef :: a -> [a] -> a ``` -```haskell -list :: [b] -> (a -> b) -> [a] -> [b] -``` +#### drop ```haskell drop :: Int -> [a] -> [a] ``` +#### take + ```haskell take :: Int -> [a] -> [a] ``` @@ -51,14 +67,20 @@ take :: Int -> [a] -> [a] Unpacking --------- +#### uncons + ```haskell uncons :: [a] -> Maybe (a, [a]) ``` +#### unsnoc + ```haskell unsnoc :: [x] -> Maybe ([x],x) ``` +#### unsnoc + ```haskell list :: [b] -> (a -> b) -> [a] -> [b] ``` @@ -66,6 +88,8 @@ list :: [b] -> (a -> b) -> [a] -> [b] Sorting --------- +#### sortOn + ```haskell sortOn :: Ord o => (a -> o) -> [a] -> [a] ``` @@ -73,6 +97,8 @@ sortOn :: Ord o => (a -> o) -> [a] -> [a] Removing --------- +#### ordNub + ```haskell ordNub :: Ord a => [a] -> [a] ``` @@ -80,14 +106,14 @@ ordNub :: Ord a => [a] -> [a] Splitting --------- -```haskell -splitAt :: Int -> [a] -> ([a], [a]) -``` +#### splitAt ```haskell splitAt :: Int -> [a] -> ([a], [a]) ``` +#### intercalate + ```haskell intercalate :: [a] -> [[a]] -> [a] ``` @@ -95,6 +121,8 @@ intercalate :: [a] -> [[a]] -> [a] Comparison --------- +#### isPrefixOf + ```haskell isPrefixOf :: Eq a => [a] -> [a] -> Bool ``` @@ -102,10 +130,14 @@ isPrefixOf :: Eq a => [a] -> [a] -> Bool Filtering --------- +#### filter + ```haskell filter :: (a -> Bool) -> [a] -> [a] ``` +#### replicate + ```haskell replicate :: Int -> a -> [a] ``` @@ -113,10 +145,14 @@ replicate :: Int -> a -> [a] Indexing -------- +#### atMay + ```haskell atMay :: [a] -> Int -> Maybe a ``` +#### atDef + ```haskell atDef :: a -> [a] -> Int -> a ``` From 33e412b59b4fbcbbd16a58e42c6b897c6cf708aa Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 26 Dec 2016 17:49:43 +0000 Subject: [PATCH 149/295] bump license --- LICENSE | 2 +- README.md | 2 +- docs/List.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LICENSE b/LICENSE index 4c9be4152d..fd522c54cd 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016, Stephen Diehl +Copyright (c) 2016-2017, Stephen Diehl Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/README.md b/README.md index c12b2451a9..128b71c9e5 100644 --- a/README.md +++ b/README.md @@ -161,4 +161,4 @@ License ------- Released under the MIT License. -Copyright (c) 2016, Stephen Diehl +Copyright (c) 2016-2017, Stephen Diehl diff --git a/docs/List.md b/docs/List.md index d70db3a193..7c39f02b29 100644 --- a/docs/List.md +++ b/docs/List.md @@ -79,7 +79,7 @@ uncons :: [a] -> Maybe (a, [a]) unsnoc :: [x] -> Maybe ([x],x) ``` -#### unsnoc +#### list ```haskell list :: [b] -> (a -> b) -> [a] -> [b] From 254dafcb12e9d8867ca6c8f59bf9ae176730727b Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 29 Dec 2016 19:46:57 +0000 Subject: [PATCH 150/295] basic examples --- docs/Exceptions.md | 6 ++++++ docs/Function.md | 39 +++++++++++++++++++++++++++++++++++++++ protolude.cabal | 2 +- 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/docs/Exceptions.md b/docs/Exceptions.md index a5a1f137a8..ec0eae09cd 100644 --- a/docs/Exceptions.md +++ b/docs/Exceptions.md @@ -118,3 +118,9 @@ data FatalError = FatalError {msg :: Text} ```haskell panic :: Text -> a ``` + +Terminate with an uncatchable fatal error. + +```haskell +> panic "Fatal error occured. +``` diff --git a/docs/Function.md b/docs/Function.md index 120377cc65..6685914556 100644 --- a/docs/Function.md +++ b/docs/Function.md @@ -10,32 +10,66 @@ Composition ($) :: (a -> b) -> a -> b ``` +Infix form of function application. Applies a function from ``a → b`` to an +argument ``a``. + *Example*: +```haskell +> take 2 $ [1,2,3] +[1,2] +``` + #### . ```haskell (.) :: (b -> c) -> (a -> b) -> a -> c ``` +Function composition. Composes a function ``f`` (``b → c``) with a function +``g`` (``a → b``) yielding ``f ∘ g``. + *Example*: +```haskell +> map (negate . abs) [-1,0,1] +[-1,0,-1] +``` + #### & ```haskell (&) :: a -> (a -> b) -> b ``` +Flipped form of ``($)`` which applies an argument ``a`` to a function ``a → b``. + *Example*: +```haskell +> [1,2,3] & take 2 +[1,2] + +> replicate 10 3 & take 5 & tail +[3,3,3,3] +``` + #### flip ```haskell flip :: (a -> b -> c) -> b -> a -> c ``` +Flip takes a function of two arguments and returns a function taking the them in +reverse order. + *Example*: +```haskell +λ> flip take [1,2,3] 2 +[1,2] +``` + #### on ```haskell @@ -44,6 +78,11 @@ on :: (b -> b -> c) -> (a -> b) -> a -> a -> c *Example*: +```haskell +> sortBy (compare `on` fst) [(1,2), (3,4), (0,1)] +[(0,1),(1,2),(3,4)] +``` + #### const ```haskell diff --git a/protolude.cabal b/protolude.cabal index 3f84c0de17..c9cc2836f5 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.1.11 +version: 0.2 synopsis: A sensible set of defaults for writing custom Preludes. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude From 6d3940b4e58645fb76844e2511deefd604b5b0b3 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sun, 1 Jan 2017 20:24:32 +0000 Subject: [PATCH 151/295] new difflog --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index dcb35dcdee..baa49d5d13 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ * Switch exported `(<>)` to be from `Data.Monoid` instead of Semigroup. * Expose `putByteString` and `putLByteString` monomorphic versions of `putStrLn` functions * Export `ExceptT`, `ReaderT`, and `StateT` constructors. +* Export `NonEmpty` type and constructor for GHC 8.0. 0.1.9 ==== From d0e81532af11e4842196c23dbb3cf73f4af081b3 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sun, 1 Jan 2017 23:43:43 +0000 Subject: [PATCH 152/295] Use Data.Function (&) if base>4.8, fixes #33 --- src/Protolude.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index c292626f01..45394d1d29 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -10,7 +10,6 @@ module Protolude ( module Base, identity, map, - (&), uncons, unsnoc, applyN, @@ -24,6 +23,9 @@ module Protolude ( guardedA, LText, LByteString, +#if !MIN_VERSION_base(4,8,0) + (&), +#endif ) where import List as X @@ -305,6 +307,9 @@ import Data.Function as X ( , flip , fix , on +#if ( __GLASGOW_HASKELL__ >= 800 ) + , (&) +#endif ) -- Genericss @@ -419,10 +424,13 @@ import Text.Read as X ( type LText = Data.Text.Lazy.Text type LByteString = Data.ByteString.Lazy.ByteString + +#if !MIN_VERSION_base(4,8,0) infixl 1 & (&) :: a -> (a -> b) -> b x & f = f x +#endif identity :: a -> a identity x = x From 51fdf38c71fe1ccb7b9f204138c4d7754740f1d7 Mon Sep 17 00:00:00 2001 From: Ian Jeffries Date: Sun, 1 Jan 2017 18:45:08 -0500 Subject: [PATCH 153/295] Rename `msg` to `fatalErrorMessage`. (#34) This is to free up `msg` as a variable name. --- CHANGES.md | 1 + Symbols.md | 2 +- docs/Exceptions.md | 2 +- src/Panic.hs | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 0c9f7da8ff..807f83eaea 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ * Switch exported `(<>)` to be from `Data.Monoid` instead of Semigroup. * Expose `putByteString` and `putLByteString` monomorphic versions of `putStrLn` functions * Export `genericLength` and other generic list return functions. +* Rename `msg` to `fatalErrorMessage`. * Export `ExceptT`, `ReaderT`, and `StateT` constructors. * Export `NonEmpty` type and constructor for GHC 8.0. diff --git a/Symbols.md b/Symbols.md index 93cf202e98..5c93f7e3a8 100644 --- a/Symbols.md +++ b/Symbols.md @@ -426,6 +426,7 @@ * expt * expts * expts10 +* fatalErrorMessage * filter * filterM * finally @@ -658,7 +659,6 @@ * modifyMVarMasked_ * modifyMVar_ * mplus -* msg * msum * myThreadId * mzero diff --git a/docs/Exceptions.md b/docs/Exceptions.md index ec0eae09cd..e528f94063 100644 --- a/docs/Exceptions.md +++ b/docs/Exceptions.md @@ -110,7 +110,7 @@ Fatal Errors ------------ ```haskell -data FatalError = FatalError {msg :: Text} +data FatalError = FatalError {fatalErrorMessage :: Text} ``` #### panic diff --git a/src/Panic.hs b/src/Panic.hs index 19e994ebf8..6055bc6dc0 100644 --- a/src/Panic.hs +++ b/src/Panic.hs @@ -12,7 +12,7 @@ import Data.Typeable (Typeable) import Control.Exception as X -- | Uncatchable exceptions thrown and never caught. -data FatalError = FatalError { msg :: Text } +data FatalError = FatalError { fatalErrorMessage :: Text } deriving (Show, Typeable) instance Exception FatalError From e836d3f690118517766524469562965b9d69bc8a Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 2 Jan 2017 10:45:28 +0000 Subject: [PATCH 154/295] stack test harness --- .gitignore | 2 +- CHANGES.md | 5 +++- protolude.cabal | 7 +++-- src/Exceptions.hs | 6 ++++ src/Protolude.hs | 71 +++++++++++++++++++++++++++++++++++------------ stack-7.10.yaml | 6 ++++ stack-7.8.yaml | 6 ++++ stack-8.0.yaml | 6 ++++ stack.yaml | 2 +- test_stack_lts.sh | 3 ++ 10 files changed, 90 insertions(+), 24 deletions(-) create mode 100644 stack-7.10.yaml create mode 100644 stack-7.8.yaml create mode 100644 stack-8.0.yaml create mode 100755 test_stack_lts.sh diff --git a/.gitignore b/.gitignore index 65b76a939d..691b3d29cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -*.sw[po] +*.sw[pon] .stack-work dist .cabal-sandbox diff --git a/CHANGES.md b/CHANGES.md index 807f83eaea..30e8d3d974 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,7 +7,10 @@ * Export `genericLength` and other generic list return functions. * Rename `msg` to `fatalErrorMessage`. * Export `ExceptT`, `ReaderT`, and `StateT` constructors. -* Export `NonEmpty` type and constructor for GHC 8.0. +* Mask `displayException` from default exports. +* Mask `stToIO` from default exports. +* Export `NonEmpty` type and constructor for Base 4.9 only. +* Export `Data.Semigroup` type and functions for Base 4.9 only. 0.1.9 ==== diff --git a/protolude.cabal b/protolude.cabal index c9cc2836f5..d67ed6b966 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -69,11 +69,12 @@ library deepseq >= 1.3 && <1.5, containers >= 0.5 && <0.6, hashable >= 1.2 && <1.3, - mtl >= 2.1 && <2.3, - transformers >= 0.4 && <0.6, + transformers >= 0.2 && <0.6, text >= 1.2 && <1.3, stm >= 2.4 && <2.5, - bytestring >= 0.10 && <0.11 + bytestring >= 0.10 && <0.11, + mtl >= 2.1 && <2.3, + mtl-compat >= 0.2 && <0.3 if impl(ghc >= 7.8.0) build-depends: diff --git a/src/Exceptions.hs b/src/Exceptions.hs index ec629e2f0d..f8c0adbf78 100644 --- a/src/Exceptions.hs +++ b/src/Exceptions.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} @@ -21,8 +22,13 @@ hush :: Alternative m => Either e a -> m a hush (Left _) = empty hush (Right x) = pure x +#if ( __GLASGOW_HASKELL__ >= 800 ) +note :: (MonadError e m) => e -> Maybe a -> m a +note err = maybe (throwError err) pure +#else note :: (MonadError e m, Applicative m) => e -> Maybe a -> m a note err = maybe (throwError err) pure +#endif tryIO :: MonadIO m => IO a -> ExceptT IOException m a tryIO = ExceptT . liftIO . Exception.try diff --git a/src/Protolude.hs b/src/Protolude.hs index 45394d1d29..af1efebf90 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -28,6 +28,7 @@ module Protolude ( #endif ) where +-- Protolude module exports. import List as X import Show as X import Bool as X @@ -39,6 +40,7 @@ import Applicative as X import Conv as X import Panic as X import Exceptions as X +import Semiring as X import Base as Base hiding ( putStr -- Overriden by Show.putStr @@ -100,11 +102,9 @@ import Data.Foldable as X hiding ( , product , sum ) -import Semiring as X import Data.Functor.Identity as X -#if ( __GLASGOW_HASKELL__ >= 800 ) -import Data.Monoid as X +#if MIN_VERSION_base(4,9,0) import Data.List.NonEmpty as X ( NonEmpty(..) , nonEmpty @@ -121,14 +121,14 @@ import Data.Semigroup as X ( , stimesIdempotentMonoid , mtimesDefault ) -#else -import Data.Monoid as X #endif -#if (__GLASGOW_HASKELL__ >= 710) -import Data.Bifunctor as X (Bifunctor(..)) -#else +import Data.Monoid as X + +#if !MIN_VERSION_base(4,8,0) import Bifunctor as X (Bifunctor(..)) +#else +import Data.Bifunctor as X (Bifunctor(..)) #endif -- Deepseq @@ -140,7 +140,14 @@ import Control.DeepSeq as X ( ) -- Data structures -import Data.Tuple as X +import Data.Tuple as X ( + fst + , snd + , curry + , uncurry + , swap + ) + import Data.List as X ( splitAt , break @@ -191,7 +198,7 @@ import Data.Sequence as X (Seq) import Data.IntMap as X (IntMap) import Data.IntSet as X (IntSet) -#if ( __GLASGOW_HASKELL__ >= 710 ) +#if !MIN_VERSION_base(4,7,0) import Data.Proxy as X ( Proxy(..) ) @@ -287,15 +294,32 @@ import Data.Word as X ( , Word32 , Word64 , Word8 -#if (__GLASGOW_HASKELL__ >= 710) , byteSwap16 , byteSwap32 , byteSwap64 -#endif ) -import Data.Either as X -import Data.Complex as X +import Data.Either as X ( + Either(..) + , either + , lefts + , rights + , isLeft + , isRight + , partitionEithers + ) + +import Data.Complex as X ( + Complex(..) + , realPart + , imagPart + , mkPolar + , cis + , polar + , magnitude + , phase + , conjugate + ) import Data.Char as X (chr) import Data.Bool as X hiding (bool) import Data.Maybe as X hiding (fromJust) @@ -307,7 +331,7 @@ import Data.Function as X ( , flip , fix , on -#if ( __GLASGOW_HASKELL__ >= 800 ) +#if MIN_VERSION_base(4,8,0) , (&) #endif ) @@ -375,8 +399,16 @@ import Data.Text.Encoding.Error as X ( ) -- IO -import System.Exit as X import System.Environment as X (getArgs) +import System.Exit as X ( + ExitCode(..) + , exitWith + , exitFailure + , exitSuccess +#if MIN_VERSION_base(4,8,0) + , die +#endif + ) import System.IO as X ( Handle , FilePath @@ -389,7 +421,11 @@ import System.IO as X ( ) -- ST -import Control.Monad.ST as X +import Control.Monad.ST as X ( + ST + , runST + , fixST + ) -- Concurrency and Parallelism import Control.Exception as X hiding ( @@ -397,7 +433,6 @@ import Control.Exception as X hiding ( , throwIO , throwTo , assert - , displayException , Handler(..) ) diff --git a/stack-7.10.yaml b/stack-7.10.yaml new file mode 100644 index 0000000000..3369f29906 --- /dev/null +++ b/stack-7.10.yaml @@ -0,0 +1,6 @@ +resolver: lts-6.24 +packages: +- '.' +extra-deps: +flags: {} +extra-package-dbs: [] diff --git a/stack-7.8.yaml b/stack-7.8.yaml new file mode 100644 index 0000000000..b3ab0af8d0 --- /dev/null +++ b/stack-7.8.yaml @@ -0,0 +1,6 @@ +resolver: lts-2.22 +packages: +- '.' +extra-deps: +flags: {} +extra-package-dbs: [] diff --git a/stack-8.0.yaml b/stack-8.0.yaml new file mode 100644 index 0000000000..86c184384f --- /dev/null +++ b/stack-8.0.yaml @@ -0,0 +1,6 @@ +resolver: lts-7.8 +packages: +- '.' +extra-deps: +flags: {} +extra-package-dbs: [] diff --git a/stack.yaml b/stack.yaml index bb517b9f04..3be2e7d0e6 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-6.2 +resolver: lts-7.14 packages: - '.' extra-deps: diff --git a/test_stack_lts.sh b/test_stack_lts.sh new file mode 100755 index 0000000000..bef4931b31 --- /dev/null +++ b/test_stack_lts.sh @@ -0,0 +1,3 @@ +STACK_YAML=stack-7.8.yaml stack build +STACK_YAML=stack-7.10.yaml stack build +STACK_YAML=stack-8.0.yaml stack build From e452604224888ba8a1fe923fe13fafb43c6ac29d Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 2 Jan 2017 10:53:01 +0000 Subject: [PATCH 155/295] Fix Void and Proxy under GHC 7.6 --- src/Protolude.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index af1efebf90..bc8500f9fe 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -198,7 +198,7 @@ import Data.Sequence as X (Seq) import Data.IntMap as X (IntMap) import Data.IntSet as X (IntSet) -#if !MIN_VERSION_base(4,7,0) +#if MIN_VERSION_base(4,7,0) import Data.Proxy as X ( Proxy(..) ) @@ -226,6 +226,9 @@ import Data.Type.Equality as X ( , gcastWith ) +#endif + +#if MIN_VERSION_base(4,8,0) import Data.Void as X ( Void , absurd From 070ac54067e0ce4249d21d851b4814032f78ff91 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 2 Jan 2017 10:59:05 +0000 Subject: [PATCH 156/295] Fix byteswap functions under GHC 7.6 --- src/Protolude.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index bc8500f9fe..edb4dc0eed 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -297,9 +297,11 @@ import Data.Word as X ( , Word32 , Word64 , Word8 +#if MIN_VERSION_base(4,7,0) , byteSwap16 , byteSwap32 , byteSwap64 +#endif ) import Data.Either as X ( @@ -307,9 +309,11 @@ import Data.Either as X ( , either , lefts , rights + , partitionEithers +#if MIN_VERSION_base(4,7,0) , isLeft , isRight - , partitionEithers +#endif ) import Data.Complex as X ( From 03f5746e96adba10fedbf87fffd87c8b8ea74fed Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 2 Jan 2017 11:46:11 +0000 Subject: [PATCH 157/295] Rework implicit exports to be explicit. --- README.md | 2 +- src/List.hs | 4 +-- src/Protolude.hs | 69 ++++++++++++++++++++++++++++++++++++++++++----- test_stack_lts.sh | 6 ++--- 4 files changed, 68 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 128b71c9e5..f1bf4e06b6 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ tracks Stack LTS resolver. | Dependencies | Lower | Upper | | ----------- | -------- | -------- | -| array | | 0.5 | +| array | 0.4 | 0.5 | | async | 2.0 | 2.2 | | base | 4.6 | 4.10 | | bytestring | 0.10 | 0.11 | diff --git a/src/List.hs b/src/List.hs index 9c22f1785e..635236e8f0 100644 --- a/src/List.hs +++ b/src/List.hs @@ -16,12 +16,12 @@ import Data.Ord (Ord, comparing) import Data.Foldable (Foldable, foldr, foldl') import Data.Function ((.)) import Data.Functor (fmap) -import Control.Monad (return) +import Control.Applicative (pure) import qualified Data.Set as Set import GHC.Num (Num, (+), (*)) head :: (Foldable f) => f a -> Maybe a -head = foldr (\x _ -> return x) Nothing +head = foldr (\x _ -> pure x) Nothing sortOn :: (Ord o) => (a -> o) -> [a] -> [a] sortOn = sortBy . comparing diff --git a/src/Protolude.hs b/src/Protolude.hs index edb4dc0eed..ecd2b4c5a9 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -93,8 +93,15 @@ import Control.Applicative as X ( ) -- Base typeclasses -import Data.Eq as X -import Data.Ord as X +import Data.Eq as X ( + Eq(..) + ) +import Data.Ord as X ( + Ord(..) + , Ordering(..) + , Down(..) + , comparing + ) import Data.Traversable as X import Data.Foldable as X hiding ( foldr1 @@ -102,7 +109,9 @@ import Data.Foldable as X hiding ( , product , sum ) -import Data.Functor.Identity as X +import Data.Functor.Identity as X ( + Identity(..) + ) #if MIN_VERSION_base(4,9,0) import Data.List.NonEmpty as X ( @@ -286,17 +295,23 @@ import Control.Monad.Trans as X ( ) -- Base types -import Data.Int as X +import Data.Int as X ( + Int + , Int8 + , Int16 + , Int32 + , Int64 + ) import Data.Bits as X hiding ( unsafeShiftL , unsafeShiftR ) import Data.Word as X ( Word + , Word8 , Word16 , Word32 , Word64 - , Word8 #if MIN_VERSION_base(4,7,0) , byteSwap16 , byteSwap32 @@ -445,12 +460,52 @@ import Control.Exception as X hiding ( import qualified Control.Exception -import Control.Monad.STM as X +import Control.Monad.STM as X ( + STM + , atomically + , always + , alwaysSucceeds + , retry + , orElse + , check + , throwSTM + , catchSTM + ) import Control.Concurrent as X hiding ( throwTo , yield ) -import Control.Concurrent.Async as X +import Control.Concurrent.Async as X ( + Async(..) + , Concurrently(..) + , async + , asyncBound + , asyncOn + , withAsync + , withAsyncBound + , withAsyncOn + , wait + , poll + , waitCatch + , cancel + , cancelWith + , asyncThreadId + , waitAny + , waitAnyCatch + , waitAnyCancel + , waitAnyCatchCancel + , waitEither + , waitEitherCatch + , waitEitherCancel + , waitEitherCatchCancel + , waitEither_ + , waitBoth + , link + , link2 + , race + , race_ + , concurrently + ) import Foreign.Storable as X (Storable) diff --git a/test_stack_lts.sh b/test_stack_lts.sh index bef4931b31..f439f47fa0 100755 --- a/test_stack_lts.sh +++ b/test_stack_lts.sh @@ -1,3 +1,3 @@ -STACK_YAML=stack-7.8.yaml stack build -STACK_YAML=stack-7.10.yaml stack build -STACK_YAML=stack-8.0.yaml stack build +STACK_YAML=stack-7.8.yaml stack build --no-terminal +STACK_YAML=stack-7.10.yaml stack build --no-terminal +STACK_YAML=stack-8.0.yaml stack build --no-terminal From 3994639b2b442f9ee2b0d3a197c5e2ecb579d3b7 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 2 Jan 2017 12:06:37 +0000 Subject: [PATCH 158/295] Mask supporting modules --- CHANGES.md | 1 + protolude.cabal | 9 +++++---- src/Exceptions.hs | 1 + src/Functor.hs | 2 +- src/Monad.hs | 7 ++----- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 30e8d3d974..bc0edbcb00 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,7 @@ * Mask `stToIO` from default exports. * Export `NonEmpty` type and constructor for Base 4.9 only. * Export `Data.Semigroup` type and functions for Base 4.9 only. +* Restrict exported symbols from ``async`` to set available in 2.0. 0.1.9 ==== diff --git a/protolude.cabal b/protolude.cabal index d67ed6b966..42e3e23e5c 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -7,7 +7,7 @@ license: MIT license-file: LICENSE author: Stephen Diehl maintainer: stephen.m.diehl@gmail.com -copyright: 2016 Stephen Diehl +copyright: 2016-2017 Stephen Diehl category: Prelude build-type: Simple cabal-version: >=1.10 @@ -34,6 +34,9 @@ Source-Repository head library exposed-modules: Protolude + + other-modules: + Exceptions Unsafe Base Applicative @@ -47,11 +50,8 @@ library Functor Semiring Bifunctor - Exceptions Panic - other-modules: - default-extensions: NoImplicitPrelude OverloadedStrings @@ -64,6 +64,7 @@ library build-depends: base >= 4.6 && <4.10, + array >= 0.4 && <0.6, ghc-prim >= 0.3 && <0.6, async >= 2.0 && <2.2, deepseq >= 1.3 && <1.5, diff --git a/src/Exceptions.hs b/src/Exceptions.hs index f8c0adbf78..801b2aafce 100644 --- a/src/Exceptions.hs +++ b/src/Exceptions.hs @@ -22,6 +22,7 @@ hush :: Alternative m => Either e a -> m a hush (Left _) = empty hush (Right x) = pure x +-- To suppress redundenet applicative constraint warning on GHC 8.0 #if ( __GLASGOW_HASKELL__ >= 800 ) note :: (MonadError e m) => e -> Maybe a -> m a note err = maybe (throwError err) pure diff --git a/src/Functor.hs b/src/Functor.hs index 7d0a31d9f9..ebc35030d1 100644 --- a/src/Functor.hs +++ b/src/Functor.hs @@ -12,7 +12,7 @@ module Functor ( import Data.Function ((.)) -#if (__GLASGOW_HASKELL__ >= 710) +#if MIN_VERSION_base(4,7,0) import Data.Functor ( Functor(..) , ($>) diff --git a/src/Monad.hs b/src/Monad.hs index 1d9cdda030..139bacb74c 100644 --- a/src/Monad.hs +++ b/src/Monad.hs @@ -42,12 +42,7 @@ module Monad ( import Base (seq) import Data.List (concat) - -#if (__GLASGOW_HASKELL__ >= 710) -import Control.Monad hiding ((<$!>)) -#else import Control.Monad -#endif concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b] concatMapM f xs = liftM concat (mapM f xs) @@ -64,9 +59,11 @@ liftM2' f a b = do z `seq` return z {-# INLINE liftM2' #-} +#if !MIN_VERSION_base(4,8,0) (<$!>) :: Monad m => (a -> b) -> m a -> m b f <$!> m = do x <- m let z = f x z `seq` return z {-# INLINE (<$!>) #-} +#endif From 39d56792ced9105e3019841f090bd55f3c12b19f Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 2 Jan 2017 13:28:21 +0000 Subject: [PATCH 159/295] Fix up PBase exports, expose Generics metadata --- src/Base.hs | 30 ++++++++++++++++++++++++++---- src/Protolude.hs | 5 +++++ 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/Base.hs b/src/Base.hs index 4351c62bae..3457359fa6 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -13,10 +13,24 @@ module Base ( #if defined(__GLASGOW_HASKELL__) && ( __GLASGOW_HASKELL__ >= 600 ) -- Base GHC types -import GHC.Num as X -import GHC.Enum as X +import GHC.Num as X ( + Num(..) + , Integer + , subtract + ) +import GHC.Enum as X ( + Bounded(..) + , Enum(..) + , boundedEnumFrom + , boundedEnumFromThen + ) import GHC.Real as X -import GHC.Float as X +import GHC.Float as X ( + Float(..) + , Double(..) + , showFloat + , showSignedFloat + ) import GHC.Err as X ( undefined , error @@ -37,6 +51,8 @@ import GHC.Base as X ( , maxInt , minInt ) + +-- Exported for lifting into new functions. import System.IO as X ( print , putStr @@ -55,6 +71,10 @@ import GHC.Types as X ( #endif ) +#if ( __GLASGOW_HASKELL__ >= 710 ) +import GHC.StaticPtr as X (StaticPtr) +#endif + #if ( __GLASGOW_HASKELL__ >= 800 ) import GHC.OverloadedLabels as X ( IsLabel(..) @@ -69,12 +89,13 @@ import GHC.ExecutionStack as X ( import GHC.Stack as X ( CallStack - , HasCallStack + , type HasCallStack , callStack , prettySrcLoc , currentCallStack , getCallStack , prettyCallStack + , withFrozenCallStack ) {- @@ -105,6 +126,7 @@ import Data.Kind as X ( ) #endif +-- Default Prelude defines this at the toplevel module, so we do as well. infixr 0 $! ($!) :: (a -> b) -> a -> b diff --git a/src/Protolude.hs b/src/Protolude.hs index ecd2b4c5a9..0082714783 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -372,12 +372,17 @@ import GHC.Generics as X ( , S1 , (:+:) , (:*:) + , (:.:) , Rec0 , Constructor(..) + , Datatype(..) , Selector(..) , Fixity(..) + , Associativity(..) #if ( __GLASGOW_HASKELL__ >= 800 ) , Meta(..) + , FixityI(..) + , URec #endif ) From e72d06929e46732116614ce2a3d0c6c113edae9c Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 3 Jan 2017 14:13:25 +0000 Subject: [PATCH 160/295] Hold off on exporting TypeInType machinery --- src/Base.hs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/Base.hs b/src/Base.hs index 3457359fa6..971ebd1144 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -1,8 +1,8 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE Unsafe #-} {-# LANGUAGE BangPatterns #-} -{-# LANGUAGE ExplicitNamespaces #-} {-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE ExplicitNamespaces #-} module Base ( module X, @@ -98,12 +98,6 @@ import GHC.Stack as X ( , withFrozenCallStack ) -{- -import GHC.Records as X ( - HasField(..) - ) --} - #if ( __GLASGOW_HASKELL__ >= 710 ) import GHC.TypeLits as X ( Symbol, @@ -120,10 +114,19 @@ import GHC.TypeLits as X ( ) #endif +-- Pending GHC 8.2 we'll expose these. + +{- +import GHC.Records as X ( + HasField(..) + ) + import Data.Kind as X ( type (*) , type Type ) +-} + #endif -- Default Prelude defines this at the toplevel module, so we do as well. From 531a07ccfcf24465c835396d163c415c6fe46ddd Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 3 Jan 2017 15:50:05 +0000 Subject: [PATCH 161/295] test all stack resolvers --- all_stack.sh | 22 ++++++++++++++++++++++ test_stack_lts.sh | 2 ++ 2 files changed, 24 insertions(+) create mode 100755 all_stack.sh diff --git a/all_stack.sh b/all_stack.sh new file mode 100755 index 0000000000..71792aafeb --- /dev/null +++ b/all_stack.sh @@ -0,0 +1,22 @@ +set +e + +stack build --resolver lts-2.0 +stack build --resolver lts-3.0 +stack build --resolver lts-4.0 +stack build --resolver lts-5.0 +stack build --resolver lts-6.0 +stack build --resolver lts-7.0 +stack build --resolver lts-7.1 +stack build --resolver lts-7.2 +stack build --resolver lts-7.3 +stack build --resolver lts-7.4 +stack build --resolver lts-7.5 +stack build --resolver lts-7.6 +stack build --resolver lts-7.7 +stack build --resolver lts-7.8 +stack build --resolver lts-7.9 +stack build --resolver lts-7.10 +stack build --resolver lts-7.11 +stack build --resolver lts-7.12 +stack build --resolver lts-7.13 +stack build --resolver lts-7.14 diff --git a/test_stack_lts.sh b/test_stack_lts.sh index f439f47fa0..757ed678d2 100755 --- a/test_stack_lts.sh +++ b/test_stack_lts.sh @@ -1,3 +1,5 @@ +set +e + STACK_YAML=stack-7.8.yaml stack build --no-terminal STACK_YAML=stack-7.10.yaml stack build --no-terminal STACK_YAML=stack-8.0.yaml stack build --no-terminal From 12cd9fae467031990efceec5c3d76d902f76852a Mon Sep 17 00:00:00 2001 From: Carl Baatz Date: Fri, 13 Jan 2017 08:26:34 +0100 Subject: [PATCH 162/295] String is not exported. (#36) --- Symbols.md | 1 - 1 file changed, 1 deletion(-) diff --git a/Symbols.md b/Symbols.md index 5c93f7e3a8..981aa8dbac 100644 --- a/Symbols.md +++ b/Symbols.md @@ -239,7 +239,6 @@ * StateT * Storable * Strict -* String * StringConv * Sum * Sum From f9b5a5cbf417302c26e8174faa5eb78da5fd1b50 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 21 Jan 2017 14:52:41 +0000 Subject: [PATCH 163/295] export Floating --- all_stack.sh | 2 ++ src/Base.hs | 1 + 2 files changed, 3 insertions(+) diff --git a/all_stack.sh b/all_stack.sh index 71792aafeb..f906b12ed3 100755 --- a/all_stack.sh +++ b/all_stack.sh @@ -20,3 +20,5 @@ stack build --resolver lts-7.11 stack build --resolver lts-7.12 stack build --resolver lts-7.13 stack build --resolver lts-7.14 +stack build --resolver lts-7.15 +stack build --resolver lts-7.16 diff --git a/src/Base.hs b/src/Base.hs index 971ebd1144..4cbb404a6f 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -28,6 +28,7 @@ import GHC.Real as X import GHC.Float as X ( Float(..) , Double(..) + , Floating (..) , showFloat , showSignedFloat ) From fd3d667cdece07cc2c3b44fabc5a86bee9e57716 Mon Sep 17 00:00:00 2001 From: Alexander Kjeldaas Date: Tue, 7 Feb 2017 15:12:47 +0100 Subject: [PATCH 164/295] Typo? (#37) --- src/Debug.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Debug.hs b/src/Debug.hs index 647549b117..5e62b884d1 100644 --- a/src/Debug.hs +++ b/src/Debug.hs @@ -54,7 +54,7 @@ traceShowM a = trace (P.show a) (return ()) traceM :: (Monad m) => Text -> m () traceM s = trace (unpack s) (return ()) -{-# WARNING traceId "'traceM' remains in code" #-} +{-# WARNING traceId "'traceId' remains in code" #-} traceId :: Text -> Text traceId s = trace s s From 6ac3e01da0206b26eca0023fdae5d70e1d089c5a Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 11 Feb 2017 13:47:15 +0000 Subject: [PATCH 165/295] fix safe bounds for breakage on GHC 7.0.1 build --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index 42e3e23e5c..5dc3e10073 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -79,7 +79,7 @@ library if impl(ghc >= 7.8.0) build-depends: - safe >= 0.3 && <0.4 + safe >= 0.3 && <0.3.12 else build-depends: safe >= 0.3 && <0.3.10 From 0ab61665eea9e1ac907b6d446d2780f841c33fba Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 11 Feb 2017 14:52:56 +0000 Subject: [PATCH 166/295] liftIO1 and liftIO2 for issue #38 --- src/Protolude.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Protolude.hs b/src/Protolude.hs index 0082714783..91a3046807 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -23,6 +23,8 @@ module Protolude ( guardedA, LText, LByteString, + liftIO1, + liftIO2, #if !MIN_VERSION_base(4,8,0) (&), #endif @@ -566,6 +568,7 @@ throwTo tid e = liftIO (Control.Exception.throwTo tid e) foreach :: Functor f => f a -> (a -> b) -> f b foreach = flip fmap +-- | Do nothing returning unit inside applicative. pass :: Applicative f => f () pass = pure () @@ -575,6 +578,14 @@ guarded p x = X.bool empty (pure x) (p x) guardedA :: (Functor f, Alternative t) => (a -> f Bool) -> a -> f (t a) guardedA p x = X.bool empty (pure x) <$> p x +-- | Lift an 'IO' operation with 1 argument into another monad +liftIO1 :: MonadIO m => (a -> IO b) -> a -> m b +liftIO1 = (.) liftIO + +-- | Lift an 'IO' operation with 2 arguments into another monad +liftIO2 :: MonadIO m => (a -> b -> IO c) -> a -> b -> m c +liftIO2 = ((.).(.)) liftIO + show :: (Show a, StringConv String b) => a -> b show x = toS (PBase.show x) {-# SPECIALIZE show :: Show a => a -> Text #-} From 721374d42cd97f81b2a58952df682bce7d0cc000 Mon Sep 17 00:00:00 2001 From: Pi3r Date: Tue, 28 Feb 2017 15:59:05 +0100 Subject: [PATCH 167/295] Add (<&&>),(<||>) (#40) --- src/Bool.hs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Bool.hs b/src/Bool.hs index 6dbe285b86..be62578e1a 100644 --- a/src/Bool.hs +++ b/src/Bool.hs @@ -7,10 +7,13 @@ module Bool ( , ifM , guardM , bool +, (<&&>) +, (<||>) ) where -import Data.Bool (Bool) +import Data.Bool (Bool, (&&), (||)) import Data.Function (flip) +import Control.Applicative(Applicative, liftA2) import Control.Monad (Monad, MonadPlus, when, unless, guard, (>>=), (=<<)) bool :: a -> a -> Bool -> a @@ -29,3 +32,15 @@ ifM p x y = p >>= \b -> if b then x else y guardM :: MonadPlus m => m Bool -> m () guardM f = guard =<< f + +infixr 3 <&&> -- same as (&&) +-- | '&&' lifted to an Applicative. +(<&&>) :: Applicative a => a Bool -> a Bool -> a Bool +(<&&>) = liftA2 (&&) +{-# INLINE (<&&>) #-} + +infixr 2 <||> -- same as (||) +-- | '||' lifted to an Applicative. +(<||>) :: Applicative a => a Bool -> a Bool -> a Bool +(<||>) = liftA2 (||) +{-# INLINE (<||>) #-} From 79bbc2de6ee74bf6d7361c596d04469286331960 Mon Sep 17 00:00:00 2001 From: Pi3r Date: Sun, 5 Mar 2017 15:05:05 +0100 Subject: [PATCH 168/295] Add short-circuiting version of '<||>' and '<&&>' (#41) --- src/Bool.hs | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/src/Bool.hs b/src/Bool.hs index be62578e1a..930e121f26 100644 --- a/src/Bool.hs +++ b/src/Bool.hs @@ -7,14 +7,16 @@ module Bool ( , ifM , guardM , bool +, (&&^) +, (||^) , (<&&>) , (<||>) ) where -import Data.Bool (Bool, (&&), (||)) +import Data.Bool (Bool(..), (&&), (||)) import Data.Function (flip) import Control.Applicative(Applicative, liftA2) -import Control.Monad (Monad, MonadPlus, when, unless, guard, (>>=), (=<<)) +import Control.Monad (Monad, MonadPlus, return, when, unless, guard, (>>=), (=<<)) bool :: a -> a -> Bool -> a bool f t p = if p then t else f @@ -33,14 +35,30 @@ ifM p x y = p >>= \b -> if b then x else y guardM :: MonadPlus m => m Bool -> m () guardM f = guard =<< f -infixr 3 <&&> -- same as (&&) --- | '&&' lifted to an Applicative. -(<&&>) :: Applicative a => a Bool -> a Bool -> a Bool -(<&&>) = liftA2 (&&) -{-# INLINE (<&&>) #-} +-- | The '||' operator lifted to a monad. If the first +-- argument evaluates to 'True' the second argument will not +-- be evaluated. +infixr 2 ||^ -- same as (||) +(||^) :: Monad m => m Bool -> m Bool -> m Bool +(||^) a b = ifM a (return True) b -infixr 2 <||> -- same as (||) +infixr 2 <||> -- | '||' lifted to an Applicative. +-- Unlike '||^' the operator is __not__ short-circuiting. (<||>) :: Applicative a => a Bool -> a Bool -> a Bool (<||>) = liftA2 (||) {-# INLINE (<||>) #-} + +-- | The '&&' operator lifted to a monad. If the first +-- argument evaluates to 'False' the second argument will not +-- be evaluated. +infixr 3 &&^ -- same as (&&) +(&&^) :: Monad m => m Bool -> m Bool -> m Bool +(&&^) a b = ifM a b (return False) + +infixr 3 <&&> +-- | '&&' lifted to an Applicative. +-- Unlike '&&^' the operator is __not__ short-circuiting. +(<&&>) :: Applicative a => a Bool -> a Bool -> a Bool +(<&&>) = liftA2 (&&) +{-# INLINE (<&&>) #-} From a324e26d5423fb6e21d772cfb00f9774ae189093 Mon Sep 17 00:00:00 2001 From: Pi3r Date: Thu, 9 Mar 2017 23:47:29 +0100 Subject: [PATCH 169/295] Update `safe` upper bound for ghc >=7.8.0 (#43) --- protolude.cabal | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/protolude.cabal b/protolude.cabal index 5dc3e10073..2d38447b35 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -78,10 +78,10 @@ library mtl-compat >= 0.2 && <0.3 if impl(ghc >= 7.8.0) - build-depends: - safe >= 0.3 && <0.3.12 + build-depends: + safe >= 0.3 && <0.3.15 else - build-depends: + build-depends: safe >= 0.3 && <0.3.10 hs-source-dirs: src From 92905843a463d42a21688b06d54a2b7578d87ff5 Mon Sep 17 00:00:00 2001 From: Pi3r Date: Thu, 9 Mar 2017 23:48:04 +0100 Subject: [PATCH 170/295] Update CHANGES (#42) --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index bc0edbcb00..e35c6e98b0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,7 @@ * Export `NonEmpty` type and constructor for Base 4.9 only. * Export `Data.Semigroup` type and functions for Base 4.9 only. * Restrict exported symbols from ``async`` to set available in 2.0. +* Add `(&&^)`, `(||^)`, `(<&&>)`, `(<||>)` 0.1.9 ==== From 5866877d3fa702b73e6de1931486eac917d568e1 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 11 Mar 2017 09:54:17 +0000 Subject: [PATCH 171/295] reformat base exports of typelits --- src/Base.hs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Base.hs b/src/Base.hs index 4cbb404a6f..207d70c67f 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -101,17 +101,17 @@ import GHC.Stack as X ( #if ( __GLASGOW_HASKELL__ >= 710 ) import GHC.TypeLits as X ( - Symbol, - SomeSymbol(..), - Nat, - SomeNat(..), - CmpNat, - KnownSymbol, - KnownNat, - natVal, - someNatVal, - symbolVal, - someSymbolVal + Symbol + , SomeSymbol(..) + , Nat + , SomeNat(..) + , CmpNat + , KnownSymbol + , KnownNat + , natVal + , someNatVal + , symbolVal + , someSymbolVal ) #endif From 8ad2522cda1d5af4ea59fe7386df75974ef19a24 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 11 Mar 2017 09:59:58 +0000 Subject: [PATCH 172/295] add strictness functions documentation --- docs/Strings.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/Strings.md b/docs/Strings.md index 17f86d104c..080604f08f 100644 --- a/docs/Strings.md +++ b/docs/Strings.md @@ -57,6 +57,29 @@ decodeUtf8' :: ByteString -> Either UnicodeException Text decodeUtf8With :: OnDecodeError -> ByteString -> Text ``` +#### UnicodeException + +```haskell +data UnicodeException + = DecodeError [Char] (Maybe Word8) + | EncodeError [Char] (Maybe Char) +``` + +Strictness +---------- + +#### fromStrict + +```haskell +fromStrict :: Text -> LText +``` + +#### toStrict + +```haskell +toStrict :: LText -> Text +``` + Conversion ---------- @@ -67,10 +90,14 @@ class StringConv a b where data Leniency = Lenient | Strict ``` +#### toS + ```haskell toS :: StringConv a b => a -> b ``` +#### toSL + ```haskell toSL :: StringConv a b => a -> b ``` From ca5087201b7a2c9c082a4c332b054d3b032a07d1 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sun, 12 Mar 2017 15:54:30 +0000 Subject: [PATCH 173/295] adds unzip, fixes issue #45 --- src/Protolude.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Protolude.hs b/src/Protolude.hs index 91a3046807..dc8be4b3d0 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -188,6 +188,7 @@ import Data.List as X ( , tails , zipWith , zip + , unzip , genericLength , genericTake , genericDrop From 89d4a49c7eb089ed16892855b927037ecbb6110f Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 17 Mar 2017 13:07:24 +0000 Subject: [PATCH 174/295] export constructors for GHC.Generics sum/product --- all_stack.sh | 6 ++++++ src/Protolude.hs | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/all_stack.sh b/all_stack.sh index f906b12ed3..413d7e2aa1 100755 --- a/all_stack.sh +++ b/all_stack.sh @@ -22,3 +22,9 @@ stack build --resolver lts-7.13 stack build --resolver lts-7.14 stack build --resolver lts-7.15 stack build --resolver lts-7.16 +stack build --resolver lts-8.0 +stack build --resolver lts-8.1 +stack build --resolver lts-8.2 +stack build --resolver lts-8.3 +stack build --resolver lts-8.4 +stack build --resolver lts-8.5 diff --git a/src/Protolude.hs b/src/Protolude.hs index dc8be4b3d0..938b9ff2ff 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -373,9 +373,9 @@ import GHC.Generics as X ( , D1 , C1 , S1 - , (:+:) - , (:*:) - , (:.:) + , (:+:)(..) + , (:*:)(..) + , (:.:)(..) , Rec0 , Constructor(..) , Datatype(..) From 8b9197ff01ee3e910f9bd9d4ebd413b3fa9d6ba4 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 17 Mar 2017 13:09:12 +0000 Subject: [PATCH 175/295] ghc 8.0.2 supported --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f1bf4e06b6..a6bcbd8ba9 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ Supports: * GHC 7.10.2 * GHC 7.10.3 * GHC 8.0.1 + * GHC 8.0.2 * GHC HEAD Usage From 41710698eedc66fb0bfc5623d3c3a672421fbab5 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 24 Mar 2017 10:14:49 +0000 Subject: [PATCH 176/295] note about unzip exposure --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index e35c6e98b0..dfbc7cfea4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,6 +13,7 @@ * Export `Data.Semigroup` type and functions for Base 4.9 only. * Restrict exported symbols from ``async`` to set available in 2.0. * Add `(&&^)`, `(||^)`, `(<&&>)`, `(<||>)` +* Expose `unzip`. 0.1.9 ==== From 307ecd7d6ae04804536f7843dcc369c19c772bf7 Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Wed, 3 May 2017 11:01:19 +0200 Subject: [PATCH 177/295] Add hPutStr and hPutStrLn (#52) --- Symbols.md | 2 ++ src/Show.hs | 27 +++++++++++++++++---------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/Symbols.md b/Symbols.md index 981aa8dbac..28620fe6eb 100644 --- a/Symbols.md +++ b/Symbols.md @@ -525,6 +525,8 @@ * head * headDef * headMay +* hPutStr +* hPutStrLn * identity * ifM * imagPart diff --git a/src/Show.hs b/src/Show.hs index 94dc2cb181..4b3bdd1927 100644 --- a/src/Show.hs +++ b/src/Show.hs @@ -14,6 +14,7 @@ module Show ( ) where import qualified Base +import qualified System.IO as Base import Data.Function ((.)) import Control.Monad.IO.Class (MonadIO, liftIO) @@ -26,30 +27,36 @@ import qualified Data.Text.IO as T import qualified Data.Text.Lazy as TL import qualified Data.Text.Lazy.IO as TL +import System.IO (Handle, stdout) + class Print a where + hPutStr :: MonadIO m => Handle -> a -> m () putStr :: MonadIO m => a -> m () + putStr = hPutStr stdout + hPutStrLn :: MonadIO m => Handle -> a -> m () putStrLn :: MonadIO m => a -> m () + putStrLn = hPutStrLn stdout instance Print T.Text where - putStr = liftIO . T.putStr - putStrLn = liftIO . T.putStrLn + hPutStr = \h -> liftIO . T.hPutStr h + hPutStrLn = \h -> liftIO . T.hPutStrLn h instance Print TL.Text where - putStr = liftIO . TL.putStr - putStrLn = liftIO . TL.putStrLn + hPutStr = \h -> liftIO . TL.hPutStr h + hPutStrLn = \h -> liftIO . TL.hPutStrLn h instance Print BS.ByteString where - putStr = liftIO . BS.putStr - putStrLn = liftIO . BS.putStrLn + hPutStr = \h -> liftIO . BS.hPutStr h + hPutStrLn = \h -> liftIO . BS.hPutStrLn h instance Print BL.ByteString where - putStr = liftIO . BL.putStr - putStrLn = liftIO . BL.putStrLn + hPutStr = \h -> liftIO . BL.hPutStr h + hPutStrLn = \h -> liftIO . BL.hPutStrLn h instance Print [Base.Char] where - putStr = liftIO . Base.putStr - putStrLn = liftIO . Base.putStrLn + hPutStr = \h -> liftIO . Base.hPutStr h + hPutStrLn = \h -> liftIO . Base.hPutStrLn h -- For forcing type inference putText :: MonadIO m => T.Text -> m () From 269c81b1d25e1a374e88d80c85a5170b78d790f3 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 3 May 2017 10:29:55 +0100 Subject: [PATCH 178/295] make die take Text argument, fixes #51 --- all_stack.sh | 8 ++++++++ src/Protolude.hs | 13 ++++++++++--- test_stack_lts.sh | 6 ++++++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/all_stack.sh b/all_stack.sh index 413d7e2aa1..15fc17a8fd 100755 --- a/all_stack.sh +++ b/all_stack.sh @@ -28,3 +28,11 @@ stack build --resolver lts-8.2 stack build --resolver lts-8.3 stack build --resolver lts-8.4 stack build --resolver lts-8.5 +stack build --resolver lts-8.6 +stack build --resolver lts-8.7 +stack build --resolver lts-8.8 +stack build --resolver lts-8.9 +stack build --resolver lts-8.10 +stack build --resolver lts-8.11 +stack build --resolver lts-8.12 +stack build --resolver lts-8.13 diff --git a/src/Protolude.hs b/src/Protolude.hs index 938b9ff2ff..440c3e0998 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -28,6 +28,7 @@ module Protolude ( #if !MIN_VERSION_base(4,8,0) (&), #endif + die, ) where -- Protolude module exports. @@ -430,14 +431,12 @@ import Data.Text.Encoding.Error as X ( -- IO import System.Environment as X (getArgs) +import qualified System.Exit import System.Exit as X ( ExitCode(..) , exitWith , exitFailure , exitSuccess -#if MIN_VERSION_base(4,8,0) - , die -#endif ) import System.IO as X ( Handle @@ -594,3 +593,11 @@ show x = toS (PBase.show x) {-# SPECIALIZE show :: Show a => a -> ByteString #-} {-# SPECIALIZE show :: Show a => a -> LByteString #-} {-# SPECIALIZE show :: Show a => a -> String #-} + +#if MIN_VERSION_base(4,8,0) +die :: Text -> IO () +die err = System.Exit.die (toS err) +#else +die :: Text -> IO () +die err = hPutStrLn stderr err >> exitFailure +#endif diff --git a/test_stack_lts.sh b/test_stack_lts.sh index 757ed678d2..2ce2f9f08b 100755 --- a/test_stack_lts.sh +++ b/test_stack_lts.sh @@ -1,5 +1,11 @@ +#!/usr/bin/env bash set +e +echo -e "\e[92mLTS 7.8" STACK_YAML=stack-7.8.yaml stack build --no-terminal + +echo -e "\e[92mLTS 7.10" STACK_YAML=stack-7.10.yaml stack build --no-terminal + +echo -e "\e[92mLTS 8.0" STACK_YAML=stack-8.0.yaml stack build --no-terminal From 456a063e35ce01227aaa189fe5027c58a31efa90 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 3 May 2017 10:37:39 +0100 Subject: [PATCH 179/295] update changelog --- CHANGES.md | 3 +++ src/Protolude.hs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index dfbc7cfea4..a98efaf2ba 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,6 +14,9 @@ * Restrict exported symbols from ``async`` to set available in 2.0. * Add `(&&^)`, `(||^)`, `(<&&>)`, `(<||>)` * Expose `unzip`. +* Export `maximumMay` and `minimumMay`. +* Mask `Type` export from `Data.Kind`. +* Wrap `die` to take `Text` argument instead of `[Char]`. 0.1.9 ==== diff --git a/src/Protolude.hs b/src/Protolude.hs index 440c3e0998..e2f82740e7 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -78,6 +78,8 @@ import Safe as X ( , lastMay , foldr1May , foldl1May + , maximumMay + , minimumMay , atMay , atDef ) From a2c66fc236cae2513c002f09c45986b346061382 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 3 May 2017 10:44:31 +0100 Subject: [PATCH 180/295] update changelog --- CHANGES.md | 1 + README.md | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index a98efaf2ba..c7e7ba5aed 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,7 @@ * Export `maximumMay` and `minimumMay`. * Mask `Type` export from `Data.Kind`. * Wrap `die` to take `Text` argument instead of `[Char]`. +* Export constructors `GHC.Generics`: `(:+:)`, `(:*:)`, and `(:.:)`. 0.1.9 ==== diff --git a/README.md b/README.md index a6bcbd8ba9..f2104c4fb0 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,16 @@ tracks Stack LTS resolver. | hashable | 1.2 | 1.3 | | transformers | 0.4 | 0.6 | +Structure +--------- + +Protolude's main modules are the following: + +* [Protolude.hs](https://github.com/sdiehl/protolude/blob/master/src/Protolude.hs) +* [Base.hs](https://github.com/sdiehl/protolude/blob/master/src/Base.hs) +* [Show.hs](https://github.com/sdiehl/protolude/blob/master/src/Show.hs) +* [Conv.hs](https://github.com/sdiehl/protolude/blob/master/src/Conv.hs) + FAQs ---- From 8c676e28de51ba7fc5cdc5e81714f20d9eafc2e6 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 3 May 2017 10:48:48 +0100 Subject: [PATCH 181/295] expose all pointers --- CHANGES.md | 1 + src/Protolude.hs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index c7e7ba5aed..dc69040478 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -18,6 +18,7 @@ * Mask `Type` export from `Data.Kind`. * Wrap `die` to take `Text` argument instead of `[Char]`. * Export constructors `GHC.Generics`: `(:+:)`, `(:*:)`, and `(:.:)`. +* Expose `StablePtr`, `IntPtr` and `WordPtr` types. 0.1.9 ==== diff --git a/src/Protolude.hs b/src/Protolude.hs index e2f82740e7..5bfb5003a0 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -516,7 +516,9 @@ import Control.Concurrent.Async as X ( , concurrently ) +import Foreign.Ptr as X (IntPtr, WordPtr) import Foreign.Storable as X (Storable) +import Foreign.StablePtr as X (StablePtr) -- Read instances hiding unsafe builtins (read) import Text.Read as X ( From b4d33c3c96fc19e99deca7717ef0d3aaea231418 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 6 May 2017 13:39:48 +0100 Subject: [PATCH 182/295] include until from GHC.Base --- src/Base.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Base.hs b/src/Base.hs index 207d70c67f..d9a5420e7d 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -51,6 +51,7 @@ import GHC.Base as X ( , ord , maxInt , minInt + , until ) -- Exported for lifting into new functions. From c2570f77e64619c90f8a25c6e328c30586077181 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 20 May 2017 19:03:29 +0100 Subject: [PATCH 183/295] better named either helper function, fixes #54 --- src/Either.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Either.hs b/src/Either.hs index 5a18c4f5ac..7b5d17f6c0 100644 --- a/src/Either.hs +++ b/src/Either.hs @@ -6,6 +6,7 @@ module Either ( , maybeToRight , leftToMaybe , rightToMaybe +, maybeEmpty , maybeToEither ) where @@ -26,5 +27,9 @@ maybeToRight l = maybe (Left l) Right maybeToLeft :: r -> Maybe l -> Either l r maybeToLeft r = maybe (Right r) Left -maybeToEither :: Monoid b => (a -> b) -> Maybe a -> b -maybeToEither = maybe mempty +maybeEmpty :: Monoid b => (a -> b) -> Maybe a -> b +maybeEmpty = maybe mempty + +maybeToEither :: e -> Maybe a -> Either e a +maybeToEither e Nothing = Left e +maybeToEither _ (Just a) = Right a From 46220a1a4a3d05480a20dbaa62c631f8b2557185 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 31 May 2017 10:13:08 +0100 Subject: [PATCH 184/295] Added HasCallStack constraint for trace functions (#55) * added HasCallStack constraint for trace functions, for issue #39 * unpack string on 7.6 --- protolude.cabal | 2 ++ src/Base.hs | 4 ---- src/CallStack.hs | 18 ++++++++++++++++++ src/Debug.hs | 10 +++------- src/Error.hs | 45 +++++++++++++++++++++++++++++++++++++++++++++ src/Panic.hs | 8 +++++++- src/Protolude.hs | 2 -- 7 files changed, 75 insertions(+), 14 deletions(-) create mode 100644 src/CallStack.hs create mode 100644 src/Error.hs diff --git a/protolude.cabal b/protolude.cabal index 2d38447b35..8e5d45489e 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -50,6 +50,8 @@ library Functor Semiring Bifunctor + CallStack + Error Panic default-extensions: diff --git a/src/Base.hs b/src/Base.hs index d9a5420e7d..4eb78145f5 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -32,10 +32,6 @@ import GHC.Float as X ( , showFloat , showSignedFloat ) -import GHC.Err as X ( - undefined - , error - ) import GHC.Show as X ( Show(..) ) diff --git a/src/CallStack.hs b/src/CallStack.hs new file mode 100644 index 0000000000..8f875b72df --- /dev/null +++ b/src/CallStack.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE KindSignatures #-} +{-# LANGUAGE ImplicitParams #-} +{-# LANGUAGE ConstraintKinds #-} + +module CallStack +( HasCallStack +) where + +#if MIN_VERSION_base(4,9,0) +import GHC.Stack (HasCallStack) +#elif MIN_VERSION_base(4,8,1) +import qualified GHC.Stack +type HasCallStack = (?callStack :: GHC.Stack.CallStack) +#else +import GHC.Exts (Constraint) +type HasCallStack = (() :: Constraint) +#endif diff --git a/src/Debug.hs b/src/Debug.hs index 5e62b884d1..36adcbfbe0 100644 --- a/src/Debug.hs +++ b/src/Debug.hs @@ -3,7 +3,6 @@ module Debug ( undefined, - error, trace, traceM, traceId, @@ -18,6 +17,7 @@ import Data.Text (Text, unpack) import Control.Monad (Monad, return) import qualified Base as P +import Error (error) import Show (Print, putStrLn) import System.IO.Unsafe (unsafePerformIO) @@ -34,10 +34,6 @@ traceIO string expr = do putStrLn string return expr -{-# WARNING error "'error' remains in code" #-} -error :: Text -> a -error s = P.error (unpack s) - {-# WARNING traceShow "'traceShow' remains in code" #-} traceShow :: P.Show a => a -> b -> b traceShow a b = trace (P.show a) b @@ -59,7 +55,7 @@ traceId :: Text -> Text traceId s = trace s s notImplemented :: a -notImplemented = P.error "Not implemented" +notImplemented = error "Not implemented" undefined :: a -undefined = P.undefined +undefined = error "Prelude.undefined" diff --git a/src/Error.hs b/src/Error.hs new file mode 100644 index 0000000000..fd497e0eab --- /dev/null +++ b/src/Error.hs @@ -0,0 +1,45 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE ImplicitParams #-} +{-# LANGUAGE ExistentialQuantification #-} + +#if MIN_VERSION_base(4,9,0) +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} +#endif + +module Error +( error +) where + +import GHC.Prim +import Data.Text (Text, unpack) + +#if MIN_VERSION_base(4,9,0) +-- Full stack trace. + +import GHC.Types (RuntimeRep) +import CallStack (HasCallStack) +import GHC.Exception (errorCallWithCallStackException) + +error :: forall (r :: RuntimeRep) . forall (a :: TYPE r) . HasCallStack => Text -> a +error s = raise# (errorCallWithCallStackException (unpack s) ?callstack) + +#elif MIN_VERSION_base(4,7,0) +-- Basic Call Stack with callsite. + +import GHC.Exception (errorCallException) + +error :: Text -> a +error s = raise# (errorCallException (unpack s)) + +#else + +-- No exception tracing. +import GHC.Types +import GHC.Exception + +error :: Text -> a +error s = throw (ErrorCall (unpack s)) + +#endif diff --git a/src/Panic.hs b/src/Panic.hs index 6055bc6dc0..508ddc7f07 100644 --- a/src/Panic.hs +++ b/src/Panic.hs @@ -1,5 +1,10 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE Trustworthy #-} +{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} +#if MIN_VERSION_base(4,9,0) +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} +#endif module Panic ( FatalError(..), @@ -9,6 +14,7 @@ module Panic ( import Base (Show) import Data.Text (Text) import Data.Typeable (Typeable) +import CallStack (HasCallStack) import Control.Exception as X -- | Uncatchable exceptions thrown and never caught. @@ -17,5 +23,5 @@ data FatalError = FatalError { fatalErrorMessage :: Text } instance Exception FatalError -panic :: Text -> a +panic :: HasCallStack => Text -> a panic a = throw (FatalError a) diff --git a/src/Protolude.hs b/src/Protolude.hs index 5bfb5003a0..20ac9aba87 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -49,8 +49,6 @@ import Base as Base hiding ( putStr -- Overriden by Show.putStr , putStrLn -- Overriden by Show.putStrLn , print -- Overriden by Protolude.print - , error -- Overriden by Debug.error - , undefined -- Overriden by Debug.undefined , show -- Overriden by Protolude.show , showFloat -- Custom Show instances deprecated. , showList -- Custom Show instances deprecated. From d30d6a39abab0b078de7b8b52e6837400bfd5fbf Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Wed, 14 Jun 2017 07:33:23 +0200 Subject: [PATCH 185/295] add (<&>), fixes issue #53 (#56) --- docs/Functor.md | 1 + src/Protolude.hs | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/Functor.md b/docs/Functor.md index 44c4419058..40a80c2487 100644 --- a/docs/Functor.md +++ b/docs/Functor.md @@ -35,6 +35,7 @@ void :: Functor f => f a -> f () ```haskell foreach :: Functor f => f a -> (a -> b) -> f b +(<&>) :: Functor f => f a -> (a -> b) -> f b ``` diff --git a/src/Protolude.hs b/src/Protolude.hs index 20ac9aba87..3d2cc1a8f8 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -16,7 +16,7 @@ module Protolude ( print, throwIO, throwTo, - foreach, + foreach, (<&>), show, pass, guarded, @@ -570,6 +570,13 @@ throwTo tid e = liftIO (Control.Exception.throwTo tid e) foreach :: Functor f => f a -> (a -> b) -> f b foreach = flip fmap +-- | Infix version of foreach. +-- +-- @<&>@ is to '<$>' what '&' is to '$'. +infixl 4 <&> +(<&>) :: Functor f => f a -> (a -> b) -> f b +(<&>) = foreach + -- | Do nothing returning unit inside applicative. pass :: Applicative f => f () pass = pure () From d7bc98214233d368875a59f8f68823684d00bdd6 Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Wed, 5 Jul 2017 08:02:57 +0200 Subject: [PATCH 186/295] Bump base upper bound for GHC 8.2 --- .travis.yml | 1 + protolude.cabal | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f04bb57ce7..d62b1db2bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,7 @@ env: - CABALVER=1.22 GHCVER=7.10.2 - CABALVER=1.22 GHCVER=7.10.3 - CABALVER=1.24 GHCVER=8.0.1 + - CABALVER=2.0 GHCVER=8.2.1 # Note: the distinction between `before_install` and `install` is not # important. diff --git a/protolude.cabal b/protolude.cabal index 8e5d45489e..d134f07ffa 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -22,7 +22,8 @@ tested-with: GHC == 7.10.1, GHC == 7.10.2, GHC == 7.10.3, - GHC == 8.0.1 + GHC == 8.0.1, + GHC == 8.2.1 Bug-Reports: https://github.com/sdiehl/protolude/issues description: @@ -65,7 +66,7 @@ library -fwarn-implicit-prelude build-depends: - base >= 4.6 && <4.10, + base >= 4.6 && <4.11, array >= 0.4 && <0.6, ghc-prim >= 0.3 && <0.6, async >= 2.0 && <2.2, From 5717b9a42c23bbf92f534ab2ed5d2f9e552b0f7d Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 5 Jul 2017 14:42:30 +0100 Subject: [PATCH 187/295] description and synopsis lines for latest cabal --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index d134f07ffa..172380b853 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,6 +1,6 @@ name: protolude version: 0.2 -synopsis: A sensible set of defaults for writing custom Preludes. +synopsis: A small prelude. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude license: MIT From eccb07f7266fb428cb8f1a840bdec2886ea83f47 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 17 Jul 2017 16:33:12 +0100 Subject: [PATCH 188/295] polymorphic return type for die --- protolude.cabal | 2 +- src/Protolude.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/protolude.cabal b/protolude.cabal index 172380b853..03018910ff 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -35,10 +35,10 @@ Source-Repository head library exposed-modules: Protolude + Unsafe other-modules: Exceptions - Unsafe Base Applicative Bool diff --git a/src/Protolude.hs b/src/Protolude.hs index 3d2cc1a8f8..81c581060c 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -604,9 +604,9 @@ show x = toS (PBase.show x) {-# SPECIALIZE show :: Show a => a -> String #-} #if MIN_VERSION_base(4,8,0) -die :: Text -> IO () +die :: Text -> IO a die err = System.Exit.die (toS err) #else -die :: Text -> IO () +die :: Text -> IO a die err = hPutStrLn stderr err >> exitFailure #endif From 3175e6c1ebb73d443863aa02ac6d7d37e43f2a59 Mon Sep 17 00:00:00 2001 From: Pi3r Date: Mon, 24 Jul 2017 18:54:42 +0200 Subject: [PATCH 189/295] Update protolude.cabal (#60) Increase upperbound of safe. This allows the master git version to build using the latest stackage`lts-8.23` --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index 03018910ff..b45ce8fa83 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -82,7 +82,7 @@ library if impl(ghc >= 7.8.0) build-depends: - safe >= 0.3 && <0.3.15 + safe >= 0.3 && <0.3.16 else build-depends: safe >= 0.3 && <0.3.10 From 63d561de0c00886921a162e564a86ac38ecd57a8 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 25 Jul 2017 13:03:07 +0100 Subject: [PATCH 190/295] bump docs upper bounds for base for GHC 8.2 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f2104c4fb0..8ae5008ae9 100644 --- a/README.md +++ b/README.md @@ -92,9 +92,9 @@ tracks Stack LTS resolver. | Dependencies | Lower | Upper | | ----------- | -------- | -------- | -| array | 0.4 | 0.5 | +| array | 0.4 | 0.6 | | async | 2.0 | 2.2 | -| base | 4.6 | 4.10 | +| base | 4.6 | 4.11 | | bytestring | 0.10 | 0.11 | | containers | 0.5 | 0.6 | | deepseq | 1.3 | 1.5 | From bfc7306ed70e2779c909acd875bfc9bb1c121005 Mon Sep 17 00:00:00 2001 From: Tony Day Date: Fri, 28 Jul 2017 22:06:13 +1000 Subject: [PATCH 191/295] Added RealFloat (#61) --- src/Base.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Base.hs b/src/Base.hs index 4eb78145f5..db95965ed7 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -29,6 +29,7 @@ import GHC.Float as X ( Float(..) , Double(..) , Floating (..) + , RealFloat(..) , showFloat , showSignedFloat ) From 7908bad8464e8cd0aea68d77d155fc0f7835e3ef Mon Sep 17 00:00:00 2001 From: Michael Burge Date: Sat, 5 Aug 2017 06:22:21 -0700 Subject: [PATCH 192/295] Debug trace functions now output to stderr (#62) --- src/Debug.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Debug.hs b/src/Debug.hs index 36adcbfbe0..a43aabfed5 100644 --- a/src/Debug.hs +++ b/src/Debug.hs @@ -18,20 +18,21 @@ import Control.Monad (Monad, return) import qualified Base as P import Error (error) -import Show (Print, putStrLn) +import Show (Print, hPutStrLn) +import System.IO(stderr) import System.IO.Unsafe (unsafePerformIO) {-# WARNING trace "'trace' remains in code" #-} trace :: Print b => b -> a -> a trace string expr = unsafePerformIO (do - putStrLn string + hPutStrLn stderr string return expr) {-# WARNING traceIO "'traceIO' remains in code" #-} traceIO :: Print b => b -> a -> P.IO a traceIO string expr = do - putStrLn string + hPutStrLn stderr string return expr {-# WARNING traceShow "'traceShow' remains in code" #-} From 6c9b60700e97914221f2df7d2496e21f5b232edc Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 17 Aug 2017 10:05:02 +0100 Subject: [PATCH 193/295] expose debug module --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index b45ce8fa83..ac62997e47 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -36,13 +36,13 @@ library exposed-modules: Protolude Unsafe + Debug other-modules: Exceptions Base Applicative Bool - Debug List Monad Show From 9533e739ff8fa951766414450dca3d66e9c4b942 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 22 Aug 2017 19:23:46 +0100 Subject: [PATCH 194/295] use hierarchical namespace for all modules --- protolude.cabal | 30 +++++++++++----------- src/Debug.hs | 6 ++--- src/Protolude.hs | 40 +++++++++++++++--------------- src/{ => Protolude}/Applicative.hs | 2 +- src/{ => Protolude}/Base.hs | 2 +- src/{ => Protolude}/Bifunctor.hs | 2 +- src/{ => Protolude}/Bool.hs | 2 +- src/{ => Protolude}/CallStack.hs | 2 +- src/{ => Protolude}/Conv.hs | 4 +-- src/{ => Protolude}/Either.hs | 2 +- src/{ => Protolude}/Error.hs | 4 +-- src/{ => Protolude}/Exceptions.hs | 4 +-- src/{ => Protolude}/Functor.hs | 2 +- src/{ => Protolude}/List.hs | 2 +- src/{ => Protolude}/Monad.hs | 4 +-- src/{ => Protolude}/Panic.hs | 6 ++--- src/{ => Protolude}/Semiring.hs | 2 +- src/{ => Protolude}/Show.hs | 4 +-- src/Unsafe.hs | 2 +- 19 files changed, 61 insertions(+), 61 deletions(-) rename src/{ => Protolude}/Applicative.hs (96%) rename src/{ => Protolude}/Base.hs (98%) rename src/{ => Protolude}/Bifunctor.hs (97%) rename src/{ => Protolude}/Bool.hs (98%) rename src/{ => Protolude}/CallStack.hs (93%) rename src/{ => Protolude}/Conv.hs (98%) rename src/{ => Protolude}/Either.hs (96%) rename src/{ => Protolude}/Error.hs (93%) rename src/{ => Protolude}/Exceptions.hs (94%) rename src/{ => Protolude}/Functor.hs (95%) rename src/{ => Protolude}/List.hs (97%) rename src/{ => Protolude}/Monad.hs (95%) rename src/{ => Protolude}/Panic.hs (85%) rename src/{ => Protolude}/Semiring.hs (90%) rename src/{ => Protolude}/Show.hs (96%) diff --git a/protolude.cabal b/protolude.cabal index ac62997e47..3f4d12b4be 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -39,21 +39,21 @@ library Debug other-modules: - Exceptions - Base - Applicative - Bool - List - Monad - Show - Conv - Either - Functor - Semiring - Bifunctor - CallStack - Error - Panic + Protolude.Exceptions + Protolude.Base + Protolude.Applicative + Protolude.Bool + Protolude.List + Protolude.Monad + Protolude.Show + Protolude.Conv + Protolude.Either + Protolude.Functor + Protolude.Semiring + Protolude.Bifunctor + Protolude.CallStack + Protolude.Error + Protolude.Panic default-extensions: NoImplicitPrelude diff --git a/src/Debug.hs b/src/Debug.hs index a43aabfed5..b4c5bc71f5 100644 --- a/src/Debug.hs +++ b/src/Debug.hs @@ -16,9 +16,9 @@ module Debug ( import Data.Text (Text, unpack) import Control.Monad (Monad, return) -import qualified Base as P -import Error (error) -import Show (Print, hPutStrLn) +import qualified Protolude.Base as P +import Protolude.Error (error) +import Protolude.Show (Print, hPutStrLn) import System.IO(stderr) import System.IO.Unsafe (unsafePerformIO) diff --git a/src/Protolude.hs b/src/Protolude.hs index 81c581060c..7b13e4ca7e 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -32,20 +32,20 @@ module Protolude ( ) where -- Protolude module exports. -import List as X -import Show as X -import Bool as X import Debug as X -import Monad as X -import Functor as X -import Either as X -import Applicative as X -import Conv as X -import Panic as X -import Exceptions as X -import Semiring as X - -import Base as Base hiding ( +import Protolude.List as X +import Protolude.Show as X +import Protolude.Bool as X +import Protolude.Monad as X +import Protolude.Functor as X +import Protolude.Either as X +import Protolude.Applicative as X +import Protolude.Conv as X +import Protolude.Panic as X +import Protolude.Exceptions as X +import Protolude.Semiring as X + +import Protolude.Base as Base hiding ( putStr -- Overriden by Show.putStr , putStrLn -- Overriden by Show.putStrLn , print -- Overriden by Protolude.print @@ -56,7 +56,7 @@ import Base as Base hiding ( , showSignedFloat -- Custom Show instances deprecated. , showsPrec -- Custom Show instances deprecated. ) -import qualified Base as PBase +import qualified Protolude.Base as PBase -- Used for 'show', not exported. import Data.String (String) @@ -155,10 +155,10 @@ import Control.DeepSeq as X ( import Data.Tuple as X ( fst , snd - , curry + , curry , uncurry , swap - ) + ) import Data.List as X ( splitAt @@ -325,7 +325,7 @@ import Data.Word as X ( import Data.Either as X ( Either(..) - , either + , either , lefts , rights , partitionEithers @@ -431,7 +431,7 @@ import Data.Text.Encoding.Error as X ( -- IO import System.Environment as X (getArgs) -import qualified System.Exit +import qualified System.Exit import System.Exit as X ( ExitCode(..) , exitWith @@ -475,7 +475,7 @@ import Control.Monad.STM as X ( , retry , orElse , check - , throwSTM + , throwSTM , catchSTM ) import Control.Concurrent as X hiding ( @@ -494,7 +494,7 @@ import Control.Concurrent.Async as X ( , wait , poll , waitCatch - , cancel + , cancel , cancelWith , asyncThreadId , waitAny diff --git a/src/Applicative.hs b/src/Protolude/Applicative.hs similarity index 96% rename from src/Applicative.hs rename to src/Protolude/Applicative.hs index 34da016d1d..5e2a00ca5a 100644 --- a/src/Applicative.hs +++ b/src/Protolude/Applicative.hs @@ -1,7 +1,7 @@ {-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} -module Applicative ( +module Protolude.Applicative ( orAlt, orEmpty, eitherA, diff --git a/src/Base.hs b/src/Protolude/Base.hs similarity index 98% rename from src/Base.hs rename to src/Protolude/Base.hs index db95965ed7..8b58c7cf57 100644 --- a/src/Base.hs +++ b/src/Protolude/Base.hs @@ -4,7 +4,7 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ExplicitNamespaces #-} -module Base ( +module Protolude.Base ( module X, ($!), ) where diff --git a/src/Bifunctor.hs b/src/Protolude/Bifunctor.hs similarity index 97% rename from src/Bifunctor.hs rename to src/Protolude/Bifunctor.hs index 3b2d1cca26..185c98b01d 100644 --- a/src/Bifunctor.hs +++ b/src/Protolude/Bifunctor.hs @@ -1,7 +1,7 @@ {-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} -module Bifunctor ( +module Protolude.Bifunctor ( Bifunctor(..) ) where diff --git a/src/Bool.hs b/src/Protolude/Bool.hs similarity index 98% rename from src/Bool.hs rename to src/Protolude/Bool.hs index 930e121f26..834e35c2e2 100644 --- a/src/Bool.hs +++ b/src/Protolude/Bool.hs @@ -1,7 +1,7 @@ {-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} -module Bool ( +module Protolude.Bool ( whenM , unlessM , ifM diff --git a/src/CallStack.hs b/src/Protolude/CallStack.hs similarity index 93% rename from src/CallStack.hs rename to src/Protolude/CallStack.hs index 8f875b72df..ce587f6694 100644 --- a/src/CallStack.hs +++ b/src/Protolude/CallStack.hs @@ -3,7 +3,7 @@ {-# LANGUAGE ImplicitParams #-} {-# LANGUAGE ConstraintKinds #-} -module CallStack +module Protolude.CallStack ( HasCallStack ) where diff --git a/src/Conv.hs b/src/Protolude/Conv.hs similarity index 98% rename from src/Conv.hs rename to src/Protolude/Conv.hs index 99826e127a..eca4f07675 100644 --- a/src/Conv.hs +++ b/src/Protolude/Conv.hs @@ -2,7 +2,7 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} -module Conv ( +module Protolude.Conv ( StringConv (..) , toS , toSL @@ -17,7 +17,7 @@ import Data.Text.Encoding.Error as T import Data.Text.Lazy as LT import Data.Text.Lazy.Encoding as LT -import Base +import Protolude.Base import Data.Eq (Eq(..)) import Data.Ord (Ord(..)) import Data.Function ((.), id) diff --git a/src/Either.hs b/src/Protolude/Either.hs similarity index 96% rename from src/Either.hs rename to src/Protolude/Either.hs index 7b5d17f6c0..28eab61644 100644 --- a/src/Either.hs +++ b/src/Protolude/Either.hs @@ -1,7 +1,7 @@ {-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} -module Either ( +module Protolude.Either ( maybeToLeft , maybeToRight , leftToMaybe diff --git a/src/Error.hs b/src/Protolude/Error.hs similarity index 93% rename from src/Error.hs rename to src/Protolude/Error.hs index fd497e0eab..83667c648f 100644 --- a/src/Error.hs +++ b/src/Protolude/Error.hs @@ -8,7 +8,7 @@ {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} #endif -module Error +module Protolude.Error ( error ) where @@ -19,7 +19,7 @@ import Data.Text (Text, unpack) -- Full stack trace. import GHC.Types (RuntimeRep) -import CallStack (HasCallStack) +import Protolude.CallStack (HasCallStack) import GHC.Exception (errorCallWithCallStackException) error :: forall (r :: RuntimeRep) . forall (a :: TYPE r) . HasCallStack => Text -> a diff --git a/src/Exceptions.hs b/src/Protolude/Exceptions.hs similarity index 94% rename from src/Exceptions.hs rename to src/Protolude/Exceptions.hs index 801b2aafce..031120d171 100644 --- a/src/Exceptions.hs +++ b/src/Protolude/Exceptions.hs @@ -2,13 +2,13 @@ {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} -module Exceptions ( +module Protolude.Exceptions ( hush, note, tryIO, ) where -import Base (IO) +import Protolude.Base (IO) import Data.Function ((.)) import Control.Monad.Trans (liftIO) import Control.Monad.IO.Class (MonadIO) diff --git a/src/Functor.hs b/src/Protolude/Functor.hs similarity index 95% rename from src/Functor.hs rename to src/Protolude/Functor.hs index ebc35030d1..f5345becb4 100644 --- a/src/Functor.hs +++ b/src/Protolude/Functor.hs @@ -2,7 +2,7 @@ {-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} -module Functor ( +module Protolude.Functor ( Functor(..), ($>), (<$>), diff --git a/src/List.hs b/src/Protolude/List.hs similarity index 97% rename from src/List.hs rename to src/Protolude/List.hs index 635236e8f0..364e0d761f 100644 --- a/src/List.hs +++ b/src/Protolude/List.hs @@ -1,7 +1,7 @@ {-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} -module List ( +module Protolude.List ( head, ordNub, sortOn, diff --git a/src/Monad.hs b/src/Protolude/Monad.hs similarity index 95% rename from src/Monad.hs rename to src/Protolude/Monad.hs index 139bacb74c..f2a468b547 100644 --- a/src/Monad.hs +++ b/src/Protolude/Monad.hs @@ -2,7 +2,7 @@ {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} -module Monad ( +module Protolude.Monad ( Monad((>>=), return) , MonadPlus(..) @@ -40,7 +40,7 @@ module Monad ( , (<$!>) ) where -import Base (seq) +import Protolude.Base (seq) import Data.List (concat) import Control.Monad diff --git a/src/Panic.hs b/src/Protolude/Panic.hs similarity index 85% rename from src/Panic.hs rename to src/Protolude/Panic.hs index 508ddc7f07..6471d2cb92 100644 --- a/src/Panic.hs +++ b/src/Protolude/Panic.hs @@ -6,15 +6,15 @@ {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} #endif -module Panic ( +module Protolude.Panic ( FatalError(..), panic, ) where -import Base (Show) +import Protolude.Base (Show) +import Protolude.CallStack (HasCallStack) import Data.Text (Text) import Data.Typeable (Typeable) -import CallStack (HasCallStack) import Control.Exception as X -- | Uncatchable exceptions thrown and never caught. diff --git a/src/Semiring.hs b/src/Protolude/Semiring.hs similarity index 90% rename from src/Semiring.hs rename to src/Protolude/Semiring.hs index 8699015f2c..6cbbcdbd96 100644 --- a/src/Semiring.hs +++ b/src/Protolude/Semiring.hs @@ -1,7 +1,7 @@ {-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} -module Semiring ( +module Protolude.Semiring ( Semiring(..), zero, ) where diff --git a/src/Show.hs b/src/Protolude/Show.hs similarity index 96% rename from src/Show.hs rename to src/Protolude/Show.hs index 4b3bdd1927..a069c88887 100644 --- a/src/Show.hs +++ b/src/Protolude/Show.hs @@ -5,7 +5,7 @@ {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE ExtendedDefaultRules #-} -module Show ( +module Protolude.Show ( Print(..), putText, putLText, @@ -13,8 +13,8 @@ module Show ( putLByteString, ) where -import qualified Base import qualified System.IO as Base +import qualified Protolude.Base as Base import Data.Function ((.)) import Control.Monad.IO.Class (MonadIO, liftIO) diff --git a/src/Unsafe.hs b/src/Unsafe.hs index 1e1bdc3f15..2b25b30589 100644 --- a/src/Unsafe.hs +++ b/src/Unsafe.hs @@ -11,7 +11,7 @@ module Unsafe ( unsafeThrow, ) where -import Base (Int) +import Protolude.Base (Int) import qualified Data.List as List import qualified Data.Maybe as Maybe import qualified Control.Exception as Exc From 2cd38fcb0385ac971d8ad270e21a9ab7ab9216b1 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 22 Aug 2017 19:25:27 +0100 Subject: [PATCH 195/295] remove hidden modules --- protolude.cabal | 2 -- 1 file changed, 2 deletions(-) diff --git a/protolude.cabal b/protolude.cabal index 3f4d12b4be..95d55ee025 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -37,8 +37,6 @@ library Protolude Unsafe Debug - - other-modules: Protolude.Exceptions Protolude.Base Protolude.Applicative From 8387808d6ee62a3d1cfe71ecd3e2e0a5f63b49f3 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 22 Aug 2017 19:26:57 +0100 Subject: [PATCH 196/295] Fix README with relative links --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8ae5008ae9..b828869fdf 100644 --- a/README.md +++ b/README.md @@ -113,9 +113,9 @@ Structure Protolude's main modules are the following: * [Protolude.hs](https://github.com/sdiehl/protolude/blob/master/src/Protolude.hs) -* [Base.hs](https://github.com/sdiehl/protolude/blob/master/src/Base.hs) -* [Show.hs](https://github.com/sdiehl/protolude/blob/master/src/Show.hs) -* [Conv.hs](https://github.com/sdiehl/protolude/blob/master/src/Conv.hs) +* [Base.hs](https://github.com/sdiehl/protolude/blob/master/src/Protolude/Base.hs) +* [Show.hs](https://github.com/sdiehl/protolude/blob/master/src/Protolude/Show.hs) +* [Conv.hs](https://github.com/sdiehl/protolude/blob/master/src/Protolude/Conv.hs) FAQs ---- From 5964f545cf3e597aa7d1613e4a284f27b9431e58 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 22 Aug 2017 19:55:51 +0100 Subject: [PATCH 197/295] fix bifunctor import for base 4.8 --- src/Protolude.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index 7b13e4ca7e..43cca8b1e6 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -138,7 +138,7 @@ import Data.Semigroup as X ( import Data.Monoid as X #if !MIN_VERSION_base(4,8,0) -import Bifunctor as X (Bifunctor(..)) +import Protolude.Bifunctor as X (Bifunctor(..)) #else import Data.Bifunctor as X (Bifunctor(..)) #endif From 923194c5b2cbf8e7915b254f8603d9552f9c6ca9 Mon Sep 17 00:00:00 2001 From: Tony Day Date: Fri, 15 Sep 2017 22:43:41 +1000 Subject: [PATCH 198/295] ghc-8.2 HasField, Type & * (#65) --- src/Protolude/Base.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Protolude/Base.hs b/src/Protolude/Base.hs index 8b58c7cf57..9453c8dcc0 100644 --- a/src/Protolude/Base.hs +++ b/src/Protolude/Base.hs @@ -113,9 +113,7 @@ import GHC.TypeLits as X ( ) #endif --- Pending GHC 8.2 we'll expose these. - -{- +#if ( __GLASGOW_HASKELL__ >= 802 ) import GHC.Records as X ( HasField(..) ) @@ -124,7 +122,7 @@ import Data.Kind as X ( type (*) , type Type ) --} +#endif #endif From 72085dec92059c314cd822e4adbb296ca9ad6def Mon Sep 17 00:00:00 2001 From: Pi3r Date: Wed, 4 Oct 2017 09:53:19 +0200 Subject: [PATCH 199/295] Add `putErrLn` to match `putStrLn` (#67) * Add `putErrLn` to match `putStrLn` Fix #66 * Add putErr for the most usual inference case * Rename `putErr` into `putErrText` In order to allow further specializations in the future if necessary. --- src/Protolude/Show.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Protolude/Show.hs b/src/Protolude/Show.hs index a069c88887..f6a190d94d 100644 --- a/src/Protolude/Show.hs +++ b/src/Protolude/Show.hs @@ -8,6 +8,7 @@ module Protolude.Show ( Print(..), putText, + putErrText, putLText, putByteString, putLByteString, @@ -27,7 +28,7 @@ import qualified Data.Text.IO as T import qualified Data.Text.Lazy as TL import qualified Data.Text.Lazy.IO as TL -import System.IO (Handle, stdout) +import System.IO (Handle, stdout, stderr) class Print a where @@ -37,6 +38,8 @@ class Print a where hPutStrLn :: MonadIO m => Handle -> a -> m () putStrLn :: MonadIO m => a -> m () putStrLn = hPutStrLn stdout + putErrLn :: MonadIO m => a -> m () + putErrLn = hPutStrLn stderr instance Print T.Text where hPutStr = \h -> liftIO . T.hPutStr h @@ -74,3 +77,7 @@ putByteString = putStrLn putLByteString :: MonadIO m => BL.ByteString -> m () putLByteString = putStrLn {-# SPECIALIZE putLByteString :: BL.ByteString -> Base.IO () #-} + +putErrText :: MonadIO m => T.Text -> m () +putErrText = putErrLn +{-# SPECIALIZE putErrText :: T.Text -> Base.IO () #-} From abf2fbc36945a874eb034f5e3d1df08cd498dbb8 Mon Sep 17 00:00:00 2001 From: Dmitry Bushev Date: Thu, 5 Oct 2017 14:11:46 +0300 Subject: [PATCH 200/295] Support GHC-8.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When compiling with GHC 8.2.2-rc1: ``` src/Error.hs:25:17: error: Variable ‘r’ used as both a kind and a type Did you intend to use TypeInType? | 25 | error :: forall (r :: RuntimeRep) . forall (a :: TYPE r) . HasCallStack => Text -> a | ^^^^^^^^^^^^^^^^^ ``` `TypeInType` should be enabled, see GHC issue 14121 https://ghc.haskell.org/trac/ghc/ticket/14121 --- src/Protolude/Error.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Protolude/Error.hs b/src/Protolude/Error.hs index 83667c648f..d8e3d1fe82 100644 --- a/src/Protolude/Error.hs +++ b/src/Protolude/Error.hs @@ -3,6 +3,9 @@ {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ImplicitParams #-} {-# LANGUAGE ExistentialQuantification #-} +#if ( __GLASGOW_HASKELL__ >= 800 ) +{-# LANGUAGE TypeInType #-} +#endif #if MIN_VERSION_base(4,9,0) {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} From 62393669dcb03128817d074f894630abb2e2038c Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 5 Oct 2017 13:20:47 +0100 Subject: [PATCH 201/295] update the travis file for 8.2.2 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d62b1db2bf..2bef546d34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,7 @@ env: - CABALVER=1.22 GHCVER=7.10.3 - CABALVER=1.24 GHCVER=8.0.1 - CABALVER=2.0 GHCVER=8.2.1 + - CABALVER=2.0 GHCVER=8.2.2 # Note: the distinction between `before_install` and `install` is not # important. From 8eb1633dd886cbaae36cdf9487d2b4ce4fdbb6d1 Mon Sep 17 00:00:00 2001 From: Timothy Date: Wed, 25 Oct 2017 00:27:18 +1100 Subject: [PATCH 202/295] Add warnings for partial functions (#70) --- src/Debug.hs | 3 +++ src/Protolude/Error.hs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/Debug.hs b/src/Debug.hs index b4c5bc71f5..b0d7603801 100644 --- a/src/Debug.hs +++ b/src/Debug.hs @@ -1,5 +1,6 @@ {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} +{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} module Debug ( undefined, @@ -55,8 +56,10 @@ traceM s = trace (unpack s) (return ()) traceId :: Text -> Text traceId s = trace s s +{-# WARNING notImplemented "'notImplemented' remains in code" #-} notImplemented :: a notImplemented = error "Not implemented" +{-# WARNING undefined "'undefined' remains in code" #-} undefined :: a undefined = error "Prelude.undefined" diff --git a/src/Protolude/Error.hs b/src/Protolude/Error.hs index d8e3d1fe82..194b5c1533 100644 --- a/src/Protolude/Error.hs +++ b/src/Protolude/Error.hs @@ -25,6 +25,7 @@ import GHC.Types (RuntimeRep) import Protolude.CallStack (HasCallStack) import GHC.Exception (errorCallWithCallStackException) +{-# WARNING error "'error' remains in code" #-} error :: forall (r :: RuntimeRep) . forall (a :: TYPE r) . HasCallStack => Text -> a error s = raise# (errorCallWithCallStackException (unpack s) ?callstack) @@ -33,6 +34,7 @@ error s = raise# (errorCallWithCallStackException (unpack s) ?callstack) import GHC.Exception (errorCallException) +{-# WARNING error "'error' remains in code" #-} error :: Text -> a error s = raise# (errorCallException (unpack s)) @@ -42,6 +44,7 @@ error s = raise# (errorCallException (unpack s)) import GHC.Types import GHC.Exception +{-# WARNING error "'error' remains in code" #-} error :: Text -> a error s = throw (ErrorCall (unpack s)) From c9a2d176d144c4e9ac3a11668706e5f0c11ec0bf Mon Sep 17 00:00:00 2001 From: Pi3r Date: Thu, 30 Nov 2017 14:31:19 +0100 Subject: [PATCH 203/295] Add throwE & catchE (#73) * Add throwE & catchE My understanding is that `throwError` & `catchError` are deprecated (maybe we should remove them?) * Update Protolude.hs * Update Protolude.hs --- src/Protolude.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Protolude.hs b/src/Protolude.hs index 43cca8b1e6..c9407449b1 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -282,6 +282,11 @@ import Control.Monad.Reader as X ( , runReaderT ) +import Control.Monad.Trans.Except as X ( + throwE + , catchE + ) + import Control.Monad.Except as X ( MonadError , Except From d462550f07beebd6d6a9855ab6df555f46a16cf3 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 18 Dec 2017 14:04:43 +0100 Subject: [PATCH 204/295] add mapExcept(T) and withExcept(T) (#76) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since we already export functions like `withState` and the names don’t clash with anything, we export these transformation functions as well. Every function from Control.Monad.Except is now exported, the user doesn’t need to import it for common error handling tasks. --- src/Protolude.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Protolude.hs b/src/Protolude.hs index c9407449b1..6142bccc9b 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -295,6 +295,10 @@ import Control.Monad.Except as X ( , catchError , runExcept , runExceptT + , mapExcept + , mapExceptT + , withExcept + , withExceptT ) import Control.Monad.Trans as X ( From 2d8d1f335772e5b3bb7276b603897a549a17baee Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Mon, 18 Dec 2017 20:03:45 +0100 Subject: [PATCH 205/295] Reexport scanl' (#74) This is useful for the same reasons that foldl' is useful --- Symbols.md | 1 + src/Protolude.hs | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/Symbols.md b/Symbols.md index 28620fe6eb..3900a3337c 100644 --- a/Symbols.md +++ b/Symbols.md @@ -781,6 +781,7 @@ * runStateT * scaleFloat * scanl +* scanl' * scanr * second * selName diff --git a/src/Protolude.hs b/src/Protolude.hs index 6142bccc9b..585187c82a 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE FlexibleContexts #-} @@ -27,6 +28,7 @@ module Protolude ( liftIO2, #if !MIN_VERSION_base(4,8,0) (&), + scanl', #endif die, ) where @@ -177,6 +179,9 @@ import Data.List as X ( , subsequences , permutations , scanl +#if MIN_VERSION_base(4,8,0) + , scanl' +#endif , scanr , iterate , repeat @@ -197,6 +202,12 @@ import Data.List as X ( , genericReplicate ) +#if !MIN_VERSION_base(4,8,0) +-- These imports are required for the scanl' rewrite rules +import GHC.Exts (build) +import Data.List (tail) +#endif + -- Hashing import Data.Hashable as X ( Hashable @@ -619,3 +630,32 @@ die err = System.Exit.die (toS err) die :: Text -> IO a die err = hPutStrLn stderr err >> exitFailure #endif + +#if !MIN_VERSION_base(4,8,0) +-- This is a literal copy of the implementation in GHC.List in base-4.10.1.0. + +-- | A strictly accumulating version of 'scanl' +{-# NOINLINE [1] scanl' #-} +scanl' :: (b -> a -> b) -> b -> [a] -> [b] +scanl' = scanlGo' + where + scanlGo' :: (b -> a -> b) -> b -> [a] -> [b] + scanlGo' f !q ls = q : (case ls of + [] -> [] + x:xs -> scanlGo' f (f q x) xs) + +{-# RULES +"scanl'" [~1] forall f a bs . scanl' f a bs = + build (\c n -> a `c` foldr (scanlFB' f c) (flipSeqScanl' n) bs a) +"scanlList'" [1] forall f a bs . + foldr (scanlFB' f (:)) (flipSeqScanl' []) bs a = tail (scanl' f a bs) + #-} + +{-# INLINE [0] scanlFB' #-} +scanlFB' :: (b -> a -> b) -> (b -> c -> c) -> a -> (b -> c) -> b -> c +scanlFB' f c = \b g -> \x -> let !b' = f x b in b' `c` g b' + +{-# INLINE [0] flipSeqScanl' #-} +flipSeqScanl' :: a -> b -> a +flipSeqScanl' a !_b = a +#endif From 4694fee38387e7a14dd85042a35fcf9fdd8c5ce5 Mon Sep 17 00:00:00 2001 From: Ian Jeffries Date: Wed, 27 Dec 2017 05:29:52 -0500 Subject: [PATCH 206/295] Fix spelling. (#77) --- src/Protolude/Exceptions.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Protolude/Exceptions.hs b/src/Protolude/Exceptions.hs index 031120d171..54c329a63e 100644 --- a/src/Protolude/Exceptions.hs +++ b/src/Protolude/Exceptions.hs @@ -22,7 +22,7 @@ hush :: Alternative m => Either e a -> m a hush (Left _) = empty hush (Right x) = pure x --- To suppress redundenet applicative constraint warning on GHC 8.0 +-- To suppress redundant applicative constraint warning on GHC 8.0 #if ( __GLASGOW_HASKELL__ >= 800 ) note :: (MonadError e m) => e -> Maybe a -> m a note err = maybe (throwError err) pure From 8db43f6bff43b8553cdf443f8574c5d35a78386b Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sun, 7 Jan 2018 08:30:30 +0000 Subject: [PATCH 207/295] Bump upper bounds for safe --- protolude.cabal | 4 ++-- stack-10.0.yaml | 6 ++++++ stack-9.0.yaml | 6 ++++++ test_stack_lts.sh | 6 ++++++ 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 stack-10.0.yaml create mode 100644 stack-9.0.yaml diff --git a/protolude.cabal b/protolude.cabal index 95d55ee025..858cc83b55 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -11,6 +11,7 @@ copyright: 2016-2017 Stephen Diehl category: Prelude build-type: Simple cabal-version: >=1.10 +bug-reports: https://github.com/sdiehl/protolude/issues tested-with: GHC == 7.6.1, GHC == 7.6.2, @@ -24,7 +25,6 @@ tested-with: GHC == 7.10.3, GHC == 8.0.1, GHC == 8.2.1 -Bug-Reports: https://github.com/sdiehl/protolude/issues description: A sensible set of defaults for writing custom Preludes. @@ -80,7 +80,7 @@ library if impl(ghc >= 7.8.0) build-depends: - safe >= 0.3 && <0.3.16 + safe >= 0.3 && <0.4 else build-depends: safe >= 0.3 && <0.3.10 diff --git a/stack-10.0.yaml b/stack-10.0.yaml new file mode 100644 index 0000000000..fa8bfe2ce2 --- /dev/null +++ b/stack-10.0.yaml @@ -0,0 +1,6 @@ +resolver: lts-10.0 +packages: +- '.' +extra-deps: +flags: {} +extra-package-dbs: [] diff --git a/stack-9.0.yaml b/stack-9.0.yaml new file mode 100644 index 0000000000..6219daf89c --- /dev/null +++ b/stack-9.0.yaml @@ -0,0 +1,6 @@ +resolver: lts-9.0 +packages: +- '.' +extra-deps: +flags: {} +extra-package-dbs: [] diff --git a/test_stack_lts.sh b/test_stack_lts.sh index 2ce2f9f08b..d6f40cabf4 100755 --- a/test_stack_lts.sh +++ b/test_stack_lts.sh @@ -9,3 +9,9 @@ STACK_YAML=stack-7.10.yaml stack build --no-terminal echo -e "\e[92mLTS 8.0" STACK_YAML=stack-8.0.yaml stack build --no-terminal + +echo -e "\e[92mLTS 9.0" +STACK_YAML=stack-9.0.yaml stack build --no-terminal + +echo -e "\e[92mLTS 10.0" +STACK_YAML=stack-10.0.yaml stack build --no-terminal From 74f185e22f0bf5dd11f53b20f594afc0c5103f3b Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sun, 7 Jan 2018 13:03:56 +0000 Subject: [PATCH 208/295] Update stack build scripts --- README.md | 2 +- all_stack.sh | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b828869fdf..7e13d6c882 100644 --- a/README.md +++ b/README.md @@ -172,4 +172,4 @@ License ------- Released under the MIT License. -Copyright (c) 2016-2017, Stephen Diehl +Copyright (c) 2016-2018, Stephen Diehl diff --git a/all_stack.sh b/all_stack.sh index 15fc17a8fd..a71b247cc6 100755 --- a/all_stack.sh +++ b/all_stack.sh @@ -36,3 +36,27 @@ stack build --resolver lts-8.10 stack build --resolver lts-8.11 stack build --resolver lts-8.12 stack build --resolver lts-8.13 +stack build --resolver lts-9.0 +stack build --resolver lts-9.1 +stack build --resolver lts-9.2 +stack build --resolver lts-9.3 +stack build --resolver lts-9.4 +stack build --resolver lts-9.5 +stack build --resolver lts-9.6 +stack build --resolver lts-9.7 +stack build --resolver lts-9.8 +stack build --resolver lts-9.9 +stack build --resolver lts-9.10 +stack build --resolver lts-9.11 +stack build --resolver lts-9.12 +stack build --resolver lts-9.13 +stack build --resolver lts-9.14 +stack build --resolver lts-9.15 +stack build --resolver lts-9.16 +stack build --resolver lts-9.17 +stack build --resolver lts-9.18 +stack build --resolver lts-9.19 +stack build --resolver lts-9.20 +stack build --resolver lts-10.0 +stack build --resolver lts-10.1 +stack build --resolver lts-10.2 From 6d2a32f0dd2652d59e6a38d6a49da85b3ec12139 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 8 Jan 2018 16:28:14 +0000 Subject: [PATCH 209/295] Add transformers-compat for ancients MTL/Transformer versions --- .gitignore | 2 +- protolude.cabal | 27 ++++++++++++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 691b3d29cd..e7045e7d7c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -*.sw[pon] +*.sw[ponmkl] .stack-work dist .cabal-sandbox diff --git a/protolude.cabal b/protolude.cabal index 858cc83b55..ece4fb8a5c 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -64,19 +64,20 @@ library -fwarn-implicit-prelude build-depends: - base >= 4.6 && <4.11, - array >= 0.4 && <0.6, - ghc-prim >= 0.3 && <0.6, - async >= 2.0 && <2.2, - deepseq >= 1.3 && <1.5, - containers >= 0.5 && <0.6, - hashable >= 1.2 && <1.3, - transformers >= 0.2 && <0.6, - text >= 1.2 && <1.3, - stm >= 2.4 && <2.5, - bytestring >= 0.10 && <0.11, - mtl >= 2.1 && <2.3, - mtl-compat >= 0.2 && <0.3 + base >= 4.6 && <4.11, + array >= 0.4 && <0.6, + ghc-prim >= 0.3 && <0.6, + async >= 2.0 && <2.2, + deepseq >= 1.3 && <1.5, + containers >= 0.5 && <0.6, + hashable >= 1.2 && <1.3, + transformers >= 0.2 && <0.6, + text >= 1.2 && <1.3, + stm >= 2.4 && <2.5, + bytestring >= 0.10 && <0.11, + mtl >= 2.1 && <2.3, + mtl-compat >= 0.2 && <0.3, + transformers-compat >= 0.4 && <0.6 if impl(ghc >= 7.8.0) build-depends: From 7f294972628d6dfdfeac9f644e071588ee9a192d Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 8 Jan 2018 16:29:18 +0000 Subject: [PATCH 210/295] Minor version bump --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index ece4fb8a5c..365d9d388d 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.2 +version: 0.2.1 synopsis: A small prelude. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude From 65a0518008277734024ed26336c0f621c93118d1 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 8 Jan 2018 17:05:20 +0000 Subject: [PATCH 211/295] Update changelog --- CHANGES.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index dc69040478..821fb42a97 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,15 @@ +0.2.1 +==== + +* Add `transformers-compat` for old versions of transformers that require + `throwE`, `catchE`. +* Fix `safe` version bounds for new versions. +* Add `mapExceptT and `withExceptT`. +* Export `scanl'`. +* Add `putErrLn`. +* Export `RealFloat`. +* Expose `GHC.Records` exports for GHC 8.2 and above. + 0.2 ==== From fd7fc5fb8e1dc4259cce2796c6a2a9359de27d17 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 12 Jan 2018 11:11:09 +0000 Subject: [PATCH 212/295] Update changelog --- CHANGES.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 821fb42a97..04185c86c0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,13 +1,14 @@ 0.2.1 ==== +* Exposes `throwE` and `catchE`. * Add `transformers-compat` for old versions of transformers that require `throwE`, `catchE`. * Fix `safe` version bounds for new versions. * Add `mapExceptT and `withExceptT`. -* Export `scanl'`. +* Export `scanl'` and provide shim for backwards compatability. * Add `putErrLn`. -* Export `RealFloat`. +* Expose `RealFloat`. * Expose `GHC.Records` exports for GHC 8.2 and above. 0.2 From 8c9d0f4666b62861d4290b8dc221b849a5bb87e8 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 5 Feb 2018 10:20:40 +0000 Subject: [PATCH 213/295] Bump upper bound for async 2.2.1 --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index 365d9d388d..c2d652c592 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -67,7 +67,7 @@ library base >= 4.6 && <4.11, array >= 0.4 && <0.6, ghc-prim >= 0.3 && <0.6, - async >= 2.0 && <2.2, + async >= 2.0 && <2.3, deepseq >= 1.3 && <1.5, containers >= 0.5 && <0.6, hashable >= 1.2 && <1.3, From 9a61a70a199a846c18b8fb37d3cb1166c26a0ef3 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 5 Feb 2018 14:33:12 +0000 Subject: [PATCH 214/295] Looser lower-bound on Data.Kind export for GHC 8.0.x for #79 --- src/Protolude/Base.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Protolude/Base.hs b/src/Protolude/Base.hs index 9453c8dcc0..bda508886e 100644 --- a/src/Protolude/Base.hs +++ b/src/Protolude/Base.hs @@ -96,6 +96,7 @@ import GHC.Stack as X ( , prettyCallStack , withFrozenCallStack ) +#endif #if ( __GLASGOW_HASKELL__ >= 710 ) import GHC.TypeLits as X ( @@ -117,15 +118,15 @@ import GHC.TypeLits as X ( import GHC.Records as X ( HasField(..) ) +#endif +#if ( __GLASGOW_HASKELL__ >= 800 ) import Data.Kind as X ( type (*) , type Type ) #endif -#endif - -- Default Prelude defines this at the toplevel module, so we do as well. infixr 0 $! From 81dcc985fc9ec1d00d349deee2d8410573be7564 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 5 Feb 2018 14:52:51 +0000 Subject: [PATCH 215/295] Bump minor version --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index c2d652c592..a1fb5e7252 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.2.1 +version: 0.2.2 synopsis: A small prelude. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude From 70fca4ab9c465d0b8d42c6a15186f20fc5d8b0fd Mon Sep 17 00:00:00 2001 From: ven Date: Thu, 8 Feb 2018 14:55:00 +0100 Subject: [PATCH 216/295] Fix symbols.md rendering (#80) --- Symbols.md | 1908 ++++++++++++++++++++++++++-------------------------- 1 file changed, 954 insertions(+), 954 deletions(-) diff --git a/Symbols.md b/Symbols.md index 3900a3337c..1ad8dafde3 100644 --- a/Symbols.md +++ b/Symbols.md @@ -1,954 +1,954 @@ -* $ -* $! -* $!! -* $> -* % -* & -* && -* * -* ** -* *> -* + -* ++ -* - -* . -* .&. -* .|. -* / -* /= -* :% -* :*: -* :+ -* :+: -* :~: -* < -* <$ -* <$!> -* <$> -* <* -* <**> -* <*> -* <.> -* <= -* <=< -* <> -* <|> -* =<< -* == -* == -* > -* >= -* >=> -* >> -* >>= -* All -* AllocationLimitExceeded -* Alt -* Alternative -* Any -* Any -* AppendMode -* Applicative -* ArithException -* ArrayException -* AssertionFailed -* AssertionFailed -* Async -* AsyncException -* Bifunctor -* Bits -* BlockedIndefinitelyOnMVar -* BlockedIndefinitelyOnMVar -* BlockedIndefinitelyOnSTM -* BlockedIndefinitelyOnSTM -* Bool -* Bool -* Bounded -* ByteString -* C1 -* Chan -* Char -* Coercible -* Coercion -* Coercion -* Complex -* Concurrently -* Concurrently -* Const -* Const -* Constraint -* Constructor -* D# -* D1 -* Deadlock -* Deadlock -* Denormal -* DivideByZero -* Double -* Double# -* Down -* Down -* Dual -* Dual -* EQ -* Either -* Endo -* Endo -* Enum -* Eq -* ErrorCall -* ErrorCall -* Except -* ExceptT -* Exception -* ExitCode -* ExitFailure -* ExitSuccess -* F# -* FFExponent -* FFFixed -* FFFormat -* FFGeneric -* False -* FatalError -* FatalError -* FilePath -* FiniteBits -* First -* First -* Fixity -* Float -* Float# -* Floating -* Foldable -* Fractional -* FunPtr -* Functor -* GT -* Generic -* Handle -* Handler -* Handler -* HeapOverflow -* IO -* IOException -* IOMode -* Identity -* Identity -* IndexOutOfBounds -* Infix -* Int -* Int -* Int16 -* Int32 -* Int64 -* Int8 -* IntMap -* IntSet -* Integer -* Integral -* IsString -* Just -* K1 -* K1 -* LByteString -* LT -* LText -* Last -* Last -* Left -* Leniency -* Lenient -* LossOfPrecision -* M1 -* M1 -* MVar -* Map -* MaskedInterruptible -* MaskedUninterruptible -* MaskingState -* Maybe -* Monad -* MonadError -* MonadIO -* MonadPlus -* MonadReader -* MonadState -* Monoid -* NFData -* NestedAtomically -* NestedAtomically -* NoMethodError -* NoMethodError -* NonTermination -* NonTermination -* Nothing -* Num -* Ord -* Ordering -* Ordering -* Overflow -* PatternMatchFail -* PatternMatchFail -* Prefix -* Print -* Product -* Product -* Proxy -* Proxy -* Ptr -* QSem -* QSemN -* Ratio -* RatioZeroDenominator -* Rational -* Read -* ReadMode -* ReadWriteMode -* Reader -* ReaderT -* Real -* RealFloat -* RealFrac -* RealWorld -* Rec0 -* RecConError -* RecConError -* RecSelError -* RecSelError -* RecUpdError -* RecUpdError -* Refl -* Rep -* Rep -* Right -* S1 -* ST -* STM -* Selector -* Semiring -* Seq -* Set -* Show -* SomeAsyncException -* SomeAsyncException -* SomeException -* SomeException -* StackOverflow -* State -* StateT -* Storable -* Strict -* StringConv -* Sum -* Sum -* Text -* ThreadId -* ThreadKilled -* Traversable -* True -* TypeRep -* Typeable -* U1 -* U1 -* UndefinedElement -* Underflow -* Unmasked -* UserInterrupt -* V1 -* Void -* Word -* Word -* Word16 -* Word32 -* Word64 -* Word8 -* WriteMode -* ZipList -* ZipList -* ^ -* ^%^ -* ^^ -* ^^%^^ -* abs -* absInteger -* absurd -* acos -* acosDouble -* acosFloat -* acosh -* addMVarFinalizer -* all -* allowInterrupt -* always -* alwaysSucceeds -* and -* andInteger -* any -* ap -* appEndo -* appendFile -* applyN -* asTypeOf -* asin -* asinDouble -* asinFloat -* asinh -* ask -* asks -* asum -* async -* asyncBound -* asyncExceptionFromException -* asyncExceptionToException -* asyncOn -* asyncOnWithUnmask -* asyncThreadId -* asyncWithUnmask -* atDef -* atMay -* atan -* atan2 -* atanDouble -* atanFloat -* atanh -* atomically -* bimap -* bit -* bitDefault -* bitSize -* bitSizeMaybe -* bool -* boundedEnumFrom -* boundedEnumFromThen -* bracket -* bracketOnError -* bracket_ -* break -* byteSwap16 -* byteSwap32 -* byteSwap64 -* cancel -* cancelWith -* cast -* castWith -* catMaybes -* catch -* catchError -* catchJust -* catchSTM -* catches -* ceiling -* check -* chr -* cis -* clamp -* clearBit -* coerceWith -* compare -* compareInteger -* comparing -* complement -* complementBit -* complementInteger -* conFixity -* conIsRecord -* conName -* concat -* concatMap -* concatMapM -* concurrently -* conjugate -* const -* cos -* cosDouble -* cosFloat -* cosh -* coshDouble -* coshFloat -* countLeadingZeros -* countTrailingZeros -* curry -* cycle -* decodeDoubleInteger -* decodeFloat -* decodeUtf8 -* decodeUtf8' -* decodeUtf8With -* deepseq -* denominator -* die -* div -* divInteger -* divMod -* divModInteger -* divZeroError -* divideDouble -* divideFloat -* double2Float -* double2Int -* doubleFromInteger -* drop -* dropWhile -* dupChan -* either -* eitherA -* elem -* empty -* encodeDoubleInteger -* encodeFloat -* encodeFloatInteger -* encodeUtf8 -* enumFrom -* enumFromThen -* enumFromThenTo -* enumFromTo -* eqDouble -* eqFloat -* eqInteger -* eqInteger# -* eqT -* error -* evalState -* evalStateT -* evaluate -* even -* execState -* execStateT -* exitFailure -* exitSuccess -* exitWith -* exp -* expDouble -* expFloat -* exponent -* expt -* expts -* expts10 -* fatalErrorMessage -* filter -* filterM -* finally -* find -* finiteBitSize -* first -* fix -* fixST -* flip -* float2Double -* float2Int -* floatDigits -* floatFromInteger -* floatRadix -* floatRange -* floatToDigits -* floor -* fmap -* fmapDefault -* fold -* foldM -* foldM_ -* foldMap -* foldMapDefault -* foldl -* foldl' -* foldl1May -* foldlM -* foldr -* foldr' -* foldr1May -* foldrM -* for -* forConcurrently -* forM -* forM_ -* for_ -* force -* forever -* forkFinally -* forkIO -* forkIOWithUnmask -* forkOS -* forkOn -* forkOnWithUnmask -* formatRealFloat -* formatRealFloatAlt -* from -* fromEnum -* fromEnumError -* fromException -* fromInteger -* fromIntegral -* fromMaybe -* fromRat -* fromRat' -* fromRat'' -* fromRational -* fromStrict -* fst -* gcastWith -* gcd -* gcdInt' -* gcdWord' -* geDouble -* geFloat -* geInteger -* geInteger# -* get -* getAll -* getAlt -* getAny -* getArgs -* getChanContents -* getConst -* getContents -* getDual -* getFirst -* getLast -* getLine -* getMaskingState -* getNumCapabilities -* getProduct -* getSum -* getZipList -* gets -* group -* gtDouble -* gtFloat -* gtInteger -* gtInteger# -* guard -* guardM -* handle -* handleJust -* hashInteger -* head -* headDef -* headMay -* hPutStr -* hPutStrLn -* identity -* ifM -* imagPart -* infinity -* initDef -* initMay -* initSafe -* inits -* int2Double -* int2Float -* integerLogBase -* integerToInt -* integerToWord -* integralEnumFrom -* integralEnumFromThen -* integralEnumFromThenTo -* integralEnumFromTo -* interact -* intercalate -* intersperse -* ioError -* isCurrentThreadBound -* isDenormalized -* isDoubleDenormalized -* isDoubleFinite -* isDoubleInfinite -* isDoubleNaN -* isDoubleNegativeZero -* isEmptyChan -* isEmptyMVar -* isFloatDenormalized -* isFloatFinite -* isFloatInfinite -* isFloatNaN -* isFloatNegativeZero -* isIEEE -* isInfinite -* isJust -* isLeft -* isNaN -* isNegativeZero -* isNothing -* isPrefixOf -* isRight -* isSigned -* iterate -* join -* killThread -* lastDef -* lastMay -* lcm -* leDouble -* leFloat -* leInteger -* leInteger# -* leftToMaybe -* lefts -* length -* lift -* liftA -* liftA2 -* liftA3 -* liftIO -* liftM -* liftM' -* liftM2 -* liftM2' -* liftM3 -* liftM4 -* liftM5 -* link -* link2 -* list -* listToMaybe -* local -* log -* logBase -* logDouble -* logFloat -* ltDouble -* ltFloat -* ltInteger -* ltInteger# -* magnitude -* many -* map -* mapAccumL -* mapAccumR -* mapAndUnzipM -* mapConcurrently -* mapException -* mapM -* mapM_ -* mapMaybe -* mappend -* mask -* mask_ -* max -* maxBound -* maxExpt -* maxExpt10 -* maxInt -* maximum -* maximumBy -* maybe -* maybeToEither -* maybeToLeft -* maybeToList -* maybeToRight -* mconcat -* mempty -* mfilter -* min -* minBound -* minExpt -* minInt -* minimum -* minimumBy -* minusDouble -* minusFloat -* minusInteger -* mkInteger -* mkPolar -* mkWeakMVar -* mkWeakThreadId -* mod -* modInteger -* modify -* modifyMVar -* modifyMVarMasked -* modifyMVarMasked_ -* modifyMVar_ -* mplus -* msum -* myThreadId -* mzero -* neDouble -* neFloat -* negate -* negateDouble -* negateFloat -* negateInteger -* neqInteger -* neqInteger# -* newChan -* newEmptyMVar -* newMVar -* newQSem -* newQSemN -* not -* notANumber -* notElem -* notImplemented -* null -* numerator -* numericEnumFrom -* numericEnumFromThen -* numericEnumFromThenTo -* numericEnumFromTo -* odd -* on -* onException -* one -* openFile -* optional -* or -* orAlt -* orElse -* orEmpty -* orInteger -* ord -* ordNub -* otherwise -* overflowError -* panic -* partitionEithers -* permutations -* phase -* pi -* plusDouble -* plusFloat -* plusInteger -* polar -* poll -* pollSTM -* popCount -* popCountDefault -* powerDouble -* powerFloat -* pred -* predError -* print -* product -* properFraction -* pure -* put -* putLText -* putMVar -* putStr -* putStrLn -* putText -* quot -* quotInteger -* quotRem -* quotRemInteger -* race -* race_ -* ratioPrec -* ratioPrec1 -* ratioZeroDenominatorError -* rationalToDouble -* rationalToFloat -* readChan -* readEither -* readFile -* readMVar -* readMaybe -* reader -* reads -* realPart -* realToFrac -* recip -* reduce -* rem -* remInteger -* repeat -* replicate -* replicateM -* replicateM_ -* retry -* return -* reverse -* rightToMaybe -* rights -* rnf -* rotate -* rotateL -* rotateR -* round -* roundTo -* rtsSupportsBoundThreads -* runConcurrently -* runExcept -* runExceptT -* runIdentity -* runInBoundThread -* runInUnboundThread -* runReader -* runReaderT -* runST -* runState -* runStateT -* scaleFloat -* scanl -* scanl' -* scanr -* second -* selName -* seq -* sequence -* sequenceA -* sequenceA_ -* sequence_ -* setBit -* setNumCapabilities -* shift -* shiftL -* shiftLInteger -* shiftR -* shiftRInteger -* show -* signalQSem -* signalQSemN -* significand -* signum -* signumInteger -* sin -* sinDouble -* sinFloat -* sinh -* sinhDouble -* sinhFloat -* smallInteger -* snd -* some -* sort -* sortBy -* sortOn -* splitAt -* sqrt -* sqrtDouble -* sqrtFloat -* stToIO -* state -* stderr -* stdin -* stdout -* strConv -* subsequences -* subtract -* succ -* succError -* sum -* swap -* swapMVar -* sym -* tailDef -* tailMay -* tailSafe -* tails -* take -* takeMVar -* takeWhile -* tan -* tanDouble -* tanFloat -* tanh -* tanhDouble -* tanhFloat -* testBit -* testBitDefault -* testBitInteger -* threadCapability -* threadDelay -* threadWaitRead -* threadWaitReadSTM -* threadWaitWrite -* threadWaitWriteSTM -* throwError -* throwIO -* throwSTM -* throwTo -* timesDouble -* timesFloat -* timesInteger -* to -* toEnum -* toEnumError -* toException -* toInteger -* toIntegralSized -* toList -* toRational -* toS -* toSL -* toStrict -* trace -* traceIO -* traceM -* traceShow -* traceShowM -* trans -* transpose -* traverse -* traverse_ -* truncate -* try -* tryJust -* tryPutMVar -* tryReadMVar -* tryTakeMVar -* typeRep -* unGetChan -* unK1 -* unM1 -* uncons -* uncurry -* undefined -* unfoldr -* uninterruptibleMask -* uninterruptibleMask_ -* unless -* unlessM -* unsnoc -* vacuous -* void -* wait -* waitAny -* waitAnyCancel -* waitAnyCatch -* waitAnyCatchCancel -* waitAnyCatchSTM -* waitAnySTM -* waitBoth -* waitBothSTM -* waitCatch -* waitCatchSTM -* waitEither -* waitEitherCancel -* waitEitherCatch -* waitEitherCatchCancel -* waitEitherCatchSTM -* waitEitherSTM -* waitEitherSTM_ -* waitEither_ -* waitQSem -* waitQSemN -* waitSTM -* when -* whenM -* withAsync -* withAsyncBound -* withAsyncOn -* withAsyncOnWithUnmask -* withAsyncWithUnmask -* withFile -* withMVar -* withMVarMasked -* withState -* word2Double -* word2Float -* wordToInteger -* writeChan -* writeFile -* writeList2Chan -* xor -* xorInteger -* yield -* zero -* zeroBits -* zip -* zipWith -* zipWithM -* zipWithM_ -* || +* `$` +* `$!` +* `$!!` +* `$>` +* `%` +* `&` +* `&&` +* `*` +* `**` +* `*>` +* `+` +* `++` +* `-` +* `.` +* `.&.` +* `.|.` +* `/` +* `/=` +* `:%` +* `:*:` +* `:+` +* `:+:` +* `:~:` +* `<` +* `<$` +* `<$!>` +* `<$>` +* `<*` +* `<**>` +* `<*>` +* `<.>` +* `<=` +* `<=<` +* `<>` +* `<|>` +* `=<<` +* `==` +* `==` +* `>` +* `>=` +* `>=>` +* `>>` +* `>>=` +* `All` +* `AllocationLimitExceeded` +* `Alt` +* `Alternative` +* `Any` +* `Any` +* `AppendMode` +* `Applicative` +* `ArithException` +* `ArrayException` +* `AssertionFailed` +* `AssertionFailed` +* `Async` +* `AsyncException` +* `Bifunctor` +* `Bits` +* `BlockedIndefinitelyOnMVar` +* `BlockedIndefinitelyOnMVar` +* `BlockedIndefinitelyOnSTM` +* `BlockedIndefinitelyOnSTM` +* `Bool` +* `Bool` +* `Bounded` +* `ByteString` +* `C1` +* `Chan` +* `Char` +* `Coercible` +* `Coercion` +* `Coercion` +* `Complex` +* `Concurrently` +* `Concurrently` +* `Const` +* `Const` +* `Constraint` +* `Constructor` +* `D#` +* `D1` +* `Deadlock` +* `Deadlock` +* `Denormal` +* `DivideByZero` +* `Double` +* `Double#` +* `Down` +* `Down` +* `Dual` +* `Dual` +* `EQ` +* `Either` +* `Endo` +* `Endo` +* `Enum` +* `Eq` +* `ErrorCall` +* `ErrorCall` +* `Except` +* `ExceptT` +* `Exception` +* `ExitCode` +* `ExitFailure` +* `ExitSuccess` +* `F#` +* `FFExponent` +* `FFFixed` +* `FFFormat` +* `FFGeneric` +* `False` +* `FatalError` +* `FatalError` +* `FilePath` +* `FiniteBits` +* `First` +* `First` +* `Fixity` +* `Float` +* `Float#` +* `Floating` +* `Foldable` +* `Fractional` +* `FunPtr` +* `Functor` +* `GT` +* `Generic` +* `Handle` +* `Handler` +* `Handler` +* `HeapOverflow` +* `IO` +* `IOException` +* `IOMode` +* `Identity` +* `Identity` +* `IndexOutOfBounds` +* `Infix` +* `Int` +* `Int` +* `Int16` +* `Int32` +* `Int64` +* `Int8` +* `IntMap` +* `IntSet` +* `Integer` +* `Integral` +* `IsString` +* `Just` +* `K1` +* `K1` +* `LByteString` +* `LT` +* `LText` +* `Last` +* `Last` +* `Left` +* `Leniency` +* `Lenient` +* `LossOfPrecision` +* `M1` +* `M1` +* `MVar` +* `Map` +* `MaskedInterruptible` +* `MaskedUninterruptible` +* `MaskingState` +* `Maybe` +* `Monad` +* `MonadError` +* `MonadIO` +* `MonadPlus` +* `MonadReader` +* `MonadState` +* `Monoid` +* `NFData` +* `NestedAtomically` +* `NestedAtomically` +* `NoMethodError` +* `NoMethodError` +* `NonTermination` +* `NonTermination` +* `Nothing` +* `Num` +* `Ord` +* `Ordering` +* `Ordering` +* `Overflow` +* `PatternMatchFail` +* `PatternMatchFail` +* `Prefix` +* `Print` +* `Product` +* `Product` +* `Proxy` +* `Proxy` +* `Ptr` +* `QSem` +* `QSemN` +* `Ratio` +* `RatioZeroDenominator` +* `Rational` +* `Read` +* `ReadMode` +* `ReadWriteMode` +* `Reader` +* `ReaderT` +* `Real` +* `RealFloat` +* `RealFrac` +* `RealWorld` +* `Rec0` +* `RecConError` +* `RecConError` +* `RecSelError` +* `RecSelError` +* `RecUpdError` +* `RecUpdError` +* `Refl` +* `Rep` +* `Rep` +* `Right` +* `S1` +* `ST` +* `STM` +* `Selector` +* `Semiring` +* `Seq` +* `Set` +* `Show` +* `SomeAsyncException` +* `SomeAsyncException` +* `SomeException` +* `SomeException` +* `StackOverflow` +* `State` +* `StateT` +* `Storable` +* `Strict` +* `StringConv` +* `Sum` +* `Sum` +* `Text` +* `ThreadId` +* `ThreadKilled` +* `Traversable` +* `True` +* `TypeRep` +* `Typeable` +* `U1` +* `U1` +* `UndefinedElement` +* `Underflow` +* `Unmasked` +* `UserInterrupt` +* `V1` +* `Void` +* `Word` +* `Word` +* `Word16` +* `Word32` +* `Word64` +* `Word8` +* `WriteMode` +* `ZipList` +* `ZipList` +* `^` +* `^%^` +* `^^` +* `^^%^^` +* `abs` +* `absInteger` +* `absurd` +* `acos` +* `acosDouble` +* `acosFloat` +* `acosh` +* `addMVarFinalizer` +* `all` +* `allowInterrupt` +* `always` +* `alwaysSucceeds` +* `and` +* `andInteger` +* `any` +* `ap` +* `appEndo` +* `appendFile` +* `applyN` +* `asTypeOf` +* `asin` +* `asinDouble` +* `asinFloat` +* `asinh` +* `ask` +* `asks` +* `asum` +* `async` +* `asyncBound` +* `asyncExceptionFromException` +* `asyncExceptionToException` +* `asyncOn` +* `asyncOnWithUnmask` +* `asyncThreadId` +* `asyncWithUnmask` +* `atDef` +* `atMay` +* `atan` +* `atan2` +* `atanDouble` +* `atanFloat` +* `atanh` +* `atomically` +* `bimap` +* `bit` +* `bitDefault` +* `bitSize` +* `bitSizeMaybe` +* `bool` +* `boundedEnumFrom` +* `boundedEnumFromThen` +* `bracket` +* `bracketOnError` +* `bracket_` +* `break` +* `byteSwap16` +* `byteSwap32` +* `byteSwap64` +* `cancel` +* `cancelWith` +* `cast` +* `castWith` +* `catMaybes` +* `catch` +* `catchError` +* `catchJust` +* `catchSTM` +* `catches` +* `ceiling` +* `check` +* `chr` +* `cis` +* `clamp` +* `clearBit` +* `coerceWith` +* `compare` +* `compareInteger` +* `comparing` +* `complement` +* `complementBit` +* `complementInteger` +* `conFixity` +* `conIsRecord` +* `conName` +* `concat` +* `concatMap` +* `concatMapM` +* `concurrently` +* `conjugate` +* `const` +* `cos` +* `cosDouble` +* `cosFloat` +* `cosh` +* `coshDouble` +* `coshFloat` +* `countLeadingZeros` +* `countTrailingZeros` +* `curry` +* `cycle` +* `decodeDoubleInteger` +* `decodeFloat` +* `decodeUtf8` +* `decodeUtf8'` +* `decodeUtf8With` +* `deepseq` +* `denominator` +* `die` +* `div` +* `divInteger` +* `divMod` +* `divModInteger` +* `divZeroError` +* `divideDouble` +* `divideFloat` +* `double2Float` +* `double2Int` +* `doubleFromInteger` +* `drop` +* `dropWhile` +* `dupChan` +* `either` +* `eitherA` +* `elem` +* `empty` +* `encodeDoubleInteger` +* `encodeFloat` +* `encodeFloatInteger` +* `encodeUtf8` +* `enumFrom` +* `enumFromThen` +* `enumFromThenTo` +* `enumFromTo` +* `eqDouble` +* `eqFloat` +* `eqInteger` +* `eqInteger#` +* `eqT` +* `error` +* `evalState` +* `evalStateT` +* `evaluate` +* `even` +* `execState` +* `execStateT` +* `exitFailure` +* `exitSuccess` +* `exitWith` +* `exp` +* `expDouble` +* `expFloat` +* `exponent` +* `expt` +* `expts` +* `expts10` +* `fatalErrorMessage` +* `filter` +* `filterM` +* `finally` +* `find` +* `finiteBitSize` +* `first` +* `fix` +* `fixST` +* `flip` +* `float2Double` +* `float2Int` +* `floatDigits` +* `floatFromInteger` +* `floatRadix` +* `floatRange` +* `floatToDigits` +* `floor` +* `fmap` +* `fmapDefault` +* `fold` +* `foldM` +* `foldM_` +* `foldMap` +* `foldMapDefault` +* `foldl` +* `foldl'` +* `foldl1May` +* `foldlM` +* `foldr` +* `foldr'` +* `foldr1May` +* `foldrM` +* `for` +* `forConcurrently` +* `forM` +* `forM_` +* `for_` +* `force` +* `forever` +* `forkFinally` +* `forkIO` +* `forkIOWithUnmask` +* `forkOS` +* `forkOn` +* `forkOnWithUnmask` +* `formatRealFloat` +* `formatRealFloatAlt` +* `from` +* `fromEnum` +* `fromEnumError` +* `fromException` +* `fromInteger` +* `fromIntegral` +* `fromMaybe` +* `fromRat` +* `fromRat'` +* `fromRat''` +* `fromRational` +* `fromStrict` +* `fst` +* `gcastWith` +* `gcd` +* `gcdInt'` +* `gcdWord'` +* `geDouble` +* `geFloat` +* `geInteger` +* `geInteger#` +* `get` +* `getAll` +* `getAlt` +* `getAny` +* `getArgs` +* `getChanContents` +* `getConst` +* `getContents` +* `getDual` +* `getFirst` +* `getLast` +* `getLine` +* `getMaskingState` +* `getNumCapabilities` +* `getProduct` +* `getSum` +* `getZipList` +* `gets` +* `group` +* `gtDouble` +* `gtFloat` +* `gtInteger` +* `gtInteger#` +* `guard` +* `guardM` +* `handle` +* `handleJust` +* `hashInteger` +* `head` +* `headDef` +* `headMay` +* `hPutStr` +* `hPutStrLn` +* `identity` +* `ifM` +* `imagPart` +* `infinity` +* `initDef` +* `initMay` +* `initSafe` +* `inits` +* `int2Double` +* `int2Float` +* `integerLogBase` +* `integerToInt` +* `integerToWord` +* `integralEnumFrom` +* `integralEnumFromThen` +* `integralEnumFromThenTo` +* `integralEnumFromTo` +* `interact` +* `intercalate` +* `intersperse` +* `ioError` +* `isCurrentThreadBound` +* `isDenormalized` +* `isDoubleDenormalized` +* `isDoubleFinite` +* `isDoubleInfinite` +* `isDoubleNaN` +* `isDoubleNegativeZero` +* `isEmptyChan` +* `isEmptyMVar` +* `isFloatDenormalized` +* `isFloatFinite` +* `isFloatInfinite` +* `isFloatNaN` +* `isFloatNegativeZero` +* `isIEEE` +* `isInfinite` +* `isJust` +* `isLeft` +* `isNaN` +* `isNegativeZero` +* `isNothing` +* `isPrefixOf` +* `isRight` +* `isSigned` +* `iterate` +* `join` +* `killThread` +* `lastDef` +* `lastMay` +* `lcm` +* `leDouble` +* `leFloat` +* `leInteger` +* `leInteger#` +* `leftToMaybe` +* `lefts` +* `length` +* `lift` +* `liftA` +* `liftA2` +* `liftA3` +* `liftIO` +* `liftM` +* `liftM'` +* `liftM2` +* `liftM2'` +* `liftM3` +* `liftM4` +* `liftM5` +* `link` +* `link2` +* `list` +* `listToMaybe` +* `local` +* `log` +* `logBase` +* `logDouble` +* `logFloat` +* `ltDouble` +* `ltFloat` +* `ltInteger` +* `ltInteger#` +* `magnitude` +* `many` +* `map` +* `mapAccumL` +* `mapAccumR` +* `mapAndUnzipM` +* `mapConcurrently` +* `mapException` +* `mapM` +* `mapM_` +* `mapMaybe` +* `mappend` +* `mask` +* `mask_` +* `max` +* `maxBound` +* `maxExpt` +* `maxExpt10` +* `maxInt` +* `maximum` +* `maximumBy` +* `maybe` +* `maybeToEither` +* `maybeToLeft` +* `maybeToList` +* `maybeToRight` +* `mconcat` +* `mempty` +* `mfilter` +* `min` +* `minBound` +* `minExpt` +* `minInt` +* `minimum` +* `minimumBy` +* `minusDouble` +* `minusFloat` +* `minusInteger` +* `mkInteger` +* `mkPolar` +* `mkWeakMVar` +* `mkWeakThreadId` +* `mod` +* `modInteger` +* `modify` +* `modifyMVar` +* `modifyMVarMasked` +* `modifyMVarMasked_` +* `modifyMVar_` +* `mplus` +* `msum` +* `myThreadId` +* `mzero` +* `neDouble` +* `neFloat` +* `negate` +* `negateDouble` +* `negateFloat` +* `negateInteger` +* `neqInteger` +* `neqInteger#` +* `newChan` +* `newEmptyMVar` +* `newMVar` +* `newQSem` +* `newQSemN` +* `not` +* `notANumber` +* `notElem` +* `notImplemented` +* `null` +* `numerator` +* `numericEnumFrom` +* `numericEnumFromThen` +* `numericEnumFromThenTo` +* `numericEnumFromTo` +* `odd` +* `on` +* `onException` +* `one` +* `openFile` +* `optional` +* `or` +* `orAlt` +* `orElse` +* `orEmpty` +* `orInteger` +* `ord` +* `ordNub` +* `otherwise` +* `overflowError` +* `panic` +* `partitionEithers` +* `permutations` +* `phase` +* `pi` +* `plusDouble` +* `plusFloat` +* `plusInteger` +* `polar` +* `poll` +* `pollSTM` +* `popCount` +* `popCountDefault` +* `powerDouble` +* `powerFloat` +* `pred` +* `predError` +* `print` +* `product` +* `properFraction` +* `pure` +* `put` +* `putLText` +* `putMVar` +* `putStr` +* `putStrLn` +* `putText` +* `quot` +* `quotInteger` +* `quotRem` +* `quotRemInteger` +* `race` +* `race_` +* `ratioPrec` +* `ratioPrec1` +* `ratioZeroDenominatorError` +* `rationalToDouble` +* `rationalToFloat` +* `readChan` +* `readEither` +* `readFile` +* `readMVar` +* `readMaybe` +* `reader` +* `reads` +* `realPart` +* `realToFrac` +* `recip` +* `reduce` +* `rem` +* `remInteger` +* `repeat` +* `replicate` +* `replicateM` +* `replicateM_` +* `retry` +* `return` +* `reverse` +* `rightToMaybe` +* `rights` +* `rnf` +* `rotate` +* `rotateL` +* `rotateR` +* `round` +* `roundTo` +* `rtsSupportsBoundThreads` +* `runConcurrently` +* `runExcept` +* `runExceptT` +* `runIdentity` +* `runInBoundThread` +* `runInUnboundThread` +* `runReader` +* `runReaderT` +* `runST` +* `runState` +* `runStateT` +* `scaleFloat` +* `scanl` +* `scanl'` +* `scanr` +* `second` +* `selName` +* `seq` +* `sequence` +* `sequenceA` +* `sequenceA_` +* `sequence_` +* `setBit` +* `setNumCapabilities` +* `shift` +* `shiftL` +* `shiftLInteger` +* `shiftR` +* `shiftRInteger` +* `show` +* `signalQSem` +* `signalQSemN` +* `significand` +* `signum` +* `signumInteger` +* `sin` +* `sinDouble` +* `sinFloat` +* `sinh` +* `sinhDouble` +* `sinhFloat` +* `smallInteger` +* `snd` +* `some` +* `sort` +* `sortBy` +* `sortOn` +* `splitAt` +* `sqrt` +* `sqrtDouble` +* `sqrtFloat` +* `stToIO` +* `state` +* `stderr` +* `stdin` +* `stdout` +* `strConv` +* `subsequences` +* `subtract` +* `succ` +* `succError` +* `sum` +* `swap` +* `swapMVar` +* `sym` +* `tailDef` +* `tailMay` +* `tailSafe` +* `tails` +* `take` +* `takeMVar` +* `takeWhile` +* `tan` +* `tanDouble` +* `tanFloat` +* `tanh` +* `tanhDouble` +* `tanhFloat` +* `testBit` +* `testBitDefault` +* `testBitInteger` +* `threadCapability` +* `threadDelay` +* `threadWaitRead` +* `threadWaitReadSTM` +* `threadWaitWrite` +* `threadWaitWriteSTM` +* `throwError` +* `throwIO` +* `throwSTM` +* `throwTo` +* `timesDouble` +* `timesFloat` +* `timesInteger` +* `to` +* `toEnum` +* `toEnumError` +* `toException` +* `toInteger` +* `toIntegralSized` +* `toList` +* `toRational` +* `toS` +* `toSL` +* `toStrict` +* `trace` +* `traceIO` +* `traceM` +* `traceShow` +* `traceShowM` +* `trans` +* `transpose` +* `traverse` +* `traverse_` +* `truncate` +* `try` +* `tryJust` +* `tryPutMVar` +* `tryReadMVar` +* `tryTakeMVar` +* `typeRep` +* `unGetChan` +* `unK1` +* `unM1` +* `uncons` +* `uncurry` +* `undefined` +* `unfoldr` +* `uninterruptibleMask` +* `uninterruptibleMask_` +* `unless` +* `unlessM` +* `unsnoc` +* `vacuous` +* `void` +* `wait` +* `waitAny` +* `waitAnyCancel` +* `waitAnyCatch` +* `waitAnyCatchCancel` +* `waitAnyCatchSTM` +* `waitAnySTM` +* `waitBoth` +* `waitBothSTM` +* `waitCatch` +* `waitCatchSTM` +* `waitEither` +* `waitEitherCancel` +* `waitEitherCatch` +* `waitEitherCatchCancel` +* `waitEitherCatchSTM` +* `waitEitherSTM` +* `waitEitherSTM_` +* `waitEither_` +* `waitQSem` +* `waitQSemN` +* `waitSTM` +* `when` +* `whenM` +* `withAsync` +* `withAsyncBound` +* `withAsyncOn` +* `withAsyncOnWithUnmask` +* `withAsyncWithUnmask` +* `withFile` +* `withMVar` +* `withMVarMasked` +* `withState` +* `word2Double` +* `word2Float` +* `wordToInteger` +* `writeChan` +* `writeFile` +* `writeList2Chan` +* `xor` +* `xorInteger` +* `yield` +* `zero` +* `zeroBits` +* `zip` +* `zipWith` +* `zipWithM` +* `zipWithM_` +* `||` From f542a361a4228be1ea3260bdfce4ba96239313f2 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 1 Mar 2018 14:20:42 +0000 Subject: [PATCH 217/295] Bump upper bound of protolude transformers-compat --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index a1fb5e7252..66853bcfb0 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -77,7 +77,7 @@ library bytestring >= 0.10 && <0.11, mtl >= 2.1 && <2.3, mtl-compat >= 0.2 && <0.3, - transformers-compat >= 0.4 && <0.6 + transformers-compat >= 0.4 && <0.7 if impl(ghc >= 7.8.0) build-depends: From 57912017fefa08b00aaf8e945392173f557c1fdc Mon Sep 17 00:00:00 2001 From: Tony Day Date: Mon, 19 Mar 2018 20:11:35 +1000 Subject: [PATCH 218/295] Bump upper bound for base & ghc84 bumps (#82) --- .travis.yml | 2 +- README.md | 34 ++++++++++++++++++---------------- protolude.cabal | 7 +++---- stack-11.0.yaml | 6 ++++++ test_stack_lts.sh | 3 +++ 5 files changed, 31 insertions(+), 21 deletions(-) create mode 100644 stack-11.0.yaml diff --git a/.travis.yml b/.travis.yml index 2bef546d34..a5131aecdd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,8 +19,8 @@ env: - CABALVER=1.22 GHCVER=7.10.2 - CABALVER=1.22 GHCVER=7.10.3 - CABALVER=1.24 GHCVER=8.0.1 - - CABALVER=2.0 GHCVER=8.2.1 - CABALVER=2.0 GHCVER=8.2.2 + - CABALVER=2.2 GHCVER=8.4.1 # Note: the distinction between `before_install` and `install` is not # important. diff --git a/README.md b/README.md index 7e13d6c882..370b777ad5 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,8 @@ Supports: * GHC 7.10.3 * GHC 8.0.1 * GHC 8.0.2 + * GHC 8.2.1 + * GHC 8.4.1 * GHC HEAD Usage @@ -90,22 +92,22 @@ libraries that are universally common across most real-world projects. Lower and upper bounds are fully specified and compatible with both vanilla Cabal and tracks Stack LTS resolver. -| Dependencies | Lower | Upper | -| ----------- | -------- | -------- | -| array | 0.4 | 0.6 | -| async | 2.0 | 2.2 | -| base | 4.6 | 4.11 | -| bytestring | 0.10 | 0.11 | -| containers | 0.5 | 0.6 | -| deepseq | 1.3 | 1.5 | -| ghc-prim | 0.3 | 0.6 | -| integer-gmp | 1.0 | 1.0 | -| mtl | 2.1 | 2.3 | -| safe | 0.3 | 0.4 | -| stm | 2.4 | 2.5 | -| text | 1.2 | 1.3 | -| hashable | 1.2 | 1.3 | -| transformers | 0.4 | 0.6 | +| Dependencies | Lower (>=) | Upper (<) | +| ----------- | -------- | -------- | +| array | 0.4 | 0.6 | +| async | 2.0 | 2.3 | +| base | 4.6 | 4.12 | +| bytestring | 0.10 | 0.11 | +| containers | 0.5 | 0.6 | +| deepseq | 1.3 | 1.5 | +| ghc-prim | 0.3 | 0.6 | +| hashable | 1.2 | 1.3 | +| mtl | 2.1 | 2.3 | +| safe | 0.3 | 0.4 | +| stm | 2.4 | 2.5 | +| text | 1.2 | 1.3 | +| transformers | 0.4 | 0.6 | +| | | | Structure --------- diff --git a/protolude.cabal b/protolude.cabal index 66853bcfb0..8cee067c0b 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -24,10 +24,9 @@ tested-with: GHC == 7.10.2, GHC == 7.10.3, GHC == 8.0.1, - GHC == 8.2.1 + GHC == 8.2.1, + GHC == 8.4.1 -description: - A sensible set of defaults for writing custom Preludes. Source-Repository head type: git location: git@github.com:sdiehl/protolude.git @@ -64,7 +63,7 @@ library -fwarn-implicit-prelude build-depends: - base >= 4.6 && <4.11, + base >= 4.6 && <4.12, array >= 0.4 && <0.6, ghc-prim >= 0.3 && <0.6, async >= 2.0 && <2.3, diff --git a/stack-11.0.yaml b/stack-11.0.yaml new file mode 100644 index 0000000000..d487ddd516 --- /dev/null +++ b/stack-11.0.yaml @@ -0,0 +1,6 @@ +resolver: lts-11.0 +packages: +- '.' +extra-deps: +flags: {} +extra-package-dbs: [] diff --git a/test_stack_lts.sh b/test_stack_lts.sh index d6f40cabf4..69be9fdf09 100755 --- a/test_stack_lts.sh +++ b/test_stack_lts.sh @@ -15,3 +15,6 @@ STACK_YAML=stack-9.0.yaml stack build --no-terminal echo -e "\e[92mLTS 10.0" STACK_YAML=stack-10.0.yaml stack build --no-terminal + +echo -e "\e[92mLTS 11.0" +STACK_YAML=stack-11.0.yaml stack build --no-terminal From a8d1363581ae70a051a4fb47a92ffb5e5e93c9f8 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 22 Mar 2018 13:31:29 +0000 Subject: [PATCH 219/295] Rework Safe Module (#83) * Initial fork on minimal safe submodule * Add new Safe module Signed-off-by: Stephen Diehl * Refactor Safe module --- CHANGES.md | 10 +++ protolude.cabal | 10 +-- src/Debug.hs | 4 ++ src/Protolude.hs | 5 +- src/Protolude/Safe.hs | 137 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 157 insertions(+), 9 deletions(-) create mode 100644 src/Protolude/Safe.hs diff --git a/CHANGES.md b/CHANGES.md index 04185c86c0..d16824fd2d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,13 @@ +0.2.2 +===== + +* Add explicit `witness` function for use as type witness without warnings. + Makes undefined semantically distinguishable from type witnesses. +* Backwards compatible `Protolude.Safe` module for explicit handling of partial + list operations. +* Export `minimumDef`, `maximumDef`. +* Looser lower-bound on Data.Kind export for GHC 8.0.x. + 0.2.1 ==== diff --git a/protolude.cabal b/protolude.cabal index 8cee067c0b..e87335c9d0 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -7,7 +7,7 @@ license: MIT license-file: LICENSE author: Stephen Diehl maintainer: stephen.m.diehl@gmail.com -copyright: 2016-2017 Stephen Diehl +copyright: 2016-2018 Stephen Diehl category: Prelude build-type: Simple cabal-version: >=1.10 @@ -51,6 +51,7 @@ library Protolude.CallStack Protolude.Error Protolude.Panic + Protolude.Safe default-extensions: NoImplicitPrelude @@ -78,12 +79,5 @@ library mtl-compat >= 0.2 && <0.3, transformers-compat >= 0.4 && <0.7 - if impl(ghc >= 7.8.0) - build-depends: - safe >= 0.3 && <0.4 - else - build-depends: - safe >= 0.3 && <0.3.10 - hs-source-dirs: src default-language: Haskell2010 diff --git a/src/Debug.hs b/src/Debug.hs index b0d7603801..292adbf9cf 100644 --- a/src/Debug.hs +++ b/src/Debug.hs @@ -12,6 +12,7 @@ module Debug ( traceShowId, traceShowM, notImplemented, + witness, ) where import Data.Text (Text, unpack) @@ -63,3 +64,6 @@ notImplemented = error "Not implemented" {-# WARNING undefined "'undefined' remains in code" #-} undefined :: a undefined = error "Prelude.undefined" + +witness :: a +witness = error "Type witness should not be evaluated" diff --git a/src/Protolude.hs b/src/Protolude.hs index 585187c82a..a7d040edc3 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -65,7 +65,7 @@ import Data.String (String) import Data.String as X (IsString) -- Maybe'ized version of partial functions -import Safe as X ( +import Protolude.Safe as X ( headMay , headDef , initMay @@ -78,8 +78,11 @@ import Safe as X ( , lastMay , foldr1May , foldl1May + , foldl1May' , maximumMay , minimumMay + , maximumDef + , minimumDef , atMay , atDef ) diff --git a/src/Protolude/Safe.hs b/src/Protolude/Safe.hs new file mode 100644 index 0000000000..a3c2ff2e7a --- /dev/null +++ b/src/Protolude/Safe.hs @@ -0,0 +1,137 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE Safe #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE NoImplicitPrelude #-} + +module Protolude.Safe ( + headMay + , headDef + , initMay + , initDef + , initSafe + , tailMay + , tailDef + , tailSafe + , lastDef + , lastMay + , foldr1May + , foldl1May + , foldl1May' + , maximumMay + , minimumMay + , maximumDef + , minimumDef + , atMay + , atDef +) where + + +import Data.Ord (Ord(..)) +import Data.Int (Int) +import Data.Char (Char) +import Data.Bool (Bool, otherwise) +import Data.Maybe (Maybe(..), fromMaybe) +import Data.Either (Either(..)) +import Data.Function ((.)) +import Data.List (null, head, last, tail, init, maximum, minimum, foldr1, foldl1, foldl1', (++)) + +import GHC.Num ((-)) +import GHC.Show (show) + +liftMay :: (a -> Bool) -> (a -> b) -> (a -> Maybe b) +liftMay test f val = if test val then Nothing else Just (f val) + +------------------------------------------------------------------------------- +-- Head +------------------------------------------------------------------------------- + +headMay :: [a] -> Maybe a +headMay = liftMay null head + +headDef :: a -> [a] -> a +headDef def = fromMaybe def . headMay + +------------------------------------------------------------------------------- +-- Init +------------------------------------------------------------------------------- + +initMay :: [a] -> Maybe [a] +initMay = liftMay null init + +initDef :: [a] -> [a] -> [a] +initDef def = fromMaybe def . initMay + +initSafe :: [a] -> [a] +initSafe = initDef [] + +------------------------------------------------------------------------------- +-- Tail +------------------------------------------------------------------------------- + +tailMay :: [a] -> Maybe [a] +tailMay = liftMay null tail + +tailDef :: [a] -> [a] -> [a] +tailDef def = fromMaybe def . tailMay + +tailSafe :: [a] -> [a] +tailSafe = tailDef [] + +------------------------------------------------------------------------------- +-- Last +------------------------------------------------------------------------------- + +lastMay :: [a] -> Maybe a +lastMay = liftMay null last + +lastDef :: a -> [a] -> a +lastDef def = fromMaybe def . lastMay + +------------------------------------------------------------------------------- +-- Maximum +------------------------------------------------------------------------------- + +minimumMay, maximumMay :: Ord a => [a] -> Maybe a +minimumMay = liftMay null minimum +maximumMay = liftMay null maximum + +minimumDef, maximumDef :: Ord a => a -> [a] -> a +minimumDef def = fromMaybe def . minimumMay +maximumDef def = fromMaybe def . maximumMay + +------------------------------------------------------------------------------- +-- Foldr +------------------------------------------------------------------------------- + +foldr1May, foldl1May, foldl1May' :: (a -> a -> a) -> [a] -> Maybe a +foldr1May = liftMay null . foldr1 + +------------------------------------------------------------------------------- +-- Foldl +------------------------------------------------------------------------------- + +foldl1May = liftMay null . foldl1 +foldl1May' = liftMay null . foldl1' + +------------------------------------------------------------------------------- +-- At +------------------------------------------------------------------------------- + +at_ :: [a] -> Int -> Either [Char] a +at_ ys o + | o < 0 = Left ("index must not be negative, index=" ++ show o) + | otherwise = f o ys + where + f 0 (x:_) = Right x + f i (_:xs) = f (i-1) xs + f i [] = Left ("index too large, index=" ++ show o ++ ", length=" ++ show (o-i)) + +atMay :: [a] -> Int -> Maybe a +atMay xs i = case xs `at_` i of + Left _ -> Nothing + Right val -> Just val + +atDef :: a -> [a] -> Int -> a +atDef def xs i = case xs `at_` i of + Left _ -> def + Right val -> val From 60943c0596b0ee36d8397bfcb3ede613e3179644 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 26 Mar 2018 11:18:42 +0100 Subject: [PATCH 220/295] Drop safe dependency --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 370b777ad5..a7a8f488b3 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,6 @@ tracks Stack LTS resolver. | ghc-prim | 0.3 | 0.6 | | hashable | 1.2 | 1.3 | | mtl | 2.1 | 2.3 | -| safe | 0.3 | 0.4 | | stm | 2.4 | 2.5 | | text | 1.2 | 1.3 | | transformers | 0.4 | 0.6 | From 243a309bc1d02ce76f0793a4a439553ee43b01ab Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 26 Mar 2018 11:33:46 +0100 Subject: [PATCH 221/295] On Base 4.11 use the provided <&>, fixes #53 --- src/Protolude.hs | 11 ----------- src/Protolude/Functor.hs | 21 ++++++++++++++++++++- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index a7d040edc3..0a2665b88e 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -17,7 +17,6 @@ module Protolude ( print, throwIO, throwTo, - foreach, (<&>), show, pass, guarded, @@ -590,16 +589,6 @@ throwIO = liftIO . Control.Exception.throwIO throwTo :: (X.MonadIO m, Exception e) => ThreadId -> e -> m () throwTo tid e = liftIO (Control.Exception.throwTo tid e) -foreach :: Functor f => f a -> (a -> b) -> f b -foreach = flip fmap - --- | Infix version of foreach. --- --- @<&>@ is to '<$>' what '&' is to '$'. -infixl 4 <&> -(<&>) :: Functor f => f a -> (a -> b) -> f b -(<&>) = foreach - -- | Do nothing returning unit inside applicative. pass :: Applicative f => f () pass = pure () diff --git a/src/Protolude/Functor.hs b/src/Protolude/Functor.hs index f5345becb4..ae4c00298c 100644 --- a/src/Protolude/Functor.hs +++ b/src/Protolude/Functor.hs @@ -7,10 +7,17 @@ module Protolude.Functor ( ($>), (<$>), (<<$>>), + (<&>), void, + foreach, ) where import Data.Function ((.)) +import Data.Function (flip) + +#if MIN_VERSION_base(4,11,0) +import Data.Functor ((<$>)) +#endif #if MIN_VERSION_base(4,7,0) import Data.Functor ( @@ -25,7 +32,6 @@ import Data.Functor ( , (<$>) ) -import Data.Function (flip) infixl 4 $> @@ -40,3 +46,16 @@ infixl 4 <<$>> (<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b) (<<$>>) = fmap . fmap + +foreach :: Functor f => f a -> (a -> b) -> f b +foreach = flip fmap + +#if !MIN_VERSION_base(4,11,0) +-- | Infix version of foreach. +-- +-- @<&>@ is to '<$>' what '&' is to '$'. + +infixl 1 <&> +(<&>) :: Functor f => f a -> (a -> b) -> f b +(<&>) = foreach +#endif From 675837c2326e9c5a4eaf7c17df5b7140f022eb88 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 26 Mar 2018 13:05:57 +0100 Subject: [PATCH 222/295] Fix Data.Functor export list --- src/Protolude/Functor.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Protolude/Functor.hs b/src/Protolude/Functor.hs index ae4c00298c..5520bb18a2 100644 --- a/src/Protolude/Functor.hs +++ b/src/Protolude/Functor.hs @@ -16,7 +16,7 @@ import Data.Function ((.)) import Data.Function (flip) #if MIN_VERSION_base(4,11,0) -import Data.Functor ((<$>)) +import Data.Functor ((<&>)) #endif #if MIN_VERSION_base(4,7,0) From d6a710e40e504260534a095ce187345424c809e8 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 16 Apr 2018 14:42:53 +0100 Subject: [PATCH 223/295] Expose fromLeft and fromRight --- CHANGES.md | 5 +++++ src/Protolude/Either.hs | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index d16824fd2d..aa5cda8f28 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +0.2.3 +===== + +* Expose `fromLeft` and `fromRight`. + 0.2.2 ===== diff --git a/src/Protolude/Either.hs b/src/Protolude/Either.hs index 28eab61644..ba3d81dc44 100644 --- a/src/Protolude/Either.hs +++ b/src/Protolude/Either.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} @@ -8,12 +9,27 @@ module Protolude.Either ( , rightToMaybe , maybeEmpty , maybeToEither +, fromLeft +, fromRight ) where import Data.Function (const) import Data.Monoid (Monoid, mempty) import Data.Maybe (Maybe(..), maybe) import Data.Either (Either(..), either) +#if MIN_VERSION_base(4,10,0) +import Data.Either (fromLeft, fromRight) +#else +-- | Return the contents of a 'Right'-value or a default value otherwise. +fromLeft :: a -> Either a b -> a +fromLeft _ (Left a) = a +fromLeft a _ = a + +-- | Return the contents of a 'Right'-value or a default value otherwise. +fromRight :: b -> Either a b -> b +fromRight _ (Right b) = b +fromRight b _ = b +#endif leftToMaybe :: Either l r -> Maybe l leftToMaybe = either Just (const Nothing) From 3bd6f07f9b5316fa60fae9fd821785eaa38e3735 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 8 May 2018 09:39:55 +0100 Subject: [PATCH 224/295] Remove error function from symbol list --- Symbols.md | 1 - 1 file changed, 1 deletion(-) diff --git a/Symbols.md b/Symbols.md index 1ad8dafde3..db6e3474a8 100644 --- a/Symbols.md +++ b/Symbols.md @@ -408,7 +408,6 @@ * `eqInteger` * `eqInteger#` * `eqT` -* `error` * `evalState` * `evalStateT` * `evaluate` From 8a8eb8c7282adf0fbb360806e32ad7f664018fef Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 28 May 2018 13:21:12 +0300 Subject: [PATCH 225/295] Add extra-source-files (#87) --- protolude.cabal | 1 + 1 file changed, 1 insertion(+) diff --git a/protolude.cabal b/protolude.cabal index e87335c9d0..16b5463d4a 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -26,6 +26,7 @@ tested-with: GHC == 8.0.1, GHC == 8.2.1, GHC == 8.4.1 +extra-source-files: README.md CHANGES.md Source-Repository head type: git From ace10b648cd48d318e322e7f0a87230296d03459 Mon Sep 17 00:00:00 2001 From: David Hewson Date: Sun, 10 Jun 2018 09:20:15 +0100 Subject: [PATCH 226/295] <&> docs fix (#88) `@<&>@` appears as `&` on the page, which seems wrong --- src/Protolude/Functor.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Protolude/Functor.hs b/src/Protolude/Functor.hs index 5520bb18a2..766b292087 100644 --- a/src/Protolude/Functor.hs +++ b/src/Protolude/Functor.hs @@ -53,7 +53,7 @@ foreach = flip fmap #if !MIN_VERSION_base(4,11,0) -- | Infix version of foreach. -- --- @<&>@ is to '<$>' what '&' is to '$'. +-- '<&>' is to '<$>' what '&' is to '$'. infixl 1 <&> (<&>) :: Functor f => f a -> (a -> b) -> f b From 7c0e45c844bedd311ecabf7c423039a98758a453 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 15 Jun 2018 10:29:42 +0100 Subject: [PATCH 227/295] Support LTS-11 family of resolvers for testing --- all_stack.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/all_stack.sh b/all_stack.sh index a71b247cc6..d30e9875b0 100755 --- a/all_stack.sh +++ b/all_stack.sh @@ -60,3 +60,16 @@ stack build --resolver lts-9.20 stack build --resolver lts-10.0 stack build --resolver lts-10.1 stack build --resolver lts-10.2 +stack build --resolver lts-11.0 +stack build --resolver lts-11.1 +stack build --resolver lts-11.2 +stack build --resolver lts-11.3 +stack build --resolver lts-11.4 +stack build --resolver lts-11.5 +stack build --resolver lts-11.6 +stack build --resolver lts-11.7 +stack build --resolver lts-11.8 +stack build --resolver lts-11.10 +stack build --resolver lts-11.11 +stack build --resolver lts-11.12 +stack build --resolver lts-11.13 From f75c99bda80aec39c908d4e61fe16deabad2086a Mon Sep 17 00:00:00 2001 From: Tony Day Date: Sun, 29 Jul 2018 17:04:03 +1000 Subject: [PATCH 228/295] Some fixes for ghc-8.6 (#93) --- src/Protolude.hs | 2 ++ src/Protolude/Base.hs | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index 0a2665b88e..dd3ea31d62 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -492,8 +492,10 @@ import qualified Control.Exception import Control.Monad.STM as X ( STM , atomically +#if ( __GLASGOW_HASKELL__ < 806 ) , always , alwaysSucceeds +#endif , retry , orElse , check diff --git a/src/Protolude/Base.hs b/src/Protolude/Base.hs index bda508886e..f4cae809de 100644 --- a/src/Protolude/Base.hs +++ b/src/Protolude/Base.hs @@ -122,8 +122,10 @@ import GHC.Records as X ( #if ( __GLASGOW_HASKELL__ >= 800 ) import Data.Kind as X ( - type (*) - , type Type + type Type +#if ( __GLASGOW_HASKELL__ < 806 ) + , type (*) +#endif ) #endif From 1b1f82b749b100f48c8f9f91e90177d14791e6c0 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 3 Aug 2018 13:14:31 +0100 Subject: [PATCH 229/295] Export groupBy, fixes #91 --- src/Protolude/List.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Protolude/List.hs b/src/Protolude/List.hs index 364e0d761f..edc79bba37 100644 --- a/src/Protolude/List.hs +++ b/src/Protolude/List.hs @@ -7,10 +7,11 @@ module Protolude.List ( sortOn, list, product, - sum + sum, + groupBy, ) where -import Data.List (sortBy) +import Data.List (sortBy, groupBy) import Data.Maybe (Maybe(..)) import Data.Ord (Ord, comparing) import Data.Foldable (Foldable, foldr, foldl') From 5024f3fef98ab01d4b8d35728982cc38b10de53f Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 1 Oct 2018 17:35:27 +0100 Subject: [PATCH 230/295] Add support for GHC 8.6 (#94) * Add support for GHC 8.6 * Fix STM version bounds on pragma --- .travis.yml | 1 + README.md | 2 +- protolude.cabal | 6 +++--- src/Protolude.hs | 2 +- stack-12.0.yaml | 6 ++++++ 5 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 stack-12.0.yaml diff --git a/.travis.yml b/.travis.yml index a5131aecdd..7c24321283 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ env: - CABALVER=1.24 GHCVER=8.0.1 - CABALVER=2.0 GHCVER=8.2.2 - CABALVER=2.2 GHCVER=8.4.1 + - CABALVER=2.4 GHCVER=8.6.1 # Note: the distinction between `before_install` and `install` is not # important. diff --git a/README.md b/README.md index a7a8f488b3..d28f01383e 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Supports: * GHC 8.0.2 * GHC 8.2.1 * GHC 8.4.1 - * GHC HEAD + * GHC 8.6.1 Usage ----- diff --git a/protolude.cabal b/protolude.cabal index 16b5463d4a..f72a46fe58 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -65,16 +65,16 @@ library -fwarn-implicit-prelude build-depends: - base >= 4.6 && <4.12, + base >= 4.6 && <4.13, array >= 0.4 && <0.6, ghc-prim >= 0.3 && <0.6, async >= 2.0 && <2.3, deepseq >= 1.3 && <1.5, - containers >= 0.5 && <0.6, + containers >= 0.5 && <0.7, hashable >= 1.2 && <1.3, transformers >= 0.2 && <0.6, text >= 1.2 && <1.3, - stm >= 2.4 && <2.5, + stm >= 2.4 && <2.6, bytestring >= 0.10 && <0.11, mtl >= 2.1 && <2.3, mtl-compat >= 0.2 && <0.3, diff --git a/src/Protolude.hs b/src/Protolude.hs index dd3ea31d62..5376ca6bb9 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -492,7 +492,7 @@ import qualified Control.Exception import Control.Monad.STM as X ( STM , atomically -#if ( __GLASGOW_HASKELL__ < 806 ) +#if !(MIN_VERSION_stm(2,5,0)) , always , alwaysSucceeds #endif diff --git a/stack-12.0.yaml b/stack-12.0.yaml new file mode 100644 index 0000000000..d7370699ad --- /dev/null +++ b/stack-12.0.yaml @@ -0,0 +1,6 @@ +resolver: lts-12.0 +packages: +- '.' +extra-deps: +flags: {} +extra-package-dbs: [] From 8c88bc7d64dd8cf520e591af06827c65b24e2cb5 Mon Sep 17 00:00:00 2001 From: Andre Van Der Merwe Date: Mon, 1 Oct 2018 21:20:06 +0200 Subject: [PATCH 231/295] GHC 8.6.1 support (#95) * GHC 8.6.1 support - Bounds changes for base, containers and stm - stack lts 12.* tests - works with stack 8.6.1 nightly stack build --resolver nightly --haddock --test --bench --no-run-benchmarks - works with cabal new-build * GHCVER-8.6.1 --- CHANGES.md | 5 +++++ README.md | 6 +++--- all_stack.sh | 11 +++++++++++ protolude.cabal | 5 +++-- test_stack_lts.sh | 3 +++ 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index aa5cda8f28..7d426fd066 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +0.2.4 +===== + +* GHC 8.6.1 support + 0.2.3 ===== diff --git a/README.md b/README.md index d28f01383e..bf9274014a 100644 --- a/README.md +++ b/README.md @@ -96,14 +96,14 @@ tracks Stack LTS resolver. | ----------- | -------- | -------- | | array | 0.4 | 0.6 | | async | 2.0 | 2.3 | -| base | 4.6 | 4.12 | +| base | 4.6 | 4.13 | | bytestring | 0.10 | 0.11 | -| containers | 0.5 | 0.6 | +| containers | 0.5 | 0.7 | | deepseq | 1.3 | 1.5 | | ghc-prim | 0.3 | 0.6 | | hashable | 1.2 | 1.3 | | mtl | 2.1 | 2.3 | -| stm | 2.4 | 2.5 | +| stm | 2.4 | 2.6 | | text | 1.2 | 1.3 | | transformers | 0.4 | 0.6 | | | | | diff --git a/all_stack.sh b/all_stack.sh index d30e9875b0..f02fd2bda2 100755 --- a/all_stack.sh +++ b/all_stack.sh @@ -73,3 +73,14 @@ stack build --resolver lts-11.10 stack build --resolver lts-11.11 stack build --resolver lts-11.12 stack build --resolver lts-11.13 +stack build --resolver lts-12.0 +stack build --resolver lts-12.1 +stack build --resolver lts-12.2 +stack build --resolver lts-12.3 +stack build --resolver lts-12.4 +stack build --resolver lts-12.5 +stack build --resolver lts-12.6 +stack build --resolver lts-12.7 +stack build --resolver lts-12.8 +stack build --resolver lts-12.9 +stack build --resolver lts-12.10 diff --git a/protolude.cabal b/protolude.cabal index f72a46fe58..6b433e7a52 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.2.2 +version: 0.2.4 synopsis: A small prelude. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude @@ -25,7 +25,8 @@ tested-with: GHC == 7.10.3, GHC == 8.0.1, GHC == 8.2.1, - GHC == 8.4.1 + GHC == 8.4.1, + GHC == 8.6.1 extra-source-files: README.md CHANGES.md Source-Repository head diff --git a/test_stack_lts.sh b/test_stack_lts.sh index 69be9fdf09..3784d140bb 100755 --- a/test_stack_lts.sh +++ b/test_stack_lts.sh @@ -18,3 +18,6 @@ STACK_YAML=stack-10.0.yaml stack build --no-terminal echo -e "\e[92mLTS 11.0" STACK_YAML=stack-11.0.yaml stack build --no-terminal + +echo -e "\e[92mLTS 12.0" +STACK_YAML=stack-12.0.yaml stack build --no-terminal From ced5fd366ebe42e9a6f8ddb0caa70854283603b2 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 2 Oct 2018 10:30:43 +0100 Subject: [PATCH 232/295] Minor version bump --- CHANGES.md | 7 ++----- protolude.cabal | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7d426fd066..300be1cfad 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,12 +1,9 @@ -0.2.4 -===== - -* GHC 8.6.1 support - 0.2.3 ===== +* GHC 8.6.1 support * Expose `fromLeft` and `fromRight`. +* Mask `always` and `alwaysSucceeds` from STM export for stm-2.5. 0.2.2 ===== diff --git a/protolude.cabal b/protolude.cabal index 6b433e7a52..b82209600c 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.2.4 +version: 0.2.3 synopsis: A small prelude. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude From 8c3c133342ad4b80871fddc6223b58c717e2b37e Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 2 Oct 2018 10:37:58 +0100 Subject: [PATCH 233/295] Fix for TypeInType before 8.6 --- src/Protolude/Base.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Protolude/Base.hs b/src/Protolude/Base.hs index f4cae809de..ddc9301b32 100644 --- a/src/Protolude/Base.hs +++ b/src/Protolude/Base.hs @@ -123,9 +123,10 @@ import GHC.Records as X ( #if ( __GLASGOW_HASKELL__ >= 800 ) import Data.Kind as X ( type Type -#if ( __GLASGOW_HASKELL__ < 806 ) +#if ( __GLASGOW_HASKELL__ < 805 ) , type (*) #endif + , type Type ) #endif From 8bf457d6b72ca7e22871a5d8368ce17dc65176b0 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 8 Nov 2018 14:12:58 +0000 Subject: [PATCH 234/295] Remove symbols.md file --- Symbols.md | 953 ----------------------------------------------------- 1 file changed, 953 deletions(-) delete mode 100644 Symbols.md diff --git a/Symbols.md b/Symbols.md deleted file mode 100644 index db6e3474a8..0000000000 --- a/Symbols.md +++ /dev/null @@ -1,953 +0,0 @@ -* `$` -* `$!` -* `$!!` -* `$>` -* `%` -* `&` -* `&&` -* `*` -* `**` -* `*>` -* `+` -* `++` -* `-` -* `.` -* `.&.` -* `.|.` -* `/` -* `/=` -* `:%` -* `:*:` -* `:+` -* `:+:` -* `:~:` -* `<` -* `<$` -* `<$!>` -* `<$>` -* `<*` -* `<**>` -* `<*>` -* `<.>` -* `<=` -* `<=<` -* `<>` -* `<|>` -* `=<<` -* `==` -* `==` -* `>` -* `>=` -* `>=>` -* `>>` -* `>>=` -* `All` -* `AllocationLimitExceeded` -* `Alt` -* `Alternative` -* `Any` -* `Any` -* `AppendMode` -* `Applicative` -* `ArithException` -* `ArrayException` -* `AssertionFailed` -* `AssertionFailed` -* `Async` -* `AsyncException` -* `Bifunctor` -* `Bits` -* `BlockedIndefinitelyOnMVar` -* `BlockedIndefinitelyOnMVar` -* `BlockedIndefinitelyOnSTM` -* `BlockedIndefinitelyOnSTM` -* `Bool` -* `Bool` -* `Bounded` -* `ByteString` -* `C1` -* `Chan` -* `Char` -* `Coercible` -* `Coercion` -* `Coercion` -* `Complex` -* `Concurrently` -* `Concurrently` -* `Const` -* `Const` -* `Constraint` -* `Constructor` -* `D#` -* `D1` -* `Deadlock` -* `Deadlock` -* `Denormal` -* `DivideByZero` -* `Double` -* `Double#` -* `Down` -* `Down` -* `Dual` -* `Dual` -* `EQ` -* `Either` -* `Endo` -* `Endo` -* `Enum` -* `Eq` -* `ErrorCall` -* `ErrorCall` -* `Except` -* `ExceptT` -* `Exception` -* `ExitCode` -* `ExitFailure` -* `ExitSuccess` -* `F#` -* `FFExponent` -* `FFFixed` -* `FFFormat` -* `FFGeneric` -* `False` -* `FatalError` -* `FatalError` -* `FilePath` -* `FiniteBits` -* `First` -* `First` -* `Fixity` -* `Float` -* `Float#` -* `Floating` -* `Foldable` -* `Fractional` -* `FunPtr` -* `Functor` -* `GT` -* `Generic` -* `Handle` -* `Handler` -* `Handler` -* `HeapOverflow` -* `IO` -* `IOException` -* `IOMode` -* `Identity` -* `Identity` -* `IndexOutOfBounds` -* `Infix` -* `Int` -* `Int` -* `Int16` -* `Int32` -* `Int64` -* `Int8` -* `IntMap` -* `IntSet` -* `Integer` -* `Integral` -* `IsString` -* `Just` -* `K1` -* `K1` -* `LByteString` -* `LT` -* `LText` -* `Last` -* `Last` -* `Left` -* `Leniency` -* `Lenient` -* `LossOfPrecision` -* `M1` -* `M1` -* `MVar` -* `Map` -* `MaskedInterruptible` -* `MaskedUninterruptible` -* `MaskingState` -* `Maybe` -* `Monad` -* `MonadError` -* `MonadIO` -* `MonadPlus` -* `MonadReader` -* `MonadState` -* `Monoid` -* `NFData` -* `NestedAtomically` -* `NestedAtomically` -* `NoMethodError` -* `NoMethodError` -* `NonTermination` -* `NonTermination` -* `Nothing` -* `Num` -* `Ord` -* `Ordering` -* `Ordering` -* `Overflow` -* `PatternMatchFail` -* `PatternMatchFail` -* `Prefix` -* `Print` -* `Product` -* `Product` -* `Proxy` -* `Proxy` -* `Ptr` -* `QSem` -* `QSemN` -* `Ratio` -* `RatioZeroDenominator` -* `Rational` -* `Read` -* `ReadMode` -* `ReadWriteMode` -* `Reader` -* `ReaderT` -* `Real` -* `RealFloat` -* `RealFrac` -* `RealWorld` -* `Rec0` -* `RecConError` -* `RecConError` -* `RecSelError` -* `RecSelError` -* `RecUpdError` -* `RecUpdError` -* `Refl` -* `Rep` -* `Rep` -* `Right` -* `S1` -* `ST` -* `STM` -* `Selector` -* `Semiring` -* `Seq` -* `Set` -* `Show` -* `SomeAsyncException` -* `SomeAsyncException` -* `SomeException` -* `SomeException` -* `StackOverflow` -* `State` -* `StateT` -* `Storable` -* `Strict` -* `StringConv` -* `Sum` -* `Sum` -* `Text` -* `ThreadId` -* `ThreadKilled` -* `Traversable` -* `True` -* `TypeRep` -* `Typeable` -* `U1` -* `U1` -* `UndefinedElement` -* `Underflow` -* `Unmasked` -* `UserInterrupt` -* `V1` -* `Void` -* `Word` -* `Word` -* `Word16` -* `Word32` -* `Word64` -* `Word8` -* `WriteMode` -* `ZipList` -* `ZipList` -* `^` -* `^%^` -* `^^` -* `^^%^^` -* `abs` -* `absInteger` -* `absurd` -* `acos` -* `acosDouble` -* `acosFloat` -* `acosh` -* `addMVarFinalizer` -* `all` -* `allowInterrupt` -* `always` -* `alwaysSucceeds` -* `and` -* `andInteger` -* `any` -* `ap` -* `appEndo` -* `appendFile` -* `applyN` -* `asTypeOf` -* `asin` -* `asinDouble` -* `asinFloat` -* `asinh` -* `ask` -* `asks` -* `asum` -* `async` -* `asyncBound` -* `asyncExceptionFromException` -* `asyncExceptionToException` -* `asyncOn` -* `asyncOnWithUnmask` -* `asyncThreadId` -* `asyncWithUnmask` -* `atDef` -* `atMay` -* `atan` -* `atan2` -* `atanDouble` -* `atanFloat` -* `atanh` -* `atomically` -* `bimap` -* `bit` -* `bitDefault` -* `bitSize` -* `bitSizeMaybe` -* `bool` -* `boundedEnumFrom` -* `boundedEnumFromThen` -* `bracket` -* `bracketOnError` -* `bracket_` -* `break` -* `byteSwap16` -* `byteSwap32` -* `byteSwap64` -* `cancel` -* `cancelWith` -* `cast` -* `castWith` -* `catMaybes` -* `catch` -* `catchError` -* `catchJust` -* `catchSTM` -* `catches` -* `ceiling` -* `check` -* `chr` -* `cis` -* `clamp` -* `clearBit` -* `coerceWith` -* `compare` -* `compareInteger` -* `comparing` -* `complement` -* `complementBit` -* `complementInteger` -* `conFixity` -* `conIsRecord` -* `conName` -* `concat` -* `concatMap` -* `concatMapM` -* `concurrently` -* `conjugate` -* `const` -* `cos` -* `cosDouble` -* `cosFloat` -* `cosh` -* `coshDouble` -* `coshFloat` -* `countLeadingZeros` -* `countTrailingZeros` -* `curry` -* `cycle` -* `decodeDoubleInteger` -* `decodeFloat` -* `decodeUtf8` -* `decodeUtf8'` -* `decodeUtf8With` -* `deepseq` -* `denominator` -* `die` -* `div` -* `divInteger` -* `divMod` -* `divModInteger` -* `divZeroError` -* `divideDouble` -* `divideFloat` -* `double2Float` -* `double2Int` -* `doubleFromInteger` -* `drop` -* `dropWhile` -* `dupChan` -* `either` -* `eitherA` -* `elem` -* `empty` -* `encodeDoubleInteger` -* `encodeFloat` -* `encodeFloatInteger` -* `encodeUtf8` -* `enumFrom` -* `enumFromThen` -* `enumFromThenTo` -* `enumFromTo` -* `eqDouble` -* `eqFloat` -* `eqInteger` -* `eqInteger#` -* `eqT` -* `evalState` -* `evalStateT` -* `evaluate` -* `even` -* `execState` -* `execStateT` -* `exitFailure` -* `exitSuccess` -* `exitWith` -* `exp` -* `expDouble` -* `expFloat` -* `exponent` -* `expt` -* `expts` -* `expts10` -* `fatalErrorMessage` -* `filter` -* `filterM` -* `finally` -* `find` -* `finiteBitSize` -* `first` -* `fix` -* `fixST` -* `flip` -* `float2Double` -* `float2Int` -* `floatDigits` -* `floatFromInteger` -* `floatRadix` -* `floatRange` -* `floatToDigits` -* `floor` -* `fmap` -* `fmapDefault` -* `fold` -* `foldM` -* `foldM_` -* `foldMap` -* `foldMapDefault` -* `foldl` -* `foldl'` -* `foldl1May` -* `foldlM` -* `foldr` -* `foldr'` -* `foldr1May` -* `foldrM` -* `for` -* `forConcurrently` -* `forM` -* `forM_` -* `for_` -* `force` -* `forever` -* `forkFinally` -* `forkIO` -* `forkIOWithUnmask` -* `forkOS` -* `forkOn` -* `forkOnWithUnmask` -* `formatRealFloat` -* `formatRealFloatAlt` -* `from` -* `fromEnum` -* `fromEnumError` -* `fromException` -* `fromInteger` -* `fromIntegral` -* `fromMaybe` -* `fromRat` -* `fromRat'` -* `fromRat''` -* `fromRational` -* `fromStrict` -* `fst` -* `gcastWith` -* `gcd` -* `gcdInt'` -* `gcdWord'` -* `geDouble` -* `geFloat` -* `geInteger` -* `geInteger#` -* `get` -* `getAll` -* `getAlt` -* `getAny` -* `getArgs` -* `getChanContents` -* `getConst` -* `getContents` -* `getDual` -* `getFirst` -* `getLast` -* `getLine` -* `getMaskingState` -* `getNumCapabilities` -* `getProduct` -* `getSum` -* `getZipList` -* `gets` -* `group` -* `gtDouble` -* `gtFloat` -* `gtInteger` -* `gtInteger#` -* `guard` -* `guardM` -* `handle` -* `handleJust` -* `hashInteger` -* `head` -* `headDef` -* `headMay` -* `hPutStr` -* `hPutStrLn` -* `identity` -* `ifM` -* `imagPart` -* `infinity` -* `initDef` -* `initMay` -* `initSafe` -* `inits` -* `int2Double` -* `int2Float` -* `integerLogBase` -* `integerToInt` -* `integerToWord` -* `integralEnumFrom` -* `integralEnumFromThen` -* `integralEnumFromThenTo` -* `integralEnumFromTo` -* `interact` -* `intercalate` -* `intersperse` -* `ioError` -* `isCurrentThreadBound` -* `isDenormalized` -* `isDoubleDenormalized` -* `isDoubleFinite` -* `isDoubleInfinite` -* `isDoubleNaN` -* `isDoubleNegativeZero` -* `isEmptyChan` -* `isEmptyMVar` -* `isFloatDenormalized` -* `isFloatFinite` -* `isFloatInfinite` -* `isFloatNaN` -* `isFloatNegativeZero` -* `isIEEE` -* `isInfinite` -* `isJust` -* `isLeft` -* `isNaN` -* `isNegativeZero` -* `isNothing` -* `isPrefixOf` -* `isRight` -* `isSigned` -* `iterate` -* `join` -* `killThread` -* `lastDef` -* `lastMay` -* `lcm` -* `leDouble` -* `leFloat` -* `leInteger` -* `leInteger#` -* `leftToMaybe` -* `lefts` -* `length` -* `lift` -* `liftA` -* `liftA2` -* `liftA3` -* `liftIO` -* `liftM` -* `liftM'` -* `liftM2` -* `liftM2'` -* `liftM3` -* `liftM4` -* `liftM5` -* `link` -* `link2` -* `list` -* `listToMaybe` -* `local` -* `log` -* `logBase` -* `logDouble` -* `logFloat` -* `ltDouble` -* `ltFloat` -* `ltInteger` -* `ltInteger#` -* `magnitude` -* `many` -* `map` -* `mapAccumL` -* `mapAccumR` -* `mapAndUnzipM` -* `mapConcurrently` -* `mapException` -* `mapM` -* `mapM_` -* `mapMaybe` -* `mappend` -* `mask` -* `mask_` -* `max` -* `maxBound` -* `maxExpt` -* `maxExpt10` -* `maxInt` -* `maximum` -* `maximumBy` -* `maybe` -* `maybeToEither` -* `maybeToLeft` -* `maybeToList` -* `maybeToRight` -* `mconcat` -* `mempty` -* `mfilter` -* `min` -* `minBound` -* `minExpt` -* `minInt` -* `minimum` -* `minimumBy` -* `minusDouble` -* `minusFloat` -* `minusInteger` -* `mkInteger` -* `mkPolar` -* `mkWeakMVar` -* `mkWeakThreadId` -* `mod` -* `modInteger` -* `modify` -* `modifyMVar` -* `modifyMVarMasked` -* `modifyMVarMasked_` -* `modifyMVar_` -* `mplus` -* `msum` -* `myThreadId` -* `mzero` -* `neDouble` -* `neFloat` -* `negate` -* `negateDouble` -* `negateFloat` -* `negateInteger` -* `neqInteger` -* `neqInteger#` -* `newChan` -* `newEmptyMVar` -* `newMVar` -* `newQSem` -* `newQSemN` -* `not` -* `notANumber` -* `notElem` -* `notImplemented` -* `null` -* `numerator` -* `numericEnumFrom` -* `numericEnumFromThen` -* `numericEnumFromThenTo` -* `numericEnumFromTo` -* `odd` -* `on` -* `onException` -* `one` -* `openFile` -* `optional` -* `or` -* `orAlt` -* `orElse` -* `orEmpty` -* `orInteger` -* `ord` -* `ordNub` -* `otherwise` -* `overflowError` -* `panic` -* `partitionEithers` -* `permutations` -* `phase` -* `pi` -* `plusDouble` -* `plusFloat` -* `plusInteger` -* `polar` -* `poll` -* `pollSTM` -* `popCount` -* `popCountDefault` -* `powerDouble` -* `powerFloat` -* `pred` -* `predError` -* `print` -* `product` -* `properFraction` -* `pure` -* `put` -* `putLText` -* `putMVar` -* `putStr` -* `putStrLn` -* `putText` -* `quot` -* `quotInteger` -* `quotRem` -* `quotRemInteger` -* `race` -* `race_` -* `ratioPrec` -* `ratioPrec1` -* `ratioZeroDenominatorError` -* `rationalToDouble` -* `rationalToFloat` -* `readChan` -* `readEither` -* `readFile` -* `readMVar` -* `readMaybe` -* `reader` -* `reads` -* `realPart` -* `realToFrac` -* `recip` -* `reduce` -* `rem` -* `remInteger` -* `repeat` -* `replicate` -* `replicateM` -* `replicateM_` -* `retry` -* `return` -* `reverse` -* `rightToMaybe` -* `rights` -* `rnf` -* `rotate` -* `rotateL` -* `rotateR` -* `round` -* `roundTo` -* `rtsSupportsBoundThreads` -* `runConcurrently` -* `runExcept` -* `runExceptT` -* `runIdentity` -* `runInBoundThread` -* `runInUnboundThread` -* `runReader` -* `runReaderT` -* `runST` -* `runState` -* `runStateT` -* `scaleFloat` -* `scanl` -* `scanl'` -* `scanr` -* `second` -* `selName` -* `seq` -* `sequence` -* `sequenceA` -* `sequenceA_` -* `sequence_` -* `setBit` -* `setNumCapabilities` -* `shift` -* `shiftL` -* `shiftLInteger` -* `shiftR` -* `shiftRInteger` -* `show` -* `signalQSem` -* `signalQSemN` -* `significand` -* `signum` -* `signumInteger` -* `sin` -* `sinDouble` -* `sinFloat` -* `sinh` -* `sinhDouble` -* `sinhFloat` -* `smallInteger` -* `snd` -* `some` -* `sort` -* `sortBy` -* `sortOn` -* `splitAt` -* `sqrt` -* `sqrtDouble` -* `sqrtFloat` -* `stToIO` -* `state` -* `stderr` -* `stdin` -* `stdout` -* `strConv` -* `subsequences` -* `subtract` -* `succ` -* `succError` -* `sum` -* `swap` -* `swapMVar` -* `sym` -* `tailDef` -* `tailMay` -* `tailSafe` -* `tails` -* `take` -* `takeMVar` -* `takeWhile` -* `tan` -* `tanDouble` -* `tanFloat` -* `tanh` -* `tanhDouble` -* `tanhFloat` -* `testBit` -* `testBitDefault` -* `testBitInteger` -* `threadCapability` -* `threadDelay` -* `threadWaitRead` -* `threadWaitReadSTM` -* `threadWaitWrite` -* `threadWaitWriteSTM` -* `throwError` -* `throwIO` -* `throwSTM` -* `throwTo` -* `timesDouble` -* `timesFloat` -* `timesInteger` -* `to` -* `toEnum` -* `toEnumError` -* `toException` -* `toInteger` -* `toIntegralSized` -* `toList` -* `toRational` -* `toS` -* `toSL` -* `toStrict` -* `trace` -* `traceIO` -* `traceM` -* `traceShow` -* `traceShowM` -* `trans` -* `transpose` -* `traverse` -* `traverse_` -* `truncate` -* `try` -* `tryJust` -* `tryPutMVar` -* `tryReadMVar` -* `tryTakeMVar` -* `typeRep` -* `unGetChan` -* `unK1` -* `unM1` -* `uncons` -* `uncurry` -* `undefined` -* `unfoldr` -* `uninterruptibleMask` -* `uninterruptibleMask_` -* `unless` -* `unlessM` -* `unsnoc` -* `vacuous` -* `void` -* `wait` -* `waitAny` -* `waitAnyCancel` -* `waitAnyCatch` -* `waitAnyCatchCancel` -* `waitAnyCatchSTM` -* `waitAnySTM` -* `waitBoth` -* `waitBothSTM` -* `waitCatch` -* `waitCatchSTM` -* `waitEither` -* `waitEitherCancel` -* `waitEitherCatch` -* `waitEitherCatchCancel` -* `waitEitherCatchSTM` -* `waitEitherSTM` -* `waitEitherSTM_` -* `waitEither_` -* `waitQSem` -* `waitQSemN` -* `waitSTM` -* `when` -* `whenM` -* `withAsync` -* `withAsyncBound` -* `withAsyncOn` -* `withAsyncOnWithUnmask` -* `withAsyncWithUnmask` -* `withFile` -* `withMVar` -* `withMVarMasked` -* `withState` -* `word2Double` -* `word2Float` -* `wordToInteger` -* `writeChan` -* `writeFile` -* `writeList2Chan` -* `xor` -* `xorInteger` -* `yield` -* `zero` -* `zeroBits` -* `zip` -* `zipWith` -* `zipWithM` -* `zipWithM_` -* `||` From b1f7eb5899aac2ad1dea338d2e0030b2a03d6a15 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 21 Nov 2018 12:39:16 +0000 Subject: [PATCH 235/295] All LTS 1.2x resolvers --- all_stack.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/all_stack.sh b/all_stack.sh index f02fd2bda2..83ba641b82 100755 --- a/all_stack.sh +++ b/all_stack.sh @@ -84,3 +84,11 @@ stack build --resolver lts-12.7 stack build --resolver lts-12.8 stack build --resolver lts-12.9 stack build --resolver lts-12.10 +stack build --resolver lts-12.11 +stack build --resolver lts-12.12 +stack build --resolver lts-12.13 +stack build --resolver lts-12.14 +stack build --resolver lts-12.16 +stack build --resolver lts-12.17 +stack build --resolver lts-12.18 +stack build --resolver lts-12.19 From b45c3e6e73f78144337bc076d126c8b46917e2e9 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 6 Dec 2018 16:41:46 +0000 Subject: [PATCH 236/295] New resolvers --- all_stack.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/all_stack.sh b/all_stack.sh index 83ba641b82..85fa99a437 100755 --- a/all_stack.sh +++ b/all_stack.sh @@ -92,3 +92,5 @@ stack build --resolver lts-12.16 stack build --resolver lts-12.17 stack build --resolver lts-12.18 stack build --resolver lts-12.19 +stack build --resolver lts-12.20 +stack build --resolver lts-12.21 From a69d4ec1dd80f71ea80686d39f9456a9cd21bb48 Mon Sep 17 00:00:00 2001 From: Greg Steuck Date: Thu, 24 Jan 2019 05:30:54 -0800 Subject: [PATCH 237/295] Typo (#98) --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 300be1cfad..ecc49c9d98 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -23,7 +23,7 @@ `throwE`, `catchE`. * Fix `safe` version bounds for new versions. * Add `mapExceptT and `withExceptT`. -* Export `scanl'` and provide shim for backwards compatability. +* Export `scanl'` and provide shim for backwards compatibility. * Add `putErrLn`. * Expose `RealFloat`. * Expose `GHC.Records` exports for GHC 8.2 and above. From cfa026a068c10424a60b2963e829622bf26d73b6 Mon Sep 17 00:00:00 2001 From: Alex Pankoff Date: Mon, 18 Mar 2019 11:38:04 +0100 Subject: [PATCH 238/295] Remove note about error function from README (#100) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bf9274014a..f6b2d62fd6 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,7 @@ import GHC.Show (Show(..)) Automatic deriving of ``Show`` for your types is still supported since the class is in scope by default. -* **Partial functions like ``undefined`` and ``error`` raise compiler warnings on +* **Partial functions like ``undefined`` raise compiler warnings on usage.** This is by design. For fatal uncatchable errors use the provided ``panic`` From ff8ed02b8131de32cf86ddbdec8d45c53efed947 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 28 Mar 2019 16:58:27 +0000 Subject: [PATCH 239/295] Support LTS-13.x resolvers --- all_stack.sh | 15 +++++++++++++++ stack-13.0.yaml | 6 ++++++ test_stack_lts.sh | 3 +++ 3 files changed, 24 insertions(+) create mode 100644 stack-13.0.yaml diff --git a/all_stack.sh b/all_stack.sh index 85fa99a437..5900ca6ba6 100755 --- a/all_stack.sh +++ b/all_stack.sh @@ -94,3 +94,18 @@ stack build --resolver lts-12.18 stack build --resolver lts-12.19 stack build --resolver lts-12.20 stack build --resolver lts-12.21 +stack build --resolver lts-13.0 +stack build --resolver lts-13.1 +stack build --resolver lts-13.2 +stack build --resolver lts-13.3 +stack build --resolver lts-13.4 +stack build --resolver lts-13.5 +stack build --resolver lts-13.6 +stack build --resolver lts-13.7 +stack build --resolver lts-13.8 +stack build --resolver lts-13.9 +stack build --resolver lts-13.10 +stack build --resolver lts-13.11 +stack build --resolver lts-13.12 +stack build --resolver lts-13.13 +stack build --resolver lts-13.14 diff --git a/stack-13.0.yaml b/stack-13.0.yaml new file mode 100644 index 0000000000..3b14283a4b --- /dev/null +++ b/stack-13.0.yaml @@ -0,0 +1,6 @@ +resolver: lts-13.0 +packages: +- '.' +extra-deps: +flags: {} +extra-package-dbs: [] diff --git a/test_stack_lts.sh b/test_stack_lts.sh index 3784d140bb..3cd0dc5ef7 100755 --- a/test_stack_lts.sh +++ b/test_stack_lts.sh @@ -21,3 +21,6 @@ STACK_YAML=stack-11.0.yaml stack build --no-terminal echo -e "\e[92mLTS 12.0" STACK_YAML=stack-12.0.yaml stack build --no-terminal + +echo -e "\e[92mLTS 13.0" +STACK_YAML=stack-13.0.yaml stack build --no-terminal From 278b6c59e6203f1a7265b81d0320ba7a4664b43a Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 2 Apr 2019 15:02:33 +0100 Subject: [PATCH 240/295] Bump licenses for 2019 --- LICENSE | 2 +- README.md | 2 +- protolude.cabal | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LICENSE b/LICENSE index fd522c54cd..f783c60216 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016-2017, Stephen Diehl +Copyright (c) 2016-2019, Stephen Diehl Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/README.md b/README.md index f6b2d62fd6..12376b85d3 100644 --- a/README.md +++ b/README.md @@ -173,4 +173,4 @@ License ------- Released under the MIT License. -Copyright (c) 2016-2018, Stephen Diehl +Copyright (c) 2016-2019, Stephen Diehl diff --git a/protolude.cabal b/protolude.cabal index b82209600c..d6856d83ee 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -7,7 +7,7 @@ license: MIT license-file: LICENSE author: Stephen Diehl maintainer: stephen.m.diehl@gmail.com -copyright: 2016-2018 Stephen Diehl +copyright: 2016-2019 Stephen Diehl category: Prelude build-type: Simple cabal-version: >=1.10 From 3add75ac4d39aa081f6dd7f87bbb63002f15d4cf Mon Sep 17 00:00:00 2001 From: Vilem Date: Sat, 6 Apr 2019 14:30:53 +0100 Subject: [PATCH 241/295] Add `lines`, `words`, `unlines`, `unwords` (#101) These operations (over `String` instead of `Text`) are part of Prelude. --- src/Protolude.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index 5376ca6bb9..9d302d320e 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -417,7 +417,13 @@ import qualified Data.ByteString.Lazy import Data.ByteString as X (ByteString) -- Text -import Data.Text as X (Text) +import Data.Text as X ( + Text + , lines + , words + , unlines + , unwords + ) import qualified Data.Text.Lazy import Data.Text.IO as X ( From 7491e92f2aafd404600e8828863af0c6c1d9a709 Mon Sep 17 00:00:00 2001 From: Thomas Scholtes Date: Wed, 10 Apr 2019 16:38:14 +0200 Subject: [PATCH 242/295] 'Protolude.Error.error' produces call stacks (#102) Calling `Protolude.Error.error` will now include the call stack in the `ErrorCall` that is raised. Before this was not the case because we used the wrong implicit variable. --- src/Protolude/Error.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Protolude/Error.hs b/src/Protolude/Error.hs index 194b5c1533..d8803ed531 100644 --- a/src/Protolude/Error.hs +++ b/src/Protolude/Error.hs @@ -27,7 +27,7 @@ import GHC.Exception (errorCallWithCallStackException) {-# WARNING error "'error' remains in code" #-} error :: forall (r :: RuntimeRep) . forall (a :: TYPE r) . HasCallStack => Text -> a -error s = raise# (errorCallWithCallStackException (unpack s) ?callstack) +error s = raise# (errorCallWithCallStackException (unpack s) ?callStack) #elif MIN_VERSION_base(4,7,0) -- Basic Call Stack with callsite. From 9d450cd9ff5d71f3db8f1e0532aa16fc3ea969e2 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 15 Apr 2019 10:04:14 +0100 Subject: [PATCH 243/295] Fixity declaration for <<*>>, fixes #103 --- src/Protolude/Applicative.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Protolude/Applicative.hs b/src/Protolude/Applicative.hs index 5e2a00ca5a..cb8431f2c4 100644 --- a/src/Protolude/Applicative.hs +++ b/src/Protolude/Applicative.hs @@ -31,5 +31,7 @@ purer = pure . pure liftAA2 :: (Applicative f, Applicative g) => (a -> b -> c) -> f (g a) -> f (g b) -> f (g c) liftAA2 = liftA2 . liftA2 +infixl 4 <<*>> + (<<*>>) :: (Applicative f, Applicative g) => f (g (a -> b)) -> f (g a) -> f (g b) (<<*>>) = liftA2 (<*>) From c649da1944bd0847ce71c41bd29928020e6ff0e1 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 20 Jun 2019 11:29:01 +0100 Subject: [PATCH 244/295] Update LTS 13 resolvers --- all_stack.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/all_stack.sh b/all_stack.sh index 5900ca6ba6..2cc82a767d 100755 --- a/all_stack.sh +++ b/all_stack.sh @@ -109,3 +109,15 @@ stack build --resolver lts-13.11 stack build --resolver lts-13.12 stack build --resolver lts-13.13 stack build --resolver lts-13.14 +stack build --resolver lts-13.15 +stack build --resolver lts-13.16 +stack build --resolver lts-13.17 +stack build --resolver lts-13.18 +stack build --resolver lts-13.19 +stack build --resolver lts-13.20 +stack build --resolver lts-13.21 +stack build --resolver lts-13.22 +stack build --resolver lts-13.23 +stack build --resolver lts-13.24 +stack build --resolver lts-13.25 +stack build --resolver lts-13.26 From 2770a143d07b57559150f379065b405dcc6c8d69 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Tue, 23 Jul 2019 02:28:56 -0300 Subject: [PATCH 245/295] Update link to exported functions (#106) The file `Symbols.md` doesn't exist anymore in the repository. In the meantime Haddock fixed a long standing bug that allows Hackage to display all exported symbols now so we can now link to it. --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 12376b85d3..4aa63ee2b7 100644 --- a/README.md +++ b/README.md @@ -80,9 +80,7 @@ import Protolude Exported Functions ------------------ -The list of exports is given in the [Symbols.md](./Symbols.md) file. Haddock -unfortunately breaks in the presence of module reexports and is unable to render -documentation. +The list of exports can be browsed [here](http://hackage.haskell.org/package/protolude-0.2.3/docs/Protolude.html). Dependencies ------------ From 65c61c1d63de9a8c3559a120afba06c184a42463 Mon Sep 17 00:00:00 2001 From: Pi3r Date: Tue, 8 Oct 2019 11:43:18 +0200 Subject: [PATCH 246/295] Fix #107: support ghc-8.8 (#108) * Fix #107: support ghc-8.8 * Add travis build for ghc 8.8.1 --- .travis.yml | 1 + protolude.cabal | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7c24321283..503a581b72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,7 @@ env: - CABALVER=2.0 GHCVER=8.2.2 - CABALVER=2.2 GHCVER=8.4.1 - CABALVER=2.4 GHCVER=8.6.1 + - CABALVER=2.4 GHCVER=8.8.1 # Note: the distinction between `before_install` and `install` is not # important. diff --git a/protolude.cabal b/protolude.cabal index d6856d83ee..7fc652d616 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -26,7 +26,8 @@ tested-with: GHC == 8.0.1, GHC == 8.2.1, GHC == 8.4.1, - GHC == 8.6.1 + GHC == 8.6.1, + GHC == 8.8.1 extra-source-files: README.md CHANGES.md Source-Repository head @@ -66,13 +67,13 @@ library -fwarn-implicit-prelude build-depends: - base >= 4.6 && <4.13, + base >= 4.6 && <4.14, array >= 0.4 && <0.6, ghc-prim >= 0.3 && <0.6, async >= 2.0 && <2.3, deepseq >= 1.3 && <1.5, containers >= 0.5 && <0.7, - hashable >= 1.2 && <1.3, + hashable >= 1.2 && <1.4, transformers >= 0.2 && <0.6, text >= 1.2 && <1.3, stm >= 2.4 && <2.6, From a93c7e6343b04be0fbc2c913d457bc6a706af924 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 10 Oct 2019 10:37:27 +0100 Subject: [PATCH 247/295] Support lts-14.* and GHC 8.8.1 --- .gitignore | 1 + CHANGES.md | 5 +++++ all_stack.sh | 9 +++++++++ protolude.cabal | 2 +- stack-14.0.yaml | 6 ++++++ 5 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 stack-14.0.yaml diff --git a/.gitignore b/.gitignore index e7045e7d7c..464d562736 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ dist cabal.sandbox.config *.hi *.o +stack.yaml.lock diff --git a/CHANGES.md b/CHANGES.md index ecc49c9d98..6d115843f5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +0.2.4 +===== + +* GHC 8.8.1 support + 0.2.3 ===== diff --git a/all_stack.sh b/all_stack.sh index 2cc82a767d..8aa21936ce 100755 --- a/all_stack.sh +++ b/all_stack.sh @@ -121,3 +121,12 @@ stack build --resolver lts-13.23 stack build --resolver lts-13.24 stack build --resolver lts-13.25 stack build --resolver lts-13.26 +stack build --resolver lts-14.0 +stack build --resolver lts-14.1 +stack build --resolver lts-14.2 +stack build --resolver lts-14.3 +stack build --resolver lts-14.4 +stack build --resolver lts-14.5 +stack build --resolver lts-14.6 +stack build --resolver lts-14.7 +stack build --resolver lts-14.8 diff --git a/protolude.cabal b/protolude.cabal index 7fc652d616..40c8e20e0f 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.2.3 +version: 0.2.4 synopsis: A small prelude. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude diff --git a/stack-14.0.yaml b/stack-14.0.yaml new file mode 100644 index 0000000000..26a69d8cdb --- /dev/null +++ b/stack-14.0.yaml @@ -0,0 +1,6 @@ +resolver: lts-14.0 +packages: +- '.' +extra-deps: +flags: {} +extra-package-dbs: [] From 357c0fdbedabeacb8448b0aa54a25e270d228c53 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 10 Oct 2019 11:49:44 +0100 Subject: [PATCH 248/295] Update readme for 8.8.1 support --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4aa63ee2b7..f7f049856f 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ Supports: * GHC 8.2.1 * GHC 8.4.1 * GHC 8.6.1 + * GHC 8.8.1 Usage ----- From 66d6d3506fc876322595054df7a4ad166e5dd028 Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 2 Nov 2019 18:46:01 +0000 Subject: [PATCH 249/295] Add lockfiles for resolvers --- stack-10.0.yaml.lock | 12 ++++++++++++ stack-11.0.yaml.lock | 12 ++++++++++++ stack-12.0.yaml.lock | 12 ++++++++++++ stack-13.0.yaml.lock | 12 ++++++++++++ stack-14.0.yaml.lock | 12 ++++++++++++ stack-7.10.yaml.lock | 12 ++++++++++++ stack-7.8.yaml.lock | 12 ++++++++++++ stack-8.0.yaml.lock | 12 ++++++++++++ stack-9.0.yaml.lock | 12 ++++++++++++ test_stack_lts.sh | 3 +++ 10 files changed, 111 insertions(+) create mode 100644 stack-10.0.yaml.lock create mode 100644 stack-11.0.yaml.lock create mode 100644 stack-12.0.yaml.lock create mode 100644 stack-13.0.yaml.lock create mode 100644 stack-14.0.yaml.lock create mode 100644 stack-7.10.yaml.lock create mode 100644 stack-7.8.yaml.lock create mode 100644 stack-8.0.yaml.lock create mode 100644 stack-9.0.yaml.lock diff --git a/stack-10.0.yaml.lock b/stack-10.0.yaml.lock new file mode 100644 index 0000000000..29ed1c8720 --- /dev/null +++ b/stack-10.0.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + size: 566883 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/10/0.yaml + sha256: d0ee122a83faa02a679829d43b3485b21827c3cc1cce0db8ac8957b78d45bee3 + original: lts-10.0 diff --git a/stack-11.0.yaml.lock b/stack-11.0.yaml.lock new file mode 100644 index 0000000000..8a8f6f4fb3 --- /dev/null +++ b/stack-11.0.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + size: 504512 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/11/0.yaml + sha256: 2587f446431d8c77bcb963ca8ff0a839a7b7f77042b5a98901b6b47c61fdd8f8 + original: lts-11.0 diff --git a/stack-12.0.yaml.lock b/stack-12.0.yaml.lock new file mode 100644 index 0000000000..75afd209b3 --- /dev/null +++ b/stack-12.0.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + size: 499178 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/12/0.yaml + sha256: 3e9a7b96708cd9196ce7e5396143725097a71f2e9ca8dc19f03f5082642bc1b5 + original: lts-12.0 diff --git a/stack-13.0.yaml.lock b/stack-13.0.yaml.lock new file mode 100644 index 0000000000..bd70afcdc3 --- /dev/null +++ b/stack-13.0.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + size: 491155 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/13/0.yaml + sha256: 8d3c33e0feab8e04b9ed31452e0219a2b827ed1338c809f79d986c71a177e6ba + original: lts-13.0 diff --git a/stack-14.0.yaml.lock b/stack-14.0.yaml.lock new file mode 100644 index 0000000000..3bab3b870a --- /dev/null +++ b/stack-14.0.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + size: 523443 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/0.yaml + sha256: 283773e7120f5446d961eab35ea95c9af9c24187cc178537bd29273200a05171 + original: lts-14.0 diff --git a/stack-7.10.yaml.lock b/stack-7.10.yaml.lock new file mode 100644 index 0000000000..e9de16673d --- /dev/null +++ b/stack-7.10.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + size: 424557 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/6/24.yaml + sha256: 9d3250ce23b40d596f772bb6b6a94751ae39a7c4077050247eea5c4975bb942d + original: lts-6.24 diff --git a/stack-7.8.yaml.lock b/stack-7.8.yaml.lock new file mode 100644 index 0000000000..0dce2a35df --- /dev/null +++ b/stack-7.8.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + size: 222517 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/2/22.yaml + sha256: e88a72a77e2223a96478ad8c1234d3271dca012a881dc195b8b9565d44245e3c + original: lts-2.22 diff --git a/stack-8.0.yaml.lock b/stack-8.0.yaml.lock new file mode 100644 index 0000000000..b3d502ad77 --- /dev/null +++ b/stack-8.0.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + size: 421254 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/7/8.yaml + sha256: 6c23440fac4e17615e869c98e7c4bd40ce4a4333a95da82d2176ab598d5db63f + original: lts-7.8 diff --git a/stack-9.0.yaml.lock b/stack-9.0.yaml.lock new file mode 100644 index 0000000000..7435dc7c8a --- /dev/null +++ b/stack-9.0.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + size: 533451 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/9/0.yaml + sha256: 27f29b231b39ea68e967a7a4346b2693a49d77c50f41fc0c276e11189a538da7 + original: lts-9.0 diff --git a/test_stack_lts.sh b/test_stack_lts.sh index 3cd0dc5ef7..165203442d 100755 --- a/test_stack_lts.sh +++ b/test_stack_lts.sh @@ -24,3 +24,6 @@ STACK_YAML=stack-12.0.yaml stack build --no-terminal echo -e "\e[92mLTS 13.0" STACK_YAML=stack-13.0.yaml stack build --no-terminal + +echo -e "\e[92mLTS 13.0" +STACK_YAML=stack-14.0.yaml stack build --no-terminal From ae9dd77749f77d4162f5df707f0472b55eeac1f8 Mon Sep 17 00:00:00 2001 From: sdiehl Date: Fri, 22 Nov 2019 08:06:09 +0000 Subject: [PATCH 250/295] Support all lts-14 resolvers --- all_stack.sh | 6 ++++++ test_stack_lts.sh | 3 +++ 2 files changed, 9 insertions(+) diff --git a/all_stack.sh b/all_stack.sh index 8aa21936ce..3bf8bb7cd4 100755 --- a/all_stack.sh +++ b/all_stack.sh @@ -130,3 +130,9 @@ stack build --resolver lts-14.5 stack build --resolver lts-14.6 stack build --resolver lts-14.7 stack build --resolver lts-14.8 +stack build --resolver lts-14.9 +stack build --resolver lts-14.10 +stack build --resolver lts-14.11 +stack build --resolver lts-14.12 +stack build --resolver lts-14.13 +stack build --resolver lts-14.14 diff --git a/test_stack_lts.sh b/test_stack_lts.sh index 165203442d..b4e4d0cad1 100755 --- a/test_stack_lts.sh +++ b/test_stack_lts.sh @@ -27,3 +27,6 @@ STACK_YAML=stack-13.0.yaml stack build --no-terminal echo -e "\e[92mLTS 13.0" STACK_YAML=stack-14.0.yaml stack build --no-terminal + +echo -e "\e[92mLTS 14.0" +STACK_YAML=stack-14.0.yaml stack build --no-terminal From b8fa8a072984612196a7c3ec6d543c4c84b71ecd Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 4 Jan 2020 15:39:54 +0000 Subject: [PATCH 251/295] Create haskell.yml --- .github/workflows/haskell.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/haskell.yml diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml new file mode 100644 index 0000000000..7ff8b1fc63 --- /dev/null +++ b/.github/workflows/haskell.yml @@ -0,0 +1,25 @@ +name: Haskell CI + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-haskell@v1 + with: + ghc-version: '8.6.5' + cabal-version: '3.0' + - name: Install dependencies + run: | + cabal update + cabal install --only-dependencies --enable-tests + - name: Build + run: | + cabal configure --enable-tests + cabal build + - name: Run tests + run: cabal test From 95ccde5a2d5976082af3e3de824537d2cbea75de Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 15:54:10 +0000 Subject: [PATCH 252/295] Use cabal-new-build --- .github/workflows/haskell.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 7ff8b1fc63..75fab538af 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -16,10 +16,7 @@ jobs: - name: Install dependencies run: | cabal update - cabal install --only-dependencies --enable-tests + cabal new-install - name: Build run: | - cabal configure --enable-tests - cabal build - - name: Run tests - run: cabal test + cabal new-build From f39de46d9fa5883ef3b1f60089bacd8f5e5b19c3 Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 15:58:57 +0000 Subject: [PATCH 253/295] Don't install --- .github/workflows/haskell.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 75fab538af..9939964166 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -16,7 +16,6 @@ jobs: - name: Install dependencies run: | cabal update - cabal new-install - name: Build run: | cabal new-build From 5e1b1ea982f6e7c72d163fe1f14d03e9d8d7827b Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 16:18:33 +0000 Subject: [PATCH 254/295] Update build status badges --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f7f049856f..a37212e4e1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ Protolude ========= -[![Build Status](https://travis-ci.org/sdiehl/protolude.svg?branch=master)](https://travis-ci.org/sdiehl/protolude) +[![Build Status](https://travis-ci.org/protolude/protolude.svg?branch=master)](https://travis-ci.org/sdiehl/protolude) +[![Build Status](https://github.com/protolude/protolude/workflows/Haskell%20CI/badge.svg)](https://github.com/protolude/protolude/actions) [![Hackage](https://img.shields.io/hackage/v/protolude.svg)](https://hackage.haskell.org/package/protolude) A sensible starting Prelude for building custom Preludes. From fa0f1dc0fa273dcb144f58d81c225bc0d005d719 Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 16:23:51 +0000 Subject: [PATCH 255/295] Build on pull requeests --- .github/workflows/haskell.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 9939964166..cf351ad599 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -1,18 +1,28 @@ name: Haskell CI -on: [push] +on: + push: + branches: + - master + pull_request: jobs: build: - - runs-on: ubuntu-latest + name: ghc ${{ matrix.ghc }} + runs-on: ubuntu-16.04 + strategy: + matrix: + ghc: ["8.8.1", "8.5.6"] + cabal: ["3.0"] steps: - uses: actions/checkout@v1 - uses: actions/setup-haskell@v1 + name: Setup Haskell with: - ghc-version: '8.6.5' - cabal-version: '3.0' + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + - name: Install dependencies run: | cabal update From a64595333035d7101b86a8feff718372c9082d94 Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 16:26:15 +0000 Subject: [PATCH 256/295] Fix GHC version --- .github/workflows/haskell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index cf351ad599..b35f41787c 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-16.04 strategy: matrix: - ghc: ["8.8.1", "8.5.6"] + ghc: ["8.8.1", "8.6.5"] cabal: ["3.0"] steps: From 1277dfd941ca995807365b673113b9234084370b Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 17:19:50 +0000 Subject: [PATCH 257/295] Test all supported GHC versions --- .github/workflows/haskell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index b35f41787c..10e0a678e7 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-16.04 strategy: matrix: - ghc: ["8.8.1", "8.6.5"] + ghc: ["8.8.1", "8.6.5", "8.6.4", "8.6.3", "8.6.2", "8.4.4", "8.2.2", "8.0.2"] cabal: ["3.0"] steps: From 4d1f8dc86bb7763e0fb3e374bec85352c5bdcbd4 Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 17:28:27 +0000 Subject: [PATCH 258/295] Add Stack CI script --- .github/workflows/stack.yml | 109 ++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 .github/workflows/stack.yml diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml new file mode 100644 index 0000000000..cc722eb845 --- /dev/null +++ b/.github/workflows/stack.yml @@ -0,0 +1,109 @@ +name: Stack CI + +on: + push: + schedule: + - cron: "0 0 * * 1" + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest, macOS-latest] + # use this to specify what resolvers and ghc to use + plan: + - { build: stack, resolver: "--resolver lts-9" } # ghc-8.0.2 + - { build: stack, resolver: "--resolver lts-10" } # ghc-8.2.2 + - { build: stack, resolver: "--resolver lts-11" } # ghc-8.2.2 + - { build: stack, resolver: "--resolver lts-12" } # ghc-8.4.4 + - { build: stack, resolver: "--resolver lts-13" } redundant because lts-14 checks ghc-8.6 already + - { build: stack, resolver: "--resolver lts-14" } # ghc-8.6.5 + - { build: stack, resolver: "--resolver nightly" } + # - { build: stack, resolver: "" } + # use this to include any dependencies from OS package managers + include: [] + # - os: macOS-latest + # brew: anybrewdeps + # - os: ubuntu-latest + # apt-get: happy libblas-dev liblapack-dev + + exclude: + - os: macOS-latest + plan: + build: cabal + + runs-on: ${{ matrix.os }} + steps: + - name: Install OS Packages + uses: mstksg/get-package@v1 + with: + apt-get: ${{ matrix.apt-get }} + brew: ${{ matrix.brew }} + - uses: actions/checkout@v1 + + - name: Setup stack + uses: mstksg/setup-stack@v1 + + - name: Setup cabal-install + uses: actions/setup-haskell@v1 + with: + ghc-version: ${{ matrix.plan.ghc }} + cabal-version: ${{ matrix.plan.cabal-install }} + if: matrix.plan.build == 'cabal' + + - name: Install dependencies + run: | + set -ex + case "$BUILD" in + stack) + stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies + ;; + cabal) + cabal --version + cabal update + PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@') + cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES + ;; + esac + set +ex + env: + ARGS: ${{ matrix.plan.resolver }} + BUILD: ${{ matrix.plan.build }} + + - name: Build + run: | + set -ex + case "$BUILD" in + stack) + stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps + ;; + cabal) + PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@') + cabal install --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES + + ORIGDIR=$(pwd) + for dir in $PACKAGES + do + cd $dir + cabal check || [ "$CABALVER" == "1.16" ] + cabal sdist + PKGVER=$(cabal info . | awk '{print $2;exit}') + SRC_TGZ=$PKGVER.tar.gz + cd dist + tar zxfv "$SRC_TGZ" + cd "$PKGVER" + cabal configure --enable-tests --ghc-options -O0 + cabal build + if [ "$CABALVER" = "1.16" ] || [ "$CABALVER" = "1.18" ]; then + cabal test + else + cabal test --show-details=streaming --log=/dev/stdout + fi + cd $ORIGDIR + done + ;; + esac + set +ex + env: + ARGS: ${{ matrix.plan.resolver }} + BUILD: ${{ matrix.plan.build }} From 612726f87e643997714c85c575ff5b9cd4187062 Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 17:29:28 +0000 Subject: [PATCH 259/295] Fix YAML for workflow --- .github/workflows/stack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml index cc722eb845..6b3c3f0b4a 100644 --- a/.github/workflows/stack.yml +++ b/.github/workflows/stack.yml @@ -16,7 +16,7 @@ jobs: - { build: stack, resolver: "--resolver lts-10" } # ghc-8.2.2 - { build: stack, resolver: "--resolver lts-11" } # ghc-8.2.2 - { build: stack, resolver: "--resolver lts-12" } # ghc-8.4.4 - - { build: stack, resolver: "--resolver lts-13" } redundant because lts-14 checks ghc-8.6 already + - { build: stack, resolver: "--resolver lts-13" } # redundant because lts-14 checks ghc-8.6 already - { build: stack, resolver: "--resolver lts-14" } # ghc-8.6.5 - { build: stack, resolver: "--resolver nightly" } # - { build: stack, resolver: "" } From 0ea2c5146aec438673848ef04a8b7237cb9cb85e Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 17:54:59 +0000 Subject: [PATCH 260/295] Seperate Stack and Cabal scripts --- .github/workflows/{haskell.yml => cabal.yml} | 4 ++-- .github/workflows/stack.yml | 19 ++++++++++--------- README.md | 3 ++- 3 files changed, 14 insertions(+), 12 deletions(-) rename .github/workflows/{haskell.yml => cabal.yml} (91%) diff --git a/.github/workflows/haskell.yml b/.github/workflows/cabal.yml similarity index 91% rename from .github/workflows/haskell.yml rename to .github/workflows/cabal.yml index 10e0a678e7..42efe0d9f7 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/cabal.yml @@ -1,4 +1,4 @@ -name: Haskell CI +name: Cabal CI on: push: @@ -8,7 +8,7 @@ on: jobs: build: - name: ghc ${{ matrix.ghc }} + name: cabal ${{ matrix.ghc }} runs-on: ubuntu-16.04 strategy: matrix: diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml index 6b3c3f0b4a..5ccade04aa 100644 --- a/.github/workflows/stack.yml +++ b/.github/workflows/stack.yml @@ -7,18 +7,19 @@ on: jobs: build: + name: stack ${{ matrix.resolver }} strategy: matrix: os: [ubuntu-latest, macOS-latest] # use this to specify what resolvers and ghc to use plan: - - { build: stack, resolver: "--resolver lts-9" } # ghc-8.0.2 - - { build: stack, resolver: "--resolver lts-10" } # ghc-8.2.2 - - { build: stack, resolver: "--resolver lts-11" } # ghc-8.2.2 - - { build: stack, resolver: "--resolver lts-12" } # ghc-8.4.4 - - { build: stack, resolver: "--resolver lts-13" } # redundant because lts-14 checks ghc-8.6 already - - { build: stack, resolver: "--resolver lts-14" } # ghc-8.6.5 - - { build: stack, resolver: "--resolver nightly" } + - { build: stack, resolver: "lts-9" } # ghc-8.0.2 + - { build: stack, resolver: "lts-10" } # ghc-8.2.2 + - { build: stack, resolver: "lts-11" } # ghc-8.2.2 + - { build: stack, resolver: "lts-12" } # ghc-8.4.4 + - { build: stack, resolver: "lts-13" } # redundant because lts-14 checks ghc-8.6 already + - { build: stack, resolver: "lts-14" } # ghc-8.6.5 + - { build: stack, resolver: "nightly" } # - { build: stack, resolver: "" } # use this to include any dependencies from OS package managers include: [] @@ -56,7 +57,7 @@ jobs: set -ex case "$BUILD" in stack) - stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies + stack --no-terminal --install-ghc --resolver $ARGS test --bench --only-dependencies ;; cabal) cabal --version @@ -75,7 +76,7 @@ jobs: set -ex case "$BUILD" in stack) - stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps + stack --no-terminal --resolver $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps ;; cabal) PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@') diff --git a/README.md b/README.md index a37212e4e1..f02c7311cf 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ Protolude ========= [![Build Status](https://travis-ci.org/protolude/protolude.svg?branch=master)](https://travis-ci.org/sdiehl/protolude) -[![Build Status](https://github.com/protolude/protolude/workflows/Haskell%20CI/badge.svg)](https://github.com/protolude/protolude/actions) +[![Build Status](https://github.com/protolude/protolude/workflows/Cabal%20CI/badge.svg)](https://github.com/protolude/protolude/actions) +[![Build Status](https://github.com/protolude/protolude/workflows/Stack%20CI/badge.svg)](https://github.com/protolude/protolude/actions) [![Hackage](https://img.shields.io/hackage/v/protolude.svg)](https://hackage.haskell.org/package/protolude) A sensible starting Prelude for building custom Preludes. From 3dd5152aba7caf673e1f98608162edefbb7b744c Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 17:55:55 +0000 Subject: [PATCH 261/295] Build Stack CI on PRs --- .github/workflows/stack.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml index 5ccade04aa..99aae56714 100644 --- a/.github/workflows/stack.yml +++ b/.github/workflows/stack.yml @@ -2,6 +2,7 @@ name: Stack CI on: push: + pull_request: schedule: - cron: "0 0 * * 1" From e02ac85388b4c5c92bb3acbc612abffd5da3f4b4 Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 17:57:19 +0000 Subject: [PATCH 262/295] Fix Stack build names --- .github/workflows/stack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml index 99aae56714..7e63af04ac 100644 --- a/.github/workflows/stack.yml +++ b/.github/workflows/stack.yml @@ -8,7 +8,7 @@ on: jobs: build: - name: stack ${{ matrix.resolver }} + name: stack ${{ matrix.plan.resolver }} strategy: matrix: os: [ubuntu-latest, macOS-latest] From e9da6f635ed9f3279c752f865d64ae763feb26ed Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 18:48:01 +0000 Subject: [PATCH 263/295] Add HLint action. --- .github/workflows/hlint.yml | 31 +++++++++++++++++++++++++++++++ .hlint.yaml | 9 +++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/hlint.yml create mode 100644 .hlint.yaml diff --git a/.github/workflows/hlint.yml b/.github/workflows/hlint.yml new file mode 100644 index 0000000000..21540b5f4a --- /dev/null +++ b/.github/workflows/hlint.yml @@ -0,0 +1,31 @@ +name: HLint CI + +on: + push: + branches: + - master + pull_request: + +jobs: + build: + name: hlint + runs-on: ubuntu-16.04 + strategy: + matrix: + ghc: ["8.8.1"] + cabal: ["3.0"] + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-haskell@v1 + name: Setup Haskell + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + - name: Install hlint + run: | + cabal new-install hlint + - name: Run hlint + run: | + hlint -g diff --git a/.hlint.yaml b/.hlint.yaml new file mode 100644 index 0000000000..2f02039e3e --- /dev/null +++ b/.hlint.yaml @@ -0,0 +1,9 @@ +- ignore: {name: Avoid lambda} +- ignore: {name: Eta reduce} +- ignore: {name: Redundant lambda} +- ignore: {name: Collapse lambdas} +- ignore: {name: Use String} +- ignore: {name: Use putStr, within: Protolude.Show} +- ignore: {name: Use putStrLn, within: Protolude.Show} +# CPP preprocessor oddities +- ignore: {name: Unused LANGUAGE pragma, within: [Protolude.Base, Protolude.CallStack, Protolude.Conv, Protolude.Error]} From 76ad00a018c6a4d0b6d952dbc6fcde3cb386fdd7 Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 18:49:38 +0000 Subject: [PATCH 264/295] Run cabal update. --- .github/workflows/hlint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hlint.yml b/.github/workflows/hlint.yml index 21540b5f4a..5c10b12177 100644 --- a/.github/workflows/hlint.yml +++ b/.github/workflows/hlint.yml @@ -25,7 +25,8 @@ jobs: - name: Install hlint run: | - cabal new-install hlint + cabal update + cabal new-install hlint --installdir=/usr/bin/ - name: Run hlint run: | hlint -g From 0fda50b372c2bddf41f68275cb45f35488f31940 Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 19:04:42 +0000 Subject: [PATCH 265/295] Cache cabal builds --- .github/workflows/hlint.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hlint.yml b/.github/workflows/hlint.yml index 5c10b12177..9c0c7c33e9 100644 --- a/.github/workflows/hlint.yml +++ b/.github/workflows/hlint.yml @@ -23,10 +23,28 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} + - uses: actions/cache@v1 + name: Cache ~/.cabal/packages + with: + path: ~/.cabal/packages + key: cabal-packages + + - uses: actions/cache@v1 + name: Cache ~/.cabal/store + with: + path: ~/.cabal/store + key: cabal-store + + - uses: actions/cache@v1 + name: Cache dist-newstyle + with: + path: dist-newstyle + key: dist-newstyle + - name: Install hlint run: | cabal update - cabal new-install hlint --installdir=/usr/bin/ + sudo cabal new-install hlint --installdir=/usr/bin/ - name: Run hlint run: | hlint -g From e7a8e99f3f1d8cb4d7c6ec2e6178862d04ccc7d9 Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 19:07:36 +0000 Subject: [PATCH 266/295] Fix install path for cabal. --- .github/workflows/hlint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/hlint.yml b/.github/workflows/hlint.yml index 9c0c7c33e9..e5369e3e91 100644 --- a/.github/workflows/hlint.yml +++ b/.github/workflows/hlint.yml @@ -44,7 +44,7 @@ jobs: - name: Install hlint run: | cabal update - sudo cabal new-install hlint --installdir=/usr/bin/ + cabal new-install hlint --installdir=dist-newstyle - name: Run hlint run: | - hlint -g + dist-newstyle/hlint -g From af6cabe185f6c48aedcf013eb407e68b858f7807 Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 23:02:48 +0000 Subject: [PATCH 267/295] Added Nix CI --- .github/workflows/nix.yml | 10 ++++++++++ default.nix | 5 +++++ 2 files changed, 15 insertions(+) create mode 100644 .github/workflows/nix.yml create mode 100644 default.nix diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml new file mode 100644 index 0000000000..da62ec41c7 --- /dev/null +++ b/.github/workflows/nix.yml @@ -0,0 +1,10 @@ +name: Nix CI + +on: [pull_request] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: cachix/install-nix-action@v3 + - run: nix-build diff --git a/default.nix b/default.nix new file mode 100644 index 0000000000..1fc6c5c982 --- /dev/null +++ b/default.nix @@ -0,0 +1,5 @@ +{ pkgs ? import {} +}: +pkgs.haskellPackages.developPackage { + root = ./.; +} From 03f73d8cde6e5ea4ef0ae0f4e7ff2322281be3a1 Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 23:12:42 +0000 Subject: [PATCH 268/295] Name nix workflow --- .github/workflows/nix.yml | 1 + README.md | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index da62ec41c7..5604a990b5 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -3,6 +3,7 @@ name: Nix CI on: [pull_request] jobs: build: + name: nix runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 diff --git a/README.md b/README.md index f02c7311cf..780bfcba4e 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ Protolude [![Build Status](https://travis-ci.org/protolude/protolude.svg?branch=master)](https://travis-ci.org/sdiehl/protolude) [![Build Status](https://github.com/protolude/protolude/workflows/Cabal%20CI/badge.svg)](https://github.com/protolude/protolude/actions) [![Build Status](https://github.com/protolude/protolude/workflows/Stack%20CI/badge.svg)](https://github.com/protolude/protolude/actions) +[![Build Status](https://github.com/protolude/protolude/workflows/Nix%20CI/badge.svg)](https://github.com/protolude/protolude/actions) [![Hackage](https://img.shields.io/hackage/v/protolude.svg)](https://hackage.haskell.org/package/protolude) A sensible starting Prelude for building custom Preludes. From 2666f1e83007ccd76ef4f2f839d5dd053d85d783 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 24 Jan 2020 11:06:09 +0000 Subject: [PATCH 269/295] 0.3 Release (#115) * Add total ConvertText alternative to Conv * Explain ConvertText's meaning * Rename convertText to toS for compatibility * 0.3.0 Refactor (#111) * Begin work on 0.3 refactor * Remove old docs folder * Fix dodgy exports * 4.8 constraint for null and length * Guards for Semigroup export for base<4.9 * Fix Data.Bits exports * Guards for typeable exports * Remove unused pragmas * Update hlint.yaml * Use liftM because of pre-AMP quirkk * Data.Char exports * Rework Exception exports * Fix bounds * Adding Monad.Fail shim * Fix displayException export * Explicit GHC.Prim import for ancient ghc * Explicit raise# for base-4.7 * Flush legacy testing infrastructure * Update git location * Update README * Add Partial module * Add concurrency exports * Explicit GHC.Float exports * Bounds for threadWaitReadSTM, threadWaitWriteSTM, forkOSWithUnmask * Fix for weird undocumented underflowError weirdness * forkOSWithUnask for base>4.8 * Fix GHC.Real exports pre base-4.7 * Fix withMVarMasked for base-4.7 * Update nix derivation * Update derivation * Update derivation * Explicit functor exports * <$ export * Overwrite binary * Fix some missing exports * Update Changelog * Minor export fixes base<4.9 * Explicit exports * Export handler * Generate export lists for multiple versions (#114) * Generate export lists for #112 * Make export lists format OccName uniformly * Make compile on ancient GHC * Use Foldable.concat * Hacks to make ghc-7.6 API happy * liftIO shim * Fix sortOn warning * Update ChangeLog * Update base bounds * Export conventions * Update Haddocks * Document GHC magic --- .ghci | 3 +- .github/workflows/hlint.yml | 2 +- .gitignore | 1 + .hlint.yaml | 4 + CHANGES.md => ChangeLog.md | 32 +- Exports.hs | 59 ++ LICENSE | 2 +- README.md | 66 +- all_stack.sh | 3 +- docs/.gitignore | 1 - docs/Applicative.md | 90 --- docs/Bifunctor.md | 2 - docs/Bits.md | 202 ------- docs/Bool.md | 6 - docs/Concurrency.md | 2 - docs/Debug.md | 96 --- docs/Either.md | 2 - docs/Exceptions.md | 126 ---- docs/Files.md | 74 --- docs/Folds.md | 171 ------ docs/Function.md | 153 ----- docs/Functor.md | 41 -- docs/Generics.md | 2 - docs/Hashing.md | 14 - docs/List.md | 158 ----- docs/Makefile | 225 ------- docs/Maybe.md | 38 -- docs/Monad.md | 150 ----- docs/Monoid.md | 79 --- docs/Numbers.md | 31 - docs/Reader.md | 2 - docs/ST.md | 2 - docs/State.md | 2 - docs/Strings.md | 122 ---- docs/Transformers.md | 2 - docs/Traversals.md | 2 - docs/Tuple.md | 76 --- docs/TypeLevel.md | 95 --- docs/Unsafe.md | 2 - docs/conf.py | 348 ----------- docs/index.rst | 47 -- export_lists/protolude-10.exports | 960 ++++++++++++++++++++++++++++++ export_lists/protolude-11.exports | 960 ++++++++++++++++++++++++++++++ export_lists/protolude-12.exports | 958 +++++++++++++++++++++++++++++ export_lists/protolude-13.exports | 959 +++++++++++++++++++++++++++++ export_lists/protolude-14.exports | 959 +++++++++++++++++++++++++++++ export_lists/protolude-4.exports | 0 export_lists/protolude-5.exports | 0 export_lists/protolude-6.exports | 0 export_lists/protolude-7.exports | 956 +++++++++++++++++++++++++++++ export_lists/protolude-8.exports | 956 +++++++++++++++++++++++++++++ export_lists/protolude-9.exports | 956 +++++++++++++++++++++++++++++ protolude.cabal | 52 +- src/Protolude.hs | 627 +++++++++++++++---- src/Protolude/Applicative.hs | 25 +- src/Protolude/Base.hs | 142 ++++- src/Protolude/Bifunctor.hs | 18 +- src/Protolude/Bool.hs | 2 +- src/Protolude/Conv.hs | 11 +- src/Protolude/ConvertText.hs | 44 ++ src/{ => Protolude}/Debug.hs | 2 +- src/Protolude/Either.hs | 4 +- src/Protolude/Error.hs | 5 +- src/Protolude/Exceptions.hs | 4 +- src/Protolude/Functor.hs | 13 +- src/Protolude/List.hs | 45 +- src/Protolude/Monad.hs | 2 +- src/Protolude/Panic.hs | 4 +- src/Protolude/Partial.hs | 26 + src/Protolude/Safe.hs | 6 +- src/Protolude/Semiring.hs | 11 +- src/Protolude/Show.hs | 42 +- src/{ => Protolude}/Unsafe.hs | 8 +- stack-10.0.yaml | 6 - stack-10.0.yaml.lock | 12 - stack-11.0.yaml | 6 - stack-11.0.yaml.lock | 12 - stack-12.0.yaml | 6 - stack-12.0.yaml.lock | 12 - stack-13.0.yaml | 6 - stack-13.0.yaml.lock | 12 - stack-14.0.yaml | 6 - stack-14.0.yaml.lock | 12 - stack-7.10.yaml | 6 - stack-7.10.yaml.lock | 12 - stack-7.8.yaml | 6 - stack-7.8.yaml.lock | 12 - stack-8.0.yaml | 6 - stack-8.0.yaml.lock | 12 - stack-9.0.yaml | 6 - stack-9.0.yaml.lock | 12 - stack.yaml | 3 +- test_stack_lts.sh | 44 +- 93 files changed, 8665 insertions(+), 2836 deletions(-) rename CHANGES.md => ChangeLog.md (76%) create mode 100644 Exports.hs delete mode 100644 docs/.gitignore delete mode 100644 docs/Applicative.md delete mode 100644 docs/Bifunctor.md delete mode 100644 docs/Bits.md delete mode 100644 docs/Bool.md delete mode 100644 docs/Concurrency.md delete mode 100644 docs/Debug.md delete mode 100644 docs/Either.md delete mode 100644 docs/Exceptions.md delete mode 100644 docs/Files.md delete mode 100644 docs/Folds.md delete mode 100644 docs/Function.md delete mode 100644 docs/Functor.md delete mode 100644 docs/Generics.md delete mode 100644 docs/Hashing.md delete mode 100644 docs/List.md delete mode 100644 docs/Makefile delete mode 100644 docs/Maybe.md delete mode 100644 docs/Monad.md delete mode 100644 docs/Monoid.md delete mode 100644 docs/Numbers.md delete mode 100644 docs/Reader.md delete mode 100644 docs/ST.md delete mode 100644 docs/State.md delete mode 100644 docs/Strings.md delete mode 100644 docs/Transformers.md delete mode 100644 docs/Traversals.md delete mode 100644 docs/Tuple.md delete mode 100644 docs/TypeLevel.md delete mode 100644 docs/Unsafe.md delete mode 100644 docs/conf.py delete mode 100644 docs/index.rst create mode 100644 export_lists/protolude-10.exports create mode 100644 export_lists/protolude-11.exports create mode 100644 export_lists/protolude-12.exports create mode 100644 export_lists/protolude-13.exports create mode 100644 export_lists/protolude-14.exports create mode 100644 export_lists/protolude-4.exports create mode 100644 export_lists/protolude-5.exports create mode 100644 export_lists/protolude-6.exports create mode 100644 export_lists/protolude-7.exports create mode 100644 export_lists/protolude-8.exports create mode 100644 export_lists/protolude-9.exports create mode 100644 src/Protolude/ConvertText.hs rename src/{ => Protolude}/Debug.hs (98%) create mode 100644 src/Protolude/Partial.hs rename src/{ => Protolude}/Unsafe.hs (81%) delete mode 100644 stack-10.0.yaml delete mode 100644 stack-10.0.yaml.lock delete mode 100644 stack-11.0.yaml delete mode 100644 stack-11.0.yaml.lock delete mode 100644 stack-12.0.yaml delete mode 100644 stack-12.0.yaml.lock delete mode 100644 stack-13.0.yaml delete mode 100644 stack-13.0.yaml.lock delete mode 100644 stack-14.0.yaml delete mode 100644 stack-14.0.yaml.lock delete mode 100644 stack-7.10.yaml delete mode 100644 stack-7.10.yaml.lock delete mode 100644 stack-7.8.yaml delete mode 100644 stack-7.8.yaml.lock delete mode 100644 stack-8.0.yaml delete mode 100644 stack-8.0.yaml.lock delete mode 100644 stack-9.0.yaml delete mode 100644 stack-9.0.yaml.lock diff --git a/.ghci b/.ghci index 0d49fe5cb3..da0cc8edcf 100644 --- a/.ghci +++ b/.ghci @@ -1,3 +1,4 @@ :set -XNoImplicitPrelude :set -XOverloadedStrings -import Prelude () +:set -isrc +:load Protolude diff --git a/.github/workflows/hlint.yml b/.github/workflows/hlint.yml index e5369e3e91..e8844cf96d 100644 --- a/.github/workflows/hlint.yml +++ b/.github/workflows/hlint.yml @@ -44,7 +44,7 @@ jobs: - name: Install hlint run: | cabal update - cabal new-install hlint --installdir=dist-newstyle + cabal new-install hlint --installdir=dist-newstyle --overwrite-policy=always - name: Run hlint run: | dist-newstyle/hlint -g diff --git a/.gitignore b/.gitignore index 464d562736..e4d8f57585 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ cabal.sandbox.config *.hi *.o stack.yaml.lock +dist-newstyle diff --git a/.hlint.yaml b/.hlint.yaml index 2f02039e3e..2e151fd281 100644 --- a/.hlint.yaml +++ b/.hlint.yaml @@ -3,7 +3,11 @@ - ignore: {name: Redundant lambda} - ignore: {name: Collapse lambdas} - ignore: {name: Use String} +- ignore: {name: Use fmap, within: Protolude.Monad} - ignore: {name: Use putStr, within: Protolude.Show} - ignore: {name: Use putStrLn, within: Protolude.Show} +- ignore: {name: Use bimap, within: Protolude.Bifunctor} +- ignore: {name: Use first, within: Protolude.Bifunctor} +- ignore: {name: Use sortOn} # CPP preprocessor oddities - ignore: {name: Unused LANGUAGE pragma, within: [Protolude.Base, Protolude.CallStack, Protolude.Conv, Protolude.Error]} diff --git a/CHANGES.md b/ChangeLog.md similarity index 76% rename from CHANGES.md rename to ChangeLog.md index 6d115843f5..c9ef85d8c5 100644 --- a/CHANGES.md +++ b/ChangeLog.md @@ -1,3 +1,33 @@ +0.3.0 +===== + +* GHC 8.10.1 support +* Use `Protolude.ConvertText` as the default string conversion class. This + removes partial functions when converting to/from ByteStrings. +* Provide `Protolude.Conv` as a compatibility layer for old string conversion + interface. +* Migrated `Debug` and `Unsafe` to `Protolude.Debug` and `Protolude.Unsafe`. +* Export Unicode functions: + - `intToDigit` + - `isAlpha` + - `isAlphaNum` + - `isAscii` + - `isControl` + - `isDigit` + - `isHexDigit` + - `isLetter` + - `isLower` + - `isPrint` + - `isSpace` + - `isUpper` +* Export `MonadFail` class. +* Export `gcast` from Data.Typeable. +* Export `typeOf` from Data.Typeable. +* Export `Handler` from Control.Exception. +* Export `yield` from Control.Concurrency. +* Provide compatibility module `Protolude.Partial` as single export for unsafe + partial functions with the same naming conventions as Prelude. + 0.2.4 ===== @@ -7,7 +37,7 @@ ===== * GHC 8.6.1 support -* Expose `fromLeft` and `fromRight`. +* Export `fromLeft` and `fromRight`. * Mask `always` and `alwaysSucceeds` from STM export for stm-2.5. 0.2.2 diff --git a/Exports.hs b/Exports.hs new file mode 100644 index 0000000000..65c1f7934e --- /dev/null +++ b/Exports.hs @@ -0,0 +1,59 @@ +{-# LANGUAGE CPP #-} +module Main + ( main, + ) +where + +import Control.Applicative ((<$>)) +import Control.Monad.Trans +import Data.Foldable (concat) +import qualified Data.List as List +import Data.Maybe +import Data.Ord (comparing) +import DynFlags +import GHC +import GhcMonad +import GHC.Paths +import Outputable +import System.FilePath.Posix +import Prelude hiding (concat, mod) + +autoModule :: FilePath -> IO () +autoModule mod = runGhc (Just GHC.Paths.libdir) $ do + dflags <- GHC.getSessionDynFlags +#if (__GLASGOW_HASKELL__ > 706) + _ <- setSessionDynFlags ( dflags `gopt_set` Opt_GhciSandbox ) +#else + _ <- setSessionDynFlags ( dflags `dopt_set` Opt_GhciSandbox ) +#endif + target <- guessTarget ("src" addExtension mod ".hs") Nothing + setTargets [target] + _ <- load LoadAllTargets + modSum <- getModSummary $ mkModuleName mod + p <- GHC.parseModule modSum + t <- typecheckModule p + let modInfo = tm_checked_module_info t + let exports = modInfoExports modInfo + exportThings <- sequence <$> mapM lookupName exports + let sortedThings = List.sortBy (comparing getOccName) (concat exportThings) + GhcMonad.liftIO (mapM_ (showThing dflags) sortedThings) + +showNamed :: NamedThing a => DynFlags -> a -> IO () +showNamed df a = do + let nm = showSDoc df (ppr (getOccName a)) + let mod = showSDoc df (ppr (nameModule (getName a))) + putStrLn (nm ++ " from " ++ mod) + +showThing :: DynFlags -> TyThing -> IO () +showThing df (AnId a) = showNamed df a +#if (__GLASGOW_HASKELL__ > 706) +showThing df (AConLike a) = showNamed df a +#endif +showThing df (ATyCon a) = showNamed df a +showThing _ _ = error "Should never happen." + +--showGhc :: (Outputable a) => a -> String +--showGhc = showPpr unsafeGlobalDynFlags + +main :: IO () +main = autoModule "Protolude" diff --git a/LICENSE b/LICENSE index f783c60216..6e6bfc0e33 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016-2019, Stephen Diehl +Copyright (c) 2016-2020, Stephen Diehl Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/README.md b/README.md index 780bfcba4e..ed7d8ef757 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,6 @@ Design points: * Unsafe functions are prefixed with "unsafe" in separate module. * Compiler agnostic, GHC internal modules are abstracted out into Base. * ``sum`` and ``product`` are strict by default. -* Compatibility with GHC 8.0. * Includes Semiring for GHC >= 7.6. * Includes Bifunctor for GHC >= 7.6. * Includes Semigroup for GHC >= 7.6. @@ -48,6 +47,21 @@ Supports: * GHC 8.4.1 * GHC 8.6.1 * GHC 8.8.1 + * GHC 8.10.1 + +Stack LTS: + +* lts-4.x +* lts-5.x +* lts-6.x +* lts-7.x +* lts-8.x +* lts-9.x +* lts-10.x +* lts-11.x +* lts-12.x +* lts-13.x +* lts-14.x Usage ----- @@ -56,7 +70,7 @@ To try out standalone prelude at the interactive shell, from the Protolude project directory run. ```haskell -$ stack exec ghci +$ stack repl > import Protolude ``` @@ -81,11 +95,6 @@ Then in your modules: import Protolude ``` -Exported Functions ------------------- - -The list of exports can be browsed [here](http://hackage.haskell.org/package/protolude-0.2.3/docs/Protolude.html). - Dependencies ------------ @@ -98,17 +107,17 @@ tracks Stack LTS resolver. | ----------- | -------- | -------- | | array | 0.4 | 0.6 | | async | 2.0 | 2.3 | -| base | 4.6 | 4.13 | +| base | 4.6 | 4.14 | | bytestring | 0.10 | 0.11 | | containers | 0.5 | 0.7 | | deepseq | 1.3 | 1.5 | | ghc-prim | 0.3 | 0.6 | -| hashable | 1.2 | 1.3 | +| hashable | 1.2 | 1.4 | | mtl | 2.1 | 2.3 | | stm | 2.4 | 2.6 | | text | 1.2 | 1.3 | | transformers | 0.4 | 0.6 | -| | | | +| fail | 4.9 | 4.10 | Structure --------- @@ -171,8 +180,43 @@ business logic use well-typed checked exceptions of the ``ExceptT`` variety. It has been renamed to ``identity`` to reserve the ``id`` identifier for the more common use case of business logic. +* **But what if I want the partial functions?** + +You if you need partial functions for backwards compatibility you can use the +`Protolude.Partial` module and mask the safe definitions as needed. + +```haskell +import Protolude hiding (head) +import Protolude.Partial (head) +``` + +Development Tools +----------------- + +**GHC Magic** + +To build the `exports` management tool use: + +```bash +$ cabal new-build exports --flag dev +$ cabal run exports +``` + +This tool uses GHC's internal compile symbol table to generate a list of exports +and keep the export list of protolude stable across different versions of GHC +and base. + +**Continious Integration** + +There is a massive test suite that tests all versions of GHC 7.6 - GHC HEAD +alongside all Stack resolvers to ensure no regressions. Any pull requests or +patch has to pass the 40 integrity checks before being considered. Any pull +request must keep the export list consistent across GHC and Base version and not +have any accidental symbol dropping or drift without updating the export golden +tests. + License ------- Released under the MIT License. -Copyright (c) 2016-2019, Stephen Diehl +Copyright (c) 2016-2020, Stephen Diehl diff --git a/all_stack.sh b/all_stack.sh index 3bf8bb7cd4..69df0cc994 100755 --- a/all_stack.sh +++ b/all_stack.sh @@ -1,6 +1,5 @@ -set +e +set -e -stack build --resolver lts-2.0 stack build --resolver lts-3.0 stack build --resolver lts-4.0 stack build --resolver lts-5.0 diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index e35d8850c9..0000000000 --- a/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_build diff --git a/docs/Applicative.md b/docs/Applicative.md deleted file mode 100644 index d21dd9b990..0000000000 --- a/docs/Applicative.md +++ /dev/null @@ -1,90 +0,0 @@ -Applicative -=========== - -Functor -------- - -```haskell -class Functor (f :: * -> *) where - fmap :: (a -> b) -> f a -> f b - (<$) :: a -> f b -> f a -``` - -```haskell -(<$>) :: Functor f => (a -> b) -> f a -> f b -``` - -```haskell -($>) :: Functor f => f a -> b -> f b -``` - -Applicatives -------- - -```haskell -class Functor f => Applicative (f :: * -> *) where - pure :: a -> f a - (<*>) :: f (a -> b) -> f a -> f b - (*>) :: f a -> f b -> f b - (<*) :: f a -> f b -> f a -``` - -```haskell -orAlt :: (Alternative f, Monoid a) => f a -> f a -``` - -```haskell -orEmpty :: Alternative f => Bool -> a -> f a -``` - -```haskell -eitherA :: (Alternative f) => f a -> f b -> f (Either a b) -``` - -```haskell -pass :: Applicative f => f () -``` - - -Alternative -------- - -```haskell -class Applicative f => Alternative (f :: * -> *) where - empty :: f a - (<|>) :: f a -> f a -> f a - some :: f a -> f [a] - many :: f a -> f [a] -``` - -```haskell -(<|>) :: Alternative f => f a -> f a -> f a -``` - -```haskell -many :: Alternative f => f a -> f [a] -``` - -```haskell -some :: Alternative f => f a -> f [a] -``` - -```haskell -optional :: Alternative f => f a -> f (Maybe a) -``` - -```haskell -liftA :: Applicative f => (a -> b) -> f a -> f b -``` - -```haskell -empty :: Alternative f => f a -``` - -```haskell -guarded :: (Alternative f) => (a -> Bool) -> a -> f a -``` - -```haskell -guardedA :: (Functor f, Alternative t) => (a -> f Bool) -> a -> f (t a) -``` diff --git a/docs/Bifunctor.md b/docs/Bifunctor.md deleted file mode 100644 index a3878ece5c..0000000000 --- a/docs/Bifunctor.md +++ /dev/null @@ -1,2 +0,0 @@ -Bifunctor -========= diff --git a/docs/Bits.md b/docs/Bits.md deleted file mode 100644 index 9fd8afc4ef..0000000000 --- a/docs/Bits.md +++ /dev/null @@ -1,202 +0,0 @@ -Bits -==== - -```haskell -{-# LANGUAGE BinaryLiterals #-} -``` - -```python -42 = 0b101010 -``` - -Bit Operations --------------- - -#### .&. - -```haskell -(.&.) :: Bits a => a -> a -> a -``` - -*Example*: - -#### .|. - -```haskell -(.|.) :: Bits a => a -> a -> a -``` - -*Example*: - -#### xor - -```haskell -xor :: Bits a => a -> a -> a -``` - -*Example*: - -```haskell -> True `xor` False -True - -> True `xor` True -False - -> 0b101 `xor` 0b011 -6 -- 0b110 -``` - -#### complement - -```haskell -complement :: Bits a => a -> a -``` - -```haskell -> complement True -False - -> complement 0b101 --2 -- -0b010 -``` - -*Example*: - -#### shift - -*Example*: - -```haskell -shift :: Bits a => a -> Int -> a -``` - -*Example*: - -#### rotate - -```haskell -rotate :: Bits a => a -> Int -> a -``` - -*Example*: - -#### zeroBits - -```haskell -zeroBits :: Bits a => a -``` - -*Example*: - -#### bit - -```haskell -bit :: Bits a => Int -> a -``` - -*Example*: - -Bit Testing ------------- - -```haskell -setBit :: Bits a => a -> Int -> a -``` - -```haskell -clearBit :: Bits a => a -> Int -> a -``` - -#### complementBit - -```haskell -complementBit :: Bits a => a -> Int -> a -``` - -*Example*: - -```haskell -λ> 0b100 `complementBit` 1 -6 -- 0b110 -``` - -#### testBit - -```haskell -testBit :: Bits a => a -> Int -> Bool -``` - -*Example*: - -```haskell -> 0b10 `testBit` 0 -False -> 0b10 `testBit` 1 -True -``` - -#### isSigned - -```haskell -isSigned :: Bits a => a -> Bool -``` - -```haskell -> isSigned 42 -True -> isSigned True -False -``` - -Bit Size ------------- - -```haskell -bitSize :: Bits a => a -> Int -``` - -```haskell -popCount :: Bits a => a -> Int -``` - -Bit Shifting ------------- - -```haskell -shiftL :: Bits a => a -> Int -> a -``` - -```haskell -shiftR :: Bits a => a -> Int -> a -``` - -Bit Rotation ------------- - -```haskell -rotate :: Bits a => a -> Int -> a -``` - -```haskell -rotateL :: Bits a => a -> Int -> a -``` - -```haskell -rotateR :: Bits a => a -> Int -> a -``` - -Byte Swapping ------------- - -```haskell -byteSwap16 :: Word16 -> Word16 -``` - -```haskell -byteSwap32 :: Word32 -> Word32 -``` - -```haskell -byteSwap64 :: Word64 -> Word64 -``` diff --git a/docs/Bool.md b/docs/Bool.md deleted file mode 100644 index d1ea2ca21f..0000000000 --- a/docs/Bool.md +++ /dev/null @@ -1,6 +0,0 @@ -Bool -===== - -```haskell -bool :: a -> a -> Bool -> a -``` diff --git a/docs/Concurrency.md b/docs/Concurrency.md deleted file mode 100644 index 92c552d0eb..0000000000 --- a/docs/Concurrency.md +++ /dev/null @@ -1,2 +0,0 @@ -Concurrency -=========== diff --git a/docs/Debug.md b/docs/Debug.md deleted file mode 100644 index 37363798c1..0000000000 --- a/docs/Debug.md +++ /dev/null @@ -1,96 +0,0 @@ -Debug -===== - -Stubbing --------- - -#### undefined - -```haskell -undefined :: a -``` - -An undefined expression standing in for an incomplete program, unevaluated type -witness, or unreachable code branch. - -*Example*: - -```haskell -> import Foreign.Storable -> print (sizeOf (undefined :: Int)) -8 -``` - -#### notImplemented - -```haskell -notImplemented :: a -``` - -An undefined expression standing in for a yet to completed program. - -*Example*: - -```haskell -main :: IO () -main = notImplemented -``` - -Tracing -------- - -#### trace - -```haskell -trace :: Print b => b -> a -> a -``` - -*Example*: - -#### traceM - -```haskell -traceM :: (Monad m) => Text -> m () -``` - -*Example*: - -#### traceId - -```haskell -traceId :: Text -> Text -``` - -*Example*: - -#### traceShowM - -```haskell -traceShowM :: (P.Show a, Monad m) => a -> m () -``` - -*Example*: - -#### traceShowId - -```haskell -traceShowId :: P.Show a => a -> a -``` - -*Example*: - -#### traceShow - -```haskell -traceShow :: P.Show a => a -> b -> b -``` - -*Example*: - -#### traceIO - -```haskell -traceIO :: Print b => b -> a -> IO a -``` - -*Example*: diff --git a/docs/Either.md b/docs/Either.md deleted file mode 100644 index 4b0819784e..0000000000 --- a/docs/Either.md +++ /dev/null @@ -1,2 +0,0 @@ -Either -====== diff --git a/docs/Exceptions.md b/docs/Exceptions.md deleted file mode 100644 index e528f94063..0000000000 --- a/docs/Exceptions.md +++ /dev/null @@ -1,126 +0,0 @@ -Exceptions -========== - -MonadError ----------- - -```haskell -class Monad m => MonadError e (m :: * -> *) | m -> e where - throwError :: e -> m a - catchError :: m a -> (e -> m a) -> m a -``` - -#### Except - -```haskell -type Except e = ExceptT e Identity -``` - -*Example*: - -```haskell -``` - -#### ExceptT - -```haskell -newtype ExceptT e (m :: * -> *) a - = Control.Monad.Trans.Except.ExceptT (m (Either e a)) -``` - -*Example*: - -```haskell -``` - -#### throwError - -```haskell -throwError :: MonadError e m => e -> m a -``` - -#### catchError - -```haskell -catchError :: MonadError e m => m a -> (e -> m a) -> m a -``` - -#### runExcept - -```haskell -runExcept :: Except e a -> Either e a -``` - -#### runExceptT - -```haskell -runExceptT :: ExceptT e m a -> m (Either e a) -``` - -Exceptions ----------- - -```haskell -class (Typeable e, Show e) => Exception e where - toException :: e -> SomeException - fromException :: SomeException -> Maybe e - GHC.Exception.displayException :: e -> String -``` - -#### throwIO - -```haskell -throwIO :: (MonadIO m, Exception e) => e -> m a -``` - -#### throwSTM - -```haskell -throwSTM :: Exception e => e -> STM a -``` - -#### throwTo - -```haskell -throwTo :: (MonadIO m, Exception e) => ThreadId -> e -> m () -``` - -Utilities ---------- - -#### hush - -```haskell -hush :: Alternative m => Either e a -> m a -``` - -#### note - -```haskell -note :: (MonadError e m, Applicative m) => e -> Maybe a -> m a -``` - -#### tryIO - -```haskell -tryIO :: MonadIO m => IO a -> ExceptT IOException m a -``` - -Fatal Errors ------------- - -```haskell -data FatalError = FatalError {fatalErrorMessage :: Text} -``` - -#### panic - -```haskell -panic :: Text -> a -``` - -Terminate with an uncatchable fatal error. - -```haskell -> panic "Fatal error occured. -``` diff --git a/docs/Files.md b/docs/Files.md deleted file mode 100644 index eb39fa4885..0000000000 --- a/docs/Files.md +++ /dev/null @@ -1,74 +0,0 @@ -Files -===== - -Basic IO --------- - -#### readFile - -```haskell -readFile :: FilePath -> IO Text -``` - -#### writeFile - -```haskell -writeFile :: FilePath -> Text -> IO () -``` - -#### appendFile - -```haskell -appendFile :: FilePath -> Text -> IO () -``` - -Console -------- - -#### getLine - -```haskell -getLine :: IO Text -``` - -#### getContents - -```haskell -getContents :: IO Text -``` - -#### interact - -```haskell -interact :: (Text -> Text) -> IO () -``` - -File Handles ------------- - -```haskell -data IOMode - = ReadMode - | WriteMode - | AppendMode - | ReadWriteMode -``` - -#### openFile - -```haskell -openFile :: FilePath -> IOMode -> IO Handle -``` - -#### withFile - -```haskell -withFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r -``` - - -#### stdin -#### stdout -#### stderr -#### Handle -#### FilePath diff --git a/docs/Folds.md b/docs/Folds.md deleted file mode 100644 index 80f5791214..0000000000 --- a/docs/Folds.md +++ /dev/null @@ -1,171 +0,0 @@ -Folds -===== - -Basic Folds ------------ - -```haskell -foldMap :: (Foldable t, Monoid m) => (a -> m) -> t a -> m -``` - -```haskell -foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b -``` - -```haskell -foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b -``` - -```haskell -foldr' :: Foldable t => (a -> b -> b) -> b -> t a -> b -``` - -```haskell -foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> b -``` - -```haskell -fold :: Foldable t => Monoid m => t m -> m -``` - -```haskell -toList :: Foldable t => t a -> [a] -``` - -```haskell -null :: Foldable t => t a -> Bool -``` - -```haskell -length :: Foldable t => t a -> Int -``` - -```haskell -elem :: (Eq a, Foldable t) => a -> t a -> Bool -``` - -```haskell -maximum :: (Ord a, Foldable t) => t a -> a -``` - -```haskell -minimum :: (Ord a, Foldable t) => t a -> a -``` - -```haskell -sum :: (Num a, Foldable f) => f a -> a -``` - -```haskell -product :: (Num a, Foldable f) => f a -> a -``` - -#### Folding actions - -```haskell -traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f () -``` - -```haskell -for_ :: (Foldable t, Applicative f) => t a -> (a -> f b) -> f () -``` - -*Example*: - -```haskell ->>> for_ [1..4] print -1 -2 -3 -4 -``` - - -#### Applicative Folds - -```haskell -sequenceA_ :: (Foldable t, Applicative f) => t (f a) -> f () -``` - -```haskell -asum :: (Foldable t, Alternative f) => t (f a) -> f a -``` - -#### Monadic Folds - -```haskell -mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m () -``` - -```haskell -forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m () -``` - -```haskell -sequence_ :: (Foldable t, Monad m) => t (m a) -> m () -``` - -```haskell -msum :: (Foldable t, MonadPlus m) => t (m a) -> m a -``` - -```haskell -foldrM :: (Foldable t, Monad m) => (a -> b -> m b) -> b -> t a -> m b -``` - -```haskell -foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b -``` - -#### Specialized folds - -```haskell -concat :: Foldable t => t [a] -> [a] -``` - -```haskell -concatMap :: Foldable t => (a -> [b]) -> t a -> [b] -``` - -```haskell -and :: Foldable t => t Bool -> Bool -``` - -```haskell -or :: Foldable t => t Bool -> Bool -``` - -```haskell -any :: Foldable t => (a -> Bool) -> t a -> Bool -``` - -```haskell -all :: Foldable t => (a -> Bool) -> t a -> Bool -``` - -```haskell -maximumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a -``` - -```haskell -minimumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a -``` - -#### Searches - -```haskell -notElem :: (Foldable t, Eq a) => a -> t a -> Bool -``` - -```haskell -find :: Foldable t => (a -> Bool) -> t a -> Maybe a -``` - - -```haskell -foldr1May :: (a -> a -> a) -> [a] -> Maybe a -``` - -```haskell -foldl1May :: (a -> a -> a) -> [a] -> Maybe a -``` diff --git a/docs/Function.md b/docs/Function.md deleted file mode 100644 index 6685914556..0000000000 --- a/docs/Function.md +++ /dev/null @@ -1,153 +0,0 @@ -Functions -========= - -Composition ------------ - -#### $ - -```haskell -($) :: (a -> b) -> a -> b -``` - -Infix form of function application. Applies a function from ``a → b`` to an -argument ``a``. - -*Example*: - -```haskell -> take 2 $ [1,2,3] -[1,2] -``` - -#### . - -```haskell -(.) :: (b -> c) -> (a -> b) -> a -> c -``` - -Function composition. Composes a function ``f`` (``b → c``) with a function -``g`` (``a → b``) yielding ``f ∘ g``. - -*Example*: - -```haskell -> map (negate . abs) [-1,0,1] -[-1,0,-1] -``` - -#### & - -```haskell -(&) :: a -> (a -> b) -> b -``` - -Flipped form of ``($)`` which applies an argument ``a`` to a function ``a → b``. - -*Example*: - -```haskell -> [1,2,3] & take 2 -[1,2] - -> replicate 10 3 & take 5 & tail -[3,3,3,3] -``` - -#### flip - -```haskell -flip :: (a -> b -> c) -> b -> a -> c -``` - -Flip takes a function of two arguments and returns a function taking the them in -reverse order. - -*Example*: - -```haskell -λ> flip take [1,2,3] 2 -[1,2] -``` - -#### on - -```haskell -on :: (b -> b -> c) -> (a -> b) -> a -> a -> c -``` - -*Example*: - -```haskell -> sortBy (compare `on` fst) [(1,2), (3,4), (0,1)] -[(0,1),(1,2),(3,4)] -``` - -#### const - -```haskell -const :: a -> b -> a -``` - -*Example*: - -#### fix - -```haskell -fix :: (a -> a) -> a -``` - -*Example*: - -#### identity - -```haskell -identity :: a -> a -``` - -The identity function maps any value to itself. - -#### applyN - -Apply a function to a value `n` times. - -*Example*: - -```haskell -applyN :: Int -> (a -> a) -> a -> a -``` - -```haskell -> applyN 25 (+2) 0 -50 - -> applyN 3 (1:) [] -[1,1,1] -``` - -Strictness ------------ - -#### $! - -```haskell -($!) :: NFData a => (a -> b) -> a -> b -``` - -*Example*: - -#### $!! - -```haskell -($!!) :: NFData a => (a -> b) -> a -> b -``` - -*Example*: - -#### force - -```haskell -force :: NFData a => a -> a -``` - -*Example*: diff --git a/docs/Functor.md b/docs/Functor.md deleted file mode 100644 index 40a80c2487..0000000000 --- a/docs/Functor.md +++ /dev/null @@ -1,41 +0,0 @@ -Functor -======= - -#### map - -```haskell -map :: Functor f => (a -> b) -> f a -> f b -``` - -#### $> - -```haskell -($>) :: Functor f => f a -> b -> f b -``` - -#### <$> - -```haskell -(<$>) :: Functor f => (a -> b) -> f a -> f b -``` - -#### <<$>> - -```haskell -(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b) -``` - -#### void - -```haskell -void :: Functor f => f a -> f () -``` - -#### foreach - -```haskell -foreach :: Functor f => f a -> (a -> b) -> f b -(<&>) :: Functor f => f a -> (a -> b) -> f b -``` - - diff --git a/docs/Generics.md b/docs/Generics.md deleted file mode 100644 index ab46d3cda8..0000000000 --- a/docs/Generics.md +++ /dev/null @@ -1,2 +0,0 @@ -Generics -======== diff --git a/docs/Hashing.md b/docs/Hashing.md deleted file mode 100644 index db193d9778..0000000000 --- a/docs/Hashing.md +++ /dev/null @@ -1,14 +0,0 @@ -Hashing -======= - -```haskell -hashWithSalt :: Hashable a => Int -> a -> Int -``` - -```haskell -hash :: Hashable a => a -> Int -``` - -```haskell -hashUsing :: Hashable b => (a -> b) -> Int -> a -> Int -``` diff --git a/docs/List.md b/docs/List.md deleted file mode 100644 index 7c39f02b29..0000000000 --- a/docs/List.md +++ /dev/null @@ -1,158 +0,0 @@ -List -==== - -Slicing -------- - -#### head - -```haskell -head :: Foldable f => f a -> Maybe a -``` - -#### tailMay - -```haskell -tailMay :: [a] -> Maybe [a] -``` - -#### tailSafe - -```haskell -tailSafe :: [a] -> [a] -``` - -#### initMay - -```haskell -initMay :: [a] -> Maybe [a] -``` - -#### initSafe - -```haskell -initSafe :: [a] -> [a] -``` - -#### initDef - -```haskell -initDef :: [a] -> [a] -> [a] -``` - -#### lastMay - -```haskell -lastMay :: [a] -> Maybe a -``` - -#### lastDef - -```haskell -lastDef :: a -> [a] -> a -``` - -#### drop - -```haskell -drop :: Int -> [a] -> [a] -``` - -#### take - -```haskell -take :: Int -> [a] -> [a] -``` - -Unpacking ---------- - -#### uncons - -```haskell -uncons :: [a] -> Maybe (a, [a]) -``` - -#### unsnoc - -```haskell -unsnoc :: [x] -> Maybe ([x],x) -``` - -#### list - -```haskell -list :: [b] -> (a -> b) -> [a] -> [b] -``` - -Sorting ---------- - -#### sortOn - -```haskell -sortOn :: Ord o => (a -> o) -> [a] -> [a] -``` - -Removing ---------- - -#### ordNub - -```haskell -ordNub :: Ord a => [a] -> [a] -``` - -Splitting ---------- - -#### splitAt - -```haskell -splitAt :: Int -> [a] -> ([a], [a]) -``` - -#### intercalate - -```haskell -intercalate :: [a] -> [[a]] -> [a] -``` - -Comparison ---------- - -#### isPrefixOf - -```haskell -isPrefixOf :: Eq a => [a] -> [a] -> Bool -``` - -Filtering ---------- - -#### filter - -```haskell -filter :: (a -> Bool) -> [a] -> [a] -``` - -#### replicate - -```haskell -replicate :: Int -> a -> [a] -``` - -Indexing --------- - -#### atMay - -```haskell -atMay :: [a] -> Int -> Maybe a -``` - -#### atDef - -```haskell -atDef :: a -> [a] -> Int -> a -``` diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index e0d0d9ad33..0000000000 --- a/docs/Makefile +++ /dev/null @@ -1,225 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " applehelp to make an Apple Help Book" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " epub3 to make an epub3" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - @echo " coverage to run coverage check of the documentation (if enabled)" - @echo " dummy to check syntax errors of document sources" - -.PHONY: clean -clean: - rm -rf $(BUILDDIR)/* - -.PHONY: html -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -.PHONY: dirhtml -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -.PHONY: singlehtml -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -.PHONY: pickle -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -.PHONY: json -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -.PHONY: htmlhelp -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -.PHONY: qthelp -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/protolude.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/protolude.qhc" - -.PHONY: applehelp -applehelp: - $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp - @echo - @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." - @echo "N.B. You won't be able to view it unless you put it in" \ - "~/Library/Documentation/Help or install it in your application" \ - "bundle." - -.PHONY: devhelp -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/protolude" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/protolude" - @echo "# devhelp" - -.PHONY: epub -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -.PHONY: epub3 -epub3: - $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 - @echo - @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." - -.PHONY: latex -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -.PHONY: latexpdf -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -.PHONY: latexpdfja -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -.PHONY: text -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -.PHONY: man -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -.PHONY: texinfo -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -.PHONY: info -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -.PHONY: gettext -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -.PHONY: changes -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -.PHONY: linkcheck -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -.PHONY: doctest -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -.PHONY: coverage -coverage: - $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage - @echo "Testing of coverage in the sources finished, look at the " \ - "results in $(BUILDDIR)/coverage/python.txt." - -.PHONY: xml -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -.PHONY: pseudoxml -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." - -.PHONY: dummy -dummy: - $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy - @echo - @echo "Build finished. Dummy builder generates no files." diff --git a/docs/Maybe.md b/docs/Maybe.md deleted file mode 100644 index e155d41221..0000000000 --- a/docs/Maybe.md +++ /dev/null @@ -1,38 +0,0 @@ -Maybe -===== - -```haskell -maybe :: b -> (a -> b) -> Maybe a -> b -``` - -```haskell -isJust :: Maybe a -> Bool -``` - -```haskell -isNothing :: Maybe a -> Bool -``` - -```haskell -fromJust :: Maybe a -> a -``` - -```haskell -fromMaybe :: a -> Maybe a -> a -``` - -```haskell -listToMaybe :: [a] -> Maybe a -``` - -```haskell -maybeToList :: Maybe a -> [a] -``` - -```haskell -catMaybes :: [Maybe a] -> [a] -``` - -```haskell -mapMaybe :: (a -> Maybe b) -> [a] -> [b] -``` diff --git a/docs/Monad.md b/docs/Monad.md deleted file mode 100644 index 78d0ea4fae..0000000000 --- a/docs/Monad.md +++ /dev/null @@ -1,150 +0,0 @@ -Monads -====== - -Monad ------ - -```haskell -class Applicative m => Monad (m :: * -> *) where - (>>=) :: m a -> (a -> m b) -> m b - (>>) :: m a -> m b -> m b - return :: a -> m a -``` - -```haskell -(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c -``` - -```haskell -(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c -``` - -```haskell -(>>) :: Monad m => m a -> m b -> m b -``` - -```haskell -(>>=) :: Monad m => m a -> (a -> m b) -> m b -``` - -```haskell -forever :: Monad m => m a -> m b -``` - -```haskell -join :: Monad m => m (m a) -> m a -``` - -```haskell -filterM :: Monad m => (a -> m Bool) -> [a] -> m [a] -``` - -```haskell -mapAndUnzipM :: Monad m => (a -> m (b, c)) -> [a] -> m ([b], [c]) -``` - -```haskell -zipWithM :: Monad m => (a -> b -> m c) -> [a] -> [b] -> m [c] -``` - -```haskell -zipWithM_ :: Monad m => (a -> b -> m c) -> [a] -> [b] -> m () -``` - -```haskell -foldM :: (Monad m, Foldable t) => (b -> a -> m b) -> b -> t a -> m b -``` - -```haskell -foldM_ :: (Monad m, Foldable t) => (b -> a -> m b) -> b -> t a -> m () -``` - -```haskell -replicateM :: Monad m => Int -> m a -> m [a] -``` - -```haskell -replicateM_ :: Monad m => Int -> m a -> m () -``` - -```haskell -concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b] -``` - -```haskell -guard :: Alternative f => Bool -> f () -``` - -```haskell -when :: Applicative f => Bool -> f () -> f () -``` - -```haskell -unless :: Applicative f => Bool -> f () -> f () -``` - -```haskell -liftM :: Monad m => (a1 -> r) -> m a1 -> m r -``` - -```haskell -liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r -``` - -```haskell -liftM3 :: Monad m => (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r -``` - -```haskell -liftM4 :: Monad m => (a1 -> a2 -> a3 -> a4 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m r -``` - -```haskell -liftM5 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r -``` - -```haskell -liftM' :: Monad m => (a -> b) -> m a -> m b -``` - -```haskell -liftM2' :: Monad m => (a -> b -> c) -> m a -> m b -> m c -``` - -```haskell -ap :: Monad m => m (a -> b) -> m a -> m b -``` - -```haskell -(<$!>) :: Monad m => (a -> b) -> m a -> m b -``` - -```haskell -whenM :: Monad m => m Bool -> m () -> m () -``` - -```haskell -unlessM :: Monad m => m Bool -> m () -> m () -``` - -```haskell -ifM :: Monad m => m Bool -> m a -> m a -> m a -``` - -```haskell -guardM :: MonadPlus m => m Bool -> m () -``` - -MonadPlus ------ - -```haskell -class (Alternative m, Monad m) => MonadPlus (m :: * -> *) where - mzero :: m a - mplus :: m a -> m a -> m a - -- Defined in ‘GHC.Base’ -``` - -```haskell -mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a -``` diff --git a/docs/Monoid.md b/docs/Monoid.md deleted file mode 100644 index 55b8a68f2e..0000000000 --- a/docs/Monoid.md +++ /dev/null @@ -1,79 +0,0 @@ -Monoid -====== - -Monoid ------- - -#### mempty - -```haskell -mempty :: Monoid a => a -``` - -#### <> - -```haskell -(<>) :: Monoid m => m -> m -> m -``` - -```haskell -mappend :: Monoid a => a -> a -> a -``` - -#### mconcat - -```haskell -mconcat :: Monoid a => [a] -> a -``` - -Semigroup ---------- - -#### <> - -```haskell -(<>) :: Semigroup a => a -> a -> a -``` - -#### sconcat - -```haskell -sconcat :: Semigroup a => NonEmpty a -> a -``` - -#### stimes - -```haskell -stimes :: (Semigroup a, Integral b) => b -> a -> a -``` - -```haskell -option :: b -> (a -> b) -> Option a -> b -``` - -```haskell -diff :: Semigroup m => m -> Endo m -``` - -```haskell -cycle1 :: Semigroup m => m -> m -``` - -```haskell -stimesMonoid :: (Integral b, Monoid a) => b -> a -> a -``` - -```haskell -stimesIdempotent :: Integral b => b -> a -> a -``` - -```haskell -stimesIdempotentMonoid :: (Integral b, Monoid a) => b -> a -> a -``` - -```haskell -mtimesDefault :: (Integral b, Monoid a) => b -> a -> a -``` - -NonEmpty ---------- diff --git a/docs/Numbers.md b/docs/Numbers.md deleted file mode 100644 index 134ae728f3..0000000000 --- a/docs/Numbers.md +++ /dev/null @@ -1,31 +0,0 @@ -Numbers -======= - -* Int8 -* Int16 -* Int32 -* Int64 -* Integer -* Word -* Word8 -* Word16 -* Word32 -* Word64 - -Arithemtic ----------- - -Trigonometric -------------- - -Comparisons ------------ - -Ratios ------- - -Complex Numbers ---------------- - -Conversions ------------ diff --git a/docs/Reader.md b/docs/Reader.md deleted file mode 100644 index b8c4c7e81a..0000000000 --- a/docs/Reader.md +++ /dev/null @@ -1,2 +0,0 @@ -Reader -====== diff --git a/docs/ST.md b/docs/ST.md deleted file mode 100644 index 2c23fbea4f..0000000000 --- a/docs/ST.md +++ /dev/null @@ -1,2 +0,0 @@ -ST -== diff --git a/docs/State.md b/docs/State.md deleted file mode 100644 index b81674eedd..0000000000 --- a/docs/State.md +++ /dev/null @@ -1,2 +0,0 @@ -State -===== diff --git a/docs/Strings.md b/docs/Strings.md deleted file mode 100644 index 080604f08f..0000000000 --- a/docs/Strings.md +++ /dev/null @@ -1,122 +0,0 @@ -Strings -======= - -```haskell -import qualified Data.Text as T -import qualified Data.Text.Lazy as L -``` - -Text ----- - -The Text type represents Unicode character strings, in a time and space-efficient manner. This package provides text processing capabilities that are optimized for performance critical use, both in terms of large data quantities and high speed. - -LText ------ - -Bytestring ----------- - -LBytestring ------------ - -Encoding ----------- - -#### encodeUtf8 - -```haskell -encodeUtf8 :: Text -> ByteString -``` - -```haskell -> encodeUtf8 "ポケット" -"\227\131\157\227\130\177\227\131\131\227\131\136" -``` - -#### decodeUtf8 - -```haskell -decodeUtf8 :: ByteString -> Text -``` - -```haskell -> putStrLn $ decodeUtf8 "\227\131\157\227\130\177\227\131\131\227\131\136" -ポケット -``` - -#### decodeUtf8' - -```haskell -decodeUtf8' :: ByteString -> Either UnicodeException Text -``` - -#### decodeUtf8With - -```haskell -decodeUtf8With :: OnDecodeError -> ByteString -> Text -``` - -#### UnicodeException - -```haskell -data UnicodeException - = DecodeError [Char] (Maybe Word8) - | EncodeError [Char] (Maybe Char) -``` - -Strictness ----------- - -#### fromStrict - -```haskell -fromStrict :: Text -> LText -``` - -#### toStrict - -```haskell -toStrict :: LText -> Text -``` - -Conversion ----------- - -```haskell -class StringConv a b where - strConv :: Leniency -> a -> b - -data Leniency = Lenient | Strict -``` - -#### toS - -```haskell -toS :: StringConv a b => a -> b -``` - -#### toSL - -```haskell -toSL :: StringConv a b => a -> b -``` - -*Example*: - -```haskell -a :: LByteString -a = "Einstein" - -b :: Text -b = "Feynmann" - -c :: ByteString -c = "Schrödinger" - -example1 :: ByteString -example1 = toS b - -example2 :: Bool -example2 = (a == toS b) && (toS b == c) -``` diff --git a/docs/Transformers.md b/docs/Transformers.md deleted file mode 100644 index 90200db722..0000000000 --- a/docs/Transformers.md +++ /dev/null @@ -1,2 +0,0 @@ -Transformers -============ diff --git a/docs/Traversals.md b/docs/Traversals.md deleted file mode 100644 index 31a1c1607b..0000000000 --- a/docs/Traversals.md +++ /dev/null @@ -1,2 +0,0 @@ -Traversals -========== diff --git a/docs/Tuple.md b/docs/Tuple.md deleted file mode 100644 index f9cbb5b731..0000000000 --- a/docs/Tuple.md +++ /dev/null @@ -1,76 +0,0 @@ -Tuples -====== - -#### fst - -```haskell -fst :: (a, b) -> a -``` - -Extract the first component of a pair. - -*Example*: - -```haskell -> fst (1,2) -``` - -#### snd - -```haskell -snd :: (a, b) -> b -``` - -Extract the second component of a pair. - -*Example*: - -```haskell -> snd (1,2) -2 -``` - -#### swap - -```haskell -swap :: (a, b) -> (b, a) -``` - -Swap the components of a pair. - -*Example*: - -```haskell -> swap (1,2) -(2,1) -``` - -#### curry - -```haskell -curry :: ((a, b) -> c) -> a -> b -> c -``` - -curry converts an uncurried function to a curried function. - -*Example*: - -```haskell -> curry fst 1 2 -1 -``` - -#### uncurry - -```haskell -uncurry :: (a -> b -> c) -> (a, b) -> c -``` - -uncurry converts a curried function to a function on pairs. - -*Example*: - -```haskell -> uncurry (+) (1,2) -3 -``` diff --git a/docs/TypeLevel.md b/docs/TypeLevel.md deleted file mode 100644 index 2ac0468722..0000000000 --- a/docs/TypeLevel.md +++ /dev/null @@ -1,95 +0,0 @@ -Type Level -========== - -```haskell -data Coercion (a :: k) (b :: k) where - Coercion :: forall (k :: BOX) (a :: k) (b :: k). Coercible a b => Coercion a b -``` - -```haskell -coerceWith :: Coercion a b -> a -> b -``` - -#### Empty - -```haskell -data Void -``` - -```haskell -absurd :: Void -> a -``` - -```haskell -vacuous :: Functor f => f Void -> f a -``` - -#### Proxy - -```haskell -data Proxy (t :: k) = Proxy -``` - -#### Symbol - -```haskell -symbolVal :: KnownSymbol n => proxy n -> String -``` - -*Example*: - -```haskell -b :: String -b = symbolVal (Proxy :: Proxy "foo") -``` - -```haskell -someSymbolVal :: String -> SomeSymbol -``` - -*Example*: - -#### Nat - -```haskell -natVal :: KnownNat n => proxy n -> Integer -``` - -*Example*: - -```haskell -a :: Integer -a = natVal (Proxy :: Proxy 1) -``` - -```haskell -someNatVal :: Integer -> Maybe SomeNat -``` - -*Example*: - -#### Type Equality - -```haskell -(:~:) :: k -> k -> * -``` - -```haskell -(==) :: k -> k -> Bool -``` - -```haskell -sym :: a :~: b -> b :~: a -``` - -```haskell -trans :: a :~: b -> b :~: c -> a :~: c -``` - -```haskell -castWith :: a :~: b -> a -> b -``` - -```haskell -gcastWith :: a :~: b -> ((a ~ b) => r) -> r -``` diff --git a/docs/Unsafe.md b/docs/Unsafe.md deleted file mode 100644 index 24da25e38d..0000000000 --- a/docs/Unsafe.md +++ /dev/null @@ -1,2 +0,0 @@ -Unsafe -====== diff --git a/docs/conf.py b/docs/conf.py deleted file mode 100644 index afc5b41fc6..0000000000 --- a/docs/conf.py +++ /dev/null @@ -1,348 +0,0 @@ -# -*- coding: utf-8 -*- -# -# protolude documentation build configuration file, created by -# sphinx-quickstart on Thu Dec 8 09:08:30 2016. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) - -import sphinx_rtd_theme -from recommonmark.parser import CommonMarkParser - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -# -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - 'sphinx.ext.githubpages', -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -# source_suffix = ['.rst', '.md'] - -source_parsers = { - '.md': CommonMarkParser, -} -source_suffix = ['.rst', '.md'] - -# The encoding of source files. -# -# source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'protolude' -copyright = u'2016, Stephen Diehl' -author = u'Stephen Diehl' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = u'0.1.11' -# The full version, including alpha/beta/rc tags. -release = u'0.1.11' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -# -# today = '' -# -# Else, today_fmt is used as the format for a strftime call. -# -# today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -# -# default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -# -# add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -# -# add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -# -# show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -# modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -# keep_warnings = False - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = False - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = "sphinx_rtd_theme" - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# -# html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = [] -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - -# The name for this set of Sphinx documents. -# " v documentation" by default. -# -# html_title = u'protolude v0.1.11' - -# A shorter title for the navigation bar. Default is the same as html_title. -# -# html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -# -# html_logo = None - -# The name of an image file (relative to this directory) to use as a favicon of -# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -# -# html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -# -# html_extra_path = [] - -# If not None, a 'Last updated on:' timestamp is inserted at every page -# bottom, using the given strftime format. -# The empty string is equivalent to '%b %d, %Y'. -# -# html_last_updated_fmt = None - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -# -# html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -# -# html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -# -# html_additional_pages = {} - -# If false, no module index is generated. -# -# html_domain_indices = True - -# If false, no index is generated. -# -# html_use_index = True - -# If true, the index is split into individual pages for each letter. -# -# html_split_index = False - -# If true, links to the reST sources are added to the pages. -# -# html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -# -# html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -# -# html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -# -# html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -# html_file_suffix = None - -# Language to be used for generating the HTML full-text search index. -# Sphinx supports the following languages: -# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' -# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh' -# -# html_search_language = 'en' - -# A dictionary with options for the search language support, empty by default. -# 'ja' uses this config value. -# 'zh' user can custom change `jieba` dictionary path. -# -# html_search_options = {'type': 'default'} - -# The name of a javascript file (relative to the configuration directory) that -# implements a search results scorer. If empty, the default will be used. -# -# html_search_scorer = 'scorer.js' - -# Output file base name for HTML help builder. -htmlhelp_basename = 'protoludedoc' - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # - # 'papersize': 'letterpaper', - - # The font size ('10pt', '11pt' or '12pt'). - # - # 'pointsize': '10pt', - - # Additional stuff for the LaTeX preamble. - # - # 'preamble': '', - - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'protolude.tex', u'protolude Documentation', - u'Stephen Diehl', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -# -# latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -# -# latex_use_parts = False - -# If true, show page references after internal links. -# -# latex_show_pagerefs = False - -# If true, show URL addresses after external links. -# -# latex_show_urls = False - -# Documents to append as an appendix to all manuals. -# -# latex_appendices = [] - -# It false, will not define \strong, \code, itleref, \crossref ... but only -# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added -# packages. -# -# latex_keep_old_macro_names = True - -# If false, no module index is generated. -# -# latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'protolude', u'protolude Documentation', - [author], 1) -] - -# If true, show URL addresses after external links. -# -# man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'protolude', u'protolude Documentation', - author, 'protolude', 'One line description of project.', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -# -# texinfo_appendices = [] - -# If false, no module index is generated. -# -# texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -# -# texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -# -# texinfo_no_detailmenu = False diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index b95e877bc1..0000000000 --- a/docs/index.rst +++ /dev/null @@ -1,47 +0,0 @@ -Protolude Documentation -======================= - -An alternative Prelude. - -.. toctree:: - :maxdepth: 0 - Function - Strings - Bool - Numbers - Printing - Files - Debug - Bits - Functor - Applicative - Monad - Maybe - Either - Monoid - Semigroup - Bifunctor - List - Folds - Traversals - Transformers - Reader - State - Exceptions - ST - Concurrency - Storable - System - Map - Set - Tuple - Generics - Hashing - TypeLevel - Unsafe - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`search` diff --git a/export_lists/protolude-10.exports b/export_lists/protolude-10.exports new file mode 100644 index 0000000000..84b06e7732 --- /dev/null +++ b/export_lists/protolude-10.exports @@ -0,0 +1,960 @@ +$ from GHC.Base +$! from Protolude.Base +$!! from Control.DeepSeq +$> from Data.Functor +% from GHC.Real +& from Data.Function +&& from GHC.Classes +&&^ from Protolude.Bool +* from GHC.Num +* from GHC.Types +** from GHC.Float +*> from GHC.Base ++ from GHC.Num +++ from GHC.Base +- from GHC.Num +. from GHC.Base +.&. from Data.Bits +.|. from Data.Bits +/ from GHC.Real +/= from GHC.Classes +:% from GHC.Real +:*: from GHC.Generics +:*: from GHC.Generics +:+ from Data.Complex +:+: from GHC.Generics +:.: from GHC.Generics +:| from Data.List.NonEmpty +:~: from Data.Type.Equality +< from GHC.Classes +<$ from GHC.Base +<$!> from Control.Monad +<$> from Data.Functor +<&&> from Protolude.Bool +<&> from Protolude.Functor +<* from GHC.Base +<**> from GHC.Base +<*> from GHC.Base +<.> from Protolude.Semiring +<<$>> from Protolude.Functor +<<*>> from Protolude.Applicative +<= from GHC.Classes +<=< from Control.Monad +<> from Data.Monoid +<|> from GHC.Base +<||> from Protolude.Bool +=<< from GHC.Base +== from GHC.Classes +== from Data.Type.Equality +> from GHC.Classes +>= from GHC.Classes +>=> from Control.Monad +>> from GHC.Base +>>= from GHC.Base +All from Data.Monoid +All from Data.Monoid +AllocationLimitExceeded from GHC.IO.Exception +AllocationLimitExceeded from GHC.IO.Exception +Alt from Data.Monoid +Alt from Data.Monoid +Alternative from GHC.Base +Any from Data.Monoid +Any from Data.Monoid +AppendMode from GHC.IO.IOMode +Applicative from GHC.Base +ArithException from GHC.Exception +ArrayException from GHC.IO.Exception +AssertionFailed from GHC.IO.Exception +AssertionFailed from GHC.IO.Exception +Associativity from GHC.Generics +Async from Control.Concurrent.Async +AsyncException from GHC.IO.Exception +Bifunctor from Data.Bifunctor +Bits from Data.Bits +BlockedIndefinitelyOnMVar from GHC.IO.Exception +BlockedIndefinitelyOnMVar from GHC.IO.Exception +BlockedIndefinitelyOnSTM from GHC.IO.Exception +BlockedIndefinitelyOnSTM from GHC.IO.Exception +Bool from GHC.Types +Bounded from GHC.Enum +ByteString from Data.ByteString.Internal +C1 from GHC.Generics +CallStack from GHC.Stack.Types +Chan from Control.Concurrent.Chan +Char from GHC.Types +CmpNat from GHC.TypeNats +Coercible from GHC.Types +Coercion from Data.Type.Coercion +Coercion from Data.Type.Coercion +Comp1 from GHC.Generics +CompactionFailed from GHC.IO.Exception +CompactionFailed from GHC.IO.Exception +Complex from Data.Complex +Concurrently from Control.Concurrent.Async +Concurrently from Control.Concurrent.Async +Const from Data.Functor.Const +Const from Data.Functor.Const +Constraint from GHC.Types +Constructor from GHC.Generics +D# from GHC.Types +D1 from GHC.Generics +Datatype from GHC.Generics +Deadlock from GHC.IO.Exception +Deadlock from GHC.IO.Exception +Denormal from GHC.Exception +DivideByZero from GHC.Exception +Double from GHC.Types +Down from Data.Ord +Down from Data.Ord +Dual from Data.Monoid +Dual from Data.Monoid +EQ from GHC.Types +Either from Data.Either +Endo from Data.Monoid +Endo from Data.Monoid +Enum from GHC.Enum +Eq from GHC.Classes +ErrorCall from GHC.Exception +ErrorCall from GHC.Exception +ErrorCallWithLocation from GHC.Exception +Except from Control.Monad.Trans.Except +ExceptT from Control.Monad.Trans.Except +ExceptT from Control.Monad.Trans.Except +Exception from GHC.Exception +ExitCode from GHC.IO.Exception +ExitFailure from GHC.IO.Exception +ExitSuccess from GHC.IO.Exception +F# from GHC.Types +False from GHC.Types +FatalError from Protolude.Panic +FatalError from Protolude.Panic +FilePath from GHC.IO +FiniteBits from Data.Bits +First from Data.Monoid +First from Data.Monoid +Fixity from GHC.Generics +FixityI from GHC.Generics +Float from GHC.Types +Floating from GHC.Float +Foldable from Data.Foldable +Fractional from GHC.Real +FunPtr from GHC.Ptr +Functor from GHC.Base +GT from GHC.Types +Generic from GHC.Generics +Generic1 from GHC.Generics +Handle from GHC.IO.Handle.Types +HasCallStack from GHC.Stack.Types +HasField from GHC.Records +Hashable from Data.Hashable.Class +HeapOverflow from GHC.IO.Exception +IO from GHC.Types +IOException from GHC.IO.Exception +IOMode from GHC.IO.IOMode +Identity from Data.Functor.Identity +Identity from Data.Functor.Identity +IndexOutOfBounds from GHC.IO.Exception +Infix from GHC.Generics +InfixI from GHC.Generics +Int from GHC.Types +Int16 from GHC.Int +Int32 from GHC.Int +Int64 from GHC.Int +Int8 from GHC.Int +IntMap from Data.IntMap.Internal +IntPtr from Foreign.Ptr +IntSet from Data.IntSet.Internal +Integer from GHC.Integer.Type +Integral from GHC.Real +IsLabel from GHC.OverloadedLabels +IsString from Data.String +Just from GHC.Base +K1 from GHC.Generics +K1 from GHC.Generics +KnownNat from GHC.TypeNats +KnownSymbol from GHC.TypeLits +L1 from GHC.Generics +LByteString from Protolude +LT from GHC.Types +LText from Protolude +Last from Data.Monoid +Last from Data.Monoid +Left from Data.Either +LeftAssociative from GHC.Generics +Leniency from Protolude.Conv +Lenient from Protolude.Conv +Location from GHC.ExecutionStack.Internal +Location from GHC.ExecutionStack.Internal +LossOfPrecision from GHC.Exception +M1 from GHC.Generics +M1 from GHC.Generics +MVar from GHC.MVar +Map from Data.Map.Internal +MaskedInterruptible from GHC.IO +MaskedUninterruptible from GHC.IO +MaskingState from GHC.IO +Maybe from GHC.Base +Meta from GHC.Generics +MetaCons from GHC.Generics +MetaData from GHC.Generics +MetaSel from GHC.Generics +Monad from GHC.Base +MonadError from Control.Monad.Error.Class +MonadIO from Control.Monad.IO.Class +MonadPlus from GHC.Base +MonadReader from Control.Monad.Reader.Class +MonadState from Control.Monad.State.Class +Monoid from GHC.Base +NFData from Control.DeepSeq +Nat from GHC.Types +NestedAtomically from Control.Exception.Base +NestedAtomically from Control.Exception.Base +NoMethodError from Control.Exception.Base +NoMethodError from Control.Exception.Base +NonEmpty from Data.List.NonEmpty +NonTermination from Control.Exception.Base +NonTermination from Control.Exception.Base +NotAssociative from GHC.Generics +Nothing from GHC.Base +Num from GHC.Num +OnDecodeError from Data.Text.Encoding.Error +OnError from Data.Text.Encoding.Error +Option from Data.Semigroup +Option from Data.Semigroup +Ord from GHC.Classes +Ordering from GHC.Types +Overflow from GHC.Exception +PatternMatchFail from Control.Exception.Base +PatternMatchFail from Control.Exception.Base +Prefix from GHC.Generics +PrefixI from GHC.Generics +Print from Protolude.Show +Product from Data.Monoid +Product from Data.Monoid +Proxy from Data.Proxy +Proxy from Data.Proxy +Ptr from GHC.Ptr +QSem from Control.Concurrent.QSem +QSemN from Control.Concurrent.QSemN +R1 from GHC.Generics +Ratio from GHC.Real +RatioZeroDenominator from GHC.Exception +Rational from GHC.Real +Read from GHC.Read +ReadMode from GHC.IO.IOMode +ReadWriteMode from GHC.IO.IOMode +Reader from Control.Monad.Trans.Reader +ReaderT from Control.Monad.Trans.Reader +ReaderT from Control.Monad.Trans.Reader +Real from GHC.Real +RealFloat from GHC.Float +RealFrac from GHC.Real +Rec0 from GHC.Generics +RecConError from Control.Exception.Base +RecConError from Control.Exception.Base +RecSelError from Control.Exception.Base +RecSelError from Control.Exception.Base +RecUpdError from Control.Exception.Base +RecUpdError from Control.Exception.Base +Refl from Data.Type.Equality +Rep from GHC.Generics +Right from Data.Either +RightAssociative from GHC.Generics +S1 from GHC.Generics +ST from GHC.ST +STM from GHC.Conc.Sync +Selector from GHC.Generics +Semigroup from Data.Semigroup +Semiring from Protolude.Semiring +Seq from Data.Sequence.Internal +Set from Data.Set.Internal +Show from GHC.Show +SomeAsyncException from GHC.IO.Exception +SomeAsyncException from GHC.IO.Exception +SomeException from GHC.Exception +SomeException from GHC.Exception +SomeNat from GHC.TypeNats +SomeNat from GHC.TypeNats +SomeSymbol from GHC.TypeLits +SomeSymbol from GHC.TypeLits +SrcLoc from GHC.ExecutionStack.Internal +SrcLoc from GHC.ExecutionStack.Internal +StablePtr from GHC.Stable +StackOverflow from GHC.IO.Exception +State from Control.Monad.Trans.State.Lazy +StateT from Control.Monad.Trans.State.Lazy +StateT from Control.Monad.Trans.State.Lazy +StaticPtr from GHC.StaticPtr +Storable from Foreign.Storable +Strict from Protolude.Conv +StringConv from Protolude.Conv +Sum from Data.Monoid +Sum from Data.Monoid +Symbol from GHC.Types +Text from Data.Text.Internal +ThreadId from GHC.Conc.Sync +ThreadKilled from GHC.IO.Exception +Traversable from Data.Traversable +True from GHC.Types +Type from GHC.Types +TypeError from Control.Exception.Base +TypeError from Control.Exception.Base +TypeRep from Data.Typeable +Typeable from Data.Typeable.Internal +U1 from GHC.Generics +U1 from GHC.Generics +URec from GHC.Generics +UndefinedElement from GHC.IO.Exception +Underflow from GHC.Exception +UnicodeException from Data.Text.Encoding.Error +Unmasked from GHC.IO +UserInterrupt from GHC.IO.Exception +V1 from GHC.Generics +Void from Data.Void +Word from GHC.Types +Word16 from GHC.Word +Word32 from GHC.Word +Word64 from GHC.Word +Word8 from GHC.Word +WordPtr from Foreign.Ptr +WrappedMonoid from Data.Semigroup +WriteMode from GHC.IO.IOMode +ZipList from Control.Applicative +ZipList from Control.Applicative +^ from GHC.Real +^%^ from GHC.Real +^^ from GHC.Real +^^%^^ from GHC.Real +abs from GHC.Num +absurd from Data.Void +acos from GHC.Float +acosh from GHC.Float +addMVarFinalizer from Control.Concurrent.MVar +all from Data.Foldable +allowInterrupt from Control.Exception +always from GHC.Conc.Sync +alwaysSucceeds from GHC.Conc.Sync +and from Data.Foldable +any from Data.Foldable +ap from GHC.Base +appEndo from Data.Monoid +appendFile from Data.Text.IO +applyN from Protolude +asTypeOf from GHC.Base +asin from GHC.Float +asinh from GHC.Float +ask from Control.Monad.Reader.Class +asks from Control.Monad.Reader.Class +asum from Data.Foldable +async from Control.Concurrent.Async +asyncBound from Control.Concurrent.Async +asyncExceptionFromException from GHC.IO.Exception +asyncExceptionToException from GHC.IO.Exception +asyncOn from Control.Concurrent.Async +asyncThreadId from Control.Concurrent.Async +atDef from Protolude.Safe +atMay from Protolude.Safe +atan from GHC.Float +atan2 from GHC.Float +atanh from GHC.Float +atomically from GHC.Conc.Sync +bimap from Data.Bifunctor +bit from Data.Bits +bitDefault from Data.Bits +bitSize from Data.Bits +bitSizeMaybe from Data.Bits +bool from Protolude.Bool +boundedEnumFrom from GHC.Enum +boundedEnumFromThen from GHC.Enum +bracket from Control.Exception.Base +bracketOnError from Control.Exception.Base +bracket_ from Control.Exception.Base +break from GHC.List +byteSwap16 from GHC.Word +byteSwap32 from GHC.Word +byteSwap64 from GHC.Word +callStack from GHC.Stack +cancel from Control.Concurrent.Async +cancelWith from Control.Concurrent.Async +cast from Data.Typeable +castWith from Data.Type.Equality +catMaybes from Data.Maybe +catch from GHC.IO +catchE from Control.Monad.Trans.Except +catchError from Control.Monad.Error.Class +catchJust from Control.Exception.Base +catchSTM from GHC.Conc.Sync +catches from Control.Exception +ceiling from GHC.Real +check from Control.Monad.STM +chr from GHC.Char +cis from Data.Complex +clearBit from Data.Bits +coerceWith from Data.Type.Coercion +compare from GHC.Classes +comparing from Data.Ord +complement from Data.Bits +complementBit from Data.Bits +conFixity from GHC.Generics +conIsRecord from GHC.Generics +conName from GHC.Generics +concat from Data.Foldable +concatMap from Data.Foldable +concatMapM from Protolude.Monad +concurrently from Control.Concurrent.Async +conjugate from Data.Complex +const from GHC.Base +cos from GHC.Float +cosh from GHC.Float +countLeadingZeros from Data.Bits +countTrailingZeros from Data.Bits +currentCallStack from GHC.Stack.CCS +curry from Data.Tuple +cycle from GHC.List +cycle1 from Data.Semigroup +datatypeName from GHC.Generics +decodeFloat from GHC.Float +decodeUtf8 from Data.Text.Encoding +decodeUtf8' from Data.Text.Encoding +decodeUtf8With from Data.Text.Encoding +deepseq from Control.DeepSeq +denominator from GHC.Real +die from Protolude +diff from Data.Semigroup +displayException from GHC.Exception +div from GHC.Real +divMod from GHC.Real +divZeroError from GHC.Real +drop from GHC.List +dropWhile from GHC.List +dupChan from Control.Concurrent.Chan +either from Data.Either +eitherA from Protolude.Applicative +elem from Data.Foldable +empty from GHC.Base +encodeFloat from GHC.Float +encodeUtf8 from Data.Text.Encoding +enumFrom from GHC.Enum +enumFromThen from GHC.Enum +enumFromThenTo from GHC.Enum +enumFromTo from GHC.Enum +eqT from Data.Typeable +evalState from Control.Monad.Trans.State.Lazy +evalStateT from Control.Monad.Trans.State.Lazy +evaluate from GHC.IO +even from GHC.Real +execState from Control.Monad.Trans.State.Lazy +execStateT from Control.Monad.Trans.State.Lazy +exitFailure from System.Exit +exitSuccess from System.Exit +exitWith from System.Exit +exp from GHC.Float +expm1 from GHC.Float +exponent from GHC.Float +fatalErrorMessage from Protolude.Panic +filter from GHC.List +filterM from Control.Monad +finally from Control.Exception.Base +find from Data.Foldable +finiteBitSize from Data.Bits +first from Data.Bifunctor +fix from Data.Function +fixST from GHC.ST +flip from GHC.Base +floatDigits from GHC.Float +floatRadix from GHC.Float +floatRange from GHC.Float +floor from GHC.Real +fmap from GHC.Base +fmapDefault from Data.Traversable +fold from Data.Foldable +foldM from Control.Monad +foldM_ from Control.Monad +foldMap from Data.Foldable +foldMapDefault from Data.Traversable +foldl from Data.Foldable +foldl' from Data.Foldable +foldl1May from Protolude.Safe +foldl1May' from Protolude.Safe +foldlM from Data.Foldable +foldr from Data.Foldable +foldr' from Data.Foldable +foldr1May from Protolude.Safe +foldrM from Data.Foldable +for from Data.Traversable +forM from Data.Traversable +forM_ from Data.Foldable +for_ from Data.Foldable +force from Control.DeepSeq +foreach from Protolude.Functor +forever from Control.Monad +forkFinally from Control.Concurrent +forkIO from GHC.Conc.Sync +forkIOWithUnmask from GHC.Conc.Sync +forkOS from Control.Concurrent +forkOSWithUnmask from Control.Concurrent +forkOn from GHC.Conc.Sync +forkOnWithUnmask from GHC.Conc.Sync +from from GHC.Generics +fromEnum from GHC.Enum +fromException from GHC.Exception +fromInteger from GHC.Num +fromIntegral from GHC.Real +fromLabel from GHC.OverloadedLabels +fromLeft from Data.Either +fromMaybe from Data.Maybe +fromRational from GHC.Real +fromRight from Data.Either +fromStrict from Data.Text.Lazy +fst from Data.Tuple +functionName from GHC.ExecutionStack.Internal +gcastWith from Data.Type.Equality +gcd from GHC.Real +gcdInt' from GHC.Real +gcdWord' from GHC.Real +genericDrop from Data.OldList +genericLength from Data.OldList +genericReplicate from Data.OldList +genericSplitAt from Data.OldList +genericTake from Data.OldList +get from Control.Monad.State.Class +getAll from Data.Monoid +getAlt from Data.Monoid +getAny from Data.Monoid +getArgs from System.Environment +getCallStack from GHC.Stack.Types +getChanContents from Control.Concurrent.Chan +getConst from Data.Functor.Const +getContents from Data.Text.IO +getDual from Data.Monoid +getField from GHC.Records +getFirst from Data.Monoid +getLast from Data.Monoid +getLine from Data.Text.IO +getMaskingState from GHC.IO +getNumCapabilities from GHC.Conc.Sync +getOption from Data.Semigroup +getProduct from Data.Monoid +getStackTrace from GHC.ExecutionStack +getSum from Data.Monoid +getZipList from Control.Applicative +gets from Control.Monad.State.Class +group from Data.OldList +groupBy from Data.OldList +guard from Control.Monad +guardM from Protolude.Bool +guarded from Protolude +guardedA from Protolude +hPutStr from Protolude.Show +hPutStrLn from Protolude.Show +handle from Control.Exception.Base +handleJust from Control.Exception.Base +hash from Data.Hashable.Class +hashUsing from Data.Hashable.Class +hashWithSalt from Data.Hashable.Class +head from Protolude.List +headDef from Protolude.Safe +headMay from Protolude.Safe +hush from Protolude.Exceptions +identity from Protolude +ifM from Protolude.Bool +ignore from Data.Text.Encoding.Error +imagPart from Data.Complex +infinity from GHC.Real +initDef from Protolude.Safe +initMay from Protolude.Safe +initSafe from Protolude.Safe +inits from Data.OldList +integralEnumFrom from GHC.Real +integralEnumFromThen from GHC.Real +integralEnumFromThenTo from GHC.Real +integralEnumFromTo from GHC.Real +interact from Data.Text.IO +intercalate from Data.OldList +interruptible from GHC.IO +intersperse from Data.OldList +ioError from GHC.IO.Exception +isCurrentThreadBound from Control.Concurrent +isDenormalized from GHC.Float +isEmptyChan from Control.Concurrent.Chan +isEmptyMVar from GHC.MVar +isIEEE from GHC.Float +isInfinite from GHC.Float +isJust from Data.Maybe +isLeft from Data.Either +isNaN from GHC.Float +isNegativeZero from GHC.Float +isNewtype from GHC.Generics +isNothing from Data.Maybe +isPrefixOf from Data.OldList +isRight from Data.Either +isSigned from Data.Bits +iterate from GHC.List +join from GHC.Base +killThread from GHC.Conc.Sync +lastDef from Protolude.Safe +lastMay from Protolude.Safe +lcm from GHC.Real +leftToMaybe from Protolude.Either +lefts from Data.Either +length from Data.Foldable +lenientDecode from Data.Text.Encoding.Error +lift from Control.Monad.Trans.Class +liftA from GHC.Base +liftA2 from GHC.Base +liftA3 from GHC.Base +liftAA2 from Protolude.Applicative +liftIO from Control.Monad.IO.Class +liftIO1 from Protolude +liftIO2 from Protolude +liftM from GHC.Base +liftM' from Protolude.Monad +liftM2 from GHC.Base +liftM2' from Protolude.Monad +liftM3 from GHC.Base +liftM4 from GHC.Base +liftM5 from GHC.Base +lines from Data.Text +link from Control.Concurrent.Async +link2 from Control.Concurrent.Async +list from Protolude.List +listToMaybe from Data.Maybe +local from Control.Monad.Reader.Class +log from GHC.Float +log1mexp from GHC.Float +log1p from GHC.Float +log1pexp from GHC.Float +logBase from GHC.Float +magnitude from Data.Complex +many from GHC.Base +map from Protolude +mapAccumL from Data.Traversable +mapAccumR from Data.Traversable +mapAndUnzipM from Control.Monad +mapExcept from Control.Monad.Trans.Except +mapExceptT from Control.Monad.Trans.Except +mapException from Control.Exception.Base +mapM from Data.Traversable +mapM_ from Data.Foldable +mapMaybe from Data.Maybe +mappend from GHC.Base +mask from GHC.IO +mask_ from GHC.IO +max from GHC.Classes +maxBound from GHC.Enum +maxInt from GHC.Base +maximum from Data.Foldable +maximumBy from Data.Foldable +maximumDef from Protolude.Safe +maximumMay from Protolude.Safe +maybe from Data.Maybe +maybeEmpty from Protolude.Either +maybeToEither from Protolude.Either +maybeToLeft from Protolude.Either +maybeToList from Data.Maybe +maybeToRight from Protolude.Either +mconcat from GHC.Base +mempty from GHC.Base +mfilter from Control.Monad +min from GHC.Classes +minBound from GHC.Enum +minInt from GHC.Base +minimum from Data.Foldable +minimumBy from Data.Foldable +minimumDef from Protolude.Safe +minimumMay from Protolude.Safe +mkPolar from Data.Complex +mkWeakMVar from Control.Concurrent.MVar +mkWeakThreadId from GHC.Conc.Sync +mod from GHC.Real +modify from Control.Monad.State.Class +modifyMVar from Control.Concurrent.MVar +modifyMVarMasked from Control.Concurrent.MVar +modifyMVarMasked_ from Control.Concurrent.MVar +modifyMVar_ from Control.Concurrent.MVar +moduleName from GHC.Generics +mplus from GHC.Base +msum from Data.Foldable +mtimesDefault from Data.Semigroup +myThreadId from GHC.Conc.Sync +mzero from GHC.Base +natVal from GHC.TypeLits +negate from GHC.Num +newChan from Control.Concurrent.Chan +newEmptyMVar from GHC.MVar +newMVar from GHC.MVar +newQSem from Control.Concurrent.QSem +newQSemN from Control.Concurrent.QSemN +nonEmpty from Data.List.NonEmpty +not from GHC.Classes +notANumber from GHC.Real +notElem from Data.Foldable +notImplemented from Debug +note from Protolude.Exceptions +null from Data.Foldable +numerator from GHC.Real +numericEnumFrom from GHC.Real +numericEnumFromThen from GHC.Real +numericEnumFromThenTo from GHC.Real +numericEnumFromTo from GHC.Real +objectName from GHC.ExecutionStack.Internal +odd from GHC.Real +on from Data.Function +onException from Control.Exception.Base +one from Protolude.Semiring +openFile from GHC.IO.Handle.FD +option from Data.Semigroup +optional from Control.Applicative +or from Data.Foldable +orAlt from Protolude.Applicative +orElse from GHC.Conc.Sync +orEmpty from Protolude.Applicative +ord from GHC.Base +ordNub from Protolude.List +otherwise from GHC.Base +overflowError from GHC.Real +packageName from GHC.Generics +panic from Protolude.Panic +partitionEithers from Data.Either +pass from Protolude +permutations from Data.OldList +phase from Data.Complex +pi from GHC.Float +polar from Data.Complex +poll from Control.Concurrent.Async +popCount from Data.Bits +popCountDefault from Data.Bits +pred from GHC.Enum +prettyCallStack from GHC.Exception +prettySrcLoc from GHC.Exception +print from Protolude +product from Protolude.List +properFraction from GHC.Real +pure from GHC.Base +purer from Protolude.Applicative +put from Control.Monad.State.Class +putByteString from Protolude.Show +putErrLn from Protolude.Show +putErrText from Protolude.Show +putLByteString from Protolude.Show +putLText from Protolude.Show +putMVar from GHC.MVar +putStr from Protolude.Show +putStrLn from Protolude.Show +putText from Protolude.Show +quot from GHC.Real +quotRem from GHC.Real +race from Control.Concurrent.Async +race_ from Control.Concurrent.Async +ratioPrec from GHC.Real +ratioPrec1 from GHC.Real +ratioZeroDenominatorError from GHC.Real +readChan from Control.Concurrent.Chan +readEither from Text.Read +readFile from Data.Text.IO +readMVar from GHC.MVar +readMaybe from Text.Read +reader from Control.Monad.Reader.Class +reads from Text.Read +realPart from Data.Complex +realToFrac from GHC.Real +recip from GHC.Real +reduce from GHC.Real +rem from GHC.Real +repeat from GHC.List +replace from Data.Text.Encoding.Error +replicate from GHC.List +replicateM from Control.Monad +replicateM_ from Control.Monad +repr from Data.Type.Coercion +retry from GHC.Conc.Sync +return from GHC.Base +reverse from GHC.List +rightToMaybe from Protolude.Either +rights from Data.Either +rnf from Control.DeepSeq +rotate from Data.Bits +rotateL from Data.Bits +rotateR from Data.Bits +round from GHC.Real +rtsSupportsBoundThreads from Control.Concurrent +runConcurrently from Control.Concurrent.Async +runExcept from Control.Monad.Trans.Except +runExceptT from Control.Monad.Trans.Except +runIdentity from Data.Functor.Identity +runInBoundThread from Control.Concurrent +runInUnboundThread from Control.Concurrent +runReader from Control.Monad.Trans.Reader +runReaderT from Control.Monad.Trans.Reader +runST from GHC.ST +runState from Control.Monad.Trans.State.Lazy +runStateT from Control.Monad.Trans.State.Lazy +scaleFloat from GHC.Float +scanl from GHC.List +scanl' from GHC.List +scanr from GHC.List +sconcat from Data.Semigroup +second from Data.Bifunctor +selDecidedStrictness from GHC.Generics +selName from GHC.Generics +selSourceStrictness from GHC.Generics +selSourceUnpackedness from GHC.Generics +seq from GHC.Prim +sequence from Data.Traversable +sequenceA from Data.Traversable +sequenceA_ from Data.Foldable +sequence_ from Data.Foldable +setBit from Data.Bits +setNumCapabilities from GHC.Conc.Sync +shift from Data.Bits +shiftL from Data.Bits +shiftR from Data.Bits +show from Protolude +showStackTrace from GHC.ExecutionStack +signalQSem from Control.Concurrent.QSem +signalQSemN from Control.Concurrent.QSemN +significand from GHC.Float +signum from GHC.Num +sin from GHC.Float +sinh from GHC.Float +snd from Data.Tuple +some from GHC.Base +someNatVal from GHC.TypeLits +someSymbolVal from GHC.TypeLits +sort from Data.OldList +sortBy from Data.OldList +sortOn from Protolude.List +sourceColumn from GHC.ExecutionStack.Internal +sourceFile from GHC.ExecutionStack.Internal +sourceLine from GHC.ExecutionStack.Internal +splitAt from GHC.List +sqrt from GHC.Float +srcLoc from GHC.ExecutionStack.Internal +state from Control.Monad.State.Class +stderr from GHC.IO.Handle.FD +stdin from GHC.IO.Handle.FD +stdout from GHC.IO.Handle.FD +stimes from Data.Semigroup +stimesIdempotent from Data.Semigroup +stimesIdempotentMonoid from Data.Semigroup +stimesMonoid from Data.Semigroup +strConv from Protolude.Conv +strictDecode from Data.Text.Encoding.Error +subsequences from Data.OldList +subtract from GHC.Num +succ from GHC.Enum +sum from Protolude.List +swap from Data.Tuple +swapMVar from Control.Concurrent.MVar +sym from Data.Type.Equality +symbolVal from GHC.TypeLits +tailDef from Protolude.Safe +tailMay from Protolude.Safe +tailSafe from Protolude.Safe +tails from Data.OldList +take from GHC.List +takeMVar from GHC.MVar +takeWhile from GHC.List +tan from GHC.Float +tanh from GHC.Float +testBit from Data.Bits +testBitDefault from Data.Bits +threadCapability from GHC.Conc.Sync +threadDelay from GHC.Conc.IO +threadWaitRead from Control.Concurrent +threadWaitReadSTM from Control.Concurrent +threadWaitWrite from Control.Concurrent +threadWaitWriteSTM from Control.Concurrent +throwE from Control.Monad.Trans.Except +throwError from Control.Monad.Error.Class +throwIO from Protolude +throwSTM from GHC.Conc.Sync +throwTo from Protolude +to from GHC.Generics +toEnum from GHC.Enum +toException from GHC.Exception +toInteger from GHC.Real +toIntegralSized from Data.Bits +toList from Data.Foldable +toRational from GHC.Real +toS from Protolude.Conv +toSL from Protolude.Conv +toStrict from Data.Text.Lazy +trace from Debug +traceIO from Debug +traceId from Debug +traceM from Debug +traceShow from Debug +traceShowId from Debug +traceShowM from Debug +trans from Data.Type.Equality +transpose from Data.OldList +traverse from Data.Traversable +traverse_ from Data.Foldable +truncate from GHC.Real +try from Control.Exception.Base +tryIO from Protolude.Exceptions +tryJust from Control.Exception.Base +tryPutMVar from GHC.MVar +tryReadMVar from GHC.MVar +tryTakeMVar from GHC.MVar +typeRep from Data.Typeable +unComp1 from GHC.Generics +unGetChan from Control.Concurrent.Chan +unK1 from GHC.Generics +unM1 from GHC.Generics +uncons from Protolude +uncurry from Data.Tuple +undefined from Debug +unfoldr from Data.OldList +uninterruptibleMask from GHC.IO +uninterruptibleMask_ from GHC.IO +unless from Control.Monad +unlessM from Protolude.Bool +unlines from Data.Text +unsnoc from Protolude +until from GHC.Base +unwords from Data.Text +unzip from GHC.List +vacuous from Data.Void +void from Data.Functor +wait from Control.Concurrent.Async +waitAny from Control.Concurrent.Async +waitAnyCancel from Control.Concurrent.Async +waitAnyCatch from Control.Concurrent.Async +waitAnyCatchCancel from Control.Concurrent.Async +waitBoth from Control.Concurrent.Async +waitCatch from Control.Concurrent.Async +waitEither from Control.Concurrent.Async +waitEitherCancel from Control.Concurrent.Async +waitEitherCatch from Control.Concurrent.Async +waitEitherCatchCancel from Control.Concurrent.Async +waitEither_ from Control.Concurrent.Async +waitQSem from Control.Concurrent.QSem +waitQSemN from Control.Concurrent.QSemN +when from GHC.Base +whenM from Protolude.Bool +withAsync from Control.Concurrent.Async +withAsyncBound from Control.Concurrent.Async +withAsyncOn from Control.Concurrent.Async +withExcept from Control.Monad.Trans.Except +withExceptT from Control.Monad.Trans.Except +withFile from System.IO +withFrozenCallStack from GHC.Stack +withMVar from Control.Concurrent.MVar +withMVarMasked from Control.Concurrent.MVar +withState from Control.Monad.Trans.State.Lazy +witness from Debug +words from Data.Text +writeChan from Control.Concurrent.Chan +writeFile from Data.Text.IO +writeList2Chan from Control.Concurrent.Chan +xor from Data.Bits +zero from Protolude.Semiring +zeroBits from Data.Bits +zip from GHC.List +zipWith from GHC.List +zipWithM from Control.Monad +zipWithM_ from Control.Monad +|| from GHC.Classes +||^ from Protolude.Bool diff --git a/export_lists/protolude-11.exports b/export_lists/protolude-11.exports new file mode 100644 index 0000000000..84b06e7732 --- /dev/null +++ b/export_lists/protolude-11.exports @@ -0,0 +1,960 @@ +$ from GHC.Base +$! from Protolude.Base +$!! from Control.DeepSeq +$> from Data.Functor +% from GHC.Real +& from Data.Function +&& from GHC.Classes +&&^ from Protolude.Bool +* from GHC.Num +* from GHC.Types +** from GHC.Float +*> from GHC.Base ++ from GHC.Num +++ from GHC.Base +- from GHC.Num +. from GHC.Base +.&. from Data.Bits +.|. from Data.Bits +/ from GHC.Real +/= from GHC.Classes +:% from GHC.Real +:*: from GHC.Generics +:*: from GHC.Generics +:+ from Data.Complex +:+: from GHC.Generics +:.: from GHC.Generics +:| from Data.List.NonEmpty +:~: from Data.Type.Equality +< from GHC.Classes +<$ from GHC.Base +<$!> from Control.Monad +<$> from Data.Functor +<&&> from Protolude.Bool +<&> from Protolude.Functor +<* from GHC.Base +<**> from GHC.Base +<*> from GHC.Base +<.> from Protolude.Semiring +<<$>> from Protolude.Functor +<<*>> from Protolude.Applicative +<= from GHC.Classes +<=< from Control.Monad +<> from Data.Monoid +<|> from GHC.Base +<||> from Protolude.Bool +=<< from GHC.Base +== from GHC.Classes +== from Data.Type.Equality +> from GHC.Classes +>= from GHC.Classes +>=> from Control.Monad +>> from GHC.Base +>>= from GHC.Base +All from Data.Monoid +All from Data.Monoid +AllocationLimitExceeded from GHC.IO.Exception +AllocationLimitExceeded from GHC.IO.Exception +Alt from Data.Monoid +Alt from Data.Monoid +Alternative from GHC.Base +Any from Data.Monoid +Any from Data.Monoid +AppendMode from GHC.IO.IOMode +Applicative from GHC.Base +ArithException from GHC.Exception +ArrayException from GHC.IO.Exception +AssertionFailed from GHC.IO.Exception +AssertionFailed from GHC.IO.Exception +Associativity from GHC.Generics +Async from Control.Concurrent.Async +AsyncException from GHC.IO.Exception +Bifunctor from Data.Bifunctor +Bits from Data.Bits +BlockedIndefinitelyOnMVar from GHC.IO.Exception +BlockedIndefinitelyOnMVar from GHC.IO.Exception +BlockedIndefinitelyOnSTM from GHC.IO.Exception +BlockedIndefinitelyOnSTM from GHC.IO.Exception +Bool from GHC.Types +Bounded from GHC.Enum +ByteString from Data.ByteString.Internal +C1 from GHC.Generics +CallStack from GHC.Stack.Types +Chan from Control.Concurrent.Chan +Char from GHC.Types +CmpNat from GHC.TypeNats +Coercible from GHC.Types +Coercion from Data.Type.Coercion +Coercion from Data.Type.Coercion +Comp1 from GHC.Generics +CompactionFailed from GHC.IO.Exception +CompactionFailed from GHC.IO.Exception +Complex from Data.Complex +Concurrently from Control.Concurrent.Async +Concurrently from Control.Concurrent.Async +Const from Data.Functor.Const +Const from Data.Functor.Const +Constraint from GHC.Types +Constructor from GHC.Generics +D# from GHC.Types +D1 from GHC.Generics +Datatype from GHC.Generics +Deadlock from GHC.IO.Exception +Deadlock from GHC.IO.Exception +Denormal from GHC.Exception +DivideByZero from GHC.Exception +Double from GHC.Types +Down from Data.Ord +Down from Data.Ord +Dual from Data.Monoid +Dual from Data.Monoid +EQ from GHC.Types +Either from Data.Either +Endo from Data.Monoid +Endo from Data.Monoid +Enum from GHC.Enum +Eq from GHC.Classes +ErrorCall from GHC.Exception +ErrorCall from GHC.Exception +ErrorCallWithLocation from GHC.Exception +Except from Control.Monad.Trans.Except +ExceptT from Control.Monad.Trans.Except +ExceptT from Control.Monad.Trans.Except +Exception from GHC.Exception +ExitCode from GHC.IO.Exception +ExitFailure from GHC.IO.Exception +ExitSuccess from GHC.IO.Exception +F# from GHC.Types +False from GHC.Types +FatalError from Protolude.Panic +FatalError from Protolude.Panic +FilePath from GHC.IO +FiniteBits from Data.Bits +First from Data.Monoid +First from Data.Monoid +Fixity from GHC.Generics +FixityI from GHC.Generics +Float from GHC.Types +Floating from GHC.Float +Foldable from Data.Foldable +Fractional from GHC.Real +FunPtr from GHC.Ptr +Functor from GHC.Base +GT from GHC.Types +Generic from GHC.Generics +Generic1 from GHC.Generics +Handle from GHC.IO.Handle.Types +HasCallStack from GHC.Stack.Types +HasField from GHC.Records +Hashable from Data.Hashable.Class +HeapOverflow from GHC.IO.Exception +IO from GHC.Types +IOException from GHC.IO.Exception +IOMode from GHC.IO.IOMode +Identity from Data.Functor.Identity +Identity from Data.Functor.Identity +IndexOutOfBounds from GHC.IO.Exception +Infix from GHC.Generics +InfixI from GHC.Generics +Int from GHC.Types +Int16 from GHC.Int +Int32 from GHC.Int +Int64 from GHC.Int +Int8 from GHC.Int +IntMap from Data.IntMap.Internal +IntPtr from Foreign.Ptr +IntSet from Data.IntSet.Internal +Integer from GHC.Integer.Type +Integral from GHC.Real +IsLabel from GHC.OverloadedLabels +IsString from Data.String +Just from GHC.Base +K1 from GHC.Generics +K1 from GHC.Generics +KnownNat from GHC.TypeNats +KnownSymbol from GHC.TypeLits +L1 from GHC.Generics +LByteString from Protolude +LT from GHC.Types +LText from Protolude +Last from Data.Monoid +Last from Data.Monoid +Left from Data.Either +LeftAssociative from GHC.Generics +Leniency from Protolude.Conv +Lenient from Protolude.Conv +Location from GHC.ExecutionStack.Internal +Location from GHC.ExecutionStack.Internal +LossOfPrecision from GHC.Exception +M1 from GHC.Generics +M1 from GHC.Generics +MVar from GHC.MVar +Map from Data.Map.Internal +MaskedInterruptible from GHC.IO +MaskedUninterruptible from GHC.IO +MaskingState from GHC.IO +Maybe from GHC.Base +Meta from GHC.Generics +MetaCons from GHC.Generics +MetaData from GHC.Generics +MetaSel from GHC.Generics +Monad from GHC.Base +MonadError from Control.Monad.Error.Class +MonadIO from Control.Monad.IO.Class +MonadPlus from GHC.Base +MonadReader from Control.Monad.Reader.Class +MonadState from Control.Monad.State.Class +Monoid from GHC.Base +NFData from Control.DeepSeq +Nat from GHC.Types +NestedAtomically from Control.Exception.Base +NestedAtomically from Control.Exception.Base +NoMethodError from Control.Exception.Base +NoMethodError from Control.Exception.Base +NonEmpty from Data.List.NonEmpty +NonTermination from Control.Exception.Base +NonTermination from Control.Exception.Base +NotAssociative from GHC.Generics +Nothing from GHC.Base +Num from GHC.Num +OnDecodeError from Data.Text.Encoding.Error +OnError from Data.Text.Encoding.Error +Option from Data.Semigroup +Option from Data.Semigroup +Ord from GHC.Classes +Ordering from GHC.Types +Overflow from GHC.Exception +PatternMatchFail from Control.Exception.Base +PatternMatchFail from Control.Exception.Base +Prefix from GHC.Generics +PrefixI from GHC.Generics +Print from Protolude.Show +Product from Data.Monoid +Product from Data.Monoid +Proxy from Data.Proxy +Proxy from Data.Proxy +Ptr from GHC.Ptr +QSem from Control.Concurrent.QSem +QSemN from Control.Concurrent.QSemN +R1 from GHC.Generics +Ratio from GHC.Real +RatioZeroDenominator from GHC.Exception +Rational from GHC.Real +Read from GHC.Read +ReadMode from GHC.IO.IOMode +ReadWriteMode from GHC.IO.IOMode +Reader from Control.Monad.Trans.Reader +ReaderT from Control.Monad.Trans.Reader +ReaderT from Control.Monad.Trans.Reader +Real from GHC.Real +RealFloat from GHC.Float +RealFrac from GHC.Real +Rec0 from GHC.Generics +RecConError from Control.Exception.Base +RecConError from Control.Exception.Base +RecSelError from Control.Exception.Base +RecSelError from Control.Exception.Base +RecUpdError from Control.Exception.Base +RecUpdError from Control.Exception.Base +Refl from Data.Type.Equality +Rep from GHC.Generics +Right from Data.Either +RightAssociative from GHC.Generics +S1 from GHC.Generics +ST from GHC.ST +STM from GHC.Conc.Sync +Selector from GHC.Generics +Semigroup from Data.Semigroup +Semiring from Protolude.Semiring +Seq from Data.Sequence.Internal +Set from Data.Set.Internal +Show from GHC.Show +SomeAsyncException from GHC.IO.Exception +SomeAsyncException from GHC.IO.Exception +SomeException from GHC.Exception +SomeException from GHC.Exception +SomeNat from GHC.TypeNats +SomeNat from GHC.TypeNats +SomeSymbol from GHC.TypeLits +SomeSymbol from GHC.TypeLits +SrcLoc from GHC.ExecutionStack.Internal +SrcLoc from GHC.ExecutionStack.Internal +StablePtr from GHC.Stable +StackOverflow from GHC.IO.Exception +State from Control.Monad.Trans.State.Lazy +StateT from Control.Monad.Trans.State.Lazy +StateT from Control.Monad.Trans.State.Lazy +StaticPtr from GHC.StaticPtr +Storable from Foreign.Storable +Strict from Protolude.Conv +StringConv from Protolude.Conv +Sum from Data.Monoid +Sum from Data.Monoid +Symbol from GHC.Types +Text from Data.Text.Internal +ThreadId from GHC.Conc.Sync +ThreadKilled from GHC.IO.Exception +Traversable from Data.Traversable +True from GHC.Types +Type from GHC.Types +TypeError from Control.Exception.Base +TypeError from Control.Exception.Base +TypeRep from Data.Typeable +Typeable from Data.Typeable.Internal +U1 from GHC.Generics +U1 from GHC.Generics +URec from GHC.Generics +UndefinedElement from GHC.IO.Exception +Underflow from GHC.Exception +UnicodeException from Data.Text.Encoding.Error +Unmasked from GHC.IO +UserInterrupt from GHC.IO.Exception +V1 from GHC.Generics +Void from Data.Void +Word from GHC.Types +Word16 from GHC.Word +Word32 from GHC.Word +Word64 from GHC.Word +Word8 from GHC.Word +WordPtr from Foreign.Ptr +WrappedMonoid from Data.Semigroup +WriteMode from GHC.IO.IOMode +ZipList from Control.Applicative +ZipList from Control.Applicative +^ from GHC.Real +^%^ from GHC.Real +^^ from GHC.Real +^^%^^ from GHC.Real +abs from GHC.Num +absurd from Data.Void +acos from GHC.Float +acosh from GHC.Float +addMVarFinalizer from Control.Concurrent.MVar +all from Data.Foldable +allowInterrupt from Control.Exception +always from GHC.Conc.Sync +alwaysSucceeds from GHC.Conc.Sync +and from Data.Foldable +any from Data.Foldable +ap from GHC.Base +appEndo from Data.Monoid +appendFile from Data.Text.IO +applyN from Protolude +asTypeOf from GHC.Base +asin from GHC.Float +asinh from GHC.Float +ask from Control.Monad.Reader.Class +asks from Control.Monad.Reader.Class +asum from Data.Foldable +async from Control.Concurrent.Async +asyncBound from Control.Concurrent.Async +asyncExceptionFromException from GHC.IO.Exception +asyncExceptionToException from GHC.IO.Exception +asyncOn from Control.Concurrent.Async +asyncThreadId from Control.Concurrent.Async +atDef from Protolude.Safe +atMay from Protolude.Safe +atan from GHC.Float +atan2 from GHC.Float +atanh from GHC.Float +atomically from GHC.Conc.Sync +bimap from Data.Bifunctor +bit from Data.Bits +bitDefault from Data.Bits +bitSize from Data.Bits +bitSizeMaybe from Data.Bits +bool from Protolude.Bool +boundedEnumFrom from GHC.Enum +boundedEnumFromThen from GHC.Enum +bracket from Control.Exception.Base +bracketOnError from Control.Exception.Base +bracket_ from Control.Exception.Base +break from GHC.List +byteSwap16 from GHC.Word +byteSwap32 from GHC.Word +byteSwap64 from GHC.Word +callStack from GHC.Stack +cancel from Control.Concurrent.Async +cancelWith from Control.Concurrent.Async +cast from Data.Typeable +castWith from Data.Type.Equality +catMaybes from Data.Maybe +catch from GHC.IO +catchE from Control.Monad.Trans.Except +catchError from Control.Monad.Error.Class +catchJust from Control.Exception.Base +catchSTM from GHC.Conc.Sync +catches from Control.Exception +ceiling from GHC.Real +check from Control.Monad.STM +chr from GHC.Char +cis from Data.Complex +clearBit from Data.Bits +coerceWith from Data.Type.Coercion +compare from GHC.Classes +comparing from Data.Ord +complement from Data.Bits +complementBit from Data.Bits +conFixity from GHC.Generics +conIsRecord from GHC.Generics +conName from GHC.Generics +concat from Data.Foldable +concatMap from Data.Foldable +concatMapM from Protolude.Monad +concurrently from Control.Concurrent.Async +conjugate from Data.Complex +const from GHC.Base +cos from GHC.Float +cosh from GHC.Float +countLeadingZeros from Data.Bits +countTrailingZeros from Data.Bits +currentCallStack from GHC.Stack.CCS +curry from Data.Tuple +cycle from GHC.List +cycle1 from Data.Semigroup +datatypeName from GHC.Generics +decodeFloat from GHC.Float +decodeUtf8 from Data.Text.Encoding +decodeUtf8' from Data.Text.Encoding +decodeUtf8With from Data.Text.Encoding +deepseq from Control.DeepSeq +denominator from GHC.Real +die from Protolude +diff from Data.Semigroup +displayException from GHC.Exception +div from GHC.Real +divMod from GHC.Real +divZeroError from GHC.Real +drop from GHC.List +dropWhile from GHC.List +dupChan from Control.Concurrent.Chan +either from Data.Either +eitherA from Protolude.Applicative +elem from Data.Foldable +empty from GHC.Base +encodeFloat from GHC.Float +encodeUtf8 from Data.Text.Encoding +enumFrom from GHC.Enum +enumFromThen from GHC.Enum +enumFromThenTo from GHC.Enum +enumFromTo from GHC.Enum +eqT from Data.Typeable +evalState from Control.Monad.Trans.State.Lazy +evalStateT from Control.Monad.Trans.State.Lazy +evaluate from GHC.IO +even from GHC.Real +execState from Control.Monad.Trans.State.Lazy +execStateT from Control.Monad.Trans.State.Lazy +exitFailure from System.Exit +exitSuccess from System.Exit +exitWith from System.Exit +exp from GHC.Float +expm1 from GHC.Float +exponent from GHC.Float +fatalErrorMessage from Protolude.Panic +filter from GHC.List +filterM from Control.Monad +finally from Control.Exception.Base +find from Data.Foldable +finiteBitSize from Data.Bits +first from Data.Bifunctor +fix from Data.Function +fixST from GHC.ST +flip from GHC.Base +floatDigits from GHC.Float +floatRadix from GHC.Float +floatRange from GHC.Float +floor from GHC.Real +fmap from GHC.Base +fmapDefault from Data.Traversable +fold from Data.Foldable +foldM from Control.Monad +foldM_ from Control.Monad +foldMap from Data.Foldable +foldMapDefault from Data.Traversable +foldl from Data.Foldable +foldl' from Data.Foldable +foldl1May from Protolude.Safe +foldl1May' from Protolude.Safe +foldlM from Data.Foldable +foldr from Data.Foldable +foldr' from Data.Foldable +foldr1May from Protolude.Safe +foldrM from Data.Foldable +for from Data.Traversable +forM from Data.Traversable +forM_ from Data.Foldable +for_ from Data.Foldable +force from Control.DeepSeq +foreach from Protolude.Functor +forever from Control.Monad +forkFinally from Control.Concurrent +forkIO from GHC.Conc.Sync +forkIOWithUnmask from GHC.Conc.Sync +forkOS from Control.Concurrent +forkOSWithUnmask from Control.Concurrent +forkOn from GHC.Conc.Sync +forkOnWithUnmask from GHC.Conc.Sync +from from GHC.Generics +fromEnum from GHC.Enum +fromException from GHC.Exception +fromInteger from GHC.Num +fromIntegral from GHC.Real +fromLabel from GHC.OverloadedLabels +fromLeft from Data.Either +fromMaybe from Data.Maybe +fromRational from GHC.Real +fromRight from Data.Either +fromStrict from Data.Text.Lazy +fst from Data.Tuple +functionName from GHC.ExecutionStack.Internal +gcastWith from Data.Type.Equality +gcd from GHC.Real +gcdInt' from GHC.Real +gcdWord' from GHC.Real +genericDrop from Data.OldList +genericLength from Data.OldList +genericReplicate from Data.OldList +genericSplitAt from Data.OldList +genericTake from Data.OldList +get from Control.Monad.State.Class +getAll from Data.Monoid +getAlt from Data.Monoid +getAny from Data.Monoid +getArgs from System.Environment +getCallStack from GHC.Stack.Types +getChanContents from Control.Concurrent.Chan +getConst from Data.Functor.Const +getContents from Data.Text.IO +getDual from Data.Monoid +getField from GHC.Records +getFirst from Data.Monoid +getLast from Data.Monoid +getLine from Data.Text.IO +getMaskingState from GHC.IO +getNumCapabilities from GHC.Conc.Sync +getOption from Data.Semigroup +getProduct from Data.Monoid +getStackTrace from GHC.ExecutionStack +getSum from Data.Monoid +getZipList from Control.Applicative +gets from Control.Monad.State.Class +group from Data.OldList +groupBy from Data.OldList +guard from Control.Monad +guardM from Protolude.Bool +guarded from Protolude +guardedA from Protolude +hPutStr from Protolude.Show +hPutStrLn from Protolude.Show +handle from Control.Exception.Base +handleJust from Control.Exception.Base +hash from Data.Hashable.Class +hashUsing from Data.Hashable.Class +hashWithSalt from Data.Hashable.Class +head from Protolude.List +headDef from Protolude.Safe +headMay from Protolude.Safe +hush from Protolude.Exceptions +identity from Protolude +ifM from Protolude.Bool +ignore from Data.Text.Encoding.Error +imagPart from Data.Complex +infinity from GHC.Real +initDef from Protolude.Safe +initMay from Protolude.Safe +initSafe from Protolude.Safe +inits from Data.OldList +integralEnumFrom from GHC.Real +integralEnumFromThen from GHC.Real +integralEnumFromThenTo from GHC.Real +integralEnumFromTo from GHC.Real +interact from Data.Text.IO +intercalate from Data.OldList +interruptible from GHC.IO +intersperse from Data.OldList +ioError from GHC.IO.Exception +isCurrentThreadBound from Control.Concurrent +isDenormalized from GHC.Float +isEmptyChan from Control.Concurrent.Chan +isEmptyMVar from GHC.MVar +isIEEE from GHC.Float +isInfinite from GHC.Float +isJust from Data.Maybe +isLeft from Data.Either +isNaN from GHC.Float +isNegativeZero from GHC.Float +isNewtype from GHC.Generics +isNothing from Data.Maybe +isPrefixOf from Data.OldList +isRight from Data.Either +isSigned from Data.Bits +iterate from GHC.List +join from GHC.Base +killThread from GHC.Conc.Sync +lastDef from Protolude.Safe +lastMay from Protolude.Safe +lcm from GHC.Real +leftToMaybe from Protolude.Either +lefts from Data.Either +length from Data.Foldable +lenientDecode from Data.Text.Encoding.Error +lift from Control.Monad.Trans.Class +liftA from GHC.Base +liftA2 from GHC.Base +liftA3 from GHC.Base +liftAA2 from Protolude.Applicative +liftIO from Control.Monad.IO.Class +liftIO1 from Protolude +liftIO2 from Protolude +liftM from GHC.Base +liftM' from Protolude.Monad +liftM2 from GHC.Base +liftM2' from Protolude.Monad +liftM3 from GHC.Base +liftM4 from GHC.Base +liftM5 from GHC.Base +lines from Data.Text +link from Control.Concurrent.Async +link2 from Control.Concurrent.Async +list from Protolude.List +listToMaybe from Data.Maybe +local from Control.Monad.Reader.Class +log from GHC.Float +log1mexp from GHC.Float +log1p from GHC.Float +log1pexp from GHC.Float +logBase from GHC.Float +magnitude from Data.Complex +many from GHC.Base +map from Protolude +mapAccumL from Data.Traversable +mapAccumR from Data.Traversable +mapAndUnzipM from Control.Monad +mapExcept from Control.Monad.Trans.Except +mapExceptT from Control.Monad.Trans.Except +mapException from Control.Exception.Base +mapM from Data.Traversable +mapM_ from Data.Foldable +mapMaybe from Data.Maybe +mappend from GHC.Base +mask from GHC.IO +mask_ from GHC.IO +max from GHC.Classes +maxBound from GHC.Enum +maxInt from GHC.Base +maximum from Data.Foldable +maximumBy from Data.Foldable +maximumDef from Protolude.Safe +maximumMay from Protolude.Safe +maybe from Data.Maybe +maybeEmpty from Protolude.Either +maybeToEither from Protolude.Either +maybeToLeft from Protolude.Either +maybeToList from Data.Maybe +maybeToRight from Protolude.Either +mconcat from GHC.Base +mempty from GHC.Base +mfilter from Control.Monad +min from GHC.Classes +minBound from GHC.Enum +minInt from GHC.Base +minimum from Data.Foldable +minimumBy from Data.Foldable +minimumDef from Protolude.Safe +minimumMay from Protolude.Safe +mkPolar from Data.Complex +mkWeakMVar from Control.Concurrent.MVar +mkWeakThreadId from GHC.Conc.Sync +mod from GHC.Real +modify from Control.Monad.State.Class +modifyMVar from Control.Concurrent.MVar +modifyMVarMasked from Control.Concurrent.MVar +modifyMVarMasked_ from Control.Concurrent.MVar +modifyMVar_ from Control.Concurrent.MVar +moduleName from GHC.Generics +mplus from GHC.Base +msum from Data.Foldable +mtimesDefault from Data.Semigroup +myThreadId from GHC.Conc.Sync +mzero from GHC.Base +natVal from GHC.TypeLits +negate from GHC.Num +newChan from Control.Concurrent.Chan +newEmptyMVar from GHC.MVar +newMVar from GHC.MVar +newQSem from Control.Concurrent.QSem +newQSemN from Control.Concurrent.QSemN +nonEmpty from Data.List.NonEmpty +not from GHC.Classes +notANumber from GHC.Real +notElem from Data.Foldable +notImplemented from Debug +note from Protolude.Exceptions +null from Data.Foldable +numerator from GHC.Real +numericEnumFrom from GHC.Real +numericEnumFromThen from GHC.Real +numericEnumFromThenTo from GHC.Real +numericEnumFromTo from GHC.Real +objectName from GHC.ExecutionStack.Internal +odd from GHC.Real +on from Data.Function +onException from Control.Exception.Base +one from Protolude.Semiring +openFile from GHC.IO.Handle.FD +option from Data.Semigroup +optional from Control.Applicative +or from Data.Foldable +orAlt from Protolude.Applicative +orElse from GHC.Conc.Sync +orEmpty from Protolude.Applicative +ord from GHC.Base +ordNub from Protolude.List +otherwise from GHC.Base +overflowError from GHC.Real +packageName from GHC.Generics +panic from Protolude.Panic +partitionEithers from Data.Either +pass from Protolude +permutations from Data.OldList +phase from Data.Complex +pi from GHC.Float +polar from Data.Complex +poll from Control.Concurrent.Async +popCount from Data.Bits +popCountDefault from Data.Bits +pred from GHC.Enum +prettyCallStack from GHC.Exception +prettySrcLoc from GHC.Exception +print from Protolude +product from Protolude.List +properFraction from GHC.Real +pure from GHC.Base +purer from Protolude.Applicative +put from Control.Monad.State.Class +putByteString from Protolude.Show +putErrLn from Protolude.Show +putErrText from Protolude.Show +putLByteString from Protolude.Show +putLText from Protolude.Show +putMVar from GHC.MVar +putStr from Protolude.Show +putStrLn from Protolude.Show +putText from Protolude.Show +quot from GHC.Real +quotRem from GHC.Real +race from Control.Concurrent.Async +race_ from Control.Concurrent.Async +ratioPrec from GHC.Real +ratioPrec1 from GHC.Real +ratioZeroDenominatorError from GHC.Real +readChan from Control.Concurrent.Chan +readEither from Text.Read +readFile from Data.Text.IO +readMVar from GHC.MVar +readMaybe from Text.Read +reader from Control.Monad.Reader.Class +reads from Text.Read +realPart from Data.Complex +realToFrac from GHC.Real +recip from GHC.Real +reduce from GHC.Real +rem from GHC.Real +repeat from GHC.List +replace from Data.Text.Encoding.Error +replicate from GHC.List +replicateM from Control.Monad +replicateM_ from Control.Monad +repr from Data.Type.Coercion +retry from GHC.Conc.Sync +return from GHC.Base +reverse from GHC.List +rightToMaybe from Protolude.Either +rights from Data.Either +rnf from Control.DeepSeq +rotate from Data.Bits +rotateL from Data.Bits +rotateR from Data.Bits +round from GHC.Real +rtsSupportsBoundThreads from Control.Concurrent +runConcurrently from Control.Concurrent.Async +runExcept from Control.Monad.Trans.Except +runExceptT from Control.Monad.Trans.Except +runIdentity from Data.Functor.Identity +runInBoundThread from Control.Concurrent +runInUnboundThread from Control.Concurrent +runReader from Control.Monad.Trans.Reader +runReaderT from Control.Monad.Trans.Reader +runST from GHC.ST +runState from Control.Monad.Trans.State.Lazy +runStateT from Control.Monad.Trans.State.Lazy +scaleFloat from GHC.Float +scanl from GHC.List +scanl' from GHC.List +scanr from GHC.List +sconcat from Data.Semigroup +second from Data.Bifunctor +selDecidedStrictness from GHC.Generics +selName from GHC.Generics +selSourceStrictness from GHC.Generics +selSourceUnpackedness from GHC.Generics +seq from GHC.Prim +sequence from Data.Traversable +sequenceA from Data.Traversable +sequenceA_ from Data.Foldable +sequence_ from Data.Foldable +setBit from Data.Bits +setNumCapabilities from GHC.Conc.Sync +shift from Data.Bits +shiftL from Data.Bits +shiftR from Data.Bits +show from Protolude +showStackTrace from GHC.ExecutionStack +signalQSem from Control.Concurrent.QSem +signalQSemN from Control.Concurrent.QSemN +significand from GHC.Float +signum from GHC.Num +sin from GHC.Float +sinh from GHC.Float +snd from Data.Tuple +some from GHC.Base +someNatVal from GHC.TypeLits +someSymbolVal from GHC.TypeLits +sort from Data.OldList +sortBy from Data.OldList +sortOn from Protolude.List +sourceColumn from GHC.ExecutionStack.Internal +sourceFile from GHC.ExecutionStack.Internal +sourceLine from GHC.ExecutionStack.Internal +splitAt from GHC.List +sqrt from GHC.Float +srcLoc from GHC.ExecutionStack.Internal +state from Control.Monad.State.Class +stderr from GHC.IO.Handle.FD +stdin from GHC.IO.Handle.FD +stdout from GHC.IO.Handle.FD +stimes from Data.Semigroup +stimesIdempotent from Data.Semigroup +stimesIdempotentMonoid from Data.Semigroup +stimesMonoid from Data.Semigroup +strConv from Protolude.Conv +strictDecode from Data.Text.Encoding.Error +subsequences from Data.OldList +subtract from GHC.Num +succ from GHC.Enum +sum from Protolude.List +swap from Data.Tuple +swapMVar from Control.Concurrent.MVar +sym from Data.Type.Equality +symbolVal from GHC.TypeLits +tailDef from Protolude.Safe +tailMay from Protolude.Safe +tailSafe from Protolude.Safe +tails from Data.OldList +take from GHC.List +takeMVar from GHC.MVar +takeWhile from GHC.List +tan from GHC.Float +tanh from GHC.Float +testBit from Data.Bits +testBitDefault from Data.Bits +threadCapability from GHC.Conc.Sync +threadDelay from GHC.Conc.IO +threadWaitRead from Control.Concurrent +threadWaitReadSTM from Control.Concurrent +threadWaitWrite from Control.Concurrent +threadWaitWriteSTM from Control.Concurrent +throwE from Control.Monad.Trans.Except +throwError from Control.Monad.Error.Class +throwIO from Protolude +throwSTM from GHC.Conc.Sync +throwTo from Protolude +to from GHC.Generics +toEnum from GHC.Enum +toException from GHC.Exception +toInteger from GHC.Real +toIntegralSized from Data.Bits +toList from Data.Foldable +toRational from GHC.Real +toS from Protolude.Conv +toSL from Protolude.Conv +toStrict from Data.Text.Lazy +trace from Debug +traceIO from Debug +traceId from Debug +traceM from Debug +traceShow from Debug +traceShowId from Debug +traceShowM from Debug +trans from Data.Type.Equality +transpose from Data.OldList +traverse from Data.Traversable +traverse_ from Data.Foldable +truncate from GHC.Real +try from Control.Exception.Base +tryIO from Protolude.Exceptions +tryJust from Control.Exception.Base +tryPutMVar from GHC.MVar +tryReadMVar from GHC.MVar +tryTakeMVar from GHC.MVar +typeRep from Data.Typeable +unComp1 from GHC.Generics +unGetChan from Control.Concurrent.Chan +unK1 from GHC.Generics +unM1 from GHC.Generics +uncons from Protolude +uncurry from Data.Tuple +undefined from Debug +unfoldr from Data.OldList +uninterruptibleMask from GHC.IO +uninterruptibleMask_ from GHC.IO +unless from Control.Monad +unlessM from Protolude.Bool +unlines from Data.Text +unsnoc from Protolude +until from GHC.Base +unwords from Data.Text +unzip from GHC.List +vacuous from Data.Void +void from Data.Functor +wait from Control.Concurrent.Async +waitAny from Control.Concurrent.Async +waitAnyCancel from Control.Concurrent.Async +waitAnyCatch from Control.Concurrent.Async +waitAnyCatchCancel from Control.Concurrent.Async +waitBoth from Control.Concurrent.Async +waitCatch from Control.Concurrent.Async +waitEither from Control.Concurrent.Async +waitEitherCancel from Control.Concurrent.Async +waitEitherCatch from Control.Concurrent.Async +waitEitherCatchCancel from Control.Concurrent.Async +waitEither_ from Control.Concurrent.Async +waitQSem from Control.Concurrent.QSem +waitQSemN from Control.Concurrent.QSemN +when from GHC.Base +whenM from Protolude.Bool +withAsync from Control.Concurrent.Async +withAsyncBound from Control.Concurrent.Async +withAsyncOn from Control.Concurrent.Async +withExcept from Control.Monad.Trans.Except +withExceptT from Control.Monad.Trans.Except +withFile from System.IO +withFrozenCallStack from GHC.Stack +withMVar from Control.Concurrent.MVar +withMVarMasked from Control.Concurrent.MVar +withState from Control.Monad.Trans.State.Lazy +witness from Debug +words from Data.Text +writeChan from Control.Concurrent.Chan +writeFile from Data.Text.IO +writeList2Chan from Control.Concurrent.Chan +xor from Data.Bits +zero from Protolude.Semiring +zeroBits from Data.Bits +zip from GHC.List +zipWith from GHC.List +zipWithM from Control.Monad +zipWithM_ from Control.Monad +|| from GHC.Classes +||^ from Protolude.Bool diff --git a/export_lists/protolude-12.exports b/export_lists/protolude-12.exports new file mode 100644 index 0000000000..f3d20f9963 --- /dev/null +++ b/export_lists/protolude-12.exports @@ -0,0 +1,958 @@ +$ from GHC.Base +$! from Protolude.Base +$!! from Control.DeepSeq +$> from Data.Functor +% from GHC.Real +& from Data.Function +&& from GHC.Classes +&&^ from Protolude.Bool +* from GHC.Num +* from GHC.Types +** from GHC.Float +*> from GHC.Base ++ from GHC.Num +++ from GHC.Base +- from GHC.Num +. from GHC.Base +.&. from Data.Bits +.|. from Data.Bits +/ from GHC.Real +/= from GHC.Classes +:% from GHC.Real +:*: from GHC.Generics +:*: from GHC.Generics +:+ from Data.Complex +:+: from GHC.Generics +:.: from GHC.Generics +:| from GHC.Base +:~: from Data.Type.Equality +< from GHC.Classes +<$ from GHC.Base +<$!> from Control.Monad +<$> from Data.Functor +<&&> from Protolude.Bool +<&> from Data.Functor +<* from GHC.Base +<**> from GHC.Base +<*> from GHC.Base +<.> from Protolude.Semiring +<<$>> from Protolude.Functor +<<*>> from Protolude.Applicative +<= from GHC.Classes +<=< from Control.Monad +<> from GHC.Base +<|> from GHC.Base +<||> from Protolude.Bool +=<< from GHC.Base +== from GHC.Classes +== from Data.Type.Equality +> from GHC.Classes +>= from GHC.Classes +>=> from Control.Monad +>> from GHC.Base +>>= from GHC.Base +All from Data.Semigroup.Internal +All from Data.Semigroup.Internal +AllocationLimitExceeded from GHC.IO.Exception +AllocationLimitExceeded from GHC.IO.Exception +Alt from Data.Semigroup.Internal +Alt from Data.Semigroup.Internal +Alternative from GHC.Base +Any from Data.Semigroup.Internal +Any from Data.Semigroup.Internal +AppendMode from GHC.IO.IOMode +Applicative from GHC.Base +ArithException from GHC.Exception +ArrayException from GHC.IO.Exception +AssertionFailed from GHC.IO.Exception +AssertionFailed from GHC.IO.Exception +Associativity from GHC.Generics +Async from Control.Concurrent.Async +AsyncException from GHC.IO.Exception +Bifunctor from Data.Bifunctor +Bits from Data.Bits +BlockedIndefinitelyOnMVar from GHC.IO.Exception +BlockedIndefinitelyOnMVar from GHC.IO.Exception +BlockedIndefinitelyOnSTM from GHC.IO.Exception +BlockedIndefinitelyOnSTM from GHC.IO.Exception +Bool from GHC.Types +Bounded from GHC.Enum +ByteString from Data.ByteString.Internal +C1 from GHC.Generics +CallStack from GHC.Stack.Types +Chan from Control.Concurrent.Chan +Char from GHC.Types +CmpNat from GHC.TypeNats +Coercible from GHC.Types +Coercion from Data.Type.Coercion +Coercion from Data.Type.Coercion +Comp1 from GHC.Generics +CompactionFailed from GHC.IO.Exception +CompactionFailed from GHC.IO.Exception +Complex from Data.Complex +Concurrently from Control.Concurrent.Async +Concurrently from Control.Concurrent.Async +Const from Data.Functor.Const +Const from Data.Functor.Const +Constraint from GHC.Types +Constructor from GHC.Generics +D# from GHC.Types +D1 from GHC.Generics +Datatype from GHC.Generics +Deadlock from GHC.IO.Exception +Deadlock from GHC.IO.Exception +Denormal from GHC.Exception +DivideByZero from GHC.Exception +Double from GHC.Types +Down from Data.Ord +Down from Data.Ord +Dual from Data.Semigroup.Internal +Dual from Data.Semigroup.Internal +EQ from GHC.Types +Either from Data.Either +Endo from Data.Semigroup.Internal +Endo from Data.Semigroup.Internal +Enum from GHC.Enum +Eq from GHC.Classes +ErrorCall from GHC.Exception +ErrorCall from GHC.Exception +ErrorCallWithLocation from GHC.Exception +Except from Control.Monad.Trans.Except +ExceptT from Control.Monad.Trans.Except +ExceptT from Control.Monad.Trans.Except +Exception from GHC.Exception +ExitCode from GHC.IO.Exception +ExitFailure from GHC.IO.Exception +ExitSuccess from GHC.IO.Exception +F# from GHC.Types +False from GHC.Types +FatalError from Protolude.Panic +FatalError from Protolude.Panic +FilePath from GHC.IO +FiniteBits from Data.Bits +First from Data.Monoid +First from Data.Monoid +Fixity from GHC.Generics +FixityI from GHC.Generics +Float from GHC.Types +Floating from GHC.Float +Foldable from Data.Foldable +Fractional from GHC.Real +FunPtr from GHC.Ptr +Functor from GHC.Base +GT from GHC.Types +Generic from GHC.Generics +Generic1 from GHC.Generics +Handle from GHC.IO.Handle.Types +HasCallStack from GHC.Stack.Types +HasField from GHC.Records +Hashable from Data.Hashable.Class +HeapOverflow from GHC.IO.Exception +IO from GHC.Types +IOException from GHC.IO.Exception +IOMode from GHC.IO.IOMode +Identity from Data.Functor.Identity +Identity from Data.Functor.Identity +IndexOutOfBounds from GHC.IO.Exception +Infix from GHC.Generics +InfixI from GHC.Generics +Int from GHC.Types +Int16 from GHC.Int +Int32 from GHC.Int +Int64 from GHC.Int +Int8 from GHC.Int +IntMap from Data.IntMap.Internal +IntPtr from Foreign.Ptr +IntSet from Data.IntSet.Internal +Integer from GHC.Integer.Type +Integral from GHC.Real +IsLabel from GHC.OverloadedLabels +IsString from Data.String +Just from GHC.Base +K1 from GHC.Generics +K1 from GHC.Generics +KnownNat from GHC.TypeNats +KnownSymbol from GHC.TypeLits +L1 from GHC.Generics +LByteString from Protolude +LT from GHC.Types +LText from Protolude +Last from Data.Monoid +Last from Data.Monoid +Left from Data.Either +LeftAssociative from GHC.Generics +Leniency from Protolude.Conv +Lenient from Protolude.Conv +Location from GHC.ExecutionStack.Internal +Location from GHC.ExecutionStack.Internal +LossOfPrecision from GHC.Exception +M1 from GHC.Generics +M1 from GHC.Generics +MVar from GHC.MVar +Map from Data.Map.Internal +MaskedInterruptible from GHC.IO +MaskedUninterruptible from GHC.IO +MaskingState from GHC.IO +Maybe from GHC.Base +Meta from GHC.Generics +MetaCons from GHC.Generics +MetaData from GHC.Generics +MetaSel from GHC.Generics +Monad from GHC.Base +MonadError from Control.Monad.Error.Class +MonadIO from Control.Monad.IO.Class +MonadPlus from GHC.Base +MonadReader from Control.Monad.Reader.Class +MonadState from Control.Monad.State.Class +Monoid from GHC.Base +NFData from Control.DeepSeq +Nat from GHC.Types +NestedAtomically from Control.Exception.Base +NestedAtomically from Control.Exception.Base +NoMethodError from Control.Exception.Base +NoMethodError from Control.Exception.Base +NonEmpty from GHC.Base +NonTermination from Control.Exception.Base +NonTermination from Control.Exception.Base +NotAssociative from GHC.Generics +Nothing from GHC.Base +Num from GHC.Num +OnDecodeError from Data.Text.Encoding.Error +OnError from Data.Text.Encoding.Error +Option from Data.Semigroup +Option from Data.Semigroup +Ord from GHC.Classes +Ordering from GHC.Types +Overflow from GHC.Exception +PatternMatchFail from Control.Exception.Base +PatternMatchFail from Control.Exception.Base +Prefix from GHC.Generics +PrefixI from GHC.Generics +Print from Protolude.Show +Product from Data.Semigroup.Internal +Product from Data.Semigroup.Internal +Proxy from Data.Proxy +Proxy from Data.Proxy +Ptr from GHC.Ptr +QSem from Control.Concurrent.QSem +QSemN from Control.Concurrent.QSemN +R1 from GHC.Generics +Ratio from GHC.Real +RatioZeroDenominator from GHC.Exception +Rational from GHC.Real +Read from GHC.Read +ReadMode from GHC.IO.IOMode +ReadWriteMode from GHC.IO.IOMode +Reader from Control.Monad.Trans.Reader +ReaderT from Control.Monad.Trans.Reader +ReaderT from Control.Monad.Trans.Reader +Real from GHC.Real +RealFloat from GHC.Float +RealFrac from GHC.Real +Rec0 from GHC.Generics +RecConError from Control.Exception.Base +RecConError from Control.Exception.Base +RecSelError from Control.Exception.Base +RecSelError from Control.Exception.Base +RecUpdError from Control.Exception.Base +RecUpdError from Control.Exception.Base +Refl from Data.Type.Equality +Rep from GHC.Generics +Right from Data.Either +RightAssociative from GHC.Generics +S1 from GHC.Generics +ST from GHC.ST +STM from GHC.Conc.Sync +Selector from GHC.Generics +Semigroup from GHC.Base +Semiring from Protolude.Semiring +Seq from Data.Sequence.Internal +Set from Data.Set.Internal +Show from GHC.Show +SomeAsyncException from GHC.IO.Exception +SomeAsyncException from GHC.IO.Exception +SomeException from GHC.Exception +SomeException from GHC.Exception +SomeNat from GHC.TypeNats +SomeNat from GHC.TypeNats +SomeSymbol from GHC.TypeLits +SomeSymbol from GHC.TypeLits +SrcLoc from GHC.ExecutionStack.Internal +SrcLoc from GHC.ExecutionStack.Internal +StablePtr from GHC.Stable +StackOverflow from GHC.IO.Exception +State from Control.Monad.Trans.State.Lazy +StateT from Control.Monad.Trans.State.Lazy +StateT from Control.Monad.Trans.State.Lazy +StaticPtr from GHC.StaticPtr +Storable from Foreign.Storable +Strict from Protolude.Conv +StringConv from Protolude.Conv +Sum from Data.Semigroup.Internal +Sum from Data.Semigroup.Internal +Symbol from GHC.Types +Text from Data.Text.Internal +ThreadId from GHC.Conc.Sync +ThreadKilled from GHC.IO.Exception +Traversable from Data.Traversable +True from GHC.Types +Type from GHC.Types +TypeError from Control.Exception.Base +TypeError from Control.Exception.Base +TypeRep from Data.Typeable +Typeable from Data.Typeable.Internal +U1 from GHC.Generics +U1 from GHC.Generics +URec from GHC.Generics +UndefinedElement from GHC.IO.Exception +Underflow from GHC.Exception +UnicodeException from Data.Text.Encoding.Error +Unmasked from GHC.IO +UserInterrupt from GHC.IO.Exception +V1 from GHC.Generics +Void from Data.Void +Word from GHC.Types +Word16 from GHC.Word +Word32 from GHC.Word +Word64 from GHC.Word +Word8 from GHC.Word +WordPtr from Foreign.Ptr +WrappedMonoid from Data.Semigroup +WriteMode from GHC.IO.IOMode +ZipList from Control.Applicative +ZipList from Control.Applicative +^ from GHC.Real +^%^ from GHC.Real +^^ from GHC.Real +^^%^^ from GHC.Real +abs from GHC.Num +absurd from Data.Void +acos from GHC.Float +acosh from GHC.Float +addMVarFinalizer from Control.Concurrent.MVar +all from Data.Foldable +allowInterrupt from Control.Exception +always from GHC.Conc.Sync +alwaysSucceeds from GHC.Conc.Sync +and from Data.Foldable +any from Data.Foldable +ap from GHC.Base +appEndo from Data.Semigroup.Internal +appendFile from Data.Text.IO +applyN from Protolude +asTypeOf from GHC.Base +asin from GHC.Float +asinh from GHC.Float +ask from Control.Monad.Reader.Class +asks from Control.Monad.Reader.Class +asum from Data.Foldable +async from Control.Concurrent.Async +asyncBound from Control.Concurrent.Async +asyncExceptionFromException from GHC.IO.Exception +asyncExceptionToException from GHC.IO.Exception +asyncOn from Control.Concurrent.Async +asyncThreadId from Control.Concurrent.Async +atDef from Protolude.Safe +atMay from Protolude.Safe +atan from GHC.Float +atan2 from GHC.Float +atanh from GHC.Float +atomically from GHC.Conc.Sync +bimap from Data.Bifunctor +bit from Data.Bits +bitDefault from Data.Bits +bitSize from Data.Bits +bitSizeMaybe from Data.Bits +bool from Protolude.Bool +boundedEnumFrom from GHC.Enum +boundedEnumFromThen from GHC.Enum +bracket from Control.Exception.Base +bracketOnError from Control.Exception.Base +bracket_ from Control.Exception.Base +break from GHC.List +byteSwap16 from GHC.Word +byteSwap32 from GHC.Word +byteSwap64 from GHC.Word +callStack from GHC.Stack +cancel from Control.Concurrent.Async +cancelWith from Control.Concurrent.Async +cast from Data.Typeable +castWith from Data.Type.Equality +catMaybes from Data.Maybe +catch from GHC.IO +catchE from Control.Monad.Trans.Except +catchError from Control.Monad.Error.Class +catchJust from Control.Exception.Base +catchSTM from GHC.Conc.Sync +catches from Control.Exception +ceiling from GHC.Real +check from Control.Monad.STM +chr from GHC.Char +cis from Data.Complex +clearBit from Data.Bits +coerceWith from Data.Type.Coercion +compare from GHC.Classes +comparing from Data.Ord +complement from Data.Bits +complementBit from Data.Bits +conFixity from GHC.Generics +conIsRecord from GHC.Generics +conName from GHC.Generics +concat from Data.Foldable +concatMap from Data.Foldable +concatMapM from Protolude.Monad +concurrently from Control.Concurrent.Async +conjugate from Data.Complex +const from GHC.Base +cos from GHC.Float +cosh from GHC.Float +countLeadingZeros from Data.Bits +countTrailingZeros from Data.Bits +currentCallStack from GHC.Stack.CCS +curry from Data.Tuple +cycle from GHC.List +cycle1 from Data.Semigroup +datatypeName from GHC.Generics +decodeFloat from GHC.Float +decodeUtf8 from Data.Text.Encoding +decodeUtf8' from Data.Text.Encoding +decodeUtf8With from Data.Text.Encoding +deepseq from Control.DeepSeq +denominator from GHC.Real +die from Protolude +diff from Data.Semigroup +displayException from GHC.Exception +div from GHC.Real +divMod from GHC.Real +divZeroError from GHC.Real +drop from GHC.List +dropWhile from GHC.List +dupChan from Control.Concurrent.Chan +either from Data.Either +eitherA from Protolude.Applicative +elem from Data.Foldable +empty from GHC.Base +encodeFloat from GHC.Float +encodeUtf8 from Data.Text.Encoding +enumFrom from GHC.Enum +enumFromThen from GHC.Enum +enumFromThenTo from GHC.Enum +enumFromTo from GHC.Enum +eqT from Data.Typeable +evalState from Control.Monad.Trans.State.Lazy +evalStateT from Control.Monad.Trans.State.Lazy +evaluate from GHC.IO +even from GHC.Real +execState from Control.Monad.Trans.State.Lazy +execStateT from Control.Monad.Trans.State.Lazy +exitFailure from System.Exit +exitSuccess from System.Exit +exitWith from System.Exit +exp from GHC.Float +expm1 from GHC.Float +exponent from GHC.Float +fatalErrorMessage from Protolude.Panic +filter from GHC.List +filterM from Control.Monad +finally from Control.Exception.Base +find from Data.Foldable +finiteBitSize from Data.Bits +first from Data.Bifunctor +fix from Data.Function +fixST from GHC.ST +flip from GHC.Base +floatDigits from GHC.Float +floatRadix from GHC.Float +floatRange from GHC.Float +floor from GHC.Real +fmap from GHC.Base +fmapDefault from Data.Traversable +fold from Data.Foldable +foldM from Control.Monad +foldM_ from Control.Monad +foldMap from Data.Foldable +foldMapDefault from Data.Traversable +foldl from Data.Foldable +foldl' from Data.Foldable +foldl1May from Protolude.Safe +foldl1May' from Protolude.Safe +foldlM from Data.Foldable +foldr from Data.Foldable +foldr' from Data.Foldable +foldr1May from Protolude.Safe +foldrM from Data.Foldable +for from Data.Traversable +forM from Data.Traversable +forM_ from Data.Foldable +for_ from Data.Foldable +force from Control.DeepSeq +foreach from Protolude.Functor +forever from Control.Monad +forkFinally from Control.Concurrent +forkIO from GHC.Conc.Sync +forkIOWithUnmask from GHC.Conc.Sync +forkOS from Control.Concurrent +forkOSWithUnmask from Control.Concurrent +forkOn from GHC.Conc.Sync +forkOnWithUnmask from GHC.Conc.Sync +from from GHC.Generics +fromEnum from GHC.Enum +fromException from GHC.Exception +fromInteger from GHC.Num +fromIntegral from GHC.Real +fromLabel from GHC.OverloadedLabels +fromLeft from Data.Either +fromMaybe from Data.Maybe +fromRational from GHC.Real +fromRight from Data.Either +fromStrict from Data.Text.Lazy +fst from Data.Tuple +functionName from GHC.ExecutionStack.Internal +gcastWith from Data.Type.Equality +gcd from GHC.Real +gcdInt' from GHC.Real +gcdWord' from GHC.Real +genericDrop from Data.OldList +genericLength from Data.OldList +genericReplicate from Data.OldList +genericSplitAt from Data.OldList +genericTake from Data.OldList +get from Control.Monad.State.Class +getAll from Data.Semigroup.Internal +getAlt from Data.Semigroup.Internal +getAny from Data.Semigroup.Internal +getArgs from System.Environment +getCallStack from GHC.Stack.Types +getChanContents from Control.Concurrent.Chan +getConst from Data.Functor.Const +getContents from Data.Text.IO +getDual from Data.Semigroup.Internal +getField from GHC.Records +getFirst from Data.Monoid +getLast from Data.Monoid +getLine from Data.Text.IO +getMaskingState from GHC.IO +getNumCapabilities from GHC.Conc.Sync +getOption from Data.Semigroup +getProduct from Data.Semigroup.Internal +getStackTrace from GHC.ExecutionStack +getSum from Data.Semigroup.Internal +getZipList from Control.Applicative +gets from Control.Monad.State.Class +group from Data.OldList +groupBy from Data.OldList +guard from Control.Monad +guardM from Protolude.Bool +guarded from Protolude +guardedA from Protolude +hPutStr from Protolude.Show +hPutStrLn from Protolude.Show +handle from Control.Exception.Base +handleJust from Control.Exception.Base +hash from Data.Hashable.Class +hashUsing from Data.Hashable.Class +hashWithSalt from Data.Hashable.Class +head from Protolude.List +headDef from Protolude.Safe +headMay from Protolude.Safe +hush from Protolude.Exceptions +identity from Protolude +ifM from Protolude.Bool +ignore from Data.Text.Encoding.Error +imagPart from Data.Complex +infinity from GHC.Real +initDef from Protolude.Safe +initMay from Protolude.Safe +initSafe from Protolude.Safe +inits from Data.OldList +integralEnumFrom from GHC.Real +integralEnumFromThen from GHC.Real +integralEnumFromThenTo from GHC.Real +integralEnumFromTo from GHC.Real +interact from Data.Text.IO +intercalate from Data.OldList +interruptible from GHC.IO +intersperse from Data.OldList +ioError from GHC.IO.Exception +isCurrentThreadBound from Control.Concurrent +isDenormalized from GHC.Float +isEmptyMVar from GHC.MVar +isIEEE from GHC.Float +isInfinite from GHC.Float +isJust from Data.Maybe +isLeft from Data.Either +isNaN from GHC.Float +isNegativeZero from GHC.Float +isNewtype from GHC.Generics +isNothing from Data.Maybe +isPrefixOf from Data.OldList +isRight from Data.Either +isSigned from Data.Bits +iterate from GHC.List +join from GHC.Base +killThread from GHC.Conc.Sync +lastDef from Protolude.Safe +lastMay from Protolude.Safe +lcm from GHC.Real +leftToMaybe from Protolude.Either +lefts from Data.Either +length from Data.Foldable +lenientDecode from Data.Text.Encoding.Error +lift from Control.Monad.Trans.Class +liftA from GHC.Base +liftA2 from GHC.Base +liftA3 from GHC.Base +liftAA2 from Protolude.Applicative +liftIO from Control.Monad.IO.Class +liftIO1 from Protolude +liftIO2 from Protolude +liftM from GHC.Base +liftM' from Protolude.Monad +liftM2 from GHC.Base +liftM2' from Protolude.Monad +liftM3 from GHC.Base +liftM4 from GHC.Base +liftM5 from GHC.Base +lines from Data.Text +link from Control.Concurrent.Async +link2 from Control.Concurrent.Async +list from Protolude.List +listToMaybe from Data.Maybe +local from Control.Monad.Reader.Class +log from GHC.Float +log1mexp from GHC.Float +log1p from GHC.Float +log1pexp from GHC.Float +logBase from GHC.Float +magnitude from Data.Complex +many from GHC.Base +map from Protolude +mapAccumL from Data.Traversable +mapAccumR from Data.Traversable +mapAndUnzipM from Control.Monad +mapExcept from Control.Monad.Trans.Except +mapExceptT from Control.Monad.Trans.Except +mapException from Control.Exception.Base +mapM from Data.Traversable +mapM_ from Data.Foldable +mapMaybe from Data.Maybe +mappend from GHC.Base +mask from GHC.IO +mask_ from GHC.IO +max from GHC.Classes +maxBound from GHC.Enum +maxInt from GHC.Base +maximum from Data.Foldable +maximumBy from Data.Foldable +maximumDef from Protolude.Safe +maximumMay from Protolude.Safe +maybe from Data.Maybe +maybeEmpty from Protolude.Either +maybeToEither from Protolude.Either +maybeToLeft from Protolude.Either +maybeToList from Data.Maybe +maybeToRight from Protolude.Either +mconcat from GHC.Base +mempty from GHC.Base +mfilter from Control.Monad +min from GHC.Classes +minBound from GHC.Enum +minInt from GHC.Base +minimum from Data.Foldable +minimumBy from Data.Foldable +minimumDef from Protolude.Safe +minimumMay from Protolude.Safe +mkPolar from Data.Complex +mkWeakMVar from Control.Concurrent.MVar +mkWeakThreadId from GHC.Conc.Sync +mod from GHC.Real +modify from Control.Monad.State.Class +modifyMVar from Control.Concurrent.MVar +modifyMVarMasked from Control.Concurrent.MVar +modifyMVarMasked_ from Control.Concurrent.MVar +modifyMVar_ from Control.Concurrent.MVar +moduleName from GHC.Generics +mplus from GHC.Base +msum from Data.Foldable +mtimesDefault from Data.Semigroup +myThreadId from GHC.Conc.Sync +mzero from GHC.Base +natVal from GHC.TypeLits +negate from GHC.Num +newChan from Control.Concurrent.Chan +newEmptyMVar from GHC.MVar +newMVar from GHC.MVar +newQSem from Control.Concurrent.QSem +newQSemN from Control.Concurrent.QSemN +nonEmpty from Data.List.NonEmpty +not from GHC.Classes +notANumber from GHC.Real +notElem from Data.Foldable +notImplemented from Debug +note from Protolude.Exceptions +null from Data.Foldable +numerator from GHC.Real +numericEnumFrom from GHC.Real +numericEnumFromThen from GHC.Real +numericEnumFromThenTo from GHC.Real +numericEnumFromTo from GHC.Real +objectName from GHC.ExecutionStack.Internal +odd from GHC.Real +on from Data.Function +onException from Control.Exception.Base +one from Protolude.Semiring +openFile from GHC.IO.Handle.FD +option from Data.Semigroup +optional from Control.Applicative +or from Data.Foldable +orAlt from Protolude.Applicative +orElse from GHC.Conc.Sync +orEmpty from Protolude.Applicative +ord from GHC.Base +ordNub from Protolude.List +otherwise from GHC.Base +overflowError from GHC.Real +packageName from GHC.Generics +panic from Protolude.Panic +partitionEithers from Data.Either +pass from Protolude +permutations from Data.OldList +phase from Data.Complex +pi from GHC.Float +polar from Data.Complex +poll from Control.Concurrent.Async +popCount from Data.Bits +popCountDefault from Data.Bits +pred from GHC.Enum +prettyCallStack from GHC.Exception +prettySrcLoc from GHC.Exception +print from Protolude +product from Protolude.List +properFraction from GHC.Real +pure from GHC.Base +purer from Protolude.Applicative +put from Control.Monad.State.Class +putByteString from Protolude.Show +putErrLn from Protolude.Show +putErrText from Protolude.Show +putLByteString from Protolude.Show +putLText from Protolude.Show +putMVar from GHC.MVar +putStr from Protolude.Show +putStrLn from Protolude.Show +putText from Protolude.Show +quot from GHC.Real +quotRem from GHC.Real +race from Control.Concurrent.Async +race_ from Control.Concurrent.Async +ratioPrec from GHC.Real +ratioPrec1 from GHC.Real +ratioZeroDenominatorError from GHC.Real +readChan from Control.Concurrent.Chan +readEither from Text.Read +readFile from Data.Text.IO +readMVar from GHC.MVar +readMaybe from Text.Read +reader from Control.Monad.Reader.Class +reads from Text.Read +realPart from Data.Complex +realToFrac from GHC.Real +recip from GHC.Real +reduce from GHC.Real +rem from GHC.Real +repeat from GHC.List +replace from Data.Text.Encoding.Error +replicate from GHC.List +replicateM from Control.Monad +replicateM_ from Control.Monad +repr from Data.Type.Coercion +retry from GHC.Conc.Sync +return from GHC.Base +reverse from GHC.List +rightToMaybe from Protolude.Either +rights from Data.Either +rnf from Control.DeepSeq +rotate from Data.Bits +rotateL from Data.Bits +rotateR from Data.Bits +round from GHC.Real +rtsSupportsBoundThreads from Control.Concurrent +runConcurrently from Control.Concurrent.Async +runExcept from Control.Monad.Trans.Except +runExceptT from Control.Monad.Trans.Except +runIdentity from Data.Functor.Identity +runInBoundThread from Control.Concurrent +runInUnboundThread from Control.Concurrent +runReader from Control.Monad.Trans.Reader +runReaderT from Control.Monad.Trans.Reader +runST from GHC.ST +runState from Control.Monad.Trans.State.Lazy +runStateT from Control.Monad.Trans.State.Lazy +scaleFloat from GHC.Float +scanl from GHC.List +scanl' from GHC.List +scanr from GHC.List +sconcat from GHC.Base +second from Data.Bifunctor +selDecidedStrictness from GHC.Generics +selName from GHC.Generics +selSourceStrictness from GHC.Generics +selSourceUnpackedness from GHC.Generics +seq from GHC.Prim +sequence from Data.Traversable +sequenceA from Data.Traversable +sequenceA_ from Data.Foldable +sequence_ from Data.Foldable +setBit from Data.Bits +setNumCapabilities from GHC.Conc.Sync +shift from Data.Bits +shiftL from Data.Bits +shiftR from Data.Bits +show from Protolude +showStackTrace from GHC.ExecutionStack +signalQSem from Control.Concurrent.QSem +signalQSemN from Control.Concurrent.QSemN +significand from GHC.Float +signum from GHC.Num +sin from GHC.Float +sinh from GHC.Float +snd from Data.Tuple +some from GHC.Base +someNatVal from GHC.TypeLits +someSymbolVal from GHC.TypeLits +sort from Data.OldList +sortBy from Data.OldList +sortOn from Protolude.List +sourceColumn from GHC.ExecutionStack.Internal +sourceFile from GHC.ExecutionStack.Internal +sourceLine from GHC.ExecutionStack.Internal +splitAt from GHC.List +sqrt from GHC.Float +srcLoc from GHC.ExecutionStack.Internal +state from Control.Monad.State.Class +stderr from GHC.IO.Handle.FD +stdin from GHC.IO.Handle.FD +stdout from GHC.IO.Handle.FD +stimes from GHC.Base +stimesIdempotent from Data.Semigroup.Internal +stimesIdempotentMonoid from Data.Semigroup.Internal +stimesMonoid from Data.Semigroup.Internal +strConv from Protolude.Conv +strictDecode from Data.Text.Encoding.Error +subsequences from Data.OldList +subtract from GHC.Num +succ from GHC.Enum +sum from Protolude.List +swap from Data.Tuple +swapMVar from Control.Concurrent.MVar +sym from Data.Type.Equality +symbolVal from GHC.TypeLits +tailDef from Protolude.Safe +tailMay from Protolude.Safe +tailSafe from Protolude.Safe +tails from Data.OldList +take from GHC.List +takeMVar from GHC.MVar +takeWhile from GHC.List +tan from GHC.Float +tanh from GHC.Float +testBit from Data.Bits +testBitDefault from Data.Bits +threadCapability from GHC.Conc.Sync +threadDelay from GHC.Conc.IO +threadWaitRead from Control.Concurrent +threadWaitReadSTM from Control.Concurrent +threadWaitWrite from Control.Concurrent +threadWaitWriteSTM from Control.Concurrent +throwE from Control.Monad.Trans.Except +throwError from Control.Monad.Error.Class +throwIO from Protolude +throwSTM from GHC.Conc.Sync +throwTo from Protolude +to from GHC.Generics +toEnum from GHC.Enum +toException from GHC.Exception +toInteger from GHC.Real +toIntegralSized from Data.Bits +toList from Data.Foldable +toRational from GHC.Real +toS from Protolude.Conv +toSL from Protolude.Conv +toStrict from Data.Text.Lazy +trace from Debug +traceIO from Debug +traceId from Debug +traceM from Debug +traceShow from Debug +traceShowId from Debug +traceShowM from Debug +trans from Data.Type.Equality +transpose from Data.OldList +traverse from Data.Traversable +traverse_ from Data.Foldable +truncate from GHC.Real +try from Control.Exception.Base +tryIO from Protolude.Exceptions +tryJust from Control.Exception.Base +tryPutMVar from GHC.MVar +tryReadMVar from GHC.MVar +tryTakeMVar from GHC.MVar +typeRep from Data.Typeable +unComp1 from GHC.Generics +unK1 from GHC.Generics +unM1 from GHC.Generics +uncons from Protolude +uncurry from Data.Tuple +undefined from Debug +unfoldr from Data.OldList +uninterruptibleMask from GHC.IO +uninterruptibleMask_ from GHC.IO +unless from Control.Monad +unlessM from Protolude.Bool +unlines from Data.Text +unsnoc from Protolude +until from GHC.Base +unwords from Data.Text +unzip from GHC.List +vacuous from Data.Void +void from Data.Functor +wait from Control.Concurrent.Async +waitAny from Control.Concurrent.Async +waitAnyCancel from Control.Concurrent.Async +waitAnyCatch from Control.Concurrent.Async +waitAnyCatchCancel from Control.Concurrent.Async +waitBoth from Control.Concurrent.Async +waitCatch from Control.Concurrent.Async +waitEither from Control.Concurrent.Async +waitEitherCancel from Control.Concurrent.Async +waitEitherCatch from Control.Concurrent.Async +waitEitherCatchCancel from Control.Concurrent.Async +waitEither_ from Control.Concurrent.Async +waitQSem from Control.Concurrent.QSem +waitQSemN from Control.Concurrent.QSemN +when from GHC.Base +whenM from Protolude.Bool +withAsync from Control.Concurrent.Async +withAsyncBound from Control.Concurrent.Async +withAsyncOn from Control.Concurrent.Async +withExcept from Control.Monad.Trans.Except +withExceptT from Control.Monad.Trans.Except +withFile from System.IO +withFrozenCallStack from GHC.Stack +withMVar from Control.Concurrent.MVar +withMVarMasked from Control.Concurrent.MVar +withState from Control.Monad.Trans.State.Lazy +witness from Debug +words from Data.Text +writeChan from Control.Concurrent.Chan +writeFile from Data.Text.IO +writeList2Chan from Control.Concurrent.Chan +xor from Data.Bits +zero from Protolude.Semiring +zeroBits from Data.Bits +zip from GHC.List +zipWith from GHC.List +zipWithM from Control.Monad +zipWithM_ from Control.Monad +|| from GHC.Classes +||^ from Protolude.Bool diff --git a/export_lists/protolude-13.exports b/export_lists/protolude-13.exports new file mode 100644 index 0000000000..075073c7a7 --- /dev/null +++ b/export_lists/protolude-13.exports @@ -0,0 +1,959 @@ +$ from GHC.Base +$! from Protolude.Base +$!! from Control.DeepSeq +$> from Data.Functor +% from GHC.Real +& from Data.Function +&& from GHC.Classes +&&^ from Protolude.Bool +* from GHC.Num +** from GHC.Float +*> from GHC.Base ++ from GHC.Num +++ from GHC.Base +- from GHC.Num +. from GHC.Base +.&. from Data.Bits +.|. from Data.Bits +/ from GHC.Real +/= from GHC.Classes +:% from GHC.Real +:*: from GHC.Generics +:*: from GHC.Generics +:+ from Data.Complex +:+: from GHC.Generics +:.: from GHC.Generics +:| from GHC.Base +:~: from Data.Type.Equality +< from GHC.Classes +<$ from GHC.Base +<$!> from Control.Monad +<$> from Data.Functor +<&&> from Protolude.Bool +<&> from Data.Functor +<* from GHC.Base +<**> from GHC.Base +<*> from GHC.Base +<.> from Protolude.Semiring +<<$>> from Protolude.Functor +<<*>> from Protolude.Applicative +<= from GHC.Classes +<=< from Control.Monad +<> from GHC.Base +<|> from GHC.Base +<||> from Protolude.Bool +=<< from GHC.Base +== from GHC.Classes +== from Data.Type.Equality +> from GHC.Classes +>= from GHC.Classes +>=> from Control.Monad +>> from GHC.Base +>>= from GHC.Base +All from Data.Semigroup.Internal +All from Data.Semigroup.Internal +AllocationLimitExceeded from GHC.IO.Exception +AllocationLimitExceeded from GHC.IO.Exception +Alt from Data.Semigroup.Internal +Alt from Data.Semigroup.Internal +Alternative from GHC.Base +Any from Data.Semigroup.Internal +Any from Data.Semigroup.Internal +Ap from Data.Monoid +Ap from Data.Monoid +AppendMode from GHC.IO.IOMode +Applicative from GHC.Base +ArithException from GHC.Exception.Type +ArrayException from GHC.IO.Exception +AssertionFailed from GHC.IO.Exception +AssertionFailed from GHC.IO.Exception +Associativity from GHC.Generics +Async from Control.Concurrent.Async +AsyncException from GHC.IO.Exception +Bifunctor from Data.Bifunctor +Bits from Data.Bits +BlockedIndefinitelyOnMVar from GHC.IO.Exception +BlockedIndefinitelyOnMVar from GHC.IO.Exception +BlockedIndefinitelyOnSTM from GHC.IO.Exception +BlockedIndefinitelyOnSTM from GHC.IO.Exception +Bool from GHC.Types +Bounded from GHC.Enum +ByteString from Data.ByteString.Internal +C1 from GHC.Generics +CallStack from GHC.Stack.Types +Chan from Control.Concurrent.Chan +Char from GHC.Types +CmpNat from GHC.TypeNats +Coercible from GHC.Types +Coercion from Data.Type.Coercion +Coercion from Data.Type.Coercion +Comp1 from GHC.Generics +CompactionFailed from GHC.IO.Exception +CompactionFailed from GHC.IO.Exception +Complex from Data.Complex +Concurrently from Control.Concurrent.Async +Concurrently from Control.Concurrent.Async +Const from Data.Functor.Const +Const from Data.Functor.Const +Constraint from GHC.Types +Constructor from GHC.Generics +D# from GHC.Types +D1 from GHC.Generics +Datatype from GHC.Generics +Deadlock from GHC.IO.Exception +Deadlock from GHC.IO.Exception +Denormal from GHC.Exception.Type +DivideByZero from GHC.Exception.Type +Double from GHC.Types +Down from Data.Ord +Down from Data.Ord +Dual from Data.Semigroup.Internal +Dual from Data.Semigroup.Internal +EQ from GHC.Types +Either from Data.Either +Endo from Data.Semigroup.Internal +Endo from Data.Semigroup.Internal +Enum from GHC.Enum +Eq from GHC.Classes +ErrorCall from GHC.Exception +ErrorCall from GHC.Exception +ErrorCallWithLocation from GHC.Exception +Except from Control.Monad.Trans.Except +ExceptT from Control.Monad.Trans.Except +ExceptT from Control.Monad.Trans.Except +Exception from GHC.Exception.Type +ExitCode from GHC.IO.Exception +ExitFailure from GHC.IO.Exception +ExitSuccess from GHC.IO.Exception +F# from GHC.Types +False from GHC.Types +FatalError from Protolude.Panic +FatalError from Protolude.Panic +FilePath from GHC.IO +FiniteBits from Data.Bits +First from Data.Monoid +First from Data.Monoid +Fixity from GHC.Generics +FixityI from GHC.Generics +Float from GHC.Types +Floating from GHC.Float +Foldable from Data.Foldable +Fractional from GHC.Real +FunPtr from GHC.Ptr +Functor from GHC.Base +GT from GHC.Types +Generic from GHC.Generics +Generic1 from GHC.Generics +Handle from GHC.IO.Handle.Types +HasCallStack from GHC.Stack.Types +HasField from GHC.Records +Hashable from Data.Hashable.Class +HeapOverflow from GHC.IO.Exception +IO from GHC.Types +IOException from GHC.IO.Exception +IOMode from GHC.IO.IOMode +Identity from Data.Functor.Identity +Identity from Data.Functor.Identity +IndexOutOfBounds from GHC.IO.Exception +Infix from GHC.Generics +InfixI from GHC.Generics +Int from GHC.Types +Int16 from GHC.Int +Int32 from GHC.Int +Int64 from GHC.Int +Int8 from GHC.Int +IntMap from Data.IntMap.Internal +IntPtr from Foreign.Ptr +IntSet from Data.IntSet.Internal +Integer from GHC.Integer.Type +Integral from GHC.Real +IsLabel from GHC.OverloadedLabels +IsString from Data.String +Just from GHC.Maybe +K1 from GHC.Generics +K1 from GHC.Generics +KnownNat from GHC.TypeNats +KnownSymbol from GHC.TypeLits +L1 from GHC.Generics +LByteString from Protolude +LT from GHC.Types +LText from Protolude +Last from Data.Monoid +Last from Data.Monoid +Left from Data.Either +LeftAssociative from GHC.Generics +Leniency from Protolude.Conv +Lenient from Protolude.Conv +Location from GHC.ExecutionStack.Internal +Location from GHC.ExecutionStack.Internal +LossOfPrecision from GHC.Exception.Type +M1 from GHC.Generics +M1 from GHC.Generics +MVar from GHC.MVar +Map from Data.Map.Internal +MaskedInterruptible from GHC.IO +MaskedUninterruptible from GHC.IO +MaskingState from GHC.IO +Maybe from GHC.Maybe +Meta from GHC.Generics +MetaCons from GHC.Generics +MetaData from GHC.Generics +MetaSel from GHC.Generics +Monad from GHC.Base +MonadError from Control.Monad.Error.Class +MonadIO from Control.Monad.IO.Class +MonadPlus from GHC.Base +MonadReader from Control.Monad.Reader.Class +MonadState from Control.Monad.State.Class +Monoid from GHC.Base +NFData from Control.DeepSeq +Nat from GHC.Types +NestedAtomically from Control.Exception.Base +NestedAtomically from Control.Exception.Base +NoMethodError from Control.Exception.Base +NoMethodError from Control.Exception.Base +NonEmpty from GHC.Base +NonTermination from Control.Exception.Base +NonTermination from Control.Exception.Base +NotAssociative from GHC.Generics +Nothing from GHC.Maybe +Num from GHC.Num +OnDecodeError from Data.Text.Encoding.Error +OnError from Data.Text.Encoding.Error +Option from Data.Semigroup +Option from Data.Semigroup +Ord from GHC.Classes +Ordering from GHC.Types +Overflow from GHC.Exception.Type +PatternMatchFail from Control.Exception.Base +PatternMatchFail from Control.Exception.Base +Prefix from GHC.Generics +PrefixI from GHC.Generics +Print from Protolude.Show +Product from Data.Semigroup.Internal +Product from Data.Semigroup.Internal +Proxy from Data.Proxy +Proxy from Data.Proxy +Ptr from GHC.Ptr +QSem from Control.Concurrent.QSem +QSemN from Control.Concurrent.QSemN +R1 from GHC.Generics +Ratio from GHC.Real +RatioZeroDenominator from GHC.Exception.Type +Rational from GHC.Real +Read from GHC.Read +ReadMode from GHC.IO.IOMode +ReadWriteMode from GHC.IO.IOMode +Reader from Control.Monad.Trans.Reader +ReaderT from Control.Monad.Trans.Reader +ReaderT from Control.Monad.Trans.Reader +Real from GHC.Real +RealFloat from GHC.Float +RealFrac from GHC.Real +Rec0 from GHC.Generics +RecConError from Control.Exception.Base +RecConError from Control.Exception.Base +RecSelError from Control.Exception.Base +RecSelError from Control.Exception.Base +RecUpdError from Control.Exception.Base +RecUpdError from Control.Exception.Base +Refl from Data.Type.Equality +Rep from GHC.Generics +Right from Data.Either +RightAssociative from GHC.Generics +S1 from GHC.Generics +ST from GHC.ST +STM from GHC.Conc.Sync +Selector from GHC.Generics +Semigroup from GHC.Base +Semiring from Protolude.Semiring +Seq from Data.Sequence.Internal +Set from Data.Set.Internal +Show from GHC.Show +SomeAsyncException from GHC.IO.Exception +SomeAsyncException from GHC.IO.Exception +SomeException from GHC.Exception.Type +SomeException from GHC.Exception.Type +SomeNat from GHC.TypeNats +SomeNat from GHC.TypeNats +SomeSymbol from GHC.TypeLits +SomeSymbol from GHC.TypeLits +SrcLoc from GHC.ExecutionStack.Internal +SrcLoc from GHC.ExecutionStack.Internal +StablePtr from GHC.Stable +StackOverflow from GHC.IO.Exception +State from Control.Monad.Trans.State.Lazy +StateT from Control.Monad.Trans.State.Lazy +StateT from Control.Monad.Trans.State.Lazy +StaticPtr from GHC.StaticPtr +Storable from Foreign.Storable +Strict from Protolude.Conv +StringConv from Protolude.Conv +Sum from Data.Semigroup.Internal +Sum from Data.Semigroup.Internal +Symbol from GHC.Types +Text from Data.Text.Internal +ThreadId from GHC.Conc.Sync +ThreadKilled from GHC.IO.Exception +Traversable from Data.Traversable +True from GHC.Types +Type from GHC.Types +TypeError from Control.Exception.Base +TypeError from Control.Exception.Base +TypeRep from Data.Typeable +Typeable from Data.Typeable.Internal +U1 from GHC.Generics +U1 from GHC.Generics +URec from GHC.Generics +UndefinedElement from GHC.IO.Exception +Underflow from GHC.Exception.Type +UnicodeException from Data.Text.Encoding.Error +Unmasked from GHC.IO +UserInterrupt from GHC.IO.Exception +V1 from GHC.Generics +Void from Data.Void +Word from GHC.Types +Word16 from GHC.Word +Word32 from GHC.Word +Word64 from GHC.Word +Word8 from GHC.Word +WordPtr from Foreign.Ptr +WrappedMonoid from Data.Semigroup +WriteMode from GHC.IO.IOMode +ZipList from Control.Applicative +ZipList from Control.Applicative +^ from GHC.Real +^%^ from GHC.Real +^^ from GHC.Real +^^%^^ from GHC.Real +abs from GHC.Num +absurd from Data.Void +acos from GHC.Float +acosh from GHC.Float +addMVarFinalizer from Control.Concurrent.MVar +all from Data.Foldable +allowInterrupt from Control.Exception +and from Data.Foldable +any from Data.Foldable +ap from GHC.Base +appEndo from Data.Semigroup.Internal +appendFile from Data.Text.IO +applyN from Protolude +asTypeOf from GHC.Base +asin from GHC.Float +asinh from GHC.Float +ask from Control.Monad.Reader.Class +asks from Control.Monad.Reader.Class +asum from Data.Foldable +async from Control.Concurrent.Async +asyncBound from Control.Concurrent.Async +asyncExceptionFromException from GHC.IO.Exception +asyncExceptionToException from GHC.IO.Exception +asyncOn from Control.Concurrent.Async +asyncThreadId from Control.Concurrent.Async +atDef from Protolude.Safe +atMay from Protolude.Safe +atan from GHC.Float +atan2 from GHC.Float +atanh from GHC.Float +atomically from GHC.Conc.Sync +bimap from Data.Bifunctor +bit from Data.Bits +bitDefault from Data.Bits +bitSize from Data.Bits +bitSizeMaybe from Data.Bits +bool from Protolude.Bool +boundedEnumFrom from GHC.Enum +boundedEnumFromThen from GHC.Enum +bracket from Control.Exception.Base +bracketOnError from Control.Exception.Base +bracket_ from Control.Exception.Base +break from GHC.List +byteSwap16 from GHC.Word +byteSwap32 from GHC.Word +byteSwap64 from GHC.Word +callStack from GHC.Stack +cancel from Control.Concurrent.Async +cancelWith from Control.Concurrent.Async +cast from Data.Typeable +castWith from Data.Type.Equality +catMaybes from Data.Maybe +catch from GHC.IO +catchE from Control.Monad.Trans.Except +catchError from Control.Monad.Error.Class +catchJust from Control.Exception.Base +catchSTM from GHC.Conc.Sync +catches from Control.Exception +ceiling from GHC.Real +check from Control.Monad.STM +chr from GHC.Char +cis from Data.Complex +clearBit from Data.Bits +coerceWith from Data.Type.Coercion +compare from GHC.Classes +comparing from Data.Ord +complement from Data.Bits +complementBit from Data.Bits +conFixity from GHC.Generics +conIsRecord from GHC.Generics +conName from GHC.Generics +concat from Data.Foldable +concatMap from Data.Foldable +concatMapM from Protolude.Monad +concurrently from Control.Concurrent.Async +conjugate from Data.Complex +const from GHC.Base +cos from GHC.Float +cosh from GHC.Float +countLeadingZeros from Data.Bits +countTrailingZeros from Data.Bits +currentCallStack from GHC.Stack.CCS +curry from Data.Tuple +cycle from GHC.List +cycle1 from Data.Semigroup +datatypeName from GHC.Generics +decodeFloat from GHC.Float +decodeUtf8 from Data.Text.Encoding +decodeUtf8' from Data.Text.Encoding +decodeUtf8With from Data.Text.Encoding +deepseq from Control.DeepSeq +denominator from GHC.Real +die from Protolude +diff from Data.Semigroup +displayException from GHC.Exception.Type +div from GHC.Real +divMod from GHC.Real +divZeroError from GHC.Real +drop from GHC.List +dropWhile from GHC.List +dupChan from Control.Concurrent.Chan +either from Data.Either +eitherA from Protolude.Applicative +elem from Data.Foldable +empty from GHC.Base +encodeFloat from GHC.Float +encodeUtf8 from Data.Text.Encoding +enumFrom from GHC.Enum +enumFromThen from GHC.Enum +enumFromThenTo from GHC.Enum +enumFromTo from GHC.Enum +eqT from Data.Typeable +evalState from Control.Monad.Trans.State.Lazy +evalStateT from Control.Monad.Trans.State.Lazy +evaluate from GHC.IO +even from GHC.Real +execState from Control.Monad.Trans.State.Lazy +execStateT from Control.Monad.Trans.State.Lazy +exitFailure from System.Exit +exitSuccess from System.Exit +exitWith from System.Exit +exp from GHC.Float +expm1 from GHC.Float +exponent from GHC.Float +fatalErrorMessage from Protolude.Panic +filter from GHC.List +filterM from Control.Monad +finally from Control.Exception.Base +find from Data.Foldable +finiteBitSize from Data.Bits +first from Data.Bifunctor +fix from Data.Function +fixST from Control.Monad.ST.Imp +flip from GHC.Base +floatDigits from GHC.Float +floatRadix from GHC.Float +floatRange from GHC.Float +floor from GHC.Real +fmap from GHC.Base +fmapDefault from Data.Traversable +fold from Data.Foldable +foldM from Control.Monad +foldM_ from Control.Monad +foldMap from Data.Foldable +foldMapDefault from Data.Traversable +foldl from Data.Foldable +foldl' from Data.Foldable +foldl1May from Protolude.Safe +foldl1May' from Protolude.Safe +foldlM from Data.Foldable +foldr from Data.Foldable +foldr' from Data.Foldable +foldr1May from Protolude.Safe +foldrM from Data.Foldable +for from Data.Traversable +forM from Data.Traversable +forM_ from Data.Foldable +for_ from Data.Foldable +force from Control.DeepSeq +foreach from Protolude.Functor +forever from Control.Monad +forkFinally from Control.Concurrent +forkIO from GHC.Conc.Sync +forkIOWithUnmask from GHC.Conc.Sync +forkOS from Control.Concurrent +forkOSWithUnmask from Control.Concurrent +forkOn from GHC.Conc.Sync +forkOnWithUnmask from GHC.Conc.Sync +from from GHC.Generics +fromEnum from GHC.Enum +fromException from GHC.Exception.Type +fromInteger from GHC.Num +fromIntegral from GHC.Real +fromLabel from GHC.OverloadedLabels +fromLeft from Data.Either +fromMaybe from Data.Maybe +fromRational from GHC.Real +fromRight from Data.Either +fromStrict from Data.Text.Lazy +fst from Data.Tuple +functionName from GHC.ExecutionStack.Internal +gcastWith from Data.Type.Equality +gcd from GHC.Real +gcdInt' from GHC.Real +gcdWord' from GHC.Real +genericDrop from Data.OldList +genericLength from Data.OldList +genericReplicate from Data.OldList +genericSplitAt from Data.OldList +genericTake from Data.OldList +get from Control.Monad.State.Class +getAll from Data.Semigroup.Internal +getAlt from Data.Semigroup.Internal +getAny from Data.Semigroup.Internal +getAp from Data.Monoid +getArgs from System.Environment +getCallStack from GHC.Stack.Types +getChanContents from Control.Concurrent.Chan +getConst from Data.Functor.Const +getContents from Data.Text.IO +getDual from Data.Semigroup.Internal +getField from GHC.Records +getFirst from Data.Monoid +getLast from Data.Monoid +getLine from Data.Text.IO +getMaskingState from GHC.IO +getNumCapabilities from GHC.Conc.Sync +getOption from Data.Semigroup +getProduct from Data.Semigroup.Internal +getStackTrace from GHC.ExecutionStack +getSum from Data.Semigroup.Internal +getZipList from Control.Applicative +gets from Control.Monad.State.Class +group from Data.OldList +groupBy from Data.OldList +guard from Control.Monad +guardM from Protolude.Bool +guarded from Protolude +guardedA from Protolude +hPutStr from Protolude.Show +hPutStrLn from Protolude.Show +handle from Control.Exception.Base +handleJust from Control.Exception.Base +hash from Data.Hashable.Class +hashUsing from Data.Hashable.Class +hashWithSalt from Data.Hashable.Class +head from Protolude.List +headDef from Protolude.Safe +headMay from Protolude.Safe +hush from Protolude.Exceptions +identity from Protolude +ifM from Protolude.Bool +ignore from Data.Text.Encoding.Error +imagPart from Data.Complex +infinity from GHC.Real +initDef from Protolude.Safe +initMay from Protolude.Safe +initSafe from Protolude.Safe +inits from Data.OldList +integralEnumFrom from GHC.Real +integralEnumFromThen from GHC.Real +integralEnumFromThenTo from GHC.Real +integralEnumFromTo from GHC.Real +interact from Data.Text.IO +intercalate from Data.OldList +interruptible from GHC.IO +intersperse from Data.OldList +ioError from GHC.IO.Exception +isCurrentThreadBound from Control.Concurrent +isDenormalized from GHC.Float +isEmptyMVar from GHC.MVar +isIEEE from GHC.Float +isInfinite from GHC.Float +isJust from Data.Maybe +isLeft from Data.Either +isNaN from GHC.Float +isNegativeZero from GHC.Float +isNewtype from GHC.Generics +isNothing from Data.Maybe +isPrefixOf from Data.OldList +isRight from Data.Either +isSigned from Data.Bits +iterate from GHC.List +join from GHC.Base +killThread from GHC.Conc.Sync +lastDef from Protolude.Safe +lastMay from Protolude.Safe +lcm from GHC.Real +leftToMaybe from Protolude.Either +lefts from Data.Either +length from Data.Foldable +lenientDecode from Data.Text.Encoding.Error +lift from Control.Monad.Trans.Class +liftA from GHC.Base +liftA2 from GHC.Base +liftA3 from GHC.Base +liftAA2 from Protolude.Applicative +liftIO from Control.Monad.IO.Class +liftIO1 from Protolude +liftIO2 from Protolude +liftM from GHC.Base +liftM' from Protolude.Monad +liftM2 from GHC.Base +liftM2' from Protolude.Monad +liftM3 from GHC.Base +liftM4 from GHC.Base +liftM5 from GHC.Base +lines from Data.Text +link from Control.Concurrent.Async +link2 from Control.Concurrent.Async +list from Protolude.List +listToMaybe from Data.Maybe +local from Control.Monad.Reader.Class +log from GHC.Float +log1mexp from GHC.Float +log1p from GHC.Float +log1pexp from GHC.Float +logBase from GHC.Float +magnitude from Data.Complex +many from GHC.Base +map from Protolude +mapAccumL from Data.Traversable +mapAccumR from Data.Traversable +mapAndUnzipM from Control.Monad +mapExcept from Control.Monad.Trans.Except +mapExceptT from Control.Monad.Trans.Except +mapException from Control.Exception.Base +mapM from Data.Traversable +mapM_ from Data.Foldable +mapMaybe from Data.Maybe +mappend from GHC.Base +mask from GHC.IO +mask_ from GHC.IO +max from GHC.Classes +maxBound from GHC.Enum +maxInt from GHC.Base +maximum from Data.Foldable +maximumBy from Data.Foldable +maximumDef from Protolude.Safe +maximumMay from Protolude.Safe +maybe from Data.Maybe +maybeEmpty from Protolude.Either +maybeToEither from Protolude.Either +maybeToLeft from Protolude.Either +maybeToList from Data.Maybe +maybeToRight from Protolude.Either +mconcat from GHC.Base +mempty from GHC.Base +mfilter from Control.Monad +min from GHC.Classes +minBound from GHC.Enum +minInt from GHC.Base +minimum from Data.Foldable +minimumBy from Data.Foldable +minimumDef from Protolude.Safe +minimumMay from Protolude.Safe +mkPolar from Data.Complex +mkWeakMVar from Control.Concurrent.MVar +mkWeakThreadId from GHC.Conc.Sync +mod from GHC.Real +modify from Control.Monad.State.Class +modifyMVar from Control.Concurrent.MVar +modifyMVarMasked from Control.Concurrent.MVar +modifyMVarMasked_ from Control.Concurrent.MVar +modifyMVar_ from Control.Concurrent.MVar +moduleName from GHC.Generics +mplus from GHC.Base +msum from Data.Foldable +mtimesDefault from Data.Semigroup +myThreadId from GHC.Conc.Sync +mzero from GHC.Base +natVal from GHC.TypeLits +negate from GHC.Num +newChan from Control.Concurrent.Chan +newEmptyMVar from GHC.MVar +newMVar from GHC.MVar +newQSem from Control.Concurrent.QSem +newQSemN from Control.Concurrent.QSemN +nonEmpty from Data.List.NonEmpty +not from GHC.Classes +notANumber from GHC.Real +notElem from Data.Foldable +notImplemented from Debug +note from Protolude.Exceptions +null from Data.Foldable +numerator from GHC.Real +numericEnumFrom from GHC.Real +numericEnumFromThen from GHC.Real +numericEnumFromThenTo from GHC.Real +numericEnumFromTo from GHC.Real +objectName from GHC.ExecutionStack.Internal +odd from GHC.Real +on from Data.Function +onException from Control.Exception.Base +one from Protolude.Semiring +openFile from GHC.IO.Handle.FD +option from Data.Semigroup +optional from Control.Applicative +or from Data.Foldable +orAlt from Protolude.Applicative +orElse from GHC.Conc.Sync +orEmpty from Protolude.Applicative +ord from GHC.Base +ordNub from Protolude.List +otherwise from GHC.Base +overflowError from GHC.Real +packageName from GHC.Generics +panic from Protolude.Panic +partitionEithers from Data.Either +pass from Protolude +permutations from Data.OldList +phase from Data.Complex +pi from GHC.Float +polar from Data.Complex +poll from Control.Concurrent.Async +popCount from Data.Bits +popCountDefault from Data.Bits +pred from GHC.Enum +prettyCallStack from GHC.Exception +prettySrcLoc from GHC.Exception +print from Protolude +product from Protolude.List +properFraction from GHC.Real +pure from GHC.Base +purer from Protolude.Applicative +put from Control.Monad.State.Class +putByteString from Protolude.Show +putErrLn from Protolude.Show +putErrText from Protolude.Show +putLByteString from Protolude.Show +putLText from Protolude.Show +putMVar from GHC.MVar +putStr from Protolude.Show +putStrLn from Protolude.Show +putText from Protolude.Show +quot from GHC.Real +quotRem from GHC.Real +race from Control.Concurrent.Async +race_ from Control.Concurrent.Async +ratioPrec from GHC.Real +ratioPrec1 from GHC.Real +ratioZeroDenominatorError from GHC.Real +readChan from Control.Concurrent.Chan +readEither from Text.Read +readFile from Data.Text.IO +readMVar from GHC.MVar +readMaybe from Text.Read +reader from Control.Monad.Reader.Class +reads from Text.Read +realPart from Data.Complex +realToFrac from GHC.Real +recip from GHC.Real +reduce from GHC.Real +rem from GHC.Real +repeat from GHC.List +replace from Data.Text.Encoding.Error +replicate from GHC.List +replicateM from Control.Monad +replicateM_ from Control.Monad +repr from Data.Type.Coercion +retry from GHC.Conc.Sync +return from GHC.Base +reverse from GHC.List +rightToMaybe from Protolude.Either +rights from Data.Either +rnf from Control.DeepSeq +rotate from Data.Bits +rotateL from Data.Bits +rotateR from Data.Bits +round from GHC.Real +rtsSupportsBoundThreads from Control.Concurrent +runConcurrently from Control.Concurrent.Async +runExcept from Control.Monad.Trans.Except +runExceptT from Control.Monad.Trans.Except +runIdentity from Data.Functor.Identity +runInBoundThread from Control.Concurrent +runInUnboundThread from Control.Concurrent +runReader from Control.Monad.Trans.Reader +runReaderT from Control.Monad.Trans.Reader +runST from GHC.ST +runState from Control.Monad.Trans.State.Lazy +runStateT from Control.Monad.Trans.State.Lazy +scaleFloat from GHC.Float +scanl from GHC.List +scanl' from GHC.List +scanr from GHC.List +sconcat from GHC.Base +second from Data.Bifunctor +selDecidedStrictness from GHC.Generics +selName from GHC.Generics +selSourceStrictness from GHC.Generics +selSourceUnpackedness from GHC.Generics +seq from GHC.Prim +sequence from Data.Traversable +sequenceA from Data.Traversable +sequenceA_ from Data.Foldable +sequence_ from Data.Foldable +setBit from Data.Bits +setNumCapabilities from GHC.Conc.Sync +shift from Data.Bits +shiftL from Data.Bits +shiftR from Data.Bits +show from Protolude +showStackTrace from GHC.ExecutionStack +signalQSem from Control.Concurrent.QSem +signalQSemN from Control.Concurrent.QSemN +significand from GHC.Float +signum from GHC.Num +sin from GHC.Float +sinh from GHC.Float +snd from Data.Tuple +some from GHC.Base +someNatVal from GHC.TypeLits +someSymbolVal from GHC.TypeLits +sort from Data.OldList +sortBy from Data.OldList +sortOn from Protolude.List +sourceColumn from GHC.ExecutionStack.Internal +sourceFile from GHC.ExecutionStack.Internal +sourceLine from GHC.ExecutionStack.Internal +splitAt from GHC.List +sqrt from GHC.Float +srcLoc from GHC.ExecutionStack.Internal +state from Control.Monad.State.Class +stderr from GHC.IO.Handle.FD +stdin from GHC.IO.Handle.FD +stdout from GHC.IO.Handle.FD +stimes from GHC.Base +stimesIdempotent from Data.Semigroup.Internal +stimesIdempotentMonoid from Data.Semigroup.Internal +stimesMonoid from Data.Semigroup.Internal +strConv from Protolude.Conv +strictDecode from Data.Text.Encoding.Error +subsequences from Data.OldList +subtract from GHC.Num +succ from GHC.Enum +sum from Protolude.List +swap from Data.Tuple +swapMVar from Control.Concurrent.MVar +sym from Data.Type.Equality +symbolVal from GHC.TypeLits +tailDef from Protolude.Safe +tailMay from Protolude.Safe +tailSafe from Protolude.Safe +tails from Data.OldList +take from GHC.List +takeMVar from GHC.MVar +takeWhile from GHC.List +tan from GHC.Float +tanh from GHC.Float +testBit from Data.Bits +testBitDefault from Data.Bits +threadCapability from GHC.Conc.Sync +threadDelay from GHC.Conc.IO +threadWaitRead from Control.Concurrent +threadWaitReadSTM from Control.Concurrent +threadWaitWrite from Control.Concurrent +threadWaitWriteSTM from Control.Concurrent +throwE from Control.Monad.Trans.Except +throwError from Control.Monad.Error.Class +throwIO from Protolude +throwSTM from GHC.Conc.Sync +throwTo from Protolude +to from GHC.Generics +toEnum from GHC.Enum +toException from GHC.Exception.Type +toInteger from GHC.Real +toIntegralSized from Data.Bits +toList from Data.Foldable +toRational from GHC.Real +toS from Protolude.Conv +toSL from Protolude.Conv +toStrict from Data.Text.Lazy +trace from Debug +traceIO from Debug +traceId from Debug +traceM from Debug +traceShow from Debug +traceShowId from Debug +traceShowM from Debug +trans from Data.Type.Equality +transpose from Data.OldList +traverse from Data.Traversable +traverse_ from Data.Foldable +truncate from GHC.Real +try from Control.Exception.Base +tryIO from Protolude.Exceptions +tryJust from Control.Exception.Base +tryPutMVar from GHC.MVar +tryReadMVar from GHC.MVar +tryTakeMVar from GHC.MVar +typeRep from Data.Typeable +unComp1 from GHC.Generics +unK1 from GHC.Generics +unM1 from GHC.Generics +uncons from Protolude +uncurry from Data.Tuple +undefined from Debug +underflowError from GHC.Real +unfoldr from Data.OldList +uninterruptibleMask from GHC.IO +uninterruptibleMask_ from GHC.IO +unless from Control.Monad +unlessM from Protolude.Bool +unlines from Data.Text +unsnoc from Protolude +until from GHC.Base +unwords from Data.Text +unzip from GHC.List +vacuous from Data.Void +void from Data.Functor +wait from Control.Concurrent.Async +waitAny from Control.Concurrent.Async +waitAnyCancel from Control.Concurrent.Async +waitAnyCatch from Control.Concurrent.Async +waitAnyCatchCancel from Control.Concurrent.Async +waitBoth from Control.Concurrent.Async +waitCatch from Control.Concurrent.Async +waitEither from Control.Concurrent.Async +waitEitherCancel from Control.Concurrent.Async +waitEitherCatch from Control.Concurrent.Async +waitEitherCatchCancel from Control.Concurrent.Async +waitEither_ from Control.Concurrent.Async +waitQSem from Control.Concurrent.QSem +waitQSemN from Control.Concurrent.QSemN +when from GHC.Base +whenM from Protolude.Bool +withAsync from Control.Concurrent.Async +withAsyncBound from Control.Concurrent.Async +withAsyncOn from Control.Concurrent.Async +withExcept from Control.Monad.Trans.Except +withExceptT from Control.Monad.Trans.Except +withFile from System.IO +withFrozenCallStack from GHC.Stack +withMVar from Control.Concurrent.MVar +withMVarMasked from Control.Concurrent.MVar +withState from Control.Monad.Trans.State.Lazy +witness from Debug +words from Data.Text +writeChan from Control.Concurrent.Chan +writeFile from Data.Text.IO +writeList2Chan from Control.Concurrent.Chan +xor from Data.Bits +zero from Protolude.Semiring +zeroBits from Data.Bits +zip from GHC.List +zipWith from GHC.List +zipWithM from Control.Monad +zipWithM_ from Control.Monad +|| from GHC.Classes +||^ from Protolude.Bool diff --git a/export_lists/protolude-14.exports b/export_lists/protolude-14.exports new file mode 100644 index 0000000000..075073c7a7 --- /dev/null +++ b/export_lists/protolude-14.exports @@ -0,0 +1,959 @@ +$ from GHC.Base +$! from Protolude.Base +$!! from Control.DeepSeq +$> from Data.Functor +% from GHC.Real +& from Data.Function +&& from GHC.Classes +&&^ from Protolude.Bool +* from GHC.Num +** from GHC.Float +*> from GHC.Base ++ from GHC.Num +++ from GHC.Base +- from GHC.Num +. from GHC.Base +.&. from Data.Bits +.|. from Data.Bits +/ from GHC.Real +/= from GHC.Classes +:% from GHC.Real +:*: from GHC.Generics +:*: from GHC.Generics +:+ from Data.Complex +:+: from GHC.Generics +:.: from GHC.Generics +:| from GHC.Base +:~: from Data.Type.Equality +< from GHC.Classes +<$ from GHC.Base +<$!> from Control.Monad +<$> from Data.Functor +<&&> from Protolude.Bool +<&> from Data.Functor +<* from GHC.Base +<**> from GHC.Base +<*> from GHC.Base +<.> from Protolude.Semiring +<<$>> from Protolude.Functor +<<*>> from Protolude.Applicative +<= from GHC.Classes +<=< from Control.Monad +<> from GHC.Base +<|> from GHC.Base +<||> from Protolude.Bool +=<< from GHC.Base +== from GHC.Classes +== from Data.Type.Equality +> from GHC.Classes +>= from GHC.Classes +>=> from Control.Monad +>> from GHC.Base +>>= from GHC.Base +All from Data.Semigroup.Internal +All from Data.Semigroup.Internal +AllocationLimitExceeded from GHC.IO.Exception +AllocationLimitExceeded from GHC.IO.Exception +Alt from Data.Semigroup.Internal +Alt from Data.Semigroup.Internal +Alternative from GHC.Base +Any from Data.Semigroup.Internal +Any from Data.Semigroup.Internal +Ap from Data.Monoid +Ap from Data.Monoid +AppendMode from GHC.IO.IOMode +Applicative from GHC.Base +ArithException from GHC.Exception.Type +ArrayException from GHC.IO.Exception +AssertionFailed from GHC.IO.Exception +AssertionFailed from GHC.IO.Exception +Associativity from GHC.Generics +Async from Control.Concurrent.Async +AsyncException from GHC.IO.Exception +Bifunctor from Data.Bifunctor +Bits from Data.Bits +BlockedIndefinitelyOnMVar from GHC.IO.Exception +BlockedIndefinitelyOnMVar from GHC.IO.Exception +BlockedIndefinitelyOnSTM from GHC.IO.Exception +BlockedIndefinitelyOnSTM from GHC.IO.Exception +Bool from GHC.Types +Bounded from GHC.Enum +ByteString from Data.ByteString.Internal +C1 from GHC.Generics +CallStack from GHC.Stack.Types +Chan from Control.Concurrent.Chan +Char from GHC.Types +CmpNat from GHC.TypeNats +Coercible from GHC.Types +Coercion from Data.Type.Coercion +Coercion from Data.Type.Coercion +Comp1 from GHC.Generics +CompactionFailed from GHC.IO.Exception +CompactionFailed from GHC.IO.Exception +Complex from Data.Complex +Concurrently from Control.Concurrent.Async +Concurrently from Control.Concurrent.Async +Const from Data.Functor.Const +Const from Data.Functor.Const +Constraint from GHC.Types +Constructor from GHC.Generics +D# from GHC.Types +D1 from GHC.Generics +Datatype from GHC.Generics +Deadlock from GHC.IO.Exception +Deadlock from GHC.IO.Exception +Denormal from GHC.Exception.Type +DivideByZero from GHC.Exception.Type +Double from GHC.Types +Down from Data.Ord +Down from Data.Ord +Dual from Data.Semigroup.Internal +Dual from Data.Semigroup.Internal +EQ from GHC.Types +Either from Data.Either +Endo from Data.Semigroup.Internal +Endo from Data.Semigroup.Internal +Enum from GHC.Enum +Eq from GHC.Classes +ErrorCall from GHC.Exception +ErrorCall from GHC.Exception +ErrorCallWithLocation from GHC.Exception +Except from Control.Monad.Trans.Except +ExceptT from Control.Monad.Trans.Except +ExceptT from Control.Monad.Trans.Except +Exception from GHC.Exception.Type +ExitCode from GHC.IO.Exception +ExitFailure from GHC.IO.Exception +ExitSuccess from GHC.IO.Exception +F# from GHC.Types +False from GHC.Types +FatalError from Protolude.Panic +FatalError from Protolude.Panic +FilePath from GHC.IO +FiniteBits from Data.Bits +First from Data.Monoid +First from Data.Monoid +Fixity from GHC.Generics +FixityI from GHC.Generics +Float from GHC.Types +Floating from GHC.Float +Foldable from Data.Foldable +Fractional from GHC.Real +FunPtr from GHC.Ptr +Functor from GHC.Base +GT from GHC.Types +Generic from GHC.Generics +Generic1 from GHC.Generics +Handle from GHC.IO.Handle.Types +HasCallStack from GHC.Stack.Types +HasField from GHC.Records +Hashable from Data.Hashable.Class +HeapOverflow from GHC.IO.Exception +IO from GHC.Types +IOException from GHC.IO.Exception +IOMode from GHC.IO.IOMode +Identity from Data.Functor.Identity +Identity from Data.Functor.Identity +IndexOutOfBounds from GHC.IO.Exception +Infix from GHC.Generics +InfixI from GHC.Generics +Int from GHC.Types +Int16 from GHC.Int +Int32 from GHC.Int +Int64 from GHC.Int +Int8 from GHC.Int +IntMap from Data.IntMap.Internal +IntPtr from Foreign.Ptr +IntSet from Data.IntSet.Internal +Integer from GHC.Integer.Type +Integral from GHC.Real +IsLabel from GHC.OverloadedLabels +IsString from Data.String +Just from GHC.Maybe +K1 from GHC.Generics +K1 from GHC.Generics +KnownNat from GHC.TypeNats +KnownSymbol from GHC.TypeLits +L1 from GHC.Generics +LByteString from Protolude +LT from GHC.Types +LText from Protolude +Last from Data.Monoid +Last from Data.Monoid +Left from Data.Either +LeftAssociative from GHC.Generics +Leniency from Protolude.Conv +Lenient from Protolude.Conv +Location from GHC.ExecutionStack.Internal +Location from GHC.ExecutionStack.Internal +LossOfPrecision from GHC.Exception.Type +M1 from GHC.Generics +M1 from GHC.Generics +MVar from GHC.MVar +Map from Data.Map.Internal +MaskedInterruptible from GHC.IO +MaskedUninterruptible from GHC.IO +MaskingState from GHC.IO +Maybe from GHC.Maybe +Meta from GHC.Generics +MetaCons from GHC.Generics +MetaData from GHC.Generics +MetaSel from GHC.Generics +Monad from GHC.Base +MonadError from Control.Monad.Error.Class +MonadIO from Control.Monad.IO.Class +MonadPlus from GHC.Base +MonadReader from Control.Monad.Reader.Class +MonadState from Control.Monad.State.Class +Monoid from GHC.Base +NFData from Control.DeepSeq +Nat from GHC.Types +NestedAtomically from Control.Exception.Base +NestedAtomically from Control.Exception.Base +NoMethodError from Control.Exception.Base +NoMethodError from Control.Exception.Base +NonEmpty from GHC.Base +NonTermination from Control.Exception.Base +NonTermination from Control.Exception.Base +NotAssociative from GHC.Generics +Nothing from GHC.Maybe +Num from GHC.Num +OnDecodeError from Data.Text.Encoding.Error +OnError from Data.Text.Encoding.Error +Option from Data.Semigroup +Option from Data.Semigroup +Ord from GHC.Classes +Ordering from GHC.Types +Overflow from GHC.Exception.Type +PatternMatchFail from Control.Exception.Base +PatternMatchFail from Control.Exception.Base +Prefix from GHC.Generics +PrefixI from GHC.Generics +Print from Protolude.Show +Product from Data.Semigroup.Internal +Product from Data.Semigroup.Internal +Proxy from Data.Proxy +Proxy from Data.Proxy +Ptr from GHC.Ptr +QSem from Control.Concurrent.QSem +QSemN from Control.Concurrent.QSemN +R1 from GHC.Generics +Ratio from GHC.Real +RatioZeroDenominator from GHC.Exception.Type +Rational from GHC.Real +Read from GHC.Read +ReadMode from GHC.IO.IOMode +ReadWriteMode from GHC.IO.IOMode +Reader from Control.Monad.Trans.Reader +ReaderT from Control.Monad.Trans.Reader +ReaderT from Control.Monad.Trans.Reader +Real from GHC.Real +RealFloat from GHC.Float +RealFrac from GHC.Real +Rec0 from GHC.Generics +RecConError from Control.Exception.Base +RecConError from Control.Exception.Base +RecSelError from Control.Exception.Base +RecSelError from Control.Exception.Base +RecUpdError from Control.Exception.Base +RecUpdError from Control.Exception.Base +Refl from Data.Type.Equality +Rep from GHC.Generics +Right from Data.Either +RightAssociative from GHC.Generics +S1 from GHC.Generics +ST from GHC.ST +STM from GHC.Conc.Sync +Selector from GHC.Generics +Semigroup from GHC.Base +Semiring from Protolude.Semiring +Seq from Data.Sequence.Internal +Set from Data.Set.Internal +Show from GHC.Show +SomeAsyncException from GHC.IO.Exception +SomeAsyncException from GHC.IO.Exception +SomeException from GHC.Exception.Type +SomeException from GHC.Exception.Type +SomeNat from GHC.TypeNats +SomeNat from GHC.TypeNats +SomeSymbol from GHC.TypeLits +SomeSymbol from GHC.TypeLits +SrcLoc from GHC.ExecutionStack.Internal +SrcLoc from GHC.ExecutionStack.Internal +StablePtr from GHC.Stable +StackOverflow from GHC.IO.Exception +State from Control.Monad.Trans.State.Lazy +StateT from Control.Monad.Trans.State.Lazy +StateT from Control.Monad.Trans.State.Lazy +StaticPtr from GHC.StaticPtr +Storable from Foreign.Storable +Strict from Protolude.Conv +StringConv from Protolude.Conv +Sum from Data.Semigroup.Internal +Sum from Data.Semigroup.Internal +Symbol from GHC.Types +Text from Data.Text.Internal +ThreadId from GHC.Conc.Sync +ThreadKilled from GHC.IO.Exception +Traversable from Data.Traversable +True from GHC.Types +Type from GHC.Types +TypeError from Control.Exception.Base +TypeError from Control.Exception.Base +TypeRep from Data.Typeable +Typeable from Data.Typeable.Internal +U1 from GHC.Generics +U1 from GHC.Generics +URec from GHC.Generics +UndefinedElement from GHC.IO.Exception +Underflow from GHC.Exception.Type +UnicodeException from Data.Text.Encoding.Error +Unmasked from GHC.IO +UserInterrupt from GHC.IO.Exception +V1 from GHC.Generics +Void from Data.Void +Word from GHC.Types +Word16 from GHC.Word +Word32 from GHC.Word +Word64 from GHC.Word +Word8 from GHC.Word +WordPtr from Foreign.Ptr +WrappedMonoid from Data.Semigroup +WriteMode from GHC.IO.IOMode +ZipList from Control.Applicative +ZipList from Control.Applicative +^ from GHC.Real +^%^ from GHC.Real +^^ from GHC.Real +^^%^^ from GHC.Real +abs from GHC.Num +absurd from Data.Void +acos from GHC.Float +acosh from GHC.Float +addMVarFinalizer from Control.Concurrent.MVar +all from Data.Foldable +allowInterrupt from Control.Exception +and from Data.Foldable +any from Data.Foldable +ap from GHC.Base +appEndo from Data.Semigroup.Internal +appendFile from Data.Text.IO +applyN from Protolude +asTypeOf from GHC.Base +asin from GHC.Float +asinh from GHC.Float +ask from Control.Monad.Reader.Class +asks from Control.Monad.Reader.Class +asum from Data.Foldable +async from Control.Concurrent.Async +asyncBound from Control.Concurrent.Async +asyncExceptionFromException from GHC.IO.Exception +asyncExceptionToException from GHC.IO.Exception +asyncOn from Control.Concurrent.Async +asyncThreadId from Control.Concurrent.Async +atDef from Protolude.Safe +atMay from Protolude.Safe +atan from GHC.Float +atan2 from GHC.Float +atanh from GHC.Float +atomically from GHC.Conc.Sync +bimap from Data.Bifunctor +bit from Data.Bits +bitDefault from Data.Bits +bitSize from Data.Bits +bitSizeMaybe from Data.Bits +bool from Protolude.Bool +boundedEnumFrom from GHC.Enum +boundedEnumFromThen from GHC.Enum +bracket from Control.Exception.Base +bracketOnError from Control.Exception.Base +bracket_ from Control.Exception.Base +break from GHC.List +byteSwap16 from GHC.Word +byteSwap32 from GHC.Word +byteSwap64 from GHC.Word +callStack from GHC.Stack +cancel from Control.Concurrent.Async +cancelWith from Control.Concurrent.Async +cast from Data.Typeable +castWith from Data.Type.Equality +catMaybes from Data.Maybe +catch from GHC.IO +catchE from Control.Monad.Trans.Except +catchError from Control.Monad.Error.Class +catchJust from Control.Exception.Base +catchSTM from GHC.Conc.Sync +catches from Control.Exception +ceiling from GHC.Real +check from Control.Monad.STM +chr from GHC.Char +cis from Data.Complex +clearBit from Data.Bits +coerceWith from Data.Type.Coercion +compare from GHC.Classes +comparing from Data.Ord +complement from Data.Bits +complementBit from Data.Bits +conFixity from GHC.Generics +conIsRecord from GHC.Generics +conName from GHC.Generics +concat from Data.Foldable +concatMap from Data.Foldable +concatMapM from Protolude.Monad +concurrently from Control.Concurrent.Async +conjugate from Data.Complex +const from GHC.Base +cos from GHC.Float +cosh from GHC.Float +countLeadingZeros from Data.Bits +countTrailingZeros from Data.Bits +currentCallStack from GHC.Stack.CCS +curry from Data.Tuple +cycle from GHC.List +cycle1 from Data.Semigroup +datatypeName from GHC.Generics +decodeFloat from GHC.Float +decodeUtf8 from Data.Text.Encoding +decodeUtf8' from Data.Text.Encoding +decodeUtf8With from Data.Text.Encoding +deepseq from Control.DeepSeq +denominator from GHC.Real +die from Protolude +diff from Data.Semigroup +displayException from GHC.Exception.Type +div from GHC.Real +divMod from GHC.Real +divZeroError from GHC.Real +drop from GHC.List +dropWhile from GHC.List +dupChan from Control.Concurrent.Chan +either from Data.Either +eitherA from Protolude.Applicative +elem from Data.Foldable +empty from GHC.Base +encodeFloat from GHC.Float +encodeUtf8 from Data.Text.Encoding +enumFrom from GHC.Enum +enumFromThen from GHC.Enum +enumFromThenTo from GHC.Enum +enumFromTo from GHC.Enum +eqT from Data.Typeable +evalState from Control.Monad.Trans.State.Lazy +evalStateT from Control.Monad.Trans.State.Lazy +evaluate from GHC.IO +even from GHC.Real +execState from Control.Monad.Trans.State.Lazy +execStateT from Control.Monad.Trans.State.Lazy +exitFailure from System.Exit +exitSuccess from System.Exit +exitWith from System.Exit +exp from GHC.Float +expm1 from GHC.Float +exponent from GHC.Float +fatalErrorMessage from Protolude.Panic +filter from GHC.List +filterM from Control.Monad +finally from Control.Exception.Base +find from Data.Foldable +finiteBitSize from Data.Bits +first from Data.Bifunctor +fix from Data.Function +fixST from Control.Monad.ST.Imp +flip from GHC.Base +floatDigits from GHC.Float +floatRadix from GHC.Float +floatRange from GHC.Float +floor from GHC.Real +fmap from GHC.Base +fmapDefault from Data.Traversable +fold from Data.Foldable +foldM from Control.Monad +foldM_ from Control.Monad +foldMap from Data.Foldable +foldMapDefault from Data.Traversable +foldl from Data.Foldable +foldl' from Data.Foldable +foldl1May from Protolude.Safe +foldl1May' from Protolude.Safe +foldlM from Data.Foldable +foldr from Data.Foldable +foldr' from Data.Foldable +foldr1May from Protolude.Safe +foldrM from Data.Foldable +for from Data.Traversable +forM from Data.Traversable +forM_ from Data.Foldable +for_ from Data.Foldable +force from Control.DeepSeq +foreach from Protolude.Functor +forever from Control.Monad +forkFinally from Control.Concurrent +forkIO from GHC.Conc.Sync +forkIOWithUnmask from GHC.Conc.Sync +forkOS from Control.Concurrent +forkOSWithUnmask from Control.Concurrent +forkOn from GHC.Conc.Sync +forkOnWithUnmask from GHC.Conc.Sync +from from GHC.Generics +fromEnum from GHC.Enum +fromException from GHC.Exception.Type +fromInteger from GHC.Num +fromIntegral from GHC.Real +fromLabel from GHC.OverloadedLabels +fromLeft from Data.Either +fromMaybe from Data.Maybe +fromRational from GHC.Real +fromRight from Data.Either +fromStrict from Data.Text.Lazy +fst from Data.Tuple +functionName from GHC.ExecutionStack.Internal +gcastWith from Data.Type.Equality +gcd from GHC.Real +gcdInt' from GHC.Real +gcdWord' from GHC.Real +genericDrop from Data.OldList +genericLength from Data.OldList +genericReplicate from Data.OldList +genericSplitAt from Data.OldList +genericTake from Data.OldList +get from Control.Monad.State.Class +getAll from Data.Semigroup.Internal +getAlt from Data.Semigroup.Internal +getAny from Data.Semigroup.Internal +getAp from Data.Monoid +getArgs from System.Environment +getCallStack from GHC.Stack.Types +getChanContents from Control.Concurrent.Chan +getConst from Data.Functor.Const +getContents from Data.Text.IO +getDual from Data.Semigroup.Internal +getField from GHC.Records +getFirst from Data.Monoid +getLast from Data.Monoid +getLine from Data.Text.IO +getMaskingState from GHC.IO +getNumCapabilities from GHC.Conc.Sync +getOption from Data.Semigroup +getProduct from Data.Semigroup.Internal +getStackTrace from GHC.ExecutionStack +getSum from Data.Semigroup.Internal +getZipList from Control.Applicative +gets from Control.Monad.State.Class +group from Data.OldList +groupBy from Data.OldList +guard from Control.Monad +guardM from Protolude.Bool +guarded from Protolude +guardedA from Protolude +hPutStr from Protolude.Show +hPutStrLn from Protolude.Show +handle from Control.Exception.Base +handleJust from Control.Exception.Base +hash from Data.Hashable.Class +hashUsing from Data.Hashable.Class +hashWithSalt from Data.Hashable.Class +head from Protolude.List +headDef from Protolude.Safe +headMay from Protolude.Safe +hush from Protolude.Exceptions +identity from Protolude +ifM from Protolude.Bool +ignore from Data.Text.Encoding.Error +imagPart from Data.Complex +infinity from GHC.Real +initDef from Protolude.Safe +initMay from Protolude.Safe +initSafe from Protolude.Safe +inits from Data.OldList +integralEnumFrom from GHC.Real +integralEnumFromThen from GHC.Real +integralEnumFromThenTo from GHC.Real +integralEnumFromTo from GHC.Real +interact from Data.Text.IO +intercalate from Data.OldList +interruptible from GHC.IO +intersperse from Data.OldList +ioError from GHC.IO.Exception +isCurrentThreadBound from Control.Concurrent +isDenormalized from GHC.Float +isEmptyMVar from GHC.MVar +isIEEE from GHC.Float +isInfinite from GHC.Float +isJust from Data.Maybe +isLeft from Data.Either +isNaN from GHC.Float +isNegativeZero from GHC.Float +isNewtype from GHC.Generics +isNothing from Data.Maybe +isPrefixOf from Data.OldList +isRight from Data.Either +isSigned from Data.Bits +iterate from GHC.List +join from GHC.Base +killThread from GHC.Conc.Sync +lastDef from Protolude.Safe +lastMay from Protolude.Safe +lcm from GHC.Real +leftToMaybe from Protolude.Either +lefts from Data.Either +length from Data.Foldable +lenientDecode from Data.Text.Encoding.Error +lift from Control.Monad.Trans.Class +liftA from GHC.Base +liftA2 from GHC.Base +liftA3 from GHC.Base +liftAA2 from Protolude.Applicative +liftIO from Control.Monad.IO.Class +liftIO1 from Protolude +liftIO2 from Protolude +liftM from GHC.Base +liftM' from Protolude.Monad +liftM2 from GHC.Base +liftM2' from Protolude.Monad +liftM3 from GHC.Base +liftM4 from GHC.Base +liftM5 from GHC.Base +lines from Data.Text +link from Control.Concurrent.Async +link2 from Control.Concurrent.Async +list from Protolude.List +listToMaybe from Data.Maybe +local from Control.Monad.Reader.Class +log from GHC.Float +log1mexp from GHC.Float +log1p from GHC.Float +log1pexp from GHC.Float +logBase from GHC.Float +magnitude from Data.Complex +many from GHC.Base +map from Protolude +mapAccumL from Data.Traversable +mapAccumR from Data.Traversable +mapAndUnzipM from Control.Monad +mapExcept from Control.Monad.Trans.Except +mapExceptT from Control.Monad.Trans.Except +mapException from Control.Exception.Base +mapM from Data.Traversable +mapM_ from Data.Foldable +mapMaybe from Data.Maybe +mappend from GHC.Base +mask from GHC.IO +mask_ from GHC.IO +max from GHC.Classes +maxBound from GHC.Enum +maxInt from GHC.Base +maximum from Data.Foldable +maximumBy from Data.Foldable +maximumDef from Protolude.Safe +maximumMay from Protolude.Safe +maybe from Data.Maybe +maybeEmpty from Protolude.Either +maybeToEither from Protolude.Either +maybeToLeft from Protolude.Either +maybeToList from Data.Maybe +maybeToRight from Protolude.Either +mconcat from GHC.Base +mempty from GHC.Base +mfilter from Control.Monad +min from GHC.Classes +minBound from GHC.Enum +minInt from GHC.Base +minimum from Data.Foldable +minimumBy from Data.Foldable +minimumDef from Protolude.Safe +minimumMay from Protolude.Safe +mkPolar from Data.Complex +mkWeakMVar from Control.Concurrent.MVar +mkWeakThreadId from GHC.Conc.Sync +mod from GHC.Real +modify from Control.Monad.State.Class +modifyMVar from Control.Concurrent.MVar +modifyMVarMasked from Control.Concurrent.MVar +modifyMVarMasked_ from Control.Concurrent.MVar +modifyMVar_ from Control.Concurrent.MVar +moduleName from GHC.Generics +mplus from GHC.Base +msum from Data.Foldable +mtimesDefault from Data.Semigroup +myThreadId from GHC.Conc.Sync +mzero from GHC.Base +natVal from GHC.TypeLits +negate from GHC.Num +newChan from Control.Concurrent.Chan +newEmptyMVar from GHC.MVar +newMVar from GHC.MVar +newQSem from Control.Concurrent.QSem +newQSemN from Control.Concurrent.QSemN +nonEmpty from Data.List.NonEmpty +not from GHC.Classes +notANumber from GHC.Real +notElem from Data.Foldable +notImplemented from Debug +note from Protolude.Exceptions +null from Data.Foldable +numerator from GHC.Real +numericEnumFrom from GHC.Real +numericEnumFromThen from GHC.Real +numericEnumFromThenTo from GHC.Real +numericEnumFromTo from GHC.Real +objectName from GHC.ExecutionStack.Internal +odd from GHC.Real +on from Data.Function +onException from Control.Exception.Base +one from Protolude.Semiring +openFile from GHC.IO.Handle.FD +option from Data.Semigroup +optional from Control.Applicative +or from Data.Foldable +orAlt from Protolude.Applicative +orElse from GHC.Conc.Sync +orEmpty from Protolude.Applicative +ord from GHC.Base +ordNub from Protolude.List +otherwise from GHC.Base +overflowError from GHC.Real +packageName from GHC.Generics +panic from Protolude.Panic +partitionEithers from Data.Either +pass from Protolude +permutations from Data.OldList +phase from Data.Complex +pi from GHC.Float +polar from Data.Complex +poll from Control.Concurrent.Async +popCount from Data.Bits +popCountDefault from Data.Bits +pred from GHC.Enum +prettyCallStack from GHC.Exception +prettySrcLoc from GHC.Exception +print from Protolude +product from Protolude.List +properFraction from GHC.Real +pure from GHC.Base +purer from Protolude.Applicative +put from Control.Monad.State.Class +putByteString from Protolude.Show +putErrLn from Protolude.Show +putErrText from Protolude.Show +putLByteString from Protolude.Show +putLText from Protolude.Show +putMVar from GHC.MVar +putStr from Protolude.Show +putStrLn from Protolude.Show +putText from Protolude.Show +quot from GHC.Real +quotRem from GHC.Real +race from Control.Concurrent.Async +race_ from Control.Concurrent.Async +ratioPrec from GHC.Real +ratioPrec1 from GHC.Real +ratioZeroDenominatorError from GHC.Real +readChan from Control.Concurrent.Chan +readEither from Text.Read +readFile from Data.Text.IO +readMVar from GHC.MVar +readMaybe from Text.Read +reader from Control.Monad.Reader.Class +reads from Text.Read +realPart from Data.Complex +realToFrac from GHC.Real +recip from GHC.Real +reduce from GHC.Real +rem from GHC.Real +repeat from GHC.List +replace from Data.Text.Encoding.Error +replicate from GHC.List +replicateM from Control.Monad +replicateM_ from Control.Monad +repr from Data.Type.Coercion +retry from GHC.Conc.Sync +return from GHC.Base +reverse from GHC.List +rightToMaybe from Protolude.Either +rights from Data.Either +rnf from Control.DeepSeq +rotate from Data.Bits +rotateL from Data.Bits +rotateR from Data.Bits +round from GHC.Real +rtsSupportsBoundThreads from Control.Concurrent +runConcurrently from Control.Concurrent.Async +runExcept from Control.Monad.Trans.Except +runExceptT from Control.Monad.Trans.Except +runIdentity from Data.Functor.Identity +runInBoundThread from Control.Concurrent +runInUnboundThread from Control.Concurrent +runReader from Control.Monad.Trans.Reader +runReaderT from Control.Monad.Trans.Reader +runST from GHC.ST +runState from Control.Monad.Trans.State.Lazy +runStateT from Control.Monad.Trans.State.Lazy +scaleFloat from GHC.Float +scanl from GHC.List +scanl' from GHC.List +scanr from GHC.List +sconcat from GHC.Base +second from Data.Bifunctor +selDecidedStrictness from GHC.Generics +selName from GHC.Generics +selSourceStrictness from GHC.Generics +selSourceUnpackedness from GHC.Generics +seq from GHC.Prim +sequence from Data.Traversable +sequenceA from Data.Traversable +sequenceA_ from Data.Foldable +sequence_ from Data.Foldable +setBit from Data.Bits +setNumCapabilities from GHC.Conc.Sync +shift from Data.Bits +shiftL from Data.Bits +shiftR from Data.Bits +show from Protolude +showStackTrace from GHC.ExecutionStack +signalQSem from Control.Concurrent.QSem +signalQSemN from Control.Concurrent.QSemN +significand from GHC.Float +signum from GHC.Num +sin from GHC.Float +sinh from GHC.Float +snd from Data.Tuple +some from GHC.Base +someNatVal from GHC.TypeLits +someSymbolVal from GHC.TypeLits +sort from Data.OldList +sortBy from Data.OldList +sortOn from Protolude.List +sourceColumn from GHC.ExecutionStack.Internal +sourceFile from GHC.ExecutionStack.Internal +sourceLine from GHC.ExecutionStack.Internal +splitAt from GHC.List +sqrt from GHC.Float +srcLoc from GHC.ExecutionStack.Internal +state from Control.Monad.State.Class +stderr from GHC.IO.Handle.FD +stdin from GHC.IO.Handle.FD +stdout from GHC.IO.Handle.FD +stimes from GHC.Base +stimesIdempotent from Data.Semigroup.Internal +stimesIdempotentMonoid from Data.Semigroup.Internal +stimesMonoid from Data.Semigroup.Internal +strConv from Protolude.Conv +strictDecode from Data.Text.Encoding.Error +subsequences from Data.OldList +subtract from GHC.Num +succ from GHC.Enum +sum from Protolude.List +swap from Data.Tuple +swapMVar from Control.Concurrent.MVar +sym from Data.Type.Equality +symbolVal from GHC.TypeLits +tailDef from Protolude.Safe +tailMay from Protolude.Safe +tailSafe from Protolude.Safe +tails from Data.OldList +take from GHC.List +takeMVar from GHC.MVar +takeWhile from GHC.List +tan from GHC.Float +tanh from GHC.Float +testBit from Data.Bits +testBitDefault from Data.Bits +threadCapability from GHC.Conc.Sync +threadDelay from GHC.Conc.IO +threadWaitRead from Control.Concurrent +threadWaitReadSTM from Control.Concurrent +threadWaitWrite from Control.Concurrent +threadWaitWriteSTM from Control.Concurrent +throwE from Control.Monad.Trans.Except +throwError from Control.Monad.Error.Class +throwIO from Protolude +throwSTM from GHC.Conc.Sync +throwTo from Protolude +to from GHC.Generics +toEnum from GHC.Enum +toException from GHC.Exception.Type +toInteger from GHC.Real +toIntegralSized from Data.Bits +toList from Data.Foldable +toRational from GHC.Real +toS from Protolude.Conv +toSL from Protolude.Conv +toStrict from Data.Text.Lazy +trace from Debug +traceIO from Debug +traceId from Debug +traceM from Debug +traceShow from Debug +traceShowId from Debug +traceShowM from Debug +trans from Data.Type.Equality +transpose from Data.OldList +traverse from Data.Traversable +traverse_ from Data.Foldable +truncate from GHC.Real +try from Control.Exception.Base +tryIO from Protolude.Exceptions +tryJust from Control.Exception.Base +tryPutMVar from GHC.MVar +tryReadMVar from GHC.MVar +tryTakeMVar from GHC.MVar +typeRep from Data.Typeable +unComp1 from GHC.Generics +unK1 from GHC.Generics +unM1 from GHC.Generics +uncons from Protolude +uncurry from Data.Tuple +undefined from Debug +underflowError from GHC.Real +unfoldr from Data.OldList +uninterruptibleMask from GHC.IO +uninterruptibleMask_ from GHC.IO +unless from Control.Monad +unlessM from Protolude.Bool +unlines from Data.Text +unsnoc from Protolude +until from GHC.Base +unwords from Data.Text +unzip from GHC.List +vacuous from Data.Void +void from Data.Functor +wait from Control.Concurrent.Async +waitAny from Control.Concurrent.Async +waitAnyCancel from Control.Concurrent.Async +waitAnyCatch from Control.Concurrent.Async +waitAnyCatchCancel from Control.Concurrent.Async +waitBoth from Control.Concurrent.Async +waitCatch from Control.Concurrent.Async +waitEither from Control.Concurrent.Async +waitEitherCancel from Control.Concurrent.Async +waitEitherCatch from Control.Concurrent.Async +waitEitherCatchCancel from Control.Concurrent.Async +waitEither_ from Control.Concurrent.Async +waitQSem from Control.Concurrent.QSem +waitQSemN from Control.Concurrent.QSemN +when from GHC.Base +whenM from Protolude.Bool +withAsync from Control.Concurrent.Async +withAsyncBound from Control.Concurrent.Async +withAsyncOn from Control.Concurrent.Async +withExcept from Control.Monad.Trans.Except +withExceptT from Control.Monad.Trans.Except +withFile from System.IO +withFrozenCallStack from GHC.Stack +withMVar from Control.Concurrent.MVar +withMVarMasked from Control.Concurrent.MVar +withState from Control.Monad.Trans.State.Lazy +witness from Debug +words from Data.Text +writeChan from Control.Concurrent.Chan +writeFile from Data.Text.IO +writeList2Chan from Control.Concurrent.Chan +xor from Data.Bits +zero from Protolude.Semiring +zeroBits from Data.Bits +zip from GHC.List +zipWith from GHC.List +zipWithM from Control.Monad +zipWithM_ from Control.Monad +|| from GHC.Classes +||^ from Protolude.Bool diff --git a/export_lists/protolude-4.exports b/export_lists/protolude-4.exports new file mode 100644 index 0000000000..e69de29bb2 diff --git a/export_lists/protolude-5.exports b/export_lists/protolude-5.exports new file mode 100644 index 0000000000..e69de29bb2 diff --git a/export_lists/protolude-6.exports b/export_lists/protolude-6.exports new file mode 100644 index 0000000000..e69de29bb2 diff --git a/export_lists/protolude-7.exports b/export_lists/protolude-7.exports new file mode 100644 index 0000000000..290867e688 --- /dev/null +++ b/export_lists/protolude-7.exports @@ -0,0 +1,956 @@ +$ from GHC.Base +$! from Protolude.Base +$!! from Control.DeepSeq +$> from Data.Functor +% from GHC.Real +& from Data.Function +&& from GHC.Classes +&&^ from Protolude.Bool +* from GHC.Num +* from GHC.Types +** from GHC.Float +*> from GHC.Base ++ from GHC.Num +++ from GHC.Base +- from GHC.Num +. from GHC.Base +.&. from Data.Bits +.|. from Data.Bits +/ from GHC.Real +/= from GHC.Classes +:% from GHC.Real +:*: from GHC.Generics +:*: from GHC.Generics +:+ from Data.Complex +:+: from GHC.Generics +:.: from GHC.Generics +:| from Data.List.NonEmpty +:~: from Data.Type.Equality +< from GHC.Classes +<$ from GHC.Base +<$!> from Control.Monad +<$> from Data.Functor +<&&> from Protolude.Bool +<&> from Protolude.Functor +<* from GHC.Base +<**> from GHC.Base +<*> from GHC.Base +<.> from Protolude.Semiring +<<$>> from Protolude.Functor +<<*>> from Protolude.Applicative +<= from GHC.Classes +<=< from Control.Monad +<> from Data.Monoid +<|> from GHC.Base +<||> from Protolude.Bool +=<< from GHC.Base +== from GHC.Classes +== from Data.Type.Equality +> from GHC.Classes +>= from GHC.Classes +>=> from Control.Monad +>> from GHC.Base +>>= from GHC.Base +All from Data.Monoid +All from Data.Monoid +AllocationLimitExceeded from GHC.IO.Exception +AllocationLimitExceeded from GHC.IO.Exception +Alt from Data.Monoid +Alt from Data.Monoid +Alternative from GHC.Base +Any from Data.Monoid +Any from Data.Monoid +AppendMode from GHC.IO.IOMode +Applicative from GHC.Base +ArithException from GHC.Exception +ArrayException from GHC.IO.Exception +AssertionFailed from GHC.IO.Exception +AssertionFailed from GHC.IO.Exception +Associativity from GHC.Generics +Async from Control.Concurrent.Async +AsyncException from GHC.IO.Exception +Bifunctor from Data.Bifunctor +Bits from Data.Bits +BlockedIndefinitelyOnMVar from GHC.IO.Exception +BlockedIndefinitelyOnMVar from GHC.IO.Exception +BlockedIndefinitelyOnSTM from GHC.IO.Exception +BlockedIndefinitelyOnSTM from GHC.IO.Exception +Bool from GHC.Types +Bounded from GHC.Enum +ByteString from Data.ByteString.Internal +C1 from GHC.Generics +CallStack from GHC.Stack.Types +Chan from Control.Concurrent.Chan +Char from GHC.Types +CmpNat from GHC.TypeLits +Coercible from GHC.Types +Coercion from Data.Type.Coercion +Coercion from Data.Type.Coercion +Comp1 from GHC.Generics +Complex from Data.Complex +Concurrently from Control.Concurrent.Async +Concurrently from Control.Concurrent.Async +Const from Data.Functor.Const +Const from Data.Functor.Const +Constraint from GHC.Types +Constructor from GHC.Generics +D# from GHC.Types +D1 from GHC.Generics +Datatype from GHC.Generics +Deadlock from GHC.IO.Exception +Deadlock from GHC.IO.Exception +Denormal from GHC.Exception +DivideByZero from GHC.Exception +Double from GHC.Types +Down from Data.Ord +Down from Data.Ord +Dual from Data.Monoid +Dual from Data.Monoid +EQ from GHC.Types +Either from Data.Either +Endo from Data.Monoid +Endo from Data.Monoid +Enum from GHC.Enum +Eq from GHC.Classes +ErrorCall from GHC.Exception +ErrorCall from GHC.Exception +ErrorCallWithLocation from GHC.Exception +Except from Control.Monad.Trans.Except +ExceptT from Control.Monad.Trans.Except +ExceptT from Control.Monad.Trans.Except +Exception from GHC.Exception +ExitCode from GHC.IO.Exception +ExitFailure from GHC.IO.Exception +ExitSuccess from GHC.IO.Exception +F# from GHC.Types +False from GHC.Types +FatalError from Protolude.Panic +FatalError from Protolude.Panic +FilePath from GHC.IO +FiniteBits from Data.Bits +First from Data.Monoid +First from Data.Monoid +Fixity from GHC.Generics +FixityI from GHC.Generics +Float from GHC.Types +Floating from GHC.Float +Foldable from Data.Foldable +Fractional from GHC.Real +FunPtr from GHC.Ptr +Functor from GHC.Base +GT from GHC.Types +Generic from GHC.Generics +Generic1 from GHC.Generics +Handle from GHC.IO.Handle.Types +HasCallStack from GHC.Stack.Types +Hashable from Data.Hashable.Class +HeapOverflow from GHC.IO.Exception +IO from GHC.Types +IOException from GHC.IO.Exception +IOMode from GHC.IO.IOMode +Identity from Data.Functor.Identity +Identity from Data.Functor.Identity +IndexOutOfBounds from GHC.IO.Exception +Infix from GHC.Generics +InfixI from GHC.Generics +Int from GHC.Types +Int16 from GHC.Int +Int32 from GHC.Int +Int64 from GHC.Int +Int8 from GHC.Int +IntMap from Data.IntMap.Base +IntPtr from Foreign.Ptr +IntSet from Data.IntSet.Base +Integer from GHC.Integer.Type +Integral from GHC.Real +IsLabel from GHC.OverloadedLabels +IsString from Data.String +Just from GHC.Base +K1 from GHC.Generics +K1 from GHC.Generics +KnownNat from GHC.TypeLits +KnownSymbol from GHC.TypeLits +L1 from GHC.Generics +LByteString from Protolude +LT from GHC.Types +LText from Protolude +Last from Data.Monoid +Last from Data.Monoid +Left from Data.Either +LeftAssociative from GHC.Generics +Leniency from Protolude.Conv +Lenient from Protolude.Conv +Location from GHC.ExecutionStack.Internal +Location from GHC.ExecutionStack.Internal +LossOfPrecision from GHC.Exception +M1 from GHC.Generics +M1 from GHC.Generics +MVar from GHC.MVar +Map from Data.Map.Base +MaskedInterruptible from GHC.IO +MaskedUninterruptible from GHC.IO +MaskingState from GHC.IO +Maybe from GHC.Base +Meta from GHC.Generics +MetaCons from GHC.Generics +MetaData from GHC.Generics +MetaSel from GHC.Generics +Monad from GHC.Base +MonadError from Control.Monad.Error.Class +MonadIO from Control.Monad.IO.Class +MonadPlus from GHC.Base +MonadReader from Control.Monad.Reader.Class +MonadState from Control.Monad.State.Class +Monoid from GHC.Base +NFData from Control.DeepSeq +Nat from GHC.Types +NestedAtomically from Control.Exception.Base +NestedAtomically from Control.Exception.Base +NoMethodError from Control.Exception.Base +NoMethodError from Control.Exception.Base +NonEmpty from Data.List.NonEmpty +NonTermination from Control.Exception.Base +NonTermination from Control.Exception.Base +NotAssociative from GHC.Generics +Nothing from GHC.Base +Num from GHC.Num +OnDecodeError from Data.Text.Encoding.Error +OnError from Data.Text.Encoding.Error +Option from Data.Semigroup +Option from Data.Semigroup +Ord from GHC.Classes +Ordering from GHC.Types +Overflow from GHC.Exception +PatternMatchFail from Control.Exception.Base +PatternMatchFail from Control.Exception.Base +Prefix from GHC.Generics +PrefixI from GHC.Generics +Print from Protolude.Show +Product from Data.Monoid +Product from Data.Monoid +Proxy from Data.Proxy +Proxy from Data.Proxy +Ptr from GHC.Ptr +QSem from Control.Concurrent.QSem +QSemN from Control.Concurrent.QSemN +R1 from GHC.Generics +Ratio from GHC.Real +RatioZeroDenominator from GHC.Exception +Rational from GHC.Real +Read from GHC.Read +ReadMode from GHC.IO.IOMode +ReadWriteMode from GHC.IO.IOMode +Reader from Control.Monad.Trans.Reader +ReaderT from Control.Monad.Trans.Reader +ReaderT from Control.Monad.Trans.Reader +Real from GHC.Real +RealFloat from GHC.Float +RealFrac from GHC.Real +Rec0 from GHC.Generics +RecConError from Control.Exception.Base +RecConError from Control.Exception.Base +RecSelError from Control.Exception.Base +RecSelError from Control.Exception.Base +RecUpdError from Control.Exception.Base +RecUpdError from Control.Exception.Base +Refl from Data.Type.Equality +Rep from GHC.Generics +Right from Data.Either +RightAssociative from GHC.Generics +S1 from GHC.Generics +ST from GHC.ST +STM from GHC.Conc.Sync +Selector from GHC.Generics +Semigroup from Data.Semigroup +Semiring from Protolude.Semiring +Seq from Data.Sequence +Set from Data.Set.Base +Show from GHC.Show +SomeAsyncException from GHC.IO.Exception +SomeAsyncException from GHC.IO.Exception +SomeException from GHC.Exception +SomeException from GHC.Exception +SomeNat from GHC.TypeLits +SomeNat from GHC.TypeLits +SomeSymbol from GHC.TypeLits +SomeSymbol from GHC.TypeLits +SrcLoc from GHC.ExecutionStack.Internal +SrcLoc from GHC.ExecutionStack.Internal +StablePtr from GHC.Stable +StackOverflow from GHC.IO.Exception +State from Control.Monad.Trans.State.Lazy +StateT from Control.Monad.Trans.State.Lazy +StateT from Control.Monad.Trans.State.Lazy +StaticPtr from GHC.StaticPtr +Storable from Foreign.Storable +Strict from Protolude.Conv +StringConv from Protolude.Conv +Sum from Data.Monoid +Sum from Data.Monoid +Symbol from GHC.Types +Text from Data.Text.Internal +ThreadId from GHC.Conc.Sync +ThreadKilled from GHC.IO.Exception +Traversable from Data.Traversable +True from GHC.Types +Type from GHC.Types +TypeError from Control.Exception.Base +TypeError from Control.Exception.Base +TypeRep from Data.Typeable.Internal +Typeable from Data.Typeable.Internal +U1 from GHC.Generics +U1 from GHC.Generics +URec from GHC.Generics +UndefinedElement from GHC.IO.Exception +Underflow from GHC.Exception +UnicodeException from Data.Text.Encoding.Error +Unmasked from GHC.IO +UserInterrupt from GHC.IO.Exception +V1 from GHC.Generics +Void from Data.Void +Word from GHC.Types +Word16 from GHC.Word +Word32 from GHC.Word +Word64 from GHC.Word +Word8 from GHC.Word +WordPtr from Foreign.Ptr +WrappedMonoid from Data.Semigroup +WriteMode from GHC.IO.IOMode +ZipList from Control.Applicative +ZipList from Control.Applicative +^ from GHC.Real +^%^ from GHC.Real +^^ from GHC.Real +^^%^^ from GHC.Real +abs from GHC.Num +absurd from Data.Void +acos from GHC.Float +acosh from GHC.Float +addMVarFinalizer from Control.Concurrent.MVar +all from Data.Foldable +allowInterrupt from Control.Exception +always from GHC.Conc.Sync +alwaysSucceeds from GHC.Conc.Sync +and from Data.Foldable +any from Data.Foldable +ap from GHC.Base +appEndo from Data.Monoid +appendFile from Data.Text.IO +applyN from Protolude +asTypeOf from GHC.Base +asin from GHC.Float +asinh from GHC.Float +ask from Control.Monad.Reader.Class +asks from Control.Monad.Reader.Class +asum from Data.Foldable +async from Control.Concurrent.Async +asyncBound from Control.Concurrent.Async +asyncExceptionFromException from GHC.IO.Exception +asyncExceptionToException from GHC.IO.Exception +asyncOn from Control.Concurrent.Async +asyncThreadId from Control.Concurrent.Async +atDef from Protolude.Safe +atMay from Protolude.Safe +atan from GHC.Float +atan2 from GHC.Float +atanh from GHC.Float +atomically from GHC.Conc.Sync +bimap from Data.Bifunctor +bit from Data.Bits +bitDefault from Data.Bits +bitSize from Data.Bits +bitSizeMaybe from Data.Bits +bool from Protolude.Bool +boundedEnumFrom from GHC.Enum +boundedEnumFromThen from GHC.Enum +bracket from Control.Exception.Base +bracketOnError from Control.Exception.Base +bracket_ from Control.Exception.Base +break from GHC.List +byteSwap16 from GHC.Word +byteSwap32 from GHC.Word +byteSwap64 from GHC.Word +callStack from GHC.Stack +cancel from Control.Concurrent.Async +cancelWith from Control.Concurrent.Async +cast from Data.Typeable +castWith from Data.Type.Equality +catMaybes from Data.Maybe +catch from Control.Exception.Base +catchE from Control.Monad.Trans.Except +catchError from Control.Monad.Error.Class +catchJust from Control.Exception.Base +catchSTM from GHC.Conc.Sync +catches from Control.Exception +ceiling from GHC.Real +check from Control.Monad.STM +chr from GHC.Char +cis from Data.Complex +clearBit from Data.Bits +coerceWith from Data.Type.Coercion +compare from GHC.Classes +comparing from Data.Ord +complement from Data.Bits +complementBit from Data.Bits +conFixity from GHC.Generics +conIsRecord from GHC.Generics +conName from GHC.Generics +concat from Data.Foldable +concatMap from Data.Foldable +concatMapM from Protolude.Monad +concurrently from Control.Concurrent.Async +conjugate from Data.Complex +const from GHC.Base +cos from GHC.Float +cosh from GHC.Float +countLeadingZeros from Data.Bits +countTrailingZeros from Data.Bits +currentCallStack from GHC.Stack.CCS +curry from Data.Tuple +cycle from GHC.List +cycle1 from Data.Semigroup +datatypeName from GHC.Generics +decodeFloat from GHC.Float +decodeUtf8 from Data.Text.Encoding +decodeUtf8' from Data.Text.Encoding +decodeUtf8With from Data.Text.Encoding +deepseq from Control.DeepSeq +denominator from GHC.Real +die from Protolude +diff from Data.Semigroup +displayException from GHC.Exception +div from GHC.Real +divMod from GHC.Real +divZeroError from GHC.Real +drop from GHC.List +dropWhile from GHC.List +dupChan from Control.Concurrent.Chan +either from Data.Either +eitherA from Protolude.Applicative +elem from Data.Foldable +empty from GHC.Base +encodeFloat from GHC.Float +encodeUtf8 from Data.Text.Encoding +enumFrom from GHC.Enum +enumFromThen from GHC.Enum +enumFromThenTo from GHC.Enum +enumFromTo from GHC.Enum +eqT from Data.Typeable +evalState from Control.Monad.Trans.State.Lazy +evalStateT from Control.Monad.Trans.State.Lazy +evaluate from GHC.IO +even from GHC.Real +execState from Control.Monad.Trans.State.Lazy +execStateT from Control.Monad.Trans.State.Lazy +exitFailure from System.Exit +exitSuccess from System.Exit +exitWith from System.Exit +exp from GHC.Float +expm1 from GHC.Float +exponent from GHC.Float +fatalErrorMessage from Protolude.Panic +filter from GHC.List +filterM from Control.Monad +finally from Control.Exception.Base +find from Data.Foldable +finiteBitSize from Data.Bits +first from Data.Bifunctor +fix from Data.Function +fixST from GHC.ST +flip from GHC.Base +floatDigits from GHC.Float +floatRadix from GHC.Float +floatRange from GHC.Float +floor from GHC.Real +fmap from GHC.Base +fmapDefault from Data.Traversable +fold from Data.Foldable +foldM from Control.Monad +foldM_ from Control.Monad +foldMap from Data.Foldable +foldMapDefault from Data.Traversable +foldl from Data.Foldable +foldl' from Data.Foldable +foldl1May from Protolude.Safe +foldl1May' from Protolude.Safe +foldlM from Data.Foldable +foldr from Data.Foldable +foldr' from Data.Foldable +foldr1May from Protolude.Safe +foldrM from Data.Foldable +for from Data.Traversable +forM from Data.Traversable +forM_ from Data.Foldable +for_ from Data.Foldable +force from Control.DeepSeq +foreach from Protolude.Functor +forever from Control.Monad +forkFinally from Control.Concurrent +forkIO from GHC.Conc.Sync +forkIOWithUnmask from GHC.Conc.Sync +forkOS from Control.Concurrent +forkOSWithUnmask from Control.Concurrent +forkOn from GHC.Conc.Sync +forkOnWithUnmask from GHC.Conc.Sync +from from GHC.Generics +fromEnum from GHC.Enum +fromException from GHC.Exception +fromInteger from GHC.Num +fromIntegral from GHC.Real +fromLabel from GHC.OverloadedLabels +fromLeft from Protolude.Either +fromMaybe from Data.Maybe +fromRational from GHC.Real +fromRight from Protolude.Either +fromStrict from Data.Text.Lazy +fst from Data.Tuple +functionName from GHC.ExecutionStack.Internal +gcastWith from Data.Type.Equality +gcd from GHC.Real +gcdInt' from GHC.Real +gcdWord' from GHC.Real +genericDrop from Data.OldList +genericLength from Data.OldList +genericReplicate from Data.OldList +genericSplitAt from Data.OldList +genericTake from Data.OldList +get from Control.Monad.State.Class +getAll from Data.Monoid +getAlt from Data.Monoid +getAny from Data.Monoid +getArgs from System.Environment +getCallStack from GHC.Stack.Types +getChanContents from Control.Concurrent.Chan +getConst from Data.Functor.Const +getContents from Data.Text.IO +getDual from Data.Monoid +getFirst from Data.Monoid +getLast from Data.Monoid +getLine from Data.Text.IO +getMaskingState from GHC.IO +getNumCapabilities from GHC.Conc.Sync +getOption from Data.Semigroup +getProduct from Data.Monoid +getStackTrace from GHC.ExecutionStack +getSum from Data.Monoid +getZipList from Control.Applicative +gets from Control.Monad.State.Class +group from Data.OldList +groupBy from Data.OldList +guard from Control.Monad +guardM from Protolude.Bool +guarded from Protolude +guardedA from Protolude +hPutStr from Protolude.Show +hPutStrLn from Protolude.Show +handle from Control.Exception.Base +handleJust from Control.Exception.Base +hash from Data.Hashable.Class +hashUsing from Data.Hashable.Class +hashWithSalt from Data.Hashable.Class +head from Protolude.List +headDef from Protolude.Safe +headMay from Protolude.Safe +hush from Protolude.Exceptions +identity from Protolude +ifM from Protolude.Bool +ignore from Data.Text.Encoding.Error +imagPart from Data.Complex +infinity from GHC.Real +initDef from Protolude.Safe +initMay from Protolude.Safe +initSafe from Protolude.Safe +inits from Data.OldList +integralEnumFrom from GHC.Real +integralEnumFromThen from GHC.Real +integralEnumFromThenTo from GHC.Real +integralEnumFromTo from GHC.Real +interact from Data.Text.IO +intercalate from Data.OldList +interruptible from GHC.IO +intersperse from Data.OldList +ioError from GHC.IO.Exception +isCurrentThreadBound from Control.Concurrent +isDenormalized from GHC.Float +isEmptyChan from Control.Concurrent.Chan +isEmptyMVar from GHC.MVar +isIEEE from GHC.Float +isInfinite from GHC.Float +isJust from Data.Maybe +isLeft from Data.Either +isNaN from GHC.Float +isNegativeZero from GHC.Float +isNewtype from GHC.Generics +isNothing from Data.Maybe +isPrefixOf from Data.OldList +isRight from Data.Either +isSigned from Data.Bits +iterate from GHC.List +join from GHC.Base +killThread from GHC.Conc.Sync +lastDef from Protolude.Safe +lastMay from Protolude.Safe +lcm from GHC.Real +leftToMaybe from Protolude.Either +lefts from Data.Either +length from Data.Foldable +lenientDecode from Data.Text.Encoding.Error +lift from Control.Monad.Trans.Class +liftA from GHC.Base +liftA2 from GHC.Base +liftA3 from GHC.Base +liftAA2 from Protolude.Applicative +liftIO from Control.Monad.IO.Class +liftIO1 from Protolude +liftIO2 from Protolude +liftM from GHC.Base +liftM' from Protolude.Monad +liftM2 from GHC.Base +liftM2' from Protolude.Monad +liftM3 from GHC.Base +liftM4 from GHC.Base +liftM5 from GHC.Base +lines from Data.Text +link from Control.Concurrent.Async +link2 from Control.Concurrent.Async +list from Protolude.List +listToMaybe from Data.Maybe +local from Control.Monad.Reader.Class +log from GHC.Float +log1mexp from GHC.Float +log1p from GHC.Float +log1pexp from GHC.Float +logBase from GHC.Float +magnitude from Data.Complex +many from GHC.Base +map from Protolude +mapAccumL from Data.Traversable +mapAccumR from Data.Traversable +mapAndUnzipM from Control.Monad +mapExcept from Control.Monad.Trans.Except +mapExceptT from Control.Monad.Trans.Except +mapException from Control.Exception.Base +mapM from Data.Traversable +mapM_ from Data.Foldable +mapMaybe from Data.Maybe +mappend from GHC.Base +mask from GHC.IO +mask_ from GHC.IO +max from GHC.Classes +maxBound from GHC.Enum +maxInt from GHC.Base +maximum from Data.Foldable +maximumBy from Data.Foldable +maximumDef from Protolude.Safe +maximumMay from Protolude.Safe +maybe from Data.Maybe +maybeEmpty from Protolude.Either +maybeToEither from Protolude.Either +maybeToLeft from Protolude.Either +maybeToList from Data.Maybe +maybeToRight from Protolude.Either +mconcat from GHC.Base +mempty from GHC.Base +mfilter from Control.Monad +min from GHC.Classes +minBound from GHC.Enum +minInt from GHC.Base +minimum from Data.Foldable +minimumBy from Data.Foldable +minimumDef from Protolude.Safe +minimumMay from Protolude.Safe +mkPolar from Data.Complex +mkWeakMVar from Control.Concurrent.MVar +mkWeakThreadId from GHC.Conc.Sync +mod from GHC.Real +modify from Control.Monad.State.Class +modifyMVar from Control.Concurrent.MVar +modifyMVarMasked from Control.Concurrent.MVar +modifyMVarMasked_ from Control.Concurrent.MVar +modifyMVar_ from Control.Concurrent.MVar +moduleName from GHC.Generics +mplus from GHC.Base +msum from Data.Foldable +mtimesDefault from Data.Semigroup +myThreadId from GHC.Conc.Sync +mzero from GHC.Base +natVal from GHC.TypeLits +negate from GHC.Num +newChan from Control.Concurrent.Chan +newEmptyMVar from GHC.MVar +newMVar from GHC.MVar +newQSem from Control.Concurrent.QSem +newQSemN from Control.Concurrent.QSemN +nonEmpty from Data.List.NonEmpty +not from GHC.Classes +notANumber from GHC.Real +notElem from Data.Foldable +notImplemented from Debug +note from Protolude.Exceptions +null from Data.Foldable +numerator from GHC.Real +numericEnumFrom from GHC.Real +numericEnumFromThen from GHC.Real +numericEnumFromThenTo from GHC.Real +numericEnumFromTo from GHC.Real +objectName from GHC.ExecutionStack.Internal +odd from GHC.Real +on from Data.Function +onException from Control.Exception.Base +one from Protolude.Semiring +openFile from GHC.IO.Handle.FD +option from Data.Semigroup +optional from Control.Applicative +or from Data.Foldable +orAlt from Protolude.Applicative +orElse from GHC.Conc.Sync +orEmpty from Protolude.Applicative +ord from GHC.Base +ordNub from Protolude.List +otherwise from GHC.Base +overflowError from GHC.Real +packageName from GHC.Generics +panic from Protolude.Panic +partitionEithers from Data.Either +pass from Protolude +permutations from Data.OldList +phase from Data.Complex +pi from GHC.Float +polar from Data.Complex +poll from Control.Concurrent.Async +popCount from Data.Bits +popCountDefault from Data.Bits +pred from GHC.Enum +prettyCallStack from GHC.Exception +prettySrcLoc from GHC.Exception +print from Protolude +product from Protolude.List +properFraction from GHC.Real +pure from GHC.Base +purer from Protolude.Applicative +put from Control.Monad.State.Class +putByteString from Protolude.Show +putErrLn from Protolude.Show +putErrText from Protolude.Show +putLByteString from Protolude.Show +putLText from Protolude.Show +putMVar from GHC.MVar +putStr from Protolude.Show +putStrLn from Protolude.Show +putText from Protolude.Show +quot from GHC.Real +quotRem from GHC.Real +race from Control.Concurrent.Async +race_ from Control.Concurrent.Async +ratioPrec from GHC.Real +ratioPrec1 from GHC.Real +ratioZeroDenominatorError from GHC.Real +readChan from Control.Concurrent.Chan +readEither from Text.Read +readFile from Data.Text.IO +readMVar from GHC.MVar +readMaybe from Text.Read +reader from Control.Monad.Reader.Class +reads from Text.Read +realPart from Data.Complex +realToFrac from GHC.Real +recip from GHC.Real +reduce from GHC.Real +rem from GHC.Real +repeat from GHC.List +replace from Data.Text.Encoding.Error +replicate from GHC.List +replicateM from Control.Monad +replicateM_ from Control.Monad +repr from Data.Type.Coercion +retry from GHC.Conc.Sync +return from GHC.Base +reverse from GHC.List +rightToMaybe from Protolude.Either +rights from Data.Either +rnf from Control.DeepSeq +rotate from Data.Bits +rotateL from Data.Bits +rotateR from Data.Bits +round from GHC.Real +rtsSupportsBoundThreads from Control.Concurrent +runConcurrently from Control.Concurrent.Async +runExcept from Control.Monad.Trans.Except +runExceptT from Control.Monad.Trans.Except +runIdentity from Data.Functor.Identity +runInBoundThread from Control.Concurrent +runInUnboundThread from Control.Concurrent +runReader from Control.Monad.Trans.Reader +runReaderT from Control.Monad.Trans.Reader +runST from GHC.ST +runState from Control.Monad.Trans.State.Lazy +runStateT from Control.Monad.Trans.State.Lazy +scaleFloat from GHC.Float +scanl from GHC.List +scanl' from GHC.List +scanr from GHC.List +sconcat from Data.Semigroup +second from Data.Bifunctor +selDecidedStrictness from GHC.Generics +selName from GHC.Generics +selSourceStrictness from GHC.Generics +selSourceUnpackedness from GHC.Generics +seq from GHC.Prim +sequence from Data.Traversable +sequenceA from Data.Traversable +sequenceA_ from Data.Foldable +sequence_ from Data.Foldable +setBit from Data.Bits +setNumCapabilities from GHC.Conc.Sync +shift from Data.Bits +shiftL from Data.Bits +shiftR from Data.Bits +show from Protolude +showStackTrace from GHC.ExecutionStack +signalQSem from Control.Concurrent.QSem +signalQSemN from Control.Concurrent.QSemN +significand from GHC.Float +signum from GHC.Num +sin from GHC.Float +sinh from GHC.Float +snd from Data.Tuple +some from GHC.Base +someNatVal from GHC.TypeLits +someSymbolVal from GHC.TypeLits +sort from Data.OldList +sortBy from Data.OldList +sortOn from Protolude.List +sourceColumn from GHC.ExecutionStack.Internal +sourceFile from GHC.ExecutionStack.Internal +sourceLine from GHC.ExecutionStack.Internal +splitAt from GHC.List +sqrt from GHC.Float +srcLoc from GHC.ExecutionStack.Internal +state from Control.Monad.State.Class +stderr from GHC.IO.Handle.FD +stdin from GHC.IO.Handle.FD +stdout from GHC.IO.Handle.FD +stimes from Data.Semigroup +stimesIdempotent from Data.Semigroup +stimesIdempotentMonoid from Data.Semigroup +stimesMonoid from Data.Semigroup +strConv from Protolude.Conv +strictDecode from Data.Text.Encoding.Error +subsequences from Data.OldList +subtract from GHC.Num +succ from GHC.Enum +sum from Protolude.List +swap from Data.Tuple +swapMVar from Control.Concurrent.MVar +sym from Data.Type.Equality +symbolVal from GHC.TypeLits +tailDef from Protolude.Safe +tailMay from Protolude.Safe +tailSafe from Protolude.Safe +tails from Data.OldList +take from GHC.List +takeMVar from GHC.MVar +takeWhile from GHC.List +tan from GHC.Float +tanh from GHC.Float +testBit from Data.Bits +testBitDefault from Data.Bits +threadCapability from GHC.Conc.Sync +threadDelay from GHC.Conc.IO +threadWaitRead from Control.Concurrent +threadWaitReadSTM from Control.Concurrent +threadWaitWrite from Control.Concurrent +threadWaitWriteSTM from Control.Concurrent +throwE from Control.Monad.Trans.Except +throwError from Control.Monad.Error.Class +throwIO from Protolude +throwSTM from GHC.Conc.Sync +throwTo from Protolude +to from GHC.Generics +toEnum from GHC.Enum +toException from GHC.Exception +toInteger from GHC.Real +toIntegralSized from Data.Bits +toList from Data.Foldable +toRational from GHC.Real +toS from Protolude.Conv +toSL from Protolude.Conv +toStrict from Data.Text.Lazy +trace from Debug +traceIO from Debug +traceId from Debug +traceM from Debug +traceShow from Debug +traceShowId from Debug +traceShowM from Debug +trans from Data.Type.Equality +transpose from Data.OldList +traverse from Data.Traversable +traverse_ from Data.Foldable +truncate from GHC.Real +try from Control.Exception.Base +tryIO from Protolude.Exceptions +tryJust from Control.Exception.Base +tryPutMVar from GHC.MVar +tryReadMVar from GHC.MVar +tryTakeMVar from GHC.MVar +typeRep from Data.Typeable.Internal +unComp1 from GHC.Generics +unGetChan from Control.Concurrent.Chan +unK1 from GHC.Generics +unM1 from GHC.Generics +uncons from Protolude +uncurry from Data.Tuple +undefined from Debug +unfoldr from Data.OldList +uninterruptibleMask from GHC.IO +uninterruptibleMask_ from GHC.IO +unless from Control.Monad +unlessM from Protolude.Bool +unlines from Data.Text +unsnoc from Protolude +until from GHC.Base +unwords from Data.Text +unzip from GHC.List +vacuous from Data.Void +void from Data.Functor +wait from Control.Concurrent.Async +waitAny from Control.Concurrent.Async +waitAnyCancel from Control.Concurrent.Async +waitAnyCatch from Control.Concurrent.Async +waitAnyCatchCancel from Control.Concurrent.Async +waitBoth from Control.Concurrent.Async +waitCatch from Control.Concurrent.Async +waitEither from Control.Concurrent.Async +waitEitherCancel from Control.Concurrent.Async +waitEitherCatch from Control.Concurrent.Async +waitEitherCatchCancel from Control.Concurrent.Async +waitEither_ from Control.Concurrent.Async +waitQSem from Control.Concurrent.QSem +waitQSemN from Control.Concurrent.QSemN +when from GHC.Base +whenM from Protolude.Bool +withAsync from Control.Concurrent.Async +withAsyncBound from Control.Concurrent.Async +withAsyncOn from Control.Concurrent.Async +withExcept from Control.Monad.Trans.Except +withExceptT from Control.Monad.Trans.Except +withFile from System.IO +withFrozenCallStack from GHC.Stack +withMVar from Control.Concurrent.MVar +withMVarMasked from Control.Concurrent.MVar +withState from Control.Monad.Trans.State.Lazy +witness from Debug +words from Data.Text +writeChan from Control.Concurrent.Chan +writeFile from Data.Text.IO +writeList2Chan from Control.Concurrent.Chan +xor from Data.Bits +zero from Protolude.Semiring +zeroBits from Data.Bits +zip from GHC.List +zipWith from GHC.List +zipWithM from Control.Monad +zipWithM_ from Control.Monad +|| from GHC.Classes +||^ from Protolude.Bool diff --git a/export_lists/protolude-8.exports b/export_lists/protolude-8.exports new file mode 100644 index 0000000000..290867e688 --- /dev/null +++ b/export_lists/protolude-8.exports @@ -0,0 +1,956 @@ +$ from GHC.Base +$! from Protolude.Base +$!! from Control.DeepSeq +$> from Data.Functor +% from GHC.Real +& from Data.Function +&& from GHC.Classes +&&^ from Protolude.Bool +* from GHC.Num +* from GHC.Types +** from GHC.Float +*> from GHC.Base ++ from GHC.Num +++ from GHC.Base +- from GHC.Num +. from GHC.Base +.&. from Data.Bits +.|. from Data.Bits +/ from GHC.Real +/= from GHC.Classes +:% from GHC.Real +:*: from GHC.Generics +:*: from GHC.Generics +:+ from Data.Complex +:+: from GHC.Generics +:.: from GHC.Generics +:| from Data.List.NonEmpty +:~: from Data.Type.Equality +< from GHC.Classes +<$ from GHC.Base +<$!> from Control.Monad +<$> from Data.Functor +<&&> from Protolude.Bool +<&> from Protolude.Functor +<* from GHC.Base +<**> from GHC.Base +<*> from GHC.Base +<.> from Protolude.Semiring +<<$>> from Protolude.Functor +<<*>> from Protolude.Applicative +<= from GHC.Classes +<=< from Control.Monad +<> from Data.Monoid +<|> from GHC.Base +<||> from Protolude.Bool +=<< from GHC.Base +== from GHC.Classes +== from Data.Type.Equality +> from GHC.Classes +>= from GHC.Classes +>=> from Control.Monad +>> from GHC.Base +>>= from GHC.Base +All from Data.Monoid +All from Data.Monoid +AllocationLimitExceeded from GHC.IO.Exception +AllocationLimitExceeded from GHC.IO.Exception +Alt from Data.Monoid +Alt from Data.Monoid +Alternative from GHC.Base +Any from Data.Monoid +Any from Data.Monoid +AppendMode from GHC.IO.IOMode +Applicative from GHC.Base +ArithException from GHC.Exception +ArrayException from GHC.IO.Exception +AssertionFailed from GHC.IO.Exception +AssertionFailed from GHC.IO.Exception +Associativity from GHC.Generics +Async from Control.Concurrent.Async +AsyncException from GHC.IO.Exception +Bifunctor from Data.Bifunctor +Bits from Data.Bits +BlockedIndefinitelyOnMVar from GHC.IO.Exception +BlockedIndefinitelyOnMVar from GHC.IO.Exception +BlockedIndefinitelyOnSTM from GHC.IO.Exception +BlockedIndefinitelyOnSTM from GHC.IO.Exception +Bool from GHC.Types +Bounded from GHC.Enum +ByteString from Data.ByteString.Internal +C1 from GHC.Generics +CallStack from GHC.Stack.Types +Chan from Control.Concurrent.Chan +Char from GHC.Types +CmpNat from GHC.TypeLits +Coercible from GHC.Types +Coercion from Data.Type.Coercion +Coercion from Data.Type.Coercion +Comp1 from GHC.Generics +Complex from Data.Complex +Concurrently from Control.Concurrent.Async +Concurrently from Control.Concurrent.Async +Const from Data.Functor.Const +Const from Data.Functor.Const +Constraint from GHC.Types +Constructor from GHC.Generics +D# from GHC.Types +D1 from GHC.Generics +Datatype from GHC.Generics +Deadlock from GHC.IO.Exception +Deadlock from GHC.IO.Exception +Denormal from GHC.Exception +DivideByZero from GHC.Exception +Double from GHC.Types +Down from Data.Ord +Down from Data.Ord +Dual from Data.Monoid +Dual from Data.Monoid +EQ from GHC.Types +Either from Data.Either +Endo from Data.Monoid +Endo from Data.Monoid +Enum from GHC.Enum +Eq from GHC.Classes +ErrorCall from GHC.Exception +ErrorCall from GHC.Exception +ErrorCallWithLocation from GHC.Exception +Except from Control.Monad.Trans.Except +ExceptT from Control.Monad.Trans.Except +ExceptT from Control.Monad.Trans.Except +Exception from GHC.Exception +ExitCode from GHC.IO.Exception +ExitFailure from GHC.IO.Exception +ExitSuccess from GHC.IO.Exception +F# from GHC.Types +False from GHC.Types +FatalError from Protolude.Panic +FatalError from Protolude.Panic +FilePath from GHC.IO +FiniteBits from Data.Bits +First from Data.Monoid +First from Data.Monoid +Fixity from GHC.Generics +FixityI from GHC.Generics +Float from GHC.Types +Floating from GHC.Float +Foldable from Data.Foldable +Fractional from GHC.Real +FunPtr from GHC.Ptr +Functor from GHC.Base +GT from GHC.Types +Generic from GHC.Generics +Generic1 from GHC.Generics +Handle from GHC.IO.Handle.Types +HasCallStack from GHC.Stack.Types +Hashable from Data.Hashable.Class +HeapOverflow from GHC.IO.Exception +IO from GHC.Types +IOException from GHC.IO.Exception +IOMode from GHC.IO.IOMode +Identity from Data.Functor.Identity +Identity from Data.Functor.Identity +IndexOutOfBounds from GHC.IO.Exception +Infix from GHC.Generics +InfixI from GHC.Generics +Int from GHC.Types +Int16 from GHC.Int +Int32 from GHC.Int +Int64 from GHC.Int +Int8 from GHC.Int +IntMap from Data.IntMap.Base +IntPtr from Foreign.Ptr +IntSet from Data.IntSet.Base +Integer from GHC.Integer.Type +Integral from GHC.Real +IsLabel from GHC.OverloadedLabels +IsString from Data.String +Just from GHC.Base +K1 from GHC.Generics +K1 from GHC.Generics +KnownNat from GHC.TypeLits +KnownSymbol from GHC.TypeLits +L1 from GHC.Generics +LByteString from Protolude +LT from GHC.Types +LText from Protolude +Last from Data.Monoid +Last from Data.Monoid +Left from Data.Either +LeftAssociative from GHC.Generics +Leniency from Protolude.Conv +Lenient from Protolude.Conv +Location from GHC.ExecutionStack.Internal +Location from GHC.ExecutionStack.Internal +LossOfPrecision from GHC.Exception +M1 from GHC.Generics +M1 from GHC.Generics +MVar from GHC.MVar +Map from Data.Map.Base +MaskedInterruptible from GHC.IO +MaskedUninterruptible from GHC.IO +MaskingState from GHC.IO +Maybe from GHC.Base +Meta from GHC.Generics +MetaCons from GHC.Generics +MetaData from GHC.Generics +MetaSel from GHC.Generics +Monad from GHC.Base +MonadError from Control.Monad.Error.Class +MonadIO from Control.Monad.IO.Class +MonadPlus from GHC.Base +MonadReader from Control.Monad.Reader.Class +MonadState from Control.Monad.State.Class +Monoid from GHC.Base +NFData from Control.DeepSeq +Nat from GHC.Types +NestedAtomically from Control.Exception.Base +NestedAtomically from Control.Exception.Base +NoMethodError from Control.Exception.Base +NoMethodError from Control.Exception.Base +NonEmpty from Data.List.NonEmpty +NonTermination from Control.Exception.Base +NonTermination from Control.Exception.Base +NotAssociative from GHC.Generics +Nothing from GHC.Base +Num from GHC.Num +OnDecodeError from Data.Text.Encoding.Error +OnError from Data.Text.Encoding.Error +Option from Data.Semigroup +Option from Data.Semigroup +Ord from GHC.Classes +Ordering from GHC.Types +Overflow from GHC.Exception +PatternMatchFail from Control.Exception.Base +PatternMatchFail from Control.Exception.Base +Prefix from GHC.Generics +PrefixI from GHC.Generics +Print from Protolude.Show +Product from Data.Monoid +Product from Data.Monoid +Proxy from Data.Proxy +Proxy from Data.Proxy +Ptr from GHC.Ptr +QSem from Control.Concurrent.QSem +QSemN from Control.Concurrent.QSemN +R1 from GHC.Generics +Ratio from GHC.Real +RatioZeroDenominator from GHC.Exception +Rational from GHC.Real +Read from GHC.Read +ReadMode from GHC.IO.IOMode +ReadWriteMode from GHC.IO.IOMode +Reader from Control.Monad.Trans.Reader +ReaderT from Control.Monad.Trans.Reader +ReaderT from Control.Monad.Trans.Reader +Real from GHC.Real +RealFloat from GHC.Float +RealFrac from GHC.Real +Rec0 from GHC.Generics +RecConError from Control.Exception.Base +RecConError from Control.Exception.Base +RecSelError from Control.Exception.Base +RecSelError from Control.Exception.Base +RecUpdError from Control.Exception.Base +RecUpdError from Control.Exception.Base +Refl from Data.Type.Equality +Rep from GHC.Generics +Right from Data.Either +RightAssociative from GHC.Generics +S1 from GHC.Generics +ST from GHC.ST +STM from GHC.Conc.Sync +Selector from GHC.Generics +Semigroup from Data.Semigroup +Semiring from Protolude.Semiring +Seq from Data.Sequence +Set from Data.Set.Base +Show from GHC.Show +SomeAsyncException from GHC.IO.Exception +SomeAsyncException from GHC.IO.Exception +SomeException from GHC.Exception +SomeException from GHC.Exception +SomeNat from GHC.TypeLits +SomeNat from GHC.TypeLits +SomeSymbol from GHC.TypeLits +SomeSymbol from GHC.TypeLits +SrcLoc from GHC.ExecutionStack.Internal +SrcLoc from GHC.ExecutionStack.Internal +StablePtr from GHC.Stable +StackOverflow from GHC.IO.Exception +State from Control.Monad.Trans.State.Lazy +StateT from Control.Monad.Trans.State.Lazy +StateT from Control.Monad.Trans.State.Lazy +StaticPtr from GHC.StaticPtr +Storable from Foreign.Storable +Strict from Protolude.Conv +StringConv from Protolude.Conv +Sum from Data.Monoid +Sum from Data.Monoid +Symbol from GHC.Types +Text from Data.Text.Internal +ThreadId from GHC.Conc.Sync +ThreadKilled from GHC.IO.Exception +Traversable from Data.Traversable +True from GHC.Types +Type from GHC.Types +TypeError from Control.Exception.Base +TypeError from Control.Exception.Base +TypeRep from Data.Typeable.Internal +Typeable from Data.Typeable.Internal +U1 from GHC.Generics +U1 from GHC.Generics +URec from GHC.Generics +UndefinedElement from GHC.IO.Exception +Underflow from GHC.Exception +UnicodeException from Data.Text.Encoding.Error +Unmasked from GHC.IO +UserInterrupt from GHC.IO.Exception +V1 from GHC.Generics +Void from Data.Void +Word from GHC.Types +Word16 from GHC.Word +Word32 from GHC.Word +Word64 from GHC.Word +Word8 from GHC.Word +WordPtr from Foreign.Ptr +WrappedMonoid from Data.Semigroup +WriteMode from GHC.IO.IOMode +ZipList from Control.Applicative +ZipList from Control.Applicative +^ from GHC.Real +^%^ from GHC.Real +^^ from GHC.Real +^^%^^ from GHC.Real +abs from GHC.Num +absurd from Data.Void +acos from GHC.Float +acosh from GHC.Float +addMVarFinalizer from Control.Concurrent.MVar +all from Data.Foldable +allowInterrupt from Control.Exception +always from GHC.Conc.Sync +alwaysSucceeds from GHC.Conc.Sync +and from Data.Foldable +any from Data.Foldable +ap from GHC.Base +appEndo from Data.Monoid +appendFile from Data.Text.IO +applyN from Protolude +asTypeOf from GHC.Base +asin from GHC.Float +asinh from GHC.Float +ask from Control.Monad.Reader.Class +asks from Control.Monad.Reader.Class +asum from Data.Foldable +async from Control.Concurrent.Async +asyncBound from Control.Concurrent.Async +asyncExceptionFromException from GHC.IO.Exception +asyncExceptionToException from GHC.IO.Exception +asyncOn from Control.Concurrent.Async +asyncThreadId from Control.Concurrent.Async +atDef from Protolude.Safe +atMay from Protolude.Safe +atan from GHC.Float +atan2 from GHC.Float +atanh from GHC.Float +atomically from GHC.Conc.Sync +bimap from Data.Bifunctor +bit from Data.Bits +bitDefault from Data.Bits +bitSize from Data.Bits +bitSizeMaybe from Data.Bits +bool from Protolude.Bool +boundedEnumFrom from GHC.Enum +boundedEnumFromThen from GHC.Enum +bracket from Control.Exception.Base +bracketOnError from Control.Exception.Base +bracket_ from Control.Exception.Base +break from GHC.List +byteSwap16 from GHC.Word +byteSwap32 from GHC.Word +byteSwap64 from GHC.Word +callStack from GHC.Stack +cancel from Control.Concurrent.Async +cancelWith from Control.Concurrent.Async +cast from Data.Typeable +castWith from Data.Type.Equality +catMaybes from Data.Maybe +catch from Control.Exception.Base +catchE from Control.Monad.Trans.Except +catchError from Control.Monad.Error.Class +catchJust from Control.Exception.Base +catchSTM from GHC.Conc.Sync +catches from Control.Exception +ceiling from GHC.Real +check from Control.Monad.STM +chr from GHC.Char +cis from Data.Complex +clearBit from Data.Bits +coerceWith from Data.Type.Coercion +compare from GHC.Classes +comparing from Data.Ord +complement from Data.Bits +complementBit from Data.Bits +conFixity from GHC.Generics +conIsRecord from GHC.Generics +conName from GHC.Generics +concat from Data.Foldable +concatMap from Data.Foldable +concatMapM from Protolude.Monad +concurrently from Control.Concurrent.Async +conjugate from Data.Complex +const from GHC.Base +cos from GHC.Float +cosh from GHC.Float +countLeadingZeros from Data.Bits +countTrailingZeros from Data.Bits +currentCallStack from GHC.Stack.CCS +curry from Data.Tuple +cycle from GHC.List +cycle1 from Data.Semigroup +datatypeName from GHC.Generics +decodeFloat from GHC.Float +decodeUtf8 from Data.Text.Encoding +decodeUtf8' from Data.Text.Encoding +decodeUtf8With from Data.Text.Encoding +deepseq from Control.DeepSeq +denominator from GHC.Real +die from Protolude +diff from Data.Semigroup +displayException from GHC.Exception +div from GHC.Real +divMod from GHC.Real +divZeroError from GHC.Real +drop from GHC.List +dropWhile from GHC.List +dupChan from Control.Concurrent.Chan +either from Data.Either +eitherA from Protolude.Applicative +elem from Data.Foldable +empty from GHC.Base +encodeFloat from GHC.Float +encodeUtf8 from Data.Text.Encoding +enumFrom from GHC.Enum +enumFromThen from GHC.Enum +enumFromThenTo from GHC.Enum +enumFromTo from GHC.Enum +eqT from Data.Typeable +evalState from Control.Monad.Trans.State.Lazy +evalStateT from Control.Monad.Trans.State.Lazy +evaluate from GHC.IO +even from GHC.Real +execState from Control.Monad.Trans.State.Lazy +execStateT from Control.Monad.Trans.State.Lazy +exitFailure from System.Exit +exitSuccess from System.Exit +exitWith from System.Exit +exp from GHC.Float +expm1 from GHC.Float +exponent from GHC.Float +fatalErrorMessage from Protolude.Panic +filter from GHC.List +filterM from Control.Monad +finally from Control.Exception.Base +find from Data.Foldable +finiteBitSize from Data.Bits +first from Data.Bifunctor +fix from Data.Function +fixST from GHC.ST +flip from GHC.Base +floatDigits from GHC.Float +floatRadix from GHC.Float +floatRange from GHC.Float +floor from GHC.Real +fmap from GHC.Base +fmapDefault from Data.Traversable +fold from Data.Foldable +foldM from Control.Monad +foldM_ from Control.Monad +foldMap from Data.Foldable +foldMapDefault from Data.Traversable +foldl from Data.Foldable +foldl' from Data.Foldable +foldl1May from Protolude.Safe +foldl1May' from Protolude.Safe +foldlM from Data.Foldable +foldr from Data.Foldable +foldr' from Data.Foldable +foldr1May from Protolude.Safe +foldrM from Data.Foldable +for from Data.Traversable +forM from Data.Traversable +forM_ from Data.Foldable +for_ from Data.Foldable +force from Control.DeepSeq +foreach from Protolude.Functor +forever from Control.Monad +forkFinally from Control.Concurrent +forkIO from GHC.Conc.Sync +forkIOWithUnmask from GHC.Conc.Sync +forkOS from Control.Concurrent +forkOSWithUnmask from Control.Concurrent +forkOn from GHC.Conc.Sync +forkOnWithUnmask from GHC.Conc.Sync +from from GHC.Generics +fromEnum from GHC.Enum +fromException from GHC.Exception +fromInteger from GHC.Num +fromIntegral from GHC.Real +fromLabel from GHC.OverloadedLabels +fromLeft from Protolude.Either +fromMaybe from Data.Maybe +fromRational from GHC.Real +fromRight from Protolude.Either +fromStrict from Data.Text.Lazy +fst from Data.Tuple +functionName from GHC.ExecutionStack.Internal +gcastWith from Data.Type.Equality +gcd from GHC.Real +gcdInt' from GHC.Real +gcdWord' from GHC.Real +genericDrop from Data.OldList +genericLength from Data.OldList +genericReplicate from Data.OldList +genericSplitAt from Data.OldList +genericTake from Data.OldList +get from Control.Monad.State.Class +getAll from Data.Monoid +getAlt from Data.Monoid +getAny from Data.Monoid +getArgs from System.Environment +getCallStack from GHC.Stack.Types +getChanContents from Control.Concurrent.Chan +getConst from Data.Functor.Const +getContents from Data.Text.IO +getDual from Data.Monoid +getFirst from Data.Monoid +getLast from Data.Monoid +getLine from Data.Text.IO +getMaskingState from GHC.IO +getNumCapabilities from GHC.Conc.Sync +getOption from Data.Semigroup +getProduct from Data.Monoid +getStackTrace from GHC.ExecutionStack +getSum from Data.Monoid +getZipList from Control.Applicative +gets from Control.Monad.State.Class +group from Data.OldList +groupBy from Data.OldList +guard from Control.Monad +guardM from Protolude.Bool +guarded from Protolude +guardedA from Protolude +hPutStr from Protolude.Show +hPutStrLn from Protolude.Show +handle from Control.Exception.Base +handleJust from Control.Exception.Base +hash from Data.Hashable.Class +hashUsing from Data.Hashable.Class +hashWithSalt from Data.Hashable.Class +head from Protolude.List +headDef from Protolude.Safe +headMay from Protolude.Safe +hush from Protolude.Exceptions +identity from Protolude +ifM from Protolude.Bool +ignore from Data.Text.Encoding.Error +imagPart from Data.Complex +infinity from GHC.Real +initDef from Protolude.Safe +initMay from Protolude.Safe +initSafe from Protolude.Safe +inits from Data.OldList +integralEnumFrom from GHC.Real +integralEnumFromThen from GHC.Real +integralEnumFromThenTo from GHC.Real +integralEnumFromTo from GHC.Real +interact from Data.Text.IO +intercalate from Data.OldList +interruptible from GHC.IO +intersperse from Data.OldList +ioError from GHC.IO.Exception +isCurrentThreadBound from Control.Concurrent +isDenormalized from GHC.Float +isEmptyChan from Control.Concurrent.Chan +isEmptyMVar from GHC.MVar +isIEEE from GHC.Float +isInfinite from GHC.Float +isJust from Data.Maybe +isLeft from Data.Either +isNaN from GHC.Float +isNegativeZero from GHC.Float +isNewtype from GHC.Generics +isNothing from Data.Maybe +isPrefixOf from Data.OldList +isRight from Data.Either +isSigned from Data.Bits +iterate from GHC.List +join from GHC.Base +killThread from GHC.Conc.Sync +lastDef from Protolude.Safe +lastMay from Protolude.Safe +lcm from GHC.Real +leftToMaybe from Protolude.Either +lefts from Data.Either +length from Data.Foldable +lenientDecode from Data.Text.Encoding.Error +lift from Control.Monad.Trans.Class +liftA from GHC.Base +liftA2 from GHC.Base +liftA3 from GHC.Base +liftAA2 from Protolude.Applicative +liftIO from Control.Monad.IO.Class +liftIO1 from Protolude +liftIO2 from Protolude +liftM from GHC.Base +liftM' from Protolude.Monad +liftM2 from GHC.Base +liftM2' from Protolude.Monad +liftM3 from GHC.Base +liftM4 from GHC.Base +liftM5 from GHC.Base +lines from Data.Text +link from Control.Concurrent.Async +link2 from Control.Concurrent.Async +list from Protolude.List +listToMaybe from Data.Maybe +local from Control.Monad.Reader.Class +log from GHC.Float +log1mexp from GHC.Float +log1p from GHC.Float +log1pexp from GHC.Float +logBase from GHC.Float +magnitude from Data.Complex +many from GHC.Base +map from Protolude +mapAccumL from Data.Traversable +mapAccumR from Data.Traversable +mapAndUnzipM from Control.Monad +mapExcept from Control.Monad.Trans.Except +mapExceptT from Control.Monad.Trans.Except +mapException from Control.Exception.Base +mapM from Data.Traversable +mapM_ from Data.Foldable +mapMaybe from Data.Maybe +mappend from GHC.Base +mask from GHC.IO +mask_ from GHC.IO +max from GHC.Classes +maxBound from GHC.Enum +maxInt from GHC.Base +maximum from Data.Foldable +maximumBy from Data.Foldable +maximumDef from Protolude.Safe +maximumMay from Protolude.Safe +maybe from Data.Maybe +maybeEmpty from Protolude.Either +maybeToEither from Protolude.Either +maybeToLeft from Protolude.Either +maybeToList from Data.Maybe +maybeToRight from Protolude.Either +mconcat from GHC.Base +mempty from GHC.Base +mfilter from Control.Monad +min from GHC.Classes +minBound from GHC.Enum +minInt from GHC.Base +minimum from Data.Foldable +minimumBy from Data.Foldable +minimumDef from Protolude.Safe +minimumMay from Protolude.Safe +mkPolar from Data.Complex +mkWeakMVar from Control.Concurrent.MVar +mkWeakThreadId from GHC.Conc.Sync +mod from GHC.Real +modify from Control.Monad.State.Class +modifyMVar from Control.Concurrent.MVar +modifyMVarMasked from Control.Concurrent.MVar +modifyMVarMasked_ from Control.Concurrent.MVar +modifyMVar_ from Control.Concurrent.MVar +moduleName from GHC.Generics +mplus from GHC.Base +msum from Data.Foldable +mtimesDefault from Data.Semigroup +myThreadId from GHC.Conc.Sync +mzero from GHC.Base +natVal from GHC.TypeLits +negate from GHC.Num +newChan from Control.Concurrent.Chan +newEmptyMVar from GHC.MVar +newMVar from GHC.MVar +newQSem from Control.Concurrent.QSem +newQSemN from Control.Concurrent.QSemN +nonEmpty from Data.List.NonEmpty +not from GHC.Classes +notANumber from GHC.Real +notElem from Data.Foldable +notImplemented from Debug +note from Protolude.Exceptions +null from Data.Foldable +numerator from GHC.Real +numericEnumFrom from GHC.Real +numericEnumFromThen from GHC.Real +numericEnumFromThenTo from GHC.Real +numericEnumFromTo from GHC.Real +objectName from GHC.ExecutionStack.Internal +odd from GHC.Real +on from Data.Function +onException from Control.Exception.Base +one from Protolude.Semiring +openFile from GHC.IO.Handle.FD +option from Data.Semigroup +optional from Control.Applicative +or from Data.Foldable +orAlt from Protolude.Applicative +orElse from GHC.Conc.Sync +orEmpty from Protolude.Applicative +ord from GHC.Base +ordNub from Protolude.List +otherwise from GHC.Base +overflowError from GHC.Real +packageName from GHC.Generics +panic from Protolude.Panic +partitionEithers from Data.Either +pass from Protolude +permutations from Data.OldList +phase from Data.Complex +pi from GHC.Float +polar from Data.Complex +poll from Control.Concurrent.Async +popCount from Data.Bits +popCountDefault from Data.Bits +pred from GHC.Enum +prettyCallStack from GHC.Exception +prettySrcLoc from GHC.Exception +print from Protolude +product from Protolude.List +properFraction from GHC.Real +pure from GHC.Base +purer from Protolude.Applicative +put from Control.Monad.State.Class +putByteString from Protolude.Show +putErrLn from Protolude.Show +putErrText from Protolude.Show +putLByteString from Protolude.Show +putLText from Protolude.Show +putMVar from GHC.MVar +putStr from Protolude.Show +putStrLn from Protolude.Show +putText from Protolude.Show +quot from GHC.Real +quotRem from GHC.Real +race from Control.Concurrent.Async +race_ from Control.Concurrent.Async +ratioPrec from GHC.Real +ratioPrec1 from GHC.Real +ratioZeroDenominatorError from GHC.Real +readChan from Control.Concurrent.Chan +readEither from Text.Read +readFile from Data.Text.IO +readMVar from GHC.MVar +readMaybe from Text.Read +reader from Control.Monad.Reader.Class +reads from Text.Read +realPart from Data.Complex +realToFrac from GHC.Real +recip from GHC.Real +reduce from GHC.Real +rem from GHC.Real +repeat from GHC.List +replace from Data.Text.Encoding.Error +replicate from GHC.List +replicateM from Control.Monad +replicateM_ from Control.Monad +repr from Data.Type.Coercion +retry from GHC.Conc.Sync +return from GHC.Base +reverse from GHC.List +rightToMaybe from Protolude.Either +rights from Data.Either +rnf from Control.DeepSeq +rotate from Data.Bits +rotateL from Data.Bits +rotateR from Data.Bits +round from GHC.Real +rtsSupportsBoundThreads from Control.Concurrent +runConcurrently from Control.Concurrent.Async +runExcept from Control.Monad.Trans.Except +runExceptT from Control.Monad.Trans.Except +runIdentity from Data.Functor.Identity +runInBoundThread from Control.Concurrent +runInUnboundThread from Control.Concurrent +runReader from Control.Monad.Trans.Reader +runReaderT from Control.Monad.Trans.Reader +runST from GHC.ST +runState from Control.Monad.Trans.State.Lazy +runStateT from Control.Monad.Trans.State.Lazy +scaleFloat from GHC.Float +scanl from GHC.List +scanl' from GHC.List +scanr from GHC.List +sconcat from Data.Semigroup +second from Data.Bifunctor +selDecidedStrictness from GHC.Generics +selName from GHC.Generics +selSourceStrictness from GHC.Generics +selSourceUnpackedness from GHC.Generics +seq from GHC.Prim +sequence from Data.Traversable +sequenceA from Data.Traversable +sequenceA_ from Data.Foldable +sequence_ from Data.Foldable +setBit from Data.Bits +setNumCapabilities from GHC.Conc.Sync +shift from Data.Bits +shiftL from Data.Bits +shiftR from Data.Bits +show from Protolude +showStackTrace from GHC.ExecutionStack +signalQSem from Control.Concurrent.QSem +signalQSemN from Control.Concurrent.QSemN +significand from GHC.Float +signum from GHC.Num +sin from GHC.Float +sinh from GHC.Float +snd from Data.Tuple +some from GHC.Base +someNatVal from GHC.TypeLits +someSymbolVal from GHC.TypeLits +sort from Data.OldList +sortBy from Data.OldList +sortOn from Protolude.List +sourceColumn from GHC.ExecutionStack.Internal +sourceFile from GHC.ExecutionStack.Internal +sourceLine from GHC.ExecutionStack.Internal +splitAt from GHC.List +sqrt from GHC.Float +srcLoc from GHC.ExecutionStack.Internal +state from Control.Monad.State.Class +stderr from GHC.IO.Handle.FD +stdin from GHC.IO.Handle.FD +stdout from GHC.IO.Handle.FD +stimes from Data.Semigroup +stimesIdempotent from Data.Semigroup +stimesIdempotentMonoid from Data.Semigroup +stimesMonoid from Data.Semigroup +strConv from Protolude.Conv +strictDecode from Data.Text.Encoding.Error +subsequences from Data.OldList +subtract from GHC.Num +succ from GHC.Enum +sum from Protolude.List +swap from Data.Tuple +swapMVar from Control.Concurrent.MVar +sym from Data.Type.Equality +symbolVal from GHC.TypeLits +tailDef from Protolude.Safe +tailMay from Protolude.Safe +tailSafe from Protolude.Safe +tails from Data.OldList +take from GHC.List +takeMVar from GHC.MVar +takeWhile from GHC.List +tan from GHC.Float +tanh from GHC.Float +testBit from Data.Bits +testBitDefault from Data.Bits +threadCapability from GHC.Conc.Sync +threadDelay from GHC.Conc.IO +threadWaitRead from Control.Concurrent +threadWaitReadSTM from Control.Concurrent +threadWaitWrite from Control.Concurrent +threadWaitWriteSTM from Control.Concurrent +throwE from Control.Monad.Trans.Except +throwError from Control.Monad.Error.Class +throwIO from Protolude +throwSTM from GHC.Conc.Sync +throwTo from Protolude +to from GHC.Generics +toEnum from GHC.Enum +toException from GHC.Exception +toInteger from GHC.Real +toIntegralSized from Data.Bits +toList from Data.Foldable +toRational from GHC.Real +toS from Protolude.Conv +toSL from Protolude.Conv +toStrict from Data.Text.Lazy +trace from Debug +traceIO from Debug +traceId from Debug +traceM from Debug +traceShow from Debug +traceShowId from Debug +traceShowM from Debug +trans from Data.Type.Equality +transpose from Data.OldList +traverse from Data.Traversable +traverse_ from Data.Foldable +truncate from GHC.Real +try from Control.Exception.Base +tryIO from Protolude.Exceptions +tryJust from Control.Exception.Base +tryPutMVar from GHC.MVar +tryReadMVar from GHC.MVar +tryTakeMVar from GHC.MVar +typeRep from Data.Typeable.Internal +unComp1 from GHC.Generics +unGetChan from Control.Concurrent.Chan +unK1 from GHC.Generics +unM1 from GHC.Generics +uncons from Protolude +uncurry from Data.Tuple +undefined from Debug +unfoldr from Data.OldList +uninterruptibleMask from GHC.IO +uninterruptibleMask_ from GHC.IO +unless from Control.Monad +unlessM from Protolude.Bool +unlines from Data.Text +unsnoc from Protolude +until from GHC.Base +unwords from Data.Text +unzip from GHC.List +vacuous from Data.Void +void from Data.Functor +wait from Control.Concurrent.Async +waitAny from Control.Concurrent.Async +waitAnyCancel from Control.Concurrent.Async +waitAnyCatch from Control.Concurrent.Async +waitAnyCatchCancel from Control.Concurrent.Async +waitBoth from Control.Concurrent.Async +waitCatch from Control.Concurrent.Async +waitEither from Control.Concurrent.Async +waitEitherCancel from Control.Concurrent.Async +waitEitherCatch from Control.Concurrent.Async +waitEitherCatchCancel from Control.Concurrent.Async +waitEither_ from Control.Concurrent.Async +waitQSem from Control.Concurrent.QSem +waitQSemN from Control.Concurrent.QSemN +when from GHC.Base +whenM from Protolude.Bool +withAsync from Control.Concurrent.Async +withAsyncBound from Control.Concurrent.Async +withAsyncOn from Control.Concurrent.Async +withExcept from Control.Monad.Trans.Except +withExceptT from Control.Monad.Trans.Except +withFile from System.IO +withFrozenCallStack from GHC.Stack +withMVar from Control.Concurrent.MVar +withMVarMasked from Control.Concurrent.MVar +withState from Control.Monad.Trans.State.Lazy +witness from Debug +words from Data.Text +writeChan from Control.Concurrent.Chan +writeFile from Data.Text.IO +writeList2Chan from Control.Concurrent.Chan +xor from Data.Bits +zero from Protolude.Semiring +zeroBits from Data.Bits +zip from GHC.List +zipWith from GHC.List +zipWithM from Control.Monad +zipWithM_ from Control.Monad +|| from GHC.Classes +||^ from Protolude.Bool diff --git a/export_lists/protolude-9.exports b/export_lists/protolude-9.exports new file mode 100644 index 0000000000..290867e688 --- /dev/null +++ b/export_lists/protolude-9.exports @@ -0,0 +1,956 @@ +$ from GHC.Base +$! from Protolude.Base +$!! from Control.DeepSeq +$> from Data.Functor +% from GHC.Real +& from Data.Function +&& from GHC.Classes +&&^ from Protolude.Bool +* from GHC.Num +* from GHC.Types +** from GHC.Float +*> from GHC.Base ++ from GHC.Num +++ from GHC.Base +- from GHC.Num +. from GHC.Base +.&. from Data.Bits +.|. from Data.Bits +/ from GHC.Real +/= from GHC.Classes +:% from GHC.Real +:*: from GHC.Generics +:*: from GHC.Generics +:+ from Data.Complex +:+: from GHC.Generics +:.: from GHC.Generics +:| from Data.List.NonEmpty +:~: from Data.Type.Equality +< from GHC.Classes +<$ from GHC.Base +<$!> from Control.Monad +<$> from Data.Functor +<&&> from Protolude.Bool +<&> from Protolude.Functor +<* from GHC.Base +<**> from GHC.Base +<*> from GHC.Base +<.> from Protolude.Semiring +<<$>> from Protolude.Functor +<<*>> from Protolude.Applicative +<= from GHC.Classes +<=< from Control.Monad +<> from Data.Monoid +<|> from GHC.Base +<||> from Protolude.Bool +=<< from GHC.Base +== from GHC.Classes +== from Data.Type.Equality +> from GHC.Classes +>= from GHC.Classes +>=> from Control.Monad +>> from GHC.Base +>>= from GHC.Base +All from Data.Monoid +All from Data.Monoid +AllocationLimitExceeded from GHC.IO.Exception +AllocationLimitExceeded from GHC.IO.Exception +Alt from Data.Monoid +Alt from Data.Monoid +Alternative from GHC.Base +Any from Data.Monoid +Any from Data.Monoid +AppendMode from GHC.IO.IOMode +Applicative from GHC.Base +ArithException from GHC.Exception +ArrayException from GHC.IO.Exception +AssertionFailed from GHC.IO.Exception +AssertionFailed from GHC.IO.Exception +Associativity from GHC.Generics +Async from Control.Concurrent.Async +AsyncException from GHC.IO.Exception +Bifunctor from Data.Bifunctor +Bits from Data.Bits +BlockedIndefinitelyOnMVar from GHC.IO.Exception +BlockedIndefinitelyOnMVar from GHC.IO.Exception +BlockedIndefinitelyOnSTM from GHC.IO.Exception +BlockedIndefinitelyOnSTM from GHC.IO.Exception +Bool from GHC.Types +Bounded from GHC.Enum +ByteString from Data.ByteString.Internal +C1 from GHC.Generics +CallStack from GHC.Stack.Types +Chan from Control.Concurrent.Chan +Char from GHC.Types +CmpNat from GHC.TypeLits +Coercible from GHC.Types +Coercion from Data.Type.Coercion +Coercion from Data.Type.Coercion +Comp1 from GHC.Generics +Complex from Data.Complex +Concurrently from Control.Concurrent.Async +Concurrently from Control.Concurrent.Async +Const from Data.Functor.Const +Const from Data.Functor.Const +Constraint from GHC.Types +Constructor from GHC.Generics +D# from GHC.Types +D1 from GHC.Generics +Datatype from GHC.Generics +Deadlock from GHC.IO.Exception +Deadlock from GHC.IO.Exception +Denormal from GHC.Exception +DivideByZero from GHC.Exception +Double from GHC.Types +Down from Data.Ord +Down from Data.Ord +Dual from Data.Monoid +Dual from Data.Monoid +EQ from GHC.Types +Either from Data.Either +Endo from Data.Monoid +Endo from Data.Monoid +Enum from GHC.Enum +Eq from GHC.Classes +ErrorCall from GHC.Exception +ErrorCall from GHC.Exception +ErrorCallWithLocation from GHC.Exception +Except from Control.Monad.Trans.Except +ExceptT from Control.Monad.Trans.Except +ExceptT from Control.Monad.Trans.Except +Exception from GHC.Exception +ExitCode from GHC.IO.Exception +ExitFailure from GHC.IO.Exception +ExitSuccess from GHC.IO.Exception +F# from GHC.Types +False from GHC.Types +FatalError from Protolude.Panic +FatalError from Protolude.Panic +FilePath from GHC.IO +FiniteBits from Data.Bits +First from Data.Monoid +First from Data.Monoid +Fixity from GHC.Generics +FixityI from GHC.Generics +Float from GHC.Types +Floating from GHC.Float +Foldable from Data.Foldable +Fractional from GHC.Real +FunPtr from GHC.Ptr +Functor from GHC.Base +GT from GHC.Types +Generic from GHC.Generics +Generic1 from GHC.Generics +Handle from GHC.IO.Handle.Types +HasCallStack from GHC.Stack.Types +Hashable from Data.Hashable.Class +HeapOverflow from GHC.IO.Exception +IO from GHC.Types +IOException from GHC.IO.Exception +IOMode from GHC.IO.IOMode +Identity from Data.Functor.Identity +Identity from Data.Functor.Identity +IndexOutOfBounds from GHC.IO.Exception +Infix from GHC.Generics +InfixI from GHC.Generics +Int from GHC.Types +Int16 from GHC.Int +Int32 from GHC.Int +Int64 from GHC.Int +Int8 from GHC.Int +IntMap from Data.IntMap.Base +IntPtr from Foreign.Ptr +IntSet from Data.IntSet.Base +Integer from GHC.Integer.Type +Integral from GHC.Real +IsLabel from GHC.OverloadedLabels +IsString from Data.String +Just from GHC.Base +K1 from GHC.Generics +K1 from GHC.Generics +KnownNat from GHC.TypeLits +KnownSymbol from GHC.TypeLits +L1 from GHC.Generics +LByteString from Protolude +LT from GHC.Types +LText from Protolude +Last from Data.Monoid +Last from Data.Monoid +Left from Data.Either +LeftAssociative from GHC.Generics +Leniency from Protolude.Conv +Lenient from Protolude.Conv +Location from GHC.ExecutionStack.Internal +Location from GHC.ExecutionStack.Internal +LossOfPrecision from GHC.Exception +M1 from GHC.Generics +M1 from GHC.Generics +MVar from GHC.MVar +Map from Data.Map.Base +MaskedInterruptible from GHC.IO +MaskedUninterruptible from GHC.IO +MaskingState from GHC.IO +Maybe from GHC.Base +Meta from GHC.Generics +MetaCons from GHC.Generics +MetaData from GHC.Generics +MetaSel from GHC.Generics +Monad from GHC.Base +MonadError from Control.Monad.Error.Class +MonadIO from Control.Monad.IO.Class +MonadPlus from GHC.Base +MonadReader from Control.Monad.Reader.Class +MonadState from Control.Monad.State.Class +Monoid from GHC.Base +NFData from Control.DeepSeq +Nat from GHC.Types +NestedAtomically from Control.Exception.Base +NestedAtomically from Control.Exception.Base +NoMethodError from Control.Exception.Base +NoMethodError from Control.Exception.Base +NonEmpty from Data.List.NonEmpty +NonTermination from Control.Exception.Base +NonTermination from Control.Exception.Base +NotAssociative from GHC.Generics +Nothing from GHC.Base +Num from GHC.Num +OnDecodeError from Data.Text.Encoding.Error +OnError from Data.Text.Encoding.Error +Option from Data.Semigroup +Option from Data.Semigroup +Ord from GHC.Classes +Ordering from GHC.Types +Overflow from GHC.Exception +PatternMatchFail from Control.Exception.Base +PatternMatchFail from Control.Exception.Base +Prefix from GHC.Generics +PrefixI from GHC.Generics +Print from Protolude.Show +Product from Data.Monoid +Product from Data.Monoid +Proxy from Data.Proxy +Proxy from Data.Proxy +Ptr from GHC.Ptr +QSem from Control.Concurrent.QSem +QSemN from Control.Concurrent.QSemN +R1 from GHC.Generics +Ratio from GHC.Real +RatioZeroDenominator from GHC.Exception +Rational from GHC.Real +Read from GHC.Read +ReadMode from GHC.IO.IOMode +ReadWriteMode from GHC.IO.IOMode +Reader from Control.Monad.Trans.Reader +ReaderT from Control.Monad.Trans.Reader +ReaderT from Control.Monad.Trans.Reader +Real from GHC.Real +RealFloat from GHC.Float +RealFrac from GHC.Real +Rec0 from GHC.Generics +RecConError from Control.Exception.Base +RecConError from Control.Exception.Base +RecSelError from Control.Exception.Base +RecSelError from Control.Exception.Base +RecUpdError from Control.Exception.Base +RecUpdError from Control.Exception.Base +Refl from Data.Type.Equality +Rep from GHC.Generics +Right from Data.Either +RightAssociative from GHC.Generics +S1 from GHC.Generics +ST from GHC.ST +STM from GHC.Conc.Sync +Selector from GHC.Generics +Semigroup from Data.Semigroup +Semiring from Protolude.Semiring +Seq from Data.Sequence +Set from Data.Set.Base +Show from GHC.Show +SomeAsyncException from GHC.IO.Exception +SomeAsyncException from GHC.IO.Exception +SomeException from GHC.Exception +SomeException from GHC.Exception +SomeNat from GHC.TypeLits +SomeNat from GHC.TypeLits +SomeSymbol from GHC.TypeLits +SomeSymbol from GHC.TypeLits +SrcLoc from GHC.ExecutionStack.Internal +SrcLoc from GHC.ExecutionStack.Internal +StablePtr from GHC.Stable +StackOverflow from GHC.IO.Exception +State from Control.Monad.Trans.State.Lazy +StateT from Control.Monad.Trans.State.Lazy +StateT from Control.Monad.Trans.State.Lazy +StaticPtr from GHC.StaticPtr +Storable from Foreign.Storable +Strict from Protolude.Conv +StringConv from Protolude.Conv +Sum from Data.Monoid +Sum from Data.Monoid +Symbol from GHC.Types +Text from Data.Text.Internal +ThreadId from GHC.Conc.Sync +ThreadKilled from GHC.IO.Exception +Traversable from Data.Traversable +True from GHC.Types +Type from GHC.Types +TypeError from Control.Exception.Base +TypeError from Control.Exception.Base +TypeRep from Data.Typeable.Internal +Typeable from Data.Typeable.Internal +U1 from GHC.Generics +U1 from GHC.Generics +URec from GHC.Generics +UndefinedElement from GHC.IO.Exception +Underflow from GHC.Exception +UnicodeException from Data.Text.Encoding.Error +Unmasked from GHC.IO +UserInterrupt from GHC.IO.Exception +V1 from GHC.Generics +Void from Data.Void +Word from GHC.Types +Word16 from GHC.Word +Word32 from GHC.Word +Word64 from GHC.Word +Word8 from GHC.Word +WordPtr from Foreign.Ptr +WrappedMonoid from Data.Semigroup +WriteMode from GHC.IO.IOMode +ZipList from Control.Applicative +ZipList from Control.Applicative +^ from GHC.Real +^%^ from GHC.Real +^^ from GHC.Real +^^%^^ from GHC.Real +abs from GHC.Num +absurd from Data.Void +acos from GHC.Float +acosh from GHC.Float +addMVarFinalizer from Control.Concurrent.MVar +all from Data.Foldable +allowInterrupt from Control.Exception +always from GHC.Conc.Sync +alwaysSucceeds from GHC.Conc.Sync +and from Data.Foldable +any from Data.Foldable +ap from GHC.Base +appEndo from Data.Monoid +appendFile from Data.Text.IO +applyN from Protolude +asTypeOf from GHC.Base +asin from GHC.Float +asinh from GHC.Float +ask from Control.Monad.Reader.Class +asks from Control.Monad.Reader.Class +asum from Data.Foldable +async from Control.Concurrent.Async +asyncBound from Control.Concurrent.Async +asyncExceptionFromException from GHC.IO.Exception +asyncExceptionToException from GHC.IO.Exception +asyncOn from Control.Concurrent.Async +asyncThreadId from Control.Concurrent.Async +atDef from Protolude.Safe +atMay from Protolude.Safe +atan from GHC.Float +atan2 from GHC.Float +atanh from GHC.Float +atomically from GHC.Conc.Sync +bimap from Data.Bifunctor +bit from Data.Bits +bitDefault from Data.Bits +bitSize from Data.Bits +bitSizeMaybe from Data.Bits +bool from Protolude.Bool +boundedEnumFrom from GHC.Enum +boundedEnumFromThen from GHC.Enum +bracket from Control.Exception.Base +bracketOnError from Control.Exception.Base +bracket_ from Control.Exception.Base +break from GHC.List +byteSwap16 from GHC.Word +byteSwap32 from GHC.Word +byteSwap64 from GHC.Word +callStack from GHC.Stack +cancel from Control.Concurrent.Async +cancelWith from Control.Concurrent.Async +cast from Data.Typeable +castWith from Data.Type.Equality +catMaybes from Data.Maybe +catch from Control.Exception.Base +catchE from Control.Monad.Trans.Except +catchError from Control.Monad.Error.Class +catchJust from Control.Exception.Base +catchSTM from GHC.Conc.Sync +catches from Control.Exception +ceiling from GHC.Real +check from Control.Monad.STM +chr from GHC.Char +cis from Data.Complex +clearBit from Data.Bits +coerceWith from Data.Type.Coercion +compare from GHC.Classes +comparing from Data.Ord +complement from Data.Bits +complementBit from Data.Bits +conFixity from GHC.Generics +conIsRecord from GHC.Generics +conName from GHC.Generics +concat from Data.Foldable +concatMap from Data.Foldable +concatMapM from Protolude.Monad +concurrently from Control.Concurrent.Async +conjugate from Data.Complex +const from GHC.Base +cos from GHC.Float +cosh from GHC.Float +countLeadingZeros from Data.Bits +countTrailingZeros from Data.Bits +currentCallStack from GHC.Stack.CCS +curry from Data.Tuple +cycle from GHC.List +cycle1 from Data.Semigroup +datatypeName from GHC.Generics +decodeFloat from GHC.Float +decodeUtf8 from Data.Text.Encoding +decodeUtf8' from Data.Text.Encoding +decodeUtf8With from Data.Text.Encoding +deepseq from Control.DeepSeq +denominator from GHC.Real +die from Protolude +diff from Data.Semigroup +displayException from GHC.Exception +div from GHC.Real +divMod from GHC.Real +divZeroError from GHC.Real +drop from GHC.List +dropWhile from GHC.List +dupChan from Control.Concurrent.Chan +either from Data.Either +eitherA from Protolude.Applicative +elem from Data.Foldable +empty from GHC.Base +encodeFloat from GHC.Float +encodeUtf8 from Data.Text.Encoding +enumFrom from GHC.Enum +enumFromThen from GHC.Enum +enumFromThenTo from GHC.Enum +enumFromTo from GHC.Enum +eqT from Data.Typeable +evalState from Control.Monad.Trans.State.Lazy +evalStateT from Control.Monad.Trans.State.Lazy +evaluate from GHC.IO +even from GHC.Real +execState from Control.Monad.Trans.State.Lazy +execStateT from Control.Monad.Trans.State.Lazy +exitFailure from System.Exit +exitSuccess from System.Exit +exitWith from System.Exit +exp from GHC.Float +expm1 from GHC.Float +exponent from GHC.Float +fatalErrorMessage from Protolude.Panic +filter from GHC.List +filterM from Control.Monad +finally from Control.Exception.Base +find from Data.Foldable +finiteBitSize from Data.Bits +first from Data.Bifunctor +fix from Data.Function +fixST from GHC.ST +flip from GHC.Base +floatDigits from GHC.Float +floatRadix from GHC.Float +floatRange from GHC.Float +floor from GHC.Real +fmap from GHC.Base +fmapDefault from Data.Traversable +fold from Data.Foldable +foldM from Control.Monad +foldM_ from Control.Monad +foldMap from Data.Foldable +foldMapDefault from Data.Traversable +foldl from Data.Foldable +foldl' from Data.Foldable +foldl1May from Protolude.Safe +foldl1May' from Protolude.Safe +foldlM from Data.Foldable +foldr from Data.Foldable +foldr' from Data.Foldable +foldr1May from Protolude.Safe +foldrM from Data.Foldable +for from Data.Traversable +forM from Data.Traversable +forM_ from Data.Foldable +for_ from Data.Foldable +force from Control.DeepSeq +foreach from Protolude.Functor +forever from Control.Monad +forkFinally from Control.Concurrent +forkIO from GHC.Conc.Sync +forkIOWithUnmask from GHC.Conc.Sync +forkOS from Control.Concurrent +forkOSWithUnmask from Control.Concurrent +forkOn from GHC.Conc.Sync +forkOnWithUnmask from GHC.Conc.Sync +from from GHC.Generics +fromEnum from GHC.Enum +fromException from GHC.Exception +fromInteger from GHC.Num +fromIntegral from GHC.Real +fromLabel from GHC.OverloadedLabels +fromLeft from Protolude.Either +fromMaybe from Data.Maybe +fromRational from GHC.Real +fromRight from Protolude.Either +fromStrict from Data.Text.Lazy +fst from Data.Tuple +functionName from GHC.ExecutionStack.Internal +gcastWith from Data.Type.Equality +gcd from GHC.Real +gcdInt' from GHC.Real +gcdWord' from GHC.Real +genericDrop from Data.OldList +genericLength from Data.OldList +genericReplicate from Data.OldList +genericSplitAt from Data.OldList +genericTake from Data.OldList +get from Control.Monad.State.Class +getAll from Data.Monoid +getAlt from Data.Monoid +getAny from Data.Monoid +getArgs from System.Environment +getCallStack from GHC.Stack.Types +getChanContents from Control.Concurrent.Chan +getConst from Data.Functor.Const +getContents from Data.Text.IO +getDual from Data.Monoid +getFirst from Data.Monoid +getLast from Data.Monoid +getLine from Data.Text.IO +getMaskingState from GHC.IO +getNumCapabilities from GHC.Conc.Sync +getOption from Data.Semigroup +getProduct from Data.Monoid +getStackTrace from GHC.ExecutionStack +getSum from Data.Monoid +getZipList from Control.Applicative +gets from Control.Monad.State.Class +group from Data.OldList +groupBy from Data.OldList +guard from Control.Monad +guardM from Protolude.Bool +guarded from Protolude +guardedA from Protolude +hPutStr from Protolude.Show +hPutStrLn from Protolude.Show +handle from Control.Exception.Base +handleJust from Control.Exception.Base +hash from Data.Hashable.Class +hashUsing from Data.Hashable.Class +hashWithSalt from Data.Hashable.Class +head from Protolude.List +headDef from Protolude.Safe +headMay from Protolude.Safe +hush from Protolude.Exceptions +identity from Protolude +ifM from Protolude.Bool +ignore from Data.Text.Encoding.Error +imagPart from Data.Complex +infinity from GHC.Real +initDef from Protolude.Safe +initMay from Protolude.Safe +initSafe from Protolude.Safe +inits from Data.OldList +integralEnumFrom from GHC.Real +integralEnumFromThen from GHC.Real +integralEnumFromThenTo from GHC.Real +integralEnumFromTo from GHC.Real +interact from Data.Text.IO +intercalate from Data.OldList +interruptible from GHC.IO +intersperse from Data.OldList +ioError from GHC.IO.Exception +isCurrentThreadBound from Control.Concurrent +isDenormalized from GHC.Float +isEmptyChan from Control.Concurrent.Chan +isEmptyMVar from GHC.MVar +isIEEE from GHC.Float +isInfinite from GHC.Float +isJust from Data.Maybe +isLeft from Data.Either +isNaN from GHC.Float +isNegativeZero from GHC.Float +isNewtype from GHC.Generics +isNothing from Data.Maybe +isPrefixOf from Data.OldList +isRight from Data.Either +isSigned from Data.Bits +iterate from GHC.List +join from GHC.Base +killThread from GHC.Conc.Sync +lastDef from Protolude.Safe +lastMay from Protolude.Safe +lcm from GHC.Real +leftToMaybe from Protolude.Either +lefts from Data.Either +length from Data.Foldable +lenientDecode from Data.Text.Encoding.Error +lift from Control.Monad.Trans.Class +liftA from GHC.Base +liftA2 from GHC.Base +liftA3 from GHC.Base +liftAA2 from Protolude.Applicative +liftIO from Control.Monad.IO.Class +liftIO1 from Protolude +liftIO2 from Protolude +liftM from GHC.Base +liftM' from Protolude.Monad +liftM2 from GHC.Base +liftM2' from Protolude.Monad +liftM3 from GHC.Base +liftM4 from GHC.Base +liftM5 from GHC.Base +lines from Data.Text +link from Control.Concurrent.Async +link2 from Control.Concurrent.Async +list from Protolude.List +listToMaybe from Data.Maybe +local from Control.Monad.Reader.Class +log from GHC.Float +log1mexp from GHC.Float +log1p from GHC.Float +log1pexp from GHC.Float +logBase from GHC.Float +magnitude from Data.Complex +many from GHC.Base +map from Protolude +mapAccumL from Data.Traversable +mapAccumR from Data.Traversable +mapAndUnzipM from Control.Monad +mapExcept from Control.Monad.Trans.Except +mapExceptT from Control.Monad.Trans.Except +mapException from Control.Exception.Base +mapM from Data.Traversable +mapM_ from Data.Foldable +mapMaybe from Data.Maybe +mappend from GHC.Base +mask from GHC.IO +mask_ from GHC.IO +max from GHC.Classes +maxBound from GHC.Enum +maxInt from GHC.Base +maximum from Data.Foldable +maximumBy from Data.Foldable +maximumDef from Protolude.Safe +maximumMay from Protolude.Safe +maybe from Data.Maybe +maybeEmpty from Protolude.Either +maybeToEither from Protolude.Either +maybeToLeft from Protolude.Either +maybeToList from Data.Maybe +maybeToRight from Protolude.Either +mconcat from GHC.Base +mempty from GHC.Base +mfilter from Control.Monad +min from GHC.Classes +minBound from GHC.Enum +minInt from GHC.Base +minimum from Data.Foldable +minimumBy from Data.Foldable +minimumDef from Protolude.Safe +minimumMay from Protolude.Safe +mkPolar from Data.Complex +mkWeakMVar from Control.Concurrent.MVar +mkWeakThreadId from GHC.Conc.Sync +mod from GHC.Real +modify from Control.Monad.State.Class +modifyMVar from Control.Concurrent.MVar +modifyMVarMasked from Control.Concurrent.MVar +modifyMVarMasked_ from Control.Concurrent.MVar +modifyMVar_ from Control.Concurrent.MVar +moduleName from GHC.Generics +mplus from GHC.Base +msum from Data.Foldable +mtimesDefault from Data.Semigroup +myThreadId from GHC.Conc.Sync +mzero from GHC.Base +natVal from GHC.TypeLits +negate from GHC.Num +newChan from Control.Concurrent.Chan +newEmptyMVar from GHC.MVar +newMVar from GHC.MVar +newQSem from Control.Concurrent.QSem +newQSemN from Control.Concurrent.QSemN +nonEmpty from Data.List.NonEmpty +not from GHC.Classes +notANumber from GHC.Real +notElem from Data.Foldable +notImplemented from Debug +note from Protolude.Exceptions +null from Data.Foldable +numerator from GHC.Real +numericEnumFrom from GHC.Real +numericEnumFromThen from GHC.Real +numericEnumFromThenTo from GHC.Real +numericEnumFromTo from GHC.Real +objectName from GHC.ExecutionStack.Internal +odd from GHC.Real +on from Data.Function +onException from Control.Exception.Base +one from Protolude.Semiring +openFile from GHC.IO.Handle.FD +option from Data.Semigroup +optional from Control.Applicative +or from Data.Foldable +orAlt from Protolude.Applicative +orElse from GHC.Conc.Sync +orEmpty from Protolude.Applicative +ord from GHC.Base +ordNub from Protolude.List +otherwise from GHC.Base +overflowError from GHC.Real +packageName from GHC.Generics +panic from Protolude.Panic +partitionEithers from Data.Either +pass from Protolude +permutations from Data.OldList +phase from Data.Complex +pi from GHC.Float +polar from Data.Complex +poll from Control.Concurrent.Async +popCount from Data.Bits +popCountDefault from Data.Bits +pred from GHC.Enum +prettyCallStack from GHC.Exception +prettySrcLoc from GHC.Exception +print from Protolude +product from Protolude.List +properFraction from GHC.Real +pure from GHC.Base +purer from Protolude.Applicative +put from Control.Monad.State.Class +putByteString from Protolude.Show +putErrLn from Protolude.Show +putErrText from Protolude.Show +putLByteString from Protolude.Show +putLText from Protolude.Show +putMVar from GHC.MVar +putStr from Protolude.Show +putStrLn from Protolude.Show +putText from Protolude.Show +quot from GHC.Real +quotRem from GHC.Real +race from Control.Concurrent.Async +race_ from Control.Concurrent.Async +ratioPrec from GHC.Real +ratioPrec1 from GHC.Real +ratioZeroDenominatorError from GHC.Real +readChan from Control.Concurrent.Chan +readEither from Text.Read +readFile from Data.Text.IO +readMVar from GHC.MVar +readMaybe from Text.Read +reader from Control.Monad.Reader.Class +reads from Text.Read +realPart from Data.Complex +realToFrac from GHC.Real +recip from GHC.Real +reduce from GHC.Real +rem from GHC.Real +repeat from GHC.List +replace from Data.Text.Encoding.Error +replicate from GHC.List +replicateM from Control.Monad +replicateM_ from Control.Monad +repr from Data.Type.Coercion +retry from GHC.Conc.Sync +return from GHC.Base +reverse from GHC.List +rightToMaybe from Protolude.Either +rights from Data.Either +rnf from Control.DeepSeq +rotate from Data.Bits +rotateL from Data.Bits +rotateR from Data.Bits +round from GHC.Real +rtsSupportsBoundThreads from Control.Concurrent +runConcurrently from Control.Concurrent.Async +runExcept from Control.Monad.Trans.Except +runExceptT from Control.Monad.Trans.Except +runIdentity from Data.Functor.Identity +runInBoundThread from Control.Concurrent +runInUnboundThread from Control.Concurrent +runReader from Control.Monad.Trans.Reader +runReaderT from Control.Monad.Trans.Reader +runST from GHC.ST +runState from Control.Monad.Trans.State.Lazy +runStateT from Control.Monad.Trans.State.Lazy +scaleFloat from GHC.Float +scanl from GHC.List +scanl' from GHC.List +scanr from GHC.List +sconcat from Data.Semigroup +second from Data.Bifunctor +selDecidedStrictness from GHC.Generics +selName from GHC.Generics +selSourceStrictness from GHC.Generics +selSourceUnpackedness from GHC.Generics +seq from GHC.Prim +sequence from Data.Traversable +sequenceA from Data.Traversable +sequenceA_ from Data.Foldable +sequence_ from Data.Foldable +setBit from Data.Bits +setNumCapabilities from GHC.Conc.Sync +shift from Data.Bits +shiftL from Data.Bits +shiftR from Data.Bits +show from Protolude +showStackTrace from GHC.ExecutionStack +signalQSem from Control.Concurrent.QSem +signalQSemN from Control.Concurrent.QSemN +significand from GHC.Float +signum from GHC.Num +sin from GHC.Float +sinh from GHC.Float +snd from Data.Tuple +some from GHC.Base +someNatVal from GHC.TypeLits +someSymbolVal from GHC.TypeLits +sort from Data.OldList +sortBy from Data.OldList +sortOn from Protolude.List +sourceColumn from GHC.ExecutionStack.Internal +sourceFile from GHC.ExecutionStack.Internal +sourceLine from GHC.ExecutionStack.Internal +splitAt from GHC.List +sqrt from GHC.Float +srcLoc from GHC.ExecutionStack.Internal +state from Control.Monad.State.Class +stderr from GHC.IO.Handle.FD +stdin from GHC.IO.Handle.FD +stdout from GHC.IO.Handle.FD +stimes from Data.Semigroup +stimesIdempotent from Data.Semigroup +stimesIdempotentMonoid from Data.Semigroup +stimesMonoid from Data.Semigroup +strConv from Protolude.Conv +strictDecode from Data.Text.Encoding.Error +subsequences from Data.OldList +subtract from GHC.Num +succ from GHC.Enum +sum from Protolude.List +swap from Data.Tuple +swapMVar from Control.Concurrent.MVar +sym from Data.Type.Equality +symbolVal from GHC.TypeLits +tailDef from Protolude.Safe +tailMay from Protolude.Safe +tailSafe from Protolude.Safe +tails from Data.OldList +take from GHC.List +takeMVar from GHC.MVar +takeWhile from GHC.List +tan from GHC.Float +tanh from GHC.Float +testBit from Data.Bits +testBitDefault from Data.Bits +threadCapability from GHC.Conc.Sync +threadDelay from GHC.Conc.IO +threadWaitRead from Control.Concurrent +threadWaitReadSTM from Control.Concurrent +threadWaitWrite from Control.Concurrent +threadWaitWriteSTM from Control.Concurrent +throwE from Control.Monad.Trans.Except +throwError from Control.Monad.Error.Class +throwIO from Protolude +throwSTM from GHC.Conc.Sync +throwTo from Protolude +to from GHC.Generics +toEnum from GHC.Enum +toException from GHC.Exception +toInteger from GHC.Real +toIntegralSized from Data.Bits +toList from Data.Foldable +toRational from GHC.Real +toS from Protolude.Conv +toSL from Protolude.Conv +toStrict from Data.Text.Lazy +trace from Debug +traceIO from Debug +traceId from Debug +traceM from Debug +traceShow from Debug +traceShowId from Debug +traceShowM from Debug +trans from Data.Type.Equality +transpose from Data.OldList +traverse from Data.Traversable +traverse_ from Data.Foldable +truncate from GHC.Real +try from Control.Exception.Base +tryIO from Protolude.Exceptions +tryJust from Control.Exception.Base +tryPutMVar from GHC.MVar +tryReadMVar from GHC.MVar +tryTakeMVar from GHC.MVar +typeRep from Data.Typeable.Internal +unComp1 from GHC.Generics +unGetChan from Control.Concurrent.Chan +unK1 from GHC.Generics +unM1 from GHC.Generics +uncons from Protolude +uncurry from Data.Tuple +undefined from Debug +unfoldr from Data.OldList +uninterruptibleMask from GHC.IO +uninterruptibleMask_ from GHC.IO +unless from Control.Monad +unlessM from Protolude.Bool +unlines from Data.Text +unsnoc from Protolude +until from GHC.Base +unwords from Data.Text +unzip from GHC.List +vacuous from Data.Void +void from Data.Functor +wait from Control.Concurrent.Async +waitAny from Control.Concurrent.Async +waitAnyCancel from Control.Concurrent.Async +waitAnyCatch from Control.Concurrent.Async +waitAnyCatchCancel from Control.Concurrent.Async +waitBoth from Control.Concurrent.Async +waitCatch from Control.Concurrent.Async +waitEither from Control.Concurrent.Async +waitEitherCancel from Control.Concurrent.Async +waitEitherCatch from Control.Concurrent.Async +waitEitherCatchCancel from Control.Concurrent.Async +waitEither_ from Control.Concurrent.Async +waitQSem from Control.Concurrent.QSem +waitQSemN from Control.Concurrent.QSemN +when from GHC.Base +whenM from Protolude.Bool +withAsync from Control.Concurrent.Async +withAsyncBound from Control.Concurrent.Async +withAsyncOn from Control.Concurrent.Async +withExcept from Control.Monad.Trans.Except +withExceptT from Control.Monad.Trans.Except +withFile from System.IO +withFrozenCallStack from GHC.Stack +withMVar from Control.Concurrent.MVar +withMVarMasked from Control.Concurrent.MVar +withState from Control.Monad.Trans.State.Lazy +witness from Debug +words from Data.Text +writeChan from Control.Concurrent.Chan +writeFile from Data.Text.IO +writeList2Chan from Control.Concurrent.Chan +xor from Data.Bits +zero from Protolude.Semiring +zeroBits from Data.Bits +zip from GHC.List +zipWith from GHC.List +zipWithM from Control.Monad +zipWithM_ from Control.Monad +|| from GHC.Classes +||^ from Protolude.Bool diff --git a/protolude.cabal b/protolude.cabal index 40c8e20e0f..46af9f2305 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.2.4 +version: 0.3.0 synopsis: A small prelude. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude @@ -7,7 +7,7 @@ license: MIT license-file: LICENSE author: Stephen Diehl maintainer: stephen.m.diehl@gmail.com -copyright: 2016-2019 Stephen Diehl +copyright: 2016-2020 Stephen Diehl category: Prelude build-type: Simple cabal-version: >=1.10 @@ -28,33 +28,41 @@ tested-with: GHC == 8.4.1, GHC == 8.6.1, GHC == 8.8.1 -extra-source-files: README.md CHANGES.md + GHC == 8.10.1 +extra-source-files: README.md ChangeLog.md + +flag dev + description: Build development tools + manual: True + default: False Source-Repository head type: git - location: git@github.com:sdiehl/protolude.git + location: git@github.com:protolude/protolude.git library exposed-modules: Protolude - Unsafe - Debug - Protolude.Exceptions Protolude.Base - Protolude.Applicative - Protolude.Bool - Protolude.List Protolude.Monad + Protolude.Safe + Protolude.List + Protolude.Bool Protolude.Show Protolude.Conv + Protolude.ConvertText Protolude.Either Protolude.Functor Protolude.Semiring Protolude.Bifunctor - Protolude.CallStack + Protolude.Applicative Protolude.Error Protolude.Panic - Protolude.Safe + Protolude.CallStack + Protolude.Exceptions + Protolude.Partial + Protolude.Debug + Protolude.Unsafe default-extensions: NoImplicitPrelude @@ -81,6 +89,26 @@ library mtl >= 2.1 && <2.3, mtl-compat >= 0.2 && <0.3, transformers-compat >= 0.4 && <0.7 + if !impl(ghc >= 8.0) + Build-Depends: fail >= 4.9 && <4.10 hs-source-dirs: src default-language: Haskell2010 + +executable exports + main-is: Exports.hs + default-language: Haskell2010 + if flag(dev) + buildable: True + else + buildable: False + build-depends: + protolude, + base >= 4.6 && <4.14, + ghc, + ghc-paths, + directory, + process, + transformers, + mtl, + filepath diff --git a/src/Protolude.hs b/src/Protolude.hs index 9d302d320e..2c0e6401d1 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -1,50 +1,158 @@ -{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE Trustworthy #-} +{-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ExplicitNamespaces #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Protolude ( - module X, + -- * Base functions module Base, identity, + pass, +#if !MIN_VERSION_base(4,8,0) + (&), + scanl', +#endif + -- * Function functions + module Function, + applyN, + -- * List functions + module List, map, uncons, unsnoc, - applyN, - print, - throwIO, - throwTo, + -- * Data Structures + module DataStructures, + -- * Show functions + module Show, show, - pass, - guarded, - guardedA, - LText, - LByteString, + print, + -- * Bool functions + module Bool, + -- * Monad functions + module Monad, liftIO1, liftIO2, -#if !MIN_VERSION_base(4,8,0) - (&), - scanl', + -- * Functor functions + module Functor, + -- * Either functions + module Either, + -- * Applicative functions + module Applicative, + guarded, + guardedA, + -- * String conversion + module ConvertText, + -- * Debug functions + module Debug, + + -- * Panic functions + module Panic, + -- * Exception functions + module Exception, + Protolude.throwIO, + Protolude.throwTo, + -- * Semiring functions + module Semiring, + + -- * String functions + module String, + -- * Safe functions + module Safe, + -- * Eq functions + module Eq, + -- * Ord functions + module Ord, + -- * Traversable functions + module Traversable, + -- * Foldable functions + module Foldable, + -- * Semigroup functions +#if MIN_VERSION_base(4,9,0) + module Semigroup, #endif + -- * Monoid functions + module Monoid, + -- * Bifunctor functions + module Bifunctor, + -- * Bifunctor functions + module Hashable, + + -- * Deepseq functions + module DeepSeq, + + -- * Tuple functions + module Tuple, + + module Typeable, + +#if MIN_VERSION_base(4,7,0) + -- * Typelevel programming + module Typelevel, +#endif + + -- * Monads + module Fail, + module State, + module Reader, + module Except, + module Trans, + module ST, + module STM, + + -- * Integers + module Int, + module Bits, + + -- * Complex functions + module Complex, + + -- * Char functions + module Char, + + -- * Maybe functions + module Maybe, + + -- * Generics functions + module Generics, + + -- * ByteString functions + module ByteString, + LByteString, + + -- * Text functions + module Text, + LText, + + -- * Read functions + module Read, + + -- * System functions + module System, die, + + -- * Concurrency functions + module Concurrency, + + -- * Foreign functions + module Foreign, ) where -- Protolude module exports. -import Debug as X -import Protolude.List as X -import Protolude.Show as X -import Protolude.Bool as X -import Protolude.Monad as X -import Protolude.Functor as X -import Protolude.Either as X -import Protolude.Applicative as X -import Protolude.Conv as X -import Protolude.Panic as X -import Protolude.Exceptions as X -import Protolude.Semiring as X +import Protolude.Debug as Debug +import Protolude.List as List +import Protolude.Show as Show +import Protolude.Bool as Bool +import Protolude.Monad as Monad +import Protolude.Functor as Functor +import Protolude.Either as Either +import Protolude.Applicative as Applicative +import Protolude.ConvertText as ConvertText +import Protolude.Panic as Panic +import Protolude.Exceptions as Exception +import Protolude.Semiring as Semiring import Protolude.Base as Base hiding ( putStr -- Overriden by Show.putStr @@ -61,10 +169,10 @@ import qualified Protolude.Base as PBase -- Used for 'show', not exported. import Data.String (String) -import Data.String as X (IsString) +import Data.String as String (IsString) -- Maybe'ized version of partial functions -import Protolude.Safe as X ( +import Protolude.Safe as Safe ( headMay , headDef , initMay @@ -87,11 +195,11 @@ import Protolude.Safe as X ( ) -- Applicatives -import Control.Applicative as X ( +import Control.Applicative as Applicative ( Applicative(..) , Alternative(..) - , Const(..) - , ZipList(..) + , Const(Const,getConst) + , ZipList(ZipList,getZipList) , (<**>) , liftA , liftA2 @@ -100,32 +208,63 @@ import Control.Applicative as X ( ) -- Base typeclasses -import Data.Eq as X ( +import Data.Eq as Eq ( Eq(..) ) -import Data.Ord as X ( +import Data.Ord as Ord ( Ord(..) - , Ordering(..) - , Down(..) + , Ordering(LT,EQ,GT) + , Down(Down) , comparing ) -import Data.Traversable as X -import Data.Foldable as X hiding ( - foldr1 - , foldl1 - , product - , sum +import Data.Traversable as Traversable +import Data.Foldable as Foldable ( + Foldable, + fold, + foldMap, + foldr, + foldr', + foldl, + foldl', + toList, +#if MIN_VERSION_base(4,8,0) + null, + length, +#endif + elem, + maximum, + minimum, + foldrM, + foldlM, + traverse_, + for_, + mapM_, + forM_, + sequence_, + sequenceA_, + asum, + msum, + concat, + concatMap, + and, + or, + any, + all, + maximumBy, + minimumBy, + notElem, + find, ) -import Data.Functor.Identity as X ( - Identity(..) +import Data.Functor.Identity as Functor ( + Identity(Identity, runIdentity) ) #if MIN_VERSION_base(4,9,0) -import Data.List.NonEmpty as X ( - NonEmpty(..) +import Data.List.NonEmpty as List ( + NonEmpty((:|)) , nonEmpty ) -import Data.Semigroup as X ( +import Data.Semigroup as Semigroup ( Semigroup(sconcat, stimes) , WrappedMonoid , Option(..) @@ -139,16 +278,16 @@ import Data.Semigroup as X ( ) #endif -import Data.Monoid as X +import Data.Monoid as Monoid #if !MIN_VERSION_base(4,8,0) -import Protolude.Bifunctor as X (Bifunctor(..)) +import Protolude.Bifunctor as Bifunctor (Bifunctor(bimap, first, second)) #else -import Data.Bifunctor as X (Bifunctor(..)) +import Data.Bifunctor as Bifunctor (Bifunctor(bimap, first, second)) #endif -- Deepseq -import Control.DeepSeq as X ( +import Control.DeepSeq as DeepSeq ( NFData(..) , ($!!) , deepseq @@ -156,7 +295,7 @@ import Control.DeepSeq as X ( ) -- Data structures -import Data.Tuple as X ( +import Data.Tuple as Tuple ( fst , snd , curry @@ -164,7 +303,7 @@ import Data.Tuple as X ( , swap ) -import Data.List as X ( +import Data.List as List ( splitAt , break , intercalate @@ -211,39 +350,43 @@ import Data.List (tail) #endif -- Hashing -import Data.Hashable as X ( +import Data.Hashable as Hashable ( Hashable , hash , hashWithSalt , hashUsing ) -import Data.Map as X (Map) -import Data.Set as X (Set) -import Data.Sequence as X (Seq) -import Data.IntMap as X (IntMap) -import Data.IntSet as X (IntSet) - -#if MIN_VERSION_base(4,7,0) -import Data.Proxy as X ( - Proxy(..) - ) +import Data.Map as DataStructures (Map) +import Data.Set as DataStructures (Set) +import Data.Sequence as DataStructures (Seq) +import Data.IntMap as DataStructures (IntMap) +import Data.IntSet as DataStructures (IntSet) -import Data.Typeable as X ( +import Data.Typeable as Typeable ( TypeRep , Typeable - , typeRep + , typeOf , cast + , gcast +#if MIN_VERSION_base(4,7,0) + , typeRep , eqT +#endif + ) + +#if MIN_VERSION_base(4,7,0) +import Data.Proxy as Typelevel ( + Proxy(..) ) -import Data.Type.Coercion as X ( +import Data.Type.Coercion as Typelevel ( Coercion(..) , coerceWith , repr ) -import Data.Type.Equality as X ( +import Data.Type.Equality as Typelevel ( (:~:)(..) , type (==) , sym @@ -255,15 +398,19 @@ import Data.Type.Equality as X ( #endif #if MIN_VERSION_base(4,8,0) -import Data.Void as X ( +import Data.Void as Typelevel ( Void , absurd , vacuous ) #endif +import Control.Monad.Fail as Fail ( + MonadFail + ) + -- Monad transformers -import Control.Monad.State as X ( +import Control.Monad.State as State ( MonadState , State , StateT(StateT) @@ -283,7 +430,7 @@ import Control.Monad.State as X ( , evalStateT ) -import Control.Monad.Reader as X ( +import Control.Monad.Reader as Reader ( MonadReader , Reader , ReaderT(ReaderT) @@ -295,12 +442,12 @@ import Control.Monad.Reader as X ( , runReaderT ) -import Control.Monad.Trans.Except as X ( +import Control.Monad.Trans.Except as Except ( throwE , catchE ) -import Control.Monad.Except as X ( +import Control.Monad.Except as Except ( MonadError , Except , ExceptT(ExceptT) @@ -314,25 +461,60 @@ import Control.Monad.Except as X ( , withExceptT ) -import Control.Monad.Trans as X ( +import Control.Monad.Trans as Trans ( MonadIO , lift , liftIO ) -- Base types -import Data.Int as X ( +import Data.Int as Int ( Int , Int8 , Int16 , Int32 , Int64 ) -import Data.Bits as X hiding ( - unsafeShiftL - , unsafeShiftR +import Data.Bits as Bits ( + Bits, + (.&.), + (.|.), + xor, + complement, + shift, + rotate, +#if MIN_VERSION_base(4,7,0) + zeroBits, +#endif + bit, + setBit, + clearBit, + complementBit, + testBit, +#if MIN_VERSION_base(4,7,0) + bitSizeMaybe, +#endif + bitSize, + isSigned, + shiftL, + shiftR, + rotateL, + rotateR, + popCount, +#if MIN_VERSION_base(4,7,0) + FiniteBits, + finiteBitSize, + bitDefault, + testBitDefault, + popCountDefault, +#endif +#if MIN_VERSION_base(4,8,0) + toIntegralSized, + countLeadingZeros, + countTrailingZeros, +#endif ) -import Data.Word as X ( +import Data.Word as Bits ( Word , Word8 , Word16 @@ -345,8 +527,8 @@ import Data.Word as X ( #endif ) -import Data.Either as X ( - Either(..) +import Data.Either as Either ( + Either(Left,Right) , either , lefts , rights @@ -357,8 +539,8 @@ import Data.Either as X ( #endif ) -import Data.Complex as X ( - Complex(..) +import Data.Complex as Complex ( + Complex((:+)) , realPart , imagPart , mkPolar @@ -368,11 +550,47 @@ import Data.Complex as X ( , phase , conjugate ) -import Data.Char as X (chr) -import Data.Bool as X hiding (bool) -import Data.Maybe as X hiding (fromJust) +import Data.Char as Char ( + Char + , ord + , chr + , digitToInt + , intToDigit + , toUpper + , toLower + , toTitle + , isAscii + , isLetter + , isDigit + , isHexDigit + , isPrint + , isAlpha + , isAlphaNum + , isUpper + , isLower + , isSpace + , isControl + ) +import Data.Bool as Bool ( + Bool(True, False), + (&&), + (||), + not, + otherwise + ) +import Data.Maybe as Maybe ( + Maybe(Nothing, Just) + , maybe + , isJust + , isNothing + , fromMaybe + , listToMaybe + , maybeToList + , catMaybes + , mapMaybe + ) -import Data.Function as X ( +import Data.Function as Function ( const , (.) , ($) @@ -385,7 +603,7 @@ import Data.Function as X ( ) -- Genericss -import GHC.Generics as X ( +import GHC.Generics as Generics ( Generic(..) , Generic1 , Rep @@ -414,10 +632,10 @@ import GHC.Generics as X ( -- ByteString import qualified Data.ByteString.Lazy -import Data.ByteString as X (ByteString) +import Data.ByteString as ByteString (ByteString) -- Text -import Data.Text as X ( +import Data.Text as Text ( Text , lines , words @@ -426,7 +644,7 @@ import Data.Text as X ( ) import qualified Data.Text.Lazy -import Data.Text.IO as X ( +import Data.Text.IO as Text ( getLine , getContents , interact @@ -435,19 +653,19 @@ import Data.Text.IO as X ( , appendFile ) -import Data.Text.Lazy as X ( +import Data.Text.Lazy as Text ( toStrict , fromStrict ) -import Data.Text.Encoding as X ( +import Data.Text.Encoding as Text ( encodeUtf8 , decodeUtf8 , decodeUtf8' , decodeUtf8With ) -import Data.Text.Encoding.Error as X ( +import Data.Text.Encoding.Error as Text ( OnDecodeError , OnError , UnicodeException @@ -458,15 +676,15 @@ import Data.Text.Encoding.Error as X ( ) -- IO -import System.Environment as X (getArgs) +import System.Environment as System (getArgs) import qualified System.Exit -import System.Exit as X ( +import System.Exit as System ( ExitCode(..) , exitWith , exitFailure , exitSuccess ) -import System.IO as X ( +import System.IO as System ( Handle , FilePath , IOMode(..) @@ -478,24 +696,92 @@ import System.IO as X ( ) -- ST -import Control.Monad.ST as X ( +import Control.Monad.ST as ST ( ST , runST , fixST ) -- Concurrency and Parallelism -import Control.Exception as X hiding ( - throw -- Impure throw is forbidden. - , throwIO - , throwTo - , assert - , Handler(..) +import Control.Exception as Exception ( + Exception, + toException, + fromException, +#if MIN_VERSION_base(4,8,0) + displayException, +#endif + SomeException(SomeException) + , IOException + , ArithException( + Overflow, + Underflow, + LossOfPrecision, + DivideByZero, + Denormal, + RatioZeroDenominator + ) + , ArrayException(IndexOutOfBounds, UndefinedElement) + , AssertionFailed(AssertionFailed) +#if MIN_VERSION_base(4,7,0) + , SomeAsyncException(SomeAsyncException) + , asyncExceptionToException + , asyncExceptionFromException +#endif + , AsyncException(StackOverflow, HeapOverflow, ThreadKilled, UserInterrupt) + , NonTermination(NonTermination) + , NestedAtomically(NestedAtomically) + , BlockedIndefinitelyOnMVar(BlockedIndefinitelyOnMVar) + , BlockedIndefinitelyOnSTM(BlockedIndefinitelyOnSTM) +#if MIN_VERSION_base(4,8,0) + , AllocationLimitExceeded(AllocationLimitExceeded) +#endif +#if MIN_VERSION_base(4,10,0) + , CompactionFailed(CompactionFailed) +#endif + , Deadlock(Deadlock) + , NoMethodError(NoMethodError) + , PatternMatchFail(PatternMatchFail) + , RecConError(RecConError) + , RecSelError(RecSelError) + , RecUpdError(RecUpdError) +#if MIN_VERSION_base(4,9,0) + , ErrorCall(ErrorCall, ErrorCallWithLocation) +#else + , ErrorCall(ErrorCall) +#endif +#if MIN_VERSION_base(4,9,0) + , TypeError(TypeError) +#endif + , ioError + , catch + , catches + , Handler(Handler) + , catchJust + , handle + , handleJust + , try + , tryJust + , evaluate + , mapException + , mask + , mask_ + , uninterruptibleMask + , uninterruptibleMask_ + , MaskingState(..) + , getMaskingState +#if MIN_VERSION_base(4,9,0) + , interruptible +#endif + , allowInterrupt + , bracket + , bracket_ + , bracketOnError + , finally + , onException ) +import qualified Control.Exception as PException -import qualified Control.Exception - -import Control.Monad.STM as X ( +import Control.Monad.STM as STM ( STM , atomically #if !(MIN_VERSION_stm(2,5,0)) @@ -508,11 +794,84 @@ import Control.Monad.STM as X ( , throwSTM , catchSTM ) -import Control.Concurrent as X hiding ( - throwTo + +import Control.Concurrent.MVar as Concurrency ( + MVar + , newEmptyMVar + , newMVar + , takeMVar + , putMVar + , readMVar + , swapMVar + , tryTakeMVar + , tryPutMVar + , isEmptyMVar + , withMVar +#if MIN_VERSION_base(4,7,0) + , withMVarMasked +#endif + , modifyMVar_ + , modifyMVar + , modifyMVarMasked_ + , modifyMVarMasked +#if MIN_VERSION_base(4,7,0) + , tryReadMVar + , mkWeakMVar +#endif + , addMVarFinalizer + ) +import Control.Concurrent.Chan as Concurrency ( + Chan + , newChan + , writeChan + , readChan + , dupChan + , getChanContents + , writeList2Chan + ) +import Control.Concurrent.QSem as Concurrency ( + QSem + , newQSem + , waitQSem + , signalQSem + ) +import Control.Concurrent.QSemN as Concurrency ( + QSemN + , newQSemN + , waitQSemN + , signalQSemN + ) +import Control.Concurrent as Concurrency ( + ThreadId + , forkIO + , forkFinally + , forkIOWithUnmask + , killThread + , forkOn + , forkOnWithUnmask + , getNumCapabilities + , setNumCapabilities + , threadCapability , yield + , threadDelay + , threadWaitRead + , threadWaitWrite +#if MIN_VERSION_base(4,7,0) + , threadWaitReadSTM + , threadWaitWriteSTM +#endif + , rtsSupportsBoundThreads + , forkOS +#if MIN_VERSION_base(4,9,0) + , forkOSWithUnmask +#endif + , isCurrentThreadBound + , runInBoundThread + , runInUnboundThread + , mkWeakThreadId + , myThreadId ) -import Control.Concurrent.Async as X ( +import Control.Concurrent.Async as Concurrency ( Async(..) , Concurrently(..) , async @@ -544,12 +903,12 @@ import Control.Concurrent.Async as X ( , concurrently ) -import Foreign.Ptr as X (IntPtr, WordPtr) -import Foreign.Storable as X (Storable) -import Foreign.StablePtr as X (StablePtr) +import Foreign.Ptr as Foreign (IntPtr, WordPtr) +import Foreign.Storable as Foreign (Storable) +import Foreign.StablePtr as Foreign (StablePtr) -- Read instances hiding unsafe builtins (read) -import Text.Read as X ( +import Text.Read as Read ( Read , reads , readMaybe @@ -568,44 +927,52 @@ infixl 1 & x & f = f x #endif +-- | The identity function, returns the give value unchanged. identity :: a -> a identity x = x -map :: Functor f => (a -> b) -> f a -> f b -map = fmap +map :: Functor.Functor f => (a -> b) -> f a -> f b +map = Functor.fmap uncons :: [a] -> Maybe (a, [a]) uncons [] = Nothing uncons (x:xs) = Just (x, xs) unsnoc :: [x] -> Maybe ([x],x) -unsnoc = foldr go Nothing +unsnoc = Foldable.foldr go Nothing where go x mxs = Just (case mxs of Nothing -> ([], x) Just (xs, e) -> (x:xs, e)) +-- | Apply a function n times to a given value applyN :: Int -> (a -> a) -> a -> a -applyN n f = X.foldr (.) identity (X.replicate n f) +applyN n f = Foldable.foldr (.) identity (List.replicate n f) -print :: (X.MonadIO m, PBase.Show a) => a -> m () +-- | The print function outputs a value of any printable type to the standard +-- output device. Printable types are those that are instances of class Show; +-- print converts values to strings for output using the show operation and adds +-- a newline. +print :: (Trans.MonadIO m, PBase.Show a) => a -> m () print = liftIO . PBase.print -throwIO :: (X.MonadIO m, Exception e) => e -> m a -throwIO = liftIO . Control.Exception.throwIO +-- | Lifted throwIO +throwIO :: (Trans.MonadIO m, Exception e) => e -> m a +throwIO = liftIO . PException.throwIO -throwTo :: (X.MonadIO m, Exception e) => ThreadId -> e -> m () -throwTo tid e = liftIO (Control.Exception.throwTo tid e) +-- | Lifted throwTo +throwTo :: (Trans.MonadIO m, Exception e) => ThreadId -> e -> m () +throwTo tid e = liftIO (PException.throwTo tid e) -- | Do nothing returning unit inside applicative. pass :: Applicative f => f () pass = pure () guarded :: (Alternative f) => (a -> Bool) -> a -> f a -guarded p x = X.bool empty (pure x) (p x) +guarded p x = Bool.bool empty (pure x) (p x) -guardedA :: (Functor f, Alternative t) => (a -> f Bool) -> a -> f (t a) -guardedA p x = X.bool empty (pure x) <$> p x +guardedA :: (Functor.Functor f, Alternative t) => (a -> f Bool) -> a -> f (t a) +guardedA p x = Bool.bool empty (pure x) `Functor.fmap` p x -- | Lift an 'IO' operation with 1 argument into another monad liftIO1 :: MonadIO m => (a -> IO b) -> a -> m b @@ -615,18 +982,18 @@ liftIO1 = (.) liftIO liftIO2 :: MonadIO m => (a -> b -> IO c) -> a -> b -> m c liftIO2 = ((.).(.)) liftIO -show :: (Show a, StringConv String b) => a -> b -show x = toS (PBase.show x) +show :: (Show a, ConvertText String b) => a -> b +show x = ConvertText.toS (PBase.show x) {-# SPECIALIZE show :: Show a => a -> Text #-} {-# SPECIALIZE show :: Show a => a -> LText #-} -{-# SPECIALIZE show :: Show a => a -> ByteString #-} -{-# SPECIALIZE show :: Show a => a -> LByteString #-} {-# SPECIALIZE show :: Show a => a -> String #-} #if MIN_VERSION_base(4,8,0) +-- | Terminate main process with failure die :: Text -> IO a -die err = System.Exit.die (toS err) +die err = System.Exit.die (ConvertText.toS err) #else +-- | Terminate main process with failure die :: Text -> IO a die err = hPutStrLn stderr err >> exitFailure #endif diff --git a/src/Protolude/Applicative.hs b/src/Protolude/Applicative.hs index cb8431f2c4..0e3c25b35a 100644 --- a/src/Protolude/Applicative.hs +++ b/src/Protolude/Applicative.hs @@ -1,20 +1,21 @@ {-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} -module Protolude.Applicative ( - orAlt, - orEmpty, - eitherA, - purer, - liftAA2, - (<<*>>), -) where +module Protolude.Applicative + ( orAlt, + orEmpty, + eitherA, + purer, + liftAA2, + (<<*>>), + ) +where +import Control.Applicative import Data.Bool (Bool) +import Data.Either (Either (Left, Right)) import Data.Function ((.)) -import Data.Either (Either(..)) -import Data.Monoid (Monoid(..)) -import Control.Applicative +import Data.Monoid (Monoid (mempty)) orAlt :: (Alternative f, Monoid a) => f a -> f a orAlt f = f <|> pure mempty @@ -33,5 +34,5 @@ liftAA2 = liftA2 . liftA2 infixl 4 <<*>> -(<<*>>) :: (Applicative f, Applicative g) => f (g (a -> b)) -> f (g a) -> f (g b) +(<<*>>) :: (Applicative f, Applicative g) => f (g (a -> b)) -> f (g a) -> f (g b) (<<*>>) = liftA2 (<*>) diff --git a/src/Protolude/Base.hs b/src/Protolude/Base.hs index ddc9301b32..d4203ae3be 100644 --- a/src/Protolude/Base.hs +++ b/src/Protolude/Base.hs @@ -1,11 +1,12 @@ {-# LANGUAGE CPP #-} +{-# LANGUAGE MagicHash #-} {-# LANGUAGE Unsafe #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ExplicitNamespaces #-} module Protolude.Base ( - module X, + module Base, ($!), ) where @@ -13,35 +14,118 @@ module Protolude.Base ( #if defined(__GLASGOW_HASKELL__) && ( __GLASGOW_HASKELL__ >= 600 ) -- Base GHC types -import GHC.Num as X ( - Num(..) +import GHC.Num as Base ( + Num( + (+), + (-), + (*), + negate, + abs, + signum, + fromInteger + ) , Integer , subtract ) -import GHC.Enum as X ( - Bounded(..) - , Enum(..) +import GHC.Enum as Base ( + Bounded(minBound, maxBound) + , Enum( + succ, + pred, + toEnum, + fromEnum, + enumFrom, + enumFromThen, + enumFromTo, + enumFromThenTo + ) , boundedEnumFrom , boundedEnumFromThen ) -import GHC.Real as X -import GHC.Float as X ( - Float(..) - , Double(..) +import GHC.Real as Base ( + (%) + , (/) + , Fractional + , Integral + , Ratio + , Rational + , Real + , RealFrac + , (^) + , (^%^) + , (^^) + , (^^%^^) + , ceiling + , denominator + , div + , divMod +#if MIN_VERSION_base(4,7,0) + , divZeroError +#endif + , even + , floor + , fromIntegral + , fromRational + , gcd +#if MIN_VERSION_base(4,9,0) + , gcdInt' + , gcdWord' +#endif + , infinity + , integralEnumFrom + , integralEnumFromThen + , integralEnumFromThenTo + , integralEnumFromTo + , lcm + , mod + , notANumber + , numerator + , numericEnumFrom + , numericEnumFromThen + , numericEnumFromThenTo + , numericEnumFromTo + , odd +#if MIN_VERSION_base(4,7,0) + , overflowError +#endif + , properFraction + , quot + , quotRem + , ratioPrec + , ratioPrec1 +#if MIN_VERSION_base(4,7,0) + , ratioZeroDenominatorError +#endif + , realToFrac + , recip + , reduce + , rem + , round + , showSigned + , toInteger + , toRational + , truncate +#if MIN_VERSION_base(4,12,0) + , underflowError +#endif + ) +import GHC.Float as Base ( + Float(F#) + , Double(D#) , Floating (..) , RealFloat(..) , showFloat , showSignedFloat ) -import GHC.Show as X ( - Show(..) +import GHC.Show as Base ( + Show(showsPrec, show, showList) ) -import GHC.Exts as X ( +import GHC.Exts as Base ( Constraint , Ptr , FunPtr ) -import GHC.Base as X ( +import GHC.Base as Base ( (++) , seq , asTypeOf @@ -52,13 +136,13 @@ import GHC.Base as X ( ) -- Exported for lifting into new functions. -import System.IO as X ( +import System.IO as Base ( print , putStr , putStrLn ) -import GHC.Types as X ( +import GHC.Types as Base ( Bool , Char , Int @@ -71,22 +155,22 @@ import GHC.Types as X ( ) #if ( __GLASGOW_HASKELL__ >= 710 ) -import GHC.StaticPtr as X (StaticPtr) +import GHC.StaticPtr as Base (StaticPtr) #endif #if ( __GLASGOW_HASKELL__ >= 800 ) -import GHC.OverloadedLabels as X ( - IsLabel(..) +import GHC.OverloadedLabels as Base ( + IsLabel(fromLabel) ) -import GHC.ExecutionStack as X ( - Location(..) - , SrcLoc(..) +import GHC.ExecutionStack as Base ( + Location(Location, srcLoc, objectName, functionName) + , SrcLoc(SrcLoc, sourceColumn, sourceLine, sourceColumn) , getStackTrace , showStackTrace ) -import GHC.Stack as X ( +import GHC.Stack as Base ( CallStack , type HasCallStack , callStack @@ -99,11 +183,11 @@ import GHC.Stack as X ( #endif #if ( __GLASGOW_HASKELL__ >= 710 ) -import GHC.TypeLits as X ( +import GHC.TypeLits as Base ( Symbol - , SomeSymbol(..) + , SomeSymbol(SomeSymbol) , Nat - , SomeNat(..) + , SomeNat(SomeNat) , CmpNat , KnownSymbol , KnownNat @@ -115,13 +199,13 @@ import GHC.TypeLits as X ( #endif #if ( __GLASGOW_HASKELL__ >= 802 ) -import GHC.Records as X ( - HasField(..) +import GHC.Records as Base ( + HasField(getField) ) #endif #if ( __GLASGOW_HASKELL__ >= 800 ) -import Data.Kind as X ( +import Data.Kind as Base ( type Type #if ( __GLASGOW_HASKELL__ < 805 ) , type (*) diff --git a/src/Protolude/Bifunctor.hs b/src/Protolude/Bifunctor.hs index 185c98b01d..6dd9ad4ab2 100644 --- a/src/Protolude/Bifunctor.hs +++ b/src/Protolude/Bifunctor.hs @@ -1,13 +1,17 @@ {-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} -module Protolude.Bifunctor ( - Bifunctor(..) -) where - -import Data.Function (id, (.)) -import Data.Either (Either(..)) -import Control.Applicative ( Const(..) ) +module Protolude.Bifunctor + ( Bifunctor, + bimap, + first, + second, + ) +where + +import Control.Applicative (Const (Const)) +import Data.Either (Either (Left, Right)) +import Data.Function ((.), id) class Bifunctor p where {-# MINIMAL bimap | first, second #-} diff --git a/src/Protolude/Bool.hs b/src/Protolude/Bool.hs index 834e35c2e2..ed987c809a 100644 --- a/src/Protolude/Bool.hs +++ b/src/Protolude/Bool.hs @@ -13,7 +13,7 @@ module Protolude.Bool ( , (<||>) ) where -import Data.Bool (Bool(..), (&&), (||)) +import Data.Bool (Bool(True, False), (&&), (||)) import Data.Function (flip) import Control.Applicative(Applicative, liftA2) import Control.Monad (Monad, MonadPlus, return, when, unless, guard, (>>=), (=<<)) diff --git a/src/Protolude/Conv.hs b/src/Protolude/Conv.hs index eca4f07675..47a1167dcb 100644 --- a/src/Protolude/Conv.hs +++ b/src/Protolude/Conv.hs @@ -2,11 +2,14 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} +-- | An alternative to 'Protolude.ConvertText' that includes +-- partial conversions. Not re-exported by 'Protolude'. module Protolude.Conv ( - StringConv (..) + StringConv +, strConv , toS , toSL -, Leniency (..) +, Leniency (Lenient, Strict) ) where import Data.ByteString.Char8 as B @@ -18,8 +21,8 @@ import Data.Text.Lazy as LT import Data.Text.Lazy.Encoding as LT import Protolude.Base -import Data.Eq (Eq(..)) -import Data.Ord (Ord(..)) +import Data.Eq (Eq) +import Data.Ord (Ord) import Data.Function ((.), id) import Data.String (String) import Control.Applicative (pure) diff --git a/src/Protolude/ConvertText.hs b/src/Protolude/ConvertText.hs new file mode 100644 index 0000000000..ae9b967fea --- /dev/null +++ b/src/Protolude/ConvertText.hs @@ -0,0 +1,44 @@ +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE Safe #-} + +-- | Non-partial text conversion typeclass and functions. +-- For an alternative with partial conversions import 'Protolude.Conv'. +module Protolude.ConvertText ( + ConvertText (toS) +, toUtf8 +, toUtf8Lazy +) where + +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as LB +import qualified Data.Text as T +import qualified Data.Text.Lazy as LT + +import Data.Function (id, (.)) +import Data.String (String) +import Data.Text.Encoding (encodeUtf8) + +-- | Convert from one Unicode textual type to another. Not for serialization/deserialization, +-- so doesn't have instances for bytestrings. +class ConvertText a b where + toS :: a -> b + +instance ConvertText String String where toS = id +instance ConvertText String T.Text where toS = T.pack +instance ConvertText String LT.Text where toS = LT.pack + +instance ConvertText T.Text String where toS = T.unpack +instance ConvertText T.Text LT.Text where toS = LT.fromStrict +instance ConvertText T.Text T.Text where toS = id + +instance ConvertText LT.Text String where toS = LT.unpack +instance ConvertText LT.Text T.Text where toS = LT.toStrict +instance ConvertText LT.Text LT.Text where toS = id + +toUtf8 :: ConvertText a T.Text => a -> B.ByteString +toUtf8 = + encodeUtf8 . toS + +toUtf8Lazy :: ConvertText a T.Text => a -> LB.ByteString +toUtf8Lazy = + LB.fromStrict . encodeUtf8 . toS diff --git a/src/Debug.hs b/src/Protolude/Debug.hs similarity index 98% rename from src/Debug.hs rename to src/Protolude/Debug.hs index 292adbf9cf..056fabe09a 100644 --- a/src/Debug.hs +++ b/src/Protolude/Debug.hs @@ -2,7 +2,7 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} -module Debug ( +module Protolude.Debug ( undefined, trace, traceM, diff --git a/src/Protolude/Either.hs b/src/Protolude/Either.hs index ba3d81dc44..7cf955a403 100644 --- a/src/Protolude/Either.hs +++ b/src/Protolude/Either.hs @@ -15,8 +15,8 @@ module Protolude.Either ( import Data.Function (const) import Data.Monoid (Monoid, mempty) -import Data.Maybe (Maybe(..), maybe) -import Data.Either (Either(..), either) +import Data.Maybe (Maybe(Nothing, Just), maybe) +import Data.Either (Either(Left, Right), either) #if MIN_VERSION_base(4,10,0) import Data.Either (fromLeft, fromRight) #else diff --git a/src/Protolude/Error.hs b/src/Protolude/Error.hs index d8803ed531..deb83fa3cd 100644 --- a/src/Protolude/Error.hs +++ b/src/Protolude/Error.hs @@ -1,6 +1,6 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE MagicHash #-} {-# LANGUAGE PolyKinds #-} +{-# LANGUAGE MagicHash #-} {-# LANGUAGE ImplicitParams #-} {-# LANGUAGE ExistentialQuantification #-} #if ( __GLASGOW_HASKELL__ >= 800 ) @@ -15,12 +15,12 @@ module Protolude.Error ( error ) where -import GHC.Prim import Data.Text (Text, unpack) #if MIN_VERSION_base(4,9,0) -- Full stack trace. +import GHC.Prim (TYPE, raise#) import GHC.Types (RuntimeRep) import Protolude.CallStack (HasCallStack) import GHC.Exception (errorCallWithCallStackException) @@ -32,6 +32,7 @@ error s = raise# (errorCallWithCallStackException (unpack s) ?callStack) #elif MIN_VERSION_base(4,7,0) -- Basic Call Stack with callsite. +import GHC.Prim (raise#) import GHC.Exception (errorCallException) {-# WARNING error "'error' remains in code" #-} diff --git a/src/Protolude/Exceptions.hs b/src/Protolude/Exceptions.hs index 54c329a63e..76d090faf9 100644 --- a/src/Protolude/Exceptions.hs +++ b/src/Protolude/Exceptions.hs @@ -12,11 +12,11 @@ import Protolude.Base (IO) import Data.Function ((.)) import Control.Monad.Trans (liftIO) import Control.Monad.IO.Class (MonadIO) -import Control.Monad.Except (ExceptT(..), MonadError, throwError) +import Control.Monad.Except (ExceptT(ExceptT), MonadError, throwError) import Control.Exception as Exception import Control.Applicative import Data.Maybe (Maybe, maybe) -import Data.Either (Either(..)) +import Data.Either (Either(Left,Right)) hush :: Alternative m => Either e a -> m a hush (Left _) = empty diff --git a/src/Protolude/Functor.hs b/src/Protolude/Functor.hs index 766b292087..32fa09280d 100644 --- a/src/Protolude/Functor.hs +++ b/src/Protolude/Functor.hs @@ -3,8 +3,9 @@ {-# LANGUAGE NoImplicitPrelude #-} module Protolude.Functor ( - Functor(..), + Functor(fmap), ($>), + (<$), (<$>), (<<$>>), (<&>), @@ -12,23 +13,23 @@ module Protolude.Functor ( foreach, ) where -import Data.Function ((.)) -import Data.Function (flip) - +import Data.Function ((.), flip) #if MIN_VERSION_base(4,11,0) import Data.Functor ((<&>)) #endif #if MIN_VERSION_base(4,7,0) import Data.Functor ( - Functor(..) + Functor(fmap) + , (<$) , ($>) , (<$>) , void ) #else import Data.Functor ( - Functor(..) + Functor(fmap) + , (<$) , (<$>) ) diff --git a/src/Protolude/List.hs b/src/Protolude/List.hs index edc79bba37..9d89a7dacb 100644 --- a/src/Protolude/List.hs +++ b/src/Protolude/List.hs @@ -1,25 +1,26 @@ -{-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE Safe #-} -module Protolude.List ( - head, - ordNub, - sortOn, - list, - product, - sum, - groupBy, -) where - -import Data.List (sortBy, groupBy) -import Data.Maybe (Maybe(..)) -import Data.Ord (Ord, comparing) -import Data.Foldable (Foldable, foldr, foldl') +module Protolude.List + ( head, + ordNub, + sortOn, + list, + product, + sum, + groupBy, + ) +where + +import Control.Applicative (pure) +import Data.Foldable (Foldable, foldl', foldr) import Data.Function ((.)) import Data.Functor (fmap) -import Control.Applicative (pure) +import Data.List (groupBy, sortBy) +import Data.Maybe (Maybe (Nothing)) +import Data.Ord (Ord, comparing) import qualified Data.Set as Set -import GHC.Num (Num, (+), (*)) +import GHC.Num ((*), (+), Num) head :: (Foldable f) => f a -> Maybe a head = foldr (\x _ -> pure x) Nothing @@ -31,16 +32,16 @@ sortOn = sortBy . comparing ordNub :: (Ord a) => [a] -> [a] ordNub l = go Set.empty l where - go _ [] = [] - go s (x:xs) = + go _ [] = [] + go s (x : xs) = if x `Set.member` s - then go s xs - else x : go (Set.insert x s) xs + then go s xs + else x : go (Set.insert x s) xs list :: [b] -> (a -> b) -> [a] -> [b] list def f xs = case xs of [] -> def - _ -> fmap f xs + _ -> fmap f xs {-# INLINE product #-} product :: (Foldable f, Num a) => f a -> a diff --git a/src/Protolude/Monad.hs b/src/Protolude/Monad.hs index f2a468b547..cf1674f2de 100644 --- a/src/Protolude/Monad.hs +++ b/src/Protolude/Monad.hs @@ -4,7 +4,7 @@ module Protolude.Monad ( Monad((>>=), return) - , MonadPlus(..) + , MonadPlus(mzero, mplus) , (=<<) , (>=>) diff --git a/src/Protolude/Panic.hs b/src/Protolude/Panic.hs index 6471d2cb92..92392a4145 100644 --- a/src/Protolude/Panic.hs +++ b/src/Protolude/Panic.hs @@ -7,7 +7,7 @@ #endif module Protolude.Panic ( - FatalError(..), + FatalError(FatalError, fatalErrorMessage), panic, ) where @@ -18,7 +18,7 @@ import Data.Typeable (Typeable) import Control.Exception as X -- | Uncatchable exceptions thrown and never caught. -data FatalError = FatalError { fatalErrorMessage :: Text } +newtype FatalError = FatalError { fatalErrorMessage :: Text } deriving (Show, Typeable) instance Exception FatalError diff --git a/src/Protolude/Partial.hs b/src/Protolude/Partial.hs new file mode 100644 index 0000000000..ae2da86873 --- /dev/null +++ b/src/Protolude/Partial.hs @@ -0,0 +1,26 @@ +module Protolude.Partial + ( head, + init, + tail, + last, + foldl, + foldr, + foldl', + foldr', + foldr1, + foldl1, + cycle, + maximum, + minimum, + (!!), + sum, + product, + fromJust, + read, + ) +where + +import Data.Foldable (foldl, foldl', foldl1, foldr, foldr', foldr1, product, sum) +import Data.List ((!!), cycle, head, init, last, maximum, minimum, tail) +import Data.Maybe (fromJust) +import Text.Read (read) diff --git a/src/Protolude/Safe.hs b/src/Protolude/Safe.hs index a3c2ff2e7a..471495ffdf 100644 --- a/src/Protolude/Safe.hs +++ b/src/Protolude/Safe.hs @@ -26,12 +26,12 @@ module Protolude.Safe ( ) where -import Data.Ord (Ord(..)) +import Data.Ord (Ord, (<)) import Data.Int (Int) import Data.Char (Char) import Data.Bool (Bool, otherwise) -import Data.Maybe (Maybe(..), fromMaybe) -import Data.Either (Either(..)) +import Data.Maybe (Maybe(Nothing, Just), fromMaybe) +import Data.Either (Either(Left, Right)) import Data.Function ((.)) import Data.List (null, head, last, tail, init, maximum, minimum, foldr1, foldl1, foldl1', (++)) diff --git a/src/Protolude/Semiring.hs b/src/Protolude/Semiring.hs index 6cbbcdbd96..1d2ffdd05c 100644 --- a/src/Protolude/Semiring.hs +++ b/src/Protolude/Semiring.hs @@ -1,10 +1,13 @@ {-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} -module Protolude.Semiring ( - Semiring(..), - zero, -) where +module Protolude.Semiring + ( Semiring, + one, + (<.>), + zero, + ) +where import Data.Monoid diff --git a/src/Protolude/Show.hs b/src/Protolude/Show.hs index f6a190d94d..567bcca48e 100644 --- a/src/Protolude/Show.hs +++ b/src/Protolude/Show.hs @@ -1,35 +1,35 @@ -{-# LANGUAGE Trustworthy #-} +{-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} -{-# LANGUAGE TypeSynonymInstances #-} -{-# LANGUAGE ExtendedDefaultRules #-} -module Protolude.Show ( - Print(..), - putText, - putErrText, - putLText, - putByteString, - putLByteString, -) where - -import qualified System.IO as Base -import qualified Protolude.Base as Base -import Data.Function ((.)) +module Protolude.Show + ( Print, + hPutStr, + putStr, + hPutStrLn, + putStrLn, + putErrLn, + putText, + putErrText, + putLText, + putByteString, + putLByteString, + ) +where import Control.Monad.IO.Class (MonadIO, liftIO) import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Lazy.Char8 as BL - +import Data.Function ((.)) import qualified Data.Text as T import qualified Data.Text.IO as T - import qualified Data.Text.Lazy as TL import qualified Data.Text.Lazy.IO as TL - -import System.IO (Handle, stdout, stderr) - +import qualified Protolude.Base as Base +import qualified System.IO as Base +import System.IO (Handle, stderr, stdout) class Print a where hPutStr :: MonadIO m => Handle -> a -> m () @@ -38,7 +38,7 @@ class Print a where hPutStrLn :: MonadIO m => Handle -> a -> m () putStrLn :: MonadIO m => a -> m () putStrLn = hPutStrLn stdout - putErrLn :: MonadIO m => a -> m () + putErrLn :: MonadIO m => a -> m () putErrLn = hPutStrLn stderr instance Print T.Text where diff --git a/src/Unsafe.hs b/src/Protolude/Unsafe.hs similarity index 81% rename from src/Unsafe.hs rename to src/Protolude/Unsafe.hs index 2b25b30589..4f7916bd56 100644 --- a/src/Unsafe.hs +++ b/src/Protolude/Unsafe.hs @@ -1,7 +1,7 @@ {-# LANGUAGE Unsafe #-} {-# LANGUAGE NoImplicitPrelude #-} -module Unsafe ( +module Protolude.Unsafe ( unsafeHead, unsafeTail, unsafeInit, @@ -9,9 +9,12 @@ module Unsafe ( unsafeFromJust, unsafeIndex, unsafeThrow, + unsafeRead, ) where import Protolude.Base (Int) +import Data.Char (Char) +import Text.Read (Read, read) import qualified Data.List as List import qualified Data.Maybe as Maybe import qualified Control.Exception as Exc @@ -36,3 +39,6 @@ unsafeIndex = (List.!!) unsafeThrow :: Exc.Exception e => e -> a unsafeThrow = Exc.throw + +unsafeRead :: Read a => [Char] -> a +unsafeRead = Text.Read.read diff --git a/stack-10.0.yaml b/stack-10.0.yaml deleted file mode 100644 index fa8bfe2ce2..0000000000 --- a/stack-10.0.yaml +++ /dev/null @@ -1,6 +0,0 @@ -resolver: lts-10.0 -packages: -- '.' -extra-deps: -flags: {} -extra-package-dbs: [] diff --git a/stack-10.0.yaml.lock b/stack-10.0.yaml.lock deleted file mode 100644 index 29ed1c8720..0000000000 --- a/stack-10.0.yaml.lock +++ /dev/null @@ -1,12 +0,0 @@ -# This file was autogenerated by Stack. -# You should not edit this file by hand. -# For more information, please see the documentation at: -# https://docs.haskellstack.org/en/stable/lock_files - -packages: [] -snapshots: -- completed: - size: 566883 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/10/0.yaml - sha256: d0ee122a83faa02a679829d43b3485b21827c3cc1cce0db8ac8957b78d45bee3 - original: lts-10.0 diff --git a/stack-11.0.yaml b/stack-11.0.yaml deleted file mode 100644 index d487ddd516..0000000000 --- a/stack-11.0.yaml +++ /dev/null @@ -1,6 +0,0 @@ -resolver: lts-11.0 -packages: -- '.' -extra-deps: -flags: {} -extra-package-dbs: [] diff --git a/stack-11.0.yaml.lock b/stack-11.0.yaml.lock deleted file mode 100644 index 8a8f6f4fb3..0000000000 --- a/stack-11.0.yaml.lock +++ /dev/null @@ -1,12 +0,0 @@ -# This file was autogenerated by Stack. -# You should not edit this file by hand. -# For more information, please see the documentation at: -# https://docs.haskellstack.org/en/stable/lock_files - -packages: [] -snapshots: -- completed: - size: 504512 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/11/0.yaml - sha256: 2587f446431d8c77bcb963ca8ff0a839a7b7f77042b5a98901b6b47c61fdd8f8 - original: lts-11.0 diff --git a/stack-12.0.yaml b/stack-12.0.yaml deleted file mode 100644 index d7370699ad..0000000000 --- a/stack-12.0.yaml +++ /dev/null @@ -1,6 +0,0 @@ -resolver: lts-12.0 -packages: -- '.' -extra-deps: -flags: {} -extra-package-dbs: [] diff --git a/stack-12.0.yaml.lock b/stack-12.0.yaml.lock deleted file mode 100644 index 75afd209b3..0000000000 --- a/stack-12.0.yaml.lock +++ /dev/null @@ -1,12 +0,0 @@ -# This file was autogenerated by Stack. -# You should not edit this file by hand. -# For more information, please see the documentation at: -# https://docs.haskellstack.org/en/stable/lock_files - -packages: [] -snapshots: -- completed: - size: 499178 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/12/0.yaml - sha256: 3e9a7b96708cd9196ce7e5396143725097a71f2e9ca8dc19f03f5082642bc1b5 - original: lts-12.0 diff --git a/stack-13.0.yaml b/stack-13.0.yaml deleted file mode 100644 index 3b14283a4b..0000000000 --- a/stack-13.0.yaml +++ /dev/null @@ -1,6 +0,0 @@ -resolver: lts-13.0 -packages: -- '.' -extra-deps: -flags: {} -extra-package-dbs: [] diff --git a/stack-13.0.yaml.lock b/stack-13.0.yaml.lock deleted file mode 100644 index bd70afcdc3..0000000000 --- a/stack-13.0.yaml.lock +++ /dev/null @@ -1,12 +0,0 @@ -# This file was autogenerated by Stack. -# You should not edit this file by hand. -# For more information, please see the documentation at: -# https://docs.haskellstack.org/en/stable/lock_files - -packages: [] -snapshots: -- completed: - size: 491155 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/13/0.yaml - sha256: 8d3c33e0feab8e04b9ed31452e0219a2b827ed1338c809f79d986c71a177e6ba - original: lts-13.0 diff --git a/stack-14.0.yaml b/stack-14.0.yaml deleted file mode 100644 index 26a69d8cdb..0000000000 --- a/stack-14.0.yaml +++ /dev/null @@ -1,6 +0,0 @@ -resolver: lts-14.0 -packages: -- '.' -extra-deps: -flags: {} -extra-package-dbs: [] diff --git a/stack-14.0.yaml.lock b/stack-14.0.yaml.lock deleted file mode 100644 index 3bab3b870a..0000000000 --- a/stack-14.0.yaml.lock +++ /dev/null @@ -1,12 +0,0 @@ -# This file was autogenerated by Stack. -# You should not edit this file by hand. -# For more information, please see the documentation at: -# https://docs.haskellstack.org/en/stable/lock_files - -packages: [] -snapshots: -- completed: - size: 523443 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/0.yaml - sha256: 283773e7120f5446d961eab35ea95c9af9c24187cc178537bd29273200a05171 - original: lts-14.0 diff --git a/stack-7.10.yaml b/stack-7.10.yaml deleted file mode 100644 index 3369f29906..0000000000 --- a/stack-7.10.yaml +++ /dev/null @@ -1,6 +0,0 @@ -resolver: lts-6.24 -packages: -- '.' -extra-deps: -flags: {} -extra-package-dbs: [] diff --git a/stack-7.10.yaml.lock b/stack-7.10.yaml.lock deleted file mode 100644 index e9de16673d..0000000000 --- a/stack-7.10.yaml.lock +++ /dev/null @@ -1,12 +0,0 @@ -# This file was autogenerated by Stack. -# You should not edit this file by hand. -# For more information, please see the documentation at: -# https://docs.haskellstack.org/en/stable/lock_files - -packages: [] -snapshots: -- completed: - size: 424557 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/6/24.yaml - sha256: 9d3250ce23b40d596f772bb6b6a94751ae39a7c4077050247eea5c4975bb942d - original: lts-6.24 diff --git a/stack-7.8.yaml b/stack-7.8.yaml deleted file mode 100644 index b3ab0af8d0..0000000000 --- a/stack-7.8.yaml +++ /dev/null @@ -1,6 +0,0 @@ -resolver: lts-2.22 -packages: -- '.' -extra-deps: -flags: {} -extra-package-dbs: [] diff --git a/stack-7.8.yaml.lock b/stack-7.8.yaml.lock deleted file mode 100644 index 0dce2a35df..0000000000 --- a/stack-7.8.yaml.lock +++ /dev/null @@ -1,12 +0,0 @@ -# This file was autogenerated by Stack. -# You should not edit this file by hand. -# For more information, please see the documentation at: -# https://docs.haskellstack.org/en/stable/lock_files - -packages: [] -snapshots: -- completed: - size: 222517 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/2/22.yaml - sha256: e88a72a77e2223a96478ad8c1234d3271dca012a881dc195b8b9565d44245e3c - original: lts-2.22 diff --git a/stack-8.0.yaml b/stack-8.0.yaml deleted file mode 100644 index 86c184384f..0000000000 --- a/stack-8.0.yaml +++ /dev/null @@ -1,6 +0,0 @@ -resolver: lts-7.8 -packages: -- '.' -extra-deps: -flags: {} -extra-package-dbs: [] diff --git a/stack-8.0.yaml.lock b/stack-8.0.yaml.lock deleted file mode 100644 index b3d502ad77..0000000000 --- a/stack-8.0.yaml.lock +++ /dev/null @@ -1,12 +0,0 @@ -# This file was autogenerated by Stack. -# You should not edit this file by hand. -# For more information, please see the documentation at: -# https://docs.haskellstack.org/en/stable/lock_files - -packages: [] -snapshots: -- completed: - size: 421254 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/7/8.yaml - sha256: 6c23440fac4e17615e869c98e7c4bd40ce4a4333a95da82d2176ab598d5db63f - original: lts-7.8 diff --git a/stack-9.0.yaml b/stack-9.0.yaml deleted file mode 100644 index 6219daf89c..0000000000 --- a/stack-9.0.yaml +++ /dev/null @@ -1,6 +0,0 @@ -resolver: lts-9.0 -packages: -- '.' -extra-deps: -flags: {} -extra-package-dbs: [] diff --git a/stack-9.0.yaml.lock b/stack-9.0.yaml.lock deleted file mode 100644 index 7435dc7c8a..0000000000 --- a/stack-9.0.yaml.lock +++ /dev/null @@ -1,12 +0,0 @@ -# This file was autogenerated by Stack. -# You should not edit this file by hand. -# For more information, please see the documentation at: -# https://docs.haskellstack.org/en/stable/lock_files - -packages: [] -snapshots: -- completed: - size: 533451 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/9/0.yaml - sha256: 27f29b231b39ea68e967a7a4346b2693a49d77c50f41fc0c276e11189a538da7 - original: lts-9.0 diff --git a/stack.yaml b/stack.yaml index 3be2e7d0e6..3694021d83 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,6 +1,7 @@ -resolver: lts-7.14 +resolver: lts-14.0 packages: - '.' extra-deps: +- fail-4.9.0.0 flags: {} extra-package-dbs: [] diff --git a/test_stack_lts.sh b/test_stack_lts.sh index b4e4d0cad1..7fd3d4f572 100755 --- a/test_stack_lts.sh +++ b/test_stack_lts.sh @@ -1,32 +1,14 @@ #!/usr/bin/env bash -set +e - -echo -e "\e[92mLTS 7.8" -STACK_YAML=stack-7.8.yaml stack build --no-terminal - -echo -e "\e[92mLTS 7.10" -STACK_YAML=stack-7.10.yaml stack build --no-terminal - -echo -e "\e[92mLTS 8.0" -STACK_YAML=stack-8.0.yaml stack build --no-terminal - -echo -e "\e[92mLTS 9.0" -STACK_YAML=stack-9.0.yaml stack build --no-terminal - -echo -e "\e[92mLTS 10.0" -STACK_YAML=stack-10.0.yaml stack build --no-terminal - -echo -e "\e[92mLTS 11.0" -STACK_YAML=stack-11.0.yaml stack build --no-terminal - -echo -e "\e[92mLTS 12.0" -STACK_YAML=stack-12.0.yaml stack build --no-terminal - -echo -e "\e[92mLTS 13.0" -STACK_YAML=stack-13.0.yaml stack build --no-terminal - -echo -e "\e[92mLTS 13.0" -STACK_YAML=stack-14.0.yaml stack build --no-terminal - -echo -e "\e[92mLTS 14.0" -STACK_YAML=stack-14.0.yaml stack build --no-terminal +set -e + +stack build --resolver lts-4.0 +stack build --resolver lts-5.0 +stack build --resolver lts-6.0 +stack build --resolver lts-7.0 +stack build --resolver lts-8.0 +stack build --resolver lts-9.0 +stack build --resolver lts-10.0 +stack build --resolver lts-11.0 +stack build --resolver lts-12.0 +stack build --resolver lts-13.0 +stack build --resolver lts-14.0 From 7e081500f384cbe117d9b1a0d368fc7da9f6e9b5 Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 21 Mar 2020 13:20:57 +0000 Subject: [PATCH 270/295] Supports lts 15.x --- .github/workflows/stack.yml | 1 + README.md | 1 + test_stack_lts.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml index 7e63af04ac..369b24c6cd 100644 --- a/.github/workflows/stack.yml +++ b/.github/workflows/stack.yml @@ -20,6 +20,7 @@ jobs: - { build: stack, resolver: "lts-12" } # ghc-8.4.4 - { build: stack, resolver: "lts-13" } # redundant because lts-14 checks ghc-8.6 already - { build: stack, resolver: "lts-14" } # ghc-8.6.5 + - { build: stack, resolver: "lts-15" } # ghc-8.8.2 - { build: stack, resolver: "nightly" } # - { build: stack, resolver: "" } # use this to include any dependencies from OS package managers diff --git a/README.md b/README.md index ed7d8ef757..85a99522f9 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ Stack LTS: * lts-12.x * lts-13.x * lts-14.x +* lts-15.x Usage ----- diff --git a/test_stack_lts.sh b/test_stack_lts.sh index 7fd3d4f572..c6bb141f37 100755 --- a/test_stack_lts.sh +++ b/test_stack_lts.sh @@ -12,3 +12,4 @@ stack build --resolver lts-11.0 stack build --resolver lts-12.0 stack build --resolver lts-13.0 stack build --resolver lts-14.0 +stack build --resolver lts-15.0 From 68f668951fd143103c3a1aa162bafb214eac786c Mon Sep 17 00:00:00 2001 From: sdiehl Date: Fri, 27 Mar 2020 09:12:59 +0000 Subject: [PATCH 271/295] Bump base & ghc-prim bounds for 8.10.1 --- protolude.cabal | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/protolude.cabal b/protolude.cabal index 46af9f2305..b12fa3efdb 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -75,9 +75,9 @@ library -fwarn-implicit-prelude build-depends: - base >= 4.6 && <4.14, + base >= 4.6 && <4.15, array >= 0.4 && <0.6, - ghc-prim >= 0.3 && <0.6, + ghc-prim >= 0.3 && <0.7, async >= 2.0 && <2.3, deepseq >= 1.3 && <1.5, containers >= 0.5 && <0.7, @@ -104,7 +104,7 @@ executable exports buildable: False build-depends: protolude, - base >= 4.6 && <4.14, + base >= 4.6 && <4.15, ghc, ghc-paths, directory, From 8ff8b7ae494140fd3bcef8eddbc502e16877afbe Mon Sep 17 00:00:00 2001 From: sdiehl Date: Fri, 27 Mar 2020 12:40:31 +0000 Subject: [PATCH 272/295] Update bounds in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 85a99522f9..da8cf04d8e 100644 --- a/README.md +++ b/README.md @@ -108,11 +108,11 @@ tracks Stack LTS resolver. | ----------- | -------- | -------- | | array | 0.4 | 0.6 | | async | 2.0 | 2.3 | -| base | 4.6 | 4.14 | +| base | 4.6 | 4.15 | | bytestring | 0.10 | 0.11 | | containers | 0.5 | 0.7 | | deepseq | 1.3 | 1.5 | -| ghc-prim | 0.3 | 0.6 | +| ghc-prim | 0.3 | 0.7 | | hashable | 1.2 | 1.4 | | mtl | 2.1 | 2.3 | | stm | 2.4 | 2.6 | From 9309ca3107073be39464c3e3b143c71c02e66709 Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 25 Apr 2020 11:58:41 +0100 Subject: [PATCH 273/295] Migrate show to use Conv.StringConv --- protolude.cabal | 170 ++++++++++++++++++----------------- src/Protolude.hs | 5 +- src/Protolude/ConvertText.hs | 6 ++ 3 files changed, 96 insertions(+), 85 deletions(-) diff --git a/protolude.cabal b/protolude.cabal index b12fa3efdb..9c1dfea94c 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,114 +1,118 @@ -name: protolude -version: 0.3.0 -synopsis: A small prelude. -description: A sensible set of defaults for writing custom Preludes. -homepage: https://github.com/sdiehl/protolude -license: MIT -license-file: LICENSE -author: Stephen Diehl -maintainer: stephen.m.diehl@gmail.com -copyright: 2016-2020 Stephen Diehl -category: Prelude -build-type: Simple -cabal-version: >=1.10 -bug-reports: https://github.com/sdiehl/protolude/issues -tested-with: - GHC == 7.6.1, - GHC == 7.6.2, - GHC == 7.6.3, - GHC == 7.8.1, - GHC == 7.8.2, - GHC == 7.8.3, - GHC == 7.8.4, - GHC == 7.10.1, - GHC == 7.10.2, - GHC == 7.10.3, - GHC == 8.0.1, - GHC == 8.2.1, - GHC == 8.4.1, - GHC == 8.6.1, - GHC == 8.8.1 - GHC == 8.10.1 -extra-source-files: README.md ChangeLog.md +name: protolude +version: 0.3.0 +synopsis: A small prelude. +description: A sensible set of defaults for writing custom Preludes. +homepage: https://github.com/sdiehl/protolude +license: MIT +license-file: LICENSE +author: Stephen Diehl +maintainer: stephen.m.diehl@gmail.com +copyright: 2016-2020 Stephen Diehl +category: Prelude +build-type: Simple +cabal-version: >=1.10 +bug-reports: https://github.com/sdiehl/protolude/issues +tested-with: + GHC ==7.6.1 + || ==7.6.2 + || ==7.6.3 + || ==7.8.1 + || ==7.8.2 + || ==7.8.3 + || ==7.8.4 + || ==7.10.1 + || ==7.10.2 + || ==7.10.3 + || ==8.0.1 + || ==8.2.1 + || ==8.4.1 + || ==8.6.1 + || ==8.8.1 + || ==8.10.1 + +extra-source-files: + README.md + ChangeLog.md flag dev description: Build development tools - manual: True - default: False + manual: True + default: False -Source-Repository head - type: git - location: git@github.com:protolude/protolude.git +source-repository head + type: git + location: git@github.com:protolude/protolude.git library - exposed-modules: + exposed-modules: Protolude + Protolude.Applicative Protolude.Base - Protolude.Monad - Protolude.Safe - Protolude.List + Protolude.Bifunctor Protolude.Bool - Protolude.Show + Protolude.CallStack Protolude.Conv Protolude.ConvertText + Protolude.Debug Protolude.Either - Protolude.Functor - Protolude.Semiring - Protolude.Bifunctor - Protolude.Applicative Protolude.Error - Protolude.Panic - Protolude.CallStack Protolude.Exceptions + Protolude.Functor + Protolude.List + Protolude.Monad + Protolude.Panic Protolude.Partial - Protolude.Debug + Protolude.Safe + Protolude.Semiring + Protolude.Show Protolude.Unsafe default-extensions: NoImplicitPrelude - OverloadedStrings FlexibleContexts MultiParamTypeClasses + OverloadedStrings - ghc-options: - -Wall - -fwarn-implicit-prelude + ghc-options: -Wall -fwarn-implicit-prelude + build-depends: + array >=0.4 && <0.6 + , async >=2.0 && <2.3 + , base >=4.6 && <4.15 + , bytestring >=0.10 && <0.11 + , containers >=0.5 && <0.7 + , deepseq >=1.3 && <1.5 + , ghc-prim >=0.3 && <0.7 + , hashable >=1.2 && <1.4 + , mtl >=2.1 && <2.3 + , mtl-compat >=0.2 && <0.3 + , stm >=2.4 && <2.6 + , text >=1.2 && <1.3 + , transformers >=0.2 && <0.6 + , transformers-compat >=0.4 && <0.7 - build-depends: - base >= 4.6 && <4.15, - array >= 0.4 && <0.6, - ghc-prim >= 0.3 && <0.7, - async >= 2.0 && <2.3, - deepseq >= 1.3 && <1.5, - containers >= 0.5 && <0.7, - hashable >= 1.2 && <1.4, - transformers >= 0.2 && <0.6, - text >= 1.2 && <1.3, - stm >= 2.4 && <2.6, - bytestring >= 0.10 && <0.11, - mtl >= 2.1 && <2.3, - mtl-compat >= 0.2 && <0.3, - transformers-compat >= 0.4 && <0.7 - if !impl(ghc >= 8.0) - Build-Depends: fail >= 4.9 && <4.10 + if !impl(ghc >=8.0) + build-depends: fail ==4.9.* - hs-source-dirs: src - default-language: Haskell2010 + hs-source-dirs: src + default-language: Haskell2010 executable exports - main-is: Exports.hs - default-language: Haskell2010 + main-is: Exports.hs + default-language: Haskell2010 + if flag(dev) buildable: True + else buildable: False + build-depends: - protolude, - base >= 4.6 && <4.15, - ghc, - ghc-paths, - directory, - process, - transformers, - mtl, - filepath + base >=4.6 && <4.15 + , directory + , filepath + , ghc + , ghc-paths + , mtl + , process + , protolude + , transformers diff --git a/src/Protolude.hs b/src/Protolude.hs index 2c0e6401d1..8dca6d7b66 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -153,6 +153,7 @@ import Protolude.ConvertText as ConvertText import Protolude.Panic as Panic import Protolude.Exceptions as Exception import Protolude.Semiring as Semiring +import qualified Protolude.Conv as Conv import Protolude.Base as Base hiding ( putStr -- Overriden by Show.putStr @@ -982,8 +983,8 @@ liftIO1 = (.) liftIO liftIO2 :: MonadIO m => (a -> b -> IO c) -> a -> b -> m c liftIO2 = ((.).(.)) liftIO -show :: (Show a, ConvertText String b) => a -> b -show x = ConvertText.toS (PBase.show x) +show :: (Show a, Conv.StringConv String b) => a -> b +show x = Conv.toS (PBase.show x) {-# SPECIALIZE show :: Show a => a -> Text #-} {-# SPECIALIZE show :: Show a => a -> LText #-} {-# SPECIALIZE show :: Show a => a -> String #-} diff --git a/src/Protolude/ConvertText.hs b/src/Protolude/ConvertText.hs index ae9b967fea..df3fd26dba 100644 --- a/src/Protolude/ConvertText.hs +++ b/src/Protolude/ConvertText.hs @@ -35,6 +35,12 @@ instance ConvertText LT.Text String where toS = LT.unpack instance ConvertText LT.Text T.Text where toS = LT.toStrict instance ConvertText LT.Text LT.Text where toS = id +instance ConvertText LB.ByteString B.ByteString where toS = LB.toStrict +instance ConvertText LB.ByteString LB.ByteString where toS = id + +instance ConvertText B.ByteString B.ByteString where toS = id +instance ConvertText B.ByteString LB.ByteString where toS = LB.fromStrict + toUtf8 :: ConvertText a T.Text => a -> B.ByteString toUtf8 = encodeUtf8 . toS From 22e2cecaee2e93c2e8e75e96606ed83bbf721eb0 Mon Sep 17 00:00:00 2001 From: sdiehl Date: Wed, 15 Jul 2020 14:40:41 +0100 Subject: [PATCH 274/295] 8.10.1 support to CI --- .github/workflows/cabal.yml | 6 +++--- .github/workflows/stack.yml | 1 + README.md | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cabal.yml b/.github/workflows/cabal.yml index 42efe0d9f7..138f8dbaac 100644 --- a/.github/workflows/cabal.yml +++ b/.github/workflows/cabal.yml @@ -8,12 +8,12 @@ on: jobs: build: - name: cabal ${{ matrix.ghc }} + name: cabal-${{ matrix.cabal}} ${{ matrix.ghc }} runs-on: ubuntu-16.04 strategy: matrix: - ghc: ["8.8.1", "8.6.5", "8.6.4", "8.6.3", "8.6.2", "8.4.4", "8.2.2", "8.0.2"] - cabal: ["3.0"] + ghc: ["8.10.1", "8.8.1", "8.6.5", "8.6.4", "8.6.3", "8.6.2", "8.4.4", "8.2.2", "8.0.2"] + cabal: ["3.0", "3.2"] steps: - uses: actions/checkout@v1 diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml index 369b24c6cd..33c54fda70 100644 --- a/.github/workflows/stack.yml +++ b/.github/workflows/stack.yml @@ -21,6 +21,7 @@ jobs: - { build: stack, resolver: "lts-13" } # redundant because lts-14 checks ghc-8.6 already - { build: stack, resolver: "lts-14" } # ghc-8.6.5 - { build: stack, resolver: "lts-15" } # ghc-8.8.2 + - { build: stack, resolver: "lts-16" } # ghc-8.10.1 - { build: stack, resolver: "nightly" } # - { build: stack, resolver: "" } # use this to include any dependencies from OS package managers diff --git a/README.md b/README.md index da8cf04d8e..228fe251e1 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ Stack LTS: * lts-13.x * lts-14.x * lts-15.x +* lts-16.x Usage ----- From 36ce510547884d1689697e2ee136c3c5dce32845 Mon Sep 17 00:00:00 2001 From: Martijn Bastiaan Date: Sat, 5 Dec 2020 20:06:45 +0100 Subject: [PATCH 275/295] Banish `String` on `readMaybe` and `readEither` --- ChangeLog.md | 5 +++++ export_lists/protolude-10.exports | 4 ++-- export_lists/protolude-11.exports | 4 ++-- export_lists/protolude-12.exports | 4 ++-- export_lists/protolude-13.exports | 4 ++-- export_lists/protolude-14.exports | 4 ++-- export_lists/protolude-7.exports | 4 ++-- export_lists/protolude-8.exports | 4 ++-- export_lists/protolude-9.exports | 4 ++-- src/Protolude.hs | 28 ++++++++++++++++++++++++++-- 10 files changed, 47 insertions(+), 18 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index c9ef85d8c5..bca37086fd 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,8 @@ +Unreleased +===== + +* Banish `String` on `readMaybe` and `readEither`. + 0.3.0 ===== diff --git a/export_lists/protolude-10.exports b/export_lists/protolude-10.exports index 84b06e7732..44678c73d3 100644 --- a/export_lists/protolude-10.exports +++ b/export_lists/protolude-10.exports @@ -750,10 +750,10 @@ ratioPrec from GHC.Real ratioPrec1 from GHC.Real ratioZeroDenominatorError from GHC.Real readChan from Control.Concurrent.Chan -readEither from Text.Read +readEither from Protolude readFile from Data.Text.IO readMVar from GHC.MVar -readMaybe from Text.Read +readMaybe from Protolude reader from Control.Monad.Reader.Class reads from Text.Read realPart from Data.Complex diff --git a/export_lists/protolude-11.exports b/export_lists/protolude-11.exports index 84b06e7732..44678c73d3 100644 --- a/export_lists/protolude-11.exports +++ b/export_lists/protolude-11.exports @@ -750,10 +750,10 @@ ratioPrec from GHC.Real ratioPrec1 from GHC.Real ratioZeroDenominatorError from GHC.Real readChan from Control.Concurrent.Chan -readEither from Text.Read +readEither from Protolude readFile from Data.Text.IO readMVar from GHC.MVar -readMaybe from Text.Read +readMaybe from Protolude reader from Control.Monad.Reader.Class reads from Text.Read realPart from Data.Complex diff --git a/export_lists/protolude-12.exports b/export_lists/protolude-12.exports index f3d20f9963..17fc4243fa 100644 --- a/export_lists/protolude-12.exports +++ b/export_lists/protolude-12.exports @@ -749,10 +749,10 @@ ratioPrec from GHC.Real ratioPrec1 from GHC.Real ratioZeroDenominatorError from GHC.Real readChan from Control.Concurrent.Chan -readEither from Text.Read +readEither from Protolude readFile from Data.Text.IO readMVar from GHC.MVar -readMaybe from Text.Read +readMaybe from Protolude reader from Control.Monad.Reader.Class reads from Text.Read realPart from Data.Complex diff --git a/export_lists/protolude-13.exports b/export_lists/protolude-13.exports index 075073c7a7..a1aec2593e 100644 --- a/export_lists/protolude-13.exports +++ b/export_lists/protolude-13.exports @@ -749,10 +749,10 @@ ratioPrec from GHC.Real ratioPrec1 from GHC.Real ratioZeroDenominatorError from GHC.Real readChan from Control.Concurrent.Chan -readEither from Text.Read +readEither from Protolude readFile from Data.Text.IO readMVar from GHC.MVar -readMaybe from Text.Read +readMaybe from Protolude reader from Control.Monad.Reader.Class reads from Text.Read realPart from Data.Complex diff --git a/export_lists/protolude-14.exports b/export_lists/protolude-14.exports index 075073c7a7..a1aec2593e 100644 --- a/export_lists/protolude-14.exports +++ b/export_lists/protolude-14.exports @@ -749,10 +749,10 @@ ratioPrec from GHC.Real ratioPrec1 from GHC.Real ratioZeroDenominatorError from GHC.Real readChan from Control.Concurrent.Chan -readEither from Text.Read +readEither from Protolude readFile from Data.Text.IO readMVar from GHC.MVar -readMaybe from Text.Read +readMaybe from Protolude reader from Control.Monad.Reader.Class reads from Text.Read realPart from Data.Complex diff --git a/export_lists/protolude-7.exports b/export_lists/protolude-7.exports index 290867e688..d347ffca6f 100644 --- a/export_lists/protolude-7.exports +++ b/export_lists/protolude-7.exports @@ -746,10 +746,10 @@ ratioPrec from GHC.Real ratioPrec1 from GHC.Real ratioZeroDenominatorError from GHC.Real readChan from Control.Concurrent.Chan -readEither from Text.Read +readEither from Protolude readFile from Data.Text.IO readMVar from GHC.MVar -readMaybe from Text.Read +readMaybe from Protolude reader from Control.Monad.Reader.Class reads from Text.Read realPart from Data.Complex diff --git a/export_lists/protolude-8.exports b/export_lists/protolude-8.exports index 290867e688..d347ffca6f 100644 --- a/export_lists/protolude-8.exports +++ b/export_lists/protolude-8.exports @@ -746,10 +746,10 @@ ratioPrec from GHC.Real ratioPrec1 from GHC.Real ratioZeroDenominatorError from GHC.Real readChan from Control.Concurrent.Chan -readEither from Text.Read +readEither from Protolude readFile from Data.Text.IO readMVar from GHC.MVar -readMaybe from Text.Read +readMaybe from Protolude reader from Control.Monad.Reader.Class reads from Text.Read realPart from Data.Complex diff --git a/export_lists/protolude-9.exports b/export_lists/protolude-9.exports index 290867e688..d347ffca6f 100644 --- a/export_lists/protolude-9.exports +++ b/export_lists/protolude-9.exports @@ -746,10 +746,10 @@ ratioPrec from GHC.Real ratioPrec1 from GHC.Real ratioZeroDenominatorError from GHC.Real readChan from Control.Concurrent.Chan -readEither from Text.Read +readEither from Protolude readFile from Data.Text.IO readMVar from GHC.MVar -readMaybe from Text.Read +readMaybe from Protolude reader from Control.Monad.Reader.Class reads from Text.Read realPart from Data.Complex diff --git a/src/Protolude.hs b/src/Protolude.hs index 8dca6d7b66..756460c217 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -128,6 +128,8 @@ module Protolude ( -- * Read functions module Read, + readMaybe, + readEither, -- * System functions module System, @@ -909,11 +911,10 @@ import Foreign.Storable as Foreign (Storable) import Foreign.StablePtr as Foreign (StablePtr) -- Read instances hiding unsafe builtins (read) +import qualified Text.Read as Read import Text.Read as Read ( Read , reads - , readMaybe - , readEither ) -- Type synonymss for lazy texts @@ -950,6 +951,29 @@ unsnoc = Foldable.foldr go Nothing applyN :: Int -> (a -> a) -> a -> a applyN n f = Foldable.foldr (.) identity (List.replicate n f) +-- | Parse a string using the 'Read' instance. +-- Succeeds if there is exactly one valid result. +-- +-- >>> readMaybe ("123" :: Text) :: Maybe Int +-- Just 123 +-- +-- >>> readMaybe ("hello" :: Text) :: Maybe Int +-- Nothing +readMaybe :: (Read b, Conv.StringConv a String) => a -> Maybe b +readMaybe = Read.readMaybe . Conv.toS + +-- | Parse a string using the 'Read' instance. +-- Succeeds if there is exactly one valid result. +-- A 'Left' value indicates a parse error. +-- +-- >>> readEither "123" :: Either Text Int +-- Right 123 +-- +-- >>> readEither "hello" :: Either Text Int +-- Left "Prelude.read: no parse" +readEither :: (Read a, Conv.StringConv String e, Conv.StringConv e String) => e -> Either e a +readEither = first Conv.toS . Read.readEither . Conv.toS + -- | The print function outputs a value of any printable type to the standard -- output device. Printable types are those that are instances of class Show; -- print converts values to strings for output using the show operation and adds From f162c21d1b16cf2bffb5d1fb95b87d9b70ae216e Mon Sep 17 00:00:00 2001 From: Adam Wespiser Date: Wed, 17 Nov 2021 09:17:40 -0500 Subject: [PATCH 276/295] Update github actions, add new lts to tests (#124) --- .github/workflows/cabal.yml | 47 +++++---- .github/workflows/haskell-ci.yml | 170 +++++++++++++++++++++++++++++++ .github/workflows/hlint.yml | 59 ++++------- .github/workflows/nix.yml | 2 + .github/workflows/stack.yml | 4 +- .travis.yml | 97 ------------------ README.md | 1 - test_stack_lts.sh | 1 + 8 files changed, 221 insertions(+), 160 deletions(-) create mode 100644 .github/workflows/haskell-ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/cabal.yml b/.github/workflows/cabal.yml index 138f8dbaac..ae9295e51d 100644 --- a/.github/workflows/cabal.yml +++ b/.github/workflows/cabal.yml @@ -1,31 +1,36 @@ name: Cabal CI - on: - push: - branches: - - master pull_request: - + types: + - opened + - synchronize jobs: build: - name: cabal-${{ matrix.cabal}} ${{ matrix.ghc }} - runs-on: ubuntu-16.04 + runs-on: ubuntu-latest strategy: matrix: ghc: ["8.10.1", "8.8.1", "8.6.5", "8.6.4", "8.6.3", "8.6.2", "8.4.4", "8.2.2", "8.0.2"] cabal: ["3.0", "3.2"] - + env: + CONFIG: "--enable-tests --enable-benchmarks" steps: - - uses: actions/checkout@v1 - - uses: actions/setup-haskell@v1 - name: Setup Haskell - with: - ghc-version: ${{ matrix.ghc }} - cabal-version: ${{ matrix.cabal }} - - - name: Install dependencies - run: | - cabal update - - name: Build - run: | - cabal new-build + - uses: actions/checkout@v2 + - uses: haskell/actions/setup@v1.2 + id: setup-haskell-cabal + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + - run: cabal v2-update + - run: cabal v2-freeze $CONFIG + - uses: actions/cache@v2 + with: + path: | + ${{ steps.setup-haskell-cabal.outputs.cabal-store }} + dist-newstyle + key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.ghc }}- + - run: cabal v2-build $CONFIG + - run: cabal v2-test $CONFIG + - run: cabal v2-haddock $CONFIG + - run: cabal v2-sdist diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml new file mode 100644 index 0000000000..470e3af330 --- /dev/null +++ b/.github/workflows/haskell-ci.yml @@ -0,0 +1,170 @@ +# This GitHub workflow config has been generated by a script via +# +# haskell-ci 'github' 'protolude.cabal' +# +# To regenerate the script (for example after adjusting tested-with) run +# +# haskell-ci regenerate +# +# For more information, see https://github.com/haskell-CI/haskell-ci +# +# version: 0.12.1 +# +# REGENDATA ("0.12.1",["github","protolude.cabal"]) +# +name: Haskell-CI +on: + - pull_request +jobs: + linux: + name: Haskell-CI - Linux - ${{ matrix.compiler }} + runs-on: ubuntu-18.04 + container: + image: buildpack-deps:bionic + continue-on-error: ${{ matrix.allow-failure }} + strategy: + matrix: + include: + - compiler: ghc-8.10.1 + allow-failure: false + - compiler: ghc-8.8.1 + allow-failure: false + - compiler: ghc-8.6.1 + allow-failure: false + - compiler: ghc-8.4.1 + allow-failure: false + fail-fast: false + steps: + - name: apt + run: | + apt-get update + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common + apt-add-repository -y 'ppa:hvr/ghc' + apt-get update + apt-get install -y $CC cabal-install-3.4 + env: + CC: ${{ matrix.compiler }} + - name: Set PATH and environment variables + run: | + echo "$HOME/.cabal/bin" >> $GITHUB_PATH + echo "LANG=C.UTF-8" >> $GITHUB_ENV + echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV + echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV + HCDIR=$(echo "/opt/$CC" | sed 's/-/\//') + HCNAME=ghc + HC=$HCDIR/bin/$HCNAME + echo "HC=$HC" >> $GITHUB_ENV + echo "HCPKG=$HCDIR/bin/$HCNAME-pkg" >> $GITHUB_ENV + echo "HADDOCK=$HCDIR/bin/haddock" >> $GITHUB_ENV + echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV + HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') + echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV + echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV + echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV + echo "HEADHACKAGE=false" >> $GITHUB_ENV + echo "ARG_COMPILER=--$HCNAME --with-compiler=$HC" >> $GITHUB_ENV + echo "GHCJSARITH=0" >> $GITHUB_ENV + env: + CC: ${{ matrix.compiler }} + - name: env + run: | + env + - name: write cabal config + run: | + mkdir -p $CABAL_DIR + cat >> $CABAL_CONFIG < cabal-plan.xz + echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c - + xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan + rm -f cabal-plan.xz + chmod a+x $HOME/.cabal/bin/cabal-plan + cabal-plan --version + - name: checkout + uses: actions/checkout@v2 + with: + path: source + - name: initial cabal.project for sdist + run: | + touch cabal.project + echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project + cat cabal.project + - name: sdist + run: | + mkdir -p sdist + $CABAL sdist all --output-dir $GITHUB_WORKSPACE/sdist + - name: unpack + run: | + mkdir -p unpacked + find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \; + - name: generate cabal.project + run: | + PKGDIR_protolude="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/protolude-[0-9.]*')" + echo "PKGDIR_protolude=${PKGDIR_protolude}" >> $GITHUB_ENV + touch cabal.project + touch cabal.project.local + echo "packages: ${PKGDIR_protolude}" >> cabal.project + if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package protolude" >> cabal.project ; fi + if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi + cat >> cabal.project <> cabal.project.local + cat cabal.project + cat cabal.project.local + - name: dump install plan + run: | + $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all + cabal-plan + - name: cache + uses: actions/cache@v2 + with: + key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} + path: ~/.cabal/store + restore-keys: ${{ runner.os }}-${{ matrix.compiler }}- + - name: install dependencies + run: | + $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all + $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all + - name: build w/o tests + run: | + $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all + - name: build + run: | + $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always + - name: cabal check + run: | + cd ${PKGDIR_protolude} || false + ${CABAL} -vnormal check + - name: haddock + run: | + $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all + - name: unconstrained build + run: | + rm -f cabal.project.local + $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all diff --git a/.github/workflows/hlint.yml b/.github/workflows/hlint.yml index e8844cf96d..eb6549d658 100644 --- a/.github/workflows/hlint.yml +++ b/.github/workflows/hlint.yml @@ -5,46 +5,27 @@ on: branches: - master pull_request: - + branches: [ master ] + paths: + - '.github/workflows/hlint.yml' + - 'app/**/*.hs' + - 'src/**/*.hs' + - 'test/**/*.hs' jobs: - build: - name: hlint - runs-on: ubuntu-16.04 - strategy: - matrix: - ghc: ["8.8.1"] - cabal: ["3.0"] - + hlint: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HLINT_ACTION_LOG_LEVEL: debug steps: - - uses: actions/checkout@v1 - - uses: actions/setup-haskell@v1 - name: Setup Haskell - with: - ghc-version: ${{ matrix.ghc }} - cabal-version: ${{ matrix.cabal }} - - - uses: actions/cache@v1 - name: Cache ~/.cabal/packages - with: - path: ~/.cabal/packages - key: cabal-packages - - - uses: actions/cache@v1 - name: Cache ~/.cabal/store - with: - path: ~/.cabal/store - key: cabal-store + - name: Check out + uses: actions/checkout@v2 - - uses: actions/cache@v1 - name: Cache dist-newstyle - with: - path: dist-newstyle - key: dist-newstyle + - name: Set up HLint + uses: rwe/actions-hlint-setup@v1 - - name: Install hlint - run: | - cabal update - cabal new-install hlint --installdir=dist-newstyle --overwrite-policy=always - - name: Run hlint - run: | - dist-newstyle/hlint -g + - name: Haskell Lint + uses: rwe/actions-hlint-run@v2 + with: + path: '["src/"]' + fail-on: warning diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 5604a990b5..b753def1cb 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -8,4 +8,6 @@ jobs: steps: - uses: actions/checkout@v1 - uses: cachix/install-nix-action@v3 + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true - run: nix-build diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml index 33c54fda70..c0f76cc064 100644 --- a/.github/workflows/stack.yml +++ b/.github/workflows/stack.yml @@ -1,7 +1,6 @@ name: Stack CI on: - push: pull_request: schedule: - cron: "0 0 * * 1" @@ -22,7 +21,6 @@ jobs: - { build: stack, resolver: "lts-14" } # ghc-8.6.5 - { build: stack, resolver: "lts-15" } # ghc-8.8.2 - { build: stack, resolver: "lts-16" } # ghc-8.10.1 - - { build: stack, resolver: "nightly" } # - { build: stack, resolver: "" } # use this to include any dependencies from OS package managers include: [] @@ -47,6 +45,8 @@ jobs: - name: Setup stack uses: mstksg/setup-stack@v1 + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true - name: Setup cabal-install uses: actions/setup-haskell@v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 503a581b72..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,97 +0,0 @@ -# NB: don't set `language: haskell` here -language: c - -# See also https://github.com/hvr/multi-ghc-travis for more information - -# The following lines enable several GHC versions and/or HP versions -# to be tested; often it's enough to test only against the last -# release of a major GHC version. Setting HPVER implictly sets -# GHCVER. Omit lines with versions you don't need/want testing for. -env: - - CABALVER=1.16 GHCVER=7.6.1 - - CABALVER=1.16 GHCVER=7.6.2 - - CABALVER=1.18 GHCVER=7.6.3 - - CABALVER=1.18 GHCVER=7.8.1 - - CABALVER=1.18 GHCVER=7.8.2 - - CABALVER=1.18 GHCVER=7.8.3 - - CABALVER=1.18 GHCVER=7.8.4 - - CABALVER=1.22 GHCVER=7.10.1 - - CABALVER=1.22 GHCVER=7.10.2 - - CABALVER=1.22 GHCVER=7.10.3 - - CABALVER=1.24 GHCVER=8.0.1 - - CABALVER=2.0 GHCVER=8.2.2 - - CABALVER=2.2 GHCVER=8.4.1 - - CABALVER=2.4 GHCVER=8.6.1 - - CABALVER=2.4 GHCVER=8.8.1 - -# Note: the distinction between `before_install` and `install` is not -# important. -before_install: - - case "$HPVER" in - "") ;; - - "2014.2.0.0") - export CABALVER=1.18 ; - export GHCVER=7.8.3 ; - echo "constraints:async==2.0.1.5,attoparsec==0.10.4.0,case-insensitive==1.1.0.3,fgl==5.5.0.1,GLUT==2.5.1.1,GLURaw==1.4.0.1,haskell-src==1.0.1.6,hashable==1.2.2.0,html==1.0.1.2,HTTP==4000.2.10,HUnit==1.2.5.2,mtl==2.1.3.1,network==2.4.2.3,OpenGL==2.9.2.0,OpenGLRaw==1.5.0.0,parallel==3.2.0.4,parsec==3.1.5,primitive==0.5.2.1,QuickCheck==2.6,random==1.0.1.1,regex-base==0.93.2,regex-compat==0.95.1,regex-posix==0.95.2,split==0.2.2,stm==2.4.2,syb==0.4.1,text==1.1.0.0,transformers==0.3.0.0,unordered-containers==0.2.4.0,vector==0.10.9.1,xhtml==3000.2.1,zlib==0.5.4.1" > cabal.config ;; - - "2013.2.0.0") - export CABALVER=1.16 ; - export GHCVER=7.6.3 ; - echo "constraints:async==2.0.1.4,attoparsec==0.10.4.0,case-insensitive==1.0.0.1,cgi==3001.1.7.5,fgl==5.4.2.4,GLUT==2.4.0.0,GLURaw==1.3.0.0,haskell-src==1.0.1.5,hashable==1.1.2.5,html==1.0.1.2,HTTP==4000.2.8,HUnit==1.2.5.2,mtl==2.1.2,network==2.4.1.2,OpenGL==2.8.0.0,OpenGLRaw==1.3.0.0,parallel==3.2.0.3,parsec==3.1.3,QuickCheck==2.6,random==1.0.1.1,regex-base==0.93.2,regex-compat==0.95.1,regex-posix==0.95.2,split==0.2.2,stm==2.4.2,syb==0.4.0,text==0.11.3.1,transformers==0.3.0.0,unordered-containers==0.2.3.0,vector==0.10.0.1,xhtml==3000.2.1,zlib==0.5.4.1" > cabal.config ;; - - "2012.4.0.0") - export CABALVER=1.16 ; - export GHCVER=7.6.2 ; - echo "constraints:async==2.0.1.3,cgi==3001.1.7.4,fgl==5.4.2.4,GLUT==2.1.2.1,haskell-src==1.0.1.5,html==1.0.1.2,HTTP==4000.2.5,HUnit==1.2.5.1,mtl==2.1.2,network==2.3.1.0,OpenGL==2.2.3.1,parallel==3.2.0.3,parsec==3.1.3,QuickCheck==2.5.1.1,random==1.0.1.1,regex-base==0.93.2,regex-compat==0.95.1,regex-posix==0.95.2,split==0.2.1.1,stm==2.4,syb==0.3.7,text==0.11.2.3,transformers==0.3.0.0,vector==0.10.0.1,xhtml==3000.2.1,zlib==0.5.4.0" > cabal.config ;; - - "2012.2.0.0") - export CABALVER=1.16 ; - export GHCVER=7.4.1 ; - echo "constraints:cgi==3001.1.7.4,fgl==5.4.2.4,GLUT==2.1.2.1,haskell-src==1.0.1.5,html==1.0.1.2,HTTP==4000.2.3,HUnit==1.2.4.2,mtl==2.1.1,network==2.3.0.13,OpenGL==2.2.3.1,parallel==3.2.0.2,parsec==3.1.2,QuickCheck==2.4.2,random==1.0.1.1,regex-base==0.93.2,regex-compat==0.95.1,regex-posix==0.95.1,stm==2.3,syb==0.3.6.1,text==0.11.2.0,transformers==0.3.0.0,xhtml==3000.2.1,zlib==0.5.3.3" > cabal.config ;; - - "2011.4.0.0") - export CABALVER=1.16 ; - export GHCVER=7.0.4 ; - echo "constraints:cgi==3001.1.7.4,fgl==5.4.2.4,GLUT==2.1.2.1,haskell-src==1.0.1.4,html==1.0.1.2,HUnit==1.2.4.2,network==2.3.0.5,OpenGL==2.2.3.0,parallel==3.1.0.1,parsec==3.1.1,QuickCheck==2.4.1.1,regex-base==0.93.2,regex-compat==0.95.1,regex-posix==0.95.1,stm==2.2.0.1,syb==0.3.3,xhtml==3000.2.0.4,zlib==0.5.3.1,HTTP==4000.1.2,deepseq==1.1.0.2" > cabal.config ;; - - *) - export GHCVER=unknown ; - echo "unknown/invalid Haskell Platform requested" ; - exit 1 ;; - - esac - - - travis_retry sudo add-apt-repository -y ppa:hvr/ghc - - travis_retry sudo apt-get update - - travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER - - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH - -install: - - cabal --version - - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]" - - travis_retry cabal update - - cabal install --only-dependencies --enable-tests --enable-benchmarks - -# Here starts the actual work to be performed for the package under -# test; any command which exits with a non-zero exit code causes the -# build to fail. -script: - - if [ -f configure.ac ]; then autoreconf -i; fi - # -v2 provides useful information for debugging - - cabal configure --enable-tests --enable-benchmarks -v2 - - # this builds all libraries and executables - # (including tests/benchmarks) - - cabal build - - - cabal check - - # tests that a source-distribution can be generated - - cabal sdist - - # check that the generated source-distribution can be built & installed - - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && - (cd dist && cabal install --force-reinstalls "$SRC_TGZ") - -# EOF diff --git a/README.md b/README.md index 228fe251e1..0548253a95 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ Protolude ========= -[![Build Status](https://travis-ci.org/protolude/protolude.svg?branch=master)](https://travis-ci.org/sdiehl/protolude) [![Build Status](https://github.com/protolude/protolude/workflows/Cabal%20CI/badge.svg)](https://github.com/protolude/protolude/actions) [![Build Status](https://github.com/protolude/protolude/workflows/Stack%20CI/badge.svg)](https://github.com/protolude/protolude/actions) [![Build Status](https://github.com/protolude/protolude/workflows/Nix%20CI/badge.svg)](https://github.com/protolude/protolude/actions) diff --git a/test_stack_lts.sh b/test_stack_lts.sh index c6bb141f37..306ca73fa5 100755 --- a/test_stack_lts.sh +++ b/test_stack_lts.sh @@ -13,3 +13,4 @@ stack build --resolver lts-12.0 stack build --resolver lts-13.0 stack build --resolver lts-14.0 stack build --resolver lts-15.0 +stack build --resolver lts-16.0 From 84d228a3b5a2adfe5c8aec23176a0301012e54eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Sat, 20 Nov 2021 22:03:29 +0100 Subject: [PATCH 277/295] gcdInt' and gcdWord' are defined only with integer-gmp (#123) Co-authored-by: Adam Wespiser --- src/Protolude/Base.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Protolude/Base.hs b/src/Protolude/Base.hs index d4203ae3be..4de2c98368 100644 --- a/src/Protolude/Base.hs +++ b/src/Protolude/Base.hs @@ -68,8 +68,10 @@ import GHC.Real as Base ( , fromRational , gcd #if MIN_VERSION_base(4,9,0) +#if defined(MIN_VERSION_integer_gmp) , gcdInt' , gcdWord' +#endif #endif , infinity , integralEnumFrom From 4e11d80eb7ddc7a9385a0879c28bfd82356aa3c2 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Wed, 1 Dec 2021 13:33:59 +0800 Subject: [PATCH 278/295] Allow transformers-compat 0.7 (#125) Tested to build fine. Co-authored-by: Adam Wespiser --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index 9c1dfea94c..af461b57b7 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -88,7 +88,7 @@ library , stm >=2.4 && <2.6 , text >=1.2 && <1.3 , transformers >=0.2 && <0.6 - , transformers-compat >=0.4 && <0.7 + , transformers-compat >=0.4 && <0.8 if !impl(ghc >=8.0) build-depends: fail ==4.9.* From ee4d94feab7a6b9e24e66106e62e1ef903ee6b02 Mon Sep 17 00:00:00 2001 From: Adam Wespiser Date: Sun, 20 Feb 2022 20:19:01 -0500 Subject: [PATCH 279/295] Support ghc-9.0.1 (#131) --- .github/workflows/cabal.yml | 2 +- .github/workflows/haskell-ci.yml | 2 ++ .github/workflows/stack.yml | 5 +++-- protolude.cabal | 5 +++-- src/Protolude/Base.hs | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cabal.yml b/.github/workflows/cabal.yml index ae9295e51d..bdb41e5956 100644 --- a/.github/workflows/cabal.yml +++ b/.github/workflows/cabal.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ghc: ["8.10.1", "8.8.1", "8.6.5", "8.6.4", "8.6.3", "8.6.2", "8.4.4", "8.2.2", "8.0.2"] + ghc: ["9.0.1", "8.10.1", "8.8.1", "8.6.5", "8.6.4", "8.6.3", "8.6.2", "8.4.4", "8.2.2", "8.0.2"] cabal: ["3.0", "3.2"] env: CONFIG: "--enable-tests --enable-benchmarks" diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 470e3af330..b01b56b25a 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -25,6 +25,8 @@ jobs: strategy: matrix: include: + - compiler: ghc-9.0.1 + allow-failure: false - compiler: ghc-8.10.1 allow-failure: false - compiler: ghc-8.8.1 diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml index c0f76cc064..bdc3791169 100644 --- a/.github/workflows/stack.yml +++ b/.github/workflows/stack.yml @@ -19,8 +19,9 @@ jobs: - { build: stack, resolver: "lts-12" } # ghc-8.4.4 - { build: stack, resolver: "lts-13" } # redundant because lts-14 checks ghc-8.6 already - { build: stack, resolver: "lts-14" } # ghc-8.6.5 - - { build: stack, resolver: "lts-15" } # ghc-8.8.2 - - { build: stack, resolver: "lts-16" } # ghc-8.10.1 + - { build: stack, resolver: "lts-15" } # ghc-8.8.3 + - { build: stack, resolver: "lts-16" } # ghc-8.8.4 + - { build: stack, resolver: "lts-17" } # ghc-8.10.4 # - { build: stack, resolver: "" } # use this to include any dependencies from OS package managers include: [] diff --git a/protolude.cabal b/protolude.cabal index af461b57b7..713f91935e 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -29,6 +29,7 @@ tested-with: || ==8.6.1 || ==8.8.1 || ==8.10.1 + || ==9.0.1 extra-source-files: README.md @@ -77,11 +78,11 @@ library build-depends: array >=0.4 && <0.6 , async >=2.0 && <2.3 - , base >=4.6 && <4.15 + , base >=4.6 && <4.16 , bytestring >=0.10 && <0.11 , containers >=0.5 && <0.7 , deepseq >=1.3 && <1.5 - , ghc-prim >=0.3 && <0.7 + , ghc-prim >=0.3 && <0.8 , hashable >=1.2 && <1.4 , mtl >=2.1 && <2.3 , mtl-compat >=0.2 && <0.3 diff --git a/src/Protolude/Base.hs b/src/Protolude/Base.hs index 4de2c98368..0682d1eb83 100644 --- a/src/Protolude/Base.hs +++ b/src/Protolude/Base.hs @@ -67,7 +67,7 @@ import GHC.Real as Base ( , fromIntegral , fromRational , gcd -#if MIN_VERSION_base(4,9,0) +#if MIN_VERSION_base(4,9,0) && !MIN_VERSION_base(4,15,0) #if defined(MIN_VERSION_integer_gmp) , gcdInt' , gcdWord' From f8cf1375d5f0b3adb6be65c0b7c067f55a4872cd Mon Sep 17 00:00:00 2001 From: Luc Tielen Date: Mon, 21 Feb 2022 20:38:19 +0100 Subject: [PATCH 280/295] Add HasCallStack to unsafe* functions (#129) Co-authored-by: Adam Wespiser --- src/Protolude/Unsafe.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Protolude/Unsafe.hs b/src/Protolude/Unsafe.hs index 4f7916bd56..c6f3c79696 100644 --- a/src/Protolude/Unsafe.hs +++ b/src/Protolude/Unsafe.hs @@ -12,33 +12,33 @@ module Protolude.Unsafe ( unsafeRead, ) where -import Protolude.Base (Int) +import Protolude.Base (Int, HasCallStack) import Data.Char (Char) import Text.Read (Read, read) import qualified Data.List as List import qualified Data.Maybe as Maybe import qualified Control.Exception as Exc -unsafeHead :: [a] -> a +unsafeHead :: HasCallStack => [a] -> a unsafeHead = List.head -unsafeTail :: [a] -> [a] +unsafeTail :: HasCallStack => [a] -> [a] unsafeTail = List.tail -unsafeInit :: [a] -> [a] +unsafeInit :: HasCallStack => [a] -> [a] unsafeInit = List.init -unsafeLast :: [a] -> a +unsafeLast :: HasCallStack => [a] -> a unsafeLast = List.last -unsafeFromJust :: Maybe.Maybe a -> a +unsafeFromJust :: HasCallStack => Maybe.Maybe a -> a unsafeFromJust = Maybe.fromJust -unsafeIndex :: [a] -> Int -> a +unsafeIndex :: HasCallStack => [a] -> Int -> a unsafeIndex = (List.!!) unsafeThrow :: Exc.Exception e => e -> a unsafeThrow = Exc.throw -unsafeRead :: Read a => [Char] -> a +unsafeRead :: (HasCallStack, Read a) => [Char] -> a unsafeRead = Text.Read.read From 3611929f0167ef0c701a6f7d01c9bc28239099fb Mon Sep 17 00:00:00 2001 From: Adam Wespiser Date: Mon, 28 Feb 2022 23:34:03 -0500 Subject: [PATCH 281/295] Fix Hackage Formatting (#134) --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0548253a95..172153a9e1 100644 --- a/README.md +++ b/README.md @@ -147,11 +147,10 @@ putLText :: MonadIO m => TL.Text -> m () * **How do I write manual Show instances if ``show`` isn't provided?** -Generally speaking writing manual instances of Show is a [Haskell antipattern]( -http://www.stephendiehl.com/posts/strings.html) because it produces -law-violating instances of Show. You probably want to use a [pretty -printer](https://hackage.haskell.org/package/wl-pprint-text) library for custom -printing. +Generally speaking writing manual instances of Show is a +[Haskell antipattern](http://www.stephendiehl.com/posts/strings.html) because it produces +law-violating instances of Show. You probably want to use a +[pretty printer](https://hackage.haskell.org/package/wl-pprint-text) library for custom printing. If backwards compatibility is needed then the base library can be imported manually. From 1b453b60645faf44820d8cb841755e5f20ac1d11 Mon Sep 17 00:00:00 2001 From: Adam Wespiser Date: Sun, 6 Mar 2022 11:20:07 -0500 Subject: [PATCH 282/295] Re-export isInfixOf, isSuffixOf from Data.List, Issue #119 (#135) --- src/Protolude.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Protolude.hs b/src/Protolude.hs index 756460c217..ad990b4276 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -311,6 +311,8 @@ import Data.List as List ( , break , intercalate , isPrefixOf + , isInfixOf + , isSuffixOf , drop , filter , reverse From 3e249724fd0ead27370c8c297b1ecd38f92cbd5b Mon Sep 17 00:00:00 2001 From: Adam Wespiser Date: Sat, 12 Mar 2022 21:42:32 -0500 Subject: [PATCH 283/295] 0.3.1 Release (#133) --- .github/workflows/cabal.yml | 5 ++-- .github/workflows/haskell-ci.yml | 10 +++----- ChangeLog.md | 5 ++-- README.md | 27 ++++++++-------------- protolude.cabal | 26 ++++++++------------- src/Protolude.hs | 9 ++++++-- src/Protolude/Unsafe.hs | 39 ++++++++++++++++++++++++++++---- 7 files changed, 71 insertions(+), 50 deletions(-) diff --git a/.github/workflows/cabal.yml b/.github/workflows/cabal.yml index bdb41e5956..2280074547 100644 --- a/.github/workflows/cabal.yml +++ b/.github/workflows/cabal.yml @@ -9,8 +9,9 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ghc: ["9.0.1", "8.10.1", "8.8.1", "8.6.5", "8.6.4", "8.6.3", "8.6.2", "8.4.4", "8.2.2", "8.0.2"] - cabal: ["3.0", "3.2"] + ghc: ['9.2', '9.0.1', '8.10.1', '8.8.1', '8.6.5', '8.6.4', '8.6.3', '8.6.2', '8.4.4', '8.2.2', '8.0.2', '7.10.3'] + cabal: ['latest', 3.2] + fail-fast: false env: CONFIG: "--enable-tests --enable-benchmarks" steps: diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index b01b56b25a..10ee51dc9f 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -25,15 +25,11 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.0.1 + - compiler: ghc-7.6.3 allow-failure: false - - compiler: ghc-8.10.1 + - compiler: ghc-7.8.4 allow-failure: false - - compiler: ghc-8.8.1 - allow-failure: false - - compiler: ghc-8.6.1 - allow-failure: false - - compiler: ghc-8.4.1 + - compiler: ghc-7.10.3 allow-failure: false fail-fast: false steps: diff --git a/ChangeLog.md b/ChangeLog.md index bca37086fd..9c65bd6e5e 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,6 +1,7 @@ -Unreleased +0.3.1 ===== - +* GHC 9.0.1 and 9.2.1 support +* Add `HasCallStack` to unsafe* functions. * Banish `String` on `readMaybe` and `readEither`. 0.3.0 diff --git a/README.md b/README.md index 172153a9e1..c3472e87a7 100644 --- a/README.md +++ b/README.md @@ -30,31 +30,23 @@ Design points: Supports: - * GHC 7.6.1 - * GHC 7.6.2 * GHC 7.6.3 - * GHC 7.8.1 - * GHC 7.8.2 - * GHC 7.8.3 * GHC 7.8.4 - * GHC 7.10.1 - * GHC 7.10.2 * GHC 7.10.3 - * GHC 8.0.1 * GHC 8.0.2 - * GHC 8.2.1 + * GHC 8.2.2 * GHC 8.4.1 + * GHC 8.4.4 * GHC 8.6.1 + * GHC 8.6.4 + * GHC 8.6.5 * GHC 8.8.1 * GHC 8.10.1 + * GHC 9.0.1 + * GHC 9.2.1 Stack LTS: -* lts-4.x -* lts-5.x -* lts-6.x -* lts-7.x -* lts-8.x * lts-9.x * lts-10.x * lts-11.x @@ -63,6 +55,7 @@ Stack LTS: * lts-14.x * lts-15.x * lts-16.x +* lts-17.x Usage ----- @@ -108,7 +101,7 @@ tracks Stack LTS resolver. | ----------- | -------- | -------- | | array | 0.4 | 0.6 | | async | 2.0 | 2.3 | -| base | 4.6 | 4.15 | +| base | 4.6 | 4.16 | | bytestring | 0.10 | 0.11 | | containers | 0.5 | 0.7 | | deepseq | 1.3 | 1.5 | @@ -210,7 +203,7 @@ and base. There is a massive test suite that tests all versions of GHC 7.6 - GHC HEAD alongside all Stack resolvers to ensure no regressions. Any pull requests or -patch has to pass the 40 integrity checks before being considered. Any pull +patch has to pass the 47 integrity checks before being considered. Any pull request must keep the export list consistent across GHC and Base version and not have any accidental symbol dropping or drift without updating the export golden tests. @@ -219,4 +212,4 @@ License ------- Released under the MIT License. -Copyright (c) 2016-2020, Stephen Diehl +Copyright (c) 2016-2022, Stephen Diehl diff --git a/protolude.cabal b/protolude.cabal index 713f91935e..1ccf286f0f 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,27 +1,20 @@ name: protolude -version: 0.3.0 +version: 0.3.1 synopsis: A small prelude. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude license: MIT license-file: LICENSE author: Stephen Diehl -maintainer: stephen.m.diehl@gmail.com -copyright: 2016-2020 Stephen Diehl +maintainer: adamwespiser@gmail.com, stephen.m.diehl@gmail.com +copyright: 2016-2022 Stephen Diehl category: Prelude build-type: Simple cabal-version: >=1.10 bug-reports: https://github.com/sdiehl/protolude/issues tested-with: - GHC ==7.6.1 - || ==7.6.2 - || ==7.6.3 - || ==7.8.1 - || ==7.8.2 - || ==7.8.3 + GHC ==7.6.3 || ==7.8.4 - || ==7.10.1 - || ==7.10.2 || ==7.10.3 || ==8.0.1 || ==8.2.1 @@ -30,6 +23,7 @@ tested-with: || ==8.8.1 || ==8.10.1 || ==9.0.1 + || ==9.2.1 extra-source-files: README.md @@ -78,16 +72,16 @@ library build-depends: array >=0.4 && <0.6 , async >=2.0 && <2.3 - , base >=4.6 && <4.16 - , bytestring >=0.10 && <0.11 + , base >=4.6 && <4.17 + , bytestring >=0.10 && <0.11.4 , containers >=0.5 && <0.7 , deepseq >=1.3 && <1.5 - , ghc-prim >=0.3 && <0.8 - , hashable >=1.2 && <1.4 + , ghc-prim >=0.3 && <0.9 + , hashable >=1.2 && <1.5 , mtl >=2.1 && <2.3 , mtl-compat >=0.2 && <0.3 , stm >=2.4 && <2.6 - , text >=1.2 && <1.3 + , text >=1.2 && <2.1 , transformers >=0.2 && <0.6 , transformers-compat >=0.4 && <0.8 diff --git a/src/Protolude.hs b/src/Protolude.hs index ad990b4276..9126fd6690 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -270,8 +270,6 @@ import Data.List.NonEmpty as List ( import Data.Semigroup as Semigroup ( Semigroup(sconcat, stimes) , WrappedMonoid - , Option(..) - , option , diff , cycle1 , stimesMonoid @@ -281,6 +279,13 @@ import Data.Semigroup as Semigroup ( ) #endif +#if MIN_VERSION_base(4,9,0) && !MIN_VERSION_base(4,16,0) +import Data.Semigroup as Semigroup ( + Option(..) + , option + ) +#endif + import Data.Monoid as Monoid #if !MIN_VERSION_base(4,8,0) diff --git a/src/Protolude/Unsafe.hs b/src/Protolude/Unsafe.hs index c6f3c79696..af370d1904 100644 --- a/src/Protolude/Unsafe.hs +++ b/src/Protolude/Unsafe.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE Unsafe #-} {-# LANGUAGE NoImplicitPrelude #-} @@ -12,13 +13,21 @@ module Protolude.Unsafe ( unsafeRead, ) where -import Protolude.Base (Int, HasCallStack) +import Protolude.Base (Int) + +#if ( __GLASGOW_HASKELL__ >= 800 ) +import Protolude.Base (HasCallStack) +#endif import Data.Char (Char) import Text.Read (Read, read) import qualified Data.List as List import qualified Data.Maybe as Maybe import qualified Control.Exception as Exc +unsafeThrow :: Exc.Exception e => e -> a +unsafeThrow = Exc.throw + +#if ( __GLASGOW_HASKELL__ >= 800 ) unsafeHead :: HasCallStack => [a] -> a unsafeHead = List.head @@ -37,8 +46,30 @@ unsafeFromJust = Maybe.fromJust unsafeIndex :: HasCallStack => [a] -> Int -> a unsafeIndex = (List.!!) -unsafeThrow :: Exc.Exception e => e -> a -unsafeThrow = Exc.throw - unsafeRead :: (HasCallStack, Read a) => [Char] -> a unsafeRead = Text.Read.read +#endif + + +#if ( __GLASGOW_HASKELL__ < 800 ) +unsafeHead :: [a] -> a +unsafeHead = List.head + +unsafeTail :: [a] -> [a] +unsafeTail = List.tail + +unsafeInit :: [a] -> [a] +unsafeInit = List.init + +unsafeLast :: [a] -> a +unsafeLast = List.last + +unsafeFromJust :: Maybe.Maybe a -> a +unsafeFromJust = Maybe.fromJust + +unsafeIndex :: [a] -> Int -> a +unsafeIndex = (List.!!) + +unsafeRead :: Read a => [Char] -> a +unsafeRead = Text.Read.read +#endif From e40b7351ec88093169f628fcddc0e3f46c74815f Mon Sep 17 00:00:00 2001 From: Adam Wespiser Date: Sun, 12 Jun 2022 13:46:49 -0400 Subject: [PATCH 284/295] 0.3.2 Release (#127) (#138) --- .github/workflows/cabal.yml | 2 +- .github/workflows/stack.yml | 2 ++ ChangeLog.md | 5 ++++ Exports.hs | 59 ------------------------------------- protolude.cabal | 30 ++----------------- test_stack_lts.sh | 3 ++ 6 files changed, 13 insertions(+), 88 deletions(-) delete mode 100644 Exports.hs diff --git a/.github/workflows/cabal.yml b/.github/workflows/cabal.yml index 2280074547..eb87a1545f 100644 --- a/.github/workflows/cabal.yml +++ b/.github/workflows/cabal.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ghc: ['9.2', '9.0.1', '8.10.1', '8.8.1', '8.6.5', '8.6.4', '8.6.3', '8.6.2', '8.4.4', '8.2.2', '8.0.2', '7.10.3'] + ghc: ['9.2.2', '9.0.1', '8.10.1', '8.8.1', '8.6.5', '8.6.4', '8.6.3', '8.6.2', '8.4.4', '8.2.2', '8.0.2', '7.10.3'] cabal: ['latest', 3.2] fail-fast: false env: diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml index bdc3791169..04c67dedb2 100644 --- a/.github/workflows/stack.yml +++ b/.github/workflows/stack.yml @@ -22,6 +22,8 @@ jobs: - { build: stack, resolver: "lts-15" } # ghc-8.8.3 - { build: stack, resolver: "lts-16" } # ghc-8.8.4 - { build: stack, resolver: "lts-17" } # ghc-8.10.4 + - { build: stack, resolver: "lts-18" } # ghc-8.10.7 + - { build: stack, resolver: "lts-19" } # ghc-9.0.2 # - { build: stack, resolver: "" } # use this to include any dependencies from OS package managers include: [] diff --git a/ChangeLog.md b/ChangeLog.md index 9c65bd6e5e..1545c76645 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,8 @@ +0.3.2 +==== +* GHC 9.2.2 support +* Drop export executable + 0.3.1 ===== * GHC 9.0.1 and 9.2.1 support diff --git a/Exports.hs b/Exports.hs deleted file mode 100644 index 65c1f7934e..0000000000 --- a/Exports.hs +++ /dev/null @@ -1,59 +0,0 @@ -{-# LANGUAGE CPP #-} -module Main - ( main, - ) -where - -import Control.Applicative ((<$>)) -import Control.Monad.Trans -import Data.Foldable (concat) -import qualified Data.List as List -import Data.Maybe -import Data.Ord (comparing) -import DynFlags -import GHC -import GhcMonad -import GHC.Paths -import Outputable -import System.FilePath.Posix -import Prelude hiding (concat, mod) - -autoModule :: FilePath -> IO () -autoModule mod = runGhc (Just GHC.Paths.libdir) $ do - dflags <- GHC.getSessionDynFlags -#if (__GLASGOW_HASKELL__ > 706) - _ <- setSessionDynFlags ( dflags `gopt_set` Opt_GhciSandbox ) -#else - _ <- setSessionDynFlags ( dflags `dopt_set` Opt_GhciSandbox ) -#endif - target <- guessTarget ("src" addExtension mod ".hs") Nothing - setTargets [target] - _ <- load LoadAllTargets - modSum <- getModSummary $ mkModuleName mod - p <- GHC.parseModule modSum - t <- typecheckModule p - let modInfo = tm_checked_module_info t - let exports = modInfoExports modInfo - exportThings <- sequence <$> mapM lookupName exports - let sortedThings = List.sortBy (comparing getOccName) (concat exportThings) - GhcMonad.liftIO (mapM_ (showThing dflags) sortedThings) - -showNamed :: NamedThing a => DynFlags -> a -> IO () -showNamed df a = do - let nm = showSDoc df (ppr (getOccName a)) - let mod = showSDoc df (ppr (nameModule (getName a))) - putStrLn (nm ++ " from " ++ mod) - -showThing :: DynFlags -> TyThing -> IO () -showThing df (AnId a) = showNamed df a -#if (__GLASGOW_HASKELL__ > 706) -showThing df (AConLike a) = showNamed df a -#endif -showThing df (ATyCon a) = showNamed df a -showThing _ _ = error "Should never happen." - ---showGhc :: (Outputable a) => a -> String ---showGhc = showPpr unsafeGlobalDynFlags - -main :: IO () -main = autoModule "Protolude" diff --git a/protolude.cabal b/protolude.cabal index 1ccf286f0f..faa75cd745 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.3.1 +version: 0.3.2 synopsis: A small prelude. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude @@ -23,17 +23,12 @@ tested-with: || ==8.8.1 || ==8.10.1 || ==9.0.1 - || ==9.2.1 + || ==9.2.2 extra-source-files: README.md ChangeLog.md -flag dev - description: Build development tools - manual: True - default: False - source-repository head type: git location: git@github.com:protolude/protolude.git @@ -90,24 +85,3 @@ library hs-source-dirs: src default-language: Haskell2010 - -executable exports - main-is: Exports.hs - default-language: Haskell2010 - - if flag(dev) - buildable: True - - else - buildable: False - - build-depends: - base >=4.6 && <4.15 - , directory - , filepath - , ghc - , ghc-paths - , mtl - , process - , protolude - , transformers diff --git a/test_stack_lts.sh b/test_stack_lts.sh index 306ca73fa5..73603409d1 100755 --- a/test_stack_lts.sh +++ b/test_stack_lts.sh @@ -14,3 +14,6 @@ stack build --resolver lts-13.0 stack build --resolver lts-14.0 stack build --resolver lts-15.0 stack build --resolver lts-16.0 +stack build --resolver lts-17.0 +stack build --resolver lts-18.0 +stack build --resolver lts-19.0 From cd83ebec004a6d44b60a2c87e13759365ff2d9a5 Mon Sep 17 00:00:00 2001 From: Christoph Schiessl Date: Sun, 28 Aug 2022 01:59:13 +0200 Subject: [PATCH 285/295] Updates README to correctly list all supported stack LTS versions (#140) * Updates README to correctly list all supported stack LTS versions * Updates README to include LTS 19.14 and higher --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index c3472e87a7..c441550758 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,9 @@ Supports: Stack LTS: +* lts-6.x +* lts-7.x +* lts-8.x * lts-9.x * lts-10.x * lts-11.x @@ -56,6 +59,8 @@ Stack LTS: * lts-15.x * lts-16.x * lts-17.x +* lts-18.x +* lts-19.14 and higher Usage ----- From 4680e62d7b624e130ce2d8f67df03e0da6e04bfb Mon Sep 17 00:00:00 2001 From: Adam Wespiser Date: Wed, 15 Feb 2023 21:41:08 -0500 Subject: [PATCH 286/295] ghc 9.4 PR (w/ Cabal improvement) (#142) * Release 0.3.3, with support for GHC 9.4 - allow base-4.18 (GHC 9.4) - allow ghc-prim 0.10 - allow bytestring 0.11.4 - test against GHC 9.4.4 Further CI tweaks: - cabal: update GHC versions to the latest releases of the respective major version - cabal: remove non-latest minor versions - stack: add lts-20 (GHC 9.2.5) - stack: bring the list of GHC versions up to date * Update Cabal CI --------- Co-authored-by: Robert Vollmert --- .github/workflows/cabal.yml | 5 +++-- .github/workflows/stack.yml | 8 +++++--- ChangeLog.md | 6 +++++- protolude.cabal | 8 ++++---- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cabal.yml b/.github/workflows/cabal.yml index eb87a1545f..90968d3641 100644 --- a/.github/workflows/cabal.yml +++ b/.github/workflows/cabal.yml @@ -9,14 +9,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ghc: ['9.2.2', '9.0.1', '8.10.1', '8.8.1', '8.6.5', '8.6.4', '8.6.3', '8.6.2', '8.4.4', '8.2.2', '8.0.2', '7.10.3'] + ghc: ['9.4.4', '9.2.6', '9.0.2', '8.10.7', '8.8.4', '8.6.5', '8.4.4', '8.2.2', '8.0.2'] cabal: ['latest', 3.2] fail-fast: false env: CONFIG: "--enable-tests --enable-benchmarks" steps: - uses: actions/checkout@v2 - - uses: haskell/actions/setup@v1.2 + # https://github.com/haskell/actions/tree/main/setup + - uses: haskell/actions/setup@v2 id: setup-haskell-cabal with: ghc-version: ${{ matrix.ghc }} diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml index 04c67dedb2..26780aea7d 100644 --- a/.github/workflows/stack.yml +++ b/.github/workflows/stack.yml @@ -17,13 +17,15 @@ jobs: - { build: stack, resolver: "lts-10" } # ghc-8.2.2 - { build: stack, resolver: "lts-11" } # ghc-8.2.2 - { build: stack, resolver: "lts-12" } # ghc-8.4.4 - - { build: stack, resolver: "lts-13" } # redundant because lts-14 checks ghc-8.6 already + - { build: stack, resolver: "lts-13" } # ghc-8.6.4 - { build: stack, resolver: "lts-14" } # ghc-8.6.5 - - { build: stack, resolver: "lts-15" } # ghc-8.8.3 + - { build: stack, resolver: "lts-15" } # ghc-8.8.2 - { build: stack, resolver: "lts-16" } # ghc-8.8.4 - - { build: stack, resolver: "lts-17" } # ghc-8.10.4 + - { build: stack, resolver: "lts-17" } # ghc-8.10.3 - { build: stack, resolver: "lts-18" } # ghc-8.10.7 - { build: stack, resolver: "lts-19" } # ghc-9.0.2 + - { build: stack, resolver: "lts-20" } # ghc-9.2.5 + # - { build: stack, resolver: "" } # use this to include any dependencies from OS package managers include: [] diff --git a/ChangeLog.md b/ChangeLog.md index 1545c76645..51e3ae011a 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,9 @@ +0.3.3 +===== +* GHC 9.4.4 support + 0.3.2 -==== +===== * GHC 9.2.2 support * Drop export executable diff --git a/protolude.cabal b/protolude.cabal index faa75cd745..81491f59e9 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.3.2 +version: 0.3.3 synopsis: A small prelude. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude @@ -67,11 +67,11 @@ library build-depends: array >=0.4 && <0.6 , async >=2.0 && <2.3 - , base >=4.6 && <4.17 - , bytestring >=0.10 && <0.11.4 + , base >=4.6 && <4.18 + , bytestring >=0.10 && <0.12 , containers >=0.5 && <0.7 , deepseq >=1.3 && <1.5 - , ghc-prim >=0.3 && <0.9 + , ghc-prim >=0.3 && <0.10 , hashable >=1.2 && <1.5 , mtl >=2.1 && <2.3 , mtl-compat >=0.2 && <0.3 From 5a98f0c26d5ae3507528f612b3780863ae19f2df Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Mon, 5 Feb 2024 14:19:13 +1100 Subject: [PATCH 287/295] Make it build with ghc 9.8 (update deps only) (#146) --- protolude.cabal | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/protolude.cabal b/protolude.cabal index 81491f59e9..5705d64752 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -24,6 +24,7 @@ tested-with: || ==8.10.1 || ==9.0.1 || ==9.2.2 + || ==9.6.1 extra-source-files: README.md @@ -67,17 +68,17 @@ library build-depends: array >=0.4 && <0.6 , async >=2.0 && <2.3 - , base >=4.6 && <4.18 - , bytestring >=0.10 && <0.12 - , containers >=0.5 && <0.7 - , deepseq >=1.3 && <1.5 - , ghc-prim >=0.3 && <0.10 + , base >=4.6 && <4.20 + , bytestring >=0.10 && <0.13 + , containers >=0.5 && <0.8 + , deepseq >=1.3 && <1.6 + , ghc-prim >=0.3 && <0.12 , hashable >=1.2 && <1.5 - , mtl >=2.1 && <2.3 + , mtl >=2.1 && <2.4 , mtl-compat >=0.2 && <0.3 , stm >=2.4 && <2.6 - , text >=1.2 && <2.1 - , transformers >=0.2 && <0.6 + , text >=1.2 && <2.2 + , transformers >=0.2 && <0.7 , transformers-compat >=0.4 && <0.8 if !impl(ghc >=8.0) From 20f2e894c98b35a977af354b3b91dc39122b25a9 Mon Sep 17 00:00:00 2001 From: Adam Wespiser Date: Sun, 4 Feb 2024 22:23:39 -0500 Subject: [PATCH 288/295] 0.3.4 release (#148) --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index 5705d64752..7aae455115 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.3.3 +version: 0.3.4 synopsis: A small prelude. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude From daad7c317d38612fde437bdbcdc9fad26e553be0 Mon Sep 17 00:00:00 2001 From: alexfmpe <2335822+alexfmpe@users.noreply.github.com> Date: Fri, 16 May 2025 03:13:14 +0100 Subject: [PATCH 289/295] Support GHC 9.12 (#151) * Test 9.6 and 9.8 in CI * Support GHC 9.10 * Support GHC 9.12 --------- Co-authored-by: Tom Ellis --- .github/workflows/cabal.yml | 2 +- protolude.cabal | 9 ++++++--- src/Protolude/List.hs | 2 +- src/Protolude/Safe.hs | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cabal.yml b/.github/workflows/cabal.yml index 90968d3641..0015f71c35 100644 --- a/.github/workflows/cabal.yml +++ b/.github/workflows/cabal.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ghc: ['9.4.4', '9.2.6', '9.0.2', '8.10.7', '8.8.4', '8.6.5', '8.4.4', '8.2.2', '8.0.2'] + ghc: ['9.12.1', '9.10.1', '9.8.2', '9.6.5', '9.4.4', '9.2.6', '9.0.2', '8.10.7', '8.8.4', '8.6.5', '8.4.4', '8.2.2', '8.0.2'] cabal: ['latest', 3.2] fail-fast: false env: diff --git a/protolude.cabal b/protolude.cabal index 7aae455115..890b1b41f1 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -25,6 +25,9 @@ tested-with: || ==9.0.1 || ==9.2.2 || ==9.6.1 + || ==9.8.2 + || ==9.10.1 + || ==9.12.1 extra-source-files: README.md @@ -68,12 +71,12 @@ library build-depends: array >=0.4 && <0.6 , async >=2.0 && <2.3 - , base >=4.6 && <4.20 + , base >=4.6 && <4.22 , bytestring >=0.10 && <0.13 , containers >=0.5 && <0.8 , deepseq >=1.3 && <1.6 - , ghc-prim >=0.3 && <0.12 - , hashable >=1.2 && <1.5 + , ghc-prim >=0.3 && <0.14 + , hashable >=1.2 && <1.6 , mtl >=2.1 && <2.4 , mtl-compat >=0.2 && <0.3 , stm >=2.4 && <2.6 diff --git a/src/Protolude/List.hs b/src/Protolude/List.hs index 9d89a7dacb..bd7978bc54 100644 --- a/src/Protolude/List.hs +++ b/src/Protolude/List.hs @@ -20,7 +20,7 @@ import Data.List (groupBy, sortBy) import Data.Maybe (Maybe (Nothing)) import Data.Ord (Ord, comparing) import qualified Data.Set as Set -import GHC.Num ((*), (+), Num) +import Prelude ((*), (+), Num) head :: (Foldable f) => f a -> Maybe a head = foldr (\x _ -> pure x) Nothing diff --git a/src/Protolude/Safe.hs b/src/Protolude/Safe.hs index 471495ffdf..a1bdb5efaa 100644 --- a/src/Protolude/Safe.hs +++ b/src/Protolude/Safe.hs @@ -35,7 +35,7 @@ import Data.Either (Either(Left, Right)) import Data.Function ((.)) import Data.List (null, head, last, tail, init, maximum, minimum, foldr1, foldl1, foldl1', (++)) -import GHC.Num ((-)) +import Prelude ((-)) import GHC.Show (show) liftMay :: (a -> Bool) -> (a -> b) -> (a -> Maybe b) From a4880f0372499e562182fb8b6a9145b5054608af Mon Sep 17 00:00:00 2001 From: Adam Wespiser Date: Thu, 15 May 2025 22:15:12 -0400 Subject: [PATCH 290/295] bump version 0.3.5 (#152) --- protolude.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protolude.cabal b/protolude.cabal index 890b1b41f1..80ee3efd52 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -1,5 +1,5 @@ name: protolude -version: 0.3.4 +version: 0.3.5 synopsis: A small prelude. description: A sensible set of defaults for writing custom Preludes. homepage: https://github.com/sdiehl/protolude From d4949c633e8172d0e4dd8f5c991eaaae6b48fbb0 Mon Sep 17 00:00:00 2001 From: Taimoor Zaeem Date: Thu, 30 Apr 2026 13:16:42 +0500 Subject: [PATCH 291/295] chore: move protolude files to src/protolude Later we merge the src/protolude directory with src/PostgREST. Signed-off-by: Taimoor Zaeem --- .ghci => src/protolude/.ghci | 0 {.github => src/protolude/.github}/workflows/cabal.yml | 0 {.github => src/protolude/.github}/workflows/haskell-ci.yml | 0 {.github => src/protolude/.github}/workflows/hlint.yml | 0 {.github => src/protolude/.github}/workflows/nix.yml | 0 {.github => src/protolude/.github}/workflows/stack.yml | 0 .gitignore => src/protolude/.gitignore | 0 .hlint.yaml => src/protolude/.hlint.yaml | 0 ChangeLog.md => src/protolude/ChangeLog.md | 0 LICENSE => src/protolude/LICENSE | 0 README.md => src/protolude/README.md | 0 Setup.hs => src/protolude/Setup.hs | 0 all_stack.sh => src/protolude/all_stack.sh | 0 default.nix => src/protolude/default.nix | 0 {export_lists => src/protolude/export_lists}/protolude-10.exports | 0 {export_lists => src/protolude/export_lists}/protolude-11.exports | 0 {export_lists => src/protolude/export_lists}/protolude-12.exports | 0 {export_lists => src/protolude/export_lists}/protolude-13.exports | 0 {export_lists => src/protolude/export_lists}/protolude-14.exports | 0 {export_lists => src/protolude/export_lists}/protolude-4.exports | 0 {export_lists => src/protolude/export_lists}/protolude-5.exports | 0 {export_lists => src/protolude/export_lists}/protolude-6.exports | 0 {export_lists => src/protolude/export_lists}/protolude-7.exports | 0 {export_lists => src/protolude/export_lists}/protolude-8.exports | 0 {export_lists => src/protolude/export_lists}/protolude-9.exports | 0 protolude.cabal => src/protolude/protolude.cabal | 0 src/{ => protolude/src}/Protolude.hs | 0 src/{ => protolude/src}/Protolude/Applicative.hs | 0 src/{ => protolude/src}/Protolude/Base.hs | 0 src/{ => protolude/src}/Protolude/Bifunctor.hs | 0 src/{ => protolude/src}/Protolude/Bool.hs | 0 src/{ => protolude/src}/Protolude/CallStack.hs | 0 src/{ => protolude/src}/Protolude/Conv.hs | 0 src/{ => protolude/src}/Protolude/ConvertText.hs | 0 src/{ => protolude/src}/Protolude/Debug.hs | 0 src/{ => protolude/src}/Protolude/Either.hs | 0 src/{ => protolude/src}/Protolude/Error.hs | 0 src/{ => protolude/src}/Protolude/Exceptions.hs | 0 src/{ => protolude/src}/Protolude/Functor.hs | 0 src/{ => protolude/src}/Protolude/List.hs | 0 src/{ => protolude/src}/Protolude/Monad.hs | 0 src/{ => protolude/src}/Protolude/Panic.hs | 0 src/{ => protolude/src}/Protolude/Partial.hs | 0 src/{ => protolude/src}/Protolude/Safe.hs | 0 src/{ => protolude/src}/Protolude/Semiring.hs | 0 src/{ => protolude/src}/Protolude/Show.hs | 0 src/{ => protolude/src}/Protolude/Unsafe.hs | 0 stack.yaml => src/protolude/stack.yaml | 0 test_stack_lts.sh => src/protolude/test_stack_lts.sh | 0 49 files changed, 0 insertions(+), 0 deletions(-) rename .ghci => src/protolude/.ghci (100%) rename {.github => src/protolude/.github}/workflows/cabal.yml (100%) rename {.github => src/protolude/.github}/workflows/haskell-ci.yml (100%) rename {.github => src/protolude/.github}/workflows/hlint.yml (100%) rename {.github => src/protolude/.github}/workflows/nix.yml (100%) rename {.github => src/protolude/.github}/workflows/stack.yml (100%) rename .gitignore => src/protolude/.gitignore (100%) rename .hlint.yaml => src/protolude/.hlint.yaml (100%) rename ChangeLog.md => src/protolude/ChangeLog.md (100%) rename LICENSE => src/protolude/LICENSE (100%) rename README.md => src/protolude/README.md (100%) rename Setup.hs => src/protolude/Setup.hs (100%) rename all_stack.sh => src/protolude/all_stack.sh (100%) rename default.nix => src/protolude/default.nix (100%) rename {export_lists => src/protolude/export_lists}/protolude-10.exports (100%) rename {export_lists => src/protolude/export_lists}/protolude-11.exports (100%) rename {export_lists => src/protolude/export_lists}/protolude-12.exports (100%) rename {export_lists => src/protolude/export_lists}/protolude-13.exports (100%) rename {export_lists => src/protolude/export_lists}/protolude-14.exports (100%) rename {export_lists => src/protolude/export_lists}/protolude-4.exports (100%) rename {export_lists => src/protolude/export_lists}/protolude-5.exports (100%) rename {export_lists => src/protolude/export_lists}/protolude-6.exports (100%) rename {export_lists => src/protolude/export_lists}/protolude-7.exports (100%) rename {export_lists => src/protolude/export_lists}/protolude-8.exports (100%) rename {export_lists => src/protolude/export_lists}/protolude-9.exports (100%) rename protolude.cabal => src/protolude/protolude.cabal (100%) rename src/{ => protolude/src}/Protolude.hs (100%) rename src/{ => protolude/src}/Protolude/Applicative.hs (100%) rename src/{ => protolude/src}/Protolude/Base.hs (100%) rename src/{ => protolude/src}/Protolude/Bifunctor.hs (100%) rename src/{ => protolude/src}/Protolude/Bool.hs (100%) rename src/{ => protolude/src}/Protolude/CallStack.hs (100%) rename src/{ => protolude/src}/Protolude/Conv.hs (100%) rename src/{ => protolude/src}/Protolude/ConvertText.hs (100%) rename src/{ => protolude/src}/Protolude/Debug.hs (100%) rename src/{ => protolude/src}/Protolude/Either.hs (100%) rename src/{ => protolude/src}/Protolude/Error.hs (100%) rename src/{ => protolude/src}/Protolude/Exceptions.hs (100%) rename src/{ => protolude/src}/Protolude/Functor.hs (100%) rename src/{ => protolude/src}/Protolude/List.hs (100%) rename src/{ => protolude/src}/Protolude/Monad.hs (100%) rename src/{ => protolude/src}/Protolude/Panic.hs (100%) rename src/{ => protolude/src}/Protolude/Partial.hs (100%) rename src/{ => protolude/src}/Protolude/Safe.hs (100%) rename src/{ => protolude/src}/Protolude/Semiring.hs (100%) rename src/{ => protolude/src}/Protolude/Show.hs (100%) rename src/{ => protolude/src}/Protolude/Unsafe.hs (100%) rename stack.yaml => src/protolude/stack.yaml (100%) rename test_stack_lts.sh => src/protolude/test_stack_lts.sh (100%) diff --git a/.ghci b/src/protolude/.ghci similarity index 100% rename from .ghci rename to src/protolude/.ghci diff --git a/.github/workflows/cabal.yml b/src/protolude/.github/workflows/cabal.yml similarity index 100% rename from .github/workflows/cabal.yml rename to src/protolude/.github/workflows/cabal.yml diff --git a/.github/workflows/haskell-ci.yml b/src/protolude/.github/workflows/haskell-ci.yml similarity index 100% rename from .github/workflows/haskell-ci.yml rename to src/protolude/.github/workflows/haskell-ci.yml diff --git a/.github/workflows/hlint.yml b/src/protolude/.github/workflows/hlint.yml similarity index 100% rename from .github/workflows/hlint.yml rename to src/protolude/.github/workflows/hlint.yml diff --git a/.github/workflows/nix.yml b/src/protolude/.github/workflows/nix.yml similarity index 100% rename from .github/workflows/nix.yml rename to src/protolude/.github/workflows/nix.yml diff --git a/.github/workflows/stack.yml b/src/protolude/.github/workflows/stack.yml similarity index 100% rename from .github/workflows/stack.yml rename to src/protolude/.github/workflows/stack.yml diff --git a/.gitignore b/src/protolude/.gitignore similarity index 100% rename from .gitignore rename to src/protolude/.gitignore diff --git a/.hlint.yaml b/src/protolude/.hlint.yaml similarity index 100% rename from .hlint.yaml rename to src/protolude/.hlint.yaml diff --git a/ChangeLog.md b/src/protolude/ChangeLog.md similarity index 100% rename from ChangeLog.md rename to src/protolude/ChangeLog.md diff --git a/LICENSE b/src/protolude/LICENSE similarity index 100% rename from LICENSE rename to src/protolude/LICENSE diff --git a/README.md b/src/protolude/README.md similarity index 100% rename from README.md rename to src/protolude/README.md diff --git a/Setup.hs b/src/protolude/Setup.hs similarity index 100% rename from Setup.hs rename to src/protolude/Setup.hs diff --git a/all_stack.sh b/src/protolude/all_stack.sh similarity index 100% rename from all_stack.sh rename to src/protolude/all_stack.sh diff --git a/default.nix b/src/protolude/default.nix similarity index 100% rename from default.nix rename to src/protolude/default.nix diff --git a/export_lists/protolude-10.exports b/src/protolude/export_lists/protolude-10.exports similarity index 100% rename from export_lists/protolude-10.exports rename to src/protolude/export_lists/protolude-10.exports diff --git a/export_lists/protolude-11.exports b/src/protolude/export_lists/protolude-11.exports similarity index 100% rename from export_lists/protolude-11.exports rename to src/protolude/export_lists/protolude-11.exports diff --git a/export_lists/protolude-12.exports b/src/protolude/export_lists/protolude-12.exports similarity index 100% rename from export_lists/protolude-12.exports rename to src/protolude/export_lists/protolude-12.exports diff --git a/export_lists/protolude-13.exports b/src/protolude/export_lists/protolude-13.exports similarity index 100% rename from export_lists/protolude-13.exports rename to src/protolude/export_lists/protolude-13.exports diff --git a/export_lists/protolude-14.exports b/src/protolude/export_lists/protolude-14.exports similarity index 100% rename from export_lists/protolude-14.exports rename to src/protolude/export_lists/protolude-14.exports diff --git a/export_lists/protolude-4.exports b/src/protolude/export_lists/protolude-4.exports similarity index 100% rename from export_lists/protolude-4.exports rename to src/protolude/export_lists/protolude-4.exports diff --git a/export_lists/protolude-5.exports b/src/protolude/export_lists/protolude-5.exports similarity index 100% rename from export_lists/protolude-5.exports rename to src/protolude/export_lists/protolude-5.exports diff --git a/export_lists/protolude-6.exports b/src/protolude/export_lists/protolude-6.exports similarity index 100% rename from export_lists/protolude-6.exports rename to src/protolude/export_lists/protolude-6.exports diff --git a/export_lists/protolude-7.exports b/src/protolude/export_lists/protolude-7.exports similarity index 100% rename from export_lists/protolude-7.exports rename to src/protolude/export_lists/protolude-7.exports diff --git a/export_lists/protolude-8.exports b/src/protolude/export_lists/protolude-8.exports similarity index 100% rename from export_lists/protolude-8.exports rename to src/protolude/export_lists/protolude-8.exports diff --git a/export_lists/protolude-9.exports b/src/protolude/export_lists/protolude-9.exports similarity index 100% rename from export_lists/protolude-9.exports rename to src/protolude/export_lists/protolude-9.exports diff --git a/protolude.cabal b/src/protolude/protolude.cabal similarity index 100% rename from protolude.cabal rename to src/protolude/protolude.cabal diff --git a/src/Protolude.hs b/src/protolude/src/Protolude.hs similarity index 100% rename from src/Protolude.hs rename to src/protolude/src/Protolude.hs diff --git a/src/Protolude/Applicative.hs b/src/protolude/src/Protolude/Applicative.hs similarity index 100% rename from src/Protolude/Applicative.hs rename to src/protolude/src/Protolude/Applicative.hs diff --git a/src/Protolude/Base.hs b/src/protolude/src/Protolude/Base.hs similarity index 100% rename from src/Protolude/Base.hs rename to src/protolude/src/Protolude/Base.hs diff --git a/src/Protolude/Bifunctor.hs b/src/protolude/src/Protolude/Bifunctor.hs similarity index 100% rename from src/Protolude/Bifunctor.hs rename to src/protolude/src/Protolude/Bifunctor.hs diff --git a/src/Protolude/Bool.hs b/src/protolude/src/Protolude/Bool.hs similarity index 100% rename from src/Protolude/Bool.hs rename to src/protolude/src/Protolude/Bool.hs diff --git a/src/Protolude/CallStack.hs b/src/protolude/src/Protolude/CallStack.hs similarity index 100% rename from src/Protolude/CallStack.hs rename to src/protolude/src/Protolude/CallStack.hs diff --git a/src/Protolude/Conv.hs b/src/protolude/src/Protolude/Conv.hs similarity index 100% rename from src/Protolude/Conv.hs rename to src/protolude/src/Protolude/Conv.hs diff --git a/src/Protolude/ConvertText.hs b/src/protolude/src/Protolude/ConvertText.hs similarity index 100% rename from src/Protolude/ConvertText.hs rename to src/protolude/src/Protolude/ConvertText.hs diff --git a/src/Protolude/Debug.hs b/src/protolude/src/Protolude/Debug.hs similarity index 100% rename from src/Protolude/Debug.hs rename to src/protolude/src/Protolude/Debug.hs diff --git a/src/Protolude/Either.hs b/src/protolude/src/Protolude/Either.hs similarity index 100% rename from src/Protolude/Either.hs rename to src/protolude/src/Protolude/Either.hs diff --git a/src/Protolude/Error.hs b/src/protolude/src/Protolude/Error.hs similarity index 100% rename from src/Protolude/Error.hs rename to src/protolude/src/Protolude/Error.hs diff --git a/src/Protolude/Exceptions.hs b/src/protolude/src/Protolude/Exceptions.hs similarity index 100% rename from src/Protolude/Exceptions.hs rename to src/protolude/src/Protolude/Exceptions.hs diff --git a/src/Protolude/Functor.hs b/src/protolude/src/Protolude/Functor.hs similarity index 100% rename from src/Protolude/Functor.hs rename to src/protolude/src/Protolude/Functor.hs diff --git a/src/Protolude/List.hs b/src/protolude/src/Protolude/List.hs similarity index 100% rename from src/Protolude/List.hs rename to src/protolude/src/Protolude/List.hs diff --git a/src/Protolude/Monad.hs b/src/protolude/src/Protolude/Monad.hs similarity index 100% rename from src/Protolude/Monad.hs rename to src/protolude/src/Protolude/Monad.hs diff --git a/src/Protolude/Panic.hs b/src/protolude/src/Protolude/Panic.hs similarity index 100% rename from src/Protolude/Panic.hs rename to src/protolude/src/Protolude/Panic.hs diff --git a/src/Protolude/Partial.hs b/src/protolude/src/Protolude/Partial.hs similarity index 100% rename from src/Protolude/Partial.hs rename to src/protolude/src/Protolude/Partial.hs diff --git a/src/Protolude/Safe.hs b/src/protolude/src/Protolude/Safe.hs similarity index 100% rename from src/Protolude/Safe.hs rename to src/protolude/src/Protolude/Safe.hs diff --git a/src/Protolude/Semiring.hs b/src/protolude/src/Protolude/Semiring.hs similarity index 100% rename from src/Protolude/Semiring.hs rename to src/protolude/src/Protolude/Semiring.hs diff --git a/src/Protolude/Show.hs b/src/protolude/src/Protolude/Show.hs similarity index 100% rename from src/Protolude/Show.hs rename to src/protolude/src/Protolude/Show.hs diff --git a/src/Protolude/Unsafe.hs b/src/protolude/src/Protolude/Unsafe.hs similarity index 100% rename from src/Protolude/Unsafe.hs rename to src/protolude/src/Protolude/Unsafe.hs diff --git a/stack.yaml b/src/protolude/stack.yaml similarity index 100% rename from stack.yaml rename to src/protolude/stack.yaml diff --git a/test_stack_lts.sh b/src/protolude/test_stack_lts.sh similarity index 100% rename from test_stack_lts.sh rename to src/protolude/test_stack_lts.sh From 7c8f79d86f8aa47c21f3d825ba27e89bc59587c9 Mon Sep 17 00:00:00 2001 From: Taimoor Zaeem Date: Thu, 30 Apr 2026 14:24:21 +0500 Subject: [PATCH 292/295] chore: add .git-blame-ignore-revs Ignore blame for commit that moved protolude files under src/protolude. Signed-off-by: Taimoor Zaeem --- .git-blame-ignore-revs | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .git-blame-ignore-revs diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000000..f85e791d2f --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +# Ignore blame for commit that moved protolude files under src/protolude +d4949c633e8172d0e4dd8f5c991eaaae6b48fbb0 From 366502729d40dc86603245a1e50a644cad8f1aa1 Mon Sep 17 00:00:00 2001 From: Taimoor Zaeem Date: Thu, 30 Apr 2026 15:38:39 +0500 Subject: [PATCH 293/295] chore: remove unneeded files and directories from src/protolude Signed-off-by: Taimoor Zaeem --- src/protolude/.ghci | 4 - src/protolude/.github/workflows/cabal.yml | 38 - .../.github/workflows/haskell-ci.yml | 168 --- src/protolude/.github/workflows/hlint.yml | 31 - src/protolude/.github/workflows/nix.yml | 13 - src/protolude/.github/workflows/stack.yml | 118 --- src/protolude/.gitignore | 9 - src/protolude/.hlint.yaml | 13 - src/protolude/ChangeLog.md | 143 --- src/protolude/{src => }/Protolude.hs | 0 .../{src => }/Protolude/Applicative.hs | 0 src/protolude/{src => }/Protolude/Base.hs | 0 .../{src => }/Protolude/Bifunctor.hs | 0 src/protolude/{src => }/Protolude/Bool.hs | 0 .../{src => }/Protolude/CallStack.hs | 0 src/protolude/{src => }/Protolude/Conv.hs | 0 .../{src => }/Protolude/ConvertText.hs | 0 src/protolude/{src => }/Protolude/Debug.hs | 0 src/protolude/{src => }/Protolude/Either.hs | 0 src/protolude/{src => }/Protolude/Error.hs | 0 .../{src => }/Protolude/Exceptions.hs | 0 src/protolude/{src => }/Protolude/Functor.hs | 0 src/protolude/{src => }/Protolude/List.hs | 0 src/protolude/{src => }/Protolude/Monad.hs | 0 src/protolude/{src => }/Protolude/Panic.hs | 0 src/protolude/{src => }/Protolude/Partial.hs | 0 src/protolude/{src => }/Protolude/Safe.hs | 0 src/protolude/{src => }/Protolude/Semiring.hs | 0 src/protolude/{src => }/Protolude/Show.hs | 0 src/protolude/{src => }/Protolude/Unsafe.hs | 0 src/protolude/README.md | 220 ---- src/protolude/Setup.hs | 2 - src/protolude/all_stack.sh | 137 --- src/protolude/default.nix | 5 - .../export_lists/protolude-10.exports | 960 ------------------ .../export_lists/protolude-11.exports | 960 ------------------ .../export_lists/protolude-12.exports | 958 ----------------- .../export_lists/protolude-13.exports | 959 ----------------- .../export_lists/protolude-14.exports | 959 ----------------- .../export_lists/protolude-4.exports | 0 .../export_lists/protolude-5.exports | 0 .../export_lists/protolude-6.exports | 0 .../export_lists/protolude-7.exports | 956 ----------------- .../export_lists/protolude-8.exports | 956 ----------------- .../export_lists/protolude-9.exports | 956 ----------------- src/protolude/protolude.cabal | 91 -- src/protolude/stack.yaml | 7 - src/protolude/test_stack_lts.sh | 19 - 48 files changed, 8682 deletions(-) delete mode 100644 src/protolude/.ghci delete mode 100644 src/protolude/.github/workflows/cabal.yml delete mode 100644 src/protolude/.github/workflows/haskell-ci.yml delete mode 100644 src/protolude/.github/workflows/hlint.yml delete mode 100644 src/protolude/.github/workflows/nix.yml delete mode 100644 src/protolude/.github/workflows/stack.yml delete mode 100644 src/protolude/.gitignore delete mode 100644 src/protolude/.hlint.yaml delete mode 100644 src/protolude/ChangeLog.md rename src/protolude/{src => }/Protolude.hs (100%) rename src/protolude/{src => }/Protolude/Applicative.hs (100%) rename src/protolude/{src => }/Protolude/Base.hs (100%) rename src/protolude/{src => }/Protolude/Bifunctor.hs (100%) rename src/protolude/{src => }/Protolude/Bool.hs (100%) rename src/protolude/{src => }/Protolude/CallStack.hs (100%) rename src/protolude/{src => }/Protolude/Conv.hs (100%) rename src/protolude/{src => }/Protolude/ConvertText.hs (100%) rename src/protolude/{src => }/Protolude/Debug.hs (100%) rename src/protolude/{src => }/Protolude/Either.hs (100%) rename src/protolude/{src => }/Protolude/Error.hs (100%) rename src/protolude/{src => }/Protolude/Exceptions.hs (100%) rename src/protolude/{src => }/Protolude/Functor.hs (100%) rename src/protolude/{src => }/Protolude/List.hs (100%) rename src/protolude/{src => }/Protolude/Monad.hs (100%) rename src/protolude/{src => }/Protolude/Panic.hs (100%) rename src/protolude/{src => }/Protolude/Partial.hs (100%) rename src/protolude/{src => }/Protolude/Safe.hs (100%) rename src/protolude/{src => }/Protolude/Semiring.hs (100%) rename src/protolude/{src => }/Protolude/Show.hs (100%) rename src/protolude/{src => }/Protolude/Unsafe.hs (100%) delete mode 100644 src/protolude/README.md delete mode 100644 src/protolude/Setup.hs delete mode 100755 src/protolude/all_stack.sh delete mode 100644 src/protolude/default.nix delete mode 100644 src/protolude/export_lists/protolude-10.exports delete mode 100644 src/protolude/export_lists/protolude-11.exports delete mode 100644 src/protolude/export_lists/protolude-12.exports delete mode 100644 src/protolude/export_lists/protolude-13.exports delete mode 100644 src/protolude/export_lists/protolude-14.exports delete mode 100644 src/protolude/export_lists/protolude-4.exports delete mode 100644 src/protolude/export_lists/protolude-5.exports delete mode 100644 src/protolude/export_lists/protolude-6.exports delete mode 100644 src/protolude/export_lists/protolude-7.exports delete mode 100644 src/protolude/export_lists/protolude-8.exports delete mode 100644 src/protolude/export_lists/protolude-9.exports delete mode 100644 src/protolude/protolude.cabal delete mode 100644 src/protolude/stack.yaml delete mode 100755 src/protolude/test_stack_lts.sh diff --git a/src/protolude/.ghci b/src/protolude/.ghci deleted file mode 100644 index da0cc8edcf..0000000000 --- a/src/protolude/.ghci +++ /dev/null @@ -1,4 +0,0 @@ -:set -XNoImplicitPrelude -:set -XOverloadedStrings -:set -isrc -:load Protolude diff --git a/src/protolude/.github/workflows/cabal.yml b/src/protolude/.github/workflows/cabal.yml deleted file mode 100644 index 0015f71c35..0000000000 --- a/src/protolude/.github/workflows/cabal.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Cabal CI -on: - pull_request: - types: - - opened - - synchronize -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - ghc: ['9.12.1', '9.10.1', '9.8.2', '9.6.5', '9.4.4', '9.2.6', '9.0.2', '8.10.7', '8.8.4', '8.6.5', '8.4.4', '8.2.2', '8.0.2'] - cabal: ['latest', 3.2] - fail-fast: false - env: - CONFIG: "--enable-tests --enable-benchmarks" - steps: - - uses: actions/checkout@v2 - # https://github.com/haskell/actions/tree/main/setup - - uses: haskell/actions/setup@v2 - id: setup-haskell-cabal - with: - ghc-version: ${{ matrix.ghc }} - cabal-version: ${{ matrix.cabal }} - - run: cabal v2-update - - run: cabal v2-freeze $CONFIG - - uses: actions/cache@v2 - with: - path: | - ${{ steps.setup-haskell-cabal.outputs.cabal-store }} - dist-newstyle - key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.ghc }}- - - run: cabal v2-build $CONFIG - - run: cabal v2-test $CONFIG - - run: cabal v2-haddock $CONFIG - - run: cabal v2-sdist diff --git a/src/protolude/.github/workflows/haskell-ci.yml b/src/protolude/.github/workflows/haskell-ci.yml deleted file mode 100644 index 10ee51dc9f..0000000000 --- a/src/protolude/.github/workflows/haskell-ci.yml +++ /dev/null @@ -1,168 +0,0 @@ -# This GitHub workflow config has been generated by a script via -# -# haskell-ci 'github' 'protolude.cabal' -# -# To regenerate the script (for example after adjusting tested-with) run -# -# haskell-ci regenerate -# -# For more information, see https://github.com/haskell-CI/haskell-ci -# -# version: 0.12.1 -# -# REGENDATA ("0.12.1",["github","protolude.cabal"]) -# -name: Haskell-CI -on: - - pull_request -jobs: - linux: - name: Haskell-CI - Linux - ${{ matrix.compiler }} - runs-on: ubuntu-18.04 - container: - image: buildpack-deps:bionic - continue-on-error: ${{ matrix.allow-failure }} - strategy: - matrix: - include: - - compiler: ghc-7.6.3 - allow-failure: false - - compiler: ghc-7.8.4 - allow-failure: false - - compiler: ghc-7.10.3 - allow-failure: false - fail-fast: false - steps: - - name: apt - run: | - apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y $CC cabal-install-3.4 - env: - CC: ${{ matrix.compiler }} - - name: Set PATH and environment variables - run: | - echo "$HOME/.cabal/bin" >> $GITHUB_PATH - echo "LANG=C.UTF-8" >> $GITHUB_ENV - echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV - echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV - HCDIR=$(echo "/opt/$CC" | sed 's/-/\//') - HCNAME=ghc - HC=$HCDIR/bin/$HCNAME - echo "HC=$HC" >> $GITHUB_ENV - echo "HCPKG=$HCDIR/bin/$HCNAME-pkg" >> $GITHUB_ENV - echo "HADDOCK=$HCDIR/bin/haddock" >> $GITHUB_ENV - echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV - HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') - echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV - echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV - echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV - echo "HEADHACKAGE=false" >> $GITHUB_ENV - echo "ARG_COMPILER=--$HCNAME --with-compiler=$HC" >> $GITHUB_ENV - echo "GHCJSARITH=0" >> $GITHUB_ENV - env: - CC: ${{ matrix.compiler }} - - name: env - run: | - env - - name: write cabal config - run: | - mkdir -p $CABAL_DIR - cat >> $CABAL_CONFIG < cabal-plan.xz - echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c - - xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan - rm -f cabal-plan.xz - chmod a+x $HOME/.cabal/bin/cabal-plan - cabal-plan --version - - name: checkout - uses: actions/checkout@v2 - with: - path: source - - name: initial cabal.project for sdist - run: | - touch cabal.project - echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project - cat cabal.project - - name: sdist - run: | - mkdir -p sdist - $CABAL sdist all --output-dir $GITHUB_WORKSPACE/sdist - - name: unpack - run: | - mkdir -p unpacked - find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \; - - name: generate cabal.project - run: | - PKGDIR_protolude="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/protolude-[0-9.]*')" - echo "PKGDIR_protolude=${PKGDIR_protolude}" >> $GITHUB_ENV - touch cabal.project - touch cabal.project.local - echo "packages: ${PKGDIR_protolude}" >> cabal.project - if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package protolude" >> cabal.project ; fi - if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi - cat >> cabal.project <> cabal.project.local - cat cabal.project - cat cabal.project.local - - name: dump install plan - run: | - $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all - cabal-plan - - name: cache - uses: actions/cache@v2 - with: - key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} - path: ~/.cabal/store - restore-keys: ${{ runner.os }}-${{ matrix.compiler }}- - - name: install dependencies - run: | - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all - $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all - - name: build w/o tests - run: | - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - - name: build - run: | - $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always - - name: cabal check - run: | - cd ${PKGDIR_protolude} || false - ${CABAL} -vnormal check - - name: haddock - run: | - $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all - - name: unconstrained build - run: | - rm -f cabal.project.local - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all diff --git a/src/protolude/.github/workflows/hlint.yml b/src/protolude/.github/workflows/hlint.yml deleted file mode 100644 index eb6549d658..0000000000 --- a/src/protolude/.github/workflows/hlint.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: HLint CI - -on: - push: - branches: - - master - pull_request: - branches: [ master ] - paths: - - '.github/workflows/hlint.yml' - - 'app/**/*.hs' - - 'src/**/*.hs' - - 'test/**/*.hs' -jobs: - hlint: - runs-on: ubuntu-latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - HLINT_ACTION_LOG_LEVEL: debug - steps: - - name: Check out - uses: actions/checkout@v2 - - - name: Set up HLint - uses: rwe/actions-hlint-setup@v1 - - - name: Haskell Lint - uses: rwe/actions-hlint-run@v2 - with: - path: '["src/"]' - fail-on: warning diff --git a/src/protolude/.github/workflows/nix.yml b/src/protolude/.github/workflows/nix.yml deleted file mode 100644 index b753def1cb..0000000000 --- a/src/protolude/.github/workflows/nix.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Nix CI - -on: [pull_request] -jobs: - build: - name: nix - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: cachix/install-nix-action@v3 - env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: true - - run: nix-build diff --git a/src/protolude/.github/workflows/stack.yml b/src/protolude/.github/workflows/stack.yml deleted file mode 100644 index 26780aea7d..0000000000 --- a/src/protolude/.github/workflows/stack.yml +++ /dev/null @@ -1,118 +0,0 @@ -name: Stack CI - -on: - pull_request: - schedule: - - cron: "0 0 * * 1" - -jobs: - build: - name: stack ${{ matrix.plan.resolver }} - strategy: - matrix: - os: [ubuntu-latest, macOS-latest] - # use this to specify what resolvers and ghc to use - plan: - - { build: stack, resolver: "lts-9" } # ghc-8.0.2 - - { build: stack, resolver: "lts-10" } # ghc-8.2.2 - - { build: stack, resolver: "lts-11" } # ghc-8.2.2 - - { build: stack, resolver: "lts-12" } # ghc-8.4.4 - - { build: stack, resolver: "lts-13" } # ghc-8.6.4 - - { build: stack, resolver: "lts-14" } # ghc-8.6.5 - - { build: stack, resolver: "lts-15" } # ghc-8.8.2 - - { build: stack, resolver: "lts-16" } # ghc-8.8.4 - - { build: stack, resolver: "lts-17" } # ghc-8.10.3 - - { build: stack, resolver: "lts-18" } # ghc-8.10.7 - - { build: stack, resolver: "lts-19" } # ghc-9.0.2 - - { build: stack, resolver: "lts-20" } # ghc-9.2.5 - - # - { build: stack, resolver: "" } - # use this to include any dependencies from OS package managers - include: [] - # - os: macOS-latest - # brew: anybrewdeps - # - os: ubuntu-latest - # apt-get: happy libblas-dev liblapack-dev - - exclude: - - os: macOS-latest - plan: - build: cabal - - runs-on: ${{ matrix.os }} - steps: - - name: Install OS Packages - uses: mstksg/get-package@v1 - with: - apt-get: ${{ matrix.apt-get }} - brew: ${{ matrix.brew }} - - uses: actions/checkout@v1 - - - name: Setup stack - uses: mstksg/setup-stack@v1 - env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: true - - - name: Setup cabal-install - uses: actions/setup-haskell@v1 - with: - ghc-version: ${{ matrix.plan.ghc }} - cabal-version: ${{ matrix.plan.cabal-install }} - if: matrix.plan.build == 'cabal' - - - name: Install dependencies - run: | - set -ex - case "$BUILD" in - stack) - stack --no-terminal --install-ghc --resolver $ARGS test --bench --only-dependencies - ;; - cabal) - cabal --version - cabal update - PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@') - cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES - ;; - esac - set +ex - env: - ARGS: ${{ matrix.plan.resolver }} - BUILD: ${{ matrix.plan.build }} - - - name: Build - run: | - set -ex - case "$BUILD" in - stack) - stack --no-terminal --resolver $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps - ;; - cabal) - PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@') - cabal install --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES - - ORIGDIR=$(pwd) - for dir in $PACKAGES - do - cd $dir - cabal check || [ "$CABALVER" == "1.16" ] - cabal sdist - PKGVER=$(cabal info . | awk '{print $2;exit}') - SRC_TGZ=$PKGVER.tar.gz - cd dist - tar zxfv "$SRC_TGZ" - cd "$PKGVER" - cabal configure --enable-tests --ghc-options -O0 - cabal build - if [ "$CABALVER" = "1.16" ] || [ "$CABALVER" = "1.18" ]; then - cabal test - else - cabal test --show-details=streaming --log=/dev/stdout - fi - cd $ORIGDIR - done - ;; - esac - set +ex - env: - ARGS: ${{ matrix.plan.resolver }} - BUILD: ${{ matrix.plan.build }} diff --git a/src/protolude/.gitignore b/src/protolude/.gitignore deleted file mode 100644 index e4d8f57585..0000000000 --- a/src/protolude/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -*.sw[ponmkl] -.stack-work -dist -.cabal-sandbox -cabal.sandbox.config -*.hi -*.o -stack.yaml.lock -dist-newstyle diff --git a/src/protolude/.hlint.yaml b/src/protolude/.hlint.yaml deleted file mode 100644 index 2e151fd281..0000000000 --- a/src/protolude/.hlint.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- ignore: {name: Avoid lambda} -- ignore: {name: Eta reduce} -- ignore: {name: Redundant lambda} -- ignore: {name: Collapse lambdas} -- ignore: {name: Use String} -- ignore: {name: Use fmap, within: Protolude.Monad} -- ignore: {name: Use putStr, within: Protolude.Show} -- ignore: {name: Use putStrLn, within: Protolude.Show} -- ignore: {name: Use bimap, within: Protolude.Bifunctor} -- ignore: {name: Use first, within: Protolude.Bifunctor} -- ignore: {name: Use sortOn} -# CPP preprocessor oddities -- ignore: {name: Unused LANGUAGE pragma, within: [Protolude.Base, Protolude.CallStack, Protolude.Conv, Protolude.Error]} diff --git a/src/protolude/ChangeLog.md b/src/protolude/ChangeLog.md deleted file mode 100644 index 51e3ae011a..0000000000 --- a/src/protolude/ChangeLog.md +++ /dev/null @@ -1,143 +0,0 @@ -0.3.3 -===== -* GHC 9.4.4 support - -0.3.2 -===== -* GHC 9.2.2 support -* Drop export executable - -0.3.1 -===== -* GHC 9.0.1 and 9.2.1 support -* Add `HasCallStack` to unsafe* functions. -* Banish `String` on `readMaybe` and `readEither`. - -0.3.0 -===== - -* GHC 8.10.1 support -* Use `Protolude.ConvertText` as the default string conversion class. This - removes partial functions when converting to/from ByteStrings. -* Provide `Protolude.Conv` as a compatibility layer for old string conversion - interface. -* Migrated `Debug` and `Unsafe` to `Protolude.Debug` and `Protolude.Unsafe`. -* Export Unicode functions: - - `intToDigit` - - `isAlpha` - - `isAlphaNum` - - `isAscii` - - `isControl` - - `isDigit` - - `isHexDigit` - - `isLetter` - - `isLower` - - `isPrint` - - `isSpace` - - `isUpper` -* Export `MonadFail` class. -* Export `gcast` from Data.Typeable. -* Export `typeOf` from Data.Typeable. -* Export `Handler` from Control.Exception. -* Export `yield` from Control.Concurrency. -* Provide compatibility module `Protolude.Partial` as single export for unsafe - partial functions with the same naming conventions as Prelude. - -0.2.4 -===== - -* GHC 8.8.1 support - -0.2.3 -===== - -* GHC 8.6.1 support -* Export `fromLeft` and `fromRight`. -* Mask `always` and `alwaysSucceeds` from STM export for stm-2.5. - -0.2.2 -===== - -* Add explicit `witness` function for use as type witness without warnings. - Makes undefined semantically distinguishable from type witnesses. -* Backwards compatible `Protolude.Safe` module for explicit handling of partial - list operations. -* Export `minimumDef`, `maximumDef`. -* Looser lower-bound on Data.Kind export for GHC 8.0.x. - -0.2.1 -==== - -* Exposes `throwE` and `catchE`. -* Add `transformers-compat` for old versions of transformers that require - `throwE`, `catchE`. -* Fix `safe` version bounds for new versions. -* Add `mapExceptT and `withExceptT`. -* Export `scanl'` and provide shim for backwards compatibility. -* Add `putErrLn`. -* Expose `RealFloat`. -* Expose `GHC.Records` exports for GHC 8.2 and above. - -0.2 -==== - -* Expose `Symbol` and `Nat` types from `GHC.TypeLits` by default. -* Switch exported `(<>)` to be from `Data.Monoid` instead of Semigroup. -* Expose `putByteString` and `putLByteString` monomorphic versions of `putStrLn` functions -* Export `genericLength` and other generic list return functions. -* Rename `msg` to `fatalErrorMessage`. -* Export `ExceptT`, `ReaderT`, and `StateT` constructors. -* Mask `displayException` from default exports. -* Mask `stToIO` from default exports. -* Export `NonEmpty` type and constructor for Base 4.9 only. -* Export `Data.Semigroup` type and functions for Base 4.9 only. -* Restrict exported symbols from ``async`` to set available in 2.0. -* Add `(&&^)`, `(||^)`, `(<&&>)`, `(<||>)` -* Expose `unzip`. -* Export `maximumMay` and `minimumMay`. -* Mask `Type` export from `Data.Kind`. -* Wrap `die` to take `Text` argument instead of `[Char]`. -* Export constructors `GHC.Generics`: `(:+:)`, `(:*:)`, and `(:.:)`. -* Expose `StablePtr`, `IntPtr` and `WordPtr` types. - -0.1.9 -==== - -* Make `sum` and `product` strict - -0.1.8 -===== - -* ``foreach`` for applicative traversals. -* ``hush`` function for error handling. -* ``tryIO`` function for error handling. -* ``pass`` function for noop applicative branches. -* Mask ``Handler`` typeclass export. -* Mask ``yield`` function export. - -0.1.7 -===== - -* Exports monadic ``(>>)`` operator by default. -* Adds ``traceId`` and ``traceShowId`` functions. -* Exports``reader`` and ``state`` functions by default. -* Export lifted ``throwIO`` and ``throwTo`` functions. - -0.1.6 -===== - -* Adds uncatchable panic exception throwing using Text message. -* Removes ``printf`` -* Removes ``string-conv`` dependency so Stack build works without ``extra-deps``. -* Brings ``Callstack`` machinery in for GHC 8.x. -* Removes ``throw`` and ``assert`` from ``Control.Exception`` exports. -* Removes ``unsafeShiftL`` and ``unsafeShiftR`` from ``Data.Bits`` exports. -* Reexport ``throw`` as ``unsafeThrow`` via Unsafe module. -* Hides all Show class functions. Only the Class itself is exported. Forbids custom instances that are not GHC derived. -* Export`` encodeUtf8`` and ``decodeUtf8`` functions by default. -* Adds ``unsnoc`` function. - -0.1.5 -===== - -* Initial release. diff --git a/src/protolude/src/Protolude.hs b/src/protolude/Protolude.hs similarity index 100% rename from src/protolude/src/Protolude.hs rename to src/protolude/Protolude.hs diff --git a/src/protolude/src/Protolude/Applicative.hs b/src/protolude/Protolude/Applicative.hs similarity index 100% rename from src/protolude/src/Protolude/Applicative.hs rename to src/protolude/Protolude/Applicative.hs diff --git a/src/protolude/src/Protolude/Base.hs b/src/protolude/Protolude/Base.hs similarity index 100% rename from src/protolude/src/Protolude/Base.hs rename to src/protolude/Protolude/Base.hs diff --git a/src/protolude/src/Protolude/Bifunctor.hs b/src/protolude/Protolude/Bifunctor.hs similarity index 100% rename from src/protolude/src/Protolude/Bifunctor.hs rename to src/protolude/Protolude/Bifunctor.hs diff --git a/src/protolude/src/Protolude/Bool.hs b/src/protolude/Protolude/Bool.hs similarity index 100% rename from src/protolude/src/Protolude/Bool.hs rename to src/protolude/Protolude/Bool.hs diff --git a/src/protolude/src/Protolude/CallStack.hs b/src/protolude/Protolude/CallStack.hs similarity index 100% rename from src/protolude/src/Protolude/CallStack.hs rename to src/protolude/Protolude/CallStack.hs diff --git a/src/protolude/src/Protolude/Conv.hs b/src/protolude/Protolude/Conv.hs similarity index 100% rename from src/protolude/src/Protolude/Conv.hs rename to src/protolude/Protolude/Conv.hs diff --git a/src/protolude/src/Protolude/ConvertText.hs b/src/protolude/Protolude/ConvertText.hs similarity index 100% rename from src/protolude/src/Protolude/ConvertText.hs rename to src/protolude/Protolude/ConvertText.hs diff --git a/src/protolude/src/Protolude/Debug.hs b/src/protolude/Protolude/Debug.hs similarity index 100% rename from src/protolude/src/Protolude/Debug.hs rename to src/protolude/Protolude/Debug.hs diff --git a/src/protolude/src/Protolude/Either.hs b/src/protolude/Protolude/Either.hs similarity index 100% rename from src/protolude/src/Protolude/Either.hs rename to src/protolude/Protolude/Either.hs diff --git a/src/protolude/src/Protolude/Error.hs b/src/protolude/Protolude/Error.hs similarity index 100% rename from src/protolude/src/Protolude/Error.hs rename to src/protolude/Protolude/Error.hs diff --git a/src/protolude/src/Protolude/Exceptions.hs b/src/protolude/Protolude/Exceptions.hs similarity index 100% rename from src/protolude/src/Protolude/Exceptions.hs rename to src/protolude/Protolude/Exceptions.hs diff --git a/src/protolude/src/Protolude/Functor.hs b/src/protolude/Protolude/Functor.hs similarity index 100% rename from src/protolude/src/Protolude/Functor.hs rename to src/protolude/Protolude/Functor.hs diff --git a/src/protolude/src/Protolude/List.hs b/src/protolude/Protolude/List.hs similarity index 100% rename from src/protolude/src/Protolude/List.hs rename to src/protolude/Protolude/List.hs diff --git a/src/protolude/src/Protolude/Monad.hs b/src/protolude/Protolude/Monad.hs similarity index 100% rename from src/protolude/src/Protolude/Monad.hs rename to src/protolude/Protolude/Monad.hs diff --git a/src/protolude/src/Protolude/Panic.hs b/src/protolude/Protolude/Panic.hs similarity index 100% rename from src/protolude/src/Protolude/Panic.hs rename to src/protolude/Protolude/Panic.hs diff --git a/src/protolude/src/Protolude/Partial.hs b/src/protolude/Protolude/Partial.hs similarity index 100% rename from src/protolude/src/Protolude/Partial.hs rename to src/protolude/Protolude/Partial.hs diff --git a/src/protolude/src/Protolude/Safe.hs b/src/protolude/Protolude/Safe.hs similarity index 100% rename from src/protolude/src/Protolude/Safe.hs rename to src/protolude/Protolude/Safe.hs diff --git a/src/protolude/src/Protolude/Semiring.hs b/src/protolude/Protolude/Semiring.hs similarity index 100% rename from src/protolude/src/Protolude/Semiring.hs rename to src/protolude/Protolude/Semiring.hs diff --git a/src/protolude/src/Protolude/Show.hs b/src/protolude/Protolude/Show.hs similarity index 100% rename from src/protolude/src/Protolude/Show.hs rename to src/protolude/Protolude/Show.hs diff --git a/src/protolude/src/Protolude/Unsafe.hs b/src/protolude/Protolude/Unsafe.hs similarity index 100% rename from src/protolude/src/Protolude/Unsafe.hs rename to src/protolude/Protolude/Unsafe.hs diff --git a/src/protolude/README.md b/src/protolude/README.md deleted file mode 100644 index c441550758..0000000000 --- a/src/protolude/README.md +++ /dev/null @@ -1,220 +0,0 @@ -Protolude -========= - -[![Build Status](https://github.com/protolude/protolude/workflows/Cabal%20CI/badge.svg)](https://github.com/protolude/protolude/actions) -[![Build Status](https://github.com/protolude/protolude/workflows/Stack%20CI/badge.svg)](https://github.com/protolude/protolude/actions) -[![Build Status](https://github.com/protolude/protolude/workflows/Nix%20CI/badge.svg)](https://github.com/protolude/protolude/actions) -[![Hackage](https://img.shields.io/hackage/v/protolude.svg)](https://hackage.haskell.org/package/protolude) - -A sensible starting Prelude for building custom Preludes. - -Design points: - -* Banishes String. -* Banishes partial functions. -* Compiler warning on bottoms. -* Polymorphic string IO functions. -* Polymorphic show. -* Automatic string conversions. -* Types for common data structures in scope. -* Types for all common string types (Text/ByteString) in scope. -* Banishes impure exception throwing outside of IO. -* StateT/ReaderT/ExceptT transformers in scope by default. -* Foldable / Traversable functions in scope by default. -* Unsafe functions are prefixed with "unsafe" in separate module. -* Compiler agnostic, GHC internal modules are abstracted out into Base. -* ``sum`` and ``product`` are strict by default. -* Includes Semiring for GHC >= 7.6. -* Includes Bifunctor for GHC >= 7.6. -* Includes Semigroup for GHC >= 7.6. - -Supports: - - * GHC 7.6.3 - * GHC 7.8.4 - * GHC 7.10.3 - * GHC 8.0.2 - * GHC 8.2.2 - * GHC 8.4.1 - * GHC 8.4.4 - * GHC 8.6.1 - * GHC 8.6.4 - * GHC 8.6.5 - * GHC 8.8.1 - * GHC 8.10.1 - * GHC 9.0.1 - * GHC 9.2.1 - -Stack LTS: - -* lts-6.x -* lts-7.x -* lts-8.x -* lts-9.x -* lts-10.x -* lts-11.x -* lts-12.x -* lts-13.x -* lts-14.x -* lts-15.x -* lts-16.x -* lts-17.x -* lts-18.x -* lts-19.14 and higher - -Usage ------ - -To try out standalone prelude at the interactive shell, from the Protolude -project directory run. - -```haskell -$ stack repl -> import Protolude -``` - -Swapping out the old Prelude ----------------------------- - -Disable the built-in prelude at the top of your file: - -```haskell -{-# LANGUAGE NoImplicitPrelude #-} -``` - -Or directly in your project cabal file: - -```haskell -default-extensions: NoImplicitPrelude -``` - -Then in your modules: - -```haskell -import Protolude -``` - -Dependencies ------------- - -Protolude tries to be light on dependencies and only pulls in *essential* -libraries that are universally common across most real-world projects. Lower and -upper bounds are fully specified and compatible with both vanilla Cabal and -tracks Stack LTS resolver. - -| Dependencies | Lower (>=) | Upper (<) | -| ----------- | -------- | -------- | -| array | 0.4 | 0.6 | -| async | 2.0 | 2.3 | -| base | 4.6 | 4.16 | -| bytestring | 0.10 | 0.11 | -| containers | 0.5 | 0.7 | -| deepseq | 1.3 | 1.5 | -| ghc-prim | 0.3 | 0.7 | -| hashable | 1.2 | 1.4 | -| mtl | 2.1 | 2.3 | -| stm | 2.4 | 2.6 | -| text | 1.2 | 1.3 | -| transformers | 0.4 | 0.6 | -| fail | 4.9 | 4.10 | - -Structure ---------- - -Protolude's main modules are the following: - -* [Protolude.hs](https://github.com/sdiehl/protolude/blob/master/src/Protolude.hs) -* [Base.hs](https://github.com/sdiehl/protolude/blob/master/src/Protolude/Base.hs) -* [Show.hs](https://github.com/sdiehl/protolude/blob/master/src/Protolude/Show.hs) -* [Conv.hs](https://github.com/sdiehl/protolude/blob/master/src/Protolude/Conv.hs) - -FAQs ----- - -* **My ``putStrLn`` and ``putStr`` instances are no longer inferred in the presense -of the ``-XOverloadedStrings`` extension?** - -Because the print functions are polymorphic the type of the print functions may -require annotations if the type is not fully specified by inference. To force a -specific type at the call site use either - -```haskell -putText :: MonadIO m => T.Text -> m () -putLText :: MonadIO m => TL.Text -> m () -``` - -* **How do I write manual Show instances if ``show`` isn't provided?** - -Generally speaking writing manual instances of Show is a -[Haskell antipattern](http://www.stephendiehl.com/posts/strings.html) because it produces -law-violating instances of Show. You probably want to use a -[pretty printer](https://hackage.haskell.org/package/wl-pprint-text) library for custom printing. - -If backwards compatibility is needed then the base library can be imported -manually. - -```haskell -import GHC.Show (Show(..)) -``` - -Automatic deriving of ``Show`` for your types is still supported since the class -is in scope by default. - -* **Partial functions like ``undefined`` raise compiler warnings on - usage.** - -This is by design. For fatal uncatchable errors use the provided ``panic`` -function if you intend the program to immediately abort. - -```haskell -panic "Thus I die. Thus, thus, thus. Now I am dead" -``` - -If inside of IO simply use ``throwIO`` for exception handling, or if in pure -business logic use well-typed checked exceptions of the ``ExceptT`` variety. - -* **Why is ``id`` not in scope?** - -It has been renamed to ``identity`` to reserve the ``id`` identifier for the -more common use case of business logic. - -* **But what if I want the partial functions?** - -You if you need partial functions for backwards compatibility you can use the -`Protolude.Partial` module and mask the safe definitions as needed. - -```haskell -import Protolude hiding (head) -import Protolude.Partial (head) -``` - -Development Tools ------------------ - -**GHC Magic** - -To build the `exports` management tool use: - -```bash -$ cabal new-build exports --flag dev -$ cabal run exports -``` - -This tool uses GHC's internal compile symbol table to generate a list of exports -and keep the export list of protolude stable across different versions of GHC -and base. - -**Continious Integration** - -There is a massive test suite that tests all versions of GHC 7.6 - GHC HEAD -alongside all Stack resolvers to ensure no regressions. Any pull requests or -patch has to pass the 47 integrity checks before being considered. Any pull -request must keep the export list consistent across GHC and Base version and not -have any accidental symbol dropping or drift without updating the export golden -tests. - -License -------- - -Released under the MIT License. -Copyright (c) 2016-2022, Stephen Diehl diff --git a/src/protolude/Setup.hs b/src/protolude/Setup.hs deleted file mode 100644 index 9a994af677..0000000000 --- a/src/protolude/Setup.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Distribution.Simple -main = defaultMain diff --git a/src/protolude/all_stack.sh b/src/protolude/all_stack.sh deleted file mode 100755 index 69df0cc994..0000000000 --- a/src/protolude/all_stack.sh +++ /dev/null @@ -1,137 +0,0 @@ -set -e - -stack build --resolver lts-3.0 -stack build --resolver lts-4.0 -stack build --resolver lts-5.0 -stack build --resolver lts-6.0 -stack build --resolver lts-7.0 -stack build --resolver lts-7.1 -stack build --resolver lts-7.2 -stack build --resolver lts-7.3 -stack build --resolver lts-7.4 -stack build --resolver lts-7.5 -stack build --resolver lts-7.6 -stack build --resolver lts-7.7 -stack build --resolver lts-7.8 -stack build --resolver lts-7.9 -stack build --resolver lts-7.10 -stack build --resolver lts-7.11 -stack build --resolver lts-7.12 -stack build --resolver lts-7.13 -stack build --resolver lts-7.14 -stack build --resolver lts-7.15 -stack build --resolver lts-7.16 -stack build --resolver lts-8.0 -stack build --resolver lts-8.1 -stack build --resolver lts-8.2 -stack build --resolver lts-8.3 -stack build --resolver lts-8.4 -stack build --resolver lts-8.5 -stack build --resolver lts-8.6 -stack build --resolver lts-8.7 -stack build --resolver lts-8.8 -stack build --resolver lts-8.9 -stack build --resolver lts-8.10 -stack build --resolver lts-8.11 -stack build --resolver lts-8.12 -stack build --resolver lts-8.13 -stack build --resolver lts-9.0 -stack build --resolver lts-9.1 -stack build --resolver lts-9.2 -stack build --resolver lts-9.3 -stack build --resolver lts-9.4 -stack build --resolver lts-9.5 -stack build --resolver lts-9.6 -stack build --resolver lts-9.7 -stack build --resolver lts-9.8 -stack build --resolver lts-9.9 -stack build --resolver lts-9.10 -stack build --resolver lts-9.11 -stack build --resolver lts-9.12 -stack build --resolver lts-9.13 -stack build --resolver lts-9.14 -stack build --resolver lts-9.15 -stack build --resolver lts-9.16 -stack build --resolver lts-9.17 -stack build --resolver lts-9.18 -stack build --resolver lts-9.19 -stack build --resolver lts-9.20 -stack build --resolver lts-10.0 -stack build --resolver lts-10.1 -stack build --resolver lts-10.2 -stack build --resolver lts-11.0 -stack build --resolver lts-11.1 -stack build --resolver lts-11.2 -stack build --resolver lts-11.3 -stack build --resolver lts-11.4 -stack build --resolver lts-11.5 -stack build --resolver lts-11.6 -stack build --resolver lts-11.7 -stack build --resolver lts-11.8 -stack build --resolver lts-11.10 -stack build --resolver lts-11.11 -stack build --resolver lts-11.12 -stack build --resolver lts-11.13 -stack build --resolver lts-12.0 -stack build --resolver lts-12.1 -stack build --resolver lts-12.2 -stack build --resolver lts-12.3 -stack build --resolver lts-12.4 -stack build --resolver lts-12.5 -stack build --resolver lts-12.6 -stack build --resolver lts-12.7 -stack build --resolver lts-12.8 -stack build --resolver lts-12.9 -stack build --resolver lts-12.10 -stack build --resolver lts-12.11 -stack build --resolver lts-12.12 -stack build --resolver lts-12.13 -stack build --resolver lts-12.14 -stack build --resolver lts-12.16 -stack build --resolver lts-12.17 -stack build --resolver lts-12.18 -stack build --resolver lts-12.19 -stack build --resolver lts-12.20 -stack build --resolver lts-12.21 -stack build --resolver lts-13.0 -stack build --resolver lts-13.1 -stack build --resolver lts-13.2 -stack build --resolver lts-13.3 -stack build --resolver lts-13.4 -stack build --resolver lts-13.5 -stack build --resolver lts-13.6 -stack build --resolver lts-13.7 -stack build --resolver lts-13.8 -stack build --resolver lts-13.9 -stack build --resolver lts-13.10 -stack build --resolver lts-13.11 -stack build --resolver lts-13.12 -stack build --resolver lts-13.13 -stack build --resolver lts-13.14 -stack build --resolver lts-13.15 -stack build --resolver lts-13.16 -stack build --resolver lts-13.17 -stack build --resolver lts-13.18 -stack build --resolver lts-13.19 -stack build --resolver lts-13.20 -stack build --resolver lts-13.21 -stack build --resolver lts-13.22 -stack build --resolver lts-13.23 -stack build --resolver lts-13.24 -stack build --resolver lts-13.25 -stack build --resolver lts-13.26 -stack build --resolver lts-14.0 -stack build --resolver lts-14.1 -stack build --resolver lts-14.2 -stack build --resolver lts-14.3 -stack build --resolver lts-14.4 -stack build --resolver lts-14.5 -stack build --resolver lts-14.6 -stack build --resolver lts-14.7 -stack build --resolver lts-14.8 -stack build --resolver lts-14.9 -stack build --resolver lts-14.10 -stack build --resolver lts-14.11 -stack build --resolver lts-14.12 -stack build --resolver lts-14.13 -stack build --resolver lts-14.14 diff --git a/src/protolude/default.nix b/src/protolude/default.nix deleted file mode 100644 index 1fc6c5c982..0000000000 --- a/src/protolude/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ pkgs ? import {} -}: -pkgs.haskellPackages.developPackage { - root = ./.; -} diff --git a/src/protolude/export_lists/protolude-10.exports b/src/protolude/export_lists/protolude-10.exports deleted file mode 100644 index 44678c73d3..0000000000 --- a/src/protolude/export_lists/protolude-10.exports +++ /dev/null @@ -1,960 +0,0 @@ -$ from GHC.Base -$! from Protolude.Base -$!! from Control.DeepSeq -$> from Data.Functor -% from GHC.Real -& from Data.Function -&& from GHC.Classes -&&^ from Protolude.Bool -* from GHC.Num -* from GHC.Types -** from GHC.Float -*> from GHC.Base -+ from GHC.Num -++ from GHC.Base -- from GHC.Num -. from GHC.Base -.&. from Data.Bits -.|. from Data.Bits -/ from GHC.Real -/= from GHC.Classes -:% from GHC.Real -:*: from GHC.Generics -:*: from GHC.Generics -:+ from Data.Complex -:+: from GHC.Generics -:.: from GHC.Generics -:| from Data.List.NonEmpty -:~: from Data.Type.Equality -< from GHC.Classes -<$ from GHC.Base -<$!> from Control.Monad -<$> from Data.Functor -<&&> from Protolude.Bool -<&> from Protolude.Functor -<* from GHC.Base -<**> from GHC.Base -<*> from GHC.Base -<.> from Protolude.Semiring -<<$>> from Protolude.Functor -<<*>> from Protolude.Applicative -<= from GHC.Classes -<=< from Control.Monad -<> from Data.Monoid -<|> from GHC.Base -<||> from Protolude.Bool -=<< from GHC.Base -== from GHC.Classes -== from Data.Type.Equality -> from GHC.Classes ->= from GHC.Classes ->=> from Control.Monad ->> from GHC.Base ->>= from GHC.Base -All from Data.Monoid -All from Data.Monoid -AllocationLimitExceeded from GHC.IO.Exception -AllocationLimitExceeded from GHC.IO.Exception -Alt from Data.Monoid -Alt from Data.Monoid -Alternative from GHC.Base -Any from Data.Monoid -Any from Data.Monoid -AppendMode from GHC.IO.IOMode -Applicative from GHC.Base -ArithException from GHC.Exception -ArrayException from GHC.IO.Exception -AssertionFailed from GHC.IO.Exception -AssertionFailed from GHC.IO.Exception -Associativity from GHC.Generics -Async from Control.Concurrent.Async -AsyncException from GHC.IO.Exception -Bifunctor from Data.Bifunctor -Bits from Data.Bits -BlockedIndefinitelyOnMVar from GHC.IO.Exception -BlockedIndefinitelyOnMVar from GHC.IO.Exception -BlockedIndefinitelyOnSTM from GHC.IO.Exception -BlockedIndefinitelyOnSTM from GHC.IO.Exception -Bool from GHC.Types -Bounded from GHC.Enum -ByteString from Data.ByteString.Internal -C1 from GHC.Generics -CallStack from GHC.Stack.Types -Chan from Control.Concurrent.Chan -Char from GHC.Types -CmpNat from GHC.TypeNats -Coercible from GHC.Types -Coercion from Data.Type.Coercion -Coercion from Data.Type.Coercion -Comp1 from GHC.Generics -CompactionFailed from GHC.IO.Exception -CompactionFailed from GHC.IO.Exception -Complex from Data.Complex -Concurrently from Control.Concurrent.Async -Concurrently from Control.Concurrent.Async -Const from Data.Functor.Const -Const from Data.Functor.Const -Constraint from GHC.Types -Constructor from GHC.Generics -D# from GHC.Types -D1 from GHC.Generics -Datatype from GHC.Generics -Deadlock from GHC.IO.Exception -Deadlock from GHC.IO.Exception -Denormal from GHC.Exception -DivideByZero from GHC.Exception -Double from GHC.Types -Down from Data.Ord -Down from Data.Ord -Dual from Data.Monoid -Dual from Data.Monoid -EQ from GHC.Types -Either from Data.Either -Endo from Data.Monoid -Endo from Data.Monoid -Enum from GHC.Enum -Eq from GHC.Classes -ErrorCall from GHC.Exception -ErrorCall from GHC.Exception -ErrorCallWithLocation from GHC.Exception -Except from Control.Monad.Trans.Except -ExceptT from Control.Monad.Trans.Except -ExceptT from Control.Monad.Trans.Except -Exception from GHC.Exception -ExitCode from GHC.IO.Exception -ExitFailure from GHC.IO.Exception -ExitSuccess from GHC.IO.Exception -F# from GHC.Types -False from GHC.Types -FatalError from Protolude.Panic -FatalError from Protolude.Panic -FilePath from GHC.IO -FiniteBits from Data.Bits -First from Data.Monoid -First from Data.Monoid -Fixity from GHC.Generics -FixityI from GHC.Generics -Float from GHC.Types -Floating from GHC.Float -Foldable from Data.Foldable -Fractional from GHC.Real -FunPtr from GHC.Ptr -Functor from GHC.Base -GT from GHC.Types -Generic from GHC.Generics -Generic1 from GHC.Generics -Handle from GHC.IO.Handle.Types -HasCallStack from GHC.Stack.Types -HasField from GHC.Records -Hashable from Data.Hashable.Class -HeapOverflow from GHC.IO.Exception -IO from GHC.Types -IOException from GHC.IO.Exception -IOMode from GHC.IO.IOMode -Identity from Data.Functor.Identity -Identity from Data.Functor.Identity -IndexOutOfBounds from GHC.IO.Exception -Infix from GHC.Generics -InfixI from GHC.Generics -Int from GHC.Types -Int16 from GHC.Int -Int32 from GHC.Int -Int64 from GHC.Int -Int8 from GHC.Int -IntMap from Data.IntMap.Internal -IntPtr from Foreign.Ptr -IntSet from Data.IntSet.Internal -Integer from GHC.Integer.Type -Integral from GHC.Real -IsLabel from GHC.OverloadedLabels -IsString from Data.String -Just from GHC.Base -K1 from GHC.Generics -K1 from GHC.Generics -KnownNat from GHC.TypeNats -KnownSymbol from GHC.TypeLits -L1 from GHC.Generics -LByteString from Protolude -LT from GHC.Types -LText from Protolude -Last from Data.Monoid -Last from Data.Monoid -Left from Data.Either -LeftAssociative from GHC.Generics -Leniency from Protolude.Conv -Lenient from Protolude.Conv -Location from GHC.ExecutionStack.Internal -Location from GHC.ExecutionStack.Internal -LossOfPrecision from GHC.Exception -M1 from GHC.Generics -M1 from GHC.Generics -MVar from GHC.MVar -Map from Data.Map.Internal -MaskedInterruptible from GHC.IO -MaskedUninterruptible from GHC.IO -MaskingState from GHC.IO -Maybe from GHC.Base -Meta from GHC.Generics -MetaCons from GHC.Generics -MetaData from GHC.Generics -MetaSel from GHC.Generics -Monad from GHC.Base -MonadError from Control.Monad.Error.Class -MonadIO from Control.Monad.IO.Class -MonadPlus from GHC.Base -MonadReader from Control.Monad.Reader.Class -MonadState from Control.Monad.State.Class -Monoid from GHC.Base -NFData from Control.DeepSeq -Nat from GHC.Types -NestedAtomically from Control.Exception.Base -NestedAtomically from Control.Exception.Base -NoMethodError from Control.Exception.Base -NoMethodError from Control.Exception.Base -NonEmpty from Data.List.NonEmpty -NonTermination from Control.Exception.Base -NonTermination from Control.Exception.Base -NotAssociative from GHC.Generics -Nothing from GHC.Base -Num from GHC.Num -OnDecodeError from Data.Text.Encoding.Error -OnError from Data.Text.Encoding.Error -Option from Data.Semigroup -Option from Data.Semigroup -Ord from GHC.Classes -Ordering from GHC.Types -Overflow from GHC.Exception -PatternMatchFail from Control.Exception.Base -PatternMatchFail from Control.Exception.Base -Prefix from GHC.Generics -PrefixI from GHC.Generics -Print from Protolude.Show -Product from Data.Monoid -Product from Data.Monoid -Proxy from Data.Proxy -Proxy from Data.Proxy -Ptr from GHC.Ptr -QSem from Control.Concurrent.QSem -QSemN from Control.Concurrent.QSemN -R1 from GHC.Generics -Ratio from GHC.Real -RatioZeroDenominator from GHC.Exception -Rational from GHC.Real -Read from GHC.Read -ReadMode from GHC.IO.IOMode -ReadWriteMode from GHC.IO.IOMode -Reader from Control.Monad.Trans.Reader -ReaderT from Control.Monad.Trans.Reader -ReaderT from Control.Monad.Trans.Reader -Real from GHC.Real -RealFloat from GHC.Float -RealFrac from GHC.Real -Rec0 from GHC.Generics -RecConError from Control.Exception.Base -RecConError from Control.Exception.Base -RecSelError from Control.Exception.Base -RecSelError from Control.Exception.Base -RecUpdError from Control.Exception.Base -RecUpdError from Control.Exception.Base -Refl from Data.Type.Equality -Rep from GHC.Generics -Right from Data.Either -RightAssociative from GHC.Generics -S1 from GHC.Generics -ST from GHC.ST -STM from GHC.Conc.Sync -Selector from GHC.Generics -Semigroup from Data.Semigroup -Semiring from Protolude.Semiring -Seq from Data.Sequence.Internal -Set from Data.Set.Internal -Show from GHC.Show -SomeAsyncException from GHC.IO.Exception -SomeAsyncException from GHC.IO.Exception -SomeException from GHC.Exception -SomeException from GHC.Exception -SomeNat from GHC.TypeNats -SomeNat from GHC.TypeNats -SomeSymbol from GHC.TypeLits -SomeSymbol from GHC.TypeLits -SrcLoc from GHC.ExecutionStack.Internal -SrcLoc from GHC.ExecutionStack.Internal -StablePtr from GHC.Stable -StackOverflow from GHC.IO.Exception -State from Control.Monad.Trans.State.Lazy -StateT from Control.Monad.Trans.State.Lazy -StateT from Control.Monad.Trans.State.Lazy -StaticPtr from GHC.StaticPtr -Storable from Foreign.Storable -Strict from Protolude.Conv -StringConv from Protolude.Conv -Sum from Data.Monoid -Sum from Data.Monoid -Symbol from GHC.Types -Text from Data.Text.Internal -ThreadId from GHC.Conc.Sync -ThreadKilled from GHC.IO.Exception -Traversable from Data.Traversable -True from GHC.Types -Type from GHC.Types -TypeError from Control.Exception.Base -TypeError from Control.Exception.Base -TypeRep from Data.Typeable -Typeable from Data.Typeable.Internal -U1 from GHC.Generics -U1 from GHC.Generics -URec from GHC.Generics -UndefinedElement from GHC.IO.Exception -Underflow from GHC.Exception -UnicodeException from Data.Text.Encoding.Error -Unmasked from GHC.IO -UserInterrupt from GHC.IO.Exception -V1 from GHC.Generics -Void from Data.Void -Word from GHC.Types -Word16 from GHC.Word -Word32 from GHC.Word -Word64 from GHC.Word -Word8 from GHC.Word -WordPtr from Foreign.Ptr -WrappedMonoid from Data.Semigroup -WriteMode from GHC.IO.IOMode -ZipList from Control.Applicative -ZipList from Control.Applicative -^ from GHC.Real -^%^ from GHC.Real -^^ from GHC.Real -^^%^^ from GHC.Real -abs from GHC.Num -absurd from Data.Void -acos from GHC.Float -acosh from GHC.Float -addMVarFinalizer from Control.Concurrent.MVar -all from Data.Foldable -allowInterrupt from Control.Exception -always from GHC.Conc.Sync -alwaysSucceeds from GHC.Conc.Sync -and from Data.Foldable -any from Data.Foldable -ap from GHC.Base -appEndo from Data.Monoid -appendFile from Data.Text.IO -applyN from Protolude -asTypeOf from GHC.Base -asin from GHC.Float -asinh from GHC.Float -ask from Control.Monad.Reader.Class -asks from Control.Monad.Reader.Class -asum from Data.Foldable -async from Control.Concurrent.Async -asyncBound from Control.Concurrent.Async -asyncExceptionFromException from GHC.IO.Exception -asyncExceptionToException from GHC.IO.Exception -asyncOn from Control.Concurrent.Async -asyncThreadId from Control.Concurrent.Async -atDef from Protolude.Safe -atMay from Protolude.Safe -atan from GHC.Float -atan2 from GHC.Float -atanh from GHC.Float -atomically from GHC.Conc.Sync -bimap from Data.Bifunctor -bit from Data.Bits -bitDefault from Data.Bits -bitSize from Data.Bits -bitSizeMaybe from Data.Bits -bool from Protolude.Bool -boundedEnumFrom from GHC.Enum -boundedEnumFromThen from GHC.Enum -bracket from Control.Exception.Base -bracketOnError from Control.Exception.Base -bracket_ from Control.Exception.Base -break from GHC.List -byteSwap16 from GHC.Word -byteSwap32 from GHC.Word -byteSwap64 from GHC.Word -callStack from GHC.Stack -cancel from Control.Concurrent.Async -cancelWith from Control.Concurrent.Async -cast from Data.Typeable -castWith from Data.Type.Equality -catMaybes from Data.Maybe -catch from GHC.IO -catchE from Control.Monad.Trans.Except -catchError from Control.Monad.Error.Class -catchJust from Control.Exception.Base -catchSTM from GHC.Conc.Sync -catches from Control.Exception -ceiling from GHC.Real -check from Control.Monad.STM -chr from GHC.Char -cis from Data.Complex -clearBit from Data.Bits -coerceWith from Data.Type.Coercion -compare from GHC.Classes -comparing from Data.Ord -complement from Data.Bits -complementBit from Data.Bits -conFixity from GHC.Generics -conIsRecord from GHC.Generics -conName from GHC.Generics -concat from Data.Foldable -concatMap from Data.Foldable -concatMapM from Protolude.Monad -concurrently from Control.Concurrent.Async -conjugate from Data.Complex -const from GHC.Base -cos from GHC.Float -cosh from GHC.Float -countLeadingZeros from Data.Bits -countTrailingZeros from Data.Bits -currentCallStack from GHC.Stack.CCS -curry from Data.Tuple -cycle from GHC.List -cycle1 from Data.Semigroup -datatypeName from GHC.Generics -decodeFloat from GHC.Float -decodeUtf8 from Data.Text.Encoding -decodeUtf8' from Data.Text.Encoding -decodeUtf8With from Data.Text.Encoding -deepseq from Control.DeepSeq -denominator from GHC.Real -die from Protolude -diff from Data.Semigroup -displayException from GHC.Exception -div from GHC.Real -divMod from GHC.Real -divZeroError from GHC.Real -drop from GHC.List -dropWhile from GHC.List -dupChan from Control.Concurrent.Chan -either from Data.Either -eitherA from Protolude.Applicative -elem from Data.Foldable -empty from GHC.Base -encodeFloat from GHC.Float -encodeUtf8 from Data.Text.Encoding -enumFrom from GHC.Enum -enumFromThen from GHC.Enum -enumFromThenTo from GHC.Enum -enumFromTo from GHC.Enum -eqT from Data.Typeable -evalState from Control.Monad.Trans.State.Lazy -evalStateT from Control.Monad.Trans.State.Lazy -evaluate from GHC.IO -even from GHC.Real -execState from Control.Monad.Trans.State.Lazy -execStateT from Control.Monad.Trans.State.Lazy -exitFailure from System.Exit -exitSuccess from System.Exit -exitWith from System.Exit -exp from GHC.Float -expm1 from GHC.Float -exponent from GHC.Float -fatalErrorMessage from Protolude.Panic -filter from GHC.List -filterM from Control.Monad -finally from Control.Exception.Base -find from Data.Foldable -finiteBitSize from Data.Bits -first from Data.Bifunctor -fix from Data.Function -fixST from GHC.ST -flip from GHC.Base -floatDigits from GHC.Float -floatRadix from GHC.Float -floatRange from GHC.Float -floor from GHC.Real -fmap from GHC.Base -fmapDefault from Data.Traversable -fold from Data.Foldable -foldM from Control.Monad -foldM_ from Control.Monad -foldMap from Data.Foldable -foldMapDefault from Data.Traversable -foldl from Data.Foldable -foldl' from Data.Foldable -foldl1May from Protolude.Safe -foldl1May' from Protolude.Safe -foldlM from Data.Foldable -foldr from Data.Foldable -foldr' from Data.Foldable -foldr1May from Protolude.Safe -foldrM from Data.Foldable -for from Data.Traversable -forM from Data.Traversable -forM_ from Data.Foldable -for_ from Data.Foldable -force from Control.DeepSeq -foreach from Protolude.Functor -forever from Control.Monad -forkFinally from Control.Concurrent -forkIO from GHC.Conc.Sync -forkIOWithUnmask from GHC.Conc.Sync -forkOS from Control.Concurrent -forkOSWithUnmask from Control.Concurrent -forkOn from GHC.Conc.Sync -forkOnWithUnmask from GHC.Conc.Sync -from from GHC.Generics -fromEnum from GHC.Enum -fromException from GHC.Exception -fromInteger from GHC.Num -fromIntegral from GHC.Real -fromLabel from GHC.OverloadedLabels -fromLeft from Data.Either -fromMaybe from Data.Maybe -fromRational from GHC.Real -fromRight from Data.Either -fromStrict from Data.Text.Lazy -fst from Data.Tuple -functionName from GHC.ExecutionStack.Internal -gcastWith from Data.Type.Equality -gcd from GHC.Real -gcdInt' from GHC.Real -gcdWord' from GHC.Real -genericDrop from Data.OldList -genericLength from Data.OldList -genericReplicate from Data.OldList -genericSplitAt from Data.OldList -genericTake from Data.OldList -get from Control.Monad.State.Class -getAll from Data.Monoid -getAlt from Data.Monoid -getAny from Data.Monoid -getArgs from System.Environment -getCallStack from GHC.Stack.Types -getChanContents from Control.Concurrent.Chan -getConst from Data.Functor.Const -getContents from Data.Text.IO -getDual from Data.Monoid -getField from GHC.Records -getFirst from Data.Monoid -getLast from Data.Monoid -getLine from Data.Text.IO -getMaskingState from GHC.IO -getNumCapabilities from GHC.Conc.Sync -getOption from Data.Semigroup -getProduct from Data.Monoid -getStackTrace from GHC.ExecutionStack -getSum from Data.Monoid -getZipList from Control.Applicative -gets from Control.Monad.State.Class -group from Data.OldList -groupBy from Data.OldList -guard from Control.Monad -guardM from Protolude.Bool -guarded from Protolude -guardedA from Protolude -hPutStr from Protolude.Show -hPutStrLn from Protolude.Show -handle from Control.Exception.Base -handleJust from Control.Exception.Base -hash from Data.Hashable.Class -hashUsing from Data.Hashable.Class -hashWithSalt from Data.Hashable.Class -head from Protolude.List -headDef from Protolude.Safe -headMay from Protolude.Safe -hush from Protolude.Exceptions -identity from Protolude -ifM from Protolude.Bool -ignore from Data.Text.Encoding.Error -imagPart from Data.Complex -infinity from GHC.Real -initDef from Protolude.Safe -initMay from Protolude.Safe -initSafe from Protolude.Safe -inits from Data.OldList -integralEnumFrom from GHC.Real -integralEnumFromThen from GHC.Real -integralEnumFromThenTo from GHC.Real -integralEnumFromTo from GHC.Real -interact from Data.Text.IO -intercalate from Data.OldList -interruptible from GHC.IO -intersperse from Data.OldList -ioError from GHC.IO.Exception -isCurrentThreadBound from Control.Concurrent -isDenormalized from GHC.Float -isEmptyChan from Control.Concurrent.Chan -isEmptyMVar from GHC.MVar -isIEEE from GHC.Float -isInfinite from GHC.Float -isJust from Data.Maybe -isLeft from Data.Either -isNaN from GHC.Float -isNegativeZero from GHC.Float -isNewtype from GHC.Generics -isNothing from Data.Maybe -isPrefixOf from Data.OldList -isRight from Data.Either -isSigned from Data.Bits -iterate from GHC.List -join from GHC.Base -killThread from GHC.Conc.Sync -lastDef from Protolude.Safe -lastMay from Protolude.Safe -lcm from GHC.Real -leftToMaybe from Protolude.Either -lefts from Data.Either -length from Data.Foldable -lenientDecode from Data.Text.Encoding.Error -lift from Control.Monad.Trans.Class -liftA from GHC.Base -liftA2 from GHC.Base -liftA3 from GHC.Base -liftAA2 from Protolude.Applicative -liftIO from Control.Monad.IO.Class -liftIO1 from Protolude -liftIO2 from Protolude -liftM from GHC.Base -liftM' from Protolude.Monad -liftM2 from GHC.Base -liftM2' from Protolude.Monad -liftM3 from GHC.Base -liftM4 from GHC.Base -liftM5 from GHC.Base -lines from Data.Text -link from Control.Concurrent.Async -link2 from Control.Concurrent.Async -list from Protolude.List -listToMaybe from Data.Maybe -local from Control.Monad.Reader.Class -log from GHC.Float -log1mexp from GHC.Float -log1p from GHC.Float -log1pexp from GHC.Float -logBase from GHC.Float -magnitude from Data.Complex -many from GHC.Base -map from Protolude -mapAccumL from Data.Traversable -mapAccumR from Data.Traversable -mapAndUnzipM from Control.Monad -mapExcept from Control.Monad.Trans.Except -mapExceptT from Control.Monad.Trans.Except -mapException from Control.Exception.Base -mapM from Data.Traversable -mapM_ from Data.Foldable -mapMaybe from Data.Maybe -mappend from GHC.Base -mask from GHC.IO -mask_ from GHC.IO -max from GHC.Classes -maxBound from GHC.Enum -maxInt from GHC.Base -maximum from Data.Foldable -maximumBy from Data.Foldable -maximumDef from Protolude.Safe -maximumMay from Protolude.Safe -maybe from Data.Maybe -maybeEmpty from Protolude.Either -maybeToEither from Protolude.Either -maybeToLeft from Protolude.Either -maybeToList from Data.Maybe -maybeToRight from Protolude.Either -mconcat from GHC.Base -mempty from GHC.Base -mfilter from Control.Monad -min from GHC.Classes -minBound from GHC.Enum -minInt from GHC.Base -minimum from Data.Foldable -minimumBy from Data.Foldable -minimumDef from Protolude.Safe -minimumMay from Protolude.Safe -mkPolar from Data.Complex -mkWeakMVar from Control.Concurrent.MVar -mkWeakThreadId from GHC.Conc.Sync -mod from GHC.Real -modify from Control.Monad.State.Class -modifyMVar from Control.Concurrent.MVar -modifyMVarMasked from Control.Concurrent.MVar -modifyMVarMasked_ from Control.Concurrent.MVar -modifyMVar_ from Control.Concurrent.MVar -moduleName from GHC.Generics -mplus from GHC.Base -msum from Data.Foldable -mtimesDefault from Data.Semigroup -myThreadId from GHC.Conc.Sync -mzero from GHC.Base -natVal from GHC.TypeLits -negate from GHC.Num -newChan from Control.Concurrent.Chan -newEmptyMVar from GHC.MVar -newMVar from GHC.MVar -newQSem from Control.Concurrent.QSem -newQSemN from Control.Concurrent.QSemN -nonEmpty from Data.List.NonEmpty -not from GHC.Classes -notANumber from GHC.Real -notElem from Data.Foldable -notImplemented from Debug -note from Protolude.Exceptions -null from Data.Foldable -numerator from GHC.Real -numericEnumFrom from GHC.Real -numericEnumFromThen from GHC.Real -numericEnumFromThenTo from GHC.Real -numericEnumFromTo from GHC.Real -objectName from GHC.ExecutionStack.Internal -odd from GHC.Real -on from Data.Function -onException from Control.Exception.Base -one from Protolude.Semiring -openFile from GHC.IO.Handle.FD -option from Data.Semigroup -optional from Control.Applicative -or from Data.Foldable -orAlt from Protolude.Applicative -orElse from GHC.Conc.Sync -orEmpty from Protolude.Applicative -ord from GHC.Base -ordNub from Protolude.List -otherwise from GHC.Base -overflowError from GHC.Real -packageName from GHC.Generics -panic from Protolude.Panic -partitionEithers from Data.Either -pass from Protolude -permutations from Data.OldList -phase from Data.Complex -pi from GHC.Float -polar from Data.Complex -poll from Control.Concurrent.Async -popCount from Data.Bits -popCountDefault from Data.Bits -pred from GHC.Enum -prettyCallStack from GHC.Exception -prettySrcLoc from GHC.Exception -print from Protolude -product from Protolude.List -properFraction from GHC.Real -pure from GHC.Base -purer from Protolude.Applicative -put from Control.Monad.State.Class -putByteString from Protolude.Show -putErrLn from Protolude.Show -putErrText from Protolude.Show -putLByteString from Protolude.Show -putLText from Protolude.Show -putMVar from GHC.MVar -putStr from Protolude.Show -putStrLn from Protolude.Show -putText from Protolude.Show -quot from GHC.Real -quotRem from GHC.Real -race from Control.Concurrent.Async -race_ from Control.Concurrent.Async -ratioPrec from GHC.Real -ratioPrec1 from GHC.Real -ratioZeroDenominatorError from GHC.Real -readChan from Control.Concurrent.Chan -readEither from Protolude -readFile from Data.Text.IO -readMVar from GHC.MVar -readMaybe from Protolude -reader from Control.Monad.Reader.Class -reads from Text.Read -realPart from Data.Complex -realToFrac from GHC.Real -recip from GHC.Real -reduce from GHC.Real -rem from GHC.Real -repeat from GHC.List -replace from Data.Text.Encoding.Error -replicate from GHC.List -replicateM from Control.Monad -replicateM_ from Control.Monad -repr from Data.Type.Coercion -retry from GHC.Conc.Sync -return from GHC.Base -reverse from GHC.List -rightToMaybe from Protolude.Either -rights from Data.Either -rnf from Control.DeepSeq -rotate from Data.Bits -rotateL from Data.Bits -rotateR from Data.Bits -round from GHC.Real -rtsSupportsBoundThreads from Control.Concurrent -runConcurrently from Control.Concurrent.Async -runExcept from Control.Monad.Trans.Except -runExceptT from Control.Monad.Trans.Except -runIdentity from Data.Functor.Identity -runInBoundThread from Control.Concurrent -runInUnboundThread from Control.Concurrent -runReader from Control.Monad.Trans.Reader -runReaderT from Control.Monad.Trans.Reader -runST from GHC.ST -runState from Control.Monad.Trans.State.Lazy -runStateT from Control.Monad.Trans.State.Lazy -scaleFloat from GHC.Float -scanl from GHC.List -scanl' from GHC.List -scanr from GHC.List -sconcat from Data.Semigroup -second from Data.Bifunctor -selDecidedStrictness from GHC.Generics -selName from GHC.Generics -selSourceStrictness from GHC.Generics -selSourceUnpackedness from GHC.Generics -seq from GHC.Prim -sequence from Data.Traversable -sequenceA from Data.Traversable -sequenceA_ from Data.Foldable -sequence_ from Data.Foldable -setBit from Data.Bits -setNumCapabilities from GHC.Conc.Sync -shift from Data.Bits -shiftL from Data.Bits -shiftR from Data.Bits -show from Protolude -showStackTrace from GHC.ExecutionStack -signalQSem from Control.Concurrent.QSem -signalQSemN from Control.Concurrent.QSemN -significand from GHC.Float -signum from GHC.Num -sin from GHC.Float -sinh from GHC.Float -snd from Data.Tuple -some from GHC.Base -someNatVal from GHC.TypeLits -someSymbolVal from GHC.TypeLits -sort from Data.OldList -sortBy from Data.OldList -sortOn from Protolude.List -sourceColumn from GHC.ExecutionStack.Internal -sourceFile from GHC.ExecutionStack.Internal -sourceLine from GHC.ExecutionStack.Internal -splitAt from GHC.List -sqrt from GHC.Float -srcLoc from GHC.ExecutionStack.Internal -state from Control.Monad.State.Class -stderr from GHC.IO.Handle.FD -stdin from GHC.IO.Handle.FD -stdout from GHC.IO.Handle.FD -stimes from Data.Semigroup -stimesIdempotent from Data.Semigroup -stimesIdempotentMonoid from Data.Semigroup -stimesMonoid from Data.Semigroup -strConv from Protolude.Conv -strictDecode from Data.Text.Encoding.Error -subsequences from Data.OldList -subtract from GHC.Num -succ from GHC.Enum -sum from Protolude.List -swap from Data.Tuple -swapMVar from Control.Concurrent.MVar -sym from Data.Type.Equality -symbolVal from GHC.TypeLits -tailDef from Protolude.Safe -tailMay from Protolude.Safe -tailSafe from Protolude.Safe -tails from Data.OldList -take from GHC.List -takeMVar from GHC.MVar -takeWhile from GHC.List -tan from GHC.Float -tanh from GHC.Float -testBit from Data.Bits -testBitDefault from Data.Bits -threadCapability from GHC.Conc.Sync -threadDelay from GHC.Conc.IO -threadWaitRead from Control.Concurrent -threadWaitReadSTM from Control.Concurrent -threadWaitWrite from Control.Concurrent -threadWaitWriteSTM from Control.Concurrent -throwE from Control.Monad.Trans.Except -throwError from Control.Monad.Error.Class -throwIO from Protolude -throwSTM from GHC.Conc.Sync -throwTo from Protolude -to from GHC.Generics -toEnum from GHC.Enum -toException from GHC.Exception -toInteger from GHC.Real -toIntegralSized from Data.Bits -toList from Data.Foldable -toRational from GHC.Real -toS from Protolude.Conv -toSL from Protolude.Conv -toStrict from Data.Text.Lazy -trace from Debug -traceIO from Debug -traceId from Debug -traceM from Debug -traceShow from Debug -traceShowId from Debug -traceShowM from Debug -trans from Data.Type.Equality -transpose from Data.OldList -traverse from Data.Traversable -traverse_ from Data.Foldable -truncate from GHC.Real -try from Control.Exception.Base -tryIO from Protolude.Exceptions -tryJust from Control.Exception.Base -tryPutMVar from GHC.MVar -tryReadMVar from GHC.MVar -tryTakeMVar from GHC.MVar -typeRep from Data.Typeable -unComp1 from GHC.Generics -unGetChan from Control.Concurrent.Chan -unK1 from GHC.Generics -unM1 from GHC.Generics -uncons from Protolude -uncurry from Data.Tuple -undefined from Debug -unfoldr from Data.OldList -uninterruptibleMask from GHC.IO -uninterruptibleMask_ from GHC.IO -unless from Control.Monad -unlessM from Protolude.Bool -unlines from Data.Text -unsnoc from Protolude -until from GHC.Base -unwords from Data.Text -unzip from GHC.List -vacuous from Data.Void -void from Data.Functor -wait from Control.Concurrent.Async -waitAny from Control.Concurrent.Async -waitAnyCancel from Control.Concurrent.Async -waitAnyCatch from Control.Concurrent.Async -waitAnyCatchCancel from Control.Concurrent.Async -waitBoth from Control.Concurrent.Async -waitCatch from Control.Concurrent.Async -waitEither from Control.Concurrent.Async -waitEitherCancel from Control.Concurrent.Async -waitEitherCatch from Control.Concurrent.Async -waitEitherCatchCancel from Control.Concurrent.Async -waitEither_ from Control.Concurrent.Async -waitQSem from Control.Concurrent.QSem -waitQSemN from Control.Concurrent.QSemN -when from GHC.Base -whenM from Protolude.Bool -withAsync from Control.Concurrent.Async -withAsyncBound from Control.Concurrent.Async -withAsyncOn from Control.Concurrent.Async -withExcept from Control.Monad.Trans.Except -withExceptT from Control.Monad.Trans.Except -withFile from System.IO -withFrozenCallStack from GHC.Stack -withMVar from Control.Concurrent.MVar -withMVarMasked from Control.Concurrent.MVar -withState from Control.Monad.Trans.State.Lazy -witness from Debug -words from Data.Text -writeChan from Control.Concurrent.Chan -writeFile from Data.Text.IO -writeList2Chan from Control.Concurrent.Chan -xor from Data.Bits -zero from Protolude.Semiring -zeroBits from Data.Bits -zip from GHC.List -zipWith from GHC.List -zipWithM from Control.Monad -zipWithM_ from Control.Monad -|| from GHC.Classes -||^ from Protolude.Bool diff --git a/src/protolude/export_lists/protolude-11.exports b/src/protolude/export_lists/protolude-11.exports deleted file mode 100644 index 44678c73d3..0000000000 --- a/src/protolude/export_lists/protolude-11.exports +++ /dev/null @@ -1,960 +0,0 @@ -$ from GHC.Base -$! from Protolude.Base -$!! from Control.DeepSeq -$> from Data.Functor -% from GHC.Real -& from Data.Function -&& from GHC.Classes -&&^ from Protolude.Bool -* from GHC.Num -* from GHC.Types -** from GHC.Float -*> from GHC.Base -+ from GHC.Num -++ from GHC.Base -- from GHC.Num -. from GHC.Base -.&. from Data.Bits -.|. from Data.Bits -/ from GHC.Real -/= from GHC.Classes -:% from GHC.Real -:*: from GHC.Generics -:*: from GHC.Generics -:+ from Data.Complex -:+: from GHC.Generics -:.: from GHC.Generics -:| from Data.List.NonEmpty -:~: from Data.Type.Equality -< from GHC.Classes -<$ from GHC.Base -<$!> from Control.Monad -<$> from Data.Functor -<&&> from Protolude.Bool -<&> from Protolude.Functor -<* from GHC.Base -<**> from GHC.Base -<*> from GHC.Base -<.> from Protolude.Semiring -<<$>> from Protolude.Functor -<<*>> from Protolude.Applicative -<= from GHC.Classes -<=< from Control.Monad -<> from Data.Monoid -<|> from GHC.Base -<||> from Protolude.Bool -=<< from GHC.Base -== from GHC.Classes -== from Data.Type.Equality -> from GHC.Classes ->= from GHC.Classes ->=> from Control.Monad ->> from GHC.Base ->>= from GHC.Base -All from Data.Monoid -All from Data.Monoid -AllocationLimitExceeded from GHC.IO.Exception -AllocationLimitExceeded from GHC.IO.Exception -Alt from Data.Monoid -Alt from Data.Monoid -Alternative from GHC.Base -Any from Data.Monoid -Any from Data.Monoid -AppendMode from GHC.IO.IOMode -Applicative from GHC.Base -ArithException from GHC.Exception -ArrayException from GHC.IO.Exception -AssertionFailed from GHC.IO.Exception -AssertionFailed from GHC.IO.Exception -Associativity from GHC.Generics -Async from Control.Concurrent.Async -AsyncException from GHC.IO.Exception -Bifunctor from Data.Bifunctor -Bits from Data.Bits -BlockedIndefinitelyOnMVar from GHC.IO.Exception -BlockedIndefinitelyOnMVar from GHC.IO.Exception -BlockedIndefinitelyOnSTM from GHC.IO.Exception -BlockedIndefinitelyOnSTM from GHC.IO.Exception -Bool from GHC.Types -Bounded from GHC.Enum -ByteString from Data.ByteString.Internal -C1 from GHC.Generics -CallStack from GHC.Stack.Types -Chan from Control.Concurrent.Chan -Char from GHC.Types -CmpNat from GHC.TypeNats -Coercible from GHC.Types -Coercion from Data.Type.Coercion -Coercion from Data.Type.Coercion -Comp1 from GHC.Generics -CompactionFailed from GHC.IO.Exception -CompactionFailed from GHC.IO.Exception -Complex from Data.Complex -Concurrently from Control.Concurrent.Async -Concurrently from Control.Concurrent.Async -Const from Data.Functor.Const -Const from Data.Functor.Const -Constraint from GHC.Types -Constructor from GHC.Generics -D# from GHC.Types -D1 from GHC.Generics -Datatype from GHC.Generics -Deadlock from GHC.IO.Exception -Deadlock from GHC.IO.Exception -Denormal from GHC.Exception -DivideByZero from GHC.Exception -Double from GHC.Types -Down from Data.Ord -Down from Data.Ord -Dual from Data.Monoid -Dual from Data.Monoid -EQ from GHC.Types -Either from Data.Either -Endo from Data.Monoid -Endo from Data.Monoid -Enum from GHC.Enum -Eq from GHC.Classes -ErrorCall from GHC.Exception -ErrorCall from GHC.Exception -ErrorCallWithLocation from GHC.Exception -Except from Control.Monad.Trans.Except -ExceptT from Control.Monad.Trans.Except -ExceptT from Control.Monad.Trans.Except -Exception from GHC.Exception -ExitCode from GHC.IO.Exception -ExitFailure from GHC.IO.Exception -ExitSuccess from GHC.IO.Exception -F# from GHC.Types -False from GHC.Types -FatalError from Protolude.Panic -FatalError from Protolude.Panic -FilePath from GHC.IO -FiniteBits from Data.Bits -First from Data.Monoid -First from Data.Monoid -Fixity from GHC.Generics -FixityI from GHC.Generics -Float from GHC.Types -Floating from GHC.Float -Foldable from Data.Foldable -Fractional from GHC.Real -FunPtr from GHC.Ptr -Functor from GHC.Base -GT from GHC.Types -Generic from GHC.Generics -Generic1 from GHC.Generics -Handle from GHC.IO.Handle.Types -HasCallStack from GHC.Stack.Types -HasField from GHC.Records -Hashable from Data.Hashable.Class -HeapOverflow from GHC.IO.Exception -IO from GHC.Types -IOException from GHC.IO.Exception -IOMode from GHC.IO.IOMode -Identity from Data.Functor.Identity -Identity from Data.Functor.Identity -IndexOutOfBounds from GHC.IO.Exception -Infix from GHC.Generics -InfixI from GHC.Generics -Int from GHC.Types -Int16 from GHC.Int -Int32 from GHC.Int -Int64 from GHC.Int -Int8 from GHC.Int -IntMap from Data.IntMap.Internal -IntPtr from Foreign.Ptr -IntSet from Data.IntSet.Internal -Integer from GHC.Integer.Type -Integral from GHC.Real -IsLabel from GHC.OverloadedLabels -IsString from Data.String -Just from GHC.Base -K1 from GHC.Generics -K1 from GHC.Generics -KnownNat from GHC.TypeNats -KnownSymbol from GHC.TypeLits -L1 from GHC.Generics -LByteString from Protolude -LT from GHC.Types -LText from Protolude -Last from Data.Monoid -Last from Data.Monoid -Left from Data.Either -LeftAssociative from GHC.Generics -Leniency from Protolude.Conv -Lenient from Protolude.Conv -Location from GHC.ExecutionStack.Internal -Location from GHC.ExecutionStack.Internal -LossOfPrecision from GHC.Exception -M1 from GHC.Generics -M1 from GHC.Generics -MVar from GHC.MVar -Map from Data.Map.Internal -MaskedInterruptible from GHC.IO -MaskedUninterruptible from GHC.IO -MaskingState from GHC.IO -Maybe from GHC.Base -Meta from GHC.Generics -MetaCons from GHC.Generics -MetaData from GHC.Generics -MetaSel from GHC.Generics -Monad from GHC.Base -MonadError from Control.Monad.Error.Class -MonadIO from Control.Monad.IO.Class -MonadPlus from GHC.Base -MonadReader from Control.Monad.Reader.Class -MonadState from Control.Monad.State.Class -Monoid from GHC.Base -NFData from Control.DeepSeq -Nat from GHC.Types -NestedAtomically from Control.Exception.Base -NestedAtomically from Control.Exception.Base -NoMethodError from Control.Exception.Base -NoMethodError from Control.Exception.Base -NonEmpty from Data.List.NonEmpty -NonTermination from Control.Exception.Base -NonTermination from Control.Exception.Base -NotAssociative from GHC.Generics -Nothing from GHC.Base -Num from GHC.Num -OnDecodeError from Data.Text.Encoding.Error -OnError from Data.Text.Encoding.Error -Option from Data.Semigroup -Option from Data.Semigroup -Ord from GHC.Classes -Ordering from GHC.Types -Overflow from GHC.Exception -PatternMatchFail from Control.Exception.Base -PatternMatchFail from Control.Exception.Base -Prefix from GHC.Generics -PrefixI from GHC.Generics -Print from Protolude.Show -Product from Data.Monoid -Product from Data.Monoid -Proxy from Data.Proxy -Proxy from Data.Proxy -Ptr from GHC.Ptr -QSem from Control.Concurrent.QSem -QSemN from Control.Concurrent.QSemN -R1 from GHC.Generics -Ratio from GHC.Real -RatioZeroDenominator from GHC.Exception -Rational from GHC.Real -Read from GHC.Read -ReadMode from GHC.IO.IOMode -ReadWriteMode from GHC.IO.IOMode -Reader from Control.Monad.Trans.Reader -ReaderT from Control.Monad.Trans.Reader -ReaderT from Control.Monad.Trans.Reader -Real from GHC.Real -RealFloat from GHC.Float -RealFrac from GHC.Real -Rec0 from GHC.Generics -RecConError from Control.Exception.Base -RecConError from Control.Exception.Base -RecSelError from Control.Exception.Base -RecSelError from Control.Exception.Base -RecUpdError from Control.Exception.Base -RecUpdError from Control.Exception.Base -Refl from Data.Type.Equality -Rep from GHC.Generics -Right from Data.Either -RightAssociative from GHC.Generics -S1 from GHC.Generics -ST from GHC.ST -STM from GHC.Conc.Sync -Selector from GHC.Generics -Semigroup from Data.Semigroup -Semiring from Protolude.Semiring -Seq from Data.Sequence.Internal -Set from Data.Set.Internal -Show from GHC.Show -SomeAsyncException from GHC.IO.Exception -SomeAsyncException from GHC.IO.Exception -SomeException from GHC.Exception -SomeException from GHC.Exception -SomeNat from GHC.TypeNats -SomeNat from GHC.TypeNats -SomeSymbol from GHC.TypeLits -SomeSymbol from GHC.TypeLits -SrcLoc from GHC.ExecutionStack.Internal -SrcLoc from GHC.ExecutionStack.Internal -StablePtr from GHC.Stable -StackOverflow from GHC.IO.Exception -State from Control.Monad.Trans.State.Lazy -StateT from Control.Monad.Trans.State.Lazy -StateT from Control.Monad.Trans.State.Lazy -StaticPtr from GHC.StaticPtr -Storable from Foreign.Storable -Strict from Protolude.Conv -StringConv from Protolude.Conv -Sum from Data.Monoid -Sum from Data.Monoid -Symbol from GHC.Types -Text from Data.Text.Internal -ThreadId from GHC.Conc.Sync -ThreadKilled from GHC.IO.Exception -Traversable from Data.Traversable -True from GHC.Types -Type from GHC.Types -TypeError from Control.Exception.Base -TypeError from Control.Exception.Base -TypeRep from Data.Typeable -Typeable from Data.Typeable.Internal -U1 from GHC.Generics -U1 from GHC.Generics -URec from GHC.Generics -UndefinedElement from GHC.IO.Exception -Underflow from GHC.Exception -UnicodeException from Data.Text.Encoding.Error -Unmasked from GHC.IO -UserInterrupt from GHC.IO.Exception -V1 from GHC.Generics -Void from Data.Void -Word from GHC.Types -Word16 from GHC.Word -Word32 from GHC.Word -Word64 from GHC.Word -Word8 from GHC.Word -WordPtr from Foreign.Ptr -WrappedMonoid from Data.Semigroup -WriteMode from GHC.IO.IOMode -ZipList from Control.Applicative -ZipList from Control.Applicative -^ from GHC.Real -^%^ from GHC.Real -^^ from GHC.Real -^^%^^ from GHC.Real -abs from GHC.Num -absurd from Data.Void -acos from GHC.Float -acosh from GHC.Float -addMVarFinalizer from Control.Concurrent.MVar -all from Data.Foldable -allowInterrupt from Control.Exception -always from GHC.Conc.Sync -alwaysSucceeds from GHC.Conc.Sync -and from Data.Foldable -any from Data.Foldable -ap from GHC.Base -appEndo from Data.Monoid -appendFile from Data.Text.IO -applyN from Protolude -asTypeOf from GHC.Base -asin from GHC.Float -asinh from GHC.Float -ask from Control.Monad.Reader.Class -asks from Control.Monad.Reader.Class -asum from Data.Foldable -async from Control.Concurrent.Async -asyncBound from Control.Concurrent.Async -asyncExceptionFromException from GHC.IO.Exception -asyncExceptionToException from GHC.IO.Exception -asyncOn from Control.Concurrent.Async -asyncThreadId from Control.Concurrent.Async -atDef from Protolude.Safe -atMay from Protolude.Safe -atan from GHC.Float -atan2 from GHC.Float -atanh from GHC.Float -atomically from GHC.Conc.Sync -bimap from Data.Bifunctor -bit from Data.Bits -bitDefault from Data.Bits -bitSize from Data.Bits -bitSizeMaybe from Data.Bits -bool from Protolude.Bool -boundedEnumFrom from GHC.Enum -boundedEnumFromThen from GHC.Enum -bracket from Control.Exception.Base -bracketOnError from Control.Exception.Base -bracket_ from Control.Exception.Base -break from GHC.List -byteSwap16 from GHC.Word -byteSwap32 from GHC.Word -byteSwap64 from GHC.Word -callStack from GHC.Stack -cancel from Control.Concurrent.Async -cancelWith from Control.Concurrent.Async -cast from Data.Typeable -castWith from Data.Type.Equality -catMaybes from Data.Maybe -catch from GHC.IO -catchE from Control.Monad.Trans.Except -catchError from Control.Monad.Error.Class -catchJust from Control.Exception.Base -catchSTM from GHC.Conc.Sync -catches from Control.Exception -ceiling from GHC.Real -check from Control.Monad.STM -chr from GHC.Char -cis from Data.Complex -clearBit from Data.Bits -coerceWith from Data.Type.Coercion -compare from GHC.Classes -comparing from Data.Ord -complement from Data.Bits -complementBit from Data.Bits -conFixity from GHC.Generics -conIsRecord from GHC.Generics -conName from GHC.Generics -concat from Data.Foldable -concatMap from Data.Foldable -concatMapM from Protolude.Monad -concurrently from Control.Concurrent.Async -conjugate from Data.Complex -const from GHC.Base -cos from GHC.Float -cosh from GHC.Float -countLeadingZeros from Data.Bits -countTrailingZeros from Data.Bits -currentCallStack from GHC.Stack.CCS -curry from Data.Tuple -cycle from GHC.List -cycle1 from Data.Semigroup -datatypeName from GHC.Generics -decodeFloat from GHC.Float -decodeUtf8 from Data.Text.Encoding -decodeUtf8' from Data.Text.Encoding -decodeUtf8With from Data.Text.Encoding -deepseq from Control.DeepSeq -denominator from GHC.Real -die from Protolude -diff from Data.Semigroup -displayException from GHC.Exception -div from GHC.Real -divMod from GHC.Real -divZeroError from GHC.Real -drop from GHC.List -dropWhile from GHC.List -dupChan from Control.Concurrent.Chan -either from Data.Either -eitherA from Protolude.Applicative -elem from Data.Foldable -empty from GHC.Base -encodeFloat from GHC.Float -encodeUtf8 from Data.Text.Encoding -enumFrom from GHC.Enum -enumFromThen from GHC.Enum -enumFromThenTo from GHC.Enum -enumFromTo from GHC.Enum -eqT from Data.Typeable -evalState from Control.Monad.Trans.State.Lazy -evalStateT from Control.Monad.Trans.State.Lazy -evaluate from GHC.IO -even from GHC.Real -execState from Control.Monad.Trans.State.Lazy -execStateT from Control.Monad.Trans.State.Lazy -exitFailure from System.Exit -exitSuccess from System.Exit -exitWith from System.Exit -exp from GHC.Float -expm1 from GHC.Float -exponent from GHC.Float -fatalErrorMessage from Protolude.Panic -filter from GHC.List -filterM from Control.Monad -finally from Control.Exception.Base -find from Data.Foldable -finiteBitSize from Data.Bits -first from Data.Bifunctor -fix from Data.Function -fixST from GHC.ST -flip from GHC.Base -floatDigits from GHC.Float -floatRadix from GHC.Float -floatRange from GHC.Float -floor from GHC.Real -fmap from GHC.Base -fmapDefault from Data.Traversable -fold from Data.Foldable -foldM from Control.Monad -foldM_ from Control.Monad -foldMap from Data.Foldable -foldMapDefault from Data.Traversable -foldl from Data.Foldable -foldl' from Data.Foldable -foldl1May from Protolude.Safe -foldl1May' from Protolude.Safe -foldlM from Data.Foldable -foldr from Data.Foldable -foldr' from Data.Foldable -foldr1May from Protolude.Safe -foldrM from Data.Foldable -for from Data.Traversable -forM from Data.Traversable -forM_ from Data.Foldable -for_ from Data.Foldable -force from Control.DeepSeq -foreach from Protolude.Functor -forever from Control.Monad -forkFinally from Control.Concurrent -forkIO from GHC.Conc.Sync -forkIOWithUnmask from GHC.Conc.Sync -forkOS from Control.Concurrent -forkOSWithUnmask from Control.Concurrent -forkOn from GHC.Conc.Sync -forkOnWithUnmask from GHC.Conc.Sync -from from GHC.Generics -fromEnum from GHC.Enum -fromException from GHC.Exception -fromInteger from GHC.Num -fromIntegral from GHC.Real -fromLabel from GHC.OverloadedLabels -fromLeft from Data.Either -fromMaybe from Data.Maybe -fromRational from GHC.Real -fromRight from Data.Either -fromStrict from Data.Text.Lazy -fst from Data.Tuple -functionName from GHC.ExecutionStack.Internal -gcastWith from Data.Type.Equality -gcd from GHC.Real -gcdInt' from GHC.Real -gcdWord' from GHC.Real -genericDrop from Data.OldList -genericLength from Data.OldList -genericReplicate from Data.OldList -genericSplitAt from Data.OldList -genericTake from Data.OldList -get from Control.Monad.State.Class -getAll from Data.Monoid -getAlt from Data.Monoid -getAny from Data.Monoid -getArgs from System.Environment -getCallStack from GHC.Stack.Types -getChanContents from Control.Concurrent.Chan -getConst from Data.Functor.Const -getContents from Data.Text.IO -getDual from Data.Monoid -getField from GHC.Records -getFirst from Data.Monoid -getLast from Data.Monoid -getLine from Data.Text.IO -getMaskingState from GHC.IO -getNumCapabilities from GHC.Conc.Sync -getOption from Data.Semigroup -getProduct from Data.Monoid -getStackTrace from GHC.ExecutionStack -getSum from Data.Monoid -getZipList from Control.Applicative -gets from Control.Monad.State.Class -group from Data.OldList -groupBy from Data.OldList -guard from Control.Monad -guardM from Protolude.Bool -guarded from Protolude -guardedA from Protolude -hPutStr from Protolude.Show -hPutStrLn from Protolude.Show -handle from Control.Exception.Base -handleJust from Control.Exception.Base -hash from Data.Hashable.Class -hashUsing from Data.Hashable.Class -hashWithSalt from Data.Hashable.Class -head from Protolude.List -headDef from Protolude.Safe -headMay from Protolude.Safe -hush from Protolude.Exceptions -identity from Protolude -ifM from Protolude.Bool -ignore from Data.Text.Encoding.Error -imagPart from Data.Complex -infinity from GHC.Real -initDef from Protolude.Safe -initMay from Protolude.Safe -initSafe from Protolude.Safe -inits from Data.OldList -integralEnumFrom from GHC.Real -integralEnumFromThen from GHC.Real -integralEnumFromThenTo from GHC.Real -integralEnumFromTo from GHC.Real -interact from Data.Text.IO -intercalate from Data.OldList -interruptible from GHC.IO -intersperse from Data.OldList -ioError from GHC.IO.Exception -isCurrentThreadBound from Control.Concurrent -isDenormalized from GHC.Float -isEmptyChan from Control.Concurrent.Chan -isEmptyMVar from GHC.MVar -isIEEE from GHC.Float -isInfinite from GHC.Float -isJust from Data.Maybe -isLeft from Data.Either -isNaN from GHC.Float -isNegativeZero from GHC.Float -isNewtype from GHC.Generics -isNothing from Data.Maybe -isPrefixOf from Data.OldList -isRight from Data.Either -isSigned from Data.Bits -iterate from GHC.List -join from GHC.Base -killThread from GHC.Conc.Sync -lastDef from Protolude.Safe -lastMay from Protolude.Safe -lcm from GHC.Real -leftToMaybe from Protolude.Either -lefts from Data.Either -length from Data.Foldable -lenientDecode from Data.Text.Encoding.Error -lift from Control.Monad.Trans.Class -liftA from GHC.Base -liftA2 from GHC.Base -liftA3 from GHC.Base -liftAA2 from Protolude.Applicative -liftIO from Control.Monad.IO.Class -liftIO1 from Protolude -liftIO2 from Protolude -liftM from GHC.Base -liftM' from Protolude.Monad -liftM2 from GHC.Base -liftM2' from Protolude.Monad -liftM3 from GHC.Base -liftM4 from GHC.Base -liftM5 from GHC.Base -lines from Data.Text -link from Control.Concurrent.Async -link2 from Control.Concurrent.Async -list from Protolude.List -listToMaybe from Data.Maybe -local from Control.Monad.Reader.Class -log from GHC.Float -log1mexp from GHC.Float -log1p from GHC.Float -log1pexp from GHC.Float -logBase from GHC.Float -magnitude from Data.Complex -many from GHC.Base -map from Protolude -mapAccumL from Data.Traversable -mapAccumR from Data.Traversable -mapAndUnzipM from Control.Monad -mapExcept from Control.Monad.Trans.Except -mapExceptT from Control.Monad.Trans.Except -mapException from Control.Exception.Base -mapM from Data.Traversable -mapM_ from Data.Foldable -mapMaybe from Data.Maybe -mappend from GHC.Base -mask from GHC.IO -mask_ from GHC.IO -max from GHC.Classes -maxBound from GHC.Enum -maxInt from GHC.Base -maximum from Data.Foldable -maximumBy from Data.Foldable -maximumDef from Protolude.Safe -maximumMay from Protolude.Safe -maybe from Data.Maybe -maybeEmpty from Protolude.Either -maybeToEither from Protolude.Either -maybeToLeft from Protolude.Either -maybeToList from Data.Maybe -maybeToRight from Protolude.Either -mconcat from GHC.Base -mempty from GHC.Base -mfilter from Control.Monad -min from GHC.Classes -minBound from GHC.Enum -minInt from GHC.Base -minimum from Data.Foldable -minimumBy from Data.Foldable -minimumDef from Protolude.Safe -minimumMay from Protolude.Safe -mkPolar from Data.Complex -mkWeakMVar from Control.Concurrent.MVar -mkWeakThreadId from GHC.Conc.Sync -mod from GHC.Real -modify from Control.Monad.State.Class -modifyMVar from Control.Concurrent.MVar -modifyMVarMasked from Control.Concurrent.MVar -modifyMVarMasked_ from Control.Concurrent.MVar -modifyMVar_ from Control.Concurrent.MVar -moduleName from GHC.Generics -mplus from GHC.Base -msum from Data.Foldable -mtimesDefault from Data.Semigroup -myThreadId from GHC.Conc.Sync -mzero from GHC.Base -natVal from GHC.TypeLits -negate from GHC.Num -newChan from Control.Concurrent.Chan -newEmptyMVar from GHC.MVar -newMVar from GHC.MVar -newQSem from Control.Concurrent.QSem -newQSemN from Control.Concurrent.QSemN -nonEmpty from Data.List.NonEmpty -not from GHC.Classes -notANumber from GHC.Real -notElem from Data.Foldable -notImplemented from Debug -note from Protolude.Exceptions -null from Data.Foldable -numerator from GHC.Real -numericEnumFrom from GHC.Real -numericEnumFromThen from GHC.Real -numericEnumFromThenTo from GHC.Real -numericEnumFromTo from GHC.Real -objectName from GHC.ExecutionStack.Internal -odd from GHC.Real -on from Data.Function -onException from Control.Exception.Base -one from Protolude.Semiring -openFile from GHC.IO.Handle.FD -option from Data.Semigroup -optional from Control.Applicative -or from Data.Foldable -orAlt from Protolude.Applicative -orElse from GHC.Conc.Sync -orEmpty from Protolude.Applicative -ord from GHC.Base -ordNub from Protolude.List -otherwise from GHC.Base -overflowError from GHC.Real -packageName from GHC.Generics -panic from Protolude.Panic -partitionEithers from Data.Either -pass from Protolude -permutations from Data.OldList -phase from Data.Complex -pi from GHC.Float -polar from Data.Complex -poll from Control.Concurrent.Async -popCount from Data.Bits -popCountDefault from Data.Bits -pred from GHC.Enum -prettyCallStack from GHC.Exception -prettySrcLoc from GHC.Exception -print from Protolude -product from Protolude.List -properFraction from GHC.Real -pure from GHC.Base -purer from Protolude.Applicative -put from Control.Monad.State.Class -putByteString from Protolude.Show -putErrLn from Protolude.Show -putErrText from Protolude.Show -putLByteString from Protolude.Show -putLText from Protolude.Show -putMVar from GHC.MVar -putStr from Protolude.Show -putStrLn from Protolude.Show -putText from Protolude.Show -quot from GHC.Real -quotRem from GHC.Real -race from Control.Concurrent.Async -race_ from Control.Concurrent.Async -ratioPrec from GHC.Real -ratioPrec1 from GHC.Real -ratioZeroDenominatorError from GHC.Real -readChan from Control.Concurrent.Chan -readEither from Protolude -readFile from Data.Text.IO -readMVar from GHC.MVar -readMaybe from Protolude -reader from Control.Monad.Reader.Class -reads from Text.Read -realPart from Data.Complex -realToFrac from GHC.Real -recip from GHC.Real -reduce from GHC.Real -rem from GHC.Real -repeat from GHC.List -replace from Data.Text.Encoding.Error -replicate from GHC.List -replicateM from Control.Monad -replicateM_ from Control.Monad -repr from Data.Type.Coercion -retry from GHC.Conc.Sync -return from GHC.Base -reverse from GHC.List -rightToMaybe from Protolude.Either -rights from Data.Either -rnf from Control.DeepSeq -rotate from Data.Bits -rotateL from Data.Bits -rotateR from Data.Bits -round from GHC.Real -rtsSupportsBoundThreads from Control.Concurrent -runConcurrently from Control.Concurrent.Async -runExcept from Control.Monad.Trans.Except -runExceptT from Control.Monad.Trans.Except -runIdentity from Data.Functor.Identity -runInBoundThread from Control.Concurrent -runInUnboundThread from Control.Concurrent -runReader from Control.Monad.Trans.Reader -runReaderT from Control.Monad.Trans.Reader -runST from GHC.ST -runState from Control.Monad.Trans.State.Lazy -runStateT from Control.Monad.Trans.State.Lazy -scaleFloat from GHC.Float -scanl from GHC.List -scanl' from GHC.List -scanr from GHC.List -sconcat from Data.Semigroup -second from Data.Bifunctor -selDecidedStrictness from GHC.Generics -selName from GHC.Generics -selSourceStrictness from GHC.Generics -selSourceUnpackedness from GHC.Generics -seq from GHC.Prim -sequence from Data.Traversable -sequenceA from Data.Traversable -sequenceA_ from Data.Foldable -sequence_ from Data.Foldable -setBit from Data.Bits -setNumCapabilities from GHC.Conc.Sync -shift from Data.Bits -shiftL from Data.Bits -shiftR from Data.Bits -show from Protolude -showStackTrace from GHC.ExecutionStack -signalQSem from Control.Concurrent.QSem -signalQSemN from Control.Concurrent.QSemN -significand from GHC.Float -signum from GHC.Num -sin from GHC.Float -sinh from GHC.Float -snd from Data.Tuple -some from GHC.Base -someNatVal from GHC.TypeLits -someSymbolVal from GHC.TypeLits -sort from Data.OldList -sortBy from Data.OldList -sortOn from Protolude.List -sourceColumn from GHC.ExecutionStack.Internal -sourceFile from GHC.ExecutionStack.Internal -sourceLine from GHC.ExecutionStack.Internal -splitAt from GHC.List -sqrt from GHC.Float -srcLoc from GHC.ExecutionStack.Internal -state from Control.Monad.State.Class -stderr from GHC.IO.Handle.FD -stdin from GHC.IO.Handle.FD -stdout from GHC.IO.Handle.FD -stimes from Data.Semigroup -stimesIdempotent from Data.Semigroup -stimesIdempotentMonoid from Data.Semigroup -stimesMonoid from Data.Semigroup -strConv from Protolude.Conv -strictDecode from Data.Text.Encoding.Error -subsequences from Data.OldList -subtract from GHC.Num -succ from GHC.Enum -sum from Protolude.List -swap from Data.Tuple -swapMVar from Control.Concurrent.MVar -sym from Data.Type.Equality -symbolVal from GHC.TypeLits -tailDef from Protolude.Safe -tailMay from Protolude.Safe -tailSafe from Protolude.Safe -tails from Data.OldList -take from GHC.List -takeMVar from GHC.MVar -takeWhile from GHC.List -tan from GHC.Float -tanh from GHC.Float -testBit from Data.Bits -testBitDefault from Data.Bits -threadCapability from GHC.Conc.Sync -threadDelay from GHC.Conc.IO -threadWaitRead from Control.Concurrent -threadWaitReadSTM from Control.Concurrent -threadWaitWrite from Control.Concurrent -threadWaitWriteSTM from Control.Concurrent -throwE from Control.Monad.Trans.Except -throwError from Control.Monad.Error.Class -throwIO from Protolude -throwSTM from GHC.Conc.Sync -throwTo from Protolude -to from GHC.Generics -toEnum from GHC.Enum -toException from GHC.Exception -toInteger from GHC.Real -toIntegralSized from Data.Bits -toList from Data.Foldable -toRational from GHC.Real -toS from Protolude.Conv -toSL from Protolude.Conv -toStrict from Data.Text.Lazy -trace from Debug -traceIO from Debug -traceId from Debug -traceM from Debug -traceShow from Debug -traceShowId from Debug -traceShowM from Debug -trans from Data.Type.Equality -transpose from Data.OldList -traverse from Data.Traversable -traverse_ from Data.Foldable -truncate from GHC.Real -try from Control.Exception.Base -tryIO from Protolude.Exceptions -tryJust from Control.Exception.Base -tryPutMVar from GHC.MVar -tryReadMVar from GHC.MVar -tryTakeMVar from GHC.MVar -typeRep from Data.Typeable -unComp1 from GHC.Generics -unGetChan from Control.Concurrent.Chan -unK1 from GHC.Generics -unM1 from GHC.Generics -uncons from Protolude -uncurry from Data.Tuple -undefined from Debug -unfoldr from Data.OldList -uninterruptibleMask from GHC.IO -uninterruptibleMask_ from GHC.IO -unless from Control.Monad -unlessM from Protolude.Bool -unlines from Data.Text -unsnoc from Protolude -until from GHC.Base -unwords from Data.Text -unzip from GHC.List -vacuous from Data.Void -void from Data.Functor -wait from Control.Concurrent.Async -waitAny from Control.Concurrent.Async -waitAnyCancel from Control.Concurrent.Async -waitAnyCatch from Control.Concurrent.Async -waitAnyCatchCancel from Control.Concurrent.Async -waitBoth from Control.Concurrent.Async -waitCatch from Control.Concurrent.Async -waitEither from Control.Concurrent.Async -waitEitherCancel from Control.Concurrent.Async -waitEitherCatch from Control.Concurrent.Async -waitEitherCatchCancel from Control.Concurrent.Async -waitEither_ from Control.Concurrent.Async -waitQSem from Control.Concurrent.QSem -waitQSemN from Control.Concurrent.QSemN -when from GHC.Base -whenM from Protolude.Bool -withAsync from Control.Concurrent.Async -withAsyncBound from Control.Concurrent.Async -withAsyncOn from Control.Concurrent.Async -withExcept from Control.Monad.Trans.Except -withExceptT from Control.Monad.Trans.Except -withFile from System.IO -withFrozenCallStack from GHC.Stack -withMVar from Control.Concurrent.MVar -withMVarMasked from Control.Concurrent.MVar -withState from Control.Monad.Trans.State.Lazy -witness from Debug -words from Data.Text -writeChan from Control.Concurrent.Chan -writeFile from Data.Text.IO -writeList2Chan from Control.Concurrent.Chan -xor from Data.Bits -zero from Protolude.Semiring -zeroBits from Data.Bits -zip from GHC.List -zipWith from GHC.List -zipWithM from Control.Monad -zipWithM_ from Control.Monad -|| from GHC.Classes -||^ from Protolude.Bool diff --git a/src/protolude/export_lists/protolude-12.exports b/src/protolude/export_lists/protolude-12.exports deleted file mode 100644 index 17fc4243fa..0000000000 --- a/src/protolude/export_lists/protolude-12.exports +++ /dev/null @@ -1,958 +0,0 @@ -$ from GHC.Base -$! from Protolude.Base -$!! from Control.DeepSeq -$> from Data.Functor -% from GHC.Real -& from Data.Function -&& from GHC.Classes -&&^ from Protolude.Bool -* from GHC.Num -* from GHC.Types -** from GHC.Float -*> from GHC.Base -+ from GHC.Num -++ from GHC.Base -- from GHC.Num -. from GHC.Base -.&. from Data.Bits -.|. from Data.Bits -/ from GHC.Real -/= from GHC.Classes -:% from GHC.Real -:*: from GHC.Generics -:*: from GHC.Generics -:+ from Data.Complex -:+: from GHC.Generics -:.: from GHC.Generics -:| from GHC.Base -:~: from Data.Type.Equality -< from GHC.Classes -<$ from GHC.Base -<$!> from Control.Monad -<$> from Data.Functor -<&&> from Protolude.Bool -<&> from Data.Functor -<* from GHC.Base -<**> from GHC.Base -<*> from GHC.Base -<.> from Protolude.Semiring -<<$>> from Protolude.Functor -<<*>> from Protolude.Applicative -<= from GHC.Classes -<=< from Control.Monad -<> from GHC.Base -<|> from GHC.Base -<||> from Protolude.Bool -=<< from GHC.Base -== from GHC.Classes -== from Data.Type.Equality -> from GHC.Classes ->= from GHC.Classes ->=> from Control.Monad ->> from GHC.Base ->>= from GHC.Base -All from Data.Semigroup.Internal -All from Data.Semigroup.Internal -AllocationLimitExceeded from GHC.IO.Exception -AllocationLimitExceeded from GHC.IO.Exception -Alt from Data.Semigroup.Internal -Alt from Data.Semigroup.Internal -Alternative from GHC.Base -Any from Data.Semigroup.Internal -Any from Data.Semigroup.Internal -AppendMode from GHC.IO.IOMode -Applicative from GHC.Base -ArithException from GHC.Exception -ArrayException from GHC.IO.Exception -AssertionFailed from GHC.IO.Exception -AssertionFailed from GHC.IO.Exception -Associativity from GHC.Generics -Async from Control.Concurrent.Async -AsyncException from GHC.IO.Exception -Bifunctor from Data.Bifunctor -Bits from Data.Bits -BlockedIndefinitelyOnMVar from GHC.IO.Exception -BlockedIndefinitelyOnMVar from GHC.IO.Exception -BlockedIndefinitelyOnSTM from GHC.IO.Exception -BlockedIndefinitelyOnSTM from GHC.IO.Exception -Bool from GHC.Types -Bounded from GHC.Enum -ByteString from Data.ByteString.Internal -C1 from GHC.Generics -CallStack from GHC.Stack.Types -Chan from Control.Concurrent.Chan -Char from GHC.Types -CmpNat from GHC.TypeNats -Coercible from GHC.Types -Coercion from Data.Type.Coercion -Coercion from Data.Type.Coercion -Comp1 from GHC.Generics -CompactionFailed from GHC.IO.Exception -CompactionFailed from GHC.IO.Exception -Complex from Data.Complex -Concurrently from Control.Concurrent.Async -Concurrently from Control.Concurrent.Async -Const from Data.Functor.Const -Const from Data.Functor.Const -Constraint from GHC.Types -Constructor from GHC.Generics -D# from GHC.Types -D1 from GHC.Generics -Datatype from GHC.Generics -Deadlock from GHC.IO.Exception -Deadlock from GHC.IO.Exception -Denormal from GHC.Exception -DivideByZero from GHC.Exception -Double from GHC.Types -Down from Data.Ord -Down from Data.Ord -Dual from Data.Semigroup.Internal -Dual from Data.Semigroup.Internal -EQ from GHC.Types -Either from Data.Either -Endo from Data.Semigroup.Internal -Endo from Data.Semigroup.Internal -Enum from GHC.Enum -Eq from GHC.Classes -ErrorCall from GHC.Exception -ErrorCall from GHC.Exception -ErrorCallWithLocation from GHC.Exception -Except from Control.Monad.Trans.Except -ExceptT from Control.Monad.Trans.Except -ExceptT from Control.Monad.Trans.Except -Exception from GHC.Exception -ExitCode from GHC.IO.Exception -ExitFailure from GHC.IO.Exception -ExitSuccess from GHC.IO.Exception -F# from GHC.Types -False from GHC.Types -FatalError from Protolude.Panic -FatalError from Protolude.Panic -FilePath from GHC.IO -FiniteBits from Data.Bits -First from Data.Monoid -First from Data.Monoid -Fixity from GHC.Generics -FixityI from GHC.Generics -Float from GHC.Types -Floating from GHC.Float -Foldable from Data.Foldable -Fractional from GHC.Real -FunPtr from GHC.Ptr -Functor from GHC.Base -GT from GHC.Types -Generic from GHC.Generics -Generic1 from GHC.Generics -Handle from GHC.IO.Handle.Types -HasCallStack from GHC.Stack.Types -HasField from GHC.Records -Hashable from Data.Hashable.Class -HeapOverflow from GHC.IO.Exception -IO from GHC.Types -IOException from GHC.IO.Exception -IOMode from GHC.IO.IOMode -Identity from Data.Functor.Identity -Identity from Data.Functor.Identity -IndexOutOfBounds from GHC.IO.Exception -Infix from GHC.Generics -InfixI from GHC.Generics -Int from GHC.Types -Int16 from GHC.Int -Int32 from GHC.Int -Int64 from GHC.Int -Int8 from GHC.Int -IntMap from Data.IntMap.Internal -IntPtr from Foreign.Ptr -IntSet from Data.IntSet.Internal -Integer from GHC.Integer.Type -Integral from GHC.Real -IsLabel from GHC.OverloadedLabels -IsString from Data.String -Just from GHC.Base -K1 from GHC.Generics -K1 from GHC.Generics -KnownNat from GHC.TypeNats -KnownSymbol from GHC.TypeLits -L1 from GHC.Generics -LByteString from Protolude -LT from GHC.Types -LText from Protolude -Last from Data.Monoid -Last from Data.Monoid -Left from Data.Either -LeftAssociative from GHC.Generics -Leniency from Protolude.Conv -Lenient from Protolude.Conv -Location from GHC.ExecutionStack.Internal -Location from GHC.ExecutionStack.Internal -LossOfPrecision from GHC.Exception -M1 from GHC.Generics -M1 from GHC.Generics -MVar from GHC.MVar -Map from Data.Map.Internal -MaskedInterruptible from GHC.IO -MaskedUninterruptible from GHC.IO -MaskingState from GHC.IO -Maybe from GHC.Base -Meta from GHC.Generics -MetaCons from GHC.Generics -MetaData from GHC.Generics -MetaSel from GHC.Generics -Monad from GHC.Base -MonadError from Control.Monad.Error.Class -MonadIO from Control.Monad.IO.Class -MonadPlus from GHC.Base -MonadReader from Control.Monad.Reader.Class -MonadState from Control.Monad.State.Class -Monoid from GHC.Base -NFData from Control.DeepSeq -Nat from GHC.Types -NestedAtomically from Control.Exception.Base -NestedAtomically from Control.Exception.Base -NoMethodError from Control.Exception.Base -NoMethodError from Control.Exception.Base -NonEmpty from GHC.Base -NonTermination from Control.Exception.Base -NonTermination from Control.Exception.Base -NotAssociative from GHC.Generics -Nothing from GHC.Base -Num from GHC.Num -OnDecodeError from Data.Text.Encoding.Error -OnError from Data.Text.Encoding.Error -Option from Data.Semigroup -Option from Data.Semigroup -Ord from GHC.Classes -Ordering from GHC.Types -Overflow from GHC.Exception -PatternMatchFail from Control.Exception.Base -PatternMatchFail from Control.Exception.Base -Prefix from GHC.Generics -PrefixI from GHC.Generics -Print from Protolude.Show -Product from Data.Semigroup.Internal -Product from Data.Semigroup.Internal -Proxy from Data.Proxy -Proxy from Data.Proxy -Ptr from GHC.Ptr -QSem from Control.Concurrent.QSem -QSemN from Control.Concurrent.QSemN -R1 from GHC.Generics -Ratio from GHC.Real -RatioZeroDenominator from GHC.Exception -Rational from GHC.Real -Read from GHC.Read -ReadMode from GHC.IO.IOMode -ReadWriteMode from GHC.IO.IOMode -Reader from Control.Monad.Trans.Reader -ReaderT from Control.Monad.Trans.Reader -ReaderT from Control.Monad.Trans.Reader -Real from GHC.Real -RealFloat from GHC.Float -RealFrac from GHC.Real -Rec0 from GHC.Generics -RecConError from Control.Exception.Base -RecConError from Control.Exception.Base -RecSelError from Control.Exception.Base -RecSelError from Control.Exception.Base -RecUpdError from Control.Exception.Base -RecUpdError from Control.Exception.Base -Refl from Data.Type.Equality -Rep from GHC.Generics -Right from Data.Either -RightAssociative from GHC.Generics -S1 from GHC.Generics -ST from GHC.ST -STM from GHC.Conc.Sync -Selector from GHC.Generics -Semigroup from GHC.Base -Semiring from Protolude.Semiring -Seq from Data.Sequence.Internal -Set from Data.Set.Internal -Show from GHC.Show -SomeAsyncException from GHC.IO.Exception -SomeAsyncException from GHC.IO.Exception -SomeException from GHC.Exception -SomeException from GHC.Exception -SomeNat from GHC.TypeNats -SomeNat from GHC.TypeNats -SomeSymbol from GHC.TypeLits -SomeSymbol from GHC.TypeLits -SrcLoc from GHC.ExecutionStack.Internal -SrcLoc from GHC.ExecutionStack.Internal -StablePtr from GHC.Stable -StackOverflow from GHC.IO.Exception -State from Control.Monad.Trans.State.Lazy -StateT from Control.Monad.Trans.State.Lazy -StateT from Control.Monad.Trans.State.Lazy -StaticPtr from GHC.StaticPtr -Storable from Foreign.Storable -Strict from Protolude.Conv -StringConv from Protolude.Conv -Sum from Data.Semigroup.Internal -Sum from Data.Semigroup.Internal -Symbol from GHC.Types -Text from Data.Text.Internal -ThreadId from GHC.Conc.Sync -ThreadKilled from GHC.IO.Exception -Traversable from Data.Traversable -True from GHC.Types -Type from GHC.Types -TypeError from Control.Exception.Base -TypeError from Control.Exception.Base -TypeRep from Data.Typeable -Typeable from Data.Typeable.Internal -U1 from GHC.Generics -U1 from GHC.Generics -URec from GHC.Generics -UndefinedElement from GHC.IO.Exception -Underflow from GHC.Exception -UnicodeException from Data.Text.Encoding.Error -Unmasked from GHC.IO -UserInterrupt from GHC.IO.Exception -V1 from GHC.Generics -Void from Data.Void -Word from GHC.Types -Word16 from GHC.Word -Word32 from GHC.Word -Word64 from GHC.Word -Word8 from GHC.Word -WordPtr from Foreign.Ptr -WrappedMonoid from Data.Semigroup -WriteMode from GHC.IO.IOMode -ZipList from Control.Applicative -ZipList from Control.Applicative -^ from GHC.Real -^%^ from GHC.Real -^^ from GHC.Real -^^%^^ from GHC.Real -abs from GHC.Num -absurd from Data.Void -acos from GHC.Float -acosh from GHC.Float -addMVarFinalizer from Control.Concurrent.MVar -all from Data.Foldable -allowInterrupt from Control.Exception -always from GHC.Conc.Sync -alwaysSucceeds from GHC.Conc.Sync -and from Data.Foldable -any from Data.Foldable -ap from GHC.Base -appEndo from Data.Semigroup.Internal -appendFile from Data.Text.IO -applyN from Protolude -asTypeOf from GHC.Base -asin from GHC.Float -asinh from GHC.Float -ask from Control.Monad.Reader.Class -asks from Control.Monad.Reader.Class -asum from Data.Foldable -async from Control.Concurrent.Async -asyncBound from Control.Concurrent.Async -asyncExceptionFromException from GHC.IO.Exception -asyncExceptionToException from GHC.IO.Exception -asyncOn from Control.Concurrent.Async -asyncThreadId from Control.Concurrent.Async -atDef from Protolude.Safe -atMay from Protolude.Safe -atan from GHC.Float -atan2 from GHC.Float -atanh from GHC.Float -atomically from GHC.Conc.Sync -bimap from Data.Bifunctor -bit from Data.Bits -bitDefault from Data.Bits -bitSize from Data.Bits -bitSizeMaybe from Data.Bits -bool from Protolude.Bool -boundedEnumFrom from GHC.Enum -boundedEnumFromThen from GHC.Enum -bracket from Control.Exception.Base -bracketOnError from Control.Exception.Base -bracket_ from Control.Exception.Base -break from GHC.List -byteSwap16 from GHC.Word -byteSwap32 from GHC.Word -byteSwap64 from GHC.Word -callStack from GHC.Stack -cancel from Control.Concurrent.Async -cancelWith from Control.Concurrent.Async -cast from Data.Typeable -castWith from Data.Type.Equality -catMaybes from Data.Maybe -catch from GHC.IO -catchE from Control.Monad.Trans.Except -catchError from Control.Monad.Error.Class -catchJust from Control.Exception.Base -catchSTM from GHC.Conc.Sync -catches from Control.Exception -ceiling from GHC.Real -check from Control.Monad.STM -chr from GHC.Char -cis from Data.Complex -clearBit from Data.Bits -coerceWith from Data.Type.Coercion -compare from GHC.Classes -comparing from Data.Ord -complement from Data.Bits -complementBit from Data.Bits -conFixity from GHC.Generics -conIsRecord from GHC.Generics -conName from GHC.Generics -concat from Data.Foldable -concatMap from Data.Foldable -concatMapM from Protolude.Monad -concurrently from Control.Concurrent.Async -conjugate from Data.Complex -const from GHC.Base -cos from GHC.Float -cosh from GHC.Float -countLeadingZeros from Data.Bits -countTrailingZeros from Data.Bits -currentCallStack from GHC.Stack.CCS -curry from Data.Tuple -cycle from GHC.List -cycle1 from Data.Semigroup -datatypeName from GHC.Generics -decodeFloat from GHC.Float -decodeUtf8 from Data.Text.Encoding -decodeUtf8' from Data.Text.Encoding -decodeUtf8With from Data.Text.Encoding -deepseq from Control.DeepSeq -denominator from GHC.Real -die from Protolude -diff from Data.Semigroup -displayException from GHC.Exception -div from GHC.Real -divMod from GHC.Real -divZeroError from GHC.Real -drop from GHC.List -dropWhile from GHC.List -dupChan from Control.Concurrent.Chan -either from Data.Either -eitherA from Protolude.Applicative -elem from Data.Foldable -empty from GHC.Base -encodeFloat from GHC.Float -encodeUtf8 from Data.Text.Encoding -enumFrom from GHC.Enum -enumFromThen from GHC.Enum -enumFromThenTo from GHC.Enum -enumFromTo from GHC.Enum -eqT from Data.Typeable -evalState from Control.Monad.Trans.State.Lazy -evalStateT from Control.Monad.Trans.State.Lazy -evaluate from GHC.IO -even from GHC.Real -execState from Control.Monad.Trans.State.Lazy -execStateT from Control.Monad.Trans.State.Lazy -exitFailure from System.Exit -exitSuccess from System.Exit -exitWith from System.Exit -exp from GHC.Float -expm1 from GHC.Float -exponent from GHC.Float -fatalErrorMessage from Protolude.Panic -filter from GHC.List -filterM from Control.Monad -finally from Control.Exception.Base -find from Data.Foldable -finiteBitSize from Data.Bits -first from Data.Bifunctor -fix from Data.Function -fixST from GHC.ST -flip from GHC.Base -floatDigits from GHC.Float -floatRadix from GHC.Float -floatRange from GHC.Float -floor from GHC.Real -fmap from GHC.Base -fmapDefault from Data.Traversable -fold from Data.Foldable -foldM from Control.Monad -foldM_ from Control.Monad -foldMap from Data.Foldable -foldMapDefault from Data.Traversable -foldl from Data.Foldable -foldl' from Data.Foldable -foldl1May from Protolude.Safe -foldl1May' from Protolude.Safe -foldlM from Data.Foldable -foldr from Data.Foldable -foldr' from Data.Foldable -foldr1May from Protolude.Safe -foldrM from Data.Foldable -for from Data.Traversable -forM from Data.Traversable -forM_ from Data.Foldable -for_ from Data.Foldable -force from Control.DeepSeq -foreach from Protolude.Functor -forever from Control.Monad -forkFinally from Control.Concurrent -forkIO from GHC.Conc.Sync -forkIOWithUnmask from GHC.Conc.Sync -forkOS from Control.Concurrent -forkOSWithUnmask from Control.Concurrent -forkOn from GHC.Conc.Sync -forkOnWithUnmask from GHC.Conc.Sync -from from GHC.Generics -fromEnum from GHC.Enum -fromException from GHC.Exception -fromInteger from GHC.Num -fromIntegral from GHC.Real -fromLabel from GHC.OverloadedLabels -fromLeft from Data.Either -fromMaybe from Data.Maybe -fromRational from GHC.Real -fromRight from Data.Either -fromStrict from Data.Text.Lazy -fst from Data.Tuple -functionName from GHC.ExecutionStack.Internal -gcastWith from Data.Type.Equality -gcd from GHC.Real -gcdInt' from GHC.Real -gcdWord' from GHC.Real -genericDrop from Data.OldList -genericLength from Data.OldList -genericReplicate from Data.OldList -genericSplitAt from Data.OldList -genericTake from Data.OldList -get from Control.Monad.State.Class -getAll from Data.Semigroup.Internal -getAlt from Data.Semigroup.Internal -getAny from Data.Semigroup.Internal -getArgs from System.Environment -getCallStack from GHC.Stack.Types -getChanContents from Control.Concurrent.Chan -getConst from Data.Functor.Const -getContents from Data.Text.IO -getDual from Data.Semigroup.Internal -getField from GHC.Records -getFirst from Data.Monoid -getLast from Data.Monoid -getLine from Data.Text.IO -getMaskingState from GHC.IO -getNumCapabilities from GHC.Conc.Sync -getOption from Data.Semigroup -getProduct from Data.Semigroup.Internal -getStackTrace from GHC.ExecutionStack -getSum from Data.Semigroup.Internal -getZipList from Control.Applicative -gets from Control.Monad.State.Class -group from Data.OldList -groupBy from Data.OldList -guard from Control.Monad -guardM from Protolude.Bool -guarded from Protolude -guardedA from Protolude -hPutStr from Protolude.Show -hPutStrLn from Protolude.Show -handle from Control.Exception.Base -handleJust from Control.Exception.Base -hash from Data.Hashable.Class -hashUsing from Data.Hashable.Class -hashWithSalt from Data.Hashable.Class -head from Protolude.List -headDef from Protolude.Safe -headMay from Protolude.Safe -hush from Protolude.Exceptions -identity from Protolude -ifM from Protolude.Bool -ignore from Data.Text.Encoding.Error -imagPart from Data.Complex -infinity from GHC.Real -initDef from Protolude.Safe -initMay from Protolude.Safe -initSafe from Protolude.Safe -inits from Data.OldList -integralEnumFrom from GHC.Real -integralEnumFromThen from GHC.Real -integralEnumFromThenTo from GHC.Real -integralEnumFromTo from GHC.Real -interact from Data.Text.IO -intercalate from Data.OldList -interruptible from GHC.IO -intersperse from Data.OldList -ioError from GHC.IO.Exception -isCurrentThreadBound from Control.Concurrent -isDenormalized from GHC.Float -isEmptyMVar from GHC.MVar -isIEEE from GHC.Float -isInfinite from GHC.Float -isJust from Data.Maybe -isLeft from Data.Either -isNaN from GHC.Float -isNegativeZero from GHC.Float -isNewtype from GHC.Generics -isNothing from Data.Maybe -isPrefixOf from Data.OldList -isRight from Data.Either -isSigned from Data.Bits -iterate from GHC.List -join from GHC.Base -killThread from GHC.Conc.Sync -lastDef from Protolude.Safe -lastMay from Protolude.Safe -lcm from GHC.Real -leftToMaybe from Protolude.Either -lefts from Data.Either -length from Data.Foldable -lenientDecode from Data.Text.Encoding.Error -lift from Control.Monad.Trans.Class -liftA from GHC.Base -liftA2 from GHC.Base -liftA3 from GHC.Base -liftAA2 from Protolude.Applicative -liftIO from Control.Monad.IO.Class -liftIO1 from Protolude -liftIO2 from Protolude -liftM from GHC.Base -liftM' from Protolude.Monad -liftM2 from GHC.Base -liftM2' from Protolude.Monad -liftM3 from GHC.Base -liftM4 from GHC.Base -liftM5 from GHC.Base -lines from Data.Text -link from Control.Concurrent.Async -link2 from Control.Concurrent.Async -list from Protolude.List -listToMaybe from Data.Maybe -local from Control.Monad.Reader.Class -log from GHC.Float -log1mexp from GHC.Float -log1p from GHC.Float -log1pexp from GHC.Float -logBase from GHC.Float -magnitude from Data.Complex -many from GHC.Base -map from Protolude -mapAccumL from Data.Traversable -mapAccumR from Data.Traversable -mapAndUnzipM from Control.Monad -mapExcept from Control.Monad.Trans.Except -mapExceptT from Control.Monad.Trans.Except -mapException from Control.Exception.Base -mapM from Data.Traversable -mapM_ from Data.Foldable -mapMaybe from Data.Maybe -mappend from GHC.Base -mask from GHC.IO -mask_ from GHC.IO -max from GHC.Classes -maxBound from GHC.Enum -maxInt from GHC.Base -maximum from Data.Foldable -maximumBy from Data.Foldable -maximumDef from Protolude.Safe -maximumMay from Protolude.Safe -maybe from Data.Maybe -maybeEmpty from Protolude.Either -maybeToEither from Protolude.Either -maybeToLeft from Protolude.Either -maybeToList from Data.Maybe -maybeToRight from Protolude.Either -mconcat from GHC.Base -mempty from GHC.Base -mfilter from Control.Monad -min from GHC.Classes -minBound from GHC.Enum -minInt from GHC.Base -minimum from Data.Foldable -minimumBy from Data.Foldable -minimumDef from Protolude.Safe -minimumMay from Protolude.Safe -mkPolar from Data.Complex -mkWeakMVar from Control.Concurrent.MVar -mkWeakThreadId from GHC.Conc.Sync -mod from GHC.Real -modify from Control.Monad.State.Class -modifyMVar from Control.Concurrent.MVar -modifyMVarMasked from Control.Concurrent.MVar -modifyMVarMasked_ from Control.Concurrent.MVar -modifyMVar_ from Control.Concurrent.MVar -moduleName from GHC.Generics -mplus from GHC.Base -msum from Data.Foldable -mtimesDefault from Data.Semigroup -myThreadId from GHC.Conc.Sync -mzero from GHC.Base -natVal from GHC.TypeLits -negate from GHC.Num -newChan from Control.Concurrent.Chan -newEmptyMVar from GHC.MVar -newMVar from GHC.MVar -newQSem from Control.Concurrent.QSem -newQSemN from Control.Concurrent.QSemN -nonEmpty from Data.List.NonEmpty -not from GHC.Classes -notANumber from GHC.Real -notElem from Data.Foldable -notImplemented from Debug -note from Protolude.Exceptions -null from Data.Foldable -numerator from GHC.Real -numericEnumFrom from GHC.Real -numericEnumFromThen from GHC.Real -numericEnumFromThenTo from GHC.Real -numericEnumFromTo from GHC.Real -objectName from GHC.ExecutionStack.Internal -odd from GHC.Real -on from Data.Function -onException from Control.Exception.Base -one from Protolude.Semiring -openFile from GHC.IO.Handle.FD -option from Data.Semigroup -optional from Control.Applicative -or from Data.Foldable -orAlt from Protolude.Applicative -orElse from GHC.Conc.Sync -orEmpty from Protolude.Applicative -ord from GHC.Base -ordNub from Protolude.List -otherwise from GHC.Base -overflowError from GHC.Real -packageName from GHC.Generics -panic from Protolude.Panic -partitionEithers from Data.Either -pass from Protolude -permutations from Data.OldList -phase from Data.Complex -pi from GHC.Float -polar from Data.Complex -poll from Control.Concurrent.Async -popCount from Data.Bits -popCountDefault from Data.Bits -pred from GHC.Enum -prettyCallStack from GHC.Exception -prettySrcLoc from GHC.Exception -print from Protolude -product from Protolude.List -properFraction from GHC.Real -pure from GHC.Base -purer from Protolude.Applicative -put from Control.Monad.State.Class -putByteString from Protolude.Show -putErrLn from Protolude.Show -putErrText from Protolude.Show -putLByteString from Protolude.Show -putLText from Protolude.Show -putMVar from GHC.MVar -putStr from Protolude.Show -putStrLn from Protolude.Show -putText from Protolude.Show -quot from GHC.Real -quotRem from GHC.Real -race from Control.Concurrent.Async -race_ from Control.Concurrent.Async -ratioPrec from GHC.Real -ratioPrec1 from GHC.Real -ratioZeroDenominatorError from GHC.Real -readChan from Control.Concurrent.Chan -readEither from Protolude -readFile from Data.Text.IO -readMVar from GHC.MVar -readMaybe from Protolude -reader from Control.Monad.Reader.Class -reads from Text.Read -realPart from Data.Complex -realToFrac from GHC.Real -recip from GHC.Real -reduce from GHC.Real -rem from GHC.Real -repeat from GHC.List -replace from Data.Text.Encoding.Error -replicate from GHC.List -replicateM from Control.Monad -replicateM_ from Control.Monad -repr from Data.Type.Coercion -retry from GHC.Conc.Sync -return from GHC.Base -reverse from GHC.List -rightToMaybe from Protolude.Either -rights from Data.Either -rnf from Control.DeepSeq -rotate from Data.Bits -rotateL from Data.Bits -rotateR from Data.Bits -round from GHC.Real -rtsSupportsBoundThreads from Control.Concurrent -runConcurrently from Control.Concurrent.Async -runExcept from Control.Monad.Trans.Except -runExceptT from Control.Monad.Trans.Except -runIdentity from Data.Functor.Identity -runInBoundThread from Control.Concurrent -runInUnboundThread from Control.Concurrent -runReader from Control.Monad.Trans.Reader -runReaderT from Control.Monad.Trans.Reader -runST from GHC.ST -runState from Control.Monad.Trans.State.Lazy -runStateT from Control.Monad.Trans.State.Lazy -scaleFloat from GHC.Float -scanl from GHC.List -scanl' from GHC.List -scanr from GHC.List -sconcat from GHC.Base -second from Data.Bifunctor -selDecidedStrictness from GHC.Generics -selName from GHC.Generics -selSourceStrictness from GHC.Generics -selSourceUnpackedness from GHC.Generics -seq from GHC.Prim -sequence from Data.Traversable -sequenceA from Data.Traversable -sequenceA_ from Data.Foldable -sequence_ from Data.Foldable -setBit from Data.Bits -setNumCapabilities from GHC.Conc.Sync -shift from Data.Bits -shiftL from Data.Bits -shiftR from Data.Bits -show from Protolude -showStackTrace from GHC.ExecutionStack -signalQSem from Control.Concurrent.QSem -signalQSemN from Control.Concurrent.QSemN -significand from GHC.Float -signum from GHC.Num -sin from GHC.Float -sinh from GHC.Float -snd from Data.Tuple -some from GHC.Base -someNatVal from GHC.TypeLits -someSymbolVal from GHC.TypeLits -sort from Data.OldList -sortBy from Data.OldList -sortOn from Protolude.List -sourceColumn from GHC.ExecutionStack.Internal -sourceFile from GHC.ExecutionStack.Internal -sourceLine from GHC.ExecutionStack.Internal -splitAt from GHC.List -sqrt from GHC.Float -srcLoc from GHC.ExecutionStack.Internal -state from Control.Monad.State.Class -stderr from GHC.IO.Handle.FD -stdin from GHC.IO.Handle.FD -stdout from GHC.IO.Handle.FD -stimes from GHC.Base -stimesIdempotent from Data.Semigroup.Internal -stimesIdempotentMonoid from Data.Semigroup.Internal -stimesMonoid from Data.Semigroup.Internal -strConv from Protolude.Conv -strictDecode from Data.Text.Encoding.Error -subsequences from Data.OldList -subtract from GHC.Num -succ from GHC.Enum -sum from Protolude.List -swap from Data.Tuple -swapMVar from Control.Concurrent.MVar -sym from Data.Type.Equality -symbolVal from GHC.TypeLits -tailDef from Protolude.Safe -tailMay from Protolude.Safe -tailSafe from Protolude.Safe -tails from Data.OldList -take from GHC.List -takeMVar from GHC.MVar -takeWhile from GHC.List -tan from GHC.Float -tanh from GHC.Float -testBit from Data.Bits -testBitDefault from Data.Bits -threadCapability from GHC.Conc.Sync -threadDelay from GHC.Conc.IO -threadWaitRead from Control.Concurrent -threadWaitReadSTM from Control.Concurrent -threadWaitWrite from Control.Concurrent -threadWaitWriteSTM from Control.Concurrent -throwE from Control.Monad.Trans.Except -throwError from Control.Monad.Error.Class -throwIO from Protolude -throwSTM from GHC.Conc.Sync -throwTo from Protolude -to from GHC.Generics -toEnum from GHC.Enum -toException from GHC.Exception -toInteger from GHC.Real -toIntegralSized from Data.Bits -toList from Data.Foldable -toRational from GHC.Real -toS from Protolude.Conv -toSL from Protolude.Conv -toStrict from Data.Text.Lazy -trace from Debug -traceIO from Debug -traceId from Debug -traceM from Debug -traceShow from Debug -traceShowId from Debug -traceShowM from Debug -trans from Data.Type.Equality -transpose from Data.OldList -traverse from Data.Traversable -traverse_ from Data.Foldable -truncate from GHC.Real -try from Control.Exception.Base -tryIO from Protolude.Exceptions -tryJust from Control.Exception.Base -tryPutMVar from GHC.MVar -tryReadMVar from GHC.MVar -tryTakeMVar from GHC.MVar -typeRep from Data.Typeable -unComp1 from GHC.Generics -unK1 from GHC.Generics -unM1 from GHC.Generics -uncons from Protolude -uncurry from Data.Tuple -undefined from Debug -unfoldr from Data.OldList -uninterruptibleMask from GHC.IO -uninterruptibleMask_ from GHC.IO -unless from Control.Monad -unlessM from Protolude.Bool -unlines from Data.Text -unsnoc from Protolude -until from GHC.Base -unwords from Data.Text -unzip from GHC.List -vacuous from Data.Void -void from Data.Functor -wait from Control.Concurrent.Async -waitAny from Control.Concurrent.Async -waitAnyCancel from Control.Concurrent.Async -waitAnyCatch from Control.Concurrent.Async -waitAnyCatchCancel from Control.Concurrent.Async -waitBoth from Control.Concurrent.Async -waitCatch from Control.Concurrent.Async -waitEither from Control.Concurrent.Async -waitEitherCancel from Control.Concurrent.Async -waitEitherCatch from Control.Concurrent.Async -waitEitherCatchCancel from Control.Concurrent.Async -waitEither_ from Control.Concurrent.Async -waitQSem from Control.Concurrent.QSem -waitQSemN from Control.Concurrent.QSemN -when from GHC.Base -whenM from Protolude.Bool -withAsync from Control.Concurrent.Async -withAsyncBound from Control.Concurrent.Async -withAsyncOn from Control.Concurrent.Async -withExcept from Control.Monad.Trans.Except -withExceptT from Control.Monad.Trans.Except -withFile from System.IO -withFrozenCallStack from GHC.Stack -withMVar from Control.Concurrent.MVar -withMVarMasked from Control.Concurrent.MVar -withState from Control.Monad.Trans.State.Lazy -witness from Debug -words from Data.Text -writeChan from Control.Concurrent.Chan -writeFile from Data.Text.IO -writeList2Chan from Control.Concurrent.Chan -xor from Data.Bits -zero from Protolude.Semiring -zeroBits from Data.Bits -zip from GHC.List -zipWith from GHC.List -zipWithM from Control.Monad -zipWithM_ from Control.Monad -|| from GHC.Classes -||^ from Protolude.Bool diff --git a/src/protolude/export_lists/protolude-13.exports b/src/protolude/export_lists/protolude-13.exports deleted file mode 100644 index a1aec2593e..0000000000 --- a/src/protolude/export_lists/protolude-13.exports +++ /dev/null @@ -1,959 +0,0 @@ -$ from GHC.Base -$! from Protolude.Base -$!! from Control.DeepSeq -$> from Data.Functor -% from GHC.Real -& from Data.Function -&& from GHC.Classes -&&^ from Protolude.Bool -* from GHC.Num -** from GHC.Float -*> from GHC.Base -+ from GHC.Num -++ from GHC.Base -- from GHC.Num -. from GHC.Base -.&. from Data.Bits -.|. from Data.Bits -/ from GHC.Real -/= from GHC.Classes -:% from GHC.Real -:*: from GHC.Generics -:*: from GHC.Generics -:+ from Data.Complex -:+: from GHC.Generics -:.: from GHC.Generics -:| from GHC.Base -:~: from Data.Type.Equality -< from GHC.Classes -<$ from GHC.Base -<$!> from Control.Monad -<$> from Data.Functor -<&&> from Protolude.Bool -<&> from Data.Functor -<* from GHC.Base -<**> from GHC.Base -<*> from GHC.Base -<.> from Protolude.Semiring -<<$>> from Protolude.Functor -<<*>> from Protolude.Applicative -<= from GHC.Classes -<=< from Control.Monad -<> from GHC.Base -<|> from GHC.Base -<||> from Protolude.Bool -=<< from GHC.Base -== from GHC.Classes -== from Data.Type.Equality -> from GHC.Classes ->= from GHC.Classes ->=> from Control.Monad ->> from GHC.Base ->>= from GHC.Base -All from Data.Semigroup.Internal -All from Data.Semigroup.Internal -AllocationLimitExceeded from GHC.IO.Exception -AllocationLimitExceeded from GHC.IO.Exception -Alt from Data.Semigroup.Internal -Alt from Data.Semigroup.Internal -Alternative from GHC.Base -Any from Data.Semigroup.Internal -Any from Data.Semigroup.Internal -Ap from Data.Monoid -Ap from Data.Monoid -AppendMode from GHC.IO.IOMode -Applicative from GHC.Base -ArithException from GHC.Exception.Type -ArrayException from GHC.IO.Exception -AssertionFailed from GHC.IO.Exception -AssertionFailed from GHC.IO.Exception -Associativity from GHC.Generics -Async from Control.Concurrent.Async -AsyncException from GHC.IO.Exception -Bifunctor from Data.Bifunctor -Bits from Data.Bits -BlockedIndefinitelyOnMVar from GHC.IO.Exception -BlockedIndefinitelyOnMVar from GHC.IO.Exception -BlockedIndefinitelyOnSTM from GHC.IO.Exception -BlockedIndefinitelyOnSTM from GHC.IO.Exception -Bool from GHC.Types -Bounded from GHC.Enum -ByteString from Data.ByteString.Internal -C1 from GHC.Generics -CallStack from GHC.Stack.Types -Chan from Control.Concurrent.Chan -Char from GHC.Types -CmpNat from GHC.TypeNats -Coercible from GHC.Types -Coercion from Data.Type.Coercion -Coercion from Data.Type.Coercion -Comp1 from GHC.Generics -CompactionFailed from GHC.IO.Exception -CompactionFailed from GHC.IO.Exception -Complex from Data.Complex -Concurrently from Control.Concurrent.Async -Concurrently from Control.Concurrent.Async -Const from Data.Functor.Const -Const from Data.Functor.Const -Constraint from GHC.Types -Constructor from GHC.Generics -D# from GHC.Types -D1 from GHC.Generics -Datatype from GHC.Generics -Deadlock from GHC.IO.Exception -Deadlock from GHC.IO.Exception -Denormal from GHC.Exception.Type -DivideByZero from GHC.Exception.Type -Double from GHC.Types -Down from Data.Ord -Down from Data.Ord -Dual from Data.Semigroup.Internal -Dual from Data.Semigroup.Internal -EQ from GHC.Types -Either from Data.Either -Endo from Data.Semigroup.Internal -Endo from Data.Semigroup.Internal -Enum from GHC.Enum -Eq from GHC.Classes -ErrorCall from GHC.Exception -ErrorCall from GHC.Exception -ErrorCallWithLocation from GHC.Exception -Except from Control.Monad.Trans.Except -ExceptT from Control.Monad.Trans.Except -ExceptT from Control.Monad.Trans.Except -Exception from GHC.Exception.Type -ExitCode from GHC.IO.Exception -ExitFailure from GHC.IO.Exception -ExitSuccess from GHC.IO.Exception -F# from GHC.Types -False from GHC.Types -FatalError from Protolude.Panic -FatalError from Protolude.Panic -FilePath from GHC.IO -FiniteBits from Data.Bits -First from Data.Monoid -First from Data.Monoid -Fixity from GHC.Generics -FixityI from GHC.Generics -Float from GHC.Types -Floating from GHC.Float -Foldable from Data.Foldable -Fractional from GHC.Real -FunPtr from GHC.Ptr -Functor from GHC.Base -GT from GHC.Types -Generic from GHC.Generics -Generic1 from GHC.Generics -Handle from GHC.IO.Handle.Types -HasCallStack from GHC.Stack.Types -HasField from GHC.Records -Hashable from Data.Hashable.Class -HeapOverflow from GHC.IO.Exception -IO from GHC.Types -IOException from GHC.IO.Exception -IOMode from GHC.IO.IOMode -Identity from Data.Functor.Identity -Identity from Data.Functor.Identity -IndexOutOfBounds from GHC.IO.Exception -Infix from GHC.Generics -InfixI from GHC.Generics -Int from GHC.Types -Int16 from GHC.Int -Int32 from GHC.Int -Int64 from GHC.Int -Int8 from GHC.Int -IntMap from Data.IntMap.Internal -IntPtr from Foreign.Ptr -IntSet from Data.IntSet.Internal -Integer from GHC.Integer.Type -Integral from GHC.Real -IsLabel from GHC.OverloadedLabels -IsString from Data.String -Just from GHC.Maybe -K1 from GHC.Generics -K1 from GHC.Generics -KnownNat from GHC.TypeNats -KnownSymbol from GHC.TypeLits -L1 from GHC.Generics -LByteString from Protolude -LT from GHC.Types -LText from Protolude -Last from Data.Monoid -Last from Data.Monoid -Left from Data.Either -LeftAssociative from GHC.Generics -Leniency from Protolude.Conv -Lenient from Protolude.Conv -Location from GHC.ExecutionStack.Internal -Location from GHC.ExecutionStack.Internal -LossOfPrecision from GHC.Exception.Type -M1 from GHC.Generics -M1 from GHC.Generics -MVar from GHC.MVar -Map from Data.Map.Internal -MaskedInterruptible from GHC.IO -MaskedUninterruptible from GHC.IO -MaskingState from GHC.IO -Maybe from GHC.Maybe -Meta from GHC.Generics -MetaCons from GHC.Generics -MetaData from GHC.Generics -MetaSel from GHC.Generics -Monad from GHC.Base -MonadError from Control.Monad.Error.Class -MonadIO from Control.Monad.IO.Class -MonadPlus from GHC.Base -MonadReader from Control.Monad.Reader.Class -MonadState from Control.Monad.State.Class -Monoid from GHC.Base -NFData from Control.DeepSeq -Nat from GHC.Types -NestedAtomically from Control.Exception.Base -NestedAtomically from Control.Exception.Base -NoMethodError from Control.Exception.Base -NoMethodError from Control.Exception.Base -NonEmpty from GHC.Base -NonTermination from Control.Exception.Base -NonTermination from Control.Exception.Base -NotAssociative from GHC.Generics -Nothing from GHC.Maybe -Num from GHC.Num -OnDecodeError from Data.Text.Encoding.Error -OnError from Data.Text.Encoding.Error -Option from Data.Semigroup -Option from Data.Semigroup -Ord from GHC.Classes -Ordering from GHC.Types -Overflow from GHC.Exception.Type -PatternMatchFail from Control.Exception.Base -PatternMatchFail from Control.Exception.Base -Prefix from GHC.Generics -PrefixI from GHC.Generics -Print from Protolude.Show -Product from Data.Semigroup.Internal -Product from Data.Semigroup.Internal -Proxy from Data.Proxy -Proxy from Data.Proxy -Ptr from GHC.Ptr -QSem from Control.Concurrent.QSem -QSemN from Control.Concurrent.QSemN -R1 from GHC.Generics -Ratio from GHC.Real -RatioZeroDenominator from GHC.Exception.Type -Rational from GHC.Real -Read from GHC.Read -ReadMode from GHC.IO.IOMode -ReadWriteMode from GHC.IO.IOMode -Reader from Control.Monad.Trans.Reader -ReaderT from Control.Monad.Trans.Reader -ReaderT from Control.Monad.Trans.Reader -Real from GHC.Real -RealFloat from GHC.Float -RealFrac from GHC.Real -Rec0 from GHC.Generics -RecConError from Control.Exception.Base -RecConError from Control.Exception.Base -RecSelError from Control.Exception.Base -RecSelError from Control.Exception.Base -RecUpdError from Control.Exception.Base -RecUpdError from Control.Exception.Base -Refl from Data.Type.Equality -Rep from GHC.Generics -Right from Data.Either -RightAssociative from GHC.Generics -S1 from GHC.Generics -ST from GHC.ST -STM from GHC.Conc.Sync -Selector from GHC.Generics -Semigroup from GHC.Base -Semiring from Protolude.Semiring -Seq from Data.Sequence.Internal -Set from Data.Set.Internal -Show from GHC.Show -SomeAsyncException from GHC.IO.Exception -SomeAsyncException from GHC.IO.Exception -SomeException from GHC.Exception.Type -SomeException from GHC.Exception.Type -SomeNat from GHC.TypeNats -SomeNat from GHC.TypeNats -SomeSymbol from GHC.TypeLits -SomeSymbol from GHC.TypeLits -SrcLoc from GHC.ExecutionStack.Internal -SrcLoc from GHC.ExecutionStack.Internal -StablePtr from GHC.Stable -StackOverflow from GHC.IO.Exception -State from Control.Monad.Trans.State.Lazy -StateT from Control.Monad.Trans.State.Lazy -StateT from Control.Monad.Trans.State.Lazy -StaticPtr from GHC.StaticPtr -Storable from Foreign.Storable -Strict from Protolude.Conv -StringConv from Protolude.Conv -Sum from Data.Semigroup.Internal -Sum from Data.Semigroup.Internal -Symbol from GHC.Types -Text from Data.Text.Internal -ThreadId from GHC.Conc.Sync -ThreadKilled from GHC.IO.Exception -Traversable from Data.Traversable -True from GHC.Types -Type from GHC.Types -TypeError from Control.Exception.Base -TypeError from Control.Exception.Base -TypeRep from Data.Typeable -Typeable from Data.Typeable.Internal -U1 from GHC.Generics -U1 from GHC.Generics -URec from GHC.Generics -UndefinedElement from GHC.IO.Exception -Underflow from GHC.Exception.Type -UnicodeException from Data.Text.Encoding.Error -Unmasked from GHC.IO -UserInterrupt from GHC.IO.Exception -V1 from GHC.Generics -Void from Data.Void -Word from GHC.Types -Word16 from GHC.Word -Word32 from GHC.Word -Word64 from GHC.Word -Word8 from GHC.Word -WordPtr from Foreign.Ptr -WrappedMonoid from Data.Semigroup -WriteMode from GHC.IO.IOMode -ZipList from Control.Applicative -ZipList from Control.Applicative -^ from GHC.Real -^%^ from GHC.Real -^^ from GHC.Real -^^%^^ from GHC.Real -abs from GHC.Num -absurd from Data.Void -acos from GHC.Float -acosh from GHC.Float -addMVarFinalizer from Control.Concurrent.MVar -all from Data.Foldable -allowInterrupt from Control.Exception -and from Data.Foldable -any from Data.Foldable -ap from GHC.Base -appEndo from Data.Semigroup.Internal -appendFile from Data.Text.IO -applyN from Protolude -asTypeOf from GHC.Base -asin from GHC.Float -asinh from GHC.Float -ask from Control.Monad.Reader.Class -asks from Control.Monad.Reader.Class -asum from Data.Foldable -async from Control.Concurrent.Async -asyncBound from Control.Concurrent.Async -asyncExceptionFromException from GHC.IO.Exception -asyncExceptionToException from GHC.IO.Exception -asyncOn from Control.Concurrent.Async -asyncThreadId from Control.Concurrent.Async -atDef from Protolude.Safe -atMay from Protolude.Safe -atan from GHC.Float -atan2 from GHC.Float -atanh from GHC.Float -atomically from GHC.Conc.Sync -bimap from Data.Bifunctor -bit from Data.Bits -bitDefault from Data.Bits -bitSize from Data.Bits -bitSizeMaybe from Data.Bits -bool from Protolude.Bool -boundedEnumFrom from GHC.Enum -boundedEnumFromThen from GHC.Enum -bracket from Control.Exception.Base -bracketOnError from Control.Exception.Base -bracket_ from Control.Exception.Base -break from GHC.List -byteSwap16 from GHC.Word -byteSwap32 from GHC.Word -byteSwap64 from GHC.Word -callStack from GHC.Stack -cancel from Control.Concurrent.Async -cancelWith from Control.Concurrent.Async -cast from Data.Typeable -castWith from Data.Type.Equality -catMaybes from Data.Maybe -catch from GHC.IO -catchE from Control.Monad.Trans.Except -catchError from Control.Monad.Error.Class -catchJust from Control.Exception.Base -catchSTM from GHC.Conc.Sync -catches from Control.Exception -ceiling from GHC.Real -check from Control.Monad.STM -chr from GHC.Char -cis from Data.Complex -clearBit from Data.Bits -coerceWith from Data.Type.Coercion -compare from GHC.Classes -comparing from Data.Ord -complement from Data.Bits -complementBit from Data.Bits -conFixity from GHC.Generics -conIsRecord from GHC.Generics -conName from GHC.Generics -concat from Data.Foldable -concatMap from Data.Foldable -concatMapM from Protolude.Monad -concurrently from Control.Concurrent.Async -conjugate from Data.Complex -const from GHC.Base -cos from GHC.Float -cosh from GHC.Float -countLeadingZeros from Data.Bits -countTrailingZeros from Data.Bits -currentCallStack from GHC.Stack.CCS -curry from Data.Tuple -cycle from GHC.List -cycle1 from Data.Semigroup -datatypeName from GHC.Generics -decodeFloat from GHC.Float -decodeUtf8 from Data.Text.Encoding -decodeUtf8' from Data.Text.Encoding -decodeUtf8With from Data.Text.Encoding -deepseq from Control.DeepSeq -denominator from GHC.Real -die from Protolude -diff from Data.Semigroup -displayException from GHC.Exception.Type -div from GHC.Real -divMod from GHC.Real -divZeroError from GHC.Real -drop from GHC.List -dropWhile from GHC.List -dupChan from Control.Concurrent.Chan -either from Data.Either -eitherA from Protolude.Applicative -elem from Data.Foldable -empty from GHC.Base -encodeFloat from GHC.Float -encodeUtf8 from Data.Text.Encoding -enumFrom from GHC.Enum -enumFromThen from GHC.Enum -enumFromThenTo from GHC.Enum -enumFromTo from GHC.Enum -eqT from Data.Typeable -evalState from Control.Monad.Trans.State.Lazy -evalStateT from Control.Monad.Trans.State.Lazy -evaluate from GHC.IO -even from GHC.Real -execState from Control.Monad.Trans.State.Lazy -execStateT from Control.Monad.Trans.State.Lazy -exitFailure from System.Exit -exitSuccess from System.Exit -exitWith from System.Exit -exp from GHC.Float -expm1 from GHC.Float -exponent from GHC.Float -fatalErrorMessage from Protolude.Panic -filter from GHC.List -filterM from Control.Monad -finally from Control.Exception.Base -find from Data.Foldable -finiteBitSize from Data.Bits -first from Data.Bifunctor -fix from Data.Function -fixST from Control.Monad.ST.Imp -flip from GHC.Base -floatDigits from GHC.Float -floatRadix from GHC.Float -floatRange from GHC.Float -floor from GHC.Real -fmap from GHC.Base -fmapDefault from Data.Traversable -fold from Data.Foldable -foldM from Control.Monad -foldM_ from Control.Monad -foldMap from Data.Foldable -foldMapDefault from Data.Traversable -foldl from Data.Foldable -foldl' from Data.Foldable -foldl1May from Protolude.Safe -foldl1May' from Protolude.Safe -foldlM from Data.Foldable -foldr from Data.Foldable -foldr' from Data.Foldable -foldr1May from Protolude.Safe -foldrM from Data.Foldable -for from Data.Traversable -forM from Data.Traversable -forM_ from Data.Foldable -for_ from Data.Foldable -force from Control.DeepSeq -foreach from Protolude.Functor -forever from Control.Monad -forkFinally from Control.Concurrent -forkIO from GHC.Conc.Sync -forkIOWithUnmask from GHC.Conc.Sync -forkOS from Control.Concurrent -forkOSWithUnmask from Control.Concurrent -forkOn from GHC.Conc.Sync -forkOnWithUnmask from GHC.Conc.Sync -from from GHC.Generics -fromEnum from GHC.Enum -fromException from GHC.Exception.Type -fromInteger from GHC.Num -fromIntegral from GHC.Real -fromLabel from GHC.OverloadedLabels -fromLeft from Data.Either -fromMaybe from Data.Maybe -fromRational from GHC.Real -fromRight from Data.Either -fromStrict from Data.Text.Lazy -fst from Data.Tuple -functionName from GHC.ExecutionStack.Internal -gcastWith from Data.Type.Equality -gcd from GHC.Real -gcdInt' from GHC.Real -gcdWord' from GHC.Real -genericDrop from Data.OldList -genericLength from Data.OldList -genericReplicate from Data.OldList -genericSplitAt from Data.OldList -genericTake from Data.OldList -get from Control.Monad.State.Class -getAll from Data.Semigroup.Internal -getAlt from Data.Semigroup.Internal -getAny from Data.Semigroup.Internal -getAp from Data.Monoid -getArgs from System.Environment -getCallStack from GHC.Stack.Types -getChanContents from Control.Concurrent.Chan -getConst from Data.Functor.Const -getContents from Data.Text.IO -getDual from Data.Semigroup.Internal -getField from GHC.Records -getFirst from Data.Monoid -getLast from Data.Monoid -getLine from Data.Text.IO -getMaskingState from GHC.IO -getNumCapabilities from GHC.Conc.Sync -getOption from Data.Semigroup -getProduct from Data.Semigroup.Internal -getStackTrace from GHC.ExecutionStack -getSum from Data.Semigroup.Internal -getZipList from Control.Applicative -gets from Control.Monad.State.Class -group from Data.OldList -groupBy from Data.OldList -guard from Control.Monad -guardM from Protolude.Bool -guarded from Protolude -guardedA from Protolude -hPutStr from Protolude.Show -hPutStrLn from Protolude.Show -handle from Control.Exception.Base -handleJust from Control.Exception.Base -hash from Data.Hashable.Class -hashUsing from Data.Hashable.Class -hashWithSalt from Data.Hashable.Class -head from Protolude.List -headDef from Protolude.Safe -headMay from Protolude.Safe -hush from Protolude.Exceptions -identity from Protolude -ifM from Protolude.Bool -ignore from Data.Text.Encoding.Error -imagPart from Data.Complex -infinity from GHC.Real -initDef from Protolude.Safe -initMay from Protolude.Safe -initSafe from Protolude.Safe -inits from Data.OldList -integralEnumFrom from GHC.Real -integralEnumFromThen from GHC.Real -integralEnumFromThenTo from GHC.Real -integralEnumFromTo from GHC.Real -interact from Data.Text.IO -intercalate from Data.OldList -interruptible from GHC.IO -intersperse from Data.OldList -ioError from GHC.IO.Exception -isCurrentThreadBound from Control.Concurrent -isDenormalized from GHC.Float -isEmptyMVar from GHC.MVar -isIEEE from GHC.Float -isInfinite from GHC.Float -isJust from Data.Maybe -isLeft from Data.Either -isNaN from GHC.Float -isNegativeZero from GHC.Float -isNewtype from GHC.Generics -isNothing from Data.Maybe -isPrefixOf from Data.OldList -isRight from Data.Either -isSigned from Data.Bits -iterate from GHC.List -join from GHC.Base -killThread from GHC.Conc.Sync -lastDef from Protolude.Safe -lastMay from Protolude.Safe -lcm from GHC.Real -leftToMaybe from Protolude.Either -lefts from Data.Either -length from Data.Foldable -lenientDecode from Data.Text.Encoding.Error -lift from Control.Monad.Trans.Class -liftA from GHC.Base -liftA2 from GHC.Base -liftA3 from GHC.Base -liftAA2 from Protolude.Applicative -liftIO from Control.Monad.IO.Class -liftIO1 from Protolude -liftIO2 from Protolude -liftM from GHC.Base -liftM' from Protolude.Monad -liftM2 from GHC.Base -liftM2' from Protolude.Monad -liftM3 from GHC.Base -liftM4 from GHC.Base -liftM5 from GHC.Base -lines from Data.Text -link from Control.Concurrent.Async -link2 from Control.Concurrent.Async -list from Protolude.List -listToMaybe from Data.Maybe -local from Control.Monad.Reader.Class -log from GHC.Float -log1mexp from GHC.Float -log1p from GHC.Float -log1pexp from GHC.Float -logBase from GHC.Float -magnitude from Data.Complex -many from GHC.Base -map from Protolude -mapAccumL from Data.Traversable -mapAccumR from Data.Traversable -mapAndUnzipM from Control.Monad -mapExcept from Control.Monad.Trans.Except -mapExceptT from Control.Monad.Trans.Except -mapException from Control.Exception.Base -mapM from Data.Traversable -mapM_ from Data.Foldable -mapMaybe from Data.Maybe -mappend from GHC.Base -mask from GHC.IO -mask_ from GHC.IO -max from GHC.Classes -maxBound from GHC.Enum -maxInt from GHC.Base -maximum from Data.Foldable -maximumBy from Data.Foldable -maximumDef from Protolude.Safe -maximumMay from Protolude.Safe -maybe from Data.Maybe -maybeEmpty from Protolude.Either -maybeToEither from Protolude.Either -maybeToLeft from Protolude.Either -maybeToList from Data.Maybe -maybeToRight from Protolude.Either -mconcat from GHC.Base -mempty from GHC.Base -mfilter from Control.Monad -min from GHC.Classes -minBound from GHC.Enum -minInt from GHC.Base -minimum from Data.Foldable -minimumBy from Data.Foldable -minimumDef from Protolude.Safe -minimumMay from Protolude.Safe -mkPolar from Data.Complex -mkWeakMVar from Control.Concurrent.MVar -mkWeakThreadId from GHC.Conc.Sync -mod from GHC.Real -modify from Control.Monad.State.Class -modifyMVar from Control.Concurrent.MVar -modifyMVarMasked from Control.Concurrent.MVar -modifyMVarMasked_ from Control.Concurrent.MVar -modifyMVar_ from Control.Concurrent.MVar -moduleName from GHC.Generics -mplus from GHC.Base -msum from Data.Foldable -mtimesDefault from Data.Semigroup -myThreadId from GHC.Conc.Sync -mzero from GHC.Base -natVal from GHC.TypeLits -negate from GHC.Num -newChan from Control.Concurrent.Chan -newEmptyMVar from GHC.MVar -newMVar from GHC.MVar -newQSem from Control.Concurrent.QSem -newQSemN from Control.Concurrent.QSemN -nonEmpty from Data.List.NonEmpty -not from GHC.Classes -notANumber from GHC.Real -notElem from Data.Foldable -notImplemented from Debug -note from Protolude.Exceptions -null from Data.Foldable -numerator from GHC.Real -numericEnumFrom from GHC.Real -numericEnumFromThen from GHC.Real -numericEnumFromThenTo from GHC.Real -numericEnumFromTo from GHC.Real -objectName from GHC.ExecutionStack.Internal -odd from GHC.Real -on from Data.Function -onException from Control.Exception.Base -one from Protolude.Semiring -openFile from GHC.IO.Handle.FD -option from Data.Semigroup -optional from Control.Applicative -or from Data.Foldable -orAlt from Protolude.Applicative -orElse from GHC.Conc.Sync -orEmpty from Protolude.Applicative -ord from GHC.Base -ordNub from Protolude.List -otherwise from GHC.Base -overflowError from GHC.Real -packageName from GHC.Generics -panic from Protolude.Panic -partitionEithers from Data.Either -pass from Protolude -permutations from Data.OldList -phase from Data.Complex -pi from GHC.Float -polar from Data.Complex -poll from Control.Concurrent.Async -popCount from Data.Bits -popCountDefault from Data.Bits -pred from GHC.Enum -prettyCallStack from GHC.Exception -prettySrcLoc from GHC.Exception -print from Protolude -product from Protolude.List -properFraction from GHC.Real -pure from GHC.Base -purer from Protolude.Applicative -put from Control.Monad.State.Class -putByteString from Protolude.Show -putErrLn from Protolude.Show -putErrText from Protolude.Show -putLByteString from Protolude.Show -putLText from Protolude.Show -putMVar from GHC.MVar -putStr from Protolude.Show -putStrLn from Protolude.Show -putText from Protolude.Show -quot from GHC.Real -quotRem from GHC.Real -race from Control.Concurrent.Async -race_ from Control.Concurrent.Async -ratioPrec from GHC.Real -ratioPrec1 from GHC.Real -ratioZeroDenominatorError from GHC.Real -readChan from Control.Concurrent.Chan -readEither from Protolude -readFile from Data.Text.IO -readMVar from GHC.MVar -readMaybe from Protolude -reader from Control.Monad.Reader.Class -reads from Text.Read -realPart from Data.Complex -realToFrac from GHC.Real -recip from GHC.Real -reduce from GHC.Real -rem from GHC.Real -repeat from GHC.List -replace from Data.Text.Encoding.Error -replicate from GHC.List -replicateM from Control.Monad -replicateM_ from Control.Monad -repr from Data.Type.Coercion -retry from GHC.Conc.Sync -return from GHC.Base -reverse from GHC.List -rightToMaybe from Protolude.Either -rights from Data.Either -rnf from Control.DeepSeq -rotate from Data.Bits -rotateL from Data.Bits -rotateR from Data.Bits -round from GHC.Real -rtsSupportsBoundThreads from Control.Concurrent -runConcurrently from Control.Concurrent.Async -runExcept from Control.Monad.Trans.Except -runExceptT from Control.Monad.Trans.Except -runIdentity from Data.Functor.Identity -runInBoundThread from Control.Concurrent -runInUnboundThread from Control.Concurrent -runReader from Control.Monad.Trans.Reader -runReaderT from Control.Monad.Trans.Reader -runST from GHC.ST -runState from Control.Monad.Trans.State.Lazy -runStateT from Control.Monad.Trans.State.Lazy -scaleFloat from GHC.Float -scanl from GHC.List -scanl' from GHC.List -scanr from GHC.List -sconcat from GHC.Base -second from Data.Bifunctor -selDecidedStrictness from GHC.Generics -selName from GHC.Generics -selSourceStrictness from GHC.Generics -selSourceUnpackedness from GHC.Generics -seq from GHC.Prim -sequence from Data.Traversable -sequenceA from Data.Traversable -sequenceA_ from Data.Foldable -sequence_ from Data.Foldable -setBit from Data.Bits -setNumCapabilities from GHC.Conc.Sync -shift from Data.Bits -shiftL from Data.Bits -shiftR from Data.Bits -show from Protolude -showStackTrace from GHC.ExecutionStack -signalQSem from Control.Concurrent.QSem -signalQSemN from Control.Concurrent.QSemN -significand from GHC.Float -signum from GHC.Num -sin from GHC.Float -sinh from GHC.Float -snd from Data.Tuple -some from GHC.Base -someNatVal from GHC.TypeLits -someSymbolVal from GHC.TypeLits -sort from Data.OldList -sortBy from Data.OldList -sortOn from Protolude.List -sourceColumn from GHC.ExecutionStack.Internal -sourceFile from GHC.ExecutionStack.Internal -sourceLine from GHC.ExecutionStack.Internal -splitAt from GHC.List -sqrt from GHC.Float -srcLoc from GHC.ExecutionStack.Internal -state from Control.Monad.State.Class -stderr from GHC.IO.Handle.FD -stdin from GHC.IO.Handle.FD -stdout from GHC.IO.Handle.FD -stimes from GHC.Base -stimesIdempotent from Data.Semigroup.Internal -stimesIdempotentMonoid from Data.Semigroup.Internal -stimesMonoid from Data.Semigroup.Internal -strConv from Protolude.Conv -strictDecode from Data.Text.Encoding.Error -subsequences from Data.OldList -subtract from GHC.Num -succ from GHC.Enum -sum from Protolude.List -swap from Data.Tuple -swapMVar from Control.Concurrent.MVar -sym from Data.Type.Equality -symbolVal from GHC.TypeLits -tailDef from Protolude.Safe -tailMay from Protolude.Safe -tailSafe from Protolude.Safe -tails from Data.OldList -take from GHC.List -takeMVar from GHC.MVar -takeWhile from GHC.List -tan from GHC.Float -tanh from GHC.Float -testBit from Data.Bits -testBitDefault from Data.Bits -threadCapability from GHC.Conc.Sync -threadDelay from GHC.Conc.IO -threadWaitRead from Control.Concurrent -threadWaitReadSTM from Control.Concurrent -threadWaitWrite from Control.Concurrent -threadWaitWriteSTM from Control.Concurrent -throwE from Control.Monad.Trans.Except -throwError from Control.Monad.Error.Class -throwIO from Protolude -throwSTM from GHC.Conc.Sync -throwTo from Protolude -to from GHC.Generics -toEnum from GHC.Enum -toException from GHC.Exception.Type -toInteger from GHC.Real -toIntegralSized from Data.Bits -toList from Data.Foldable -toRational from GHC.Real -toS from Protolude.Conv -toSL from Protolude.Conv -toStrict from Data.Text.Lazy -trace from Debug -traceIO from Debug -traceId from Debug -traceM from Debug -traceShow from Debug -traceShowId from Debug -traceShowM from Debug -trans from Data.Type.Equality -transpose from Data.OldList -traverse from Data.Traversable -traverse_ from Data.Foldable -truncate from GHC.Real -try from Control.Exception.Base -tryIO from Protolude.Exceptions -tryJust from Control.Exception.Base -tryPutMVar from GHC.MVar -tryReadMVar from GHC.MVar -tryTakeMVar from GHC.MVar -typeRep from Data.Typeable -unComp1 from GHC.Generics -unK1 from GHC.Generics -unM1 from GHC.Generics -uncons from Protolude -uncurry from Data.Tuple -undefined from Debug -underflowError from GHC.Real -unfoldr from Data.OldList -uninterruptibleMask from GHC.IO -uninterruptibleMask_ from GHC.IO -unless from Control.Monad -unlessM from Protolude.Bool -unlines from Data.Text -unsnoc from Protolude -until from GHC.Base -unwords from Data.Text -unzip from GHC.List -vacuous from Data.Void -void from Data.Functor -wait from Control.Concurrent.Async -waitAny from Control.Concurrent.Async -waitAnyCancel from Control.Concurrent.Async -waitAnyCatch from Control.Concurrent.Async -waitAnyCatchCancel from Control.Concurrent.Async -waitBoth from Control.Concurrent.Async -waitCatch from Control.Concurrent.Async -waitEither from Control.Concurrent.Async -waitEitherCancel from Control.Concurrent.Async -waitEitherCatch from Control.Concurrent.Async -waitEitherCatchCancel from Control.Concurrent.Async -waitEither_ from Control.Concurrent.Async -waitQSem from Control.Concurrent.QSem -waitQSemN from Control.Concurrent.QSemN -when from GHC.Base -whenM from Protolude.Bool -withAsync from Control.Concurrent.Async -withAsyncBound from Control.Concurrent.Async -withAsyncOn from Control.Concurrent.Async -withExcept from Control.Monad.Trans.Except -withExceptT from Control.Monad.Trans.Except -withFile from System.IO -withFrozenCallStack from GHC.Stack -withMVar from Control.Concurrent.MVar -withMVarMasked from Control.Concurrent.MVar -withState from Control.Monad.Trans.State.Lazy -witness from Debug -words from Data.Text -writeChan from Control.Concurrent.Chan -writeFile from Data.Text.IO -writeList2Chan from Control.Concurrent.Chan -xor from Data.Bits -zero from Protolude.Semiring -zeroBits from Data.Bits -zip from GHC.List -zipWith from GHC.List -zipWithM from Control.Monad -zipWithM_ from Control.Monad -|| from GHC.Classes -||^ from Protolude.Bool diff --git a/src/protolude/export_lists/protolude-14.exports b/src/protolude/export_lists/protolude-14.exports deleted file mode 100644 index a1aec2593e..0000000000 --- a/src/protolude/export_lists/protolude-14.exports +++ /dev/null @@ -1,959 +0,0 @@ -$ from GHC.Base -$! from Protolude.Base -$!! from Control.DeepSeq -$> from Data.Functor -% from GHC.Real -& from Data.Function -&& from GHC.Classes -&&^ from Protolude.Bool -* from GHC.Num -** from GHC.Float -*> from GHC.Base -+ from GHC.Num -++ from GHC.Base -- from GHC.Num -. from GHC.Base -.&. from Data.Bits -.|. from Data.Bits -/ from GHC.Real -/= from GHC.Classes -:% from GHC.Real -:*: from GHC.Generics -:*: from GHC.Generics -:+ from Data.Complex -:+: from GHC.Generics -:.: from GHC.Generics -:| from GHC.Base -:~: from Data.Type.Equality -< from GHC.Classes -<$ from GHC.Base -<$!> from Control.Monad -<$> from Data.Functor -<&&> from Protolude.Bool -<&> from Data.Functor -<* from GHC.Base -<**> from GHC.Base -<*> from GHC.Base -<.> from Protolude.Semiring -<<$>> from Protolude.Functor -<<*>> from Protolude.Applicative -<= from GHC.Classes -<=< from Control.Monad -<> from GHC.Base -<|> from GHC.Base -<||> from Protolude.Bool -=<< from GHC.Base -== from GHC.Classes -== from Data.Type.Equality -> from GHC.Classes ->= from GHC.Classes ->=> from Control.Monad ->> from GHC.Base ->>= from GHC.Base -All from Data.Semigroup.Internal -All from Data.Semigroup.Internal -AllocationLimitExceeded from GHC.IO.Exception -AllocationLimitExceeded from GHC.IO.Exception -Alt from Data.Semigroup.Internal -Alt from Data.Semigroup.Internal -Alternative from GHC.Base -Any from Data.Semigroup.Internal -Any from Data.Semigroup.Internal -Ap from Data.Monoid -Ap from Data.Monoid -AppendMode from GHC.IO.IOMode -Applicative from GHC.Base -ArithException from GHC.Exception.Type -ArrayException from GHC.IO.Exception -AssertionFailed from GHC.IO.Exception -AssertionFailed from GHC.IO.Exception -Associativity from GHC.Generics -Async from Control.Concurrent.Async -AsyncException from GHC.IO.Exception -Bifunctor from Data.Bifunctor -Bits from Data.Bits -BlockedIndefinitelyOnMVar from GHC.IO.Exception -BlockedIndefinitelyOnMVar from GHC.IO.Exception -BlockedIndefinitelyOnSTM from GHC.IO.Exception -BlockedIndefinitelyOnSTM from GHC.IO.Exception -Bool from GHC.Types -Bounded from GHC.Enum -ByteString from Data.ByteString.Internal -C1 from GHC.Generics -CallStack from GHC.Stack.Types -Chan from Control.Concurrent.Chan -Char from GHC.Types -CmpNat from GHC.TypeNats -Coercible from GHC.Types -Coercion from Data.Type.Coercion -Coercion from Data.Type.Coercion -Comp1 from GHC.Generics -CompactionFailed from GHC.IO.Exception -CompactionFailed from GHC.IO.Exception -Complex from Data.Complex -Concurrently from Control.Concurrent.Async -Concurrently from Control.Concurrent.Async -Const from Data.Functor.Const -Const from Data.Functor.Const -Constraint from GHC.Types -Constructor from GHC.Generics -D# from GHC.Types -D1 from GHC.Generics -Datatype from GHC.Generics -Deadlock from GHC.IO.Exception -Deadlock from GHC.IO.Exception -Denormal from GHC.Exception.Type -DivideByZero from GHC.Exception.Type -Double from GHC.Types -Down from Data.Ord -Down from Data.Ord -Dual from Data.Semigroup.Internal -Dual from Data.Semigroup.Internal -EQ from GHC.Types -Either from Data.Either -Endo from Data.Semigroup.Internal -Endo from Data.Semigroup.Internal -Enum from GHC.Enum -Eq from GHC.Classes -ErrorCall from GHC.Exception -ErrorCall from GHC.Exception -ErrorCallWithLocation from GHC.Exception -Except from Control.Monad.Trans.Except -ExceptT from Control.Monad.Trans.Except -ExceptT from Control.Monad.Trans.Except -Exception from GHC.Exception.Type -ExitCode from GHC.IO.Exception -ExitFailure from GHC.IO.Exception -ExitSuccess from GHC.IO.Exception -F# from GHC.Types -False from GHC.Types -FatalError from Protolude.Panic -FatalError from Protolude.Panic -FilePath from GHC.IO -FiniteBits from Data.Bits -First from Data.Monoid -First from Data.Monoid -Fixity from GHC.Generics -FixityI from GHC.Generics -Float from GHC.Types -Floating from GHC.Float -Foldable from Data.Foldable -Fractional from GHC.Real -FunPtr from GHC.Ptr -Functor from GHC.Base -GT from GHC.Types -Generic from GHC.Generics -Generic1 from GHC.Generics -Handle from GHC.IO.Handle.Types -HasCallStack from GHC.Stack.Types -HasField from GHC.Records -Hashable from Data.Hashable.Class -HeapOverflow from GHC.IO.Exception -IO from GHC.Types -IOException from GHC.IO.Exception -IOMode from GHC.IO.IOMode -Identity from Data.Functor.Identity -Identity from Data.Functor.Identity -IndexOutOfBounds from GHC.IO.Exception -Infix from GHC.Generics -InfixI from GHC.Generics -Int from GHC.Types -Int16 from GHC.Int -Int32 from GHC.Int -Int64 from GHC.Int -Int8 from GHC.Int -IntMap from Data.IntMap.Internal -IntPtr from Foreign.Ptr -IntSet from Data.IntSet.Internal -Integer from GHC.Integer.Type -Integral from GHC.Real -IsLabel from GHC.OverloadedLabels -IsString from Data.String -Just from GHC.Maybe -K1 from GHC.Generics -K1 from GHC.Generics -KnownNat from GHC.TypeNats -KnownSymbol from GHC.TypeLits -L1 from GHC.Generics -LByteString from Protolude -LT from GHC.Types -LText from Protolude -Last from Data.Monoid -Last from Data.Monoid -Left from Data.Either -LeftAssociative from GHC.Generics -Leniency from Protolude.Conv -Lenient from Protolude.Conv -Location from GHC.ExecutionStack.Internal -Location from GHC.ExecutionStack.Internal -LossOfPrecision from GHC.Exception.Type -M1 from GHC.Generics -M1 from GHC.Generics -MVar from GHC.MVar -Map from Data.Map.Internal -MaskedInterruptible from GHC.IO -MaskedUninterruptible from GHC.IO -MaskingState from GHC.IO -Maybe from GHC.Maybe -Meta from GHC.Generics -MetaCons from GHC.Generics -MetaData from GHC.Generics -MetaSel from GHC.Generics -Monad from GHC.Base -MonadError from Control.Monad.Error.Class -MonadIO from Control.Monad.IO.Class -MonadPlus from GHC.Base -MonadReader from Control.Monad.Reader.Class -MonadState from Control.Monad.State.Class -Monoid from GHC.Base -NFData from Control.DeepSeq -Nat from GHC.Types -NestedAtomically from Control.Exception.Base -NestedAtomically from Control.Exception.Base -NoMethodError from Control.Exception.Base -NoMethodError from Control.Exception.Base -NonEmpty from GHC.Base -NonTermination from Control.Exception.Base -NonTermination from Control.Exception.Base -NotAssociative from GHC.Generics -Nothing from GHC.Maybe -Num from GHC.Num -OnDecodeError from Data.Text.Encoding.Error -OnError from Data.Text.Encoding.Error -Option from Data.Semigroup -Option from Data.Semigroup -Ord from GHC.Classes -Ordering from GHC.Types -Overflow from GHC.Exception.Type -PatternMatchFail from Control.Exception.Base -PatternMatchFail from Control.Exception.Base -Prefix from GHC.Generics -PrefixI from GHC.Generics -Print from Protolude.Show -Product from Data.Semigroup.Internal -Product from Data.Semigroup.Internal -Proxy from Data.Proxy -Proxy from Data.Proxy -Ptr from GHC.Ptr -QSem from Control.Concurrent.QSem -QSemN from Control.Concurrent.QSemN -R1 from GHC.Generics -Ratio from GHC.Real -RatioZeroDenominator from GHC.Exception.Type -Rational from GHC.Real -Read from GHC.Read -ReadMode from GHC.IO.IOMode -ReadWriteMode from GHC.IO.IOMode -Reader from Control.Monad.Trans.Reader -ReaderT from Control.Monad.Trans.Reader -ReaderT from Control.Monad.Trans.Reader -Real from GHC.Real -RealFloat from GHC.Float -RealFrac from GHC.Real -Rec0 from GHC.Generics -RecConError from Control.Exception.Base -RecConError from Control.Exception.Base -RecSelError from Control.Exception.Base -RecSelError from Control.Exception.Base -RecUpdError from Control.Exception.Base -RecUpdError from Control.Exception.Base -Refl from Data.Type.Equality -Rep from GHC.Generics -Right from Data.Either -RightAssociative from GHC.Generics -S1 from GHC.Generics -ST from GHC.ST -STM from GHC.Conc.Sync -Selector from GHC.Generics -Semigroup from GHC.Base -Semiring from Protolude.Semiring -Seq from Data.Sequence.Internal -Set from Data.Set.Internal -Show from GHC.Show -SomeAsyncException from GHC.IO.Exception -SomeAsyncException from GHC.IO.Exception -SomeException from GHC.Exception.Type -SomeException from GHC.Exception.Type -SomeNat from GHC.TypeNats -SomeNat from GHC.TypeNats -SomeSymbol from GHC.TypeLits -SomeSymbol from GHC.TypeLits -SrcLoc from GHC.ExecutionStack.Internal -SrcLoc from GHC.ExecutionStack.Internal -StablePtr from GHC.Stable -StackOverflow from GHC.IO.Exception -State from Control.Monad.Trans.State.Lazy -StateT from Control.Monad.Trans.State.Lazy -StateT from Control.Monad.Trans.State.Lazy -StaticPtr from GHC.StaticPtr -Storable from Foreign.Storable -Strict from Protolude.Conv -StringConv from Protolude.Conv -Sum from Data.Semigroup.Internal -Sum from Data.Semigroup.Internal -Symbol from GHC.Types -Text from Data.Text.Internal -ThreadId from GHC.Conc.Sync -ThreadKilled from GHC.IO.Exception -Traversable from Data.Traversable -True from GHC.Types -Type from GHC.Types -TypeError from Control.Exception.Base -TypeError from Control.Exception.Base -TypeRep from Data.Typeable -Typeable from Data.Typeable.Internal -U1 from GHC.Generics -U1 from GHC.Generics -URec from GHC.Generics -UndefinedElement from GHC.IO.Exception -Underflow from GHC.Exception.Type -UnicodeException from Data.Text.Encoding.Error -Unmasked from GHC.IO -UserInterrupt from GHC.IO.Exception -V1 from GHC.Generics -Void from Data.Void -Word from GHC.Types -Word16 from GHC.Word -Word32 from GHC.Word -Word64 from GHC.Word -Word8 from GHC.Word -WordPtr from Foreign.Ptr -WrappedMonoid from Data.Semigroup -WriteMode from GHC.IO.IOMode -ZipList from Control.Applicative -ZipList from Control.Applicative -^ from GHC.Real -^%^ from GHC.Real -^^ from GHC.Real -^^%^^ from GHC.Real -abs from GHC.Num -absurd from Data.Void -acos from GHC.Float -acosh from GHC.Float -addMVarFinalizer from Control.Concurrent.MVar -all from Data.Foldable -allowInterrupt from Control.Exception -and from Data.Foldable -any from Data.Foldable -ap from GHC.Base -appEndo from Data.Semigroup.Internal -appendFile from Data.Text.IO -applyN from Protolude -asTypeOf from GHC.Base -asin from GHC.Float -asinh from GHC.Float -ask from Control.Monad.Reader.Class -asks from Control.Monad.Reader.Class -asum from Data.Foldable -async from Control.Concurrent.Async -asyncBound from Control.Concurrent.Async -asyncExceptionFromException from GHC.IO.Exception -asyncExceptionToException from GHC.IO.Exception -asyncOn from Control.Concurrent.Async -asyncThreadId from Control.Concurrent.Async -atDef from Protolude.Safe -atMay from Protolude.Safe -atan from GHC.Float -atan2 from GHC.Float -atanh from GHC.Float -atomically from GHC.Conc.Sync -bimap from Data.Bifunctor -bit from Data.Bits -bitDefault from Data.Bits -bitSize from Data.Bits -bitSizeMaybe from Data.Bits -bool from Protolude.Bool -boundedEnumFrom from GHC.Enum -boundedEnumFromThen from GHC.Enum -bracket from Control.Exception.Base -bracketOnError from Control.Exception.Base -bracket_ from Control.Exception.Base -break from GHC.List -byteSwap16 from GHC.Word -byteSwap32 from GHC.Word -byteSwap64 from GHC.Word -callStack from GHC.Stack -cancel from Control.Concurrent.Async -cancelWith from Control.Concurrent.Async -cast from Data.Typeable -castWith from Data.Type.Equality -catMaybes from Data.Maybe -catch from GHC.IO -catchE from Control.Monad.Trans.Except -catchError from Control.Monad.Error.Class -catchJust from Control.Exception.Base -catchSTM from GHC.Conc.Sync -catches from Control.Exception -ceiling from GHC.Real -check from Control.Monad.STM -chr from GHC.Char -cis from Data.Complex -clearBit from Data.Bits -coerceWith from Data.Type.Coercion -compare from GHC.Classes -comparing from Data.Ord -complement from Data.Bits -complementBit from Data.Bits -conFixity from GHC.Generics -conIsRecord from GHC.Generics -conName from GHC.Generics -concat from Data.Foldable -concatMap from Data.Foldable -concatMapM from Protolude.Monad -concurrently from Control.Concurrent.Async -conjugate from Data.Complex -const from GHC.Base -cos from GHC.Float -cosh from GHC.Float -countLeadingZeros from Data.Bits -countTrailingZeros from Data.Bits -currentCallStack from GHC.Stack.CCS -curry from Data.Tuple -cycle from GHC.List -cycle1 from Data.Semigroup -datatypeName from GHC.Generics -decodeFloat from GHC.Float -decodeUtf8 from Data.Text.Encoding -decodeUtf8' from Data.Text.Encoding -decodeUtf8With from Data.Text.Encoding -deepseq from Control.DeepSeq -denominator from GHC.Real -die from Protolude -diff from Data.Semigroup -displayException from GHC.Exception.Type -div from GHC.Real -divMod from GHC.Real -divZeroError from GHC.Real -drop from GHC.List -dropWhile from GHC.List -dupChan from Control.Concurrent.Chan -either from Data.Either -eitherA from Protolude.Applicative -elem from Data.Foldable -empty from GHC.Base -encodeFloat from GHC.Float -encodeUtf8 from Data.Text.Encoding -enumFrom from GHC.Enum -enumFromThen from GHC.Enum -enumFromThenTo from GHC.Enum -enumFromTo from GHC.Enum -eqT from Data.Typeable -evalState from Control.Monad.Trans.State.Lazy -evalStateT from Control.Monad.Trans.State.Lazy -evaluate from GHC.IO -even from GHC.Real -execState from Control.Monad.Trans.State.Lazy -execStateT from Control.Monad.Trans.State.Lazy -exitFailure from System.Exit -exitSuccess from System.Exit -exitWith from System.Exit -exp from GHC.Float -expm1 from GHC.Float -exponent from GHC.Float -fatalErrorMessage from Protolude.Panic -filter from GHC.List -filterM from Control.Monad -finally from Control.Exception.Base -find from Data.Foldable -finiteBitSize from Data.Bits -first from Data.Bifunctor -fix from Data.Function -fixST from Control.Monad.ST.Imp -flip from GHC.Base -floatDigits from GHC.Float -floatRadix from GHC.Float -floatRange from GHC.Float -floor from GHC.Real -fmap from GHC.Base -fmapDefault from Data.Traversable -fold from Data.Foldable -foldM from Control.Monad -foldM_ from Control.Monad -foldMap from Data.Foldable -foldMapDefault from Data.Traversable -foldl from Data.Foldable -foldl' from Data.Foldable -foldl1May from Protolude.Safe -foldl1May' from Protolude.Safe -foldlM from Data.Foldable -foldr from Data.Foldable -foldr' from Data.Foldable -foldr1May from Protolude.Safe -foldrM from Data.Foldable -for from Data.Traversable -forM from Data.Traversable -forM_ from Data.Foldable -for_ from Data.Foldable -force from Control.DeepSeq -foreach from Protolude.Functor -forever from Control.Monad -forkFinally from Control.Concurrent -forkIO from GHC.Conc.Sync -forkIOWithUnmask from GHC.Conc.Sync -forkOS from Control.Concurrent -forkOSWithUnmask from Control.Concurrent -forkOn from GHC.Conc.Sync -forkOnWithUnmask from GHC.Conc.Sync -from from GHC.Generics -fromEnum from GHC.Enum -fromException from GHC.Exception.Type -fromInteger from GHC.Num -fromIntegral from GHC.Real -fromLabel from GHC.OverloadedLabels -fromLeft from Data.Either -fromMaybe from Data.Maybe -fromRational from GHC.Real -fromRight from Data.Either -fromStrict from Data.Text.Lazy -fst from Data.Tuple -functionName from GHC.ExecutionStack.Internal -gcastWith from Data.Type.Equality -gcd from GHC.Real -gcdInt' from GHC.Real -gcdWord' from GHC.Real -genericDrop from Data.OldList -genericLength from Data.OldList -genericReplicate from Data.OldList -genericSplitAt from Data.OldList -genericTake from Data.OldList -get from Control.Monad.State.Class -getAll from Data.Semigroup.Internal -getAlt from Data.Semigroup.Internal -getAny from Data.Semigroup.Internal -getAp from Data.Monoid -getArgs from System.Environment -getCallStack from GHC.Stack.Types -getChanContents from Control.Concurrent.Chan -getConst from Data.Functor.Const -getContents from Data.Text.IO -getDual from Data.Semigroup.Internal -getField from GHC.Records -getFirst from Data.Monoid -getLast from Data.Monoid -getLine from Data.Text.IO -getMaskingState from GHC.IO -getNumCapabilities from GHC.Conc.Sync -getOption from Data.Semigroup -getProduct from Data.Semigroup.Internal -getStackTrace from GHC.ExecutionStack -getSum from Data.Semigroup.Internal -getZipList from Control.Applicative -gets from Control.Monad.State.Class -group from Data.OldList -groupBy from Data.OldList -guard from Control.Monad -guardM from Protolude.Bool -guarded from Protolude -guardedA from Protolude -hPutStr from Protolude.Show -hPutStrLn from Protolude.Show -handle from Control.Exception.Base -handleJust from Control.Exception.Base -hash from Data.Hashable.Class -hashUsing from Data.Hashable.Class -hashWithSalt from Data.Hashable.Class -head from Protolude.List -headDef from Protolude.Safe -headMay from Protolude.Safe -hush from Protolude.Exceptions -identity from Protolude -ifM from Protolude.Bool -ignore from Data.Text.Encoding.Error -imagPart from Data.Complex -infinity from GHC.Real -initDef from Protolude.Safe -initMay from Protolude.Safe -initSafe from Protolude.Safe -inits from Data.OldList -integralEnumFrom from GHC.Real -integralEnumFromThen from GHC.Real -integralEnumFromThenTo from GHC.Real -integralEnumFromTo from GHC.Real -interact from Data.Text.IO -intercalate from Data.OldList -interruptible from GHC.IO -intersperse from Data.OldList -ioError from GHC.IO.Exception -isCurrentThreadBound from Control.Concurrent -isDenormalized from GHC.Float -isEmptyMVar from GHC.MVar -isIEEE from GHC.Float -isInfinite from GHC.Float -isJust from Data.Maybe -isLeft from Data.Either -isNaN from GHC.Float -isNegativeZero from GHC.Float -isNewtype from GHC.Generics -isNothing from Data.Maybe -isPrefixOf from Data.OldList -isRight from Data.Either -isSigned from Data.Bits -iterate from GHC.List -join from GHC.Base -killThread from GHC.Conc.Sync -lastDef from Protolude.Safe -lastMay from Protolude.Safe -lcm from GHC.Real -leftToMaybe from Protolude.Either -lefts from Data.Either -length from Data.Foldable -lenientDecode from Data.Text.Encoding.Error -lift from Control.Monad.Trans.Class -liftA from GHC.Base -liftA2 from GHC.Base -liftA3 from GHC.Base -liftAA2 from Protolude.Applicative -liftIO from Control.Monad.IO.Class -liftIO1 from Protolude -liftIO2 from Protolude -liftM from GHC.Base -liftM' from Protolude.Monad -liftM2 from GHC.Base -liftM2' from Protolude.Monad -liftM3 from GHC.Base -liftM4 from GHC.Base -liftM5 from GHC.Base -lines from Data.Text -link from Control.Concurrent.Async -link2 from Control.Concurrent.Async -list from Protolude.List -listToMaybe from Data.Maybe -local from Control.Monad.Reader.Class -log from GHC.Float -log1mexp from GHC.Float -log1p from GHC.Float -log1pexp from GHC.Float -logBase from GHC.Float -magnitude from Data.Complex -many from GHC.Base -map from Protolude -mapAccumL from Data.Traversable -mapAccumR from Data.Traversable -mapAndUnzipM from Control.Monad -mapExcept from Control.Monad.Trans.Except -mapExceptT from Control.Monad.Trans.Except -mapException from Control.Exception.Base -mapM from Data.Traversable -mapM_ from Data.Foldable -mapMaybe from Data.Maybe -mappend from GHC.Base -mask from GHC.IO -mask_ from GHC.IO -max from GHC.Classes -maxBound from GHC.Enum -maxInt from GHC.Base -maximum from Data.Foldable -maximumBy from Data.Foldable -maximumDef from Protolude.Safe -maximumMay from Protolude.Safe -maybe from Data.Maybe -maybeEmpty from Protolude.Either -maybeToEither from Protolude.Either -maybeToLeft from Protolude.Either -maybeToList from Data.Maybe -maybeToRight from Protolude.Either -mconcat from GHC.Base -mempty from GHC.Base -mfilter from Control.Monad -min from GHC.Classes -minBound from GHC.Enum -minInt from GHC.Base -minimum from Data.Foldable -minimumBy from Data.Foldable -minimumDef from Protolude.Safe -minimumMay from Protolude.Safe -mkPolar from Data.Complex -mkWeakMVar from Control.Concurrent.MVar -mkWeakThreadId from GHC.Conc.Sync -mod from GHC.Real -modify from Control.Monad.State.Class -modifyMVar from Control.Concurrent.MVar -modifyMVarMasked from Control.Concurrent.MVar -modifyMVarMasked_ from Control.Concurrent.MVar -modifyMVar_ from Control.Concurrent.MVar -moduleName from GHC.Generics -mplus from GHC.Base -msum from Data.Foldable -mtimesDefault from Data.Semigroup -myThreadId from GHC.Conc.Sync -mzero from GHC.Base -natVal from GHC.TypeLits -negate from GHC.Num -newChan from Control.Concurrent.Chan -newEmptyMVar from GHC.MVar -newMVar from GHC.MVar -newQSem from Control.Concurrent.QSem -newQSemN from Control.Concurrent.QSemN -nonEmpty from Data.List.NonEmpty -not from GHC.Classes -notANumber from GHC.Real -notElem from Data.Foldable -notImplemented from Debug -note from Protolude.Exceptions -null from Data.Foldable -numerator from GHC.Real -numericEnumFrom from GHC.Real -numericEnumFromThen from GHC.Real -numericEnumFromThenTo from GHC.Real -numericEnumFromTo from GHC.Real -objectName from GHC.ExecutionStack.Internal -odd from GHC.Real -on from Data.Function -onException from Control.Exception.Base -one from Protolude.Semiring -openFile from GHC.IO.Handle.FD -option from Data.Semigroup -optional from Control.Applicative -or from Data.Foldable -orAlt from Protolude.Applicative -orElse from GHC.Conc.Sync -orEmpty from Protolude.Applicative -ord from GHC.Base -ordNub from Protolude.List -otherwise from GHC.Base -overflowError from GHC.Real -packageName from GHC.Generics -panic from Protolude.Panic -partitionEithers from Data.Either -pass from Protolude -permutations from Data.OldList -phase from Data.Complex -pi from GHC.Float -polar from Data.Complex -poll from Control.Concurrent.Async -popCount from Data.Bits -popCountDefault from Data.Bits -pred from GHC.Enum -prettyCallStack from GHC.Exception -prettySrcLoc from GHC.Exception -print from Protolude -product from Protolude.List -properFraction from GHC.Real -pure from GHC.Base -purer from Protolude.Applicative -put from Control.Monad.State.Class -putByteString from Protolude.Show -putErrLn from Protolude.Show -putErrText from Protolude.Show -putLByteString from Protolude.Show -putLText from Protolude.Show -putMVar from GHC.MVar -putStr from Protolude.Show -putStrLn from Protolude.Show -putText from Protolude.Show -quot from GHC.Real -quotRem from GHC.Real -race from Control.Concurrent.Async -race_ from Control.Concurrent.Async -ratioPrec from GHC.Real -ratioPrec1 from GHC.Real -ratioZeroDenominatorError from GHC.Real -readChan from Control.Concurrent.Chan -readEither from Protolude -readFile from Data.Text.IO -readMVar from GHC.MVar -readMaybe from Protolude -reader from Control.Monad.Reader.Class -reads from Text.Read -realPart from Data.Complex -realToFrac from GHC.Real -recip from GHC.Real -reduce from GHC.Real -rem from GHC.Real -repeat from GHC.List -replace from Data.Text.Encoding.Error -replicate from GHC.List -replicateM from Control.Monad -replicateM_ from Control.Monad -repr from Data.Type.Coercion -retry from GHC.Conc.Sync -return from GHC.Base -reverse from GHC.List -rightToMaybe from Protolude.Either -rights from Data.Either -rnf from Control.DeepSeq -rotate from Data.Bits -rotateL from Data.Bits -rotateR from Data.Bits -round from GHC.Real -rtsSupportsBoundThreads from Control.Concurrent -runConcurrently from Control.Concurrent.Async -runExcept from Control.Monad.Trans.Except -runExceptT from Control.Monad.Trans.Except -runIdentity from Data.Functor.Identity -runInBoundThread from Control.Concurrent -runInUnboundThread from Control.Concurrent -runReader from Control.Monad.Trans.Reader -runReaderT from Control.Monad.Trans.Reader -runST from GHC.ST -runState from Control.Monad.Trans.State.Lazy -runStateT from Control.Monad.Trans.State.Lazy -scaleFloat from GHC.Float -scanl from GHC.List -scanl' from GHC.List -scanr from GHC.List -sconcat from GHC.Base -second from Data.Bifunctor -selDecidedStrictness from GHC.Generics -selName from GHC.Generics -selSourceStrictness from GHC.Generics -selSourceUnpackedness from GHC.Generics -seq from GHC.Prim -sequence from Data.Traversable -sequenceA from Data.Traversable -sequenceA_ from Data.Foldable -sequence_ from Data.Foldable -setBit from Data.Bits -setNumCapabilities from GHC.Conc.Sync -shift from Data.Bits -shiftL from Data.Bits -shiftR from Data.Bits -show from Protolude -showStackTrace from GHC.ExecutionStack -signalQSem from Control.Concurrent.QSem -signalQSemN from Control.Concurrent.QSemN -significand from GHC.Float -signum from GHC.Num -sin from GHC.Float -sinh from GHC.Float -snd from Data.Tuple -some from GHC.Base -someNatVal from GHC.TypeLits -someSymbolVal from GHC.TypeLits -sort from Data.OldList -sortBy from Data.OldList -sortOn from Protolude.List -sourceColumn from GHC.ExecutionStack.Internal -sourceFile from GHC.ExecutionStack.Internal -sourceLine from GHC.ExecutionStack.Internal -splitAt from GHC.List -sqrt from GHC.Float -srcLoc from GHC.ExecutionStack.Internal -state from Control.Monad.State.Class -stderr from GHC.IO.Handle.FD -stdin from GHC.IO.Handle.FD -stdout from GHC.IO.Handle.FD -stimes from GHC.Base -stimesIdempotent from Data.Semigroup.Internal -stimesIdempotentMonoid from Data.Semigroup.Internal -stimesMonoid from Data.Semigroup.Internal -strConv from Protolude.Conv -strictDecode from Data.Text.Encoding.Error -subsequences from Data.OldList -subtract from GHC.Num -succ from GHC.Enum -sum from Protolude.List -swap from Data.Tuple -swapMVar from Control.Concurrent.MVar -sym from Data.Type.Equality -symbolVal from GHC.TypeLits -tailDef from Protolude.Safe -tailMay from Protolude.Safe -tailSafe from Protolude.Safe -tails from Data.OldList -take from GHC.List -takeMVar from GHC.MVar -takeWhile from GHC.List -tan from GHC.Float -tanh from GHC.Float -testBit from Data.Bits -testBitDefault from Data.Bits -threadCapability from GHC.Conc.Sync -threadDelay from GHC.Conc.IO -threadWaitRead from Control.Concurrent -threadWaitReadSTM from Control.Concurrent -threadWaitWrite from Control.Concurrent -threadWaitWriteSTM from Control.Concurrent -throwE from Control.Monad.Trans.Except -throwError from Control.Monad.Error.Class -throwIO from Protolude -throwSTM from GHC.Conc.Sync -throwTo from Protolude -to from GHC.Generics -toEnum from GHC.Enum -toException from GHC.Exception.Type -toInteger from GHC.Real -toIntegralSized from Data.Bits -toList from Data.Foldable -toRational from GHC.Real -toS from Protolude.Conv -toSL from Protolude.Conv -toStrict from Data.Text.Lazy -trace from Debug -traceIO from Debug -traceId from Debug -traceM from Debug -traceShow from Debug -traceShowId from Debug -traceShowM from Debug -trans from Data.Type.Equality -transpose from Data.OldList -traverse from Data.Traversable -traverse_ from Data.Foldable -truncate from GHC.Real -try from Control.Exception.Base -tryIO from Protolude.Exceptions -tryJust from Control.Exception.Base -tryPutMVar from GHC.MVar -tryReadMVar from GHC.MVar -tryTakeMVar from GHC.MVar -typeRep from Data.Typeable -unComp1 from GHC.Generics -unK1 from GHC.Generics -unM1 from GHC.Generics -uncons from Protolude -uncurry from Data.Tuple -undefined from Debug -underflowError from GHC.Real -unfoldr from Data.OldList -uninterruptibleMask from GHC.IO -uninterruptibleMask_ from GHC.IO -unless from Control.Monad -unlessM from Protolude.Bool -unlines from Data.Text -unsnoc from Protolude -until from GHC.Base -unwords from Data.Text -unzip from GHC.List -vacuous from Data.Void -void from Data.Functor -wait from Control.Concurrent.Async -waitAny from Control.Concurrent.Async -waitAnyCancel from Control.Concurrent.Async -waitAnyCatch from Control.Concurrent.Async -waitAnyCatchCancel from Control.Concurrent.Async -waitBoth from Control.Concurrent.Async -waitCatch from Control.Concurrent.Async -waitEither from Control.Concurrent.Async -waitEitherCancel from Control.Concurrent.Async -waitEitherCatch from Control.Concurrent.Async -waitEitherCatchCancel from Control.Concurrent.Async -waitEither_ from Control.Concurrent.Async -waitQSem from Control.Concurrent.QSem -waitQSemN from Control.Concurrent.QSemN -when from GHC.Base -whenM from Protolude.Bool -withAsync from Control.Concurrent.Async -withAsyncBound from Control.Concurrent.Async -withAsyncOn from Control.Concurrent.Async -withExcept from Control.Monad.Trans.Except -withExceptT from Control.Monad.Trans.Except -withFile from System.IO -withFrozenCallStack from GHC.Stack -withMVar from Control.Concurrent.MVar -withMVarMasked from Control.Concurrent.MVar -withState from Control.Monad.Trans.State.Lazy -witness from Debug -words from Data.Text -writeChan from Control.Concurrent.Chan -writeFile from Data.Text.IO -writeList2Chan from Control.Concurrent.Chan -xor from Data.Bits -zero from Protolude.Semiring -zeroBits from Data.Bits -zip from GHC.List -zipWith from GHC.List -zipWithM from Control.Monad -zipWithM_ from Control.Monad -|| from GHC.Classes -||^ from Protolude.Bool diff --git a/src/protolude/export_lists/protolude-4.exports b/src/protolude/export_lists/protolude-4.exports deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/protolude/export_lists/protolude-5.exports b/src/protolude/export_lists/protolude-5.exports deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/protolude/export_lists/protolude-6.exports b/src/protolude/export_lists/protolude-6.exports deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/protolude/export_lists/protolude-7.exports b/src/protolude/export_lists/protolude-7.exports deleted file mode 100644 index d347ffca6f..0000000000 --- a/src/protolude/export_lists/protolude-7.exports +++ /dev/null @@ -1,956 +0,0 @@ -$ from GHC.Base -$! from Protolude.Base -$!! from Control.DeepSeq -$> from Data.Functor -% from GHC.Real -& from Data.Function -&& from GHC.Classes -&&^ from Protolude.Bool -* from GHC.Num -* from GHC.Types -** from GHC.Float -*> from GHC.Base -+ from GHC.Num -++ from GHC.Base -- from GHC.Num -. from GHC.Base -.&. from Data.Bits -.|. from Data.Bits -/ from GHC.Real -/= from GHC.Classes -:% from GHC.Real -:*: from GHC.Generics -:*: from GHC.Generics -:+ from Data.Complex -:+: from GHC.Generics -:.: from GHC.Generics -:| from Data.List.NonEmpty -:~: from Data.Type.Equality -< from GHC.Classes -<$ from GHC.Base -<$!> from Control.Monad -<$> from Data.Functor -<&&> from Protolude.Bool -<&> from Protolude.Functor -<* from GHC.Base -<**> from GHC.Base -<*> from GHC.Base -<.> from Protolude.Semiring -<<$>> from Protolude.Functor -<<*>> from Protolude.Applicative -<= from GHC.Classes -<=< from Control.Monad -<> from Data.Monoid -<|> from GHC.Base -<||> from Protolude.Bool -=<< from GHC.Base -== from GHC.Classes -== from Data.Type.Equality -> from GHC.Classes ->= from GHC.Classes ->=> from Control.Monad ->> from GHC.Base ->>= from GHC.Base -All from Data.Monoid -All from Data.Monoid -AllocationLimitExceeded from GHC.IO.Exception -AllocationLimitExceeded from GHC.IO.Exception -Alt from Data.Monoid -Alt from Data.Monoid -Alternative from GHC.Base -Any from Data.Monoid -Any from Data.Monoid -AppendMode from GHC.IO.IOMode -Applicative from GHC.Base -ArithException from GHC.Exception -ArrayException from GHC.IO.Exception -AssertionFailed from GHC.IO.Exception -AssertionFailed from GHC.IO.Exception -Associativity from GHC.Generics -Async from Control.Concurrent.Async -AsyncException from GHC.IO.Exception -Bifunctor from Data.Bifunctor -Bits from Data.Bits -BlockedIndefinitelyOnMVar from GHC.IO.Exception -BlockedIndefinitelyOnMVar from GHC.IO.Exception -BlockedIndefinitelyOnSTM from GHC.IO.Exception -BlockedIndefinitelyOnSTM from GHC.IO.Exception -Bool from GHC.Types -Bounded from GHC.Enum -ByteString from Data.ByteString.Internal -C1 from GHC.Generics -CallStack from GHC.Stack.Types -Chan from Control.Concurrent.Chan -Char from GHC.Types -CmpNat from GHC.TypeLits -Coercible from GHC.Types -Coercion from Data.Type.Coercion -Coercion from Data.Type.Coercion -Comp1 from GHC.Generics -Complex from Data.Complex -Concurrently from Control.Concurrent.Async -Concurrently from Control.Concurrent.Async -Const from Data.Functor.Const -Const from Data.Functor.Const -Constraint from GHC.Types -Constructor from GHC.Generics -D# from GHC.Types -D1 from GHC.Generics -Datatype from GHC.Generics -Deadlock from GHC.IO.Exception -Deadlock from GHC.IO.Exception -Denormal from GHC.Exception -DivideByZero from GHC.Exception -Double from GHC.Types -Down from Data.Ord -Down from Data.Ord -Dual from Data.Monoid -Dual from Data.Monoid -EQ from GHC.Types -Either from Data.Either -Endo from Data.Monoid -Endo from Data.Monoid -Enum from GHC.Enum -Eq from GHC.Classes -ErrorCall from GHC.Exception -ErrorCall from GHC.Exception -ErrorCallWithLocation from GHC.Exception -Except from Control.Monad.Trans.Except -ExceptT from Control.Monad.Trans.Except -ExceptT from Control.Monad.Trans.Except -Exception from GHC.Exception -ExitCode from GHC.IO.Exception -ExitFailure from GHC.IO.Exception -ExitSuccess from GHC.IO.Exception -F# from GHC.Types -False from GHC.Types -FatalError from Protolude.Panic -FatalError from Protolude.Panic -FilePath from GHC.IO -FiniteBits from Data.Bits -First from Data.Monoid -First from Data.Monoid -Fixity from GHC.Generics -FixityI from GHC.Generics -Float from GHC.Types -Floating from GHC.Float -Foldable from Data.Foldable -Fractional from GHC.Real -FunPtr from GHC.Ptr -Functor from GHC.Base -GT from GHC.Types -Generic from GHC.Generics -Generic1 from GHC.Generics -Handle from GHC.IO.Handle.Types -HasCallStack from GHC.Stack.Types -Hashable from Data.Hashable.Class -HeapOverflow from GHC.IO.Exception -IO from GHC.Types -IOException from GHC.IO.Exception -IOMode from GHC.IO.IOMode -Identity from Data.Functor.Identity -Identity from Data.Functor.Identity -IndexOutOfBounds from GHC.IO.Exception -Infix from GHC.Generics -InfixI from GHC.Generics -Int from GHC.Types -Int16 from GHC.Int -Int32 from GHC.Int -Int64 from GHC.Int -Int8 from GHC.Int -IntMap from Data.IntMap.Base -IntPtr from Foreign.Ptr -IntSet from Data.IntSet.Base -Integer from GHC.Integer.Type -Integral from GHC.Real -IsLabel from GHC.OverloadedLabels -IsString from Data.String -Just from GHC.Base -K1 from GHC.Generics -K1 from GHC.Generics -KnownNat from GHC.TypeLits -KnownSymbol from GHC.TypeLits -L1 from GHC.Generics -LByteString from Protolude -LT from GHC.Types -LText from Protolude -Last from Data.Monoid -Last from Data.Monoid -Left from Data.Either -LeftAssociative from GHC.Generics -Leniency from Protolude.Conv -Lenient from Protolude.Conv -Location from GHC.ExecutionStack.Internal -Location from GHC.ExecutionStack.Internal -LossOfPrecision from GHC.Exception -M1 from GHC.Generics -M1 from GHC.Generics -MVar from GHC.MVar -Map from Data.Map.Base -MaskedInterruptible from GHC.IO -MaskedUninterruptible from GHC.IO -MaskingState from GHC.IO -Maybe from GHC.Base -Meta from GHC.Generics -MetaCons from GHC.Generics -MetaData from GHC.Generics -MetaSel from GHC.Generics -Monad from GHC.Base -MonadError from Control.Monad.Error.Class -MonadIO from Control.Monad.IO.Class -MonadPlus from GHC.Base -MonadReader from Control.Monad.Reader.Class -MonadState from Control.Monad.State.Class -Monoid from GHC.Base -NFData from Control.DeepSeq -Nat from GHC.Types -NestedAtomically from Control.Exception.Base -NestedAtomically from Control.Exception.Base -NoMethodError from Control.Exception.Base -NoMethodError from Control.Exception.Base -NonEmpty from Data.List.NonEmpty -NonTermination from Control.Exception.Base -NonTermination from Control.Exception.Base -NotAssociative from GHC.Generics -Nothing from GHC.Base -Num from GHC.Num -OnDecodeError from Data.Text.Encoding.Error -OnError from Data.Text.Encoding.Error -Option from Data.Semigroup -Option from Data.Semigroup -Ord from GHC.Classes -Ordering from GHC.Types -Overflow from GHC.Exception -PatternMatchFail from Control.Exception.Base -PatternMatchFail from Control.Exception.Base -Prefix from GHC.Generics -PrefixI from GHC.Generics -Print from Protolude.Show -Product from Data.Monoid -Product from Data.Monoid -Proxy from Data.Proxy -Proxy from Data.Proxy -Ptr from GHC.Ptr -QSem from Control.Concurrent.QSem -QSemN from Control.Concurrent.QSemN -R1 from GHC.Generics -Ratio from GHC.Real -RatioZeroDenominator from GHC.Exception -Rational from GHC.Real -Read from GHC.Read -ReadMode from GHC.IO.IOMode -ReadWriteMode from GHC.IO.IOMode -Reader from Control.Monad.Trans.Reader -ReaderT from Control.Monad.Trans.Reader -ReaderT from Control.Monad.Trans.Reader -Real from GHC.Real -RealFloat from GHC.Float -RealFrac from GHC.Real -Rec0 from GHC.Generics -RecConError from Control.Exception.Base -RecConError from Control.Exception.Base -RecSelError from Control.Exception.Base -RecSelError from Control.Exception.Base -RecUpdError from Control.Exception.Base -RecUpdError from Control.Exception.Base -Refl from Data.Type.Equality -Rep from GHC.Generics -Right from Data.Either -RightAssociative from GHC.Generics -S1 from GHC.Generics -ST from GHC.ST -STM from GHC.Conc.Sync -Selector from GHC.Generics -Semigroup from Data.Semigroup -Semiring from Protolude.Semiring -Seq from Data.Sequence -Set from Data.Set.Base -Show from GHC.Show -SomeAsyncException from GHC.IO.Exception -SomeAsyncException from GHC.IO.Exception -SomeException from GHC.Exception -SomeException from GHC.Exception -SomeNat from GHC.TypeLits -SomeNat from GHC.TypeLits -SomeSymbol from GHC.TypeLits -SomeSymbol from GHC.TypeLits -SrcLoc from GHC.ExecutionStack.Internal -SrcLoc from GHC.ExecutionStack.Internal -StablePtr from GHC.Stable -StackOverflow from GHC.IO.Exception -State from Control.Monad.Trans.State.Lazy -StateT from Control.Monad.Trans.State.Lazy -StateT from Control.Monad.Trans.State.Lazy -StaticPtr from GHC.StaticPtr -Storable from Foreign.Storable -Strict from Protolude.Conv -StringConv from Protolude.Conv -Sum from Data.Monoid -Sum from Data.Monoid -Symbol from GHC.Types -Text from Data.Text.Internal -ThreadId from GHC.Conc.Sync -ThreadKilled from GHC.IO.Exception -Traversable from Data.Traversable -True from GHC.Types -Type from GHC.Types -TypeError from Control.Exception.Base -TypeError from Control.Exception.Base -TypeRep from Data.Typeable.Internal -Typeable from Data.Typeable.Internal -U1 from GHC.Generics -U1 from GHC.Generics -URec from GHC.Generics -UndefinedElement from GHC.IO.Exception -Underflow from GHC.Exception -UnicodeException from Data.Text.Encoding.Error -Unmasked from GHC.IO -UserInterrupt from GHC.IO.Exception -V1 from GHC.Generics -Void from Data.Void -Word from GHC.Types -Word16 from GHC.Word -Word32 from GHC.Word -Word64 from GHC.Word -Word8 from GHC.Word -WordPtr from Foreign.Ptr -WrappedMonoid from Data.Semigroup -WriteMode from GHC.IO.IOMode -ZipList from Control.Applicative -ZipList from Control.Applicative -^ from GHC.Real -^%^ from GHC.Real -^^ from GHC.Real -^^%^^ from GHC.Real -abs from GHC.Num -absurd from Data.Void -acos from GHC.Float -acosh from GHC.Float -addMVarFinalizer from Control.Concurrent.MVar -all from Data.Foldable -allowInterrupt from Control.Exception -always from GHC.Conc.Sync -alwaysSucceeds from GHC.Conc.Sync -and from Data.Foldable -any from Data.Foldable -ap from GHC.Base -appEndo from Data.Monoid -appendFile from Data.Text.IO -applyN from Protolude -asTypeOf from GHC.Base -asin from GHC.Float -asinh from GHC.Float -ask from Control.Monad.Reader.Class -asks from Control.Monad.Reader.Class -asum from Data.Foldable -async from Control.Concurrent.Async -asyncBound from Control.Concurrent.Async -asyncExceptionFromException from GHC.IO.Exception -asyncExceptionToException from GHC.IO.Exception -asyncOn from Control.Concurrent.Async -asyncThreadId from Control.Concurrent.Async -atDef from Protolude.Safe -atMay from Protolude.Safe -atan from GHC.Float -atan2 from GHC.Float -atanh from GHC.Float -atomically from GHC.Conc.Sync -bimap from Data.Bifunctor -bit from Data.Bits -bitDefault from Data.Bits -bitSize from Data.Bits -bitSizeMaybe from Data.Bits -bool from Protolude.Bool -boundedEnumFrom from GHC.Enum -boundedEnumFromThen from GHC.Enum -bracket from Control.Exception.Base -bracketOnError from Control.Exception.Base -bracket_ from Control.Exception.Base -break from GHC.List -byteSwap16 from GHC.Word -byteSwap32 from GHC.Word -byteSwap64 from GHC.Word -callStack from GHC.Stack -cancel from Control.Concurrent.Async -cancelWith from Control.Concurrent.Async -cast from Data.Typeable -castWith from Data.Type.Equality -catMaybes from Data.Maybe -catch from Control.Exception.Base -catchE from Control.Monad.Trans.Except -catchError from Control.Monad.Error.Class -catchJust from Control.Exception.Base -catchSTM from GHC.Conc.Sync -catches from Control.Exception -ceiling from GHC.Real -check from Control.Monad.STM -chr from GHC.Char -cis from Data.Complex -clearBit from Data.Bits -coerceWith from Data.Type.Coercion -compare from GHC.Classes -comparing from Data.Ord -complement from Data.Bits -complementBit from Data.Bits -conFixity from GHC.Generics -conIsRecord from GHC.Generics -conName from GHC.Generics -concat from Data.Foldable -concatMap from Data.Foldable -concatMapM from Protolude.Monad -concurrently from Control.Concurrent.Async -conjugate from Data.Complex -const from GHC.Base -cos from GHC.Float -cosh from GHC.Float -countLeadingZeros from Data.Bits -countTrailingZeros from Data.Bits -currentCallStack from GHC.Stack.CCS -curry from Data.Tuple -cycle from GHC.List -cycle1 from Data.Semigroup -datatypeName from GHC.Generics -decodeFloat from GHC.Float -decodeUtf8 from Data.Text.Encoding -decodeUtf8' from Data.Text.Encoding -decodeUtf8With from Data.Text.Encoding -deepseq from Control.DeepSeq -denominator from GHC.Real -die from Protolude -diff from Data.Semigroup -displayException from GHC.Exception -div from GHC.Real -divMod from GHC.Real -divZeroError from GHC.Real -drop from GHC.List -dropWhile from GHC.List -dupChan from Control.Concurrent.Chan -either from Data.Either -eitherA from Protolude.Applicative -elem from Data.Foldable -empty from GHC.Base -encodeFloat from GHC.Float -encodeUtf8 from Data.Text.Encoding -enumFrom from GHC.Enum -enumFromThen from GHC.Enum -enumFromThenTo from GHC.Enum -enumFromTo from GHC.Enum -eqT from Data.Typeable -evalState from Control.Monad.Trans.State.Lazy -evalStateT from Control.Monad.Trans.State.Lazy -evaluate from GHC.IO -even from GHC.Real -execState from Control.Monad.Trans.State.Lazy -execStateT from Control.Monad.Trans.State.Lazy -exitFailure from System.Exit -exitSuccess from System.Exit -exitWith from System.Exit -exp from GHC.Float -expm1 from GHC.Float -exponent from GHC.Float -fatalErrorMessage from Protolude.Panic -filter from GHC.List -filterM from Control.Monad -finally from Control.Exception.Base -find from Data.Foldable -finiteBitSize from Data.Bits -first from Data.Bifunctor -fix from Data.Function -fixST from GHC.ST -flip from GHC.Base -floatDigits from GHC.Float -floatRadix from GHC.Float -floatRange from GHC.Float -floor from GHC.Real -fmap from GHC.Base -fmapDefault from Data.Traversable -fold from Data.Foldable -foldM from Control.Monad -foldM_ from Control.Monad -foldMap from Data.Foldable -foldMapDefault from Data.Traversable -foldl from Data.Foldable -foldl' from Data.Foldable -foldl1May from Protolude.Safe -foldl1May' from Protolude.Safe -foldlM from Data.Foldable -foldr from Data.Foldable -foldr' from Data.Foldable -foldr1May from Protolude.Safe -foldrM from Data.Foldable -for from Data.Traversable -forM from Data.Traversable -forM_ from Data.Foldable -for_ from Data.Foldable -force from Control.DeepSeq -foreach from Protolude.Functor -forever from Control.Monad -forkFinally from Control.Concurrent -forkIO from GHC.Conc.Sync -forkIOWithUnmask from GHC.Conc.Sync -forkOS from Control.Concurrent -forkOSWithUnmask from Control.Concurrent -forkOn from GHC.Conc.Sync -forkOnWithUnmask from GHC.Conc.Sync -from from GHC.Generics -fromEnum from GHC.Enum -fromException from GHC.Exception -fromInteger from GHC.Num -fromIntegral from GHC.Real -fromLabel from GHC.OverloadedLabels -fromLeft from Protolude.Either -fromMaybe from Data.Maybe -fromRational from GHC.Real -fromRight from Protolude.Either -fromStrict from Data.Text.Lazy -fst from Data.Tuple -functionName from GHC.ExecutionStack.Internal -gcastWith from Data.Type.Equality -gcd from GHC.Real -gcdInt' from GHC.Real -gcdWord' from GHC.Real -genericDrop from Data.OldList -genericLength from Data.OldList -genericReplicate from Data.OldList -genericSplitAt from Data.OldList -genericTake from Data.OldList -get from Control.Monad.State.Class -getAll from Data.Monoid -getAlt from Data.Monoid -getAny from Data.Monoid -getArgs from System.Environment -getCallStack from GHC.Stack.Types -getChanContents from Control.Concurrent.Chan -getConst from Data.Functor.Const -getContents from Data.Text.IO -getDual from Data.Monoid -getFirst from Data.Monoid -getLast from Data.Monoid -getLine from Data.Text.IO -getMaskingState from GHC.IO -getNumCapabilities from GHC.Conc.Sync -getOption from Data.Semigroup -getProduct from Data.Monoid -getStackTrace from GHC.ExecutionStack -getSum from Data.Monoid -getZipList from Control.Applicative -gets from Control.Monad.State.Class -group from Data.OldList -groupBy from Data.OldList -guard from Control.Monad -guardM from Protolude.Bool -guarded from Protolude -guardedA from Protolude -hPutStr from Protolude.Show -hPutStrLn from Protolude.Show -handle from Control.Exception.Base -handleJust from Control.Exception.Base -hash from Data.Hashable.Class -hashUsing from Data.Hashable.Class -hashWithSalt from Data.Hashable.Class -head from Protolude.List -headDef from Protolude.Safe -headMay from Protolude.Safe -hush from Protolude.Exceptions -identity from Protolude -ifM from Protolude.Bool -ignore from Data.Text.Encoding.Error -imagPart from Data.Complex -infinity from GHC.Real -initDef from Protolude.Safe -initMay from Protolude.Safe -initSafe from Protolude.Safe -inits from Data.OldList -integralEnumFrom from GHC.Real -integralEnumFromThen from GHC.Real -integralEnumFromThenTo from GHC.Real -integralEnumFromTo from GHC.Real -interact from Data.Text.IO -intercalate from Data.OldList -interruptible from GHC.IO -intersperse from Data.OldList -ioError from GHC.IO.Exception -isCurrentThreadBound from Control.Concurrent -isDenormalized from GHC.Float -isEmptyChan from Control.Concurrent.Chan -isEmptyMVar from GHC.MVar -isIEEE from GHC.Float -isInfinite from GHC.Float -isJust from Data.Maybe -isLeft from Data.Either -isNaN from GHC.Float -isNegativeZero from GHC.Float -isNewtype from GHC.Generics -isNothing from Data.Maybe -isPrefixOf from Data.OldList -isRight from Data.Either -isSigned from Data.Bits -iterate from GHC.List -join from GHC.Base -killThread from GHC.Conc.Sync -lastDef from Protolude.Safe -lastMay from Protolude.Safe -lcm from GHC.Real -leftToMaybe from Protolude.Either -lefts from Data.Either -length from Data.Foldable -lenientDecode from Data.Text.Encoding.Error -lift from Control.Monad.Trans.Class -liftA from GHC.Base -liftA2 from GHC.Base -liftA3 from GHC.Base -liftAA2 from Protolude.Applicative -liftIO from Control.Monad.IO.Class -liftIO1 from Protolude -liftIO2 from Protolude -liftM from GHC.Base -liftM' from Protolude.Monad -liftM2 from GHC.Base -liftM2' from Protolude.Monad -liftM3 from GHC.Base -liftM4 from GHC.Base -liftM5 from GHC.Base -lines from Data.Text -link from Control.Concurrent.Async -link2 from Control.Concurrent.Async -list from Protolude.List -listToMaybe from Data.Maybe -local from Control.Monad.Reader.Class -log from GHC.Float -log1mexp from GHC.Float -log1p from GHC.Float -log1pexp from GHC.Float -logBase from GHC.Float -magnitude from Data.Complex -many from GHC.Base -map from Protolude -mapAccumL from Data.Traversable -mapAccumR from Data.Traversable -mapAndUnzipM from Control.Monad -mapExcept from Control.Monad.Trans.Except -mapExceptT from Control.Monad.Trans.Except -mapException from Control.Exception.Base -mapM from Data.Traversable -mapM_ from Data.Foldable -mapMaybe from Data.Maybe -mappend from GHC.Base -mask from GHC.IO -mask_ from GHC.IO -max from GHC.Classes -maxBound from GHC.Enum -maxInt from GHC.Base -maximum from Data.Foldable -maximumBy from Data.Foldable -maximumDef from Protolude.Safe -maximumMay from Protolude.Safe -maybe from Data.Maybe -maybeEmpty from Protolude.Either -maybeToEither from Protolude.Either -maybeToLeft from Protolude.Either -maybeToList from Data.Maybe -maybeToRight from Protolude.Either -mconcat from GHC.Base -mempty from GHC.Base -mfilter from Control.Monad -min from GHC.Classes -minBound from GHC.Enum -minInt from GHC.Base -minimum from Data.Foldable -minimumBy from Data.Foldable -minimumDef from Protolude.Safe -minimumMay from Protolude.Safe -mkPolar from Data.Complex -mkWeakMVar from Control.Concurrent.MVar -mkWeakThreadId from GHC.Conc.Sync -mod from GHC.Real -modify from Control.Monad.State.Class -modifyMVar from Control.Concurrent.MVar -modifyMVarMasked from Control.Concurrent.MVar -modifyMVarMasked_ from Control.Concurrent.MVar -modifyMVar_ from Control.Concurrent.MVar -moduleName from GHC.Generics -mplus from GHC.Base -msum from Data.Foldable -mtimesDefault from Data.Semigroup -myThreadId from GHC.Conc.Sync -mzero from GHC.Base -natVal from GHC.TypeLits -negate from GHC.Num -newChan from Control.Concurrent.Chan -newEmptyMVar from GHC.MVar -newMVar from GHC.MVar -newQSem from Control.Concurrent.QSem -newQSemN from Control.Concurrent.QSemN -nonEmpty from Data.List.NonEmpty -not from GHC.Classes -notANumber from GHC.Real -notElem from Data.Foldable -notImplemented from Debug -note from Protolude.Exceptions -null from Data.Foldable -numerator from GHC.Real -numericEnumFrom from GHC.Real -numericEnumFromThen from GHC.Real -numericEnumFromThenTo from GHC.Real -numericEnumFromTo from GHC.Real -objectName from GHC.ExecutionStack.Internal -odd from GHC.Real -on from Data.Function -onException from Control.Exception.Base -one from Protolude.Semiring -openFile from GHC.IO.Handle.FD -option from Data.Semigroup -optional from Control.Applicative -or from Data.Foldable -orAlt from Protolude.Applicative -orElse from GHC.Conc.Sync -orEmpty from Protolude.Applicative -ord from GHC.Base -ordNub from Protolude.List -otherwise from GHC.Base -overflowError from GHC.Real -packageName from GHC.Generics -panic from Protolude.Panic -partitionEithers from Data.Either -pass from Protolude -permutations from Data.OldList -phase from Data.Complex -pi from GHC.Float -polar from Data.Complex -poll from Control.Concurrent.Async -popCount from Data.Bits -popCountDefault from Data.Bits -pred from GHC.Enum -prettyCallStack from GHC.Exception -prettySrcLoc from GHC.Exception -print from Protolude -product from Protolude.List -properFraction from GHC.Real -pure from GHC.Base -purer from Protolude.Applicative -put from Control.Monad.State.Class -putByteString from Protolude.Show -putErrLn from Protolude.Show -putErrText from Protolude.Show -putLByteString from Protolude.Show -putLText from Protolude.Show -putMVar from GHC.MVar -putStr from Protolude.Show -putStrLn from Protolude.Show -putText from Protolude.Show -quot from GHC.Real -quotRem from GHC.Real -race from Control.Concurrent.Async -race_ from Control.Concurrent.Async -ratioPrec from GHC.Real -ratioPrec1 from GHC.Real -ratioZeroDenominatorError from GHC.Real -readChan from Control.Concurrent.Chan -readEither from Protolude -readFile from Data.Text.IO -readMVar from GHC.MVar -readMaybe from Protolude -reader from Control.Monad.Reader.Class -reads from Text.Read -realPart from Data.Complex -realToFrac from GHC.Real -recip from GHC.Real -reduce from GHC.Real -rem from GHC.Real -repeat from GHC.List -replace from Data.Text.Encoding.Error -replicate from GHC.List -replicateM from Control.Monad -replicateM_ from Control.Monad -repr from Data.Type.Coercion -retry from GHC.Conc.Sync -return from GHC.Base -reverse from GHC.List -rightToMaybe from Protolude.Either -rights from Data.Either -rnf from Control.DeepSeq -rotate from Data.Bits -rotateL from Data.Bits -rotateR from Data.Bits -round from GHC.Real -rtsSupportsBoundThreads from Control.Concurrent -runConcurrently from Control.Concurrent.Async -runExcept from Control.Monad.Trans.Except -runExceptT from Control.Monad.Trans.Except -runIdentity from Data.Functor.Identity -runInBoundThread from Control.Concurrent -runInUnboundThread from Control.Concurrent -runReader from Control.Monad.Trans.Reader -runReaderT from Control.Monad.Trans.Reader -runST from GHC.ST -runState from Control.Monad.Trans.State.Lazy -runStateT from Control.Monad.Trans.State.Lazy -scaleFloat from GHC.Float -scanl from GHC.List -scanl' from GHC.List -scanr from GHC.List -sconcat from Data.Semigroup -second from Data.Bifunctor -selDecidedStrictness from GHC.Generics -selName from GHC.Generics -selSourceStrictness from GHC.Generics -selSourceUnpackedness from GHC.Generics -seq from GHC.Prim -sequence from Data.Traversable -sequenceA from Data.Traversable -sequenceA_ from Data.Foldable -sequence_ from Data.Foldable -setBit from Data.Bits -setNumCapabilities from GHC.Conc.Sync -shift from Data.Bits -shiftL from Data.Bits -shiftR from Data.Bits -show from Protolude -showStackTrace from GHC.ExecutionStack -signalQSem from Control.Concurrent.QSem -signalQSemN from Control.Concurrent.QSemN -significand from GHC.Float -signum from GHC.Num -sin from GHC.Float -sinh from GHC.Float -snd from Data.Tuple -some from GHC.Base -someNatVal from GHC.TypeLits -someSymbolVal from GHC.TypeLits -sort from Data.OldList -sortBy from Data.OldList -sortOn from Protolude.List -sourceColumn from GHC.ExecutionStack.Internal -sourceFile from GHC.ExecutionStack.Internal -sourceLine from GHC.ExecutionStack.Internal -splitAt from GHC.List -sqrt from GHC.Float -srcLoc from GHC.ExecutionStack.Internal -state from Control.Monad.State.Class -stderr from GHC.IO.Handle.FD -stdin from GHC.IO.Handle.FD -stdout from GHC.IO.Handle.FD -stimes from Data.Semigroup -stimesIdempotent from Data.Semigroup -stimesIdempotentMonoid from Data.Semigroup -stimesMonoid from Data.Semigroup -strConv from Protolude.Conv -strictDecode from Data.Text.Encoding.Error -subsequences from Data.OldList -subtract from GHC.Num -succ from GHC.Enum -sum from Protolude.List -swap from Data.Tuple -swapMVar from Control.Concurrent.MVar -sym from Data.Type.Equality -symbolVal from GHC.TypeLits -tailDef from Protolude.Safe -tailMay from Protolude.Safe -tailSafe from Protolude.Safe -tails from Data.OldList -take from GHC.List -takeMVar from GHC.MVar -takeWhile from GHC.List -tan from GHC.Float -tanh from GHC.Float -testBit from Data.Bits -testBitDefault from Data.Bits -threadCapability from GHC.Conc.Sync -threadDelay from GHC.Conc.IO -threadWaitRead from Control.Concurrent -threadWaitReadSTM from Control.Concurrent -threadWaitWrite from Control.Concurrent -threadWaitWriteSTM from Control.Concurrent -throwE from Control.Monad.Trans.Except -throwError from Control.Monad.Error.Class -throwIO from Protolude -throwSTM from GHC.Conc.Sync -throwTo from Protolude -to from GHC.Generics -toEnum from GHC.Enum -toException from GHC.Exception -toInteger from GHC.Real -toIntegralSized from Data.Bits -toList from Data.Foldable -toRational from GHC.Real -toS from Protolude.Conv -toSL from Protolude.Conv -toStrict from Data.Text.Lazy -trace from Debug -traceIO from Debug -traceId from Debug -traceM from Debug -traceShow from Debug -traceShowId from Debug -traceShowM from Debug -trans from Data.Type.Equality -transpose from Data.OldList -traverse from Data.Traversable -traverse_ from Data.Foldable -truncate from GHC.Real -try from Control.Exception.Base -tryIO from Protolude.Exceptions -tryJust from Control.Exception.Base -tryPutMVar from GHC.MVar -tryReadMVar from GHC.MVar -tryTakeMVar from GHC.MVar -typeRep from Data.Typeable.Internal -unComp1 from GHC.Generics -unGetChan from Control.Concurrent.Chan -unK1 from GHC.Generics -unM1 from GHC.Generics -uncons from Protolude -uncurry from Data.Tuple -undefined from Debug -unfoldr from Data.OldList -uninterruptibleMask from GHC.IO -uninterruptibleMask_ from GHC.IO -unless from Control.Monad -unlessM from Protolude.Bool -unlines from Data.Text -unsnoc from Protolude -until from GHC.Base -unwords from Data.Text -unzip from GHC.List -vacuous from Data.Void -void from Data.Functor -wait from Control.Concurrent.Async -waitAny from Control.Concurrent.Async -waitAnyCancel from Control.Concurrent.Async -waitAnyCatch from Control.Concurrent.Async -waitAnyCatchCancel from Control.Concurrent.Async -waitBoth from Control.Concurrent.Async -waitCatch from Control.Concurrent.Async -waitEither from Control.Concurrent.Async -waitEitherCancel from Control.Concurrent.Async -waitEitherCatch from Control.Concurrent.Async -waitEitherCatchCancel from Control.Concurrent.Async -waitEither_ from Control.Concurrent.Async -waitQSem from Control.Concurrent.QSem -waitQSemN from Control.Concurrent.QSemN -when from GHC.Base -whenM from Protolude.Bool -withAsync from Control.Concurrent.Async -withAsyncBound from Control.Concurrent.Async -withAsyncOn from Control.Concurrent.Async -withExcept from Control.Monad.Trans.Except -withExceptT from Control.Monad.Trans.Except -withFile from System.IO -withFrozenCallStack from GHC.Stack -withMVar from Control.Concurrent.MVar -withMVarMasked from Control.Concurrent.MVar -withState from Control.Monad.Trans.State.Lazy -witness from Debug -words from Data.Text -writeChan from Control.Concurrent.Chan -writeFile from Data.Text.IO -writeList2Chan from Control.Concurrent.Chan -xor from Data.Bits -zero from Protolude.Semiring -zeroBits from Data.Bits -zip from GHC.List -zipWith from GHC.List -zipWithM from Control.Monad -zipWithM_ from Control.Monad -|| from GHC.Classes -||^ from Protolude.Bool diff --git a/src/protolude/export_lists/protolude-8.exports b/src/protolude/export_lists/protolude-8.exports deleted file mode 100644 index d347ffca6f..0000000000 --- a/src/protolude/export_lists/protolude-8.exports +++ /dev/null @@ -1,956 +0,0 @@ -$ from GHC.Base -$! from Protolude.Base -$!! from Control.DeepSeq -$> from Data.Functor -% from GHC.Real -& from Data.Function -&& from GHC.Classes -&&^ from Protolude.Bool -* from GHC.Num -* from GHC.Types -** from GHC.Float -*> from GHC.Base -+ from GHC.Num -++ from GHC.Base -- from GHC.Num -. from GHC.Base -.&. from Data.Bits -.|. from Data.Bits -/ from GHC.Real -/= from GHC.Classes -:% from GHC.Real -:*: from GHC.Generics -:*: from GHC.Generics -:+ from Data.Complex -:+: from GHC.Generics -:.: from GHC.Generics -:| from Data.List.NonEmpty -:~: from Data.Type.Equality -< from GHC.Classes -<$ from GHC.Base -<$!> from Control.Monad -<$> from Data.Functor -<&&> from Protolude.Bool -<&> from Protolude.Functor -<* from GHC.Base -<**> from GHC.Base -<*> from GHC.Base -<.> from Protolude.Semiring -<<$>> from Protolude.Functor -<<*>> from Protolude.Applicative -<= from GHC.Classes -<=< from Control.Monad -<> from Data.Monoid -<|> from GHC.Base -<||> from Protolude.Bool -=<< from GHC.Base -== from GHC.Classes -== from Data.Type.Equality -> from GHC.Classes ->= from GHC.Classes ->=> from Control.Monad ->> from GHC.Base ->>= from GHC.Base -All from Data.Monoid -All from Data.Monoid -AllocationLimitExceeded from GHC.IO.Exception -AllocationLimitExceeded from GHC.IO.Exception -Alt from Data.Monoid -Alt from Data.Monoid -Alternative from GHC.Base -Any from Data.Monoid -Any from Data.Monoid -AppendMode from GHC.IO.IOMode -Applicative from GHC.Base -ArithException from GHC.Exception -ArrayException from GHC.IO.Exception -AssertionFailed from GHC.IO.Exception -AssertionFailed from GHC.IO.Exception -Associativity from GHC.Generics -Async from Control.Concurrent.Async -AsyncException from GHC.IO.Exception -Bifunctor from Data.Bifunctor -Bits from Data.Bits -BlockedIndefinitelyOnMVar from GHC.IO.Exception -BlockedIndefinitelyOnMVar from GHC.IO.Exception -BlockedIndefinitelyOnSTM from GHC.IO.Exception -BlockedIndefinitelyOnSTM from GHC.IO.Exception -Bool from GHC.Types -Bounded from GHC.Enum -ByteString from Data.ByteString.Internal -C1 from GHC.Generics -CallStack from GHC.Stack.Types -Chan from Control.Concurrent.Chan -Char from GHC.Types -CmpNat from GHC.TypeLits -Coercible from GHC.Types -Coercion from Data.Type.Coercion -Coercion from Data.Type.Coercion -Comp1 from GHC.Generics -Complex from Data.Complex -Concurrently from Control.Concurrent.Async -Concurrently from Control.Concurrent.Async -Const from Data.Functor.Const -Const from Data.Functor.Const -Constraint from GHC.Types -Constructor from GHC.Generics -D# from GHC.Types -D1 from GHC.Generics -Datatype from GHC.Generics -Deadlock from GHC.IO.Exception -Deadlock from GHC.IO.Exception -Denormal from GHC.Exception -DivideByZero from GHC.Exception -Double from GHC.Types -Down from Data.Ord -Down from Data.Ord -Dual from Data.Monoid -Dual from Data.Monoid -EQ from GHC.Types -Either from Data.Either -Endo from Data.Monoid -Endo from Data.Monoid -Enum from GHC.Enum -Eq from GHC.Classes -ErrorCall from GHC.Exception -ErrorCall from GHC.Exception -ErrorCallWithLocation from GHC.Exception -Except from Control.Monad.Trans.Except -ExceptT from Control.Monad.Trans.Except -ExceptT from Control.Monad.Trans.Except -Exception from GHC.Exception -ExitCode from GHC.IO.Exception -ExitFailure from GHC.IO.Exception -ExitSuccess from GHC.IO.Exception -F# from GHC.Types -False from GHC.Types -FatalError from Protolude.Panic -FatalError from Protolude.Panic -FilePath from GHC.IO -FiniteBits from Data.Bits -First from Data.Monoid -First from Data.Monoid -Fixity from GHC.Generics -FixityI from GHC.Generics -Float from GHC.Types -Floating from GHC.Float -Foldable from Data.Foldable -Fractional from GHC.Real -FunPtr from GHC.Ptr -Functor from GHC.Base -GT from GHC.Types -Generic from GHC.Generics -Generic1 from GHC.Generics -Handle from GHC.IO.Handle.Types -HasCallStack from GHC.Stack.Types -Hashable from Data.Hashable.Class -HeapOverflow from GHC.IO.Exception -IO from GHC.Types -IOException from GHC.IO.Exception -IOMode from GHC.IO.IOMode -Identity from Data.Functor.Identity -Identity from Data.Functor.Identity -IndexOutOfBounds from GHC.IO.Exception -Infix from GHC.Generics -InfixI from GHC.Generics -Int from GHC.Types -Int16 from GHC.Int -Int32 from GHC.Int -Int64 from GHC.Int -Int8 from GHC.Int -IntMap from Data.IntMap.Base -IntPtr from Foreign.Ptr -IntSet from Data.IntSet.Base -Integer from GHC.Integer.Type -Integral from GHC.Real -IsLabel from GHC.OverloadedLabels -IsString from Data.String -Just from GHC.Base -K1 from GHC.Generics -K1 from GHC.Generics -KnownNat from GHC.TypeLits -KnownSymbol from GHC.TypeLits -L1 from GHC.Generics -LByteString from Protolude -LT from GHC.Types -LText from Protolude -Last from Data.Monoid -Last from Data.Monoid -Left from Data.Either -LeftAssociative from GHC.Generics -Leniency from Protolude.Conv -Lenient from Protolude.Conv -Location from GHC.ExecutionStack.Internal -Location from GHC.ExecutionStack.Internal -LossOfPrecision from GHC.Exception -M1 from GHC.Generics -M1 from GHC.Generics -MVar from GHC.MVar -Map from Data.Map.Base -MaskedInterruptible from GHC.IO -MaskedUninterruptible from GHC.IO -MaskingState from GHC.IO -Maybe from GHC.Base -Meta from GHC.Generics -MetaCons from GHC.Generics -MetaData from GHC.Generics -MetaSel from GHC.Generics -Monad from GHC.Base -MonadError from Control.Monad.Error.Class -MonadIO from Control.Monad.IO.Class -MonadPlus from GHC.Base -MonadReader from Control.Monad.Reader.Class -MonadState from Control.Monad.State.Class -Monoid from GHC.Base -NFData from Control.DeepSeq -Nat from GHC.Types -NestedAtomically from Control.Exception.Base -NestedAtomically from Control.Exception.Base -NoMethodError from Control.Exception.Base -NoMethodError from Control.Exception.Base -NonEmpty from Data.List.NonEmpty -NonTermination from Control.Exception.Base -NonTermination from Control.Exception.Base -NotAssociative from GHC.Generics -Nothing from GHC.Base -Num from GHC.Num -OnDecodeError from Data.Text.Encoding.Error -OnError from Data.Text.Encoding.Error -Option from Data.Semigroup -Option from Data.Semigroup -Ord from GHC.Classes -Ordering from GHC.Types -Overflow from GHC.Exception -PatternMatchFail from Control.Exception.Base -PatternMatchFail from Control.Exception.Base -Prefix from GHC.Generics -PrefixI from GHC.Generics -Print from Protolude.Show -Product from Data.Monoid -Product from Data.Monoid -Proxy from Data.Proxy -Proxy from Data.Proxy -Ptr from GHC.Ptr -QSem from Control.Concurrent.QSem -QSemN from Control.Concurrent.QSemN -R1 from GHC.Generics -Ratio from GHC.Real -RatioZeroDenominator from GHC.Exception -Rational from GHC.Real -Read from GHC.Read -ReadMode from GHC.IO.IOMode -ReadWriteMode from GHC.IO.IOMode -Reader from Control.Monad.Trans.Reader -ReaderT from Control.Monad.Trans.Reader -ReaderT from Control.Monad.Trans.Reader -Real from GHC.Real -RealFloat from GHC.Float -RealFrac from GHC.Real -Rec0 from GHC.Generics -RecConError from Control.Exception.Base -RecConError from Control.Exception.Base -RecSelError from Control.Exception.Base -RecSelError from Control.Exception.Base -RecUpdError from Control.Exception.Base -RecUpdError from Control.Exception.Base -Refl from Data.Type.Equality -Rep from GHC.Generics -Right from Data.Either -RightAssociative from GHC.Generics -S1 from GHC.Generics -ST from GHC.ST -STM from GHC.Conc.Sync -Selector from GHC.Generics -Semigroup from Data.Semigroup -Semiring from Protolude.Semiring -Seq from Data.Sequence -Set from Data.Set.Base -Show from GHC.Show -SomeAsyncException from GHC.IO.Exception -SomeAsyncException from GHC.IO.Exception -SomeException from GHC.Exception -SomeException from GHC.Exception -SomeNat from GHC.TypeLits -SomeNat from GHC.TypeLits -SomeSymbol from GHC.TypeLits -SomeSymbol from GHC.TypeLits -SrcLoc from GHC.ExecutionStack.Internal -SrcLoc from GHC.ExecutionStack.Internal -StablePtr from GHC.Stable -StackOverflow from GHC.IO.Exception -State from Control.Monad.Trans.State.Lazy -StateT from Control.Monad.Trans.State.Lazy -StateT from Control.Monad.Trans.State.Lazy -StaticPtr from GHC.StaticPtr -Storable from Foreign.Storable -Strict from Protolude.Conv -StringConv from Protolude.Conv -Sum from Data.Monoid -Sum from Data.Monoid -Symbol from GHC.Types -Text from Data.Text.Internal -ThreadId from GHC.Conc.Sync -ThreadKilled from GHC.IO.Exception -Traversable from Data.Traversable -True from GHC.Types -Type from GHC.Types -TypeError from Control.Exception.Base -TypeError from Control.Exception.Base -TypeRep from Data.Typeable.Internal -Typeable from Data.Typeable.Internal -U1 from GHC.Generics -U1 from GHC.Generics -URec from GHC.Generics -UndefinedElement from GHC.IO.Exception -Underflow from GHC.Exception -UnicodeException from Data.Text.Encoding.Error -Unmasked from GHC.IO -UserInterrupt from GHC.IO.Exception -V1 from GHC.Generics -Void from Data.Void -Word from GHC.Types -Word16 from GHC.Word -Word32 from GHC.Word -Word64 from GHC.Word -Word8 from GHC.Word -WordPtr from Foreign.Ptr -WrappedMonoid from Data.Semigroup -WriteMode from GHC.IO.IOMode -ZipList from Control.Applicative -ZipList from Control.Applicative -^ from GHC.Real -^%^ from GHC.Real -^^ from GHC.Real -^^%^^ from GHC.Real -abs from GHC.Num -absurd from Data.Void -acos from GHC.Float -acosh from GHC.Float -addMVarFinalizer from Control.Concurrent.MVar -all from Data.Foldable -allowInterrupt from Control.Exception -always from GHC.Conc.Sync -alwaysSucceeds from GHC.Conc.Sync -and from Data.Foldable -any from Data.Foldable -ap from GHC.Base -appEndo from Data.Monoid -appendFile from Data.Text.IO -applyN from Protolude -asTypeOf from GHC.Base -asin from GHC.Float -asinh from GHC.Float -ask from Control.Monad.Reader.Class -asks from Control.Monad.Reader.Class -asum from Data.Foldable -async from Control.Concurrent.Async -asyncBound from Control.Concurrent.Async -asyncExceptionFromException from GHC.IO.Exception -asyncExceptionToException from GHC.IO.Exception -asyncOn from Control.Concurrent.Async -asyncThreadId from Control.Concurrent.Async -atDef from Protolude.Safe -atMay from Protolude.Safe -atan from GHC.Float -atan2 from GHC.Float -atanh from GHC.Float -atomically from GHC.Conc.Sync -bimap from Data.Bifunctor -bit from Data.Bits -bitDefault from Data.Bits -bitSize from Data.Bits -bitSizeMaybe from Data.Bits -bool from Protolude.Bool -boundedEnumFrom from GHC.Enum -boundedEnumFromThen from GHC.Enum -bracket from Control.Exception.Base -bracketOnError from Control.Exception.Base -bracket_ from Control.Exception.Base -break from GHC.List -byteSwap16 from GHC.Word -byteSwap32 from GHC.Word -byteSwap64 from GHC.Word -callStack from GHC.Stack -cancel from Control.Concurrent.Async -cancelWith from Control.Concurrent.Async -cast from Data.Typeable -castWith from Data.Type.Equality -catMaybes from Data.Maybe -catch from Control.Exception.Base -catchE from Control.Monad.Trans.Except -catchError from Control.Monad.Error.Class -catchJust from Control.Exception.Base -catchSTM from GHC.Conc.Sync -catches from Control.Exception -ceiling from GHC.Real -check from Control.Monad.STM -chr from GHC.Char -cis from Data.Complex -clearBit from Data.Bits -coerceWith from Data.Type.Coercion -compare from GHC.Classes -comparing from Data.Ord -complement from Data.Bits -complementBit from Data.Bits -conFixity from GHC.Generics -conIsRecord from GHC.Generics -conName from GHC.Generics -concat from Data.Foldable -concatMap from Data.Foldable -concatMapM from Protolude.Monad -concurrently from Control.Concurrent.Async -conjugate from Data.Complex -const from GHC.Base -cos from GHC.Float -cosh from GHC.Float -countLeadingZeros from Data.Bits -countTrailingZeros from Data.Bits -currentCallStack from GHC.Stack.CCS -curry from Data.Tuple -cycle from GHC.List -cycle1 from Data.Semigroup -datatypeName from GHC.Generics -decodeFloat from GHC.Float -decodeUtf8 from Data.Text.Encoding -decodeUtf8' from Data.Text.Encoding -decodeUtf8With from Data.Text.Encoding -deepseq from Control.DeepSeq -denominator from GHC.Real -die from Protolude -diff from Data.Semigroup -displayException from GHC.Exception -div from GHC.Real -divMod from GHC.Real -divZeroError from GHC.Real -drop from GHC.List -dropWhile from GHC.List -dupChan from Control.Concurrent.Chan -either from Data.Either -eitherA from Protolude.Applicative -elem from Data.Foldable -empty from GHC.Base -encodeFloat from GHC.Float -encodeUtf8 from Data.Text.Encoding -enumFrom from GHC.Enum -enumFromThen from GHC.Enum -enumFromThenTo from GHC.Enum -enumFromTo from GHC.Enum -eqT from Data.Typeable -evalState from Control.Monad.Trans.State.Lazy -evalStateT from Control.Monad.Trans.State.Lazy -evaluate from GHC.IO -even from GHC.Real -execState from Control.Monad.Trans.State.Lazy -execStateT from Control.Monad.Trans.State.Lazy -exitFailure from System.Exit -exitSuccess from System.Exit -exitWith from System.Exit -exp from GHC.Float -expm1 from GHC.Float -exponent from GHC.Float -fatalErrorMessage from Protolude.Panic -filter from GHC.List -filterM from Control.Monad -finally from Control.Exception.Base -find from Data.Foldable -finiteBitSize from Data.Bits -first from Data.Bifunctor -fix from Data.Function -fixST from GHC.ST -flip from GHC.Base -floatDigits from GHC.Float -floatRadix from GHC.Float -floatRange from GHC.Float -floor from GHC.Real -fmap from GHC.Base -fmapDefault from Data.Traversable -fold from Data.Foldable -foldM from Control.Monad -foldM_ from Control.Monad -foldMap from Data.Foldable -foldMapDefault from Data.Traversable -foldl from Data.Foldable -foldl' from Data.Foldable -foldl1May from Protolude.Safe -foldl1May' from Protolude.Safe -foldlM from Data.Foldable -foldr from Data.Foldable -foldr' from Data.Foldable -foldr1May from Protolude.Safe -foldrM from Data.Foldable -for from Data.Traversable -forM from Data.Traversable -forM_ from Data.Foldable -for_ from Data.Foldable -force from Control.DeepSeq -foreach from Protolude.Functor -forever from Control.Monad -forkFinally from Control.Concurrent -forkIO from GHC.Conc.Sync -forkIOWithUnmask from GHC.Conc.Sync -forkOS from Control.Concurrent -forkOSWithUnmask from Control.Concurrent -forkOn from GHC.Conc.Sync -forkOnWithUnmask from GHC.Conc.Sync -from from GHC.Generics -fromEnum from GHC.Enum -fromException from GHC.Exception -fromInteger from GHC.Num -fromIntegral from GHC.Real -fromLabel from GHC.OverloadedLabels -fromLeft from Protolude.Either -fromMaybe from Data.Maybe -fromRational from GHC.Real -fromRight from Protolude.Either -fromStrict from Data.Text.Lazy -fst from Data.Tuple -functionName from GHC.ExecutionStack.Internal -gcastWith from Data.Type.Equality -gcd from GHC.Real -gcdInt' from GHC.Real -gcdWord' from GHC.Real -genericDrop from Data.OldList -genericLength from Data.OldList -genericReplicate from Data.OldList -genericSplitAt from Data.OldList -genericTake from Data.OldList -get from Control.Monad.State.Class -getAll from Data.Monoid -getAlt from Data.Monoid -getAny from Data.Monoid -getArgs from System.Environment -getCallStack from GHC.Stack.Types -getChanContents from Control.Concurrent.Chan -getConst from Data.Functor.Const -getContents from Data.Text.IO -getDual from Data.Monoid -getFirst from Data.Monoid -getLast from Data.Monoid -getLine from Data.Text.IO -getMaskingState from GHC.IO -getNumCapabilities from GHC.Conc.Sync -getOption from Data.Semigroup -getProduct from Data.Monoid -getStackTrace from GHC.ExecutionStack -getSum from Data.Monoid -getZipList from Control.Applicative -gets from Control.Monad.State.Class -group from Data.OldList -groupBy from Data.OldList -guard from Control.Monad -guardM from Protolude.Bool -guarded from Protolude -guardedA from Protolude -hPutStr from Protolude.Show -hPutStrLn from Protolude.Show -handle from Control.Exception.Base -handleJust from Control.Exception.Base -hash from Data.Hashable.Class -hashUsing from Data.Hashable.Class -hashWithSalt from Data.Hashable.Class -head from Protolude.List -headDef from Protolude.Safe -headMay from Protolude.Safe -hush from Protolude.Exceptions -identity from Protolude -ifM from Protolude.Bool -ignore from Data.Text.Encoding.Error -imagPart from Data.Complex -infinity from GHC.Real -initDef from Protolude.Safe -initMay from Protolude.Safe -initSafe from Protolude.Safe -inits from Data.OldList -integralEnumFrom from GHC.Real -integralEnumFromThen from GHC.Real -integralEnumFromThenTo from GHC.Real -integralEnumFromTo from GHC.Real -interact from Data.Text.IO -intercalate from Data.OldList -interruptible from GHC.IO -intersperse from Data.OldList -ioError from GHC.IO.Exception -isCurrentThreadBound from Control.Concurrent -isDenormalized from GHC.Float -isEmptyChan from Control.Concurrent.Chan -isEmptyMVar from GHC.MVar -isIEEE from GHC.Float -isInfinite from GHC.Float -isJust from Data.Maybe -isLeft from Data.Either -isNaN from GHC.Float -isNegativeZero from GHC.Float -isNewtype from GHC.Generics -isNothing from Data.Maybe -isPrefixOf from Data.OldList -isRight from Data.Either -isSigned from Data.Bits -iterate from GHC.List -join from GHC.Base -killThread from GHC.Conc.Sync -lastDef from Protolude.Safe -lastMay from Protolude.Safe -lcm from GHC.Real -leftToMaybe from Protolude.Either -lefts from Data.Either -length from Data.Foldable -lenientDecode from Data.Text.Encoding.Error -lift from Control.Monad.Trans.Class -liftA from GHC.Base -liftA2 from GHC.Base -liftA3 from GHC.Base -liftAA2 from Protolude.Applicative -liftIO from Control.Monad.IO.Class -liftIO1 from Protolude -liftIO2 from Protolude -liftM from GHC.Base -liftM' from Protolude.Monad -liftM2 from GHC.Base -liftM2' from Protolude.Monad -liftM3 from GHC.Base -liftM4 from GHC.Base -liftM5 from GHC.Base -lines from Data.Text -link from Control.Concurrent.Async -link2 from Control.Concurrent.Async -list from Protolude.List -listToMaybe from Data.Maybe -local from Control.Monad.Reader.Class -log from GHC.Float -log1mexp from GHC.Float -log1p from GHC.Float -log1pexp from GHC.Float -logBase from GHC.Float -magnitude from Data.Complex -many from GHC.Base -map from Protolude -mapAccumL from Data.Traversable -mapAccumR from Data.Traversable -mapAndUnzipM from Control.Monad -mapExcept from Control.Monad.Trans.Except -mapExceptT from Control.Monad.Trans.Except -mapException from Control.Exception.Base -mapM from Data.Traversable -mapM_ from Data.Foldable -mapMaybe from Data.Maybe -mappend from GHC.Base -mask from GHC.IO -mask_ from GHC.IO -max from GHC.Classes -maxBound from GHC.Enum -maxInt from GHC.Base -maximum from Data.Foldable -maximumBy from Data.Foldable -maximumDef from Protolude.Safe -maximumMay from Protolude.Safe -maybe from Data.Maybe -maybeEmpty from Protolude.Either -maybeToEither from Protolude.Either -maybeToLeft from Protolude.Either -maybeToList from Data.Maybe -maybeToRight from Protolude.Either -mconcat from GHC.Base -mempty from GHC.Base -mfilter from Control.Monad -min from GHC.Classes -minBound from GHC.Enum -minInt from GHC.Base -minimum from Data.Foldable -minimumBy from Data.Foldable -minimumDef from Protolude.Safe -minimumMay from Protolude.Safe -mkPolar from Data.Complex -mkWeakMVar from Control.Concurrent.MVar -mkWeakThreadId from GHC.Conc.Sync -mod from GHC.Real -modify from Control.Monad.State.Class -modifyMVar from Control.Concurrent.MVar -modifyMVarMasked from Control.Concurrent.MVar -modifyMVarMasked_ from Control.Concurrent.MVar -modifyMVar_ from Control.Concurrent.MVar -moduleName from GHC.Generics -mplus from GHC.Base -msum from Data.Foldable -mtimesDefault from Data.Semigroup -myThreadId from GHC.Conc.Sync -mzero from GHC.Base -natVal from GHC.TypeLits -negate from GHC.Num -newChan from Control.Concurrent.Chan -newEmptyMVar from GHC.MVar -newMVar from GHC.MVar -newQSem from Control.Concurrent.QSem -newQSemN from Control.Concurrent.QSemN -nonEmpty from Data.List.NonEmpty -not from GHC.Classes -notANumber from GHC.Real -notElem from Data.Foldable -notImplemented from Debug -note from Protolude.Exceptions -null from Data.Foldable -numerator from GHC.Real -numericEnumFrom from GHC.Real -numericEnumFromThen from GHC.Real -numericEnumFromThenTo from GHC.Real -numericEnumFromTo from GHC.Real -objectName from GHC.ExecutionStack.Internal -odd from GHC.Real -on from Data.Function -onException from Control.Exception.Base -one from Protolude.Semiring -openFile from GHC.IO.Handle.FD -option from Data.Semigroup -optional from Control.Applicative -or from Data.Foldable -orAlt from Protolude.Applicative -orElse from GHC.Conc.Sync -orEmpty from Protolude.Applicative -ord from GHC.Base -ordNub from Protolude.List -otherwise from GHC.Base -overflowError from GHC.Real -packageName from GHC.Generics -panic from Protolude.Panic -partitionEithers from Data.Either -pass from Protolude -permutations from Data.OldList -phase from Data.Complex -pi from GHC.Float -polar from Data.Complex -poll from Control.Concurrent.Async -popCount from Data.Bits -popCountDefault from Data.Bits -pred from GHC.Enum -prettyCallStack from GHC.Exception -prettySrcLoc from GHC.Exception -print from Protolude -product from Protolude.List -properFraction from GHC.Real -pure from GHC.Base -purer from Protolude.Applicative -put from Control.Monad.State.Class -putByteString from Protolude.Show -putErrLn from Protolude.Show -putErrText from Protolude.Show -putLByteString from Protolude.Show -putLText from Protolude.Show -putMVar from GHC.MVar -putStr from Protolude.Show -putStrLn from Protolude.Show -putText from Protolude.Show -quot from GHC.Real -quotRem from GHC.Real -race from Control.Concurrent.Async -race_ from Control.Concurrent.Async -ratioPrec from GHC.Real -ratioPrec1 from GHC.Real -ratioZeroDenominatorError from GHC.Real -readChan from Control.Concurrent.Chan -readEither from Protolude -readFile from Data.Text.IO -readMVar from GHC.MVar -readMaybe from Protolude -reader from Control.Monad.Reader.Class -reads from Text.Read -realPart from Data.Complex -realToFrac from GHC.Real -recip from GHC.Real -reduce from GHC.Real -rem from GHC.Real -repeat from GHC.List -replace from Data.Text.Encoding.Error -replicate from GHC.List -replicateM from Control.Monad -replicateM_ from Control.Monad -repr from Data.Type.Coercion -retry from GHC.Conc.Sync -return from GHC.Base -reverse from GHC.List -rightToMaybe from Protolude.Either -rights from Data.Either -rnf from Control.DeepSeq -rotate from Data.Bits -rotateL from Data.Bits -rotateR from Data.Bits -round from GHC.Real -rtsSupportsBoundThreads from Control.Concurrent -runConcurrently from Control.Concurrent.Async -runExcept from Control.Monad.Trans.Except -runExceptT from Control.Monad.Trans.Except -runIdentity from Data.Functor.Identity -runInBoundThread from Control.Concurrent -runInUnboundThread from Control.Concurrent -runReader from Control.Monad.Trans.Reader -runReaderT from Control.Monad.Trans.Reader -runST from GHC.ST -runState from Control.Monad.Trans.State.Lazy -runStateT from Control.Monad.Trans.State.Lazy -scaleFloat from GHC.Float -scanl from GHC.List -scanl' from GHC.List -scanr from GHC.List -sconcat from Data.Semigroup -second from Data.Bifunctor -selDecidedStrictness from GHC.Generics -selName from GHC.Generics -selSourceStrictness from GHC.Generics -selSourceUnpackedness from GHC.Generics -seq from GHC.Prim -sequence from Data.Traversable -sequenceA from Data.Traversable -sequenceA_ from Data.Foldable -sequence_ from Data.Foldable -setBit from Data.Bits -setNumCapabilities from GHC.Conc.Sync -shift from Data.Bits -shiftL from Data.Bits -shiftR from Data.Bits -show from Protolude -showStackTrace from GHC.ExecutionStack -signalQSem from Control.Concurrent.QSem -signalQSemN from Control.Concurrent.QSemN -significand from GHC.Float -signum from GHC.Num -sin from GHC.Float -sinh from GHC.Float -snd from Data.Tuple -some from GHC.Base -someNatVal from GHC.TypeLits -someSymbolVal from GHC.TypeLits -sort from Data.OldList -sortBy from Data.OldList -sortOn from Protolude.List -sourceColumn from GHC.ExecutionStack.Internal -sourceFile from GHC.ExecutionStack.Internal -sourceLine from GHC.ExecutionStack.Internal -splitAt from GHC.List -sqrt from GHC.Float -srcLoc from GHC.ExecutionStack.Internal -state from Control.Monad.State.Class -stderr from GHC.IO.Handle.FD -stdin from GHC.IO.Handle.FD -stdout from GHC.IO.Handle.FD -stimes from Data.Semigroup -stimesIdempotent from Data.Semigroup -stimesIdempotentMonoid from Data.Semigroup -stimesMonoid from Data.Semigroup -strConv from Protolude.Conv -strictDecode from Data.Text.Encoding.Error -subsequences from Data.OldList -subtract from GHC.Num -succ from GHC.Enum -sum from Protolude.List -swap from Data.Tuple -swapMVar from Control.Concurrent.MVar -sym from Data.Type.Equality -symbolVal from GHC.TypeLits -tailDef from Protolude.Safe -tailMay from Protolude.Safe -tailSafe from Protolude.Safe -tails from Data.OldList -take from GHC.List -takeMVar from GHC.MVar -takeWhile from GHC.List -tan from GHC.Float -tanh from GHC.Float -testBit from Data.Bits -testBitDefault from Data.Bits -threadCapability from GHC.Conc.Sync -threadDelay from GHC.Conc.IO -threadWaitRead from Control.Concurrent -threadWaitReadSTM from Control.Concurrent -threadWaitWrite from Control.Concurrent -threadWaitWriteSTM from Control.Concurrent -throwE from Control.Monad.Trans.Except -throwError from Control.Monad.Error.Class -throwIO from Protolude -throwSTM from GHC.Conc.Sync -throwTo from Protolude -to from GHC.Generics -toEnum from GHC.Enum -toException from GHC.Exception -toInteger from GHC.Real -toIntegralSized from Data.Bits -toList from Data.Foldable -toRational from GHC.Real -toS from Protolude.Conv -toSL from Protolude.Conv -toStrict from Data.Text.Lazy -trace from Debug -traceIO from Debug -traceId from Debug -traceM from Debug -traceShow from Debug -traceShowId from Debug -traceShowM from Debug -trans from Data.Type.Equality -transpose from Data.OldList -traverse from Data.Traversable -traverse_ from Data.Foldable -truncate from GHC.Real -try from Control.Exception.Base -tryIO from Protolude.Exceptions -tryJust from Control.Exception.Base -tryPutMVar from GHC.MVar -tryReadMVar from GHC.MVar -tryTakeMVar from GHC.MVar -typeRep from Data.Typeable.Internal -unComp1 from GHC.Generics -unGetChan from Control.Concurrent.Chan -unK1 from GHC.Generics -unM1 from GHC.Generics -uncons from Protolude -uncurry from Data.Tuple -undefined from Debug -unfoldr from Data.OldList -uninterruptibleMask from GHC.IO -uninterruptibleMask_ from GHC.IO -unless from Control.Monad -unlessM from Protolude.Bool -unlines from Data.Text -unsnoc from Protolude -until from GHC.Base -unwords from Data.Text -unzip from GHC.List -vacuous from Data.Void -void from Data.Functor -wait from Control.Concurrent.Async -waitAny from Control.Concurrent.Async -waitAnyCancel from Control.Concurrent.Async -waitAnyCatch from Control.Concurrent.Async -waitAnyCatchCancel from Control.Concurrent.Async -waitBoth from Control.Concurrent.Async -waitCatch from Control.Concurrent.Async -waitEither from Control.Concurrent.Async -waitEitherCancel from Control.Concurrent.Async -waitEitherCatch from Control.Concurrent.Async -waitEitherCatchCancel from Control.Concurrent.Async -waitEither_ from Control.Concurrent.Async -waitQSem from Control.Concurrent.QSem -waitQSemN from Control.Concurrent.QSemN -when from GHC.Base -whenM from Protolude.Bool -withAsync from Control.Concurrent.Async -withAsyncBound from Control.Concurrent.Async -withAsyncOn from Control.Concurrent.Async -withExcept from Control.Monad.Trans.Except -withExceptT from Control.Monad.Trans.Except -withFile from System.IO -withFrozenCallStack from GHC.Stack -withMVar from Control.Concurrent.MVar -withMVarMasked from Control.Concurrent.MVar -withState from Control.Monad.Trans.State.Lazy -witness from Debug -words from Data.Text -writeChan from Control.Concurrent.Chan -writeFile from Data.Text.IO -writeList2Chan from Control.Concurrent.Chan -xor from Data.Bits -zero from Protolude.Semiring -zeroBits from Data.Bits -zip from GHC.List -zipWith from GHC.List -zipWithM from Control.Monad -zipWithM_ from Control.Monad -|| from GHC.Classes -||^ from Protolude.Bool diff --git a/src/protolude/export_lists/protolude-9.exports b/src/protolude/export_lists/protolude-9.exports deleted file mode 100644 index d347ffca6f..0000000000 --- a/src/protolude/export_lists/protolude-9.exports +++ /dev/null @@ -1,956 +0,0 @@ -$ from GHC.Base -$! from Protolude.Base -$!! from Control.DeepSeq -$> from Data.Functor -% from GHC.Real -& from Data.Function -&& from GHC.Classes -&&^ from Protolude.Bool -* from GHC.Num -* from GHC.Types -** from GHC.Float -*> from GHC.Base -+ from GHC.Num -++ from GHC.Base -- from GHC.Num -. from GHC.Base -.&. from Data.Bits -.|. from Data.Bits -/ from GHC.Real -/= from GHC.Classes -:% from GHC.Real -:*: from GHC.Generics -:*: from GHC.Generics -:+ from Data.Complex -:+: from GHC.Generics -:.: from GHC.Generics -:| from Data.List.NonEmpty -:~: from Data.Type.Equality -< from GHC.Classes -<$ from GHC.Base -<$!> from Control.Monad -<$> from Data.Functor -<&&> from Protolude.Bool -<&> from Protolude.Functor -<* from GHC.Base -<**> from GHC.Base -<*> from GHC.Base -<.> from Protolude.Semiring -<<$>> from Protolude.Functor -<<*>> from Protolude.Applicative -<= from GHC.Classes -<=< from Control.Monad -<> from Data.Monoid -<|> from GHC.Base -<||> from Protolude.Bool -=<< from GHC.Base -== from GHC.Classes -== from Data.Type.Equality -> from GHC.Classes ->= from GHC.Classes ->=> from Control.Monad ->> from GHC.Base ->>= from GHC.Base -All from Data.Monoid -All from Data.Monoid -AllocationLimitExceeded from GHC.IO.Exception -AllocationLimitExceeded from GHC.IO.Exception -Alt from Data.Monoid -Alt from Data.Monoid -Alternative from GHC.Base -Any from Data.Monoid -Any from Data.Monoid -AppendMode from GHC.IO.IOMode -Applicative from GHC.Base -ArithException from GHC.Exception -ArrayException from GHC.IO.Exception -AssertionFailed from GHC.IO.Exception -AssertionFailed from GHC.IO.Exception -Associativity from GHC.Generics -Async from Control.Concurrent.Async -AsyncException from GHC.IO.Exception -Bifunctor from Data.Bifunctor -Bits from Data.Bits -BlockedIndefinitelyOnMVar from GHC.IO.Exception -BlockedIndefinitelyOnMVar from GHC.IO.Exception -BlockedIndefinitelyOnSTM from GHC.IO.Exception -BlockedIndefinitelyOnSTM from GHC.IO.Exception -Bool from GHC.Types -Bounded from GHC.Enum -ByteString from Data.ByteString.Internal -C1 from GHC.Generics -CallStack from GHC.Stack.Types -Chan from Control.Concurrent.Chan -Char from GHC.Types -CmpNat from GHC.TypeLits -Coercible from GHC.Types -Coercion from Data.Type.Coercion -Coercion from Data.Type.Coercion -Comp1 from GHC.Generics -Complex from Data.Complex -Concurrently from Control.Concurrent.Async -Concurrently from Control.Concurrent.Async -Const from Data.Functor.Const -Const from Data.Functor.Const -Constraint from GHC.Types -Constructor from GHC.Generics -D# from GHC.Types -D1 from GHC.Generics -Datatype from GHC.Generics -Deadlock from GHC.IO.Exception -Deadlock from GHC.IO.Exception -Denormal from GHC.Exception -DivideByZero from GHC.Exception -Double from GHC.Types -Down from Data.Ord -Down from Data.Ord -Dual from Data.Monoid -Dual from Data.Monoid -EQ from GHC.Types -Either from Data.Either -Endo from Data.Monoid -Endo from Data.Monoid -Enum from GHC.Enum -Eq from GHC.Classes -ErrorCall from GHC.Exception -ErrorCall from GHC.Exception -ErrorCallWithLocation from GHC.Exception -Except from Control.Monad.Trans.Except -ExceptT from Control.Monad.Trans.Except -ExceptT from Control.Monad.Trans.Except -Exception from GHC.Exception -ExitCode from GHC.IO.Exception -ExitFailure from GHC.IO.Exception -ExitSuccess from GHC.IO.Exception -F# from GHC.Types -False from GHC.Types -FatalError from Protolude.Panic -FatalError from Protolude.Panic -FilePath from GHC.IO -FiniteBits from Data.Bits -First from Data.Monoid -First from Data.Monoid -Fixity from GHC.Generics -FixityI from GHC.Generics -Float from GHC.Types -Floating from GHC.Float -Foldable from Data.Foldable -Fractional from GHC.Real -FunPtr from GHC.Ptr -Functor from GHC.Base -GT from GHC.Types -Generic from GHC.Generics -Generic1 from GHC.Generics -Handle from GHC.IO.Handle.Types -HasCallStack from GHC.Stack.Types -Hashable from Data.Hashable.Class -HeapOverflow from GHC.IO.Exception -IO from GHC.Types -IOException from GHC.IO.Exception -IOMode from GHC.IO.IOMode -Identity from Data.Functor.Identity -Identity from Data.Functor.Identity -IndexOutOfBounds from GHC.IO.Exception -Infix from GHC.Generics -InfixI from GHC.Generics -Int from GHC.Types -Int16 from GHC.Int -Int32 from GHC.Int -Int64 from GHC.Int -Int8 from GHC.Int -IntMap from Data.IntMap.Base -IntPtr from Foreign.Ptr -IntSet from Data.IntSet.Base -Integer from GHC.Integer.Type -Integral from GHC.Real -IsLabel from GHC.OverloadedLabels -IsString from Data.String -Just from GHC.Base -K1 from GHC.Generics -K1 from GHC.Generics -KnownNat from GHC.TypeLits -KnownSymbol from GHC.TypeLits -L1 from GHC.Generics -LByteString from Protolude -LT from GHC.Types -LText from Protolude -Last from Data.Monoid -Last from Data.Monoid -Left from Data.Either -LeftAssociative from GHC.Generics -Leniency from Protolude.Conv -Lenient from Protolude.Conv -Location from GHC.ExecutionStack.Internal -Location from GHC.ExecutionStack.Internal -LossOfPrecision from GHC.Exception -M1 from GHC.Generics -M1 from GHC.Generics -MVar from GHC.MVar -Map from Data.Map.Base -MaskedInterruptible from GHC.IO -MaskedUninterruptible from GHC.IO -MaskingState from GHC.IO -Maybe from GHC.Base -Meta from GHC.Generics -MetaCons from GHC.Generics -MetaData from GHC.Generics -MetaSel from GHC.Generics -Monad from GHC.Base -MonadError from Control.Monad.Error.Class -MonadIO from Control.Monad.IO.Class -MonadPlus from GHC.Base -MonadReader from Control.Monad.Reader.Class -MonadState from Control.Monad.State.Class -Monoid from GHC.Base -NFData from Control.DeepSeq -Nat from GHC.Types -NestedAtomically from Control.Exception.Base -NestedAtomically from Control.Exception.Base -NoMethodError from Control.Exception.Base -NoMethodError from Control.Exception.Base -NonEmpty from Data.List.NonEmpty -NonTermination from Control.Exception.Base -NonTermination from Control.Exception.Base -NotAssociative from GHC.Generics -Nothing from GHC.Base -Num from GHC.Num -OnDecodeError from Data.Text.Encoding.Error -OnError from Data.Text.Encoding.Error -Option from Data.Semigroup -Option from Data.Semigroup -Ord from GHC.Classes -Ordering from GHC.Types -Overflow from GHC.Exception -PatternMatchFail from Control.Exception.Base -PatternMatchFail from Control.Exception.Base -Prefix from GHC.Generics -PrefixI from GHC.Generics -Print from Protolude.Show -Product from Data.Monoid -Product from Data.Monoid -Proxy from Data.Proxy -Proxy from Data.Proxy -Ptr from GHC.Ptr -QSem from Control.Concurrent.QSem -QSemN from Control.Concurrent.QSemN -R1 from GHC.Generics -Ratio from GHC.Real -RatioZeroDenominator from GHC.Exception -Rational from GHC.Real -Read from GHC.Read -ReadMode from GHC.IO.IOMode -ReadWriteMode from GHC.IO.IOMode -Reader from Control.Monad.Trans.Reader -ReaderT from Control.Monad.Trans.Reader -ReaderT from Control.Monad.Trans.Reader -Real from GHC.Real -RealFloat from GHC.Float -RealFrac from GHC.Real -Rec0 from GHC.Generics -RecConError from Control.Exception.Base -RecConError from Control.Exception.Base -RecSelError from Control.Exception.Base -RecSelError from Control.Exception.Base -RecUpdError from Control.Exception.Base -RecUpdError from Control.Exception.Base -Refl from Data.Type.Equality -Rep from GHC.Generics -Right from Data.Either -RightAssociative from GHC.Generics -S1 from GHC.Generics -ST from GHC.ST -STM from GHC.Conc.Sync -Selector from GHC.Generics -Semigroup from Data.Semigroup -Semiring from Protolude.Semiring -Seq from Data.Sequence -Set from Data.Set.Base -Show from GHC.Show -SomeAsyncException from GHC.IO.Exception -SomeAsyncException from GHC.IO.Exception -SomeException from GHC.Exception -SomeException from GHC.Exception -SomeNat from GHC.TypeLits -SomeNat from GHC.TypeLits -SomeSymbol from GHC.TypeLits -SomeSymbol from GHC.TypeLits -SrcLoc from GHC.ExecutionStack.Internal -SrcLoc from GHC.ExecutionStack.Internal -StablePtr from GHC.Stable -StackOverflow from GHC.IO.Exception -State from Control.Monad.Trans.State.Lazy -StateT from Control.Monad.Trans.State.Lazy -StateT from Control.Monad.Trans.State.Lazy -StaticPtr from GHC.StaticPtr -Storable from Foreign.Storable -Strict from Protolude.Conv -StringConv from Protolude.Conv -Sum from Data.Monoid -Sum from Data.Monoid -Symbol from GHC.Types -Text from Data.Text.Internal -ThreadId from GHC.Conc.Sync -ThreadKilled from GHC.IO.Exception -Traversable from Data.Traversable -True from GHC.Types -Type from GHC.Types -TypeError from Control.Exception.Base -TypeError from Control.Exception.Base -TypeRep from Data.Typeable.Internal -Typeable from Data.Typeable.Internal -U1 from GHC.Generics -U1 from GHC.Generics -URec from GHC.Generics -UndefinedElement from GHC.IO.Exception -Underflow from GHC.Exception -UnicodeException from Data.Text.Encoding.Error -Unmasked from GHC.IO -UserInterrupt from GHC.IO.Exception -V1 from GHC.Generics -Void from Data.Void -Word from GHC.Types -Word16 from GHC.Word -Word32 from GHC.Word -Word64 from GHC.Word -Word8 from GHC.Word -WordPtr from Foreign.Ptr -WrappedMonoid from Data.Semigroup -WriteMode from GHC.IO.IOMode -ZipList from Control.Applicative -ZipList from Control.Applicative -^ from GHC.Real -^%^ from GHC.Real -^^ from GHC.Real -^^%^^ from GHC.Real -abs from GHC.Num -absurd from Data.Void -acos from GHC.Float -acosh from GHC.Float -addMVarFinalizer from Control.Concurrent.MVar -all from Data.Foldable -allowInterrupt from Control.Exception -always from GHC.Conc.Sync -alwaysSucceeds from GHC.Conc.Sync -and from Data.Foldable -any from Data.Foldable -ap from GHC.Base -appEndo from Data.Monoid -appendFile from Data.Text.IO -applyN from Protolude -asTypeOf from GHC.Base -asin from GHC.Float -asinh from GHC.Float -ask from Control.Monad.Reader.Class -asks from Control.Monad.Reader.Class -asum from Data.Foldable -async from Control.Concurrent.Async -asyncBound from Control.Concurrent.Async -asyncExceptionFromException from GHC.IO.Exception -asyncExceptionToException from GHC.IO.Exception -asyncOn from Control.Concurrent.Async -asyncThreadId from Control.Concurrent.Async -atDef from Protolude.Safe -atMay from Protolude.Safe -atan from GHC.Float -atan2 from GHC.Float -atanh from GHC.Float -atomically from GHC.Conc.Sync -bimap from Data.Bifunctor -bit from Data.Bits -bitDefault from Data.Bits -bitSize from Data.Bits -bitSizeMaybe from Data.Bits -bool from Protolude.Bool -boundedEnumFrom from GHC.Enum -boundedEnumFromThen from GHC.Enum -bracket from Control.Exception.Base -bracketOnError from Control.Exception.Base -bracket_ from Control.Exception.Base -break from GHC.List -byteSwap16 from GHC.Word -byteSwap32 from GHC.Word -byteSwap64 from GHC.Word -callStack from GHC.Stack -cancel from Control.Concurrent.Async -cancelWith from Control.Concurrent.Async -cast from Data.Typeable -castWith from Data.Type.Equality -catMaybes from Data.Maybe -catch from Control.Exception.Base -catchE from Control.Monad.Trans.Except -catchError from Control.Monad.Error.Class -catchJust from Control.Exception.Base -catchSTM from GHC.Conc.Sync -catches from Control.Exception -ceiling from GHC.Real -check from Control.Monad.STM -chr from GHC.Char -cis from Data.Complex -clearBit from Data.Bits -coerceWith from Data.Type.Coercion -compare from GHC.Classes -comparing from Data.Ord -complement from Data.Bits -complementBit from Data.Bits -conFixity from GHC.Generics -conIsRecord from GHC.Generics -conName from GHC.Generics -concat from Data.Foldable -concatMap from Data.Foldable -concatMapM from Protolude.Monad -concurrently from Control.Concurrent.Async -conjugate from Data.Complex -const from GHC.Base -cos from GHC.Float -cosh from GHC.Float -countLeadingZeros from Data.Bits -countTrailingZeros from Data.Bits -currentCallStack from GHC.Stack.CCS -curry from Data.Tuple -cycle from GHC.List -cycle1 from Data.Semigroup -datatypeName from GHC.Generics -decodeFloat from GHC.Float -decodeUtf8 from Data.Text.Encoding -decodeUtf8' from Data.Text.Encoding -decodeUtf8With from Data.Text.Encoding -deepseq from Control.DeepSeq -denominator from GHC.Real -die from Protolude -diff from Data.Semigroup -displayException from GHC.Exception -div from GHC.Real -divMod from GHC.Real -divZeroError from GHC.Real -drop from GHC.List -dropWhile from GHC.List -dupChan from Control.Concurrent.Chan -either from Data.Either -eitherA from Protolude.Applicative -elem from Data.Foldable -empty from GHC.Base -encodeFloat from GHC.Float -encodeUtf8 from Data.Text.Encoding -enumFrom from GHC.Enum -enumFromThen from GHC.Enum -enumFromThenTo from GHC.Enum -enumFromTo from GHC.Enum -eqT from Data.Typeable -evalState from Control.Monad.Trans.State.Lazy -evalStateT from Control.Monad.Trans.State.Lazy -evaluate from GHC.IO -even from GHC.Real -execState from Control.Monad.Trans.State.Lazy -execStateT from Control.Monad.Trans.State.Lazy -exitFailure from System.Exit -exitSuccess from System.Exit -exitWith from System.Exit -exp from GHC.Float -expm1 from GHC.Float -exponent from GHC.Float -fatalErrorMessage from Protolude.Panic -filter from GHC.List -filterM from Control.Monad -finally from Control.Exception.Base -find from Data.Foldable -finiteBitSize from Data.Bits -first from Data.Bifunctor -fix from Data.Function -fixST from GHC.ST -flip from GHC.Base -floatDigits from GHC.Float -floatRadix from GHC.Float -floatRange from GHC.Float -floor from GHC.Real -fmap from GHC.Base -fmapDefault from Data.Traversable -fold from Data.Foldable -foldM from Control.Monad -foldM_ from Control.Monad -foldMap from Data.Foldable -foldMapDefault from Data.Traversable -foldl from Data.Foldable -foldl' from Data.Foldable -foldl1May from Protolude.Safe -foldl1May' from Protolude.Safe -foldlM from Data.Foldable -foldr from Data.Foldable -foldr' from Data.Foldable -foldr1May from Protolude.Safe -foldrM from Data.Foldable -for from Data.Traversable -forM from Data.Traversable -forM_ from Data.Foldable -for_ from Data.Foldable -force from Control.DeepSeq -foreach from Protolude.Functor -forever from Control.Monad -forkFinally from Control.Concurrent -forkIO from GHC.Conc.Sync -forkIOWithUnmask from GHC.Conc.Sync -forkOS from Control.Concurrent -forkOSWithUnmask from Control.Concurrent -forkOn from GHC.Conc.Sync -forkOnWithUnmask from GHC.Conc.Sync -from from GHC.Generics -fromEnum from GHC.Enum -fromException from GHC.Exception -fromInteger from GHC.Num -fromIntegral from GHC.Real -fromLabel from GHC.OverloadedLabels -fromLeft from Protolude.Either -fromMaybe from Data.Maybe -fromRational from GHC.Real -fromRight from Protolude.Either -fromStrict from Data.Text.Lazy -fst from Data.Tuple -functionName from GHC.ExecutionStack.Internal -gcastWith from Data.Type.Equality -gcd from GHC.Real -gcdInt' from GHC.Real -gcdWord' from GHC.Real -genericDrop from Data.OldList -genericLength from Data.OldList -genericReplicate from Data.OldList -genericSplitAt from Data.OldList -genericTake from Data.OldList -get from Control.Monad.State.Class -getAll from Data.Monoid -getAlt from Data.Monoid -getAny from Data.Monoid -getArgs from System.Environment -getCallStack from GHC.Stack.Types -getChanContents from Control.Concurrent.Chan -getConst from Data.Functor.Const -getContents from Data.Text.IO -getDual from Data.Monoid -getFirst from Data.Monoid -getLast from Data.Monoid -getLine from Data.Text.IO -getMaskingState from GHC.IO -getNumCapabilities from GHC.Conc.Sync -getOption from Data.Semigroup -getProduct from Data.Monoid -getStackTrace from GHC.ExecutionStack -getSum from Data.Monoid -getZipList from Control.Applicative -gets from Control.Monad.State.Class -group from Data.OldList -groupBy from Data.OldList -guard from Control.Monad -guardM from Protolude.Bool -guarded from Protolude -guardedA from Protolude -hPutStr from Protolude.Show -hPutStrLn from Protolude.Show -handle from Control.Exception.Base -handleJust from Control.Exception.Base -hash from Data.Hashable.Class -hashUsing from Data.Hashable.Class -hashWithSalt from Data.Hashable.Class -head from Protolude.List -headDef from Protolude.Safe -headMay from Protolude.Safe -hush from Protolude.Exceptions -identity from Protolude -ifM from Protolude.Bool -ignore from Data.Text.Encoding.Error -imagPart from Data.Complex -infinity from GHC.Real -initDef from Protolude.Safe -initMay from Protolude.Safe -initSafe from Protolude.Safe -inits from Data.OldList -integralEnumFrom from GHC.Real -integralEnumFromThen from GHC.Real -integralEnumFromThenTo from GHC.Real -integralEnumFromTo from GHC.Real -interact from Data.Text.IO -intercalate from Data.OldList -interruptible from GHC.IO -intersperse from Data.OldList -ioError from GHC.IO.Exception -isCurrentThreadBound from Control.Concurrent -isDenormalized from GHC.Float -isEmptyChan from Control.Concurrent.Chan -isEmptyMVar from GHC.MVar -isIEEE from GHC.Float -isInfinite from GHC.Float -isJust from Data.Maybe -isLeft from Data.Either -isNaN from GHC.Float -isNegativeZero from GHC.Float -isNewtype from GHC.Generics -isNothing from Data.Maybe -isPrefixOf from Data.OldList -isRight from Data.Either -isSigned from Data.Bits -iterate from GHC.List -join from GHC.Base -killThread from GHC.Conc.Sync -lastDef from Protolude.Safe -lastMay from Protolude.Safe -lcm from GHC.Real -leftToMaybe from Protolude.Either -lefts from Data.Either -length from Data.Foldable -lenientDecode from Data.Text.Encoding.Error -lift from Control.Monad.Trans.Class -liftA from GHC.Base -liftA2 from GHC.Base -liftA3 from GHC.Base -liftAA2 from Protolude.Applicative -liftIO from Control.Monad.IO.Class -liftIO1 from Protolude -liftIO2 from Protolude -liftM from GHC.Base -liftM' from Protolude.Monad -liftM2 from GHC.Base -liftM2' from Protolude.Monad -liftM3 from GHC.Base -liftM4 from GHC.Base -liftM5 from GHC.Base -lines from Data.Text -link from Control.Concurrent.Async -link2 from Control.Concurrent.Async -list from Protolude.List -listToMaybe from Data.Maybe -local from Control.Monad.Reader.Class -log from GHC.Float -log1mexp from GHC.Float -log1p from GHC.Float -log1pexp from GHC.Float -logBase from GHC.Float -magnitude from Data.Complex -many from GHC.Base -map from Protolude -mapAccumL from Data.Traversable -mapAccumR from Data.Traversable -mapAndUnzipM from Control.Monad -mapExcept from Control.Monad.Trans.Except -mapExceptT from Control.Monad.Trans.Except -mapException from Control.Exception.Base -mapM from Data.Traversable -mapM_ from Data.Foldable -mapMaybe from Data.Maybe -mappend from GHC.Base -mask from GHC.IO -mask_ from GHC.IO -max from GHC.Classes -maxBound from GHC.Enum -maxInt from GHC.Base -maximum from Data.Foldable -maximumBy from Data.Foldable -maximumDef from Protolude.Safe -maximumMay from Protolude.Safe -maybe from Data.Maybe -maybeEmpty from Protolude.Either -maybeToEither from Protolude.Either -maybeToLeft from Protolude.Either -maybeToList from Data.Maybe -maybeToRight from Protolude.Either -mconcat from GHC.Base -mempty from GHC.Base -mfilter from Control.Monad -min from GHC.Classes -minBound from GHC.Enum -minInt from GHC.Base -minimum from Data.Foldable -minimumBy from Data.Foldable -minimumDef from Protolude.Safe -minimumMay from Protolude.Safe -mkPolar from Data.Complex -mkWeakMVar from Control.Concurrent.MVar -mkWeakThreadId from GHC.Conc.Sync -mod from GHC.Real -modify from Control.Monad.State.Class -modifyMVar from Control.Concurrent.MVar -modifyMVarMasked from Control.Concurrent.MVar -modifyMVarMasked_ from Control.Concurrent.MVar -modifyMVar_ from Control.Concurrent.MVar -moduleName from GHC.Generics -mplus from GHC.Base -msum from Data.Foldable -mtimesDefault from Data.Semigroup -myThreadId from GHC.Conc.Sync -mzero from GHC.Base -natVal from GHC.TypeLits -negate from GHC.Num -newChan from Control.Concurrent.Chan -newEmptyMVar from GHC.MVar -newMVar from GHC.MVar -newQSem from Control.Concurrent.QSem -newQSemN from Control.Concurrent.QSemN -nonEmpty from Data.List.NonEmpty -not from GHC.Classes -notANumber from GHC.Real -notElem from Data.Foldable -notImplemented from Debug -note from Protolude.Exceptions -null from Data.Foldable -numerator from GHC.Real -numericEnumFrom from GHC.Real -numericEnumFromThen from GHC.Real -numericEnumFromThenTo from GHC.Real -numericEnumFromTo from GHC.Real -objectName from GHC.ExecutionStack.Internal -odd from GHC.Real -on from Data.Function -onException from Control.Exception.Base -one from Protolude.Semiring -openFile from GHC.IO.Handle.FD -option from Data.Semigroup -optional from Control.Applicative -or from Data.Foldable -orAlt from Protolude.Applicative -orElse from GHC.Conc.Sync -orEmpty from Protolude.Applicative -ord from GHC.Base -ordNub from Protolude.List -otherwise from GHC.Base -overflowError from GHC.Real -packageName from GHC.Generics -panic from Protolude.Panic -partitionEithers from Data.Either -pass from Protolude -permutations from Data.OldList -phase from Data.Complex -pi from GHC.Float -polar from Data.Complex -poll from Control.Concurrent.Async -popCount from Data.Bits -popCountDefault from Data.Bits -pred from GHC.Enum -prettyCallStack from GHC.Exception -prettySrcLoc from GHC.Exception -print from Protolude -product from Protolude.List -properFraction from GHC.Real -pure from GHC.Base -purer from Protolude.Applicative -put from Control.Monad.State.Class -putByteString from Protolude.Show -putErrLn from Protolude.Show -putErrText from Protolude.Show -putLByteString from Protolude.Show -putLText from Protolude.Show -putMVar from GHC.MVar -putStr from Protolude.Show -putStrLn from Protolude.Show -putText from Protolude.Show -quot from GHC.Real -quotRem from GHC.Real -race from Control.Concurrent.Async -race_ from Control.Concurrent.Async -ratioPrec from GHC.Real -ratioPrec1 from GHC.Real -ratioZeroDenominatorError from GHC.Real -readChan from Control.Concurrent.Chan -readEither from Protolude -readFile from Data.Text.IO -readMVar from GHC.MVar -readMaybe from Protolude -reader from Control.Monad.Reader.Class -reads from Text.Read -realPart from Data.Complex -realToFrac from GHC.Real -recip from GHC.Real -reduce from GHC.Real -rem from GHC.Real -repeat from GHC.List -replace from Data.Text.Encoding.Error -replicate from GHC.List -replicateM from Control.Monad -replicateM_ from Control.Monad -repr from Data.Type.Coercion -retry from GHC.Conc.Sync -return from GHC.Base -reverse from GHC.List -rightToMaybe from Protolude.Either -rights from Data.Either -rnf from Control.DeepSeq -rotate from Data.Bits -rotateL from Data.Bits -rotateR from Data.Bits -round from GHC.Real -rtsSupportsBoundThreads from Control.Concurrent -runConcurrently from Control.Concurrent.Async -runExcept from Control.Monad.Trans.Except -runExceptT from Control.Monad.Trans.Except -runIdentity from Data.Functor.Identity -runInBoundThread from Control.Concurrent -runInUnboundThread from Control.Concurrent -runReader from Control.Monad.Trans.Reader -runReaderT from Control.Monad.Trans.Reader -runST from GHC.ST -runState from Control.Monad.Trans.State.Lazy -runStateT from Control.Monad.Trans.State.Lazy -scaleFloat from GHC.Float -scanl from GHC.List -scanl' from GHC.List -scanr from GHC.List -sconcat from Data.Semigroup -second from Data.Bifunctor -selDecidedStrictness from GHC.Generics -selName from GHC.Generics -selSourceStrictness from GHC.Generics -selSourceUnpackedness from GHC.Generics -seq from GHC.Prim -sequence from Data.Traversable -sequenceA from Data.Traversable -sequenceA_ from Data.Foldable -sequence_ from Data.Foldable -setBit from Data.Bits -setNumCapabilities from GHC.Conc.Sync -shift from Data.Bits -shiftL from Data.Bits -shiftR from Data.Bits -show from Protolude -showStackTrace from GHC.ExecutionStack -signalQSem from Control.Concurrent.QSem -signalQSemN from Control.Concurrent.QSemN -significand from GHC.Float -signum from GHC.Num -sin from GHC.Float -sinh from GHC.Float -snd from Data.Tuple -some from GHC.Base -someNatVal from GHC.TypeLits -someSymbolVal from GHC.TypeLits -sort from Data.OldList -sortBy from Data.OldList -sortOn from Protolude.List -sourceColumn from GHC.ExecutionStack.Internal -sourceFile from GHC.ExecutionStack.Internal -sourceLine from GHC.ExecutionStack.Internal -splitAt from GHC.List -sqrt from GHC.Float -srcLoc from GHC.ExecutionStack.Internal -state from Control.Monad.State.Class -stderr from GHC.IO.Handle.FD -stdin from GHC.IO.Handle.FD -stdout from GHC.IO.Handle.FD -stimes from Data.Semigroup -stimesIdempotent from Data.Semigroup -stimesIdempotentMonoid from Data.Semigroup -stimesMonoid from Data.Semigroup -strConv from Protolude.Conv -strictDecode from Data.Text.Encoding.Error -subsequences from Data.OldList -subtract from GHC.Num -succ from GHC.Enum -sum from Protolude.List -swap from Data.Tuple -swapMVar from Control.Concurrent.MVar -sym from Data.Type.Equality -symbolVal from GHC.TypeLits -tailDef from Protolude.Safe -tailMay from Protolude.Safe -tailSafe from Protolude.Safe -tails from Data.OldList -take from GHC.List -takeMVar from GHC.MVar -takeWhile from GHC.List -tan from GHC.Float -tanh from GHC.Float -testBit from Data.Bits -testBitDefault from Data.Bits -threadCapability from GHC.Conc.Sync -threadDelay from GHC.Conc.IO -threadWaitRead from Control.Concurrent -threadWaitReadSTM from Control.Concurrent -threadWaitWrite from Control.Concurrent -threadWaitWriteSTM from Control.Concurrent -throwE from Control.Monad.Trans.Except -throwError from Control.Monad.Error.Class -throwIO from Protolude -throwSTM from GHC.Conc.Sync -throwTo from Protolude -to from GHC.Generics -toEnum from GHC.Enum -toException from GHC.Exception -toInteger from GHC.Real -toIntegralSized from Data.Bits -toList from Data.Foldable -toRational from GHC.Real -toS from Protolude.Conv -toSL from Protolude.Conv -toStrict from Data.Text.Lazy -trace from Debug -traceIO from Debug -traceId from Debug -traceM from Debug -traceShow from Debug -traceShowId from Debug -traceShowM from Debug -trans from Data.Type.Equality -transpose from Data.OldList -traverse from Data.Traversable -traverse_ from Data.Foldable -truncate from GHC.Real -try from Control.Exception.Base -tryIO from Protolude.Exceptions -tryJust from Control.Exception.Base -tryPutMVar from GHC.MVar -tryReadMVar from GHC.MVar -tryTakeMVar from GHC.MVar -typeRep from Data.Typeable.Internal -unComp1 from GHC.Generics -unGetChan from Control.Concurrent.Chan -unK1 from GHC.Generics -unM1 from GHC.Generics -uncons from Protolude -uncurry from Data.Tuple -undefined from Debug -unfoldr from Data.OldList -uninterruptibleMask from GHC.IO -uninterruptibleMask_ from GHC.IO -unless from Control.Monad -unlessM from Protolude.Bool -unlines from Data.Text -unsnoc from Protolude -until from GHC.Base -unwords from Data.Text -unzip from GHC.List -vacuous from Data.Void -void from Data.Functor -wait from Control.Concurrent.Async -waitAny from Control.Concurrent.Async -waitAnyCancel from Control.Concurrent.Async -waitAnyCatch from Control.Concurrent.Async -waitAnyCatchCancel from Control.Concurrent.Async -waitBoth from Control.Concurrent.Async -waitCatch from Control.Concurrent.Async -waitEither from Control.Concurrent.Async -waitEitherCancel from Control.Concurrent.Async -waitEitherCatch from Control.Concurrent.Async -waitEitherCatchCancel from Control.Concurrent.Async -waitEither_ from Control.Concurrent.Async -waitQSem from Control.Concurrent.QSem -waitQSemN from Control.Concurrent.QSemN -when from GHC.Base -whenM from Protolude.Bool -withAsync from Control.Concurrent.Async -withAsyncBound from Control.Concurrent.Async -withAsyncOn from Control.Concurrent.Async -withExcept from Control.Monad.Trans.Except -withExceptT from Control.Monad.Trans.Except -withFile from System.IO -withFrozenCallStack from GHC.Stack -withMVar from Control.Concurrent.MVar -withMVarMasked from Control.Concurrent.MVar -withState from Control.Monad.Trans.State.Lazy -witness from Debug -words from Data.Text -writeChan from Control.Concurrent.Chan -writeFile from Data.Text.IO -writeList2Chan from Control.Concurrent.Chan -xor from Data.Bits -zero from Protolude.Semiring -zeroBits from Data.Bits -zip from GHC.List -zipWith from GHC.List -zipWithM from Control.Monad -zipWithM_ from Control.Monad -|| from GHC.Classes -||^ from Protolude.Bool diff --git a/src/protolude/protolude.cabal b/src/protolude/protolude.cabal deleted file mode 100644 index 80ee3efd52..0000000000 --- a/src/protolude/protolude.cabal +++ /dev/null @@ -1,91 +0,0 @@ -name: protolude -version: 0.3.5 -synopsis: A small prelude. -description: A sensible set of defaults for writing custom Preludes. -homepage: https://github.com/sdiehl/protolude -license: MIT -license-file: LICENSE -author: Stephen Diehl -maintainer: adamwespiser@gmail.com, stephen.m.diehl@gmail.com -copyright: 2016-2022 Stephen Diehl -category: Prelude -build-type: Simple -cabal-version: >=1.10 -bug-reports: https://github.com/sdiehl/protolude/issues -tested-with: - GHC ==7.6.3 - || ==7.8.4 - || ==7.10.3 - || ==8.0.1 - || ==8.2.1 - || ==8.4.1 - || ==8.6.1 - || ==8.8.1 - || ==8.10.1 - || ==9.0.1 - || ==9.2.2 - || ==9.6.1 - || ==9.8.2 - || ==9.10.1 - || ==9.12.1 - -extra-source-files: - README.md - ChangeLog.md - -source-repository head - type: git - location: git@github.com:protolude/protolude.git - -library - exposed-modules: - Protolude - Protolude.Applicative - Protolude.Base - Protolude.Bifunctor - Protolude.Bool - Protolude.CallStack - Protolude.Conv - Protolude.ConvertText - Protolude.Debug - Protolude.Either - Protolude.Error - Protolude.Exceptions - Protolude.Functor - Protolude.List - Protolude.Monad - Protolude.Panic - Protolude.Partial - Protolude.Safe - Protolude.Semiring - Protolude.Show - Protolude.Unsafe - - default-extensions: - NoImplicitPrelude - FlexibleContexts - MultiParamTypeClasses - OverloadedStrings - - ghc-options: -Wall -fwarn-implicit-prelude - build-depends: - array >=0.4 && <0.6 - , async >=2.0 && <2.3 - , base >=4.6 && <4.22 - , bytestring >=0.10 && <0.13 - , containers >=0.5 && <0.8 - , deepseq >=1.3 && <1.6 - , ghc-prim >=0.3 && <0.14 - , hashable >=1.2 && <1.6 - , mtl >=2.1 && <2.4 - , mtl-compat >=0.2 && <0.3 - , stm >=2.4 && <2.6 - , text >=1.2 && <2.2 - , transformers >=0.2 && <0.7 - , transformers-compat >=0.4 && <0.8 - - if !impl(ghc >=8.0) - build-depends: fail ==4.9.* - - hs-source-dirs: src - default-language: Haskell2010 diff --git a/src/protolude/stack.yaml b/src/protolude/stack.yaml deleted file mode 100644 index 3694021d83..0000000000 --- a/src/protolude/stack.yaml +++ /dev/null @@ -1,7 +0,0 @@ -resolver: lts-14.0 -packages: -- '.' -extra-deps: -- fail-4.9.0.0 -flags: {} -extra-package-dbs: [] diff --git a/src/protolude/test_stack_lts.sh b/src/protolude/test_stack_lts.sh deleted file mode 100755 index 73603409d1..0000000000 --- a/src/protolude/test_stack_lts.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash -set -e - -stack build --resolver lts-4.0 -stack build --resolver lts-5.0 -stack build --resolver lts-6.0 -stack build --resolver lts-7.0 -stack build --resolver lts-8.0 -stack build --resolver lts-9.0 -stack build --resolver lts-10.0 -stack build --resolver lts-11.0 -stack build --resolver lts-12.0 -stack build --resolver lts-13.0 -stack build --resolver lts-14.0 -stack build --resolver lts-15.0 -stack build --resolver lts-16.0 -stack build --resolver lts-17.0 -stack build --resolver lts-18.0 -stack build --resolver lts-19.0 From a2faa667f3870bb37b22f4f67eed92ac671b41df Mon Sep 17 00:00:00 2001 From: Taimoor Zaeem Date: Thu, 30 Apr 2026 19:56:33 +0500 Subject: [PATCH 294/295] chore: build postgrest with vendored protolude Signed-off-by: Taimoor Zaeem --- postgrest.cabal | 58 +++++++++++++++++++++++++++++--- src/protolude/Protolude/Error.hs | 2 +- src/protolude/Protolude/Panic.hs | 3 +- 3 files changed, 55 insertions(+), 8 deletions(-) diff --git a/postgrest.cabal b/postgrest.cabal index 2a819d80bf..19ad691319 100644 --- a/postgrest.cabal +++ b/postgrest.cabal @@ -136,7 +136,7 @@ library , parsec >= 3.1.11 && < 3.2 , postgresql-libpq >= 0.10 , prometheus-client >= 1.1.1 && < 1.2.0 - , protolude >= 0.3.1 && < 0.4 + , protolude , regex-tdfa >= 1.2.2 && < 1.4 , retry >= 0.7.4 && < 0.10 , scientific >= 0.3.4 && < 0.4 @@ -180,6 +180,54 @@ library build-depends: unix +library protolude + visibility: private + default-language: Haskell2010 + default-extensions: NoImplicitPrelude + FlexibleContexts + MultiParamTypeClasses + OverloadedStrings + hs-source-dirs: src/protolude + exposed-modules: Protolude + Protolude.Applicative + Protolude.Base + Protolude.Bifunctor + Protolude.Bool + Protolude.CallStack + Protolude.Conv + Protolude.ConvertText + Protolude.Debug + Protolude.Either + Protolude.Error + Protolude.Exceptions + Protolude.Functor + Protolude.List + Protolude.Monad + Protolude.Panic + Protolude.Partial + Protolude.Safe + Protolude.Semiring + Protolude.Show + Protolude.Unsafe + build-depends: array >= 0.4 && < 0.6 + , async >= 2.0 && < 2.3 + , base >= 4.6 && < 4.22 + , bytestring >= 0.10.8 && < 0.13 + , containers >= 0.5.7 && < 0.8 + , deepseq >= 1.3 && < 1.6 + , ghc-prim >= 0.3 && < 0.14 + , hashable >= 1.2 && < 1.6 + , mtl >= 2.1 && < 2.4 + , mtl-compat >= 0.2 && < 0.3 + , stm >= 2.5 && < 3 + , text >= 1.2.2 && < 2.2 + , transformers >= 0.2 && < 0.7 + , transformers-compat >= 0.4 && < 0.8 + -- Protolude has some partial functions, so + -- it is fine to disable that specific warning + ghc-options: -Werror -Wall -fwarn-identities -Wno-x-partial + -fno-spec-constr -optP-Wno-nonportable-include-path + executable postgrest default-language: Haskell2010 default-extensions: OverloadedStrings @@ -189,7 +237,7 @@ executable postgrest build-depends: base >= 4.9 && < 4.22 , containers >= 0.5.7 && < 0.8 , postgrest - , protolude >= 0.3.1 && < 0.4 + , protolude ghc-options: -threaded -rtsopts "-with-rtsopts=-N -I0 -qg" -O2 -Werror -Wall -fwarn-identities -fno-spec-constr -optP-Wno-nonportable-include-path @@ -285,7 +333,7 @@ test-suite spec , postgrest , process >= 1.4.2 && < 1.7 , prometheus-client >= 1.1.1 && < 1.2.0 - , protolude >= 0.3.1 && < 0.4 + , protolude , regex-tdfa >= 1.2.2 && < 1.4 , scientific >= 0.3.4 && < 0.4 , text >= 1.2.2 && < 2.2 @@ -324,7 +372,7 @@ test-suite observability , jose-jwt >= 0.9.6 && < 0.11 , postgrest , prometheus-client >= 1.1.1 && < 1.2.0 - , protolude >= 0.3.1 && < 0.4 + , protolude , text >= 1.2.2 && < 2.2 , wai >= 3.2.1 && < 3.3 ghc-options: -threaded -O0 -Werror -Wall -fwarn-identities @@ -344,6 +392,6 @@ test-suite doctests , doctest >= 0.8 , postgrest , pretty-simple - , protolude >= 0.3.1 && < 0.4 + , protolude ghc-options: -threaded -O0 -Werror -Wall -fwarn-identities -fno-spec-constr -optP-Wno-nonportable-include-path diff --git a/src/protolude/Protolude/Error.hs b/src/protolude/Protolude/Error.hs index deb83fa3cd..3d9ada7eb6 100644 --- a/src/protolude/Protolude/Error.hs +++ b/src/protolude/Protolude/Error.hs @@ -4,7 +4,7 @@ {-# LANGUAGE ImplicitParams #-} {-# LANGUAGE ExistentialQuantification #-} #if ( __GLASGOW_HASKELL__ >= 800 ) -{-# LANGUAGE TypeInType #-} +{-# LANGUAGE DataKinds #-} #endif #if MIN_VERSION_base(4,9,0) diff --git a/src/protolude/Protolude/Panic.hs b/src/protolude/Protolude/Panic.hs index 92392a4145..217dac228a 100644 --- a/src/protolude/Protolude/Panic.hs +++ b/src/protolude/Protolude/Panic.hs @@ -14,12 +14,11 @@ module Protolude.Panic ( import Protolude.Base (Show) import Protolude.CallStack (HasCallStack) import Data.Text (Text) -import Data.Typeable (Typeable) import Control.Exception as X -- | Uncatchable exceptions thrown and never caught. newtype FatalError = FatalError { fatalErrorMessage :: Text } - deriving (Show, Typeable) + deriving (Show) instance Exception FatalError From a46ac79ea8b2a69138f4d8346662b611d479cbb6 Mon Sep 17 00:00:00 2001 From: Taimoor Zaeem Date: Thu, 30 Apr 2026 20:22:47 +0500 Subject: [PATCH 295/295] nix: exclude protolude from style checks Currently, our vendored protolude has many failing checks for style, lint and hsie. Temporarily excluding it. We should reinstate these checks later. Signed-off-by: Taimoor Zaeem --- nix/tools/style.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nix/tools/style.nix b/nix/tools/style.nix index f9c92afb32..563a4330b8 100644 --- a/nix/tools/style.nix +++ b/nix/tools/style.nix @@ -29,7 +29,8 @@ let # Format Haskell files # --vimgrep fixes a bug in ag: https://github.com/ggreer/the_silver_searcher/issues/753 - ${silver-searcher}/bin/ag -l --vimgrep -g '\.l?hs$' . \ + # TODO: fix style issues in src/protolude and include it + ${silver-searcher}/bin/ag -l --vimgrep -g '\.l?hs$' --ignore-dir=src/protolude . \ | xargs ${stylish-haskell}/bin/stylish-haskell -i # Format Python files @@ -89,11 +90,12 @@ let ${ruff}/bin/ruff check . echo "Checking consistency of import aliases in Haskell code..." - ${hsie} check-aliases main src + ${hsie} check-aliases main src/PostgREST echo "Linting Haskell files..." # --vimgrep fixes a bug in ag: https://github.com/ggreer/the_silver_searcher/issues/753 - ${silver-searcher}/bin/ag -l --vimgrep -g '\.l?hs$' . \ + # TODO: fix lint issues in src/protolude and include it + ${silver-searcher}/bin/ag -l --vimgrep -g '\.l?hs$' --ignore-dir=src/protolude . \ | xargs ${hlint}/bin/hlint --hint=${hlintConfig} '';