aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/InterfaceFile.hs
diff options
context:
space:
mode:
authorSimon Hengel <sol@typeful.net>2012-04-04 16:32:11 +0200
committerSimon Hengel <sol@typeful.net>2012-05-27 08:48:24 +0200
commitb19a4bea999c684e092e0ea0feaf02ff8747d2a5 (patch)
tree9a40b7eba5a0cd6644953b3ddeae335cef728fd2 /src/Haddock/InterfaceFile.hs
parent2a931d32cfdbd20d4da0cff6415a3aaf47823938 (diff)
Add an optional label to URLs
Diffstat (limited to 'src/Haddock/InterfaceFile.hs')
-rw-r--r--src/Haddock/InterfaceFile.hs21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/Haddock/InterfaceFile.hs b/src/Haddock/InterfaceFile.hs
index 970093df..ebe15325 100644
--- a/src/Haddock/InterfaceFile.hs
+++ b/src/Haddock/InterfaceFile.hs
@@ -66,13 +66,13 @@ binaryInterfaceMagic = 0xD0Cface
-- we version our interface files accordingly.
binaryInterfaceVersion :: Word16
#if __GLASGOW_HASKELL__ == 702
-binaryInterfaceVersion = 20
+binaryInterfaceVersion = 21
#elif __GLASGOW_HASKELL__ == 703
-binaryInterfaceVersion = 20
+binaryInterfaceVersion = 21
#elif __GLASGOW_HASKELL__ == 704
-binaryInterfaceVersion = 20
+binaryInterfaceVersion = 21
#elif __GLASGOW_HASKELL__ == 705
-binaryInterfaceVersion = 20
+binaryInterfaceVersion = 21
#else
#error Unknown GHC version
#endif
@@ -413,6 +413,15 @@ instance Binary Example where
result <- get bh
return (Example expression result)
+instance Binary Hyperlink where
+ put_ bh (Hyperlink url label) = do
+ put_ bh url
+ put_ bh label
+ get bh = do
+ url <- get bh
+ label <- get bh
+ return (Hyperlink url label)
+
{-* Generated by DrIFT : Look, but Don't Touch. *-}
instance (Binary id) => Binary (Doc id) where
@@ -452,7 +461,7 @@ instance (Binary id) => Binary (Doc id) where
put_ bh (DocCodeBlock al) = do
putByte bh 11
put_ bh al
- put_ bh (DocURL am) = do
+ put_ bh (DocHyperlink am) = do
putByte bh 12
put_ bh am
put_ bh (DocPic x) = do
@@ -511,7 +520,7 @@ instance (Binary id) => Binary (Doc id) where
return (DocCodeBlock al)
12 -> do
am <- get bh
- return (DocURL am)
+ return (DocHyperlink am)
13 -> do
x <- get bh
return (DocPic x)