#2514: Add/Expose Binary API that allows dumping of any GHC Binary instance
--------------------------------+-------------------------------------------
Reporter: nominolo | Owner: nominolo
Type: feature request | Status: new
Priority: normal | Component: GHC API
Version: 6.9 | Severity: normal
Keywords: | Testcase:
Architecture: Unknown | Os: Unknown
--------------------------------+-------------------------------------------
Serialising Names requires that a symbol table is being provided in
the BinHandle so that a string can be mapped to an index in the symbol
table. API clients like Haddock need this so they can use all Binary
instances of GHC data types.
Whether a symbol table is provided or not is best reflected in the
type (using phantom types / type labels). For example:
{{{
data Put symtab a = ...
data Symtab
instance Monad (Put b) where ...
instance Put a Foo where ...
instance Put Symtab Name where ...
runPut :: ... -> Put () a -> IO a
putWithSymtable :: ... -> Put Symtab a -> IO a
}}}
Similarly for a Get monad
(feature suggested by David Waern)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2514>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs