packages feed

imj-prelude (empty) → 0.1.0.2

raw patch · 6 files changed

+133/−0 lines, 6 filesdep +basedep +mtldep +textsetup-changed

Dependencies added: base, mtl, text

Files

+ CHANGELOG.md view
@@ -0,0 +1,8 @@+# Changelog++This project adheres to [Haskell PVP](https://pvp.haskell.org/).+++## 0.1.0.2 [2018-01-01]++- Initial release
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright Olivier Sohn (c) 2017 - 2018++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++    * Redistributions of source code must retain the above copyright+      notice, this list of conditions and the following disclaimer.++    * Redistributions in binary form must reproduce the above+      copyright notice, this list of conditions and the following+      disclaimer in the documentation and/or other materials provided+      with the distribution.++    * Neither the name of Olivier Sohn nor the names of other+      contributors may be used to endorse or promote products derived+      from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ README.md view
@@ -0,0 +1,3 @@+# What is it?++The prelude used by 'imj-****' libraries
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ imj-prelude.cabal view
@@ -0,0 +1,33 @@+name:                imj-prelude+version:             0.1.0.2+Category:            Game Engine+Synopsis:            Prelude library.+Description:         Library of commonly used functions and types.+homepage:            https://github.com/OlivierSohn/hamazed/blob/master/imj-prelude/README.md+bug-reports:         https://github.com/OlivierSohn/hamazed/issues/+license:             BSD3+license-file:        LICENSE+author:              Olivier Sohn+maintainer:          olivier.sohn@gmail.com+copyright:           2017 - 2018 Olivier Sohn+build-type:          Simple+extra-source-files:  README.md CHANGELOG.md+cabal-version:       >=1.10++Tested-With: GHC == 8.0.2, GHC == 8.2.2++library+  hs-source-dirs:      src+  other-modules:+  exposed-modules:     Imj.Prelude+  build-depends:       base >= 4.8 && < 4.11+                     , mtl >= 2.2.1 && < 2.3+                     , text ==1.2.*+  ghc-options:       -Wall -fpedantic-bottoms -Wredundant-constraints+                     -fexcess-precision -optc-ffast-math+  default-language:    Haskell2010++source-repository head+  type:     git+  location: https://github.com/OlivierSohn/hamazed/+  subdir:   imj-prelude
+ src/Imj/Prelude.hs view
@@ -0,0 +1,57 @@+{-# OPTIONS_HADDOCK hide #-}++{-# LANGUAGE NoImplicitPrelude #-}++-- Initially I needed this custom Prelude to hide putStr and putChar,+-- since I provide equivalent functions that should be used instead to+-- render the game.+--+-- I find it also usefull to default-import functions that I use a lot.++module Imj.Prelude+          ( module Prelude+          , module Control.Applicative+          , module Control.Arrow+          , module Control.Exception+          , module Control.Monad+          , module Control.Monad.IO.Class+          , module Control.Monad.Reader+          , module Data.List+          , module Data.Maybe+          , module Data.Monoid+          , module Data.Ratio+          , module Data.String+          , module Data.Text+          , module Data.Word+          ) where++import           Prelude( Eq, Show(..), Real, Num, Enum, Integral, Ord, Monoid(..), Monad(..)+                        , Bool(..), Char, Float, IO, Int, Maybe(..), Either(..), Ordering(..)+                        , either, maybe+                        , sum, map, concatMap, concat, filter, mapM, mapM_+                        , all, any, notElem, null, minimum, maximum+                        , replicate, (++), take, takeWhile, tail, last, head, drop, reverse, iterate, unwords+                        , zip, zipWith, fst, snd+                        , fmap, (.), (=<<), ($), (<$>), const, id, flip, curry, uncurry+                        , compare, not, or, (||), (&&), otherwise+                        , (*), (**), (+), (-), (/), (^), (==), (/=), (>), (<), (>=), (<=)+                        , realToFrac, fromIntegral, fromRational, recip, signum, pred, succ+                        , sin, cos, pi+                        , mod, min, max, abs, floor, round, ceiling, maxBound+                        , negate, div, divMod, quot, quotRem, even, odd+                        , error, undefined+                        )++import           Control.Applicative((<|>))+import           Control.Arrow((>>>))+import           Control.Monad(when, void, (<=<), Monad)+import           Control.Monad.IO.Class(liftIO)+import           Control.Monad.Reader(ReaderT)+import           Control.Exception(assert)+import           Data.List(intercalate)+import           Data.Maybe(listToMaybe, fromMaybe, maybe, catMaybes, mapMaybe)+import           Data.Monoid((<>))+import           Data.Ratio((%))+import           Data.String(String)+import           Data.Text(Text)+import           Data.Word(Word8)