diff options
Diffstat (limited to 'users/Profpatsch')
-rw-r--r-- | users/Profpatsch/my-prelude/default.nix | 37 | ||||
-rw-r--r-- | users/Profpatsch/my-prelude/my-prelude.cabal | 82 | ||||
-rw-r--r-- | users/Profpatsch/my-prelude/src/Aeson.hs (renamed from users/Profpatsch/my-prelude/Aeson.hs) | 16 | ||||
-rw-r--r-- | users/Profpatsch/my-prelude/src/MyPrelude.hs (renamed from users/Profpatsch/my-prelude/MyPrelude.hs) | 0 | ||||
-rw-r--r-- | users/Profpatsch/my-prelude/src/Postgres/Decoder.hs (renamed from users/Profpatsch/whatcd-resolver/src/Postgres/Decoder.hs) | 0 | ||||
-rw-r--r-- | users/Profpatsch/my-prelude/src/Postgres/MonadPostgres.hs (renamed from users/Profpatsch/whatcd-resolver/src/Postgres/MonadPostgres.hs) | 0 | ||||
-rw-r--r-- | users/Profpatsch/my-prelude/src/Pretty.hs (renamed from users/Profpatsch/my-prelude/Pretty.hs) | 0 | ||||
-rw-r--r-- | users/Profpatsch/my-prelude/src/RunCommand.hs (renamed from users/Profpatsch/my-prelude/RunCommand.hs) | 0 | ||||
-rw-r--r-- | users/Profpatsch/my-prelude/src/Test.hs (renamed from users/Profpatsch/my-prelude/Test.hs) | 0 | ||||
-rw-r--r-- | users/Profpatsch/my-prelude/src/Tool.hs (renamed from users/Profpatsch/whatcd-resolver/src/Tool.hs) | 0 | ||||
-rw-r--r-- | users/Profpatsch/my-prelude/src/ValidationParseT.hs (renamed from users/Profpatsch/whatcd-resolver/src/ValidationParseT.hs) | 0 | ||||
-rw-r--r-- | users/Profpatsch/whatcd-resolver/whatcd-resolver.cabal | 37 |
12 files changed, 111 insertions, 61 deletions
diff --git a/users/Profpatsch/my-prelude/default.nix b/users/Profpatsch/my-prelude/default.nix index 0c582c9585ca..c046c213bdf3 100644 --- a/users/Profpatsch/my-prelude/default.nix +++ b/users/Profpatsch/my-prelude/default.nix @@ -6,34 +6,43 @@ pkgs.haskellPackages.mkDerivation { src = depot.users.Profpatsch.exactSource ./. [ ./my-prelude.cabal - ./MyPrelude.hs - ./Pretty.hs - ./Aeson.hs - ./RunCommand.hs - ./Test.hs + ./src/Aeson.hs + ./src/MyPrelude.hs + ./src/Pretty.hs + ./src/RunCommand.hs + ./src/Test.hs + ./src/Tool.hs + ./src/ValidationParseT.hs + ./src/Postgres/Decoder.hs + ./src/Postgres/MonadPostgres.hs ]; isLibrary = true; libraryHaskellDepends = [ + pkgs.haskellPackages.pa-prelude pkgs.haskellPackages.pa-label pkgs.haskellPackages.pa-error-tree - pkgs.haskellPackages.aeson + pkgs.haskellPackages.pa-json pkgs.haskellPackages.aeson-better-errors - pkgs.haskellPackages.PyF - pkgs.haskellPackages.errors - pkgs.haskellPackages.profunctors - pkgs.haskellPackages.semigroupoids - pkgs.haskellPackages.these - pkgs.haskellPackages.validation-selective + pkgs.haskellPackages.ansi-terminal pkgs.haskellPackages.error + pkgs.haskellPackages.hscolour pkgs.haskellPackages.hspec pkgs.haskellPackages.hspec-expectations-pretty-diff - pkgs.haskellPackages.hscolour + pkgs.haskellPackages.monad-logger pkgs.haskellPackages.nicify-lib + pkgs.haskellPackages.postgresql-simple + pkgs.haskellPackages.profunctors + pkgs.haskellPackages.PyF + pkgs.haskellPackages.semigroupoids + pkgs.haskellPackages.these pkgs.haskellPackages.typed-process - pkgs.haskellPackages.ansi-terminal + pkgs.haskellPackages.unliftio + pkgs.haskellPackages.validation-selective pkgs.haskellPackages.vector + + ]; license = lib.licenses.mit; diff --git a/users/Profpatsch/my-prelude/my-prelude.cabal b/users/Profpatsch/my-prelude/my-prelude.cabal index fad13300a29a..3a4a06d165b1 100644 --- a/users/Profpatsch/my-prelude/my-prelude.cabal +++ b/users/Profpatsch/my-prelude/my-prelude.cabal @@ -4,13 +4,66 @@ version: 0.0.1.0 author: Profpatsch maintainer: mail@profpatsch.de +common common-options + ghc-options: + -Wall + -Wno-type-defaults + -Wunused-packages + -Wredundant-constraints + -fwarn-missing-deriving-strategies + + -- See https://downloads.haskell.org/ghc/latest/docs/users_guide/exts.html + -- for a description of all these extensions + default-extensions: + -- Infer Applicative instead of Monad where possible + ApplicativeDo + + -- Allow literal strings to be Text + OverloadedStrings + + -- Syntactic sugar improvements + LambdaCase + MultiWayIf + + -- Makes the (deprecated) usage of * instead of Data.Kind.Type an error + NoStarIsType + + -- Convenient and crucial to deal with ambiguous field names, commonly + -- known as RecordDotSyntax + OverloadedRecordDot + + -- does not export record fields as functions, use OverloadedRecordDot to access instead + NoFieldSelectors + + -- Record punning + RecordWildCards + + -- Improved Deriving + DerivingStrategies + DerivingVia + + -- Type-level strings + DataKinds + + -- to enable the `type` keyword in import lists (ormolu uses this automatically) + ExplicitNamespaces + + default-language: GHC2021 + + library + import: common-options + hs-source-dirs: src exposed-modules: MyPrelude Pretty Aeson RunCommand Test + Postgres.Decoder + Postgres.MonadPostgres + ValidationParseT + Tool -- Modules included in this executable, other than Main. -- other-modules: @@ -19,26 +72,33 @@ library -- other-extensions: build-depends: base >=4.15 && <5 + , pa-prelude , pa-label , pa-error-tree + , pa-json , aeson , aeson-better-errors - , PyF - , validation-selective - , these - , text - , semigroupoids - , profunctors + , ansi-terminal + , bytestring , containers , error , exceptions - , bytestring - , mtl + , filepath + , hscolour , hspec , hspec-expectations-pretty-diff - , hscolour + , monad-logger + , mtl , nicify-lib + , postgresql-simple + , profunctors + , PyF + , semigroupoids + , selective + , text + , these , typed-process - , ansi-terminal + , unix + , unliftio + , validation-selective , vector - default-language: GHC2021 diff --git a/users/Profpatsch/my-prelude/Aeson.hs b/users/Profpatsch/my-prelude/src/Aeson.hs index ad095e1b43a7..73d611608224 100644 --- a/users/Profpatsch/my-prelude/Aeson.hs +++ b/users/Profpatsch/my-prelude/src/Aeson.hs @@ -10,26 +10,14 @@ module Aeson where -import Data.Aeson (Encoding, FromJSON (parseJSON), GFromJSON, GToEncoding, GToJSON, Options (fieldLabelModifier), ToJSON (toEncoding, toJSON), Value (..), Zero, defaultOptions, genericParseJSON, genericToEncoding, genericToJSON, withObject) +import Data.Aeson (Value (..)) import Data.Aeson.BetterErrors qualified as Json -import Data.Aeson.Encoding qualified as Enc -import Data.Aeson.Key qualified as Key import Data.Aeson.KeyMap qualified as KeyMap -import Data.Char qualified import Data.Error.Tree -import Data.Foldable qualified as Foldable -import Data.Int (Int64) -import Data.List (isPrefixOf) -import Data.List qualified as List -import Data.Map.Strict qualified as Map import Data.Maybe (catMaybes) -import Data.String (IsString (fromString)) -import Data.Text.Lazy qualified as Lazy import Data.Vector qualified as Vector -import GHC.Generics (Generic (Rep)) -import GHC.TypeLits (KnownSymbol, Symbol, symbolVal) import Label -import MyPrelude +import PossehlAnalyticsPrelude import Test.Hspec (describe, it, shouldBe) import Test.Hspec qualified as Hspec diff --git a/users/Profpatsch/my-prelude/MyPrelude.hs b/users/Profpatsch/my-prelude/src/MyPrelude.hs index 1be248d091a9..1be248d091a9 100644 --- a/users/Profpatsch/my-prelude/MyPrelude.hs +++ b/users/Profpatsch/my-prelude/src/MyPrelude.hs diff --git a/users/Profpatsch/whatcd-resolver/src/Postgres/Decoder.hs b/users/Profpatsch/my-prelude/src/Postgres/Decoder.hs index 2e7fcb8779ed..2e7fcb8779ed 100644 --- a/users/Profpatsch/whatcd-resolver/src/Postgres/Decoder.hs +++ b/users/Profpatsch/my-prelude/src/Postgres/Decoder.hs diff --git a/users/Profpatsch/whatcd-resolver/src/Postgres/MonadPostgres.hs b/users/Profpatsch/my-prelude/src/Postgres/MonadPostgres.hs index e602ee287fa2..e602ee287fa2 100644 --- a/users/Profpatsch/whatcd-resolver/src/Postgres/MonadPostgres.hs +++ b/users/Profpatsch/my-prelude/src/Postgres/MonadPostgres.hs diff --git a/users/Profpatsch/my-prelude/Pretty.hs b/users/Profpatsch/my-prelude/src/Pretty.hs index 8046c83e459c..8046c83e459c 100644 --- a/users/Profpatsch/my-prelude/Pretty.hs +++ b/users/Profpatsch/my-prelude/src/Pretty.hs diff --git a/users/Profpatsch/my-prelude/RunCommand.hs b/users/Profpatsch/my-prelude/src/RunCommand.hs index 5c80eb3aacf4..5c80eb3aacf4 100644 --- a/users/Profpatsch/my-prelude/RunCommand.hs +++ b/users/Profpatsch/my-prelude/src/RunCommand.hs diff --git a/users/Profpatsch/my-prelude/Test.hs b/users/Profpatsch/my-prelude/src/Test.hs index 862ee16c255d..862ee16c255d 100644 --- a/users/Profpatsch/my-prelude/Test.hs +++ b/users/Profpatsch/my-prelude/src/Test.hs diff --git a/users/Profpatsch/whatcd-resolver/src/Tool.hs b/users/Profpatsch/my-prelude/src/Tool.hs index 066f68bbe0df..066f68bbe0df 100644 --- a/users/Profpatsch/whatcd-resolver/src/Tool.hs +++ b/users/Profpatsch/my-prelude/src/Tool.hs diff --git a/users/Profpatsch/whatcd-resolver/src/ValidationParseT.hs b/users/Profpatsch/my-prelude/src/ValidationParseT.hs index 593b7ebf3918..593b7ebf3918 100644 --- a/users/Profpatsch/whatcd-resolver/src/ValidationParseT.hs +++ b/users/Profpatsch/my-prelude/src/ValidationParseT.hs diff --git a/users/Profpatsch/whatcd-resolver/whatcd-resolver.cabal b/users/Profpatsch/whatcd-resolver/whatcd-resolver.cabal index a4a7f6e449dc..86a19a7cedfe 100644 --- a/users/Profpatsch/whatcd-resolver/whatcd-resolver.cabal +++ b/users/Profpatsch/whatcd-resolver/whatcd-resolver.cabal @@ -58,44 +58,37 @@ library exposed-modules: WhatcdResolver - Postgres.Decoder - Postgres.MonadPostgres - Tool - ValidationParseT Multipart2 build-depends: base >=4.15 && <5, text, + my-prelude, pa-prelude, pa-error-tree, pa-label, pa-json, pa-field-parser, - pa-run-command, + aeson-better-errors, + aeson, + blaze-html, + bytestring, containers, - pa-pretty, - tmp-postgres, directory, + dlist, filepath, - aeson, - aeson-better-errors, - postgresql-simple, - resource-pool, http-conduit, http-types, + ihp-hsx, + monad-logger, mtl, - transformers, + resource-pool, + postgresql-simple, + scientific, + selective, + tmp-postgres, unliftio, - monad-logger, - unix, - warp, - wai, wai-extra, - ihp-hsx, - blaze-html, - bytestring, - dlist, - scientific, - selective + wai, + warp, |