Agda-2.6.0.1: A dependently typed functional programming language and proof assistant

Safe Haskell | Safe
Language | Haskell2010

Agda.Utils.Lens.Examples

Description

Examples how to use Agda.Utils.Lens.

Synopsis

- data Record a b = Record {
  - field1 :: a
  - field2 :: b
  }
- lensField1 :: Lens' a (Record a b)
- lensField2 :: Lens' b (Record a b)

# Documentation

data Record a b Source #

Constructors

Record |

Fields

- field1 :: a
- field2 :: b

lensField1 :: Lens' a (Record a b) Source #

(View source:) This is how you implement a lens for a record field.

lensField2 :: Lens' b (Record a b) Source #