[GHC] #10972: Add a :binfo (beginner info) GHCi command
GHC
ghc-devs at haskell.org
Sat Oct 17 18:31:17 UTC 2015
#10972: Add a :binfo (beginner info) GHCi command
-------------------------------------+-------------------------------------
Reporter: kanetw | Owner: kanetw
Type: feature request | Status: new
Priority: normal | Milestone: 8.0.1
Component: Compiler | Version: 7.10.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #10963 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by kanetw):
What kind of specializations should be displayed? Displaying every
possible specialization is impractical even if we restrict to unary
typeclasses (consider `Num`).
I think specializing for types with special notation like `[]` or `(->)`
would be most useful:
{{{#!hs
> :binfo find
find :: Foldable t => (a -> Bool) -> t a -> Maybe a
Specializations:
t ~ [] -> find :: (a -> Bool) -> [a] -> Maybe a
> :binfo first
first :: Arrow a => a b c -> a (b, d) (c, d)
Specializiations:
a ~ (->) -> first :: (b -> c) -> (b, d) -> (c, d)
}}}
Having something like `find :: (a -> Bool) -> Set a -> Maybe a` doesn't
really help a lot in my opinion.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10972#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list