# faylang/fay

A proper subset of Haskell that compiles to JavaScript

Repository: https://github.com/faylang/fay
Canonical: https://ross.abutalabs.com/products/faylang-fay
Homepage: https://github.com/faylang/fay/wiki
Language: Haskell
License: BSD-3-Clause
License Family: permissive
Last push: 2021-06-09T15:10:00+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 5156, "days_push": 1911, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1286, forks 86 (observed 2026-08-28T04:04:14.813881+00:00)

## What it is
Fay is a statically typed, lazy, purely functional proper subset of Haskell that compiles to JavaScript. It offers a trivial JavaScript FFI, automatic JSON transcoding, a Fay monad for side effects, and cabal-installable packages.

## Use cases
- compile haskell code to javascript
- write frontend logic in a haskell subset
- get static typing for code that runs in the browser
- transcode values between haskell and json automatically
- call javascript functions from a purely functional language
- produce small minifier-friendly javascript output

## When to choose
- you know Haskell and want to target the browser with familiar syntax and types
- you need a small, simple compiler with a trivial JavaScript FFI rather than full GHC
- you want cabal-installable language packages and server-side transcoding support

## When to avoid
- you need full Haskell/GHC features - Fay is deliberately a proper subset
- you need an actively maintained toolchain - the last release was 2021 and documentation has been stale since 2017
- you want deep integration with the modern JavaScript ecosystem or large production apps - PureScript or GHCJS are safer choices

## Facets
- artifact type: cli-tool
- maturity: abandoned
- function: compiler, programming-language
- domain: programming-languages, compilers, web-development, frontend
- platform: browser, cli, cross-platform
- tags: haskell, javascript, altjs, functional-programming, statically-typed, transpiler, ffi, json, cabal

## Member repositories
- faylang/fay (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:14.813881+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:56:34.676999+00:00, confidence not recorded.
  - readme: https://github.com/faylang/fay (fetched 2026-08-28T04:04:14.813881+00:00, sha 9077c0b6d0c8)
  - homepage: https://github.com/faylang/fay/wiki (fetched 2026-08-29T12:12:03.876728+00:00, sha 240fa9093639)
- Data as of 2026-08-30T08:39:29.467469+00:00.
