-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
617d645
commit 2b71372
Showing
5 changed files
with
79 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{-# LANGUAGE UndecidableSuperClasses #-} | ||
|
||
module Plutarch.Optics.Traversal where | ||
|
||
import Plutarch.Core | ||
|
||
import Plutarch.Optics.Optic | ||
import Plutarch.Optics.Optional | ||
import Plutarch.Optics.Profunctor | ||
|
||
type PTraversal edsl s t a b = | ||
forall p. (IsPTraversal edsl p) => | ||
POptic p s t a b | ||
|
||
type PTraversal' edsl s a = PTraversal edsl s s a a | ||
|
||
class (IsPOptional edsl p, PMonoidal edsl p) => IsPTraversal edsl p | ||
|
||
traverseOf :: PTraversal edsl s t a b -> (Term edsl a -> f (Term edsl b)) -> (Term edsl s -> f (Term edsl t)) | ||
traverseOf p = unPStar . p . PStar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module Plutarch.PList where | ||
|
||
import Plutarch.Core | ||
import Plutarch.EType | ||
|
||
data PListF a self ef | ||
= PNil | ||
| PCons (ef /$ a) (ef /$ self) | ||
|
||
newtype PList a ef = PList (EFix (PListF a) ef) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters