commit bf50f18906de54d95c83def9845c8059d934c282 Author: Frederik Hanghøj Iversen Date: Fri Oct 26 15:45:41 2018 +0200 Hello world. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b07ce33 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.stack-work/ +frelude.cabal +*~ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..112800a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +Changelog for frelude +=== + +HEAD +--- diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d703291 --- /dev/null +++ b/LICENSE @@ -0,0 +1,30 @@ +Copyright Frederik Hangøj Iversen (c) 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 Frederik Hangøj Iversen 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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..8b7584b --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# frelude diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000..9a994af --- /dev/null +++ b/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/package.yaml b/package.yaml new file mode 100644 index 0000000..71b043e --- /dev/null +++ b/package.yaml @@ -0,0 +1,67 @@ +name: frelude +version: 0.1.0.0 +github: fredefox/frelude +license: BSD3 +license-file: LICENSE +author: Frederik Hangøj Iversen +maintainer: fhi.1990@gmail.com +copyright: 2018 Frederik Hangøj Iversen + +extra-source-files: +- README.md +- CHANGELOG.md + +description: + Please see the README on GitHub at + +default-extensions: + - ConstraintKinds + - DeriveGeneric + - FlexibleContexts + - FlexibleInstances + - GADTs + - GeneralizedNewtypeDeriving + - LambdaCase + - NamedWildCards + - OverloadedStrings + - ScopedTypeVariables + - StandaloneDeriving + - TupleSections + - TypeApplications + - TypeFamilies + - TypeSynonymInstances + - UnicodeSyntax + - ViewPatterns + - DerivingStrategies + - EmptyCase + - NoImplicitPrelude + +dependencies: + - base >= 4.7 && < 5 + - mtl + - text + - containers + - unordered-containers + - aeson + - yaml + - prettyprinter + - file-embed + - directory + - bytestring + - exceptions + - string-conversions + - optparse-applicative + - template-haskell + - time + - deepseq + - binary + +library: + source-dirs: src + + exposed-module: + - Frelude + + other-modules: + - Frelude.ReExports + - Frelude.Renamed diff --git a/src/Frelude.hs b/src/Frelude.hs new file mode 100644 index 0000000..c3830ee --- /dev/null +++ b/src/Frelude.hs @@ -0,0 +1,8 @@ +{-# OPTIONS_GHC -Wall #-} +module Frelude + ( module ReExports + , module Renamed + ) where + +import Frelude.ReExports as ReExports +import Frelude.Renamed as Renamed diff --git a/src/Frelude/ReExports.hs b/src/Frelude/ReExports.hs new file mode 100644 index 0000000..87bc496 --- /dev/null +++ b/src/Frelude/ReExports.hs @@ -0,0 +1,60 @@ +-- | A module re-exporting members commonly used throughout the MUSTE. + +{-# OPTIONS_GHC -Wall -Wcompat #-} + +module Frelude.ReExports (module X) where + +import Prelude as X + -- Classes + (Ord(..), Show(show), Monoid(..), Eq(..), Ordering(..), + Read, Foldable, Functor(..), Applicative(..), Monad((>>=)), + Enum(..), Num(..), Integral(..), Real(..), + + -- Data + IO, Int, Integer, Float, Maybe(..), Either(..), Bool(..), Char, + Double, + + -- Aliases + String, FilePath, + + (.), ($), ($!), either, pure, (||), (&&), length, otherwise, + splitAt, (<$>), fromInteger, toInteger, uncurry, curry, not, null, + filter, zipWith, zip, fst, snd, all, any, reverse, maximum, minimum, + max, min, sum, unwords, words, lines, unlines, or, and, notElem, + elem, (<*>), foldMap, putStrLn, putStr, flip, const, sequence, take, + mapM_, mapM, ioError, error, repeat, foldl, seq, mod, div, print, + realToFrac, fromIntegral, compare) +import Data.List as X (sort, last, nub, sortOn) +import Data.List.NonEmpty as X (NonEmpty(..), groupBy) +import Data.Bool as X (bool) +import Data.Function as X ((&), on) +import Data.Traversable as X (Traversable(..)) +import Control.Monad as X ((>=>), void, when, guard, MonadPlus) +import Control.Monad.IO.Class as X (MonadIO(liftIO)) +import Control.Exception as X + (Exception, SomeException, throwIO, displayException, throw, try, + fromException, toException, catch, ErrorCall(ErrorCall)) +import Data.Maybe as X (fromMaybe, fromJust, listToMaybe, isJust) +import Control.Monad.Fail as X (MonadFail(fail)) +import Control.Monad.Catch as X (MonadThrow(throwM)) +import Data.Text as X (Text) +import Control.Category as X ((>>>), (<<<)) +import Text.Printf as X (printf) +import Data.Text.Prettyprint.Doc as X (Doc, Pretty(pretty)) +import Data.Aeson as X (FromJSON, ToJSON) +import Data.Semigroup as X (Semigroup(..)) +import Text.Read as X (readEither, readMaybe) +import GHC.Generics as X (Generic) +import Data.Binary as X (Binary) +import GHC.Exts as X (IsList(fromList, toList, Item)) +import Data.String as X (IsString, fromString) +import Control.Applicative as X (Alternative(..)) +import Data.String.Conversions as X (convertString) +import Data.Time as X (NominalDiffTime) +import Data.Time.Clock as X (UTCTime) +import Control.Monad.Except as X (MonadError(..), ExceptT, runExceptT) +import Language.Haskell.TH.Syntax as X (Lift) +import Control.DeepSeq as X (NFData) +import Data.Data as X (Typeable, Data(..)) +import Control.Monad.Reader as X (MonadReader, ReaderT) +import Control.Monad.Trans as X (MonadTrans, lift) diff --git a/src/Frelude/Renamed.hs b/src/Frelude/Renamed.hs new file mode 100644 index 0000000..d7d7ae1 --- /dev/null +++ b/src/Frelude/Renamed.hs @@ -0,0 +1,13 @@ +{-# OPTIONS_GHC -Wall -Wcompat #-} + +module Frelude.Renamed where + +import Prelude + +map ∷ Functor f ⇒ (a → b) → f a → f b +map = fmap +{-# INLINE map #-} + +identity ∷ a → a +identity = id +{-# INLINE identity #-} diff --git a/stack.yaml b/stack.yaml new file mode 100644 index 0000000..786b600 --- /dev/null +++ b/stack.yaml @@ -0,0 +1,7 @@ +resolver: nightly-2018-10-26 + +packages: + - . + +extra-deps: + []