aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/InterfaceFile.hs
diff options
context:
space:
mode:
authorSimon Hengel <sol@typeful.net>2012-01-12 11:54:37 +0100
committerDavid Waern <david.waern@gmail.com>2012-02-04 00:50:04 +0100
commitd327e3dfea1dda473c065b0e6a7da2161c9e6668 (patch)
tree644c8ba2ba8829547971419004571c430b6da5a2 /src/Haddock/InterfaceFile.hs
parent7829173d5c619f93edb5075d66e2ed15c4cc73c6 (diff)
Add DocWarning to Doc
The Xhtml backend has special markup for that, Hoogle and LaTeX reuse what we have for DocEmphasis.
Diffstat (limited to 'src/Haddock/InterfaceFile.hs')
-rw-r--r--src/Haddock/InterfaceFile.hs14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/Haddock/InterfaceFile.hs b/src/Haddock/InterfaceFile.hs
index fcf7fe65..e998ffec 100644
--- a/src/Haddock/InterfaceFile.hs
+++ b/src/Haddock/InterfaceFile.hs
@@ -65,13 +65,13 @@ binaryInterfaceMagic = 0xD0Cface
-- we version our interface files accordingly.
binaryInterfaceVersion :: Word16
#if __GLASGOW_HASKELL__ == 702
-binaryInterfaceVersion = 19
+binaryInterfaceVersion = 20
#elif __GLASGOW_HASKELL__ == 703
-binaryInterfaceVersion = 19
+binaryInterfaceVersion = 20
#elif __GLASGOW_HASKELL__ == 704
-binaryInterfaceVersion = 19
+binaryInterfaceVersion = 20
#elif __GLASGOW_HASKELL__ == 705
-binaryInterfaceVersion = 19
+binaryInterfaceVersion = 20
#else
#error Unknown GHC version
#endif
@@ -469,6 +469,9 @@ instance (Binary id) => Binary (Doc id) where
put_ bh (DocIdentifierUnchecked x) = do
putByte bh 16
put_ bh x
+ put_ bh (DocWarning ag) = do
+ putByte bh 17
+ put_ bh ag
get bh = do
h <- getByte bh
case h of
@@ -523,6 +526,9 @@ instance (Binary id) => Binary (Doc id) where
16 -> do
x <- get bh
return (DocIdentifierUnchecked x)
+ 17 -> do
+ ag <- get bh
+ return (DocWarning ag)
_ -> fail "invalid binary data found"