diff options
author | Alexander Biehl <alexbiehl@gmail.com> | 2017-10-30 08:45:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-30 08:45:51 +0100 |
commit | aca68f620beb07f9bdebdf52948c6ea670be4980 (patch) | |
tree | 94843dd51948abd30da07ba5a2c062f88bcd19a4 /haddock-api | |
parent | 0e82a0b3aa78af13f5ef52a7d9bac9d0c4e94e02 (diff) |
Add QuickJump version to meta.json (#696)
Diffstat (limited to 'haddock-api')
-rw-r--r-- | haddock-api/haddock-api.cabal | 2 | ||||
-rw-r--r-- | haddock-api/src/Haddock.hs | 2 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Backends/Xhtml/Meta.hs (renamed from haddock-api/src/Haddock/Backends/Meta.hs) | 10 |
3 files changed, 10 insertions, 4 deletions
diff --git a/haddock-api/haddock-api.cabal b/haddock-api/haddock-api.cabal index 5ce35b94..9b580a56 100644 --- a/haddock-api/haddock-api.cabal +++ b/haddock-api/haddock-api.cabal @@ -86,12 +86,12 @@ library Haddock.Backends.Xhtml.Decl Haddock.Backends.Xhtml.DocMarkup Haddock.Backends.Xhtml.Layout + Haddock.Backends.Xhtml.Meta Haddock.Backends.Xhtml.Names Haddock.Backends.Xhtml.Themes Haddock.Backends.Xhtml.Types Haddock.Backends.Xhtml.Utils Haddock.Backends.LaTeX - Haddock.Backends.Meta Haddock.Backends.HaddockDB Haddock.Backends.Hoogle Haddock.Backends.Hyperlinker diff --git a/haddock-api/src/Haddock.hs b/haddock-api/src/Haddock.hs index 17951068..a46e58b3 100644 --- a/haddock-api/src/Haddock.hs +++ b/haddock-api/src/Haddock.hs @@ -27,9 +27,9 @@ module Haddock ( import Data.Version import Haddock.Backends.Xhtml +import Haddock.Backends.Xhtml.Meta import Haddock.Backends.Xhtml.Themes (getThemes) import Haddock.Backends.LaTeX -import Haddock.Backends.Meta import Haddock.Backends.Hoogle import Haddock.Backends.Hyperlinker import Haddock.Interface diff --git a/haddock-api/src/Haddock/Backends/Meta.hs b/haddock-api/src/Haddock/Backends/Xhtml/Meta.hs index c62c1ae8..5cf03ec4 100644 --- a/haddock-api/src/Haddock/Backends/Meta.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Meta.hs @@ -1,4 +1,4 @@ -module Haddock.Backends.Meta where +module Haddock.Backends.Xhtml.Meta where import Haddock.Utils.Json import Haddock.Version @@ -7,6 +7,11 @@ import Data.ByteString.Builder (hPutBuilder) import System.FilePath ((</>)) import System.IO (withFile, IOMode (WriteMode)) +-- | Everytime breaking changes to the Quckjump api +-- happen this needs to be modified. +quickjumpVersion :: Int +quickjumpVersion = 1 + -- | Writes a json encoded file containing additional -- information about the generated documentation. This -- is useful for external tools (e.g. hackage). @@ -15,7 +20,8 @@ writeHaddockMeta odir = do let meta_json :: Value meta_json = object [ - "haddock_version" .= String projectVersion + "haddock_version" .= String projectVersion + , "quickjump_version" .= quickjumpVersion ] withFile (odir </> "meta.json") WriteMode $ \h -> |