Fix module list in ipkg

This commit is contained in:
Kiana Sheibani 2023-04-20 19:19:13 -04:00
parent f6508074a6
commit 27247861d6
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
4 changed files with 19 additions and 5 deletions

View file

@ -73,10 +73,13 @@ public export
view : Getter s a -> s -> a
view l = views l id
||| Access the value and index of an optic and apply a function to them,
||| returning the result.
public export
iviews : IndexedGetter i s a -> (i -> a -> r) -> s -> r
iviews l = runForget . l @{%search} @{Idxed} . MkForget . uncurry
||| Access the focus value and index of an optic, particularly a `Getter`.
public export
iview : IndexedGetter i s a -> s -> (i, a)
iview l = runForget $ l @{%search} @{Idxed} $ MkForget id
@ -92,6 +95,9 @@ public export
(^.) : s -> Getter s a -> a
(^.) x l = view l x
||| Access the focus value and index of an optic, particularly a `Getter`.
|||
||| This is the operator form of `iview`.
public export
(^@.) : s -> IndexedGetter i s a -> (i, a)
(^@.) x l = iview l x

View file

@ -108,8 +108,8 @@ withLens l f = uncurry f (getLens l)
||| `Void` vacuously "contains" a value of any other type.
public export
devoid : IndexedLens i Void Void a b
devoid @{MkIsLens _} = ilens absurd const
devoid : IndexedLens i Void t a b
devoid = ilens absurd absurd
||| All values contain a unit.
public export

View file

@ -9,8 +9,8 @@ import public Control.Lens
||| A prism of the `Nothing` case of a `Maybe`.
public export
Nothing_ : Prism' (Maybe a) ()
Nothing_ = prism' (const Nothing) (guard . isNothing)
Nothing_ : Prism (Maybe a) (Maybe b) () ()
Nothing_ = prism (const Nothing) (maybe (Right ()) (const $ Left Nothing))
||| A prism of the `Just` case of a `Maybe`.
public export