Just switched to the 4.8 and needed to apply changes. I'm using Metadata heavily to manipulate different parts based of page based on meta, some parts of it considered optional.
```
titleCtx :: Context a
titleCtx =
field "ptitle" $ \item ->
do
metadata <- getMetadata $ itemIdentifier item
let title =
case Map.lookup "title" metadata of
Just value -> "Sigrlami - " ++ value
Nothing -> "Sigrlami"
return title
```
will change to
```
import Data.Aeson.Types
import qualified Data.HashMap.Strict as HM
titleCtx :: Context a
titleCtx =
field "ptitle" $ \item ->
do
metadata <- getMetadata $ itemIdentifier item
let title =
case HM.lookup "title" metadata of
Nothing -> ""
Just value -> -- this is not actual value, case it again
case value of
String x -> "Sigrlami - " ++ T.unpack x
_ -> "Sigrlami"
return title
```
and you'll need to add `aeson` and `unordered-containers` to your cabal dependencies.
Hope this will help someone.