This repository was archived by the owner on Jun 15, 2023. It is now read-only.
Commit 24eb3c5
committed
Major update to resolve SD-1148
I jumped the gun on my last big change to this library; I should have
developed that in lockstep with the requirements of
purescript-markdown-halogen and slamdata, because it turned out to be
insufficient—as a result, we will have some degree of API churn.
The main changes introduced are to replace TextBoxType with a new
TextBox f type, which passes the type of data associated with a text box
through f. So, if f is instantiated at Identity, then this represents
the value of a text field, and if it is instantiated at Const Unit, it
represents a "template"/specification for a text field, or if it is as
Expr, it represents a program that will compute the value of a text
field, etc.
Likewise, the same has been done to FormField. Then, traverseTextBox and
traverseFormField are introduced, which allow us to very easily and
ergonomically move between representations using natural
transformations.
This approach has led to the unification of a number of existing data
structures, and also allows us to preserve type in various
transformations without relying on lossy intermediate conversions.
Finally, there have been some stylistic changes, as well as module
structure changes. I have also updated everything to target PureScript
0.8.2, and dealt with the various compiler warnings.1 parent 121fdf5 commit 24eb3c5
File tree
29 files changed
+1735
-1326
lines changed- docs/Text/Markdown
- SlamDown
- Syntax
- src/Text/Markdown/SlamDown
- Parser
- Syntax
- test/src/Test
29 files changed
+1735
-1326
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments