diff --git a/dhall-bash.cabal b/dhall-bash.cabal
--- a/dhall-bash.cabal
+++ b/dhall-bash.cabal
@@ -1,5 +1,5 @@
 Name: dhall-bash
-Version: 1.0.19
+Version: 1.0.20
 Cabal-Version: >=1.8.0.2
 Build-Type: Simple
 Tested-With: GHC == 7.10.3, GHC == 8.4.3, GHC == 8.6.1
@@ -31,7 +31,7 @@
         base                      >= 4.8.0.0 && < 5   ,
         bytestring                              < 0.11,
         containers                              < 0.7 ,
-        dhall                     >= 1.18.0  && < 1.22,
+        dhall                     >= 1.22.0  && < 1.23,
         neat-interpolation                      < 0.4 ,
         shell-escape                            < 0.3 ,
         text                      >= 0.2     && < 1.3
diff --git a/src/Dhall/Bash.hs b/src/Dhall/Bash.hs
--- a/src/Dhall/Bash.hs
+++ b/src/Dhall/Bash.hs
@@ -264,6 +264,10 @@
                 <>  Data.ByteString.intercalate " " kvs'
                 <>  ")"
         return bytes
+    go (Field (Union m) k) = do
+        e <- first adapt (dhallToExpression (Field (Union m) k))
+        let bytes = "declare -r " <> var <> "=" <> e
+        return bytes
     go (Embed   x) = do
         Dhall.TypeCheck.absurd x
     go (Note  _ e) = do
@@ -353,4 +357,8 @@
     go (TextLit (Chunks [] a)) = do
         let bytes = Data.Text.Encoding.encodeUtf8 a
         return (Text.ShellEscape.bytes (Text.ShellEscape.bash bytes))
+    go e@(Field (Union m) k) =
+        case Dhall.Map.lookup k m of
+            Just Nothing -> go (TextLit (Chunks [] k))
+            _            -> Left (UnsupportedExpression e)
     go e = Left (UnsupportedExpression e)
