[GHC] #12000: static pointer in ghci

#12000: static pointer in ghci -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 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: -------------------------------------+------------------------------------- {{{ $ ghci -fobject-code -ignore-dot-ghci -XStaticPointers GHCi, version 8.1.20160428: http://www.haskell.org/ghc/ :? for help Prelude> a = static id Prelude> a <interactive>:2:1: error: Variable not in scope: a Prelude> }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12000 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12000: static pointer in ghci -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Iceland_jack): And {{{ Prelude> let a = static id ByteCodeLink.lookupCE During interactive linking, GHCi couldn't find the following symbol: interactive_Ghci2_sptEntryZC2_closure This may be due to you not asking GHCi to load extra object files, archives or DLLs needed by your current session. Restart GHCi, specifying the missing library using the -L/path/to/object/dir and -lmissinglibname flags, or simply by naming the relevant files on the GHCi command line. Alternatively, this link failure might indicate a bug in GHCi. If you suspect the latter, please send a bug report to: glasgow-haskell-bugs@haskell.org }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12000#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12000: static pointer in ghci -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Documentation | Version: 8.1 Resolution: | Keywords: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9878 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * cc: facundo.dominguez (added) * keywords: => StaticPointers * component: Compiler => Documentation * related: => #9878 * type: bug => feature request Comment: From ticket:9878#comment:2:
The current StaticPointers implementation is not intended to be supported in GHCi.
@facundo.dominguez (off-topic): `StaticPointers` is not listed in the [https://downloads.haskell.org/~ghc/master/users-guide/flags.html flag reference] of the User's Guide. You'd have to edit `utils/mkUserGuidePart/Options/Language.hs` to change that. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12000#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12000: static pointer in ghci -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Documentation | Version: 8.1 Resolution: | Keywords: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9878 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by facundo.dominguez): I'm testing the master branch of GHC. I can reproduce this without using the static form. {{{ Prelude> c = 'a' Prelude> c <interactive>:9:1: error: Variable not in scope: c }}} The crash reported later, I can't see. {{{
let a = static id Prelude> a
<interactive>:6:1: error: • No instance for (Data.Typeable.Internal.Typeable a0) arising from a use of ‘it’ • In a stmt of an interactive GHCi command: print it }}} That said, the static pointers produced in GHCi can only be found later if they are created in compiled (and later loaded) modules. Entering a static form at the prompt won't make it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12000#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12000: static pointer in ghci -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Documentation | Version: 8.1 Resolution: | Keywords: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9878 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by thomie): I opened #12091 for the "Variable not in scope" issue, since it is not `-XStaticPointers` related. Is there anything left to do here? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12000#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12000: static pointer in ghci -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: feature request | Status: closed Priority: normal | Milestone: Component: Documentation | Version: 8.1 Resolution: invalid | Keywords: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9878 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by facundo.dominguez): * status: new => closed * resolution: => invalid Comment: Probably not. If the crash persisted after upgrading GHC, it would deserve another ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12000#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12000: static pointer in ghci -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: feature request | Status: closed Priority: normal | Milestone: Component: Documentation | Version: 8.1 Resolution: invalid | Keywords: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9878 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): That being said, I would really like for GHCi to properly support `StaticPointers` since I use this extension rather often in my recent day- to-day work. I've opened #12356 to track this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12000#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC