[GHC] #15535: Expose the StableName constructor

#15535: Expose the StableName constructor -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: feature | Status: new request | Priority: normal | Milestone: 8.8.1 Component: Core | Version: 8.4.3 Libraries | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- A `StableName` is just a wrapper around `StableName#`, but we don't reveal that anywhere. That means that user code needs to use `unsafeCoerce` to convert between `StableName` and `StableName#`, which seems terrible. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15535 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15535: Expose the StableName constructor -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: feature request | Status: patch Priority: normal | Milestone: 8.8.1 Component: Core Libraries | 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:D5078 Wiki Page: | -------------------------------------+------------------------------------- Changes (by dfeuer): * status: new => patch * differential: => Phab:D5078 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15535#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15535: Expose the StableName constructor -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: feature request | Status: patch Priority: normal | Milestone: 8.8.1 Component: Core Libraries | 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:D5078 Wiki Page: | -------------------------------------+------------------------------------- Comment (by osa1): Out of curiosity, how do you coerce a `StableName` to a `StableName#`? `StableName` is a `data` so you'd have to first coerce it to constructor with one non-pointer field that is as large as a `StableName#`, and then read that field. Sounds tricky ... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15535#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15535: Expose the StableName constructor -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: feature request | Status: patch Priority: normal | Milestone: 8.8.1 Component: Core Libraries | 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:D5078 Wiki Page: | -------------------------------------+------------------------------------- Comment (by dfeuer): Not tricky. Just gross. {{{#!hs data StableName_ a = StableName_ (StableName# a) unwrap :: StableName a -> StableName# a unwrap sn = case unsafeCoerce sn of StableName_ sn# -> sn# }}} And conversely. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15535#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15535: Expose the StableName constructor
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: (none)
Type: feature request | Status: patch
Priority: normal | Milestone: 8.8.1
Component: Core Libraries | 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:D5078
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by David Feuer

#15535: Expose the StableName constructor -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: feature request | Status: merge Priority: normal | Milestone: 8.8.1 Component: Core Libraries | 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:D5078 Wiki Page: | -------------------------------------+------------------------------------- Changes (by dfeuer): * status: patch => merge Comment: If it's not too late to merge this for 8.6, that'd be great. Otherwise, we can wait for 8.8. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15535#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15535: Expose the StableName constructor -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: feature request | Status: merge Priority: normal | Milestone: 8.6.1 Component: Core Libraries | 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:D5078 Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Yes, I suppose we can do this given that it only touches the `GHC` namespace. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15535#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15535: Expose the StableName constructor -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: feature request | Status: closed Priority: normal | Milestone: 8.6.1 Component: Core Libraries | 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:D5078 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged in 768cc53d73e46954b01df69c6b215a41b3533f56. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15535#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC