<commit_before>BlazeHtml RFC
=============

Introduction
------------

I was accepted as a student to Google Summer of Code for haskell.org. My task
is now to create a high-performance HTML generation library. We have chosen to
create a combinator library with a light-weight syntax called BlazeHtml.

In the past few weeks, we have been exploring the performance and design of
different drafts of this library. Now, the time has come to ask some questions
to the Haskell community -- and more specifically, the end users of the library,
and current users of other HTML generation libraries.

This document is a literate Haskell file in which we explain our current ideas
and, if possible, request feedback.

Input strings
-------------

BlazeHtml is mostly written to support `Data.Text` values as "input": it takes
`Data.Text` values as parameters for attributes, as content for text elements...

We also support `String` as input types, but we tend to this discourage this.

*QX*: What do you think of these input types?

We would like to avoid using `pack` everywhere in our code, so we use the
`OverloadedStrings` language extension:

> {-# LANGUAGE OverloadedStrings #-}

Modules
-------

I am going to import Prelude hiding some functions, to avoid clashes.<commit_msg>Add a section to RFC showing how to run the file.<commit_after>BlazeHtml RFC
=============

Introduction
------------

I was accepted as a student to Google Summer of Code for haskell.org. My task
is now to create a high-performance HTML generation library. We have chosen to
create a combinator library with a light-weight syntax called BlazeHtml.

In the past few weeks, we have been exploring the performance and design of
different drafts of this library. Now, the time has come to ask some questions
to the Haskell community -- and more specifically, the end users of the library,
and current users of other HTML generation libraries.

About this file
---------------

This document is a literate Haskell file in which we explain our current ideas
and, if possible, request feedback. If you want to run this file or experiment
with the code, you need to check out the code from github:

    git clone git://github.com/jaspervdj/BlazeHtml.git

Enter the directory. You can then run the benchmarks like this:

    cd BlazeHtml
    make bench-html

The folder also contains a `.ghci` file which will set the correct include
directories for ghci. To load this document, use:

    ghci doc/RFC.lhs

Input strings
-------------

BlazeHtml is mostly written to support `Data.Text` values as "input": it takes
`Data.Text` values as parameters for attributes, as content for text elements...

We also support `String` as input types, but we tend to this discourage this.

*QX*: What do you think of these input types?

We would like to avoid using `pack` everywhere in our code, so we use the
`OverloadedStrings` language extension:

> {-# LANGUAGE OverloadedStrings #-}

Modules
-------

I am going to import Prelude hiding some functions, to avoid clashes.
{'fraction_non_alphanumeric': 0.07854785478547854, 'fraction_numerical': 0.0, 'mean_word_length': 3.670261941448382, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '1112069', 'n_tokens_mistral': 782, 'n_tokens_neox': 751, 'n_words': 454}