Skip to content

JordanMartinez/purescript-interpolate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

purescript-interpolate

Latest release Build Status

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."

Installation

spago install interpolate

Documentation

Module documentation is published on Pursuit.