homepage: https://github.com/JustusAdam/simple-text-format#readme
changelog-type: ''
hash: 96b9c962258b538fa842088adfa97487883b16781c13347516b6cd0644c0cc59
test-bench-deps:
  microlens-platform: -any
  base: -any
  unordered-containers: -any
  hspec: -any
  text: -any
  simple-text-format: -any
maintainer: dev@justus.science
synopsis: Simple text based format strings with named identifiers.
changelog: ''
basic-deps:
  base: ! '>=4.7 && <5'
  text: -any
  attoparsec: -any
all-versions:
- '0.1'
author: Justus Adam
latest: '0.1'
description-type: markdown
description: ! '# simple-text-format


  This library provides a very simple format string syntax with named identifiers
  based on `text` and `attoparsec`.


  Syntax for identifiers is `${variable-name}`.

  Please note that it is whitespace sentitive, meaning `${var]` references the variable
  `"var"` whereas `${ var}` referenced the varaible `" var"`.

  The rendering is agnostic to the data structure you use to keep the identifiers.

  The formatting function expects simply a function `Text -> Maybe Text`

  There is currently no escaping mechanism, meaning `$` parses to `"$"` but there
  is no way to get a literal `${`.


  ```hs

  let formatStr = "A string with ${var} and ${var2}"

  let identMap = [("var", "something"), ("var2", "something else")] :: HashMap Text
  Text

  format'' formatStr (lookup identMap)

  -- A string with something and something else

  ```

'
license-name: BSD3

Update from Hackage at 2017-05-24T12:54:20Z
Update from Hackage at 2017-05-24T12:54:20Z
