on master help sign in
Move ReifiedLens to Ether.Internal
041246eVladislav Zavialov
src/Ether/Internal.hs+6
@@ -6,6 +6,8 @@ module Ether.Internal
6 , LensLike
6 , LensLike
7 , Lens
7 , Lens
8 , Lens'
8 , Lens'
9+ , ReifiedLens(..)
10+ , ReifiedLens'
9 , view
11 , view
10 , over
12 , over
11 , HList(..)
13 , HList(..)
@@ -59,6 +61,10 @@ type Lens s t a b = forall f. Functor f => LensLike f s t a b
59
61
60type Lens' s a = Lens s s a a
62type Lens' s a = Lens s s a a
61
63
64+newtype ReifiedLens s t a b = Lens (Lens s t a b)
65+
66+type ReifiedLens' s a = ReifiedLens s s a a
67+
62class HasLens tag outer inner | tag outer -> inner where
68class HasLens tag outer inner | tag outer -> inner where
63 lensOf :: Lens' outer inner
69 lensOf :: Lens' outer inner
64
70
src/Ether/State.hs−4
@@ -446,10 +446,6 @@ data ZOOM t z
446
446
447type ZoomT t (z :: Type) = TaggedTrans (ZOOM t z) IdentityT
447type ZoomT t (z :: Type) = TaggedTrans (ZOOM t z) IdentityT
448
448
449−newtype ReifiedLens s t a b = Lens (Lens s t a b)
450−
451−type ReifiedLens' s a = ReifiedLens s s a a
452−
453-- | Zoom into a part of a state using a lens.
449-- | Zoom into a part of a state using a lens.
454zoom
450zoom
455 :: forall tag sOuter sInner m a
451 :: forall tag sOuter sInner m a