[Haskell-cafe] GHC 8.2's new ghci commands: `:type +d` and `:type +v`

Takenobu Tani takenobu.hs at gmail.com
Mon Aug 28 13:25:27 UTC 2017


Dear cafe,

GHC 8.2 supports two new ghci commands.
They are `:type +d` and `:type +v` [1].


0. normal `:type` command:

    Prelude> :type length
    length :: Foldable t => t a -> Int

    Prelude> :type ($)
    ($) :: (a -> b) -> a -> b


1. new `:type +d` command for newcomers:

    Prelude> :type +d length
    length :: [a] -> Int


2. new `:type +v` command for detail information:

    Prelude> :type +v ($)
    ($)
      :: forall (r :: GHC.Types.RuntimeRep) a (b :: TYPE r).
         (a -> b) -> a -> b


That's excellent :)

[1]:
https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghci.html#ghci-cmd-:type

Regards,
Takenobu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170828/f12fa00c/attachment.html>


More information about the Haskell-Cafe mailing list