diff --git a/ginger.cabal b/ginger.cabal
--- a/ginger.cabal
+++ b/ginger.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                ginger
-version:             0.1.4.0
+version:             0.1.5.0
 synopsis:            An implementation of the Jinja2 template language in Haskell
 description:         Ginger is Jinja, minus the most blatant pythonisms. Wants
                      to be feature complete, but isn't quite there yet.
diff --git a/src/Text/Ginger/GVal.hs b/src/Text/Ginger/GVal.hs
--- a/src/Text/Ginger/GVal.hs
+++ b/src/Text/Ginger/GVal.hs
@@ -246,10 +246,27 @@
 -- compact syntax.
 type Pair m = (Text, GVal m)
 
--- | Construct a dictionary GVal from a list of pairs.
+-- | Construct a dictionary GVal from a list of pairs. Internally, this uses
+-- a hashmap, so element order will not be preserved.
 dict :: [Pair m] -> GVal m
 dict = toGVal . HashMap.fromList
 
+-- | Construct an ordered dictionary GVal from a list of pairs. Internally,
+-- this conversion uses both a hashmap (for O(1) lookup) and the original list,
+-- so element order is preserved, but there is a bit of a memory overhead.
+orderedDict :: [Pair m] -> GVal m
+orderedDict xs =
+    def
+        { asHtml = mconcat . Prelude.map asHtml . Prelude.map snd $ xs
+        , asText = mconcat . Prelude.map asText . Prelude.map snd $ xs
+        , asBoolean = not . Prelude.null $ xs
+        , isNull = False
+        , asLookup = Just (\v -> HashMap.lookup v hm)
+        , asDictItems = Just xs
+        }
+    where
+        hm = HashMap.fromList xs
+--
 -- | Construct a pair from a key and a value.
 (~>) :: ToGVal m a => Text -> a -> Pair m
 k ~> v = (k, toGVal v)
