Is RefType a Prism in disguise?
See original GitHub issueThe main operations of RefType
are unwrap
and refine
if we ignore the unsafe operations and the macros. unwrap
has type F[T, P] => T
and refine
has type T => Either[String, F[T, P]]
. If we set type S = F[T, P]
and ignore the error message in Either
, we get this pair of functions:
S => T
T => Option[S]
This looks similar to a Prism
. I’d like to study lens libraries and Prism
in more detail. Maybe we can borrow laws and concepts from the lens world and streamline RefType
.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
openjfx/9-dev/rt: 904ac9ba4ddb
useRef = " + + refType); + + logInfo("prism.marlin.edges = " + + MarlinConst. ... +// The left side is just a matrix...
Read more >Untitled
Opi nail polish costume? ... Transport aerien voiture, Oracle ref type, Northrop grumman rolling meadows ... Fate kaleid liner prisma illya animeultima!
Read more >Untitled
Swithens saddlery, Animated series batman costume, Viron laivan pelikoneet, ... Kumkum 154 episode, Prism favia coral care, Vagotomy pyloroplasty wiki, ...
Read more >Moore v. Hartman | Cases - Westlaw
The prism through which the plaintiff is viewing the initiation of the ... [ ] was a disguise for William Spartin's influence within...
Read more >What is the right place for the system profile folder in windows xp ...
Prism.Order Prism.printallocs. Prism.RefType. Prism.showcull ... Malicious software can disguise itself also seems to be a legitimate process of XP or he ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You’re completely right. Forget what I said, we should be able to create a
Prism
for all refined typeAha. But refined’s
Xml
predicate does not change aString
to ascala.xml.Elem
. It merely tags the sourceString
without modifying it:scala.xml.XML.loadString
is used in theValidate[String, Xml]
instance only for checking that the source string is valid XML.