Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add support for all top-level declarations to GHCi
This is work mostly done by Daniel Winograd-Cort during his internship at MSR Cambridge, with some further refactoring by me. This commit adds support to GHCi for most top-level declarations that can be used in Haskell source files. Class, data, newtype, type, instance are all supported, as are Type Family-related declarations. The current set of declarations are shown by :show bindings. As with variable bindings, entities bound by newer declarations shadow earlier ones. Tests are in testsuite/tests/ghci/scripts/ghci039--ghci054. Documentation to follow.
- Loading branch information
Showing
with
1,255 additions
and 642 deletions.
- +2 −0 compiler/basicTypes/DataCon.lhs-boot
- +9 −9 compiler/basicTypes/Name.lhs
- +4 −0 compiler/basicTypes/Name.lhs-boot
- +4 −1 compiler/basicTypes/RdrName.lhs
- +34 −32 compiler/deSugar/Desugar.lhs
- +1 −1 compiler/ghci/ByteCodeLink.lhs
- +11 −14 compiler/ghci/Debugger.hs
- +55 −6 compiler/ghci/Linker.lhs
- +43 −33 compiler/iface/IfaceEnv.lhs
- +19 −13 compiler/main/GHC.hs
- +103 −17 compiler/main/HscMain.lhs
- +222 −65 compiler/main/HscTypes.lhs
- +48 −28 compiler/main/InteractiveEval.hs
- +70 −72 compiler/main/TidyPgm.lhs
- +4 −8 compiler/prelude/PrelNames.lhs
- +13 −24 compiler/rename/RnNames.lhs
- +2 −1 compiler/rename/RnSource.lhs
- +19 −13 compiler/typecheck/FamInst.lhs
- +64 −46 compiler/typecheck/Inst.lhs
- +20 −2 compiler/typecheck/TcEnv.lhs
- +4 −3 compiler/typecheck/TcInstDcls.lhs
- +185 −99 compiler/typecheck/TcRnDriver.lhs
- +4 −15 compiler/typecheck/TcRnMonad.lhs
- +3 −0 compiler/typecheck/TcRnTypes.lhs
- +10 −9 compiler/typecheck/TcTyClsDecls.lhs
- +110 −12 compiler/types/FamInstEnv.lhs
- +86 −53 compiler/types/InstEnv.lhs
- +2 −0 compiler/types/TypeRep.lhs
- +6 −6 compiler/utils/Outputable.lhs
- +10 −8 compiler/vectorise/Vectorise.hs
- +6 −5 compiler/vectorise/Vectorise/Env.hs
- +6 −2 compiler/vectorise/Vectorise/Monad.hs
- +9 −15 compiler/vectorise/Vectorise/Type/Env.hs
- +15 −4 ghc/GhciMonad.hs
- +52 −26 ghc/InteractiveUI.hs
@@ -1,5 +1,9 @@ | ||
\begin{code} | ||
module Name where | ||
|
||
import {-# SOURCE #-} Module | ||
|
||
data Name | ||
|
||
nameModule :: Name -> Module | ||
\end{code} |
Oops, something went wrong.