From 86bb3fc4d33202369cf87a96db9b99674aaa4535 Mon Sep 17 00:00:00 2001 From: David Waern Date: Fri, 27 Mar 2009 21:33:04 +0000 Subject: Remove H.DocName and put DocName in H.Types --- src/Haddock/DocName.hs | 51 -------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 src/Haddock/DocName.hs (limited to 'src/Haddock/DocName.hs') diff --git a/src/Haddock/DocName.hs b/src/Haddock/DocName.hs deleted file mode 100644 index 227d63e8..00000000 --- a/src/Haddock/DocName.hs +++ /dev/null @@ -1,51 +0,0 @@ -{-# OPTIONS_HADDOCK hide #-} - --- --- Haddock - A Haskell Documentation Tool --- --- (c) Simon Marlow 2003 --- - - -module Haddock.DocName where - - -import GHC -import Name -import Binary - - -data DocName = Documented Name Module | Undocumented Name - deriving Eq - - --- | The 'OccName' belonging to this name -docNameOcc :: DocName -> OccName -docNameOcc = nameOccName . getName - - -instance NamedThing DocName where - getName (Documented name _) = name - getName (Undocumented name) = name - - -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" -- cgit v1.2.3