| Copyright | © 2020 James Alexander Feldman-Crough |
|---|---|
| License | MPL-2.0 |
| Safe Haskell | None |
| Language | Haskell2010 |
ProSource.HasLocation
Description
Synopsis
- class HasLocation t where
- offset :: HasLocation l => AffineTraversal' l Offset
- column :: HasLocation l => AffineFold l Column
- line :: HasLocation l => AffineFold l Line
- source :: HasLocation l => AffineFold l Source
Classy optics; implementable on all types with a location
class HasLocation t where Source #
A classy optic for selecting the Location from a value. Note that location is affine: a Location can't be attached to a value which does not -- already have one, and not all values with an instance of HasLocation have a location.
Methods
Instances
| HasLocation Location Source # | |
Defined in ProSource.HasLocation | |
offset :: HasLocation l => AffineTraversal' l Offset Source #
Read-only optics
column :: HasLocation l => AffineFold l Column Source #
line :: HasLocation l => AffineFold l Line Source #
source :: HasLocation l => AffineFold l Source Source #