<commit_before># purescript-halogen

[![Latest release](http://img.shields.io/bower/v/purescript-halogen.svg)](https://github.com/slamdata/purescript-halogen/releases)
[![Build Status](https://travis-ci.org/slamdata/purescript-halogen.svg?branch=master)](https://travis-ci.org/slamdata/purescript-halogen)
[![Dependency Status](https://www.versioneye.com/user/projects/5620cabf36d0ab00210009a3/badge.svg?style=flat)](https://www.versioneye.com/user/projects/5620cabf36d0ab00210009a3)

A declarative, type-safe UI library for PureScript.

## Getting Started

- Read the [introduction](#introduction)
- Browse the [module documentation](http://pursuit.purescript.org/packages/purescript-halogen).
- Take a look at some examples:
  - [Basic counter](examples/counter/)
  - [AJAX requests](examples/ajax/)
  - [TODO list](examples/todo/)
  - [Ace editor](examples/ace/)

`purescript-halogen` uses the `virtual-dom` library as a CommonJS dependency. To set up `virtual-dom` in your project, it is recommended that you:

- Install `virtual-dom` as an NPM dependency in your `package.json` file.
- Use `psc` with `psc-bundle` and then `webpack` or `browserify` to build and link the `virtual-dom` source code into a JS bundle for use in the web browser. See a `gulpfile.js` in one of the example directories for a build setup using `webpack`.

## Introduction

A Halogen application is represented by a tree of components. Each component definition describes how to render the component for a given state and provides a function that handles queries that can make changes to the state of the component and/or return details about the state.

A basic component:

``` purescript
import Prelude
import Halogen<commit_msg>Add link to template project<commit_after># purescript-halogen

[![Latest release](http://img.shields.io/bower/v/purescript-halogen.svg)](https://github.com/slamdata/purescript-halogen/releases)
[![Build Status](https://travis-ci.org/slamdata/purescript-halogen.svg?branch=master)](https://travis-ci.org/slamdata/purescript-halogen)
[![Dependency Status](https://www.versioneye.com/user/projects/5620cabf36d0ab00210009a3/badge.svg?style=flat)](https://www.versioneye.com/user/projects/5620cabf36d0ab00210009a3)

A declarative, type-safe UI library for PureScript.

## Getting Started

- Read the [introduction](#introduction)
- Browse the [module documentation](http://pursuit.purescript.org/packages/purescript-halogen).
- Take a look at some examples:
  - [Basic counter](examples/counter/)
  - [AJAX requests](examples/ajax/)
  - [TODO list](examples/todo/)
  - [Ace editor](examples/ace/)
- Clone the [template project](https://github.com/slamdata/purescript-halogen-template) and give it a try!

`purescript-halogen` uses the `virtual-dom` library as a CommonJS dependency. To set up `virtual-dom` in your project, it is recommended that you:

- Install `virtual-dom` as an NPM dependency in your `package.json` file.
- Use `psc` with `psc-bundle` and then `webpack` or `browserify` to build and link the `virtual-dom` source code into a JS bundle for use in the web browser. See a `gulpfile.js` in one of the example directories for a build setup using `webpack`.

## Introduction

A Halogen application is represented by a tree of components. Each component definition describes how to render the component for a given state and provides a function that handles queries that can make changes to the state of the component and/or return details about the state.

A basic component:

``` purescript
import Prelude
import Halogen
{'fraction_non_alphanumeric': 0.11286681715575621, 'fraction_numerical': 0.01805869074492099, 'mean_word_length': 4.978077571669477, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 11, 'lorem ipsum': 0, 'www.': 4, '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': '3033880', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1076, 'n_words': 344}