[GHC] #14996: Typed holes are very slow

#14996: Typed holes are very slow -------------------------------------+------------------------------------- Reporter: simonpj | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 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: -------------------------------------+------------------------------------- If you type at the GHCi prompt {{{ ghci> 3 _ 4 }}} (which I did for #14969), you get a multi-second pause before the error message comes out. I think this is because the error-message generator is looking through the entire type environment. But it's really too slow. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14996 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14996: Typed holes are very slow -------------------------------------+------------------------------------- Reporter: simonpj | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: TypedHoles Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * keywords: => TypedHoles -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14996#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14996: Typed holes are very slow -------------------------------------+------------------------------------- Reporter: simonpj | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: TypedHoles 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 monoidal): Another issue is that using a standalone hole gives an error in HEAD (not in 8.4): {{{ Prelude> _ <interactive>:1:1: error: GHC internal error: ‘Ghci1.it’ is not in scope during type checking, but it passed the renamer tcl_env of environment: [] }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14996#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14996: Typed holes are very slow -------------------------------------+------------------------------------- Reporter: simonpj | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: TypedHoles 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 sighingnow): Replying to [comment:2 monoidal]:
Another issue is this:
{{{ <interactive>:1:1: error: GHC internal error: ‘Ghci1.it’ is not in scope during type checking, but it passed the renamer tcl_env of environment: [] }}}
(giving "1" twice is needed to reproduce the error)
I think it's just a variant of ticket:11547, since the patch Phab:D2447 has been reverted in ticket:14052. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14996#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14996: Typed holes are very slow -------------------------------------+------------------------------------- Reporter: simonpj | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: TypedHoles 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 osa1): The error in comment:2 is a different issue than the performance issue so we should deal with it in another ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14996#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14996: Typed holes are very slow -------------------------------------+------------------------------------- Reporter: simonpj | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: invalid | Keywords: TypedHoles Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #14969, #15037 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => invalid * related: => #14969, #15037 Comment: Oops, I accidentally converted #14969 to be about the performance issue before seeing this ticket. I think I'll keep #14969 the way it is and close this in favor of a new ticket, #15037, about the issue in comment:2 And yes, to reiterate what monoidal said, you do need to run `1` //twice// in GHCi before running `_`, or else it won't be triggered. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14996#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14996: Typed holes are very slow -------------------------------------+------------------------------------- Reporter: simonpj | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: invalid | Keywords: TypedHoles Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #14969, #15007 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * related: #14969, #15037 => #14969, #15007 Comment: Sorry, #15007, not #15037. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14996#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC