Enables string interpolation for PureScript for values of 5 different types: String
, Boolean
, Int
, Number
, and Char
. Credit goes to @natefaubion for original implementation. This project is a modified version of that implementation.
i "there are " 52 " apples." == "there are 52 apples."
i 52 " apples and " 0 " oranges." == "52 apples and 0 oranges."
value :: String
value =
let
variableName = 42
in
i "There are " variableName " apples."
bower install jordanmartinez/purescript-interpolate
-- Until this package is included in the latest package set,
-- add the following in the `additions` part of your `packages.dhall` file.
interpolate =
{ dependencies = [ "prelude" ]
, repo = "https://github.com/jordanmartinez/purescript-interpolate.git"
, version = "v2.0.1"
}
See #1 for more context, but your bower.json
file will need to look like this:
"dependencies": {
"purescript-a": "^1.0.0",
"purescript-b": "^2.0.0",
"purescript-interpolate": "jordanmartinez/purescript-interpolate#^2.0.1"
}
Module documentation is published on Pursuit.