packages feed

incipit (empty) → 0.1.0.2

raw patch · 12 files changed

+291/−0 lines, 12 filesdep +basedep +incipit-coredep +polysemy-concsetup-changed

Dependencies added: base, incipit-core, polysemy-conc, polysemy-log, polysemy-resume, polysemy-time

Files

+ LICENSE view
@@ -0,0 +1,34 @@+Copyright (c) 2022 Torsten Schmits++Redistribution and use in source and binary forms, with or without modification, are permitted provided that the+following conditions are met:++  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following+  disclaimer.+  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following+  disclaimer in the documentation and/or other materials provided with the distribution.++Subject to the terms and conditions of this license, each copyright holder and contributor hereby grants to those+receiving rights under this license a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except+for failure to satisfy the conditions of this license) patent license to make, have made, use, offer to sell, sell,+import, and otherwise transfer this software, where such license applies only to those patent claims, already acquired+or hereafter acquired, licensable by such copyright holder or contributor that are necessarily infringed by:++  (a) their Contribution(s) (the licensed copyrights of copyright holders and non-copyrightable additions of+  contributors, in source or binary form) alone; or+  (b) combination of their Contribution(s) with the work of authorship to which such Contribution(s) was added by such+  copyright holder or contributor, if, at the time the Contribution is added, such addition causes such combination to+  be necessarily infringed. The patent license shall not apply to any other combinations which include the Contribution.++Except as expressly stated above, no rights or licenses from any copyright holder or contributor is granted under this+license, whether expressly, by implication, estoppel or otherwise.++DISCLAIMER++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 HOLDERS 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.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ changelog.md view
+ incipit.cabal view
@@ -0,0 +1,119 @@+cabal-version: 2.2++-- This file has been generated from package.yaml by hpack version 0.34.6.+--+-- see: https://github.com/sol/hpack++name:           incipit+version:        0.1.0.2+synopsis:       A Prelude for Polysemy+description:    See <https://hackage.haskell.org/package/incipit/docs/Prelude.html>+category:       Prelude+homepage:       https://github.com/tek/incipit#readme+bug-reports:    https://github.com/tek/incipit/issues+author:         Torsten Schmits+maintainer:     haskell@tryp.io+copyright:      2022 Torsten Schmits+license:        BSD-2-Clause-Patent+license-file:   LICENSE+build-type:     Simple+extra-source-files:+    readme.md+    changelog.md++source-repository head+  type: git+  location: https://github.com/tek/incipit++library+  exposed-modules:+      Conc+      Incipit+      Log+      Prelude+      Queue+      Sync+      Time+  reexported-modules:+      Polysemy.Conc+    , Polysemy.Conc.Queue+    , Polysemy.Conc.Sync+    , Polysemy.Log+    , Polysemy.Resume+    , Polysemy.Time+  hs-source-dirs:+      lib+  default-extensions:+      AllowAmbiguousTypes+      ApplicativeDo+      BangPatterns+      BinaryLiterals+      BlockArguments+      ConstraintKinds+      DataKinds+      DefaultSignatures+      DeriveAnyClass+      DeriveDataTypeable+      DeriveFoldable+      DeriveFunctor+      DeriveGeneric+      DeriveTraversable+      DerivingStrategies+      DerivingVia+      DisambiguateRecordFields+      DoAndIfThenElse+      DuplicateRecordFields+      EmptyDataDecls+      ExistentialQuantification+      FlexibleContexts+      FlexibleInstances+      FunctionalDependencies+      GADTs+      GeneralizedNewtypeDeriving+      InstanceSigs+      KindSignatures+      LambdaCase+      LiberalTypeSynonyms+      MultiParamTypeClasses+      MultiWayIf+      NamedFieldPuns+      NoImplicitPrelude+      OverloadedStrings+      OverloadedLists+      PackageImports+      PartialTypeSignatures+      PatternGuards+      PatternSynonyms+      PolyKinds+      QuantifiedConstraints+      QuasiQuotes+      RankNTypes+      RecordWildCards+      RecursiveDo+      ScopedTypeVariables+      StandaloneDeriving+      TemplateHaskell+      TupleSections+      TypeApplications+      TypeFamilies+      TypeFamilyDependencies+      TypeOperators+      TypeSynonymInstances+      UndecidableInstances+      UnicodeSyntax+      ViewPatterns+  ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Widentities+  build-depends:+      base ==4.*+    , incipit-core ==0.1.0.2+    , polysemy-conc >=0.5+    , polysemy-log >=0.5+    , polysemy-resume >=0.3+    , polysemy-time >=0.3+  mixins:+      base hiding (Prelude)+    , incipit-core hiding (Prelude, Incipit)+    , incipit-core (Incipit as IncipitCore)+  if impl(ghc >= 8.10)+    ghc-options: -Wunused-packages+  default-language: Haskell2010
+ lib/Conc.hs view
@@ -0,0 +1,16 @@+-- |Reexport with a shorter module name.+module Conc (+  module Polysemy.Conc,+  module Polysemy.Conc.Async,+  module Polysemy.Conc.AtomicState,+  module Polysemy.Conc.Events,+  module Polysemy.Conc.Race,+  module Polysemy.Conc.Retry,+) where++import Polysemy.Conc+import Polysemy.Conc.Async+import Polysemy.Conc.AtomicState+import Polysemy.Conc.Events+import Polysemy.Conc.Race+import Polysemy.Conc.Retry
+ lib/Incipit.hs view
@@ -0,0 +1,31 @@+-- |A Prelude for Polysemy projects, reexporting names and modules from several basic libraries.+module Incipit (+  module IncipitCore,+  module Polysemy.Conc,+  module Polysemy.Log,+  module Polysemy.Resume,+  module Polysemy.Time,+) where++import IncipitCore+import Polysemy.Conc (+  EventConsumer,+  Events,+  Interrupt,+  Mask,+  Queue,+  QueueResult,+  Race,+  Scoped,+  ScopedSync,+  Sync,+  UninterruptipleMask,+  consume,+  publish,+  runConc,+  scoped,+  subscribe,+  )+import Polysemy.Log (DataLog, Log)+import Polysemy.Resume+import Polysemy.Time (Time, TimeUnit)
+ lib/Log.hs view
@@ -0,0 +1,4 @@+-- |Reexport with a shorter module name.+module Log (module Polysemy.Log) where++import Polysemy.Log
+ lib/Prelude.hs view
@@ -0,0 +1,6 @@+-- |A Prelude for Polysemy projects, reexporting names and modules from several basic libraries.+module Prelude (+  module Incipit+) where++import Incipit
+ lib/Queue.hs view
@@ -0,0 +1,4 @@+-- |Reexport with a shorter module name.+module Queue (module Polysemy.Conc.Queue) where++import Polysemy.Conc.Queue
+ lib/Sync.hs view
@@ -0,0 +1,4 @@+-- |Reexport with a shorter module name.+module Sync (module Polysemy.Conc.Sync) where++import Polysemy.Conc.Sync
+ lib/Time.hs view
@@ -0,0 +1,4 @@+-- |Reexport with a shorter module name.+module Time (module Polysemy.Time) where++import Polysemy.Time
+ readme.md view
@@ -0,0 +1,67 @@+# About++This library provides a `Prelude` for [Polysemy] libraries, building upon [incipit-base] and exporting most of+Polysemy's core modules as well as a number of basic libraries:++* [polysemy-conc](https://hackage.haskell.org/package/polysemy-conc)+* [polysemy-time](https://hackage.haskell.org/package/polysemy-log)+* [polysemy-log](https://hackage.haskell.org/package/polysemy-time)+* [polysemy-resume](https://hackage.haskell.org/package/polysemy-resume)++For a minimal variant that only exports Polysemy, consider [incipit-core].++# Usage++`incipit` exports `Prelude`, so in order to use it you only have to hide `Prelude` from `base`:++For `hpack`:+```yaml+dependencies:+  - name: base+    version: '>= 4 && < 5'+    mixin:+      - hiding (Prelude)+  - incipit >= 0.1+```++For `cabal`:+```cabal+build-depends:+    base >=4 && <5, incipit >= 0.1+mixins:+    base hiding (Prelude)+```++# Custom Prelude++In order to extend `incipit` with a local `Prelude`, the module `Incipit` has to be reexported and `incipit`'s+`Prelude` needs to be hidden:++```yaml+dependencies:+  - name: base+    version: '>= 4 && < 5'+    mixin:+      - hiding (Prelude)+  - name: incipit+    version: >= 0.1+    mixin:+      - hiding (Prelude)+```++```haskell+module Prelude (+  module Prelude,+  module Incipit,+) where++import Incipit++projectName :: Text+projectName =+  "spaceship"+```++[incipit-base]: https://hackage.haskell.org/package/incipit-base+[incipit-core]: https://hackage.haskell.org/package/incipit-core+[Polysemy]: https://hackage.haskell.org/package/polysemy