[Haskell-cafe] Displaying specializations in :info or separately?
eir at cis.upenn.edu
Mon Oct 19 19:10:39 UTC 2015
I would avoid the `(t ~ ) =>` prefix -- it might be confusing to the newcomers this feature is meant to serve. How about
With t := : find :: (a -> Bool) -> [a] -> Maybe a
On Oct 19, 2015, at 12:47 PM, David Kraeutmann <kane at kane.cx> wrote:
> I'm working on a GHC feature  that allows users to view
> specializations of functions like in (name subject to change)
>> :binfo find
> find :: Foldable t => (a -> Bool) -> t a -> Maybe a
> t ~  => find :: (a -> Bool) -> [a] -> Maybe a
>> :binfo first
> first :: Arrow a => a b c -> a (b, d) (c, d)
> a ~ (->) => first :: (b -> c) -> (b, d) -> (c, d)
> Now there are two things left to decide on:
> * What command should the specializations be visible under? We can
> either put it under :info or make a special command :sinfo or :binfo
> that displays only the expression's type and specialisations like in the
> example above?
> * What specializations do we want to display? goldfire suggested using
> the default list, which has the added benefit of being customizable by
> e.g. instructors, so adding a default Maybe (in conjunction with )
> gives the desired behavior and not too many specializations.
> Thanks for your time!
>  : https://ghc.haskell.org/trac/ghc/ticket/10972
>  : https://ghc.haskell.org/trac/ghc/ticket/10971
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe