Compare commits
No commits in common. "96f76a775129e4500fe36ff29a569c3b43f2fa2b" and "8727fd33a615bf843118e511a5796d74fa3b7a14" have entirely different histories.
96f76a7751
...
8727fd33a6
@ -1,37 +0,0 @@
|
|||||||
---
|
|
||||||
title: bidirectional
|
|
||||||
github: https://github.com/MasseR/bidirectional
|
|
||||||
issues: https://github.com/MasseR/bidirectional/issues
|
|
||||||
badge: https://github.com/MasseR/bidirectional/workflows/Test/badge.svg
|
|
||||||
---
|
|
||||||
|
|
||||||
Bidirectional serialization based on Lysxia's post on [Monadic profunctors for bidirectional programming](https://blog.poisson.chat/posts/2017-01-01-monadic-profunctors.html).
|
|
||||||
|
|
||||||
|
|
||||||
Let's assume we have a parser like the following
|
|
||||||
|
|
||||||
``` haskell
|
|
||||||
int :: Parser (ReaderT String Maybe) (Writer [Int]) Int Int
|
|
||||||
int = parser (ReaderT readMaybe) (\x -> x <$ tell [show x])
|
|
||||||
```
|
|
||||||
|
|
||||||
Then you can use the parser for parsing:
|
|
||||||
|
|
||||||
```
|
|
||||||
> runReaderT (decode int) "3"
|
|
||||||
Just 3
|
|
||||||
```
|
|
||||||
|
|
||||||
Or for encoding:
|
|
||||||
|
|
||||||
```
|
|
||||||
> execWriter (encode int 3)
|
|
||||||
["3"]
|
|
||||||
```
|
|
||||||
|
|
||||||
Or combine both of them
|
|
||||||
|
|
||||||
```
|
|
||||||
> runReaderT (decode int) $ head $ execWriter $ encode int 3
|
|
||||||
Just 3
|
|
||||||
```
|
|
@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
title: zettelkast
|
|
||||||
github: https://github.com/MasseR/zettelkast
|
|
||||||
issues: https://github.com/MasseR/zettelkast/issues
|
|
||||||
badge: https://github.com/MasseR/zettelkast/workflows/Test/badge.svg
|
|
||||||
---
|
|
||||||
|
|
||||||
Command-line tool for managing zettelkast documents. The tool primarily focuses
|
|
||||||
on providing unique ids and showing a graph of document connections. It tries
|
|
||||||
to be as unintrusive as possible.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ zettelkast help
|
|
||||||
$ zettelkast new
|
|
||||||
$ zettelkast list
|
|
||||||
$ zettelkast open <id>
|
|
||||||
```
|
|
Loading…
Reference in New Issue
Block a user