<commit_before># Valentine

# Building
```bash
git submodule update --init --recursive
bash ./rebuildSandbox.sh
cabal build
```

# Use

The valentine quasiquoter parsers a hamlet like HTML structure. In the quasiquoters there are expressions to parse different haskell expressions for LiveVDom, STMEnvelope LiveVDom, STMEnvelope (Seq LiveVDom), and


PLiveChild - !
PLiveCHildren - &
PStaticText - ^
PLiveText - #
PStaticNode - $

## Expressions

All examples assume you have a function displayInt. This uses the ^{} interpolator for static text. The valentine parser is based of indentation and uses no closing tags. All of the expressions are ran through haskell-src-meta so the expression results should be accurate and support most expressions.

```haskell
import Data.JSString (pack)
import Valentine
import LiveVDom

displayInt :: Int -> LiveVDom
displayInt i = [valentine|
<p>
    ^{pack $ show x}
|]
```

`displayInt 4` will produce dom looking like:
```html
<p>
    4
</p>
```


### STMEnvelope LiveVDom Expression

To parse a haskell expression of LiveVDom you use the !{} interpolator. Using displayInt you can make the value update.

```haskell<commit_msg>Added docs and a link to the todo-mvc example<commit_after># Valentine

# Building
```bash
git submodule update --init --recursive
bash ./rebuildSandbox.sh
cabal build
```

# Use

The valentine quasiquoter parsers a hamlet like HTML structure. In the quasiquoters there are expressions to parse different haskell expressions for LiveVDom, STMEnvelope LiveVDom, STMEnvelope (Seq LiveVDom), and

For examples of each of the interpolators, the quasiquoter, and the renderer, there is [an example todo-mvc](https://github.com/plow-technologies/live-vdom-todomvc).

## Expressions

All examples assume you have a function displayInt. This uses the ^{} interpolator for static text. The valentine parser is based of indentation and uses no closing tags. All of the expressions are ran through haskell-src-meta so the expression results should be accurate and support most expressions.

```haskell
import Data.JSString (pack)
import Valentine
import LiveVDom

displayInt :: Int -> LiveVDom
displayInt i = [valentine|
<p>
    ^{pack $ show x}
|]
```

`displayInt 4` will produce dom looking like:
```html
<p>
    4
</p>
```


### STMEnvelope LiveVDom Expression

To parse a haskell expression of LiveVDom you use the !{} interpolator. Using displayInt you can make the value update.

```haskell
{'fraction_non_alphanumeric': 0.0810920945395273, 'fraction_numerical': 0.0016299918500407497, 'mean_word_length': 4.504484304932736, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '582700', 'n_tokens_mistral': 762, 'n_tokens_neox': 710, 'n_words': 311}