aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/InterfaceFile.hs
diff options
context:
space:
mode:
authorMathieu Boespflug <mathieu.boespflug@parsci.com>2013-05-20 11:56:28 +0200
committerDavid Waern <david.waern@gmail.com>2013-08-04 10:39:43 -0700
commitc33a0b2ef062ac19692a4b836d28d16b49aab995 (patch)
treeed1745e4dd3510a708df8b5a25d7662275fcfc0c /src/Haddock/InterfaceFile.hs
parent34d2aa54b95e8d261dc325393893d06f6a085130 (diff)
Output Copright and License keys in Xhtml backend.
This information is as relevant in the documentation as it is in the source files themselves. Signed-off-by: David Waern <david.waern@gmail.com>
Diffstat (limited to 'src/Haddock/InterfaceFile.hs')
-rw-r--r--src/Haddock/InterfaceFile.hs21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/Haddock/InterfaceFile.hs b/src/Haddock/InterfaceFile.hs
index ec7272e7..27a176ae 100644
--- a/src/Haddock/InterfaceFile.hs
+++ b/src/Haddock/InterfaceFile.hs
@@ -99,7 +99,7 @@ initBinMemSize = 1024*1024
writeInterfaceFile :: FilePath -> InterfaceFile -> IO ()
-writeInterfaceFile filename iface = do
+writeInterfaceFile filename iface = do
bh0 <- openBinMem initBinMemSize
put_ bh0 binaryInterfaceMagic
put_ bh0 binaryInterfaceVersion
@@ -178,7 +178,7 @@ freshNameCache = ( create_fresh_nc , \_ -> return () )
return (initNameCache u [])
--- | Read a Haddock (@.haddock@) interface file. Return either an
+-- | Read a Haddock (@.haddock@) interface file. Return either an
-- 'InterfaceFile' or an error message.
--
-- This function can be called in two ways. Within a GHC session it will
@@ -206,7 +206,7 @@ readInterfaceFile (get_name_cache, set_name_cache) filename = do
| otherwise -> with_name_cache $ \update_nc -> do
dict <- get_dictionary bh0
-
+
-- read the symbol table so we are capable of reading the actual data
bh1 <- do
let bh1 = setUserData bh0 $ newReadState (error "getSymtabName")
@@ -564,18 +564,22 @@ instance (Binary id) => Binary (Doc id) where
instance Binary name => Binary (HaddockModInfo name) where
put_ bh hmi = do
put_ bh (hmi_description hmi)
- put_ bh (hmi_portability hmi)
- put_ bh (hmi_stability hmi)
+ put_ bh (hmi_copyright hmi)
+ put_ bh (hmi_license hmi)
put_ bh (hmi_maintainer hmi)
+ put_ bh (hmi_stability hmi)
+ put_ bh (hmi_portability hmi)
put_ bh (hmi_safety hmi)
get bh = do
descr <- get bh
- porta <- get bh
- stabi <- get bh
+ copyr <- get bh
+ licen <- get bh
maint <- get bh
+ stabi <- get bh
+ porta <- get bh
safet <- get bh
- return (HaddockModInfo descr porta stabi maint safet)
+ return (HaddockModInfo descr copyr licen maint stabi porta safet)
instance Binary DocName where
@@ -598,4 +602,3 @@ instance Binary DocName where
name <- get bh
return (Undocumented name)
_ -> error "get DocName: Bad h"
-