Fay Text type represented as JavaScript strings https://github.com/faylang/fay-text

Version on this page:
LTS Haskell 8.2:
Stackage Nightly 2017-02-23:
Latest on Hackage:
MIT licensed by Michael Snoyman, Adam Bergmark
Maintained by adam@bergmark.nl

Module documentation for


fay-text provides a Text whose values are represented as JavaScript strings for Fay, and as Data.Text for GHC. You can use this package instead of directly depending on text if you want to.

Fay has a special case that's applicable for fay-text. If a file has {-# LANGUAGE OverloadedStrings #-} GHC will replace all string literals with fromString lit. {-# LANGUAGE RebindableSyntax #-} tells GHC to use the fromString currently in scope instead of Data.String.fromString. With these two extensions enabled Fay outputs all string literals as JavaScript strings, which is the same representation as Fay.Text uses.

Note that you can mix modules using text literals and string literals, the behavior is local to the module.


Changelog (2015-02-11)

  • Allow fay 0.23.*
  • Allow fay-base 0.20.* (2015-01-05)

  • Allow fay 0.22.*.

0.3.2 (2014-10-21)

  • fay-text is now purely a compatibility layer between Fay and GHC. For Fay we reexport Data.Text from fay-base.

0.3.1 (2014-10-11)

  • Allow fay 0.21 (2014-04-29)

  • Allow fay 0.20 (2014-01-14)

  • Fix complation warnings

0.3 (2013-11-07)

  • Add Ord instance for Text (okay because JS comparison operators work on the values)
  • Make Text an EmptyDataDecl (2013-09-24)

  • Added a (large) subset of functions from Data.Text. These use the FFI so they should be pretty fast.
  • Added Eq instance for Text.
  • The Text type has been moved to Fay.Text.Type (re-exported by Fay.Text) in case you only want the type. (2013-08-27)

  • Initial release
Depends on:
Used by 3 packages:
comments powered byDisqus