fay-text: Fay Text type represented as JavaScript strings

[ data, fay, library, mit, text ] [ Propose Tags ] [ Report a vulnerability ]

Text type represented as JavaScript strings for Fay and Data.Text for GHC. Use with OverloadedStrings and RebindableSyntax to have Fay treat string literals as Text.


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.2.0.0, 0.3, 0.3.0.1, 0.3.0.2, 0.3.1, 0.3.2, 0.3.2.1, 0.3.2.2
Change log CHANGELOG.md
Dependencies fay (>=0.18), fay-base (>=0.18 && <0.19.3), text [details]
License MIT
Copyright 2013 Michael Snoyman, Adam Bergmark
Author Michael Snoyman, Adam Bergmark
Maintainer adam@edea.se
Revised Revision 1 made by AdamBergmark at 2014-10-22T09:57:50Z
Category Data, Fay, Text
Home page https://github.com/faylang/fay-text
Bug tracker https://github.com/faylang/fay-text/issues
Source repo head: git clone https://github.com/faylang/fay-text.git
Uploaded by AdamBergmark at 2013-11-07T02:01:51Z
Distributions
Reverse Dependencies 6 direct, 6 indirect [details]
Downloads 10344 total (28 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Successful builds reported [all 1 reports]

Readme for fay-text-0.3

[back to package description]

Changelog

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.