[GHC] #13101: Enable GHC to be loaded into GHCi
#13101: Enable GHC to be loaded into GHCi -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.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: -------------------------------------+------------------------------------- It would be very helpful for development to be able to load GHC itself into GHCi. In principle this shouldn't be so hard since GHC is just another Haskell program. However, in practice there are a number of modules which use unboxed tuples, which the interpreter does not support. However, it should be possible to the convince GHC to use object code for just these modules and interpret the rest. I have a few attempts at this here (https://gist.github.com/bgamari/bd53e4fd6f3323599387ffc7b11d1a1e). See the following related mailing list threads, * https://mail.haskell.org/pipermail/ghc-devs/2017-January/013545.html * https://mail.haskell.org/pipermail/ghc-devs/2016-March/011555.html -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13101> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13101: Enable GHC to be loaded into GHCi -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.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 nomeata): Just for reference, #1257 explains why we have no unboxed tuple support in GHCi. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13101#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13101: Enable GHC to be loaded into GHCi -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.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 bgamari): Also, ticket:10965#comment:5 explains why you can't use `{-# OPTIONS_GHC -fobject-code #-}` to set `-fobject-code` on a per-module basis. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13101#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13101: Enable GHC to be loaded into GHCi -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.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 nomeata): More JFTR: Loading all of GHC into GHCi works if one simply `-fobject- code` for everything. This may be good enough for some uses cases (e.g. experimentation with exported functions, quick recompilation cycles using `ghcid`). -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13101#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13101: Enable GHC to be loaded into GHCi -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.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 mgsloan): Now that D4904 and D4986 are merged, there are some scripts to load and run GHC in GHCi with `-fobject-code`. I wrote a blog post about it: http://www.mgsloan.com/posts/ghcinception/ I also opened https://ghc.haskell.org/trac/ghc/ticket/15454 to discuss using an approach similar to Ben's script, but as a general GHCi feature rather than a special purpose script. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13101#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13101: Enable GHC to be loaded into GHCi -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.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 Marge Bot <ben+marge-bot@…>): In [changeset:"c01d5af31c8feb634fc3dffc84e6e7ece61ba190/ghc" c01d5af3/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="c01d5af31c8feb634fc3dffc84e6e7ece61ba190" Extract out use of UnboxedTuples from GHCi.Leak See #13101 + #15454 for motivation. This change reduces the number of modules that need to be compiled to object code when loading GHC into GHCi. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13101#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC