Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 24eb3c5

Browse files
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

29 files changed

+1735
-1326
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,12 @@ install:
88
- npm install && bower install
99
script:
1010
- pulp test
11+
12+
after_success:
13+
- >-
14+
test $TRAVIS_TAG &&
15+
psc-publish > .pursuit.json &&
16+
curl -X POST http://pursuit.purescript.org/packages \
17+
-d @.pursuit.json \
18+
-H 'Accept: application/json' \
19+
-H "Authorization: token ${GITHUB_TOKEN}"

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ import Text.Markdown.SlamDown.Pretty
2222

2323
### API
2424

25-
See the [module documentation](docs/).
25+
Module documentation is [published on
26+
Pursuit](http://pursuit.purescript.org/packages/purescript-markdown).
2627

2728
### Tests
2829

bower.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222
"package.json"
2323
],
2424
"dependencies": {
25+
"purescript-const": "^0.5.0",
2526
"purescript-functions": "^0.1.0",
27+
"purescript-functor-compose": "^0.0.1",
28+
"purescript-hugenums": "^1.3.0",
29+
"purescript-lists": "^0.7.10",
2630
"purescript-parsing": "^0.7.1",
2731
"purescript-prelude": "^0.1.3",
2832
"purescript-strongcheck": "^0.14.4",

docs/Text/Markdown/SlamDown.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/Text/Markdown/SlamDown/Eval.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/Text/Markdown/SlamDown/Parser.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/Text/Markdown/SlamDown/Pretty.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/Text/Markdown/SlamDown/Syntax.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

docs/Text/Markdown/SlamDown/Syntax/Block.md

Lines changed: 0 additions & 54 deletions
This file was deleted.

docs/Text/Markdown/SlamDown/Syntax/FormField.md

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)