Questions tagged [haskell-lens]

A lenses library for Haskell.

An extensive library which provides families of lenses, isomorphisms, folds, traversals, getters and setters.

For more info visit:

454 questions
0
votes
1 answer

Failed to install lens-4.2 : Cabal 1.20.0.2, GHC 7.6.3, Ubuntu 14.04

I was installing leksah ( "cabal install leksah" ) & the it failed with a message similar to below one ( about lens 4.2 dependency ) I tried installing the lasted version instead but that didn't solved my problem . ( I have unregistered that -…
AmirHossein
  • 1,310
  • 1
  • 12
  • 19
0
votes
1 answer

Tracing out the type of partial application of functions

I have been inspecting the type of Lens to understand it and have trouble figuring out the resulting type of partial application there. Initial type is like this: type RefF a b = forall f. Functor f => (b -> f b) -> (a -> f a) The above type applied…
Sibi
  • 47,472
  • 16
  • 95
  • 163
-1
votes
1 answer

Traversing and adding elements to a Data.Tree using Lenses in Haskell

I'm starting to use lenses and until now I've been unable to use them in a concrete part of a codebase I'm writing. My objective is to update a rose tree structure such as the one in Data.Tree by adding a new node inside one of the existing ones. To…
Jesuspc
  • 1,664
  • 10
  • 25
-1
votes
1 answer

In the lets-lens tutorial, how do you refactor out the call to traverse in order to implement over?

In the exercises I have implemented fmapT: -- Let's remind ourselves of Traversable, noting Foldable and Functor. -- -- class (Foldable t, Functor t) => Traversable t where -- traverse :: -- Applicative f => -- (a -> f b) -- -> t a --…
rcmerci
  • 3
  • 2
1 2 3
30
31