X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fiface%2FBinIface.hs;h=b9ad5c800e067477a375253fa9e7fa5c02c7eab9;hp=502eefa57842cc5248cffb97b9f61e1c503deb2e;hb=7e95df790b34e11d7308e43dab0a7175b69b70fc;hpb=ffd3bd85a6febeec05c99d0da7dfdf34cad59caf diff --git a/compiler/iface/BinIface.hs b/compiler/iface/BinIface.hs index 502eefa..b9ad5c8 100644 --- a/compiler/iface/BinIface.hs +++ b/compiler/iface/BinIface.hs @@ -1301,10 +1301,14 @@ instance Binary IfaceNote where -- to avoid re-building it in various places. So we build the OccName -- when de-serialising. +-- NOTE regarding HetMet extensions: this screws up Adam's heinous +-- hide-the-syntactical-level-in-the-namespace trick. + instance Binary IfaceDecl where put_ bh (IfaceId name ty details idinfo) = do putByte bh 0 put_ bh (occNameFS name) + put_ bh (getOccNameDepth name) put_ bh ty put_ bh details put_ bh idinfo @@ -1339,10 +1343,11 @@ instance Binary IfaceDecl where h <- getByte bh case h of 0 -> do name <- get bh + depth <- get bh ty <- get bh details <- get bh idinfo <- get bh - occ <- return $! mkOccNameFS varName name + occ <- return $! mkOccNameFS (varNameDepth depth) name return (IfaceId occ ty details idinfo) 1 -> error "Binary.get(TyClDecl): ForeignType" 2 -> do @@ -1453,13 +1458,15 @@ instance Binary IfaceConDecl where instance Binary IfaceClassOp where put_ bh (IfaceClassOp n def ty) = do put_ bh (occNameFS n) + put_ bh (getOccNameDepth n) put_ bh def put_ bh ty get bh = do n <- get bh + depth <- get bh def <- get bh ty <- get bh - occ <- return $! mkOccNameFS varName n + occ <- return $! mkOccNameFS (varNameDepth depth) n return (IfaceClassOp occ def ty) instance Binary IfaceRule where