module Distribution.Types.Module
( Module(..)
) where
import Prelude ()
import Distribution.Compat.Prelude
import qualified Distribution.Compat.ReadP as Parse
import qualified Text.PrettyPrint as Disp
import Distribution.Text
import Distribution.Types.UnitId
import Distribution.ModuleName
data Module =
Module DefUnitId ModuleName
deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
instance Binary Module
instance Text Module where
disp (Module uid mod_name) =
disp uid <<>> Disp.text ":" <<>> disp mod_name
parse = do
uid <- parse
_ <- Parse.char ':'
mod_name <- parse
return (Module uid mod_name)
instance NFData Module where
rnf (Module uid mod_name) = rnf uid `seq` rnf mod_name