aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/InterfaceFile.hs
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2009-03-27 21:33:04 +0000
committerDavid Waern <david.waern@gmail.com>2009-03-27 21:33:04 +0000
commit86bb3fc4d33202369cf87a96db9b99674aaa4535 (patch)
tree44088beb79162a0de5f0e4e3ccddd4f666195257 /src/Haddock/InterfaceFile.hs
parenta46e711c848adf52fb07b62d2fa110d769dfed80 (diff)
Remove H.DocName and put DocName in H.Types
Diffstat (limited to 'src/Haddock/InterfaceFile.hs')
-rw-r--r--src/Haddock/InterfaceFile.hs24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/Haddock/InterfaceFile.hs b/src/Haddock/InterfaceFile.hs
index 7ed200ca..8a1a909c 100644
--- a/src/Haddock/InterfaceFile.hs
+++ b/src/Haddock/InterfaceFile.hs
@@ -14,7 +14,6 @@ module Haddock.InterfaceFile (
) where
-import Haddock.DocName ()
import Haddock.Types
import Haddock.Utils
@@ -515,3 +514,26 @@ instance Binary name => Binary (HaddockModInfo name) where
stabi <- get bh
maint <- get bh
return (HaddockModInfo descr porta stabi maint)
+
+
+instance Binary DocName where
+ put_ bh (Documented name modu) = do
+ putByte bh 0
+ put_ bh name
+ put_ bh modu
+ put_ bh (Undocumented name) = do
+ putByte bh 1
+ put_ bh name
+
+ get bh = do
+ h <- getByte bh
+ case h of
+ 0 -> do
+ name <- get bh
+ modu <- get bh
+ return (Documented name modu)
+ 1 -> do
+ name <- get bh
+ return (Undocumented name)
+ _ -> error "get DocName: Bad h"
+