Twan van Laarhoven [Thu, 17 Jan 2008 21:33:07 +0000 (21:33 +0000)]
Monadify typecheck/TcMatches: use return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 21:32:42 +0000 (21:32 +0000)]
Monadify typecheck/TcMType: use do, return, applicative, standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 21:30:40 +0000 (21:30 +0000)]
Monadify typecheck/TcInstDcls: use do, return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 21:28:22 +0000 (21:28 +0000)]
Monadify typecheck/TcHsType: use do, return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 21:22:00 +0000 (21:22 +0000)]
Monadify typecheck/TcSimplify: use do, return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 21:19:11 +0000 (21:19 +0000)]
Monadify typecheck/TcSplice: use do and return
Twan van Laarhoven [Thu, 17 Jan 2008 21:17:46 +0000 (21:17 +0000)]
Monadify typecheck/TcTyClsDecls: use return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 21:15:58 +0000 (21:15 +0000)]
Monadify typecheck/TcDefaults: use return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 21:15:07 +0000 (21:15 +0000)]
Monadify typecheck/TcDeriv: use return
Twan van Laarhoven [Thu, 17 Jan 2008 21:14:39 +0000 (21:14 +0000)]
Monadify typecheck/TcClassDcl: use do, return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 21:10:35 +0000 (21:10 +0000)]
Monadify typecheck/TcBinds: use do, return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 21:08:18 +0000 (21:08 +0000)]
Monadify typecheck/TcArrows: use do and return
Twan van Laarhoven [Thu, 17 Jan 2008 21:06:55 +0000 (21:06 +0000)]
Monadify typecheck/Inst: use do, return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 21:02:13 +0000 (21:02 +0000)]
Monadify typecheck/TcUnify: use do, return and standard monad functions
there may be some accidental tab->space conversion
Twan van Laarhoven [Thu, 17 Jan 2008 20:55:05 +0000 (20:55 +0000)]
Monadify typecheck/TcTyFuns: use standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 20:54:23 +0000 (20:54 +0000)]
Monadify typecheck/TcPat: use return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 20:53:07 +0000 (20:53 +0000)]
Monadify typecheck/TcRules: use do, return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 20:49:34 +0000 (20:49 +0000)]
Monadify typecheck/TcForeign: use do, return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 20:46:03 +0000 (20:46 +0000)]
Monadify typecheck/TcExpr: use do, return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 20:43:30 +0000 (20:43 +0000)]
Monadify specialise/Specialise: use do, return, standard monad functions and MonadUnique
Twan van Laarhoven [Thu, 17 Jan 2008 20:38:42 +0000 (20:38 +0000)]
Monadify specialise/SpecConstr: use do, return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 20:30:42 +0000 (20:30 +0000)]
Monadify stgSyn/StgLint
- made LintM a newtype instead of a type synonym
- use do, return and standard monad functions
- use MaybeT where `thenMaybeL` was used
- removed custom versions of monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 20:26:19 +0000 (20:26 +0000)]
Monadify stgSyn/CoreToStg
- made LneM a newtype instead of a type synonym
- use do, return and standard monad functions
- removed custom versions of monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 20:21:44 +0000 (20:21 +0000)]
Remove generic monad function from State, it was moved to MonadUtils
Twan van Laarhoven [Thu, 17 Jan 2008 20:20:51 +0000 (20:20 +0000)]
Added MaybeT monad transformer to utils/Maybes
Twan van Laarhoven [Thu, 17 Jan 2008 20:19:53 +0000 (20:19 +0000)]
Removed unused Maybe functions, use the standard Maybe monad instead
Twan van Laarhoven [Thu, 17 Jan 2008 20:18:12 +0000 (20:18 +0000)]
MonadIO instance for IOEnv
Twan van Laarhoven [Thu, 17 Jan 2008 20:03:54 +0000 (20:03 +0000)]
Monadify simplCore/SimplMonad: custom monad functions are no longer needed
Twan van Laarhoven [Thu, 17 Jan 2008 20:02:28 +0000 (20:02 +0000)]
Monadify simplCore/SimplMonad: use MonadUnique instance instead of custom functions
Twan van Laarhoven [Thu, 17 Jan 2008 19:59:58 +0000 (19:59 +0000)]
Monadify simplCore/SetLevels: use do, return, standard monad functions and MonadUnique
Twan van Laarhoven [Thu, 17 Jan 2008 19:56:25 +0000 (19:56 +0000)]
Monadify simplCore/SimplUtils: use do, return, standard monad functions and MonadUnique
Twan van Laarhoven [Thu, 17 Jan 2008 19:54:08 +0000 (19:54 +0000)]
Monadify simplCore/Simplify: use do and return
Twan van Laarhoven [Thu, 17 Jan 2008 19:52:55 +0000 (19:52 +0000)]
Monadify simplCore/SimplEnv: use standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 19:51:49 +0000 (19:51 +0000)]
Monadify simplCore/SimplCore: use do, return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 19:44:17 +0000 (19:44 +0000)]
Monadify profiling/SCCfinal
- change monad type synonym into a newtype
- use do, return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 19:31:54 +0000 (19:31 +0000)]
Monadify coreSyn/CorePrep: use do, return, applicative, standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 19:08:23 +0000 (19:08 +0000)]
Monadify rename/RnTypes: use do, return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 19:00:33 +0000 (19:00 +0000)]
Monadify rename/RnPat: use do, return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 18:58:37 +0000 (18:58 +0000)]
Monadify rename/RnNames: use return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 18:53:30 +0000 (18:53 +0000)]
seqMaybe is more commonly known as mplus
Twan van Laarhoven [Thu, 17 Jan 2008 18:43:54 +0000 (18:43 +0000)]
Monadify rename/RnBinds: use do, return and standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 18:04:49 +0000 (18:04 +0000)]
Monadify stranal/StrictAnal: use the State monad instead of a custom thing
Twan van Laarhoven [Thu, 17 Jan 2008 18:00:22 +0000 (18:00 +0000)]
Monadify stranal/WwLib: use do, return, applicative, standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 17:56:16 +0000 (17:56 +0000)]
Added MonadUnique class for monads that have a unique supply
Twan van Laarhoven [Thu, 17 Jan 2008 17:50:07 +0000 (17:50 +0000)]
Monadify stranal/WorkWrap: use do, return, applicative, standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 17:46:56 +0000 (17:46 +0000)]
Added Applicative and Functor instances for State monad
Twan van Laarhoven [Thu, 17 Jan 2008 17:44:32 +0000 (17:44 +0000)]
Monadify deSugar/DsMonad: use do, return, applicative, standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 17:41:30 +0000 (17:41 +0000)]
Monadify deSugar/Desugar: use do, return, applicative, standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 17:38:56 +0000 (17:38 +0000)]
Monadify deSugar/DsUtils: use do, return, applicative, standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 17:32:05 +0000 (17:32 +0000)]
Monadify deSugar/DsListComp: use do, return, applicative, standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 17:28:43 +0000 (17:28 +0000)]
Monadify deSugar/DsForeign: use do, return, applicative, standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 17:22:28 +0000 (17:22 +0000)]
Monadify deSugar/DsGRHSs: use do, return, applicative, standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 16:40:55 +0000 (16:40 +0000)]
Monadify deSugar/DsExpr: use do, return, applicative, standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 16:26:44 +0000 (16:26 +0000)]
Added Applicative instance for IOEnv
Twan van Laarhoven [Thu, 17 Jan 2008 16:19:39 +0000 (16:19 +0000)]
Add 'util/MonadUtils.hs' with common monad (and applicative) combinators
Twan van Laarhoven [Thu, 17 Jan 2008 17:34:39 +0000 (17:34 +0000)]
Monadify deSugar/MatchLit: use do, return, applicative, standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 17:33:36 +0000 (17:33 +0000)]
Monadify deSugar/Match: use do, return, applicative, standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 16:53:34 +0000 (16:53 +0000)]
Monadify deSugar/DsCCall: use do, return, applicative, standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 16:51:14 +0000 (16:51 +0000)]
Monadify deSugar/DsArrows: use do, return, applicative, standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 16:47:46 +0000 (16:47 +0000)]
Monadify deSugar/DsBinds: use do, return, applicative, standard monad functions
Twan van Laarhoven [Thu, 17 Jan 2008 16:31:12 +0000 (16:31 +0000)]
Added MASSERT macro for assertions in do notation
Simon Marlow [Thu, 24 Jan 2008 09:29:35 +0000 (09:29 +0000)]
FIX BUILD wrong imports on non-Windows
Simon Marlow [Wed, 23 Jan 2008 16:31:45 +0000 (16:31 +0000)]
Show CmdLineError exceptions as "<command line>: ..."
instead of something like "ghc-6.8.2: ...", which causes problems in
the test suite. In any case, "<command line>" seems a more
appropriate context for these errors, the only question is whether
we're using CmdLineError incorrectly anywhere.
Simon Marlow [Wed, 23 Jan 2008 16:07:03 +0000 (16:07 +0000)]
FIX #1750: in isBrokenPackage, don't loop if the deps are recursive
Simon Marlow [Wed, 23 Jan 2008 16:06:35 +0000 (16:06 +0000)]
FIX #1750: throw out mutually recursive groups of packages
Ian Lynagh [Wed, 23 Jan 2008 17:39:33 +0000 (17:39 +0000)]
Windows now doesn't need different values for DQ in the build system
Ian Lynagh [Wed, 23 Jan 2008 16:01:39 +0000 (16:01 +0000)]
Fix setting argv[0] in shell-utils.c on Windows
Ian Lynagh [Wed, 23 Jan 2008 15:17:24 +0000 (15:17 +0000)]
Escape arguments for Windows in shell-tools.c
simonpj@microsoft.com [Wed, 23 Jan 2008 13:40:12 +0000 (13:40 +0000)]
Attach the INLINE Activation pragma to any automatically-generated specialisations
Another idea suggested by Roman, happily involving a one-line change. Here's
the new Note in Specialise:
Note [Auto-specialisation and RULES]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider:
g :: Num a => a -> a
g = ...
f :: (Int -> Int) -> Int
f w = ...
{-# RULE f g = 0 #-}
Suppose that auto-specialisation makes a specialised version of
g::Int->Int That version won't appear in the LHS of the RULE for f.
So if the specialisation rule fires too early, the rule for f may
never fire.
It might be possible to add new rules, to "complete" the rewrite system.
Thus when adding
RULE forall d. g Int d = g_spec
also add
RULE f g_spec = 0
But that's a bit complicated. For now we ask the programmer's help,
by *copying the INLINE activation pragma* to the auto-specialised rule.
So if g says {-# NOINLINE[2] g #-}, then the auto-spec rule will also
not be active until phase 2.
simonpj@microsoft.com [Tue, 22 Jan 2008 12:26:13 +0000 (12:26 +0000)]
Tidy up the treatment of SPECIALISE pragmas
Remove the now-redundant "const-dicts" field in SpecPrag
In dsBinds, abstract over constant dictionaries in the RULE.
This avoids the creation of a redundant, duplicate, rule later
in the Specialise pass, which was happening before.
There should be no effect on performance either way, just less
duplicated code, and the compiler gets a little simpler.
simonpj@microsoft.com [Tue, 22 Jan 2008 12:25:47 +0000 (12:25 +0000)]
Comments only
Simon Marlow [Wed, 23 Jan 2008 14:32:07 +0000 (14:32 +0000)]
FIX #1838, #1987: change where GHCi searches for config files
6.6 behaviour:
- ./.ghci
- $HOME/.ghci
6.8.[12] behaviour:
- ./.ghci
- Windows: c:/Documents and Settings/<user>/.ghci
- Unix: $HOME/.ghci
6.10 (and 6.8.3 when this is merged):
- ./.ghci
- Windows: c:/Documents and Settings/<user>/Application Data/ghc/ghci.conf
- Unix: $HOME/.ghc/ghci.conf
- $HOME/.ghci
We will need to document this in the 6.8.3 release notes because it
may affect Windows users who have adapted their setup to 6.8.[12].
Simon Marlow [Tue, 22 Jan 2008 15:29:43 +0000 (15:29 +0000)]
FIX #1767 :show documentation claimed too much
Also put the :help docs back within 80 columns
Simon Marlow [Tue, 22 Jan 2008 14:49:23 +0000 (14:49 +0000)]
fix syntax-error output for :show
Simon Marlow [Tue, 22 Jan 2008 16:18:11 +0000 (16:18 +0000)]
This goes with the patch for #1839, #1463
Simon Marlow [Tue, 22 Jan 2008 14:09:57 +0000 (14:09 +0000)]
use pathSeparator instead of '/'
Simon Marlow [Tue, 22 Jan 2008 13:20:47 +0000 (13:20 +0000)]
cleanup only
claus.reinke@talk21.com [Mon, 21 Jan 2008 16:17:44 +0000 (16:17 +0000)]
FIX #1839, #1463, by supporting ghc-pkg bulk queries with substring matching
- #1839 asks for a ghc-pkg dump feature, #1463 for the ability
to query the same fields in several packages at once.
- this patch enables substring matching for packages in 'list',
'describe', and 'field', and for modules in find-module. it
also allows for comma-separated multiple fields in 'field'.
substring matching can optionally ignore cases to avoid the
rather unpredictable capitalisation of packages.
- the patch is not quite as full-featured as the one attached
to #1839, but avoids the additional dependency on regexps.
open ended substrings are indicated by '*' (only the three
forms prefix*, *suffix, *infix* are supported)
- on windows, the use of '*' for package/module name globbing
leads to conflicts with filename globbing: by default, windows
programs are self-globbing, and bash adds another level of
globbing on top of that. it seems impossible to escape '*'
from both levels of globbing, so we disable default globbing
for ghc-pkg and ghc-pkg-inplace. users of bash will still
have filename globbing available, users of cmd won't.
- if it is considered necessary to reenable filename globbing
for cmd users, it should be done selectively, only for
filename parameters. to this end, the patch includes a
glob.hs program which simply echoes its parameters after
filename globbing. see the commented out glob command in
Main.hs for usage or testing.
- this covers both tickets, and permits for the most common
query patterns (finding all packages contributing to the
System. hierarchy, finding all regex or string packages,
listing all package maintainers or haddock directories,
..), which not only i have wanted to have for a long time.
examples (the quotes are needed to escape shell-based
filename globbing and should be omitted in cmd.exe):
ghc-pkg list '*regex*' --ignore-case
ghc-pkg list '*string*' --ignore-case
ghc-pkg list '*gl*' --ignore-case
ghc-pkg find-module 'Data.*'
ghc-pkg find-module '*Monad*'
ghc-pkg field '*' name,maintainer
ghc-pkg field '*' haddock-html
ghc-pkg describe '*'
simonpj@microsoft.com [Mon, 21 Jan 2008 16:55:29 +0000 (16:55 +0000)]
Wibble to the OccurAnal fix for RULEs and loop-breakers
Simon Marlow [Mon, 21 Jan 2008 14:59:35 +0000 (14:59 +0000)]
FIX #2049, another problem with the module context on :reload
The previous attempt to fix this (#1873, #1360) left a problem that
occurred when the first :load of the program failed (#2049).
Now I've implemented a different strategy: between :loads, we remember
all the :module commands, and just replay them after a :reload. This
is in addition to remembering all the package modules added with
:module, which is orthogonal.
This approach is simpler than the previous one, and seems to do the
right thing in all the cases I could think of. Let's hope this is the
last bug in this series...
Simon Marlow [Mon, 21 Jan 2008 11:18:35 +0000 (11:18 +0000)]
Increase the bar for bootstrapping GHC to 6.4 (HEAD only)
- remove $(ghc_ge_601), $(ghc_ge_602), $(ghc_ge_603)
- configure now checks the GHC version number
- there are probably various cleanups that we can now do in compat/
and compiler/, but I haven't done those yet.
simonpj@microsoft.com [Mon, 21 Jan 2008 13:59:09 +0000 (13:59 +0000)]
Do not worker/wrapper INLINE things, even if they are in a recursive group
This patch stops the worker/wrapper transform working on an INLINE thing,
even if it's in a recursive group. It might not be the loop breaker. Indeed
a recursive group might have no loop breaker, if the only recursion is
through rules.
Again, this change was provoked by one of Roman's NDP libraries.
Specifically the Rec { splitD, splitJoinD } group in
Data.Array.Parallel.Unlifted.Distributed.Arrays
Simon
simonpj@microsoft.com [Mon, 21 Jan 2008 13:56:54 +0000 (13:56 +0000)]
Make the loop-breaking algorithm a bit more liberal, where RULES are involved
This is another gloss on the now-quite-subtle and heavily-documented algorithm
for choosing loop breakers.
This fix, provoked by Roman's NDP library, makes sure that when we are choosing
a loop breaker we only take into account variables free on the *rhs* of a rule
not the *lhs*.
Most of the new lines are comments!
simonpj@microsoft.com [Mon, 21 Jan 2008 12:42:44 +0000 (12:42 +0000)]
Fix Trac #2055
Sorry, this was my fault, a consequence of the quasi-quoting patch.
I've added rn062 as a test.
Ian Lynagh [Mon, 21 Jan 2008 10:41:42 +0000 (10:41 +0000)]
Fix exception message with ghc -e
When running with ghc -e, exceptions should claim to be from the program
that we are running, not ghc.
Ian Lynagh [Mon, 21 Jan 2008 10:31:58 +0000 (10:31 +0000)]
Fix warnings in main/CmdLineParser
Ian Lynagh [Sun, 20 Jan 2008 19:30:02 +0000 (19:30 +0000)]
Normalise FilePaths before printing them
Ian Lynagh [Sun, 20 Jan 2008 18:46:39 +0000 (18:46 +0000)]
Tweak runghc
Ian Lynagh [Sun, 20 Jan 2008 17:02:36 +0000 (17:02 +0000)]
Fix catching exit exceptions in ghc -e
simonpj@microsoft.com [Mon, 21 Jan 2008 11:36:20 +0000 (11:36 +0000)]
Typo in phase-control documentation
Ian Lynagh [Sat, 19 Jan 2008 23:59:14 +0000 (23:59 +0000)]
Fix warnings in main/Main
Ian Lynagh [Sat, 19 Jan 2008 22:30:36 +0000 (22:30 +0000)]
Support multiple -e flags
Ian Lynagh [Sat, 19 Jan 2008 22:00:44 +0000 (22:00 +0000)]
Fix ghc -e :main (it was enqueuing the main function, but not running it)
Ian Lynagh [Sat, 19 Jan 2008 21:28:30 +0000 (21:28 +0000)]
Fix whitespace
Ian Lynagh [Sat, 19 Jan 2008 21:26:02 +0000 (21:26 +0000)]
Fix giving an error if we are given conflicting mode flags
Ian Lynagh [Sat, 19 Jan 2008 16:49:23 +0000 (16:49 +0000)]
Add :run and tweak :main
You can now give :main a Haskell [String] as an argument, e.g.
:main ["foo", "bar"]
and :run is a variant that takes the name of the function to run.
Also, :main now obeys the -main-is flag.
judah.jacobson@gmail.com [Mon, 17 Dec 2007 23:57:35 +0000 (23:57 +0000)]
Make MacFrameworks a subdirectory of distrib, since it isn't used in the normal building process.
judah.jacobson@gmail.com [Tue, 27 Nov 2007 07:29:51 +0000 (07:29 +0000)]
Add scripts for building GMP.framework and GNUreadline.framework (OS X).
judah.jacobson@gmail.com [Wed, 12 Dec 2007 20:12:45 +0000 (20:12 +0000)]
Use -framework-path flags during the cc phase. Fixes trac #1975.
df@dfranke.us [Mon, 10 Dec 2007 23:06:49 +0000 (23:06 +0000)]
FIX #1821 (Parser or lexer mess-up)