From a30013d65ef8b69f0ba4f5239b1be0829ad7a0b6 Mon Sep 17 00:00:00 2001 From: Hans Hoeglund Date: Thu, 16 Apr 2020 14:08:51 +0100 Subject: [PATCH] Cabal build config --- .gitignore | 1 + cabal.project | 12 +++++++++++ cabal.project.freeze | 40 ++++++++++++++++++++++++++++++++++ default.nix | 4 ++-- iso-deriving.cabal | 51 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 cabal.project create mode 100644 cabal.project.freeze create mode 100755 iso-deriving.cabal diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..48a004c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +dist-newstyle diff --git a/cabal.project b/cabal.project new file mode 100644 index 0000000..5698070 --- /dev/null +++ b/cabal.project @@ -0,0 +1,12 @@ + +reject-unconstrained-dependencies: all +index-state: 2020-04-10T22:25:18Z + +-- No repos listed, so hackage.haskell.org with the default root keys are used. +-- +-- See https://github.com/haskell/cabal/blob/a07ef25229217a289433087c241d89e1c08e65e0/cabal-install/Distribution/Client/Config.hs#L654 + +packages: ./iso-deriving.cabal + +package iso-deriving + optimization: False diff --git a/cabal.project.freeze b/cabal.project.freeze new file mode 100644 index 0000000..63b3ba6 --- /dev/null +++ b/cabal.project.freeze @@ -0,0 +1,40 @@ +constraints: any.Cabal ==3.0.1.0, + any.StateVar ==1.2, + any.array ==0.5.4.0, + any.base ==4.13.0.0, + any.base-orphans ==0.8.2, + any.bifunctors ==5.5.7, + bifunctors +semigroups +tagged, + any.binary ==0.8.7.0, + any.bytestring ==0.10.10.0, + any.cabal-doctest ==1.0.8, + any.comonad ==5.0.6, + comonad +containers +distributive +test-doctests, + any.containers ==0.6.2.1, + any.contravariant ==1.5.2, + contravariant +semigroups +statevar +tagged, + any.deepseq ==1.4.4.0, + any.directory ==1.3.6.0, + any.distributive ==0.6.2, + distributive +semigroups +tagged, + any.filepath ==1.4.2.1, + any.ghc-boot-th ==8.8.3, + any.ghc-prim ==0.5.3, + any.integer-gmp ==1.0.2.0, + any.mtl ==2.2.2, + any.parsec ==3.1.14.0, + any.pretty ==1.1.3.6, + any.process ==1.6.8.0, + any.profunctors ==5.5.2, + any.rts ==1.0, + any.stm ==2.5.0.0, + any.tagged ==0.8.6, + tagged +deepseq +transformers, + any.template-haskell ==2.15.0.0, + any.text ==1.2.4.0, + any.th-abstraction ==0.3.2.0, + any.time ==1.9.3, + any.transformers ==0.5.6.2, + any.transformers-compat ==0.6.5, + transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, + any.unix ==2.7.2.2 diff --git a/default.nix b/default.nix index d59ce1c..0bec679 100644 --- a/default.nix +++ b/default.nix @@ -11,9 +11,9 @@ let }; pkgs = import (builtins.fetchTarball { - url = https://github.com/nixos/nixpkgs/archive/f74f2f354866c828248a419ef9a2cbddc793b7f9.tar.gz; + url = https://github.com/nixos/nixpkgs/archive/56f7c93a2fcd325506a6bfa7bf8e9faa2a2c7530.tar.gz; # Hash obtained using `nix-prefetch-url --unpack ` - sha256 = "1jxb2kb83mrmzg06l7c1zw9pikk2l1lpg8dl0rvni65bgmlxf7xy"; + sha256 = "0fm9a24kjailx9qlyvwwa3a635m8pdk00329rldc541zhpmrklib"; }) { config = opts; }; in diff --git a/iso-deriving.cabal b/iso-deriving.cabal new file mode 100755 index 0000000..743cdf9 --- /dev/null +++ b/iso-deriving.cabal @@ -0,0 +1,51 @@ + +name: iso-deriving +version: 0.0.1 +author: Hans Hoeglund +maintainer: Hans Hoeglund +license: MIT +license-file: LICENSE +synopsis: A set of libraries for composition, analysis and manipulation of music. +category: Music +tested-with: GHC +build-type: Simple +cabal-version: >= 1.10 + +description: + The GHC extension DerivingVia allow derivation through a specific + morphism: coerce. We present a library iso-deriving generalizing DerivingVia + to arbitrary morphisms. This is particularly useful for prototypes and + specifications of instances. + +extra-source-files: README.md + +source-repository head + type: git + location: git://github.com/hanshoglund/iso-deriving.git + +library + build-depends: base, + profunctors + + exposed-modules: Iso.Deriving + hs-source-dirs: . + default-language: Haskell2010 + ghc-options: + -Wall + -Wcompat + -Wincomplete-record-updates + -Wincomplete-uni-patterns + -Wredundant-constraints + -Wno-unused-top-binds + -Wno-name-shadowing + -Werror + -- TODO: Do not use -Werror by default for a library! + +test-suite "iso-deriving-tests" + build-depends: base, + mtl, + iso-deriving + type: exitcode-stdio-1.0 + main-is: Spec.hs + hs-source-dirs: test + default-language: Haskell2010