summaryrefslogtreecommitdiff
path: root/ghc
Commit message (Collapse)AuthorAgeFilesLines
...
| * Catch illegal imports earlier (#6007)Simon Marlow2012-04-271-5/+39
| |
* | Build fixesIan Lynagh2012-04-261-1/+1
| |
* | Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghcIan Lynagh2012-04-261-6/+5
|\ \ | |/
| * make -XNoImplicitPrelude work properly in GHCiSimon Marlow2012-04-251-6/+5
| |
* | Win64 build fixIan Lynagh2012-04-261-2/+3
|/
* ghci: write exceptions to stderr (#5980)Paolo Capriotti2012-04-231-5/+7
|
* Revert "Added ':runmonad' command to GHCi"Simon Peyton Jones2012-04-131-9/+0
| | | | | | | | | | Two problems, for now at any rate a) Breaks the build with lots of errors like No instance for (Show (IO ())) arising from a use of `print' b) Discussion of the approache hasn't converged yet (Simon M had a number of suggestions) This reverts commit eecd7c98c1f079c14d99ed831dff33a48ee45e67.
* Added ':runmonad' command to GHCiDavid Terei2012-04-121-0/+9
| | | | | | | | | This command allows you to lift user stmts in GHCi into an IO monad that implements the GHC.GHCi.GHCiSandboxIO type class. This allows for easy sandboxing of GHCi using :runmonad and Safe Haskell. Longer term it would be nice to allow a more general model for the Monad than GHCiSandboxIO but delaying this for the moment.
* Do not re-encode correctly encoded inputs and arguments (#5795)Paolo Capriotti2012-04-111-8/+3
|
* Add support for additional .ghci files in GHCi (#5265)Paolo Capriotti2012-04-111-2/+2
| | | | Patch by Sam Anklesaria <amsay@amsay.net>
* Revert "trac #5265 (support for additional .ghci files)"Paolo Capriotti2012-04-111-2/+1
| | | | This reverts commit 991f141989940c897cb2fc3dba7b5b49342d402a.
* Respect package qualifier when validating imports in GHCi (#5979)Patrick Palka2012-03-311-1/+2
| | | | Signed-off-by: Paolo Capriotti <p.capriotti@gmail.com>
* Tabs -> SpacesDavid Terei2012-03-231-12/+5
|
* Fix building with devel snapshotsIan Lynagh2012-03-171-0/+9
|
* Tweak to flag parsing (#5921)Simon Marlow2012-03-131-0/+5
| | | | -o2/Main.exe should be an invalid flag, not a linker input
* In ghci, reload after :e. Patch from Paolo Capriotti. Fixes #5343Ian Lynagh2012-03-111-6/+7
|
* Fix crash caused by allowing duplicate *-modules in the context (#5904)Simon Marlow2012-03-021-2/+13
|
* GHCi: add :seti, for options that apply only at the prompt (#3217)Simon Marlow2012-03-013-72/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GHCi now maintains two DynFlags: one that applies to whole modules loaded with :load, and one that applies to things typed at the prompt (expressions, statements, declarations, commands). The :set command modifies both DynFlags. This is for backwards compatibility: users won't notice any difference. The :seti command applies only to the interactive DynFlags. Additionally, I made a few changes to ":set" (with no arguments): * Now it only prints out options that differ from the defaults, rather than the whole list. * There is a new variant, ":set -a" to print out all options (the old behaviour). * It also prints out language options. e.g. Prelude> :set options currently set: none. base language is: Haskell2010 with the following modifiers: -XNoDatatypeContexts -XNondecreasingIndentation GHCi-specific dynamic flag settings: other dynamic, non-language, flag settings: -fimplicit-import-qualified warning settings: ":seti" (with no arguments) does the same as ":set", but for the interactive options. It also has the "-a" option. The interactive DynFlags are kept in the InteractiveContext, and copied into the HscEnv at the appropriate points (all in HscMain). There are some new GHC API operations: -- | Set the 'DynFlags' used to evaluate interactive expressions. setInteractiveDynFlags :: GhcMonad m => DynFlags -> m () -- | Get the 'DynFlags' used to evaluate interactive expressions. getInteractiveDynFlags :: GhcMonad m => m DynFlags -- | Sets the program 'DynFlags'. setProgramDynFlags :: GhcMonad m => DynFlags -> m [PackageId] -- | Returns the program 'DynFlags'. getProgramDynFlags :: GhcMonad m => m DynFlags Note I have not completed the whole of the plan outlined in #3217 yet: when in the context of a loaded module we don't take the interactive DynFlags from that module. That needs some more refactoring and thinking about, because we'll need to save and restore the original interactive DynFlags. This solves the immediate problem that people are having with the new flag checking in 7.4.1, because now it is possible to set language options in ~/.ghci that do not affect loaded modules and thereby cause recompilation.
* tyopsGabor Greif2012-02-271-1/+1
|
* Abstract out the hFlush calls in the GHC APIIan Lynagh2012-02-241-1/+1
| | | | | | stdout/stderr might be closed, so we can't just hFlush them. So we instead allow configuration in the same way that log_action is configurable.
* Update dependenciesIan Lynagh2012-02-221-1/+1
|
* Remove unused ghciHandleGhcExceptionIan Lynagh2012-02-161-5/+0
|
* tweak error messageSimon Marlow2012-02-161-2/+1
|
* Refactoring: make IIModule contain ModuleName, not Module, for consistencySimon Marlow2012-02-141-73/+81
|
* Refactoring, and fix a couple of SafeHaskell-related thingsSimon Marlow2012-02-141-33/+58
| | | | | | | | | When -XSafe is on: - ":load M" should default to adding M to the context (rather than *M). - "import M" should do the appropriate trust check Also various refactoring and comments added, hopefully the code is easier to read now.
* Revert "Don't add a bad import to the saved context."Simon Marlow2012-02-131-28/+17
| | | | | | | This reverts commit e5272d9bf2a65b7da8364803fcafbd2012b7de97. Reverting to fix validate regression, and pending a redesign of the changes.
* Revert "Have :load work under -XSafe in GHCi."Simon Marlow2012-02-131-10/+6
| | | | | | | This reverts commit 5e9e07a33e17da01245f0cea78e6a6f8a32ac77d. Reverting to fix validate regression, and pending a redesign of the changes.
* Have :load work under -XSafe in GHCi.David Terei2012-02-101-6/+10
|
* Don't add a bad import to the saved context.David Terei2012-02-101-17/+28
| | | | | | Importing an unsafe module in GHCi under -XSafe would fail but still save that in the context so it would be retried on every subsequent import.
* MERGE from 7.4 branch: Update dependenciesIan Lynagh2012-02-081-2/+2
|
* Ignore -C when not unregisterised (reported on ghc-users)Simon Marlow2012-02-071-2/+9
|
* Check that imported modules actually exist (#5836)Simon Marlow2012-02-071-0/+1
|
* Improve support for cross-compilationSimon Marlow2012-01-301-2/+6
| | | | Patchset from Stephen Blackheath <stephen.blackheath@ipwnstudios.com>
* Fix warning in GhciMonad.David Terei2012-01-261-1/+2
|
* Improve source code documentation og GHCi main.David Terei2012-01-252-4/+37
|
* Add a missing newline in the ghci :h text; spotted by Alexander McPhailIan Lynagh2012-01-241-1/+1
|
* Fix minor bug introduced in e7e771d14ac671904a69abecf9e133d4647026c1Simon Marlow2012-01-031-1/+1
|
* Major refactoring of CoAxiomsSimon Peyton Jones2012-01-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch should have no user-visible effect. It implements a significant internal refactoring of the way that FC axioms are handled. The ultimate goal is to put us in a position to implement "pattern-matching axioms". But the changes here are only does refactoring; there is no change in functionality. Specifically: * We now treat data/type family instance declarations very, very similarly to types class instance declarations: - Renamed InstEnv.Instance as InstEnv.ClsInst, for symmetry with FamInstEnv.FamInst. This change does affect the GHC API, but for the better I think. - Previously, each family type/data instance declaration gave rise to a *TyCon*; typechecking a type/data instance decl produced that TyCon. Now, each type/data instance gives rise to a *FamInst*, by direct analogy with each class instance declaration giving rise to a ClsInst. - Just as each ClsInst contains its evidence, a DFunId, so each FamInst contains its evidence, a CoAxiom. See Note [FamInsts and CoAxioms] in FamInstEnv. The CoAxiom is a System-FC thing, and can relate any two types, whereas the FamInst relates directly to the Haskell source language construct, and always has a function (F tys) on the LHS. - Just as a DFunId has its own declaration in an interface file, so now do CoAxioms (see IfaceSyn.IfaceAxiom). These changes give rise to almost all the refactoring. * We used to have a hack whereby a type family instance produced a dummy type synonym, thus type instance F Int = Bool -> Bool translated to axiom FInt :: F Int ~ R:FInt type R:FInt = Bool -> Bool This was always a hack, and now it's gone. Instead the type instance declaration produces a FamInst, whose axiom has kind axiom FInt :: F Int ~ Bool -> Bool just as you'd expect. * Newtypes are done just as before; they generate a CoAxiom. These CoAxioms are "implicit" (do not generate an IfaceAxiom declaration), unlike the ones coming from family instance declarations. See Note [Implicit axioms] in TyCon On the whole the code gets significantly nicer. There were consequential tidy-ups in the vectoriser, but I think I got them right.
* Fix :issafe safe haskell ghci commandDavid Terei2011-12-221-8/+24
|
* Fix safe imports to work in GHCi.David Terei2011-12-221-6/+17
|
* simplify code.David Terei2011-12-221-2/+3
|
* Tabs -> SpacesDavid Terei2011-12-191-43/+37
|
* Fix warningsDavid Terei2011-12-191-362/+360
|
* Tabs -> SpacesDavid Terei2011-12-191-65/+58
|
* Tabs -> SpacesDavid Terei2011-12-191-58/+51
|
* Add a class HasDynFlags(getDynFlags)Ian Lynagh2011-12-191-4/+6
| | | | | | | | We no longer have many separate, clashing getDynFlags functions I've given each GhcMonad its own HasDynFlags instance, rather than using UndecidableInstances to make a GhcMonad m => HasDynFlags m instance.
* Time handling overhaulSimon Marlow2011-11-252-2/+9
| | | | | | | | | | | | | | | | | | | | | Terminology cleanup: the type "Ticks" has been renamed "Time", which is an StgWord64 in units of TIME_RESOLUTION (currently nanoseconds). The terminology "tick" is now used consistently to mean the interval between timer signals. The ticker now always ticks in realtime (actually CLOCK_MONOTONIC if we have it). Before it used CPU time in the non-threaded RTS and realtime in the threaded RTS, but I've discovered that the CPU timer has terrible resolution (at least on Linux) and isn't much use for profiling. So now we always use realtime. This should also fix The default tick interval is now 10ms, except when profiling where we drop it to 1ms. This gives more accurate profiles without affecting runtime too much (<1%). Lots of cleanups - the resolution of Time is now in one place only (Rts.h) rather than having calculations that depend on the resolution scattered all over the RTS. I hope I found them all.
* Improve the way we call "rm" in the build system; fixes trac #4916Ian Lynagh2011-11-191-2/+2
| | | | | | | | | | We avoid calling "rm -rf" with no file arguments; this fixes cleaning on Solaris, where that fails. We also check for suspicious arguments: anything containing "..", starting "/", or containing a "*" (you need to call $(wildcard ...) yourself now if you really want globbing). This should make things a little safer.
* Use -fwarn-tabs when validatingIan Lynagh2011-11-044-0/+28
| | | | | We only use it for "compiler" sources, i.e. not for libraries. Many modules have a -fno-warn-tabs kludge for now.
* Increment the line number correctly in GHCiSimon Marlow2011-10-241-13/+15
| | | | | | We were doing this when stdin was not a terminal, so all the tests worked, but not when stdin was a terminal. In fact the line number was stuck at "2".