GHC 8.2's new ghci commands: `:type +d` and `:type +v`

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

GHC 8.2's new ghci commands: `:type +d` and `:type +v`

Takenobu Tani
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 :)



Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
Only members subscribed via the mailman list are allowed to post.