-%************************************************************************
-%* *
-\subsection{Binary output}
-%* *
-%************************************************************************
-
-\begin{code}
-instance Binary Name where
- -- we must print these as RdrNames, because that's how they will be read in
- put_ bh Name {n_sort = sort, n_uniq = uniq, n_occ = occ} =
- case sort of
- External mod
- | this_mod == mod -> put_ bh (mkRdrUnqual occ)
- | otherwise -> put_ bh (mkRdrOrig (moduleName mod) occ)
- where (this_mod,_,_,_) = getUserData bh
- _ -> do
- put_ bh (mkRdrUnqual occ)
-
- get bh = error "can't Binary.get a Name"
-\end{code}