aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface/Json.hs
diff options
context:
space:
mode:
Diffstat (limited to 'haddock-api/src/Haddock/Interface/Json.hs')
-rw-r--r--haddock-api/src/Haddock/Interface/Json.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Interface/Json.hs b/haddock-api/src/Haddock/Interface/Json.hs
index 92fb2e75..8b27a982 100644
--- a/haddock-api/src/Haddock/Interface/Json.hs
+++ b/haddock-api/src/Haddock/Interface/Json.hs
@@ -130,8 +130,10 @@ jsonDoc (DocUnorderedList xs) = jsonObject
jsonDoc (DocOrderedList xs) = jsonObject
[ ("tag", jsonString "DocOrderedList")
- , ("documents", jsonArray (fmap jsonDoc xs))
+ , ("items", jsonArray (fmap jsonItem xs))
]
+ where
+ jsonItem (index, a) = jsonObject [("document", jsonDoc a), ("seq", jsonInt index)]
jsonDoc (DocDefList xys) = jsonObject
[ ("tag", jsonString "DocDefList")