th-env

Template Haskell splices that expand to an environment variable

https://github.com/dzhus/th-env#readme

LTS Haskell 22.39:0.1.1
Stackage Nightly 2024-10-31:0.1.1
Latest on Hackage:0.1.1

See all snapshots th-env appears in

BSD-3-Clause licensed by Dmitry Dzhus
Maintained by [email protected]
This version can be pinned in stack with:th-env-0.1.1@sha256:d700cc05d43a4acfc011ddbe3f4664435ff27c6b940950f55dd989e30486e2de,1384

Module documentation for 0.1.1

Used by 3 packages in nightly-2023-06-08(full list with versions):

th-env

Build & test Hackage Hackage deps

{-# LANGUAGE TemplateHaskell #-}
import Data.Maybe
import Language.Haskell.TH.Env

main :: IO ()
main = print $ "Running app compiled by " ++ fromMaybe "?" $$(envQ "USER") ++ " in " ++ $$(envQ' "PWD")

Changes

Changelog

0.1.1 - 2022-05-23

Added

  • #6 Add envQ' variant that requires the environment variable to be set at compilation time

0.1.0.3 - 2021-11-05

Changed

  • #2 GHC 9.x / template-haskell-2.17 support

0.1.0.2 - 2020-06-03

Changed

  • Relaxed dependency version bounds

0.1.0.1 - 2020-02-21

Changed

  • Dependencies bump

0.1.0.0 - 2019-05-01