diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,12 @@
 # Changelog
 
+## [0.1.1] - 2022-05-23
+
+## Added
+
+- [#6](https://github.com/dzhus/th-env/pull/6) Add `envQ'` variant
+  that requires the environment variable to be set at compilation time
+
 ## [0.1.0.3] - 2021-11-05
 
 ### Changed
@@ -20,6 +27,7 @@
 
 ## [0.1.0.0] - 2019-05-01
 
+[0.1.1]: https://github.com/dzhus/th-env/compare/0.1.0.3...0.1.1
 [0.1.0.3]: https://github.com/dzhus/th-env/compare/0.1.0.2...0.1.0.3
 [0.1.0.2]: https://github.com/dzhus/th-env/compare/0.1.0.1...0.1.0.2
 [0.1.0.1]: https://github.com/dzhus/th-env/compare/0.1.0.0...0.1.0.1
diff --git a/README.lhs b/README.lhs
--- a/README.lhs
+++ b/README.lhs
@@ -10,5 +10,5 @@
 import Language.Haskell.TH.Env
 
 main :: IO ()
-main = print $ "Running app compiled by " ++ fromMaybe "?" $$(envQ "USER")
+main = print $ "Running app compiled by " ++ fromMaybe "?" $$(envQ "USER") ++ " in " ++ $$(envQ' "PWD")
 ```
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -10,5 +10,5 @@
 import Language.Haskell.TH.Env
 
 main :: IO ()
-main = print $ "Running app compiled by " ++ fromMaybe "?" $$(envQ "USER")
+main = print $ "Running app compiled by " ++ fromMaybe "?" $$(envQ "USER") ++ " in " ++ $$(envQ' "PWD")
 ```
diff --git a/src/Language/Haskell/TH/Env.hs b/src/Language/Haskell/TH/Env.hs
--- a/src/Language/Haskell/TH/Env.hs
+++ b/src/Language/Haskell/TH/Env.hs
@@ -1,8 +1,8 @@
 {-# LANGUAGE LambdaCase #-}
 {-# LANGUAGE ScopedTypeVariables #-}
-{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TemplateHaskellQuotes #-}
 
-module Language.Haskell.TH.Env (envQ)
+module Language.Haskell.TH.Env (envQ, envQ')
 
 where
 
@@ -12,7 +12,7 @@
 import System.Environment
 
 -- | Produce a typed expression with the current value of an
--- environment variable.
+-- environment variable, or Nothing if it's not set.
 envQ :: IsString a
      => String
      -- ^ Environment variable name.
@@ -21,3 +21,14 @@
   runIO (lookupEnv name) >>= \case
     Just v  -> fromCode $ toCode [|| Just (fromString v) ||]
     Nothing -> fromCode $ toCode [|| Nothing ||]
+
+-- | Produce a typed expression with the current value of an
+-- environment variable. Fail if it's not set.
+envQ' :: IsString a
+      => String
+      -- ^ Environment variable name.
+      -> SpliceQ a
+envQ' name = liftSplice $
+  runIO (lookupEnv name) >>= \case
+    Just v  -> fromCode $ toCode [|| fromString v ||]
+    Nothing -> fail $ "Environment variable " ++ name ++ " is not set"
diff --git a/th-env.cabal b/th-env.cabal
--- a/th-env.cabal
+++ b/th-env.cabal
@@ -4,12 +4,12 @@
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: 77684b3ed7955003a3cc45577f9c5d9f7a3b95b0088f665dba6b29b46eb4a57f
+-- hash: 95226380269cc2dc702ac016f5a227875b5724dd211f6548ebc31dbe2a112191
 
 name:           th-env
-version:        0.1.0.3
-synopsis:       Template Haskell splice that expands to an environment variable
-description:    TH splice that expands to an environment variable value. Can be used to embed build-time parameters in your application.
+version:        0.1.1
+synopsis:       Template Haskell splices that expand to an environment variable
+description:    TH splices that expand to an environment variable value. Can be used to embed build-time parameters in your application.
 category:       Template Haskell
 homepage:       https://github.com/dzhus/th-env#readme
 bug-reports:    https://github.com/dzhus/th-env/issues
