[GHC] #15401: Weird GHCi bug

#15401: Weird GHCi bug -------------------------------------+------------------------------------- Reporter: vagarenko | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: GHCi | Version: 8.4.3 Keywords: | Operating System: Unknown/Multiple Architecture: x86_64 | Type of failure: None/Unknown (amd64) | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Take a look at this GHCi session: {{{#!hs $ ghci GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help }}} type `do {_}` {{{#!hs Prelude> do {_} <interactive>:1:5: error: * Found hole: _ :: t Where: `t' is a rigid type variable bound by the inferred type of it :: t at <interactive>:1:1-6 * In a stmt of a 'do' block: _ In the expression: do _ In an equation for `it': it = do _ * Relevant bindings include it :: t (bound at <interactive>:1:1) Valid substitutions include undefined :: forall (a :: TYPE r). GHC.Stack.Types.HasCallStack => a (imported from `Prelude' (and originally defined in `GHC.Err')) }}} looks ok type `()` {{{#!hs Prelude> () () }}} ok type `do {_}` again {{{#!hs Prelude> do {_} <interactive>:3:5: error: * Found hole: _ :: t Where: `t' is a rigid type variable bound by the inferred type of it :: t at <interactive>:3:1-6 * In a stmt of a 'do' block: _ In the expression: do _ In an equation for `it': it = do _ * Relevant bindings include it :: t (bound at <interactive>:3:1) Valid substitutions include undefined :: forall (a :: TYPE r). GHC.Stack.Types.HasCallStack => a (imported from `Prelude' (and originally defined in `GHC.Err')) }}} ok, same message type `()` second type {{{#!hs Prelude> () () }}} ok, type `do {_}` third time: {{{#!hs Prelude> do {_} <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: [] Prelude> }}} what's happening? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15401 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15401: Weird GHCi bug -------------------------------------+------------------------------------- Reporter: vagarenko | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: GHCi | Version: 8.4.3 Resolution: duplicate | Keywords: TypedHoles Operating System: Unknown/Multiple | Architecture: x86_64 | (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15007 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * keywords: => TypedHoles * resolution: => duplicate * related: => #15007 Comment: Thanks for the bug report. This is a duplicate of #15007, so I'll close this ticket in favor of that one. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15401#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC