Add GHCi :instances command
authorXavier Denis <xldenis@gmail.com>
Fri, 19 Oct 2018 23:36:23 +0000 (01:36 +0200)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Tue, 4 Jun 2019 18:41:29 +0000 (14:41 -0400)
commit002594b731c40334b33eb883275e9c274c68e9ac
tree3a35bccefc9f336cf42a37006ec90f3cebd2897c
parent114b014f7ed346727241c78ef3e0bf965d94edfc
Add GHCi :instances command

This commit adds the `:instances` command to ghci following proosal
number 41.

This makes it possible to query which instances are available to a given
type.

The output of this command is all the possible instances with type
variables and constraints instantiated.
12 files changed:
compiler/main/GHC.hs
compiler/main/HscMain.hs
compiler/main/InteractiveEval.hs
compiler/typecheck/TcRnDriver.hs
compiler/types/InstEnv.hs
docs/users_guide/8.10.1-notes.rst
docs/users_guide/ghci.rst
ghc/GHCi/UI.hs
testsuite/tests/ghci/scripts/all.T
testsuite/tests/ghci/scripts/ghci064.hs [new file with mode: 0644]
testsuite/tests/ghci/scripts/ghci064.script [new file with mode: 0644]
testsuite/tests/ghci/scripts/ghci064.stdout [new file with mode: 0644]