You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this ugly prototype for runReaders: https://try.purescript.org/?gist=7fe346867c14d18e78ff06e32673ae5f . I wonder if something like this (with a better API of course) could be included in this lib. What do you think? Any ideas how to make this better - should I stick with onMatch and transform only input record?
(Ping @3ddyy - I've seen that you have improved reader API recently ;-))
The text was updated successfully, but these errors were encountered:
That sounds like a good idea to me. The only thing i really learned about reader from working with it is that it's tricky 😝. I was also trying to implement a local so that the type for the read value could be different, but couldn't get it to work
@3ddyy I've updated the gist. I've added simple record mapping which prepares a given record of values for internal onMatch call. I'm not sure if the implementation is readable enough and worth a PR.
I allowed myself to use inefficient Record.insert to preserve some simplicity because I hope that this record transformation is done only once during the whole interpretation.
What do you think?
I have this ugly prototype for
runReaders
: https://try.purescript.org/?gist=7fe346867c14d18e78ff06e32673ae5f . I wonder if something like this (with a better API of course) could be included in this lib. What do you think? Any ideas how to make this better - should I stick withonMatch
and transform only input record?(Ping @3ddyy - I've seen that you have improved reader API recently ;-))
The text was updated successfully, but these errors were encountered: