
#14858: Typed hole subtitution search fails in the REPL -------------------------------------+------------------------------------- Reporter: paf31 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.4.1 Component: Compiler (Type | Version: 8.4.1-alpha3 checker) | Keywords: typed holes Resolution: | substitutions 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 simonpj): Probably type-class defaulting is taking place, in an effort to make things run. Eg. {{{ ghci> 3+4 }}} We need type-class defaulting to choose `Integer` (say) as the type to use for the evaluation. Hmm. Maybe we should NOT do any type-class defaulting if there are insoluble errors (like out of scope variables). You could try this. In `TcSimplify.simpl_top` we see {{{ simpl_top wanteds = do { wc_first_go <- nestTcS (solveWantedsAndDrop wanteds) -- This is where the main work happens ; try_tyvar_defaulting wc_first_go } }}} You could try doing `try_tyvar_defaulting` only if `insolubleWC wc_first_go` is False. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14858#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler