From 8074252d0cfd3610d03908513eed8c4b0cd2f598 Mon Sep 17 00:00:00 2001 From: Fabian Schläpfer Date: Tue, 29 May 2018 18:44:25 +0200 Subject: Update tutorial for YAML object metadata Since version 4.8 `Metadata` is no longer a Map but a YAML object. (see #225) The compilers tutorial is adapted to use `lookupString` instead of `Map.lookup`. --- web/tutorials/04-compilers.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web') diff --git a/web/tutorials/04-compilers.markdown b/web/tutorials/04-compilers.markdown index a1fca37..b6b1c3c 100644 --- a/web/tutorials/04-compilers.markdown +++ b/web/tutorials/04-compilers.markdown @@ -92,7 +92,7 @@ And `$title$` like this: titleContext :: Context a titleContext = field "title" $ \item -> do metadata <- getMetadata (itemIdentifier item) - return $ fromMaybe "No title" $ M.lookup "title" metadata + return $ fromMaybe "No title" $ lookupString "title" metadata ``` And compose them using the `Monoid` instance: -- cgit v1.2.3