summaryrefslogtreecommitdiff
path: root/compiler/GHC/Hs/DocString.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Hs/DocString.hs')
-rw-r--r--compiler/GHC/Hs/DocString.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/GHC/Hs/DocString.hs b/compiler/GHC/Hs/DocString.hs
index 8297d3a2de..c96165d178 100644
--- a/compiler/GHC/Hs/DocString.hs
+++ b/compiler/GHC/Hs/DocString.hs
@@ -75,19 +75,19 @@ instance Binary HsDocString where
MultiLineDocString dec xs -> do
putByte bh 0
put_ bh dec
- put_ bh xs
+ put_ bh $ BinLocated <$> xs
NestedDocString dec x -> do
putByte bh 1
put_ bh dec
- put_ bh x
+ put_ bh $ BinLocated x
GeneratedDocString x -> do
putByte bh 2
put_ bh x
get bh = do
tag <- getByte bh
case tag of
- 0 -> MultiLineDocString <$> get bh <*> get bh
- 1 -> NestedDocString <$> get bh <*> get bh
+ 0 -> MultiLineDocString <$> get bh <*> (fmap unBinLocated <$> get bh)
+ 1 -> NestedDocString <$> get bh <*> (unBinLocated <$> get bh)
2 -> GeneratedDocString <$> get bh
t -> fail $ "HsDocString: invalid tag " ++ show t