#3858: the resolution of abbreviated commands in ghci is surprising.
---------------------------------+------------------------------------------
    Reporter:  Saizan            |       Owner:              
        Type:  bug               |      Status:  new         
    Priority:  normal            |   Component:  GHCi        
     Version:  6.12.1            |    Keywords:              
          Os:  Unknown/Multiple  |    Testcase:              
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown
---------------------------------+------------------------------------------
 {{{
 GHCi, version 6.12.1: http://www.haskell.org/ghc/  :? for help
 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 Loading package ffi-1.0 ... linking ... done.
 Prelude> :i True
 data Bool = ... | True  -- Defined in GHC.Bool
 Prelude> :def ifoo \_ -> putStrLn "ifoo" >> return ""
 Prelude> :i True
 ifoo
 }}}

 It seems that abbreviations are resolved to the command, that matches the
 prefix, which is defined last. I've found this behaviour very confusing in
 practice.

 I'd expect rebinding :i to some command that's not :info to require an
 explicit declaration.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3858>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to