Skip to content

Instantly share code, notes, and snippets.

@omnibs
Last active August 6, 2020 20:22
Show Gist options
  • Save omnibs/9bf1e6d20615e84bff84d49f13241f97 to your computer and use it in GitHub Desktop.
Save omnibs/9bf1e6d20615e84bff84d49f13241f97 to your computer and use it in GitHub Desktop.
GHC 8.10.1 microlens fails and won't jailbreak
name: microlens
version: 0.4.10
synopsis: A tiny lens library with no dependencies. If you're writing an app, you probably want microlens-platform, not this.
description:
NOTE: If you're writing an app, you probably want <http://hackage.haskell.org/package/microlens-platform microlens-platform> – it has the most features. <http://hackage.haskell.org/package/microlens microlens> is intended more for library writers who want a tiny lens library (after all, lenses are pretty useful for everything, not just for updating records!).
.
This library is an extract from <http://hackage.haskell.org/package/lens lens> (with no dependencies). It's not a toy lenses library, unsuitable for “real world”, but merely a small one. It is compatible with lens, and should have same performance. It also has better documentation.
.
There's a longer readme <https://github.com/monadfix/microlens#readme on Github>. It has a migration guide for lens users, a description of other packages in the family, a discussion of other lens libraries you could use instead, and so on.
.
Here are some usecases for this library:
.
* You want to define lenses or traversals in your own library, but don't want to depend on lens. Having lenses available often make working with a library more pleasant.
.
* You just want to be able to use lenses to transform data (or even just use @over _1@ to change the first element of a tuple).
.
* You are new to lenses and want a small library to play with.
.
However, don't use this library if:
.
* You need @Iso@s, @Prism@s, indexed traversals, or actually anything else which isn't defined here (tho some indexed functions are available elsewhere – containers and vector provide them for their types, and <http://hackage.haskell.org/package/ilist ilist> provides indexed functions for lists).
.
* You want a library with a clean, understandable implementation (in which case you're looking for <http://hackage.haskell.org/package/lens-simple lens-simple>).
.
As already mentioned, if you're writing an application which uses lenses more extensively, look at <http://hackage.haskell.org/package/microlens-platform microlens-platform> – it combines features of most other microlens packages (<http://hackage.haskell.org/package/microlens-mtl microlens-mtl>, <http://hackage.haskell.org/package/microlens-th microlens-th>, <http://hackage.haskell.org/package/microlens-ghc microlens-ghc>).
.
If you want to export getters or folds and don't mind the <http://hackage.haskell.org/package/contravariant contravariant> dependency, please consider using <http://hackage.haskell.org/package/microlens-contra microlens-contra>.
.
If you haven't ever used lenses before, read <http://hackage.haskell.org/package/lens-tutorial/docs/Control-Lens-Tutorial.html this tutorial>. (It's for lens, but it applies to microlens just as well.)
.
Note that microlens has no dependencies starting from GHC 7.10 (base-4.8). Prior to that, it depends on transformers-0.2 or above.
license: BSD3
license-file: LICENSE
author: Edward Kmett, Artyom Kazak
maintainer: Monadfix <hi@monadfix.io>
homepage: http://github.com/monadfix/microlens
bug-reports: http://github.com/monadfix/microlens/issues
-- copyright:
category: Data, Lenses
build-type: Simple
extra-source-files:
CHANGELOG.md
cabal-version: >=1.10
source-repository head
type: git
location: git://github.com/monadfix/microlens.git
library
exposed-modules: Lens.Micro
Lens.Micro.Extras
Lens.Micro.Internal
Lens.Micro.Type
-- other-modules:
-- other-extensions:
-- Since base-4.8 we get the Identity functor in base, so we can avoid a
-- transformers dependency.
if impl(ghc>=7.9)
build-depends: base >=4.8 && <5
if !impl(ghc>=7.9)
build-depends: base >=4.5 && <5
, transformers >=0.2
ghc-options:
-Wall -fwarn-tabs
-O2 -fdicts-cheap -funbox-strict-fields
-fmax-simplifier-iterations=10
hs-source-dirs: src
default-language: Haskell2010
let
fetch = { rev, sha256 }:
builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
sha256 = sha256;
};
pkgs = import (fetch {
rev = "244286efbc94fa6ce79a735a997df1f0370260b3";
sha256 = "1jy80bdvdxv604kf9fchibyzzqslm6vxddz9dnyrm73m6cz57cn8";
}) { };
myHaskell = pkgs.haskell.packages.ghc8101.extend (haskellSelf: haskellSuper: {
microlens = pkgs.haskell.lib.doJailbreak
(pkgs.haskell.lib.markUnbroken haskellSuper.microlens);
});
myGhc = myHaskell.ghcWithPackages
(haskellPackages: with haskellPackages; [ microlens ]);
in pkgs.mkShell { buildInputs = [ myGhc ]; }
@omnibs
Copy link
Author

omnibs commented Aug 6, 2020

these derivations will be built:
  /nix/store/zk86dlgic5afxyam43ni6289is70vj5r-microlens-0.4.10.drv
  /nix/store/7g8r84fvb41qcz45d5ssxzbjs6qlmpmc-ghc-8.10.1-with-packages.drv
building '/nix/store/zk86dlgic5afxyam43ni6289is70vj5r-microlens-0.4.10.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/cvbnaq3q3xjac2cgqyczi2162prbcx95-ghc-8.10.1.
unpacking sources
unpacking source archive /nix/store/ff8calfbfzm5i2pinviwhgfrwx9svd7m-microlens-0.4.10.tar.gz
source root is microlens-0.4.10
setting SOURCE_DATE_EPOCH to timestamp 1541246055 of file microlens-0.4.10/microlens.cabal
patching sources
Replace Cabal file with edited version from mirror://hackage/microlens-0.4.10/revision/1.cabal.
Run jailbreak-cabal to lift version restrictions on build inputs.
compileBuildDriverPhase
setupCompileFlags: -package-db=/private/var/folders/cw/9_p0rqm50w18cmn5p26tj9d80000gn/T/nix-build-microlens-0.4.10.drv-0/setup-package.conf.d -j4 -threaded
[1 of 1] Compiling Main             ( Setup.hs, /private/var/folders/cw/9_p0rqm50w18cmn5p26tj9d80000gn/T/nix-build-microlens-0.4.10.drv-0/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/09ym828xyg2w66qh8fxilaj5gwyammr5-microlens-0.4.10 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --docdir=/nix/store/6jjj2vbscv38imzml4n9xk1g2ih8wycp-microlens-0.4.10-doc/share/doc/microlens-0.4.10 --with-gcc=clang --package-db=/private/var/folders/cw/9_p0rqm50w18cmn5p26tj9d80000gn/T/nix-build-microlens-0.4.10.drv-0/package.conf.d --ghc-option=-j4 --disable-split-objs --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --extra-include-dirs=/nix/store/nci2xpwnghp7qwxjq4n7a4pv0xqjiqq3-libc++-7.1.0/include --extra-lib-dirs=/nix/store/nci2xpwnghp7qwxjq4n7a4pv0xqjiqq3-libc++-7.1.0/lib --extra-include-dirs=/nix/store/dxhqnsj57v19c8jl0g8y7sp99yny8aia-libc++abi-7.1.0/include --extra-lib-dirs=/nix/store/dxhqnsj57v19c8jl0g8y7sp99yny8aia-libc++abi-7.1.0/lib --extra-include-dirs=/nix/store/xxwhsz5nwmlkc00k2pw0bxx9nr1qcydl-compiler-rt-7.1.0-dev/include --extra-lib-dirs=/nix/store/yglgadpf8i5w4vx8vwd4allqgghr3nvx-compiler-rt-7.1.0/lib --extra-lib-dirs=/nix/store/y65n8x6fdpffk8lsb15bby0bl4l1dm9l-ncurses-6.1-20190112/lib --extra-lib-dirs=/nix/store/rlzjpd0r2zjlvr3fpidljayzhjid3bjx-libffi-3.3/lib --extra-lib-dirs=/nix/store/byws9cna12a3dz4514va1p2ck06sa4hk-gmp-6.2.0/lib --extra-include-dirs=/nix/store/iii5cs51w9mi6rmsjn8lcf8873f5hyzh-libiconv-osx-10.12.6/include --extra-lib-dirs=/nix/store/iii5cs51w9mi6rmsjn8lcf8873f5hyzh-libiconv-osx-10.12.6/lib --extra-framework-dirs=/nix/store/qbqg98sx5qfz28iqya6bf1h0i49rp94z-swift-corefoundation/Library/Frameworks
Using Parsec parser
Configuring microlens-0.4.10...
CallStack (from HasCallStack):
  $, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:1024:20 in Cabal-3.2.0.0:Distribution.Simple.Configure
  configureFinalizedPackage, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:477:12 in Cabal-3.2.0.0:Distribution.Simple.Configure
  configure, called at libraries/Cabal/Cabal/Distribution/Simple.hs:625:20 in Cabal-3.2.0.0:Distribution.Simple
  confHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:65:5 in Cabal-3.2.0.0:Distribution.Simple.UserHooks
  configureAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:180:19 in Cabal-3.2.0.0:Distribution.Simple
  defaultMainHelper, called at libraries/Cabal/Cabal/Distribution/Simple.hs:116:27 in Cabal-3.2.0.0:Distribution.Simple
  defaultMain, called at Setup.hs:2:8 in main:Main
Setup: Encountered missing or private dependencies:
base >=4.8 && <4.13

builder for '/nix/store/zk86dlgic5afxyam43ni6289is70vj5r-microlens-0.4.10.drv' failed with exit code 1
cannot build derivation '/nix/store/7g8r84fvb41qcz45d5ssxzbjs6qlmpmc-ghc-8.10.1-with-packages.drv': 1 dependencies couldn't be built
error: build of '/nix/store/7g8r84fvb41qcz45d5ssxzbjs6qlmpmc-ghc-8.10.1-with-packages.drv' failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment