
#10650: Can't define GHCi :def macro with NoImplicitPrelude on -------------------------------------+------------------------------------- Reporter: | Owner: RyanGlScott | Status: new Type: bug | Milestone: Priority: normal | Version: 7.10.1 Component: GHCi | Operating System: Unknown/Multiple Keywords: | Type of failure: GHC rejects Architecture: | valid program Unknown/Multiple | Blocked By: Test Case: | Related Tickets: #8640 Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- GHCi is unusually prohibitive in typechecking {{{:def}}} macros when {{{NoImplicitPrelude}}} is enabled. Here's an example to illustrate what I mean: {{{ $ ghci -XNoImplicitPrelude GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help λ> :def pf \str -> Prelude.return Prelude.$ ":! pointfree \"" Prelude.++ str Prelude.++ "\"" <interactive>:1:111: Not in scope: type constructor or class ‘String’ <interactive>:1:121: Not in scope: type constructor or class ‘IO’ <interactive>:1:124: Not in scope: type constructor or class ‘String’ }}} I can understand the functions being out-of-scope when {{{NoImplicitPrelude}}} is on, but the type errors don't make any sense to me, especially since {{{:t}}} seems to pick up on the types just fine: {{{ λ> :t Prelude.return Prelude.return :: GHC.Base.Monad m => a -> m a λ> :t "\"" "\"" :: [GHC.Types.Char] }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10650 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler