[GHC] #15223: Serialising Names using the GHC API is not possible
#15223: Serialising Names using the GHC API is not possible -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): Phab:D4782 | Wiki Page: -------------------------------------+------------------------------------- In order to serialise a `Name` using `Binary` you have to initialise `UserData`. This isn't possible because the constructors necessary to write the symbol table and dictionary are not exported. However, it turns out to be easy to extract the necessary logic and provide two nice wrapper functions to provide this functionality. This makes it possible to serialise Names when writing source plugins for instance. https://phabricator.haskell.org/D4782 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15223> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15223: Serialising Names using the GHC API is not possible -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4782 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Matthew Pickering <matthew.pickering@…>): In [changeset:"554bc7fcca30b1b6ffb6a2daca684ea74eb83ad8/ghc" 554bc7fc/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="554bc7fcca30b1b6ffb6a2daca684ea74eb83ad8" Provide `getWithUserData` and `putWithUserData` Summary: This makes it possible to serialise Names and FastStrings in user programs, for example, when writing a source plugin. When writing my first source plugin, I wanted to serialise names but it wasn't possible easily without exporting additional constructors. This interface is sufficient and abstracts nicely over the symbol table and dictionary. Reviewers: alpmestan, bgamari Reviewed By: alpmestan Subscribers: rwbarton, thomie, carter GHC Trac Issues: #15223 Differential Revision: https://phabricator.haskell.org/D4782 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15223#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15223: Serialising Names using the GHC API is not possible -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4782 Wiki Page: | -------------------------------------+------------------------------------- Changes (by mpickering): * status: new => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15223#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC