ekmett / lens

Lenses, Folds, and Traversals - Join us on web.libera.chat #haskell-lens
http://lens.github.io/
Other
2.03k stars 271 forks source link

lens-4.10 does not compile #544

Closed peti closed 9 years ago

peti commented 9 years ago

Citing from http://hydra.cryp.to/build/861386/nixlog/1/raw:

src/Control/Lens/Internal/Indexed.hs:172:10:
    No instance for (Costrong (Indexed i))
      arising from the superclasses of an instance declaration
    In the instance declaration for ‘Corepresentable (Indexed i)’

src/Control/Lens/Internal/Indexed.hs:221:10:
    No instance for (Costrong (Indexed i))
      arising from the superclasses of an instance declaration
    In the instance declaration for ‘Conjoined (Indexed i)’

src/Control/Lens/Internal/Indexed.hs:225:10:
    Could not deduce (Costrong (Indexed j))
      arising from the superclasses of an instance declaration
    from the context (i ~ j)
      bound by the instance declaration
      at src/Control/Lens/Internal/Indexed.hs:225:10-41
    In the instance declaration for ‘Indexable i (Indexed j)’

The changes on Hackage that caused this breakage are visible at http://hydra.cryp.to/api/scmdiff?uri=git://github.com/peti/nixpkgs.git&rev1=a6c16b04e4f022b6bc63602d8b53274efce8518c&rev2=c6d6712794e7d8cb107b9baf43323d6afb1e235d&type=git&branch=.

My guess is that profunctors 5.1 caused this.

ekmett commented 9 years ago

Looks like it. I missed that @sjoerdvisscher added a superclass constraint in there.

sjoerdvisscher commented 9 years ago

Sorry about that, next time I will add a list of changes!

peti commented 9 years ago

Has this issue been fixed by the 4.11 release?

ekmett commented 9 years ago

@peti yep. it is fixed in 4.11

@sjoerdvisscher I confess the Costrong instances make me uncomfortable in that they make it a bit too easy to throw a bottom into the mix you can't control, but no more so than any ArrowLoop I guess.