- 20 Apr, 2006 2 commits
-
-
Simon Marlow authored
The section in the building guide was becoming out of date, a wiki page is much more likely to be kept fresh.
-
rl@cse.unsw.edu.au authored
-
- 19 Apr, 2006 4 commits
-
-
sven.panne@aedion.de authored
-
sven.panne@aedion.de authored
-
sven.panne@aedion.de authored
-
Simon Marlow authored
-
- 18 Apr, 2006 9 commits
-
-
Simon Marlow authored
StgBool is mapped to C's int type. GHC doesn't currently know the size of a C int on the target arch, it's easier to use StgInt instead. I guess nobody ever uses Bool arguments to foreign imports/exports.
-
Simon Marlow authored
Fixes #746
-
Simon Marlow authored
-
Simon Marlow authored
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
GHC does not now do "hoisting" as it used to. Instead, it allows foralls to the right of fuction arrows, as well as to the left. But the type-validity tester hadn't caught up. This commit fixes it. The test is tc203. Incidentally, GHC still doesn't let you write forall a. Eq a => forall b. b -> b because we get a zillion reduce/reduce errors if we allow that. I'm sure it's fixable. But meanwhile you have to use an auxiliary type synonym, which is a bit stupid.
-
David Himmelstrup authored
-
David Himmelstrup authored
-
David Himmelstrup authored
'insertStableSymbol' is used for exporting closures that are affected by the GC.
-
- 14 Apr, 2006 5 commits
-
-
simonpj@microsoft.com authored
Bulat pointed out that in Template Haskell $x is allowed instead of $(x) in expressions, but not at the top level of modules. This commit fixes the omission. Now you can say f x = x $h data T = T and the $h will run Template Haskell just as you'd expect.
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
If a TH programmer uses a type constructor as a data constructor, GHC simply crashed. This commit makes it report the error in a graceful way.
-
simonpj@microsoft.com authored
-
- 12 Apr, 2006 3 commits
-
-
simonpj@microsoft.com authored
SpecConstr currently uses substExpr for tiresome reasons to do with GADTs. Unfortunately the substExpr generates some WARNINGS (when DEBUG) is on, because we aren't adding all the in-scope Ids to the in-scope set of the substitution. When we move to FC these substExprs will go away, so I'm not going to worry about this now.
-
simonpj@microsoft.com authored
Consider data T a where T1 :: T Int T2 :: T Bool T3 :: T Char f :: T Bool -> Int f x = case x of DEFAULT -> ... T2 -> 3 Here the DEFAULT case covers multiple constructors (T1,T3), but none of them can match a scrutinee of type (T Bool). So we can prune away the default case altogether. In implementing this, I re-factored this bit of the simplifier, elminiating prepareAlts from SimplUtils, and putting all the work into simplAlts in Simplify The proximate cause was a program written by Manuel using PArrays
-
Simon Marlow authored
Division by an integral log2 can't be directly optimised to a shift right, because shift right behaves like a division that rounds to negative infinity, whereas we want one that rounds to zero. Fix this by adding (divisor-1) to the dividend when it is negative before shifting. We do this without jumps, generating very slightly worse code than gcc, which uses conditional moves on CPUs that support it.
-
- 11 Apr, 2006 3 commits
-
-
simonpj@microsoft.com authored
-
Simon Marlow authored
-
simonpj@microsoft.com authored
Up to now, the silent unwrapping of newtypes in foreign import/export has been limited to data values. But it's useful for the IO monad itself: newtype MyIO a = MIO (IO a) foreign import foo :: Int -> MyIO Int This patch allows the IO monad to be wrapped too. This applies to foreign import "dynamic" and "wrapper", thus foreign import "wrapper" foo :: MyIO () -> HisIO (FunPtr (MyIO ())) Warning: I did on the plane, and I'm no longer sure if its 100% complete, so needs more testing. In particular the wrapper/dynamic bit.
-
- 02 Apr, 2006 1 commit
-
-
simonpj@microsoft.com authored
Ross Paterson pointed out a useful generalisation of GHC's newtype-deriving mechanism. This implements it. The idea is to allow newtype Wrap m a = Wrap (m a) deriving (Monad, Eq) where the representation type doesn't start with a type constructor. Actually GHC already *did* implement this, but the eta-ok check in TcDeriv missed a case, so there was a lurking bug. This patches fixes the documentation too. drvrun019 tests.
-
- 11 Apr, 2006 2 commits
-
-
Simon Marlow authored
-
Simon Marlow authored
-
- 10 Apr, 2006 2 commits
-
-
Simon Marlow authored
-
Simon Marlow authored
-
- 07 Apr, 2006 8 commits
-
-
Josef Svenningsson authored
-
Josef Svenningsson authored
-
Simon Marlow authored
-
Simon Marlow authored
-
Simon Marlow authored
-
Simon Marlow authored
-
Simon Marlow authored
We weren't making them live early enough, with the result that finalizable objects referred to only by a thread blocked on a black hole could be finalized too early (see conc057 test).
-
Simon Marlow authored
Most of the other users of the fptools build system have migrated to Cabal, and with the move to darcs we can now flatten the source tree without losing history, so here goes. The main change is that the ghc/ subdir is gone, and most of what it contained is now at the top level. The build system now makes no pretense at being multi-project, it is just the GHC build system. No doubt this will break many things, and there will be a period of instability while we fix the dependencies. A straightforward build should work, but I haven't yet fixed binary/source distributions. Changes to the Building Guide will follow, too.
-
- 21 Jan, 2006 1 commit
-
-
Simon Marlow authored
-