diff options
author | David Waern <david.waern@gmail.com> | 2009-03-27 21:33:04 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2009-03-27 21:33:04 +0000 |
commit | 86bb3fc4d33202369cf87a96db9b99674aaa4535 (patch) | |
tree | 44088beb79162a0de5f0e4e3ccddd4f666195257 /src/Haddock/InterfaceFile.hs | |
parent | a46e711c848adf52fb07b62d2fa110d769dfed80 (diff) |
Remove H.DocName and put DocName in H.Types
Diffstat (limited to 'src/Haddock/InterfaceFile.hs')
-rw-r--r-- | src/Haddock/InterfaceFile.hs | 24 |
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" + |