[commit: ghc] master: spelling in doc (a38b832)

2012-12-19 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/a38b8327e969f8e0e6b07c36be5c47709871f158

---

commit a38b8327e969f8e0e6b07c36be5c47709871f158
Author: Gabor Greif ggr...@gmail.com
Date:   Wed Dec 19 13:37:08 2012 +0100

spelling in doc

---

 docs/users_guide/ghci.xml |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/users_guide/ghci.xml b/docs/users_guide/ghci.xml
index 3b1f00e..f3e93a3 100644
--- a/docs/users_guide/ghci.xml
+++ b/docs/users_guide/ghci.xml
@@ -2410,8 +2410,8 @@ Prelude :. cmds.ghci
  and (b) all the other things mentioned in the instance
  are in scope (either qualified or otherwise) as a result of
  a literal:load/literal or literal:module/literal commands. 
/para
-  The command literal:info!/literal works in a similar fasion
-  but it removes restriction (b), showing all instancds that are in
+  The command literal:info!/literal works in a similar fashion
+  but it removes restriction (b), showing all instances that are in
   scope and mention replaceablename/replaceable in their head.
/listitem
   /varlistentry



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: typo (e3aa165)

2012-12-19 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/e3aa16595f6240bff60fdde6579c89e469f25b4f

---

commit e3aa16595f6240bff60fdde6579c89e469f25b4f
Author: Gabor Greif ggr...@gmail.com
Date:   Fri Dec 14 10:00:55 2012 +0100

typo

---

 includes/rts/storage/ClosureMacros.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/includes/rts/storage/ClosureMacros.h 
b/includes/rts/storage/ClosureMacros.h
index dd5f428..73725e1 100644
--- a/includes/rts/storage/ClosureMacros.h
+++ b/includes/rts/storage/ClosureMacros.h
@@ -1,6 +1,6 @@
 /* 
  *
- * (c) The GHC Team, 1998-2004
+ * (c) The GHC Team, 1998-2012
  *
  * Macros for building and manipulating closures
  *
@@ -26,7 +26,7 @@
info pointerThe first word of the closure.  Might point
  to either the end or the beginning of the
 info table, depending on whether we're using
-the mini interpretter or not.  GET_INFO(c)
+the mini interpreter or not.  GET_INFO(c)
 retrieves the info pointer of a closure.
 
info table  The info table structure associated with a



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: pgj (x86 FreeBSD HEAD), build 887, Failure

2012-12-13 Thread Gabor Greif
The latter looks like being emitted by the PowerPC backend.

Cheers,

Gabor

On 12/13/12, Ian Lynagh i...@well-typed.com wrote:
 On Wed, Dec 12, 2012 at 07:27:43PM -0800, Builder wrote:

 rts/AdjustorAsm.S:127:0:
  Error: no such instruction: `load r3,HPTR_OFF(r2)'

 rts/AdjustorAsm.S:129:0:
  Error: no such instruction: `load r12,WPTR_OFF(r2)'

 rts/AdjustorAsm.S:131:0:  Error: no such instruction: `mtctr r12'

 Does anyone know what's going on here?


 Thanks
 Ian


 ___
 Cvs-ghc mailing list
 Cvs-ghc@haskell.org
 http://www.haskell.org/mailman/listinfo/cvs-ghc


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: typo (5d0d1d9)

2012-12-12 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/5d0d1d9cbe2fd0c0a5e4f4a979c8e46ff51ea6fa

---

commit 5d0d1d9cbe2fd0c0a5e4f4a979c8e46ff51ea6fa
Author: Gabor Greif ggr...@gmail.com
Date:   Wed Dec 12 10:26:49 2012 +0100

typo

---

 compiler/nativeGen/AsmCodeGen.lhs |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/compiler/nativeGen/AsmCodeGen.lhs 
b/compiler/nativeGen/AsmCodeGen.lhs
index 05f7c3a..1c0b0a1 100644
--- a/compiler/nativeGen/AsmCodeGen.lhs
+++ b/compiler/nativeGen/AsmCodeGen.lhs
@@ -388,7 +388,7 @@ cmmNativeGens' ncgImpl us (cmm : cmms) (h, dflags, (impAcc, 
profAcc)) count
 
 let !count' = count + 1
 
--- force evaulation all this stuff to avoid space leaks
+-- force evaluation all this stuff to avoid space leaks
 {-# SCC seqString #-} evaluate $ seqString (showSDoc dflags $ vcat $ 
map ppr imports)
 
 cmmNativeGens' ncgImpl



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


RFC: Singleton equality witnesses

2012-11-30 Thread Gabor Greif
Hi all!

After encouragement from Iavor on G+, here is a patch that implements
a class method for singleton type equality witnesses in a generic way.

Please comment on two things:
  - is this a good approach?
  - how can we avoid abuse of SingEq (as it is type polymorphic, can this harm?)
  - (possibly) bikeshedding on names.

Cheers and thanks,

Gabor


TypeLits.hs.patch
Description: Binary data
___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: typo (d53e222)

2012-11-30 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/d53e222b16c5dc6971e6173f8d9e5dbced68265d

---

commit d53e222b16c5dc6971e6173f8d9e5dbced68265d
Author: Gabor Greif ggr...@gmail.com
Date:   Fri Nov 30 15:18:43 2012 +0100

typo

---

 compiler/iface/IfaceSyn.lhs |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/compiler/iface/IfaceSyn.lhs b/compiler/iface/IfaceSyn.lhs
index 06c7b67..2f827ca 100644
--- a/compiler/iface/IfaceSyn.lhs
+++ b/compiler/iface/IfaceSyn.lhs
@@ -213,7 +213,7 @@ data IfaceIdInfo
 --  (In earlier GHCs we used to drop IdInfo immediately on reading,
 --   but we do not do that now.  Instead it's discarded when the
 --   ModIface is read into the various decl pools.)
---   * The version comparsion sees that new (=NoInfo) differs from old 
(=HasInfo *)
+--   * The version comparison sees that new (=NoInfo) differs from old 
(=HasInfo *)
 --  and so gives a new version.
 
 data IfaceInfoItem



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Proposal: New procedures for handling packages in a GHC tree

2012-11-28 Thread Gabor Greif
Will this work with the github mirror (https://github.com/ghc), as the
module names seem to be different from those on darcs.haskell.org?

Just a quick check before I destroy my local repo with a ./sync-all pull :-)

Cheers,

Gabor

On 11/25/12, Ian Lynagh i...@well-typed.com wrote:
 On Fri, Nov 02, 2012 at 08:10:04PM +, Ian Lynagh wrote:

 We have been working on a new way in which we handle the repositories
 that make up a GHC tree, in order to makes the process smoother for all
 parties.

 Our proposal is here:

 http://hackage.haskell.org/trac/ghc/wiki/WorkingConventions/Repositories

 We've now gone ahead with this proposal.

 We've stuck with only converting repositories with upstreams to
 submodules for now, but we may expand them to cover all repositories in
 the future.


 Thanks
 Ian


 ___
 Cvs-ghc mailing list
 Cvs-ghc@haskell.org
 http://www.haskell.org/mailman/listinfo/cvs-ghc


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: typos in note (3a82618)

2012-11-26 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/3a8261827fd9e66251a4a8bf91a22ae075bfdcb9

---

commit 3a8261827fd9e66251a4a8bf91a22ae075bfdcb9
Author: Gabor Greif ggr...@gmail.com
Date:   Mon Nov 26 16:04:33 2012 +0100

typos in note

---

 compiler/types/Kind.lhs |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/types/Kind.lhs b/compiler/types/Kind.lhs
index 6ce2dd9..2041508 100644
--- a/compiler/types/Kind.lhs
+++ b/compiler/types/Kind.lhs
@@ -1,5 +1,5 @@
 %
-% (c) The University of Glasgow 2006
+% (c) The University of Glasgow 2006-2012
 %
 
 \begin{code}
@@ -80,11 +80,11 @@ The special thing about types of kind Constraint is that
engine inserts an extra argument of type (Ord a) at every call site
to f.
 
-Howver, once type inference is over, there is *no* distinction between 
+However, once type inference is over, there is *no* distinction between 
 Constraint and *.  Indeed we can have coercions between the two. Consider
class C a where
  op :: a - a
-For this single-method class we may genreate a newtype, which in turn 
+For this single-method class we may generate a newtype, which in turn 
 generates an axiom witnessing
 Ord a ~ (a - a)
 so on the left we have Constraint, and on the right we have *.



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: add embedded vendor (d94250e)

2012-11-23 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/d94250e68bc85e80e3eb0eb04bcbfac68b4423d2

---

commit d94250e68bc85e80e3eb0eb04bcbfac68b4423d2
Author: Gabor Greif ggr...@gmail.com
Date:   Fri Nov 23 17:05:48 2012 +0100

add embedded vendor

---

 aclocal.m4 |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index d014b3a..78e758e 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -194,7 +194,7 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS],
 
 checkVendor() {
 case [$]1 in
-dec|unknown|hp|apple|next|sun|sgi|ibm)
+dec|unknown|hp|apple|next|sun|sgi|ibm|montavista)
 ;;
 *)
 echo Unknown vendor [$]1



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: typo (359efbf)

2012-11-23 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/359efbf0fc714528f95207fbe9fc03383b380228

---

commit 359efbf0fc714528f95207fbe9fc03383b380228
Author: Gabor Greif ggr...@gmail.com
Date:   Fri Nov 23 17:07:14 2012 +0100

typo

---

 rts/Linker.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rts/Linker.c b/rts/Linker.c
index 066d070..3e169fd 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -1,6 +1,6 @@
 /* 
-
  *
- * (c) The GHC Team, 2000-2004
+ * (c) The GHC Team, 2000-2012
  *
  * RTS Object Linker
  *
@@ -1475,7 +1475,7 @@ initLinker( void )
 IF_DEBUG(linker, debugBelch(initLinker: start\n));
 
 /* Make initLinker idempotent, so we can call it
-   before evey relevant operation; that means we
+   before every relevant operation; that means we
don't need to initialise the linker separately */
 if (linker_init_done == 1) {
 IF_DEBUG(linker, debugBelch(initLinker: idempotent return\n));



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: fix some typos (704f802)

2012-11-21 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/704f8024c75ab147c6f9558b1c76525f132e4f14

---

commit 704f8024c75ab147c6f9558b1c76525f132e4f14
Author: Gabor Greif ggr...@gmail.com
Date:   Wed Nov 21 18:25:50 2012 +0100

fix some typos

---

 compiler/main/GHC.hs |4 ++--
 compiler/typecheck/TcRnTypes.lhs |4 ++--
 compiler/utils/Outputable.lhs|8 
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs
index 051edcd..82b822b 100644
--- a/compiler/main/GHC.hs
+++ b/compiler/main/GHC.hs
@@ -1,6 +1,6 @@
 -- 
-
 --
--- (c) The University of Glasgow, 2005
+-- (c) The University of Glasgow, 2005-2012
 --
 -- The GHC API
 --
@@ -369,7 +369,7 @@ defaultErrorHandler fm (FlushOut flushOut) inner =
   inner
 
 -- | Install a default cleanup handler to remove temporary files deposited by
--- a GHC run.  This is seperate from 'defaultErrorHandler', because you might
+-- a GHC run.  This is separate from 'defaultErrorHandler', because you might
 -- want to override the error handling, but still get the ordinary cleanup
 -- behaviour.
 defaultCleanupHandler :: (ExceptionMonad m, MonadIO m) =
diff --git a/compiler/typecheck/TcRnTypes.lhs b/compiler/typecheck/TcRnTypes.lhs
index 99b9a07..c269882 100644
--- a/compiler/typecheck/TcRnTypes.lhs
+++ b/compiler/typecheck/TcRnTypes.lhs
@@ -1,5 +1,5 @@
 
-% (c) The University of Glasgow 2006
+% (c) The University of Glasgow 2006-2012
 % (c) The GRASP Project, Glasgow University, 1992-2002
 %
 
@@ -784,7 +784,7 @@ emptyImportAvails = ImportAvails { imp_mods  = 
emptyModuleEnv,
 -- | Union two ImportAvails
 --
 -- This function is a key part of Import handling, basically
--- for each import we create a seperate ImportAvails structure
+-- for each import we create a separate ImportAvails structure
 -- and then union them all together with this function.
 plusImportAvails ::  ImportAvails -  ImportAvails -  ImportAvails
 plusImportAvails
diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs
index 7e5c180..ad0b9d7 100644
--- a/compiler/utils/Outputable.lhs
+++ b/compiler/utils/Outputable.lhs
@@ -1,5 +1,5 @@
 %
-% (c) The University of Glasgow 2006
+% (c) The University of Glasgow 2006-2012
 % (c) The GRASP Project, Glasgow University, 1992-1998
 %
 
@@ -779,15 +779,15 @@ pprWithCommas :: (a - SDoc) -- ^ The pretty printing 
function to use
  -- comma-separated and finally packed into a 
paragraph.
 pprWithCommas pp xs = fsep (punctuate comma (map pp xs))
 
--- | Returns the seperated concatenation of the pretty printed things.
+-- | Returns the separated concatenation of the pretty printed things.
 interppSP  :: Outputable a = [a] - SDoc
 interppSP  xs = sep (map ppr xs)
 
--- | Returns the comma-seperated concatenation of the pretty printed things.
+-- | Returns the comma-separated concatenation of the pretty printed things.
 interpp'SP :: Outputable a = [a] - SDoc
 interpp'SP xs = sep (punctuate comma (map ppr xs))
 
--- | Returns the comma-seperated concatenation of the quoted pretty printed 
things.
+-- | Returns the comma-separated concatenation of the quoted pretty printed 
things.
 --
 --  [x,y,z]  ==  `x', `y', `z'
 pprQuotedList :: Outputable a = [a] - SDoc



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: typos in comments (6e4f6c6)

2012-11-16 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/6e4f6c624fcd72dca11d7856f1a1914a01c22718

---

commit 6e4f6c624fcd72dca11d7856f1a1914a01c22718
Author: Gabor Greif ggr...@gmail.com
Date:   Fri Nov 16 11:26:50 2012 +0100

typos in comments

---

 compiler/coreSyn/CoreSyn.lhs  |2 +-
 compiler/typecheck/TcInstDcls.lhs |8 
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/compiler/coreSyn/CoreSyn.lhs b/compiler/coreSyn/CoreSyn.lhs
index 2fb5aaf..711c148 100644
--- a/compiler/coreSyn/CoreSyn.lhs
+++ b/compiler/coreSyn/CoreSyn.lhs
@@ -464,7 +464,7 @@ data Tickish id =
 -- cannot discard a tick, and the compiler should preserve the number
 -- of ticks as far as possible.
 --
--- Hwever, we stil allow the simplifier to increase or decrease
+-- However, we still allow the simplifier to increase or decrease
 -- sharing, so in practice the actual number of ticks may vary, except
 -- that we never change the value from zero to non-zero or vice versa.
 --
diff --git a/compiler/typecheck/TcInstDcls.lhs 
b/compiler/typecheck/TcInstDcls.lhs
index b4a27b5..236b834 100644
--- a/compiler/typecheck/TcInstDcls.lhs
+++ b/compiler/typecheck/TcInstDcls.lhs
@@ -189,7 +189,7 @@ Instead we use a cunning trick.
iff its argument satisfies exprIsConApp_maybe.  This is done in
MkId mkDictSelId
 
- * We make 'df' CONLIKE, so that shared uses stil match; eg
+ * We make 'df' CONLIKE, so that shared uses still match; eg
   let d = df d1 d2
   in ...(op2 d)...(op1 d)...
 
@@ -246,7 +246,7 @@ careful when we have
   op = ...
 then we'll get an INLINE pragma on $cop_list but it's important that
 $cop_list only inlines when it's applied to *two* arguments (the
-dictionary and the list argument).  So we nust not eta-expand $df
+dictionary and the list argument).  So we must not eta-expand $df
 above.  We ensure that this doesn't happen by putting an INLINE
 pragma on the dfun itself; after all, it ends up being just a cast.
 
@@ -309,7 +309,7 @@ instance.
 
 Why is this justified?  Because we generate a (C [a]) constraint in
 a context in which 'a' cannot be instantiated to anything that matches
-other overlapping instances, or else we would not be excecuting this
+other overlapping instances, or else we would not be executing this
 version of op1 in the first place.
 
 It might even be a bit disguised:
@@ -323,7 +323,7 @@ It might even be a bit disguised:
 Precisely this is used in package 'regex-base', module Context.hs.
 See the overlapping instances for RegexContext, and the fact that they
 call 'nullFail' just like the example above.  The DoCon package also
-does the same thing; it shows up in module Fraction.hs
+does the same thing; it shows up in module Fraction.hs.
 
 Conclusion: when typechecking the methods in a C [a] instance, we want to
 treat the 'a' as an *existential* type variable, in the sense described



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: fix typo, courtesy of Jon Cave, thanks! (3862220)

2012-11-08 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/386222001e6dda180cbb05e9e6aebbab04d12aae

---

commit 386222001e6dda180cbb05e9e6aebbab04d12aae
Author: Gabor Greif ggr...@gmail.com
Date:   Thu Nov 8 10:44:06 2012 +0100

fix typo, courtesy of Jon Cave, thanks!

---

 utils/ghc-pkg/Main.hs |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs
index ca278e9..e727f4d 100644
--- a/utils/ghc-pkg/Main.hs
+++ b/utils/ghc-pkg/Main.hs
@@ -239,7 +239,7 @@ usageHeader prog = substProg prog $
   Prints the highest registered version of a package.\n ++
   \n ++
 $p check\n ++
-  Check the consistency of package depenencies and list broken 
packages.\n ++
+  Check the consistency of package dependencies and list broken 
packages.\n ++
   Accepts the --simple-output flag.\n ++
   \n ++
 $p describe {pkg}\n ++



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: typos (3ca7260)

2012-11-07 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/3ca7260ae35adf70d31003008af67576d6b6c78c

---

commit 3ca7260ae35adf70d31003008af67576d6b6c78c
Author: Gabor Greif ggr...@gmail.com
Date:   Wed Nov 7 12:10:22 2012 +0100

typos

---

 compiler/ghci/RtClosureInspect.hs |2 +-
 compiler/typecheck/TcSMonad.lhs   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/ghci/RtClosureInspect.hs 
b/compiler/ghci/RtClosureInspect.hs
index 24b7e02..49e943c 100644
--- a/compiler/ghci/RtClosureInspect.hs
+++ b/compiler/ghci/RtClosureInspect.hs
@@ -983,7 +983,7 @@ the outside type, D. So we can't straightforwardly 
decompose the
 outside type, and we end up in the _ branch of the case.
 
 Then we match the dataConOrigResTy of the data constructor against the
-outside type, hoping to get a substituion that tells how to instantiate
+outside type, hoping to get a substitution that tells how to instantiate
 the *representation* type constructor.   This looks a bit delicate to
 me, but it seems to work.
 -}
diff --git a/compiler/typecheck/TcSMonad.lhs b/compiler/typecheck/TcSMonad.lhs
index c0ea95c..7541cd7 100644
--- a/compiler/typecheck/TcSMonad.lhs
+++ b/compiler/typecheck/TcSMonad.lhs
@@ -487,7 +487,7 @@ The InertCans represents a collection of constraints with 
the following properti
  constraint solver that we rewrite types and constraints wrt
  to the inert substitution is TcCanonical/flattenTyVar.
 
-   - In the past we did try to have the inert substituion as
+   - In the past we did try to have the inert substitution as
  idempotent as possible but this would only be true for
  constraints of the same flavor, so in total the inert
  substitution could not be idempotent, due to flavor-related



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: another typo (50728d0)

2012-11-07 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/50728d09bed322cdbfdda00f38d0503f9aed728b

---

commit 50728d09bed322cdbfdda00f38d0503f9aed728b
Author: Gabor Greif ggr...@gmail.com
Date:   Wed Nov 7 16:05:20 2012 +0100

another typo

---

 compiler/typecheck/TcRnTypes.lhs |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/compiler/typecheck/TcRnTypes.lhs b/compiler/typecheck/TcRnTypes.lhs
index e6d2013..4b2ea8f 100644
--- a/compiler/typecheck/TcRnTypes.lhs
+++ b/compiler/typecheck/TcRnTypes.lhs
@@ -915,7 +915,7 @@ built (in TcCanonical).
 
 In contrast, the type of the evidence *term* (ccev_evtm or ctev_evar) in
 the evidence may *not* be fully zonked; we are careful not to look at it
-during constraint solving.  Seee Note [Evidence field of CtEvidence]
+during constraint solving.  See Note [Evidence field of CtEvidence]
 
 \begin{code}
 mkNonCanonical :: CtLoc - CtEvidence - Ct



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [PATCH] define own version of PRIdPTR on platform where its not available

2012-11-05 Thread Gabor Greif
On 11/5/12, Simon Marlow marlo...@gmail.com wrote:
 On 03/11/2012 00:16, Ian Lynagh wrote:

 Hi Karel,

 On Fri, Nov 02, 2012 at 07:39:45PM +0100, Karel Gardas wrote:

 I'm curious if this patch is kind of controversial so you are
 reluctant to merge it. If you find any issue with it please let me
 know so I can change it as per your suggestion. I've done this patch
 to un-break GHC HEAD build failure on my solaris 11 box.

 If we're going to go this route, then I think we should do it by
 comparing SIZEOF_VOID_P to SIZEOF_INT etc, rather than assuming that
 either 'ld' or 'd' is right based on _LP64.

 However, I'm hoping to replace mkDerivedConstants.c with probably a
 configure script soon, so that it can produce the right results when
 cross-compiling.

 Yes we need to replace mkDerivedConstants.c with something else for
 cross compilation, but I really hope it doesn't have to be a configure
 script :-)  Surely it's possible to convince the C compiler to emit
 struct offsets without having to run the program, somehow?

+1. A configure script will run (almost) till the heat death of the universe.

I have a solution on the cross-compiler-alienless branch which does exactly
what you propose: feed the relevant headers into the cross-gcc, obtain
the offsets/sizes back
by 'nm', and massage stuff to obtain all as macros then feed those
into mkDerivedConstants.c.

So, unless we want a very generic solution, where more than one cross
target is possible,
there is no need to abolish mkDerivedConstants.c. The current
architecture would do with
a few tweaks.

Cheers,

Gabor


 Cheers,
   Simon






 On 10/30/12 06:59 PM, Karel Gardas wrote:
 Note that PRIdPTR is considered as linux-ism so it's not available on
 platforms
 like Solaris, although some other free Unix(-like) OSes apparently
 supports
 it too.
 ---
   includes/mkDerivedConstants.c |   11 +++
   1 files changed, 11 insertions(+), 0 deletions(-)

 diff --git a/includes/mkDerivedConstants.c
 b/includes/mkDerivedConstants.c
 index 1393112..953b2b5 100644
 --- a/includes/mkDerivedConstants.c
 +++ b/includes/mkDerivedConstants.c
 @@ -30,6 +30,17 @@
   #includestdio.h
   #includestring.h

 +
 +#if !defined(PRIdPTR)
 +#if defined(_LP64)
 +/* compiling for 64bit target */
 +#define PRIdPTR ld
 +#else
 +/* compiling for 32bit target */
 +#define PRIdPTR d
 +#endif
 +#endif


 Thanks
 Ian


 ___
 Cvs-ghc mailing list
 Cvs-ghc@haskell.org
 http://www.haskell.org/mailman/listinfo/cvs-ghc



 ___
 Cvs-ghc mailing list
 Cvs-ghc@haskell.org
 http://www.haskell.org/mailman/listinfo/cvs-ghc


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: typo (680dca1)

2012-11-05 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/680dca1145a08a82a83950bdbca891742fbaf526

---

commit 680dca1145a08a82a83950bdbca891742fbaf526
Author: Gabor Greif ggr...@gmail.com
Date:   Mon Nov 5 12:56:43 2012 +0100

typo

---

 docs/users_guide/ghci.xml |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/docs/users_guide/ghci.xml b/docs/users_guide/ghci.xml
index c59f4b3..9e8ea2f 100644
--- a/docs/users_guide/ghci.xml
+++ b/docs/users_guide/ghci.xml
@@ -662,7 +662,7 @@ Prelude
   an attempt to distinguish it from the new literalT/literal,
   which is displayed as simply literalT/literal./para
 
-paraClass and type-family instance declarations are simply added to the 
list of available isntances, with one
+paraClass and type-family instance declarations are simply added to the 
list of available instances, with one
 exception. Since type-family instances are not permitted to overlap, but 
you might want to re-define one,
 a type-family instance emphasisreplaces/emphasis any earlier type 
instance with an identical left hand side.
 (See xref linkend=type-families/.)/para



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [PATCH] define own version of PRIdPTR on platform where its not available

2012-11-05 Thread Gabor Greif
Of course I use 'offsetof' in the first part of the tool pipeline. The
problem is, though getting the result of it out of the cross-gcc. Here
we cannot simply say

 printf(offsXYZ = %zu, offsetof(XY, Z));

because there is no way to run the cross-gcc output. Instead I do:

 char offsXYZ[offsetof(XY, Z)];

and the inspect the resulting object file with 'nm'. In the second
(i.e. host) gcc
invocation I am not allowed to use 'offsetof' to obtain target values,
so I include
the transformed 'nm' output of the form

 #define offsXYZ 0x12

and compile mkDerivedConstants.c with these constants.

Hope this clears it up.

Cheers,

Gabor

On 11/5/12, Erik de Castro Lopo mle...@mega-nerd.com wrote:
 Gabor Greif wrote:

 +1. A configure script will run (almost) till the heat death of the
 universe.

 I have a solution on the cross-compiler-alienless branch which does
 exactly
 what you propose: feed the relevant headers into the cross-gcc, obtain
 the offsets/sizes back
 by 'nm', and massage stuff to obtain all as macros then feed those
 into mkDerivedConstants.c.

 Doesn't the offsetof macro do the right thing for get the offset of
 fields within a struct?

 http://en.wikipedia.org/wiki/Offsetof

 Erik
 --
 --
 Erik de Castro Lopo
 http://www.mega-nerd.com/

 ___
 Cvs-ghc mailing list
 Cvs-ghc@haskell.org
 http://www.haskell.org/mailman/listinfo/cvs-ghc


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: mkExprStmt not in scope in Parser.hs issue.

2012-10-29 Thread Gabor Greif
IIRC, I had to manually remove a 'Parser.y' file to get things rolling.

Cheers,

Gabor

On 10/29/12, Karel Gardas karel.gar...@centrum.cz wrote:

 Hello,

 I'm trying to get GHC HEAD compilation working on my freshly installed
 Solaris 11/x86 box and I'm trying to solve following error now:

 /opt/ghc-7.4.2/bin/ghc -static  -H32m -O  -package-conf
 libraries/bootstrapping.conf  -package-name ghc-7.7 -hide-all-packages
 -i -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen
 -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn
 -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen
 -icompiler/parser -icompiler/prelude -icompiler/profiling
 -icompiler/rename -icompiler/simplCore -icompiler/simplStg
 -icompiler/specialise -icompiler/stgSyn -icompiler/stranal
 -icompiler/typecheck -icompiler/types -icompiler/utils
 -icompiler/vectorise -icompiler/stage1/build
 -icompiler/stage1/build/autogen -Icompiler/stage1/build
 -Icompiler/stage1/build/autogen -Icompiler/stage1 -Icompiler/.
 -Icompiler/parser -Icompiler/utils-optP-include
 -optPcompiler/stage1/build/autogen/cabal_macros.h -package Cabal-1.17.0
 -package array-0.4.0.0 -package base-4.5.1.0 -package
 bin-package-db-0.0.0.0 -package bytestring-0.9.2.1 -package
 containers-0.4.2.1 -package directory-1.1.0.2 -package filepath-1.3.0.0
 -package hoopl-3.9.0.0 -package hpc-0.6.0.0 -package old-time-1.1.0.0
 -package process-1.1.0.1 -package time-1.4 -package unix-2.5.1.1  -Wall
 -fno-warn-name-shadowing -XHaskell98 -XNondecreasingIndentation -XCPP
 -XMagicHash -XUnboxedTuples -XPatternGuards -XForeignFunctionInterface
 -XEmptyDataDecls -XTypeSynonymInstances -XMultiParamTypeClasses
 -XFlexibleInstances -XRankNTypes -XScopedTypeVariables
 -XDeriveDataTypeable -XBangPatterns -DSTAGE=1   -no-user-package-conf
 -rtsopts  -odir compiler/stage1/build -hidir compiler/stage1/build
 -stubdir compiler/stage1/build -hisuf hi -osuf  o -hcsuf hc -c
 compiler/stage1/build/Parser.hs -o compiler/stage1/build/Parser.o

 compiler/stage1/build/Parser.hs:6705:45: Not in scope: `mkExprStmt'
 gmake[1]: *** [compiler/stage1/build/Parser.o] Error 1
 gmake: *** [all] Error 2


 I'm bootstraping with GHC 7.4.2 and happy is 1.18.6 version and alex is
 2.3.5 if this is important. Is there any idea what causes this failure?
 The HEAD is as of today.

 Thanks!
 Karel

 ___
 Cvs-ghc mailing list
 Cvs-ghc@haskell.org
 http://www.haskell.org/mailman/listinfo/cvs-ghc


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: extend LD_LIBRARY_PATH instead of replacing it (fb41ac5)

2012-10-24 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/fb41ac5285895c3b5304b1c267197faaea89e8a6

---

commit fb41ac5285895c3b5304b1c267197faaea89e8a6
Author: Gabor Greif ggr...@gmail.com
Date:   Fri Oct 12 11:25:29 2012 +0200

extend LD_LIBRARY_PATH instead of replacing it

---

 rules/shell-wrapper.mk |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/rules/shell-wrapper.mk b/rules/shell-wrapper.mk
index 395968a..86af3ac 100644
--- a/rules/shell-wrapper.mk
+++ b/rules/shell-wrapper.mk
@@ -1,6 +1,6 @@
 # -
 #
-# (c) 2009 The University of Glasgow
+# (c) 2009-2012 The University of Glasgow
 #
 # This file is part of the GHC build system.
 #
@@ -46,9 +46,9 @@ $$(INPLACE_WRAPPER): $$($1_$2_INPLACE)
$$($1_$2_INPLACE_SHELL_WRAPPER_EXTRA)
 ifeq $$(DYNAMIC_BY_DEFAULT) YES
 ifeq $$(TargetOS_CPP) linux
-   echo 'export LD_LIBRARY_PATH=$$($1_$2_DEP_LIB_DIRS_SEARCHPATH)'   
$$@
+   echo 'export 
LD_LIBRARY_PATH=$$($1_$2_DEP_LIB_DIRS_SEARCHPATH):LD_LIBRARY_PATH'  $$@
 else ifeq $$(TargetOS_CPP) darwin
-   echo 'export DYLD_LIBRARY_PATH=$$($1_$2_DEP_LIB_DIRS_SEARCHPATH)'  
$$@
+   echo 'export 
DYLD_LIBRARY_PATH=$$($1_$2_DEP_LIB_DIRS_SEARCHPATH):DYLD_LIBRARY_PATH'  
$$@
 endif
 endif
 ifeq $$($1_$2_SHELL_WRAPPER) YES



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: typo (0b3811c)

2012-10-24 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/0b3811c093736950c1d2757fb12dba60f9bf97ca

---

commit 0b3811c093736950c1d2757fb12dba60f9bf97ca
Author: Gabor Greif ggr...@gmail.com
Date:   Wed Oct 24 13:45:55 2012 +0200

typo

---

 compiler/ghci/Linker.lhs |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/ghci/Linker.lhs b/compiler/ghci/Linker.lhs
index 0a9de80..3ba9c3c 100644
--- a/compiler/ghci/Linker.lhs
+++ b/compiler/ghci/Linker.lhs
@@ -1,5 +1,5 @@
 %
-% (c) The University of Glasgow 2005-2006
+% (c) The University of Glasgow 2005-2012
 %
 \begin{code}
 -- | The dynamic linker for GHCi.
@@ -1239,7 +1239,7 @@ searchForLibUsingGcc dflags so dirs = do
   else return (Just file)
 
 -- 
--- Loading a dyanmic library (dlopen()-ish on Unix, LoadLibrary-ish on Win32)
+-- Loading a dynamic library (dlopen()-ish on Unix, LoadLibrary-ish on Win32)
 
 -- Darwin / MacOS X only: load a framework
 -- a framework is a dynamic library packaged inside a directory of the same



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: October 2012 stats (82ab12a)

2012-10-23 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/82ab12afefd6f115d2efb37924227ef2f43adb19

---

commit 82ab12afefd6f115d2efb37924227ef2f43adb19
Author: Gabor Greif ggr...@gmail.com
Date:   Tue Oct 23 09:50:31 2012 +0200

October 2012 stats

---

 compiler/parser/Parser.y.pp |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp
index 966d4e3..3c18498 100644
--- a/compiler/parser/Parser.y.pp
+++ b/compiler/parser/Parser.y.pp
@@ -72,7 +72,13 @@ import Control.Monad( mplus )
 
 {-
 -
-24 Februar 2006
+12 October 2012
+
+Conflicts: 43 shift/reduce
+   1 reduce/reduce
+
+-
+24 February 2006
 
 Conflicts: 33 shift/reduce
1 reduce/reduce



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: comments only (2c2be63)

2012-10-23 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/2c2be637206cb1d58f4fc8a4a2e717e419c9fa5d

---

commit 2c2be637206cb1d58f4fc8a4a2e717e419c9fa5d
Author: Gabor Greif ggr...@gmail.com
Date:   Tue Oct 23 09:52:30 2012 +0200

comments only

---

 includes/stg/MiscClosures.h |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/includes/stg/MiscClosures.h b/includes/stg/MiscClosures.h
index 760a59d..c94fdb3 100644
--- a/includes/stg/MiscClosures.h
+++ b/includes/stg/MiscClosures.h
@@ -213,7 +213,7 @@ RTS_THUNK(stg_ap_5_upd);
 RTS_THUNK(stg_ap_6_upd);
 RTS_THUNK(stg_ap_7_upd);
 
-/* standard application routines (see also rts/gen_apply.py, 
+/* standard application routines (see also utils/genapply, 
  * and compiler/codeGen/CgStackery.lhs).
  */
 RTS_RET(stg_ap_v);
@@ -470,10 +470,10 @@ extern StgWord RTS_VAR(stable_ptr_table);
 // Profiling.c
 extern unsigned int RTS_VAR(era);
 extern unsigned int RTS_VAR(entering_PAP);
-extern StgWord  RTS_VAR(CC_LIST);   /* registered CC list */
+extern StgWord  RTS_VAR(CC_LIST);  /* registered CC list */
 extern StgWord  RTS_VAR(CCS_LIST); /* registered CCS list */
 extern StgWord  CCS_SYSTEM[];
-extern unsigned int RTS_VAR(CC_ID);/* global ids */
+extern unsigned int RTS_VAR(CC_ID);/* global ids */
 extern unsigned int RTS_VAR(CCS_ID);
 
 #endif



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Make warnings in dph

2012-10-23 Thread Gabor Greif
These 'make' diagnostics appeared today with a fresh pull:

make[1]: Circular
libraries/dph/dph-lifted-copy/dist-install/build/Data/Array/Parallel/Lifted/PArray.dyn_o
- 
libraries/dph/dph-lifted-copy/dist-install/build/Data/Array/Parallel/Lifted/PArray.o
dependency dropped.
make[1]: Circular
libraries/dph/dph-lifted-copy/dist-install/build/Data/Array/Parallel/Lifted/TH/Repr.dyn_o
- 
libraries/dph/dph-lifted-copy/dist-install/build/Data/Array/Parallel/Lifted/TH/Repr.o
dependency dropped.

Ist it a reason for concern?

Cheers,

Gabor

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Determining live registers on Cmm procedure entry?

2012-10-16 Thread Gabor Greif
David,

this reminds me, I have added a feature bugzilla to LLVM:

http://llvm.org/bugs/show_bug.cgi?id=14080

May be interesting to discuss it here first.

Cheers,

Gabor

On 10/16/12, David Terei davidte...@gmail.com wrote:
 What is the problem you face? That you want to allow passing a dynamic
 number of float or double arguments? I assume you are keeping it fixed
 at 6 still but want to allow those 6 to be either 6 floats, 6 doubles
 or any other combination. (Long term is anything that can be put in a
 xmm* register...)

 Why do you want Cmm liveness on entry? Is it simply to solve the above
 so you can generate specialized function types instead of the
 universal one the LLVM backend uses?

 If so, have you tried just using the most general universal type?
 e.g., how badly is the generated code affected if you have all
 arguments be Doubles and then do type casts on jumps and function
 entries?

 This is the original commit I wrote for tracking STG reg liveness:
 4384e146640230399b38cd62e8e5df391f72c3a7
 This is the one Simon Marlow wrote to do the same but in the new code
 gen: c6a61235aa0baf6f9e8a41c5a771ccc7e32c23a5

 I'd suggest you look at these commits and they should show you where
 to get the information from. (I can't remember anymore sorry).

 Cheers,
 David

 On 16 October 2012 03:45, Geoffrey Mainland mainl...@apeiron.net wrote:
 Hi all,

 I'm working on changing GHC's calling convention to support overlapping
 register classes. On x86-64 this will mean that a function can receive up
 to
 six Float/Double arguments (any mixture) in registers. Right now only two
 Double arguments can be passed in registers on x86-64, even if a function
 takes zero Float arguments---the register classes for Floats and Doubles
 cannot overlap even though both are passed in xmm* registers.

 This is working fine with the native back-end, but I'm not sure how to
 get
 it working with the LLVM back-end. Right now LLVM translates a Cmm
 procedure
 to an LLVM function of a single universal type( that is, all LLVM
 functions
 that the LLVM back-end produces for Cmm procedures have the same type)
 that
 takes all STG registers as arguments. A Cmm procedure call passes all the
 STG registers, although the back-end takes advantage of the liveness
 information attached to Cmm jumps to pass undefined values for non-live
 registers.

 Now that register classes can overlap, I need to change this. Since jumps
 have liveness information attached, I can simply pass the live registers.
 But when translating Cmm procedures, I need to know which registers are
 live
 on entry to the procedure.

 The slightly longer-term goal is to add support for passing SSE vectors
 in
 registers. What I'd like to have ideally is the set of live registers
 *and
 their Cmm types* at each procedure entry and jump. I envision having a
 single STG register class, say X16, for all 128-bit-wide SSE registers,
 but
 I'd like the Cmm type information when generating LLVM type signatures so
 I
 can generate the appropriate LLVM types---a 128-bit-wide vector of 32-bit
 integers does not have the same type as a 128-bit-wide vector of double
 precision floats.

 I might be able to do without the Cmm type information by inserting
 appropriate casts in the generated LLVM code, but I really need the set
 of
 live registers on entry to a Cmm procedure. I don't see how to get this
 unfortunately. Any hints?

 Thanks,
 Geoff

 ___
 Cvs-ghc mailing list
 Cvs-ghc@haskell.org
 http://www.haskell.org/mailman/listinfo/cvs-ghc

 ___
 Cvs-ghc mailing list
 Cvs-ghc@haskell.org
 http://www.haskell.org/mailman/listinfo/cvs-ghc


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Determining live registers on Cmm procedure entry?

2012-10-16 Thread Gabor Greif
On 10/17/12, David Terei davidte...@gmail.com wrote:
 On 16 October 2012 14:48, Gabor Greif ggr...@gmail.com wrote:
 David,

 this reminds me, I have added a feature bugzilla to LLVM:

 http://llvm.org/bugs/show_bug.cgi?id=14080

 May be interesting to discuss it here first.

 I think opening a ticket with LLVM is probably a bad move sorry. It's
 not our community and so we want to be careful not to harass them so
 we maintain good-will with them (and they've shown they are willing to

As I've been a contributor to LLVM since 2005, I do not think they'll
understand this as harassment :-) Currently I focus on selling Haskell
*as such* at my workplace, hopefully that will be over in December,
and then I can tackle some of my LLVM enhancement PRs (such as
this one). I just wanted to record some thoughts.

 engage with us and help with us but that is a limited use resource,
 hence conserve!).

 Discussion is probably best done on the mailing list. But more
 importantly, we should only pull them into a discussion when we have
 someone committed to working on the problem. That isn't me at this
 point, I don't have time.

I assume you mean this Haskell list (cvs.ghc@).


 So if you want to discuss TNTC / LLVM solutions, great! But unless you
 are also prepared to drive the discussion and implement proposed
 solutions, lets keep it internal to GHC.

Yeah, I won't implement anything before discussing this with the relevant
persons (in both communities). Sometimes people have very good arguments
why something is not a good idea.


 I think there are ideas right now of how to move forward on TNTC, its
 more a matter of implementing one or two of them to experiment and
 demonstrate results.

Okay, as soon as I am ready to kick, I'll rekindle these threads.

Thanks for your honest opinions,

Gabor


 Cheers,
 David


 Sure.


 Cheers,

 Gabor

 On 10/16/12, David Terei davidte...@gmail.com wrote:
 What is the problem you face? That you want to allow passing a dynamic
 number of float or double arguments? I assume you are keeping it fixed
 at 6 still but want to allow those 6 to be either 6 floats, 6 doubles
 or any other combination. (Long term is anything that can be put in a
 xmm* register...)

 Why do you want Cmm liveness on entry? Is it simply to solve the above
 so you can generate specialized function types instead of the
 universal one the LLVM backend uses?

 If so, have you tried just using the most general universal type?
 e.g., how badly is the generated code affected if you have all
 arguments be Doubles and then do type casts on jumps and function
 entries?

 This is the original commit I wrote for tracking STG reg liveness:
 4384e146640230399b38cd62e8e5df391f72c3a7
 This is the one Simon Marlow wrote to do the same but in the new code
 gen: c6a61235aa0baf6f9e8a41c5a771ccc7e32c23a5

 I'd suggest you look at these commits and they should show you where
 to get the information from. (I can't remember anymore sorry).

 Cheers,
 David

 On 16 October 2012 03:45, Geoffrey Mainland mainl...@apeiron.net
 wrote:
 Hi all,

 I'm working on changing GHC's calling convention to support overlapping
 register classes. On x86-64 this will mean that a function can receive
 up
 to
 six Float/Double arguments (any mixture) in registers. Right now only
 two
 Double arguments can be passed in registers on x86-64, even if a
 function
 takes zero Float arguments---the register classes for Floats and
 Doubles
 cannot overlap even though both are passed in xmm* registers.

 This is working fine with the native back-end, but I'm not sure how to
 get
 it working with the LLVM back-end. Right now LLVM translates a Cmm
 procedure
 to an LLVM function of a single universal type( that is, all LLVM
 functions
 that the LLVM back-end produces for Cmm procedures have the same type)
 that
 takes all STG registers as arguments. A Cmm procedure call passes all
 the
 STG registers, although the back-end takes advantage of the liveness
 information attached to Cmm jumps to pass undefined values for non-live
 registers.

 Now that register classes can overlap, I need to change this. Since
 jumps
 have liveness information attached, I can simply pass the live
 registers.
 But when translating Cmm procedures, I need to know which registers are
 live
 on entry to the procedure.

 The slightly longer-term goal is to add support for passing SSE vectors
 in
 registers. What I'd like to have ideally is the set of live registers
 *and
 their Cmm types* at each procedure entry and jump. I envision having a
 single STG register class, say X16, for all 128-bit-wide SSE registers,
 but
 I'd like the Cmm type information when generating LLVM type signatures
 so
 I
 can generate the appropriate LLVM types---a 128-bit-wide vector of
 32-bit
 integers does not have the same type as a 128-bit-wide vector of double
 precision floats.

 I might be able to do without the Cmm type information by inserting
 appropriate casts in the generated LLVM code

[commit: ghc] master: fix obvious typos (b7fbf3a)

2012-10-12 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/b7fbf3a11ed939f6758fb6c5ef55d577351523e2

---

commit b7fbf3a11ed939f6758fb6c5ef55d577351523e2
Author: Gabor Greif ggr...@gmail.com
Date:   Fri Oct 12 09:40:09 2012 +0200

fix obvious typos

these can go into the release 7.6.2 too, I guess

---

 docs/users_guide/glasgow_exts.xml |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/docs/users_guide/glasgow_exts.xml 
b/docs/users_guide/glasgow_exts.xml
index f574199..541b309 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -632,7 +632,7 @@ type Typ
 data TypView = Unit
  | Arrow Typ Typ
 
-view :: Type - TypeView
+view :: Typ - TypView
 
 -- additional operations for constructing Typ's ...
 /programlisting



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: Fix typo in the documentation of CApiFFI (fc8f9c1)

2012-10-02 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/fc8f9c1be4f05ddf58c128ecca7213351765168b

---

commit fc8f9c1be4f05ddf58c128ecca7213351765168b
Author: shelarcy shela...@gmail.com
Date:   Tue Oct 2 17:10:13 2012 +0900

Fix typo in the documentation of CApiFFI

Signed-off-by: Gabor Greif ggr...@gmail.com

---

 docs/users_guide/ffi-chap.xml |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/docs/users_guide/ffi-chap.xml b/docs/users_guide/ffi-chap.xml
index 2425d82..e778c03 100644
--- a/docs/users_guide/ffi-chap.xml
+++ b/docs/users_guide/ffi-chap.xml
@@ -164,7 +164,7 @@ foreign import ccall interruptible
   sect2 id=ffi-capi
 titleThe CAPI calling convention/title
 para
-  The literalCAPI/literal extension allows a calling
+  The literalCApiFFI/literal extension allows a calling
   convention of literalcapi/literal to be used in foreign
   declarations, e.g.
 



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [PATCH] Fix typo in the documentation of CApiFFI

2012-10-02 Thread Gabor Greif
done in commit fc8f9c1be4f05ddf58c128ecca7213351765168b.

Thanks!

 Gabor

On 10/2/12, shelarcy shela...@gmail.com wrote:
 Hello,

 GHC HEAD and 7.6.1 User's Guide 8.1.5. The CAPI calling convention
 section describes wrong extention name.

 So, I made patch to fix that.

 Best Regards,

 --
 shelarcy shelarcyhotmail.co.jp
 http://page.freett.com/shelarcy/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[Q] Potential confusion in docs

2012-10-02 Thread Gabor Greif
Which is correct: to0 or to ?

$ git grep map to genum
docs/users_guide/glasgow_exts.xml:enum = map to genum
$ git grep map to0 genum
docs/users_guide/glasgow_exts.xml:the default implementation
literalmap to0 genum/literal is filled-in,

It appears that to0 is the correct one grepping the GHC sources, but
who knows...

Should this be corrected?

Cheers,

Gabor

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [commit: ghc] master: whitespace and panic message fixup (254f1a6)

2012-09-24 Thread Gabor Greif
Hi Simon,


 -getCondCode other = pprPanic getCondCode(2)(x86,sparc) (ppr other)
 +getCondCode other = pprPanic getCondCode(2)(x86,x96_64) (ppr other)

'x96_64' sounds wrong...

Cheers,

Gabor

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: typo (0678289)

2012-09-17 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/067828956acdcb046c0640568638fbc496eda9f3

---

commit 067828956acdcb046c0640568638fbc496eda9f3
Author: Gabor Greif ggr...@gmail.com
Date:   Mon Sep 17 16:10:47 2012 +0200

typo

---

 compiler/ghci/Linker.lhs |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/compiler/ghci/Linker.lhs b/compiler/ghci/Linker.lhs
index 565cf0b..6b47db3 100644
--- a/compiler/ghci/Linker.lhs
+++ b/compiler/ghci/Linker.lhs
@@ -772,7 +772,7 @@ dynLinkObjs dflags pls objs = do
 
 mapM_ loadObj (map nameOfObject unlinkeds)
 
--- Link the all together
+-- Link them all together
 ok - resolveObjs
 
 -- If resolving failed, unload all our



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] cross-compiler-alienless: Checkpointing some makefile simplifications that I attempted. (a18f009)

2012-09-13 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : cross-compiler-alienless

http://hackage.haskell.org/trac/ghc/changeset/a18f0096c6c9b1d649067fc73c04f43fef7bef82

---

commit a18f0096c6c9b1d649067fc73c04f43fef7bef82
Author: Gabor Greif ggr...@gmail.com
Date:   Thu Sep 13 14:02:41 2012 +0200

Checkpointing some makefile simplifications that I attempted.

This is not in a working state yet, as we are trying to build
something that goes into the build/ dir but it is not yet
created. Not sure how to add dependency tracking properly.

Btw., Ian is working in this area on the master branch so
there will be a bunch of conflicts anyway :-(

---

 includes/ghc.mk |   44 +++-
 1 files changed, 11 insertions(+), 33 deletions(-)

diff --git a/includes/ghc.mk b/includes/ghc.mk
index b41f92e..5b7bd51 100644
--- a/includes/ghc.mk
+++ b/includes/ghc.mk
@@ -141,8 +141,13 @@ DerivedConstants.h :
 else
 
 includes_dist-derivedconstants_CC_OPTS = -Iincludes/dist-derivedconstants/build
+includes_dist-derivedconstants_C_SRCS = mkDerivedConstants.c
+includes_dist-derivedconstants_PROG   = mkDerivedConstants$(exeext)
 
 ifeq $(BuildingCrossCompiler)-$(AlienScript) YES-
+includes/dist-derivedconstants/build/Capability.cross.h \
+includes/dist-derivedconstants/build/Rts.cross.h: $(includes_H_CONFIG) 
$(includes_H_PLATFORM) $(includes_H_FILES) $$(rts_H_FILES)
+
 includes/dist-derivedconstants/build/Capability.cross.h: rts/Capability.h | 
$$(dir $$@)/.
$(CC_STAGE1) -E -DPROFILING -DTHREADED_RTS $(CONF_CPP_OPTS_STAGE1) 
$(rts_CC_OPTS) $  $@
 includes/dist-derivedconstants/build/Rts.cross.h: includes/Rts.h | $$(dir 
$$@)/.
@@ -155,17 +160,7 @@ 
includes/dist-derivedconstants/build/mkDerivedConstants.cross.o: includes/dist-d
 includes/dist-derivedconstants/build/SizeMacros.h: 
includes/mkSizeMacros.cross.awk
 includes/dist-derivedconstants/build/SizeMacros.h: 
includes/dist-derivedconstants/build/mkDerivedConstants.cross.o | $$(dir $$@)/.
$(NM) $ | $(SORT) | awk -f includes/mkSizeMacros.cross.awk  $@
-
-includes_dist-derivedconstants_C_SRCS = mkDerivedConstants.c
 # XXX NM_STAGE1 AWK
-includes_dist-derivedconstants_PROG   = mkDerivedConstants$(exeext)
-
-includes/dist-derivedconstants/build/mkDerivedConstants$(exeext) : 
includes/dist-derivedconstants/build/SizeMacros.h
-includes/dist-derivedconstants/build/mkDerivedConstants$(exeext) : 
includes/mkDerivedConstants.c
-   $(CC_STAGE0) $(includes_dist-derivedconstants_CC_OPTS) 
$(CONF_CPP_OPTS_STAGE0) $(rts_CC_OPTS) $(includes_CC_OPTS) $ -o $@
-
-$(INPLACE_BIN)/mkDerivedConstants$(exeext) : 
includes/dist-derivedconstants/build/mkDerivedConstants$(exeext)
-   $(CP) $ $@
 else
 includes/dist-derivedconstants/build/SizeMacros.h : | $$(dir $$@)/.
@echo #define OFFSET(s_type, field) ((size_t)(((s_type*)0)-field)) 
 $@
@@ -184,14 +179,6 @@ includes/dist-derivedconstants/build/SizeMacros.h : | 
$$(dir $$@)/.
@echo #define b_bitmap b.bitmap  $@
@echo  $@
 
-includes_dist-derivedconstants_C_SRCS = mkDerivedConstants.c
-includes_dist-derivedconstants_PROG   = mkDerivedConstants$(exeext)
-
-$(eval $(call build-prog,includes,dist-derivedconstants,0))
-
-$(includes_dist-derivedconstants_depfile_c_asm) : $(includes_H_CONFIG) 
$(includes_H_PLATFORM) $(includes_H_FILES) $$(rts_H_FILES)
-includes/dist-derivedconstants/build/mkDerivedConstants.o : 
includes/dist-derivedconstants/build/SizeMacros.h $(includes_H_CONFIG) 
$(includes_H_PLATFORM)
-
 ifneq $(AlienScript) 
 $(INPLACE_BIN)/mkDerivedConstants$(exeext): 
includes/$(includes_dist-derivedconstants_C_SRCS) | $$(dir $$@)/.
$(WhatGccIsCalled) -o $@ $ $(CFLAGS) $(includes_CC_OPTS)
@@ -199,6 +186,9 @@ endif
 endif
 
 ifneq $(BINDIST) YES
+$(includes_dist-derivedconstants_depfile_c_asm) : | 
includes/dist-derivedconstants/build/SizeMacros.h
+$(includes_dist-derivedconstants_depfile_c_asm) : $(includes_H_CONFIG) 
$(includes_H_PLATFORM) $(includes_H_FILES) $$(rts_H_FILES)
+$(eval $(call build-prog,includes,dist-derivedconstants,0))
 $(includes_DERIVEDCONSTANTS) : $(INPLACE_BIN)/mkDerivedConstants$(exeext) | 
$$(dir $$@)/.
 ifeq $(AlienScript) 
./$ $@
@@ -222,25 +212,14 @@ $(includes_GHCCONSTANTS) :
 
 else
 
+ifneq $(BINDIST) YES
 includes_dist-ghcconstants_CC_OPTS = -DGEN_HASKELL 
-Iincludes/dist-derivedconstants/build
-
-ifeq $(BuildingCrossCompiler)-$(AlienScript) YES-
-includes/dist-ghcconstants/build/mkDerivedConstants$(exeext) : 
includes/dist-derivedconstants/build/SizeMacros.h
-includes/dist-ghcconstants/build/mkDerivedConstants$(exeext) : 
includes/mkDerivedConstants.c | $$(dir $$@)/.
-   $(CC_STAGE0) $(includes_dist-ghcconstants_CC_OPTS) 
$(CONF_CPP_OPTS_STAGE0) $(rts_CC_OPTS) $(includes_CC_OPTS) $ -o $@
-$(INPLACE_BIN)/mkGHCConstants$(exeext) : 
includes/dist-ghcconstants

Re: [commit: ghc] cross-compiler-alienless: Checkpointing some makefile simplifications that I attempted. (a18f009)

2012-09-13 Thread Gabor Greif
On 9/13/12, Ian Lynagh i...@well-typed.com wrote:
 On Thu, Sep 13, 2012 at 05:12:56AM -0700, Gabor Greif wrote:

 Btw., Ian is working in this area on the master branch so
 there will be a bunch of conflicts anyway :-(

 Sorry, I hadn't realised you were working on this in a branch. If
 merging your changes to master is possible (i.e. if they don't break the
 build, even if what they add isn't actually used yet) then I'd recommend
 doing that, to avoid conflicts.

No worries, I like the direction you going :-)
I just cannot work full time on the branch (mere few hours a week),
so I am always lagging behind. You guys are a productive bunch...



 It's starting to feel like we're close to a full cross-compilation
 compiler, incidentally. I'm currently working on getting all the
 platform-specific values into a platformConstants file, which is read by
 the compiler at run-time. Once that's done, modulo a handful of bits of

That is fine, as my branch's main contribution is to interrogate a cross-gcc
about what those constants are, and to make them available to
mkDerivedConstants.c.

Did you look into the mechanism how this is done? In short, I create an .o file
that has objects whose *size* equals the platform constants. I extract the sizes
via 'nm' and create the SizeMacros.h. This in turn gets included by
mkDerivedConstants.c.

 CPP etc that remain, it ought to be possible to make a single-platform
 cross-compiler simply by substituting the 'settings' and
 'platformConstants' files with those from another platform. In reality,
 we'll probably find more places where target = host assumptions are
 getting baked in, but we'll have to deal with those when we come to
 them.

Yes.


 The other half of the puzzle (perhaps what you're looking at) is
 altering the build system to be able to (a) generate 'settings' and
 'platformConstants' files for platforms other than host, and (b) build

Yes. See above.

 for multiple platforms in a single tree. I suspect that (a) means

Actually, I am happy with one HOST != TARGET platform per GHC already.

 getting rid of mkDerivedConstants, and using a configure script instead,
 but I haven't really thought about this half yet.

Yes, this is part of the plan, but can probably wait. Passing around the
autoconf cache file to sub-configures is probably more lucrative short-term.

Cheers,

Gabor



 Thanks
 Ian



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [Haskell] ANNOUNCE: GHC version 7.6.1

2012-09-09 Thread Gabor Greif
And there was this c-vs-c comment from (IIRC) axman on the #ghc IRC channel:

 class Category (c :: k - k - *) where
   type Ob c :: k - Constraint
   id :: Ob c a = c a a
   (.) :: (Ob c a, Ob c b, Ob c c) = c b c - c a b - c a c

This is pretty confusing for anybody whose brain does not yet
instantly 'autocorrect' these kinds of mistakes.

Cheers,

Gabor

On 9/7/12, Simon Peyton-Jones simo...@microsoft.com wrote:
 Yes, it should be 'z', as you say. Paolo, could you fix this typo please?

 Thanks

 Simon

 |  -Original Message-
 |  From: haskell-boun...@haskell.org [mailto:haskell-boun...@haskell.org]
 On
 |  Behalf Of Bas van Dijk
 |  Sent: 07 September 2012 10:01
 |  To: hask...@haskell.org; glasgow-haskell-us...@haskell.org
 |  Subject: Re: [Haskell] ANNOUNCE: GHC version 7.6.1
 |
 |  On 6 September 2012 18:05, Ian Lynagh i...@well-typed.com wrote:
 |   The GHC Team is pleased to announce a new major release of GHC, 7.6.1.
 |
 |  Great!
 |
 | * It is now possible to defer type errors until runtime using the
 |   -fdefer-type-errors flag.
 |
 |  In section 7.13.1 it says:
 |
 |  ...given the following code:
 |
 |  x :: Int
 |  x = 0
 |
 |  y :: Char
 |  y = x
 |
 |  z :: Int
 |  z = y
 |
 |  evaluating x will result in a runtime type error.
 |
 |  Shouldn't this be:
 |
 |  evaluating z will result in a runtime type error.
 |
 |  Cheers,
 |
 |  Bas
 |
 |  ___
 |  Haskell mailing list
 |  hask...@haskell.org
 |  http://www.haskell.org/mailman/listinfo/haskell



 ___
 Cvs-ghc mailing list
 Cvs-ghc@haskell.org
 http://www.haskell.org/mailman/listinfo/cvs-ghc


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] cross-compiler-alienless: employ make variable BuildingCrossCompiler in all relevant places (78bea85)

2012-08-31 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : cross-compiler-alienless

http://hackage.haskell.org/trac/ghc/changeset/78bea858089392ee404674bad97d11b8c2a25c20

---

commit 78bea858089392ee404674bad97d11b8c2a25c20
Author: Gabor Greif ggr...@gmail.com
Date:   Fri Aug 31 11:14:20 2012 +0200

employ make variable BuildingCrossCompiler in all relevant places

---

 ghc/ghc.mk  |6 +++---
 libffi/ghc.mk   |4 ++--
 rules/build-dependencies.mk |4 ++--
 rules/build-package-data.mk |4 ++--
 rules/cross-compiling.mk|   24 
 rules/distdir-way-opts.mk   |4 ++--
 rules/hs-suffix-rules-srcdir.mk |2 +-
 rules/shell-wrapper.mk  |4 ++--
 8 files changed, 14 insertions(+), 38 deletions(-)

diff --git a/ghc/ghc.mk b/ghc/ghc.mk
index c78fa3b..12b837c 100644
--- a/ghc/ghc.mk
+++ b/ghc/ghc.mk
@@ -45,7 +45,7 @@ ghc_stage1_C_FILES_NODEPS = ghc/hschooks.c
 
 ghc_stage2_MKDEPENDC_OPTS = -DMAKING_GHC_BUILD_SYSTEM_DEPENDENCIES
 ghc_stage3_MKDEPENDC_OPTS = -DMAKING_GHC_BUILD_SYSTEM_DEPENDENCIES
-ifneq $(TARGETPLATFORM) $(HOSTPLATFORM)
+ifeq $(BuildingCrossCompiler) YES
 ghc_stage2_MKDEPENDC_OPTS += -DCOMPILING_GHC
 endif
 
@@ -77,7 +77,7 @@ ghc_stage3_PROG = ghc-stage3$(exeext)
 ghc_stage1_SHELL_WRAPPER = YES
 ghc_stage2_SHELL_WRAPPER = YES
 ghc_stage3_SHELL_WRAPPER = YES
-ifneq $(TARGETPLATFORM) $(HOSTPLATFORM)
+ifeq $(BuildingCrossCompiler) YES
 ghc_stage1_SHELL_WRAPPER_NAME = ghc/ghc-cross.wrapper
 ghc_stage2_SHELL_WRAPPER_NAME = ghc/ghc-cross.wrapper
 else
@@ -100,7 +100,7 @@ ifneq $(filter-out 1,$(stage)) 
 ghc_stage1_NOT_NEEDED = YES
 endif
 
-ifneq $(TARGETPLATFORM) $(HOSTPLATFORM)
+ifeq $(BuildingCrossCompiler) YES
 ghc_stage2_NOT_NEEDED = YES
 ghc_stage3_NOT_NEEDED = YES
 else
diff --git a/libffi/ghc.mk b/libffi/ghc.mk
index c5c1ff7..dad675d 100644
--- a/libffi/ghc.mk
+++ b/libffi/ghc.mk
@@ -1,6 +1,6 @@
 # -
 #
-# (c) 2009 The University of Glasgow
+# (c) 2009-2012 The University of Glasgow
 #
 # This file is part of the GHC build system.
 #
@@ -44,7 +44,7 @@ endif
 
 # libffi has a different nomenclature from ours
 # regarding 'host' (our target) and 'build' (also our build)
-ifneq $(TARGETPLATFORM) $(HOSTPLATFORM)
+ifeq $(BuildingCrossCompiler) YES
 LIBFFI_PLATFORMS = --host=$(TARGETPLATFORM) --build=$(HOSTPLATFORM)
 else
 # XXX: --host=$(TARGETPLATFORM) also?
diff --git a/rules/build-dependencies.mk b/rules/build-dependencies.mk
index 867ea14..db999a3 100644
--- a/rules/build-dependencies.mk
+++ b/rules/build-dependencies.mk
@@ -1,6 +1,6 @@
 # -
 #
-# (c) 2009 The University of Glasgow
+# (c) 2009-2012 The University of Glasgow
 #
 # This file is part of the GHC build system.
 #
@@ -24,7 +24,7 @@ $1_$2_C_FILES_DEPS = $$(filter-out 
$$($1_$2_C_FILES_NODEPS),$$($1_$2_C_FILES))
 
 $1_$2_MKDEPENDHS_FLAGS = -dep-makefile $$($1_$2_depfile_haskell).tmp 
$$(foreach way,$$(filter-out v,$$($1_$2_WAYS)),-dep-suffix $$(way))
 $1_$2_MKDEPENDHS_FLAGS += -include-pkg-deps
-ifneq $(TARGETPLATFORM) $(HOSTPLATFORM)
+ifeq $(BuildingCrossCompiler) YES
 $1_$2_MKDEPENDHS_FLAGS += -DCOMPILING_GHC
 endif
 
diff --git a/rules/build-package-data.mk b/rules/build-package-data.mk
index 34f09a0..92e0413 100644
--- a/rules/build-package-data.mk
+++ b/rules/build-package-data.mk
@@ -1,6 +1,6 @@
 # -
 #
-# (c) 2009 The University of Glasgow
+# (c) 2009-2012 The University of Glasgow
 #
 # This file is part of the GHC build system.
 #
@@ -64,7 +64,7 @@ $1_$2_CONFIGURE_OPTS += $$(BOOT_PKG_CONSTRAINTS)
 endif
 
 ifeq $3 1
-ifneq $(TARGETPLATFORM) $(HOSTPLATFORM)
+ifeq $(BuildingCrossCompiler) YES
 $1_$2_CONFIGURE_OPTS += --configure-option=--host=$(HOSTPLATFORM)
 $1_$2_CONFIGURE_OPTS += --configure-option=--target=$(TARGETPLATFORM)
 endif
diff --git a/rules/cross-compiling.mk b/rules/cross-compiling.mk
deleted file mode 100644
index 9f9ec6f..000
--- a/rules/cross-compiling.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-# -
-#
-# (c) 2012 The University of Glasgow
-#
-# This file is part of the GHC build system.
-#
-# To understand how the build system works and how to modify it, see
-#  http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
-#  http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
-#
-# -
-
-define cross-compiling # $1 = then, $2 = else, $3 = then, ...
-ifneq $(TARGETPLATFORM) $(HOSTPLATFORM)
-ifneq $(BUILDPLATFORM) $(HOSTPLATFORM)
-$(warning When cross-compiling, the build and host platforms must

Warnings in RTS

2012-08-31 Thread Gabor Greif
I am seeing these warnings:

rts/Interpreter.c: In function `interpretBCO':
rts/Interpreter.c:1410:0:  warning: value computed is not used
rts/Interpreter.c:1411:0:  warning: value computed is not used

rts/sm/Sanity.c: In function `memInventory':
rts/sm/Sanity.c:857:0:  warning: value computed is not used


Should apply the obvious fixes and push?

Cheers,

Gabor

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] cross-compiler-alienless: cross compiler is placed in stage1, no need for this wrapper name (df53a4d)

2012-08-31 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : cross-compiler-alienless

http://hackage.haskell.org/trac/ghc/changeset/df53a4d5eaac320c0876a083e40c5d14c1d87238

---

commit df53a4d5eaac320c0876a083e40c5d14c1d87238
Author: Gabor Greif ggr...@gmail.com
Date:   Fri Aug 31 14:32:43 2012 +0200

cross compiler is placed in stage1, no need for this wrapper name

---

 ghc/ghc.mk |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/ghc/ghc.mk b/ghc/ghc.mk
index 12b837c..43484e6 100644
--- a/ghc/ghc.mk
+++ b/ghc/ghc.mk
@@ -79,7 +79,6 @@ ghc_stage2_SHELL_WRAPPER = YES
 ghc_stage3_SHELL_WRAPPER = YES
 ifeq $(BuildingCrossCompiler) YES
 ghc_stage1_SHELL_WRAPPER_NAME = ghc/ghc-cross.wrapper
-ghc_stage2_SHELL_WRAPPER_NAME = ghc/ghc-cross.wrapper
 else
 ghc_stage1_SHELL_WRAPPER_NAME = ghc/ghc.wrapper
 ghc_stage2_SHELL_WRAPPER_NAME = ghc/ghc.wrapper



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] cross-compiler-alienless: make sure that the C compiler is noted in the cross-ghc's wrapper (420aff3)

2012-08-31 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : cross-compiler-alienless

http://hackage.haskell.org/trac/ghc/changeset/420aff3ab85d9b0102de636de3244d9d1fa68abc

---

commit 420aff3ab85d9b0102de636de3244d9d1fa68abc
Author: Gabor Greif ggr...@gmail.com
Date:   Fri Aug 31 14:34:44 2012 +0200

make sure that the C compiler is noted in the cross-ghc's wrapper

---

 rules/shell-wrapper.mk |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/rules/shell-wrapper.mk b/rules/shell-wrapper.mk
index 2f27357..55eabfa 100644
--- a/rules/shell-wrapper.mk
+++ b/rules/shell-wrapper.mk
@@ -36,8 +36,10 @@ all_$1_$2 : $$(INPLACE_BIN)/$$($1_$2_PROG)
 
 ifeq $(BuildingCrossCompiler) YES
 $1_$2_PGMGCC = $$(CC_STAGE1)
+$1_$2_INSTALL_CROSS_SHELL_WRAPPER_EXTRA = (echo 'pgmgcc=$$($1_$2_PGMGCC)'; 
echo)
 else
 $1_$2_PGMGCC = $$(WhatGccIsCalled)
+$1_$2_INSTALL_CROSS_SHELL_WRAPPER_EXTRA = echo
 endif
 
 
@@ -83,6 +85,7 @@ install_$1_$2_wrapper:
echo 'topdir=$$(topdir)'
$$(WRAPPER)
$$($1_$2_SHELL_WRAPPER_EXTRA)
$$($1_$2_INSTALL_SHELL_WRAPPER_EXTRA)
+   $$($1_$2_INSTALL_CROSS_SHELL_WRAPPER_EXTRA)   
$$(WRAPPER)
cat $$($1_$2_SHELL_WRAPPER_NAME)  
$$(WRAPPER)
$$(EXECUTABLE_FILE) 
$$(WRAPPER)
 



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: make sure to remove the right link before calling 'ln -s' (could we use 'ln -sf'?) (b660cc0)

2012-08-30 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/b660cc0b3f6ea09ecc7f8fdef9ac79704c3ccaf0

---

commit b660cc0b3f6ea09ecc7f8fdef9ac79704c3ccaf0
Author: Gabor Greif ggr...@gmail.com
Date:   Thu Aug 30 15:02:56 2012 +0200

make sure to remove the right link before calling 'ln -s' (could we use 'ln 
-sf'?)

---

 ghc/ghc.mk   |4 ++--
 utils/ghc-pkg/ghc.mk |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ghc/ghc.mk b/ghc/ghc.mk
index a13f03b..c45e288 100644
--- a/ghc/ghc.mk
+++ b/ghc/ghc.mk
@@ -1,6 +1,6 @@
 # -
 #
-# (c) 2009 The University of Glasgow
+# (c) 2009-2012 The University of Glasgow
 #
 # This file is part of the GHC build system.
 #
@@ -159,7 +159,7 @@ ifeq $(Windows) NO
 install: install_ghc_link
 .PHONY: install_ghc_link
 install_ghc_link: 
-   $(call removeFiles,$(DESTDIR)$(bindir)/ghc)
+   $(call removeFiles,$(DESTDIR)$(bindir)/$(CrossCompilePrefix)ghc)
$(LN_S) $(CrossCompilePrefix)ghc-$(ProjectVersion) 
$(DESTDIR)$(bindir)/$(CrossCompilePrefix)ghc
 else
 # On Windows we install the main binary as $(bindir)/ghc.exe
diff --git a/utils/ghc-pkg/ghc.mk b/utils/ghc-pkg/ghc.mk
index 8ec3fd0..ba553d2 100644
--- a/utils/ghc-pkg/ghc.mk
+++ b/utils/ghc-pkg/ghc.mk
@@ -1,6 +1,6 @@
 # -
 #
-# (c) 2009 The University of Glasgow
+# (c) 2009-2012 The University of Glasgow
 #
 # This file is part of the GHC build system.
 #
@@ -116,7 +116,7 @@ install: install_utils/ghc-pkg_link
 .PHONY: install_utils/ghc-pkg_link
 install_utils/ghc-pkg_link: 
$(call INSTALL_DIR,$(DESTDIR)$(bindir))
-   $(call removeFiles,$(DESTDIR)$(bindir)/ghc-pkg)
+   $(call removeFiles,$(DESTDIR)$(bindir)/$(CrossCompilePrefix)ghc-pkg)
$(LN_S) $(CrossCompilePrefix)ghc-pkg-$(ProjectVersion) 
$(DESTDIR)$(bindir)/$(CrossCompilePrefix)ghc-pkg
 endif
 



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] cross-compiler-alienless: Merge branch 'master' of https://github.com/ghc/ghc into cross-compiler-alienless (b8f6e55)

2012-08-30 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : cross-compiler-alienless

http://hackage.haskell.org/trac/ghc/changeset/b8f6e55ec9fcdf44cff96b57e523e94c6c4cf9ba

---

commit b8f6e55ec9fcdf44cff96b57e523e94c6c4cf9ba
Merge: 90f7395... 4eb02c1...
Author: Gabor Greif ggr...@gmail.com
Date:   Mon Aug 27 14:46:40 2012 +0200

Merge branch 'master' of https://github.com/ghc/ghc into 
cross-compiler-alienless

 aclocal.m4 |   16 +-
 compiler/basicTypes/BasicTypes.lhs |2 +-
 compiler/basicTypes/RdrName.lhs|   21 +-
 compiler/cmm/Cmm.hs|   15 +-
 compiler/cmm/CmmBuildInfoTables.hs |   99 ++--
 compiler/cmm/CmmCallConv.hs|   52 +-
 compiler/cmm/CmmContFlowOpt.hs |   95 +++-
 compiler/cmm/CmmCvt.hs |2 +-
 compiler/cmm/CmmExpr.hs|2 +
 compiler/cmm/CmmInfo.hs|  110 +++--
 compiler/cmm/CmmLayoutStack.hs |  153 --
 compiler/cmm/CmmLint.hs|6 +-
 compiler/cmm/CmmMachOp.hs  |8 +-
 compiler/cmm/CmmNode.hs|   36 +-
 compiler/cmm/CmmOpt.hs |   22 +-
 compiler/cmm/CmmParse.y|9 +-
 compiler/cmm/CmmPipeline.hs|  145 --
 compiler/cmm/CmmProcPoint.hs   |   26 +-
 compiler/cmm/CmmRewriteAssignments.hs  |   29 +-
 compiler/cmm/CmmSink.hs|  580 ++--
 compiler/cmm/MkGraph.hs|  232 +
 compiler/cmm/OldCmm.hs |   20 +-
 compiler/cmm/PprC.hs   |4 +-
 compiler/cmm/PprCmm.hs |2 +-
 compiler/cmm/PprCmmDecl.hs |2 -
 compiler/codeGen/CgCallConv.hs |   76 ++--
 compiler/codeGen/CgClosure.lhs |   19 +-
 compiler/codeGen/CgCon.lhs |   13 +-
 compiler/codeGen/CgForeignCall.hs  |6 +-
 compiler/codeGen/CgHeapery.lhs |   12 +-
 compiler/codeGen/CgInfoTbls.hs |   26 +-
 compiler/codeGen/CgMonad.lhs   |   13 +-
 compiler/codeGen/CgTailCall.lhs|   14 +-
 compiler/codeGen/CgUtils.hs|  255 ++---
 compiler/codeGen/ClosureInfo.lhs   |   37 +-
 compiler/codeGen/CodeGen/Platform.hs   |   67 +++
 compiler/codeGen/CodeGen/Platform/ARM.hs   |9 +
 compiler/codeGen/CodeGen/Platform/NoRegs.hs|8 +
 compiler/codeGen/CodeGen/Platform/PPC.hs   |9 +
 compiler/codeGen/CodeGen/Platform/PPC_Darwin.hs|   10 +
 compiler/codeGen/CodeGen/Platform/SPARC.hs |9 +
 compiler/codeGen/CodeGen/Platform/X86.hs   |9 +
 compiler/codeGen/CodeGen/Platform/X86_64.hs|9 +
 compiler/codeGen/StgCmm.hs |  129 ++---
 compiler/codeGen/StgCmmBind.hs |  525 ++
 compiler/codeGen/StgCmmClosure.hs  |   55 +-
 compiler/codeGen/StgCmmCon.hs  |   71 ++-
 compiler/codeGen/StgCmmEnv.hs  |   29 +-
 compiler/codeGen/StgCmmExpr.hs |  415 +++
 compiler/codeGen/StgCmmForeign.hs  |   38 +-
 compiler/codeGen/StgCmmHeap.hs |  185 ---
 compiler/codeGen/StgCmmLayout.hs   |   59 ++-
 compiler/codeGen/StgCmmMonad.hs|  206 +---
 compiler/codeGen/StgCmmPrim.hs |2 +-
 compiler/codeGen/StgCmmProf.hs |   46 +-
 compiler/codeGen/StgCmmUtils.hs|  498 +++--
 compiler/coreSyn/CoreSyn.lhs   |   13 +
 compiler/coreSyn/CoreUtils.lhs |2 +-
 compiler/coreSyn/MkCore.lhs|6 +-
 compiler/coreSyn/TrieMap.lhs   |  111 -
 compiler/deSugar/Coverage.lhs  |   98 +++--
 compiler/deSugar/Desugar.lhs   |3 +-
 compiler/deSugar/DsMeta.hs |  253 ++
 compiler/ghc.cabal.in  |8 +
 compiler/ghc.mk|   14 -
 compiler/hsSyn/Convert.lhs |   92 ++-
 compiler/hsSyn/HsExpr.lhs  |2 +-
 compiler/hsSyn/HsSyn.lhs   |   77 ++--
 compiler/iface/BinIface.hs |5 +-
 compiler/iface/MkIface.lhs |   15 +-
 compiler/llvmGen/LlvmCodeGen.hs

[commit: ghc] cross-compiler-alienless: Merge branch 'master' of https://github.com/ghc/ghc into cross-compiler-alienless (c7ec369)

2012-08-30 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : cross-compiler-alienless

http://hackage.haskell.org/trac/ghc/changeset/c7ec369af4ce00476090f02c3f374a081eb5a71b

---

commit c7ec369af4ce00476090f02c3f374a081eb5a71b
Merge: 6741921... b660cc0...
Author: Gabor Greif ggr...@gmail.com
Date:   Thu Aug 30 15:06:24 2012 +0200

Merge branch 'master' of https://github.com/ghc/ghc into 
cross-compiler-alienless

 ghc/ghc.mk   |4 ++--
 utils/ghc-pkg/ghc.mk |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)




___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] cross-compiler-alienless's head updated: Merge branch 'master' of https://github.com/ghc/ghc into cross-compiler-alienless (c7ec369)

2012-08-30 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

Branch 'cross-compiler-alienless' now includes:

 1d094f9... Remove nativeGen/PprInstruction.hs
 cc3d982... Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
 6c2c07c... bugfix: cope when a source reg is dead at a join point
 f68b427... Fixes for the stack layout algorithm to handle join points
 fe3753e... Merge sinking and inlining to get better results.
 f1ed6a1... New codegen: do not split proc-points when using the NCG
 1cea9a5... optimise away some unnecessary stack checks
 a4b249c... Small optimisation to the code generated for CAFs
 e26161f... no need to removeUnreachableBlocks
 9388337... bug fixes for the sinker
 a2e0fbe... bug fix for control-flow optimisation
 a0020c1... fix merge bugs
 8b31090... fix warnings
 a25c974... fix haddock parse error
 6f346d4... Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
 9e7acbe... Fix compile on linux-powerpc64. (#7084).
 598ee1a... Fix #7087 (integer overflow in getDelayTarget())
 d236142... Improve code generated when real registers are clobbered
 6ede006... Explicitly share some return continuations
 7930221... Don't shortcut call-returns when not splitting proc points
 dae976c... add a sinking pass before stack layout (currently disabled)
 08c16ba... Code reformatting
 a915d9b... Inline into the last node
 40b6598... Improve accuracy of memory conflict tracking
 325f2f3... Disable the mini-inliner when using the new codegen
 9568636... No need to do removeDeadAssignments, just do cmmLiveness instead
 3ae875c... Eliminate r = r assignments.
 4aaa3c1... fix a bug in the inliner
 46adcee... comment wibble
 15e4f93... applying simonpj's fix from #7022 (with 80-col reformatting)
 4200c4a... FloutOut.wrapTick: don't forget to tick the args of a 
constructor app
 b11a5ef... comments and refactoring
 7974afb... Fix references to repositories in the user guide
 89900ff... Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
 0e7aad2... De-orphan the Outputable Char instance
 14b05c0... Whitespace only in hsSyn/HsSyn.lhs
 5ae0cea... Whitespace only in utils/Outputable.lhs
 be691e1... Remove another unnecessary Platform argument
 e9a587a... De-orphan the Outputable Fingerprint instance
 541cc50... Remove an unsafe use of head (#7118)
 ecc43c1... Convert prefix uses of () to infix 
 2d2650b... Move linker flags into the settings file; fixes #4862
 c17f301... Remove LD_X; it's no longer used
 ddf9d40... Build fix
 34b2906... Whitespace only in compiler/simplCore/Simplify.lhs
 52307c1... Rename trace_dump to dump
 13f3a31... Remove pprDefiniteTrace
 c9820b2... Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
 1235c27... Improve some code layout in SysTools
 668151c... More more ld-related settings into the settings file
 c7c2d6c... Whitespace only in UniqFM
 4cdfe67... Define LdCmd in the bindist configure.ac
 5620662... finish a comment
 290ec75... Add a comment to explain why the FCode monad is lazy
 6228e31... Use ReturnedTo when generating safe foreign calls
 22d5822... Foreign calls may clobber caller-saves registers
 f67a8b8... Continue by jumping to the top-of-stack after a safe foreign 
call
 82fa790... Fix two bugs in the sinker.
 cf3fb95... MO_F_Mul and MO_F_Add are commutative
 7db26e0... comment
 190c555... fix warning
 6997bb5... Don't define STOLEN_X86_REGS in Cmm.h
 8e7fb28... Start separating out the RTS and Haskell imports of MachRegs.h
 e6ef5ab... Make tablesNextToCode dynamic
 f917eeb... Add Unregisterised as a field in the settings file
 46b5c19... Define callerSaves for all platforms
 8d3e9fd... small cleanup
 0b75e45... Generate one fewer temps per heap allocation
 b534f42... Make lint check for undefined variables in Cmm
 149e04b... A closure with void args only should be a function, not a thunk
 ddd6af0... Cleanup and fixes to profiling
 5c3f13f... Fix update frames for profiling
 3cf6050... fix maybeSaveCostCentre: cases were reversed
 bccd9e8... Add missing cases in hand-coded instance Eq GlobalReg
 1469a12... Node calling convs should use R1 even if it isn't a register
 df7a20c... Eliminate r = r in mkAssign
 313740e... fix a warning
 ef58afe... Small optimisation
 babe3c6... entryHeapCheck: fix calls to stg_gc_fun and stg_gc_enter_1
 69cda9e... maybeInvertComparison: remove floating-point comparisons
 396f090... Fix a bug in the handling of recent_activity
 62ab993... fix warning
 1edad87... Add missing flag for respecting EXTRA_LIBDIR
 c2a532a... Set the value of Unregisterised in the bindist configure.ac
 415598b... Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
 50f5016... Add cast to placate gcc 4.6 

[commit: ghc] master: v7.4.1 is required for building, so we can drop the v7.2.1 workaround (bcef1e28)

2012-08-29 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/bcef1e2847ce009f0b139abce1fb664733768c50

---

commit bcef1e2847ce009f0b139abce1fb664733768c50
Author: Gabor Greif ggr...@gmail.com
Date:   Wed Aug 29 14:47:02 2012 +0200

v7.4.1 is required for building, so we can drop the v7.2.1 workaround

---

 mk/config.mk.in |   10 --
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/mk/config.mk.in b/mk/config.mk.in
index a3f75cd..0005ab0 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -526,16 +526,6 @@ else
 GhcCanonVersion = $(GhcMajVersion)$(GhcMinVersion)
 endif
 
-# Work around #5453, which causes the stage1 compiler to segfault when
-# built with 7.2.1.
-ifeq $(GhcVersion) 7.2.1
-CONF_HC_OPTS_STAGE0 += -fno-full-laziness
-compiler/cmm/Bitmap_HC_OPTS += -ffull-laziness
-# urgh.  Compiling cmm/Bitmap.hs with -fno-full-laziness results in 
-#   gmp: overflow in mpz type
-# for some unknown reason, so turn full-laziness back on for this module.
-endif
-
 GHC_PACKAGE_DB_FLAG = @GHC_PACKAGE_DB_FLAG@
 
 #-



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: typo (c7a7c49)

2012-07-29 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/c7a7c49a81fa92bc46d04a9200be2afc5e4d1338

---

commit c7a7c49a81fa92bc46d04a9200be2afc5e4d1338
Author: Gabor Greif ggr...@gmail.com
Date:   Tue Jul 24 13:01:08 2012 +0200

typo

---

 includes/ghc.mk |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/includes/ghc.mk b/includes/ghc.mk
index 73704b4..2cf835d 100644
--- a/includes/ghc.mk
+++ b/includes/ghc.mk
@@ -113,7 +113,7 @@ endif
@echo #define BUILD_VENDOR  \$(HostVendor_CPP)\  $@
@echo #define HOST_VENDOR  \$(TargetVendor_CPP)\  $@
@echo  $@
-   @echo /* These TARGET macros are for backwards compatibily... DO NOT 
USE! */  $@
+   @echo /* These TARGET macros are for backwards compatibility... DO NOT 
USE! */  $@
@echo #define TargetPlatform_TYPE $(TargetPlatform_CPP)  $@
@echo #define $(TargetPlatform_CPP)_TARGET  1  $@
@echo #define $(TargetArch_CPP)_TARGET_ARCH  1  $@



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: GHCConstants.h should not contain preprocessor definitions (ab14d99)

2012-07-29 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/ab14d99b524cef7fe412e30f7607fc76da72563a

---

commit ab14d99b524cef7fe412e30f7607fc76da72563a
Author: Gabor Greif ggr...@gmail.com
Date:   Fri Jul 27 23:12:49 2012 +0200

GHCConstants.h should not contain preprocessor definitions

---

 includes/mkDerivedConstants.c |   25 +
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/includes/mkDerivedConstants.c b/includes/mkDerivedConstants.c
index 4042498..3fcf128 100644
--- a/includes/mkDerivedConstants.c
+++ b/includes/mkDerivedConstants.c
@@ -79,8 +79,12 @@
 field_offset_(str(s_type,field),s_type,field);
 
 /* An access macro for use in C-- sources. */
+#if defined(GEN_HASKELL)
+#define struct_field_macro(str) /* nothing */
+#else
 #define struct_field_macro(str) \
 printf(#define  str (__ptr__)  REP_ str [__ptr__+OFFSET_ str ]\n);
+#endif
 
 /* Outputs the byte offset and MachRep for a field */
 #define struct_field(s_type, field)\
@@ -125,8 +129,12 @@
 closure_size(s_type)
 
 /* An access macro for use in C-- sources. */
+#if defined(GEN_HASKELL)
+#define closure_field_macro(str) /* nothing */
+#else
 #define closure_field_macro(str) \
 printf(#define  str (__ptr__)  REP_ str 
[__ptr__+SIZEOF_StgHeader+OFFSET_ str ]\n);
+#endif
 
 #define closure_field_offset_(str, s_type,field) \
 def_offset(str, OFFSET(s_type,field) - TYPE_SIZE(StgHeader));
@@ -134,8 +142,12 @@
 #define closure_field_offset(s_type,field) \
 closure_field_offset_(str(s_type,field),s_type,field)
 
+#if defined(GEN_HASKELL)
+#define closure_payload_macro(str) /* nothing */
+#else
 #define closure_payload_macro(str) \
 printf(#define  str (__ptr__,__ix__)  
W_[__ptr__+SIZEOF_StgHeader+OFFSET_ str  + WDS(__ix__)]\n);
+#endif
 
 #define closure_payload(s_type,field) \
 closure_field_offset_(str(s_type,field),s_type,field); \
@@ -164,26 +176,39 @@
 def_offset(str(s_type,field), OFFSET(s_type,field) - TYPE_SIZE(StgHeader) 
- TYPE_SIZE(StgTSOProfInfo));
 
 /* Full byte offset for a TSO field, for use from Cmm */
+#if defined(GEN_HASKELL)
+#define tso_field_offset_macro(str) /* nothing */
+#else
 #define tso_field_offset_macro(str) \
 printf(#define TSO_OFFSET_ str  
(SIZEOF_StgHeader+SIZEOF_OPT_StgTSOProfInfo+OFFSET_ str )\n);
+#endif
 
 #define tso_field_offset(s_type, field) \
 tso_payload_offset(s_type, field); \
 tso_field_offset_macro(str(s_type,field));
 
+#if defined(GEN_HASKELL)
+#define tso_field_macro(str) /* nothing */
+#else
 #define tso_field_macro(str) \
 printf(#define  str (__ptr__)  REP_ str [__ptr__+TSO_OFFSET_ str 
]\n)
+#endif
+
 #define tso_field(s_type, field)   \
 field_type(s_type, field); \
 tso_field_offset(s_type,field);\
 tso_field_macro(str(s_type,field))
   
+#if defined(GEN_HASKELL)
+#define opt_struct_size(s_type, option) /* nothing */
+#else
 #define opt_struct_size(s_type, option)
\
 printf(#ifdef  #option \n);\
 printf(#define SIZEOF_OPT_ #s_type  SIZEOF_ #s_type \n); \
 printf(#else\n); \
 printf(#define SIZEOF_OPT_ #s_type  0\n);  \
 printf(#endif\n\n);
+#endif
 
 #define FUN_OFFSET(sym) (OFFSET(Capability,f.sym) - OFFSET(Capability,r))
 



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: typos (93c03f8)

2012-07-29 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/93c03f84c4bfebea5faeb60d75d708a578413e4a

---

commit 93c03f84c4bfebea5faeb60d75d708a578413e4a
Author: Gabor Greif ggr...@gmail.com
Date:   Fri Jul 27 23:29:21 2012 +0200

typos

---

 rts/parallel/Pack.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rts/parallel/Pack.c b/rts/parallel/Pack.c
index fe64a75..58fe7ed 100644
--- a/rts/parallel/Pack.c
+++ b/rts/parallel/Pack.c
@@ -2801,7 +2801,7 @@ UnpackFetchMe (StgWord ***bufptrP, StgClosure **graphP) {
   ToDo: implement packing of MUT_ARRAYs
 */
 
-//@cindex UnackArray
+//@cindex UnpackArray
 static void
 UnpackArray(StgWord ***bufptrP, StgClosure *graph)
 {
@@ -2995,7 +2995,7 @@ UnpackPAP(StgWord ***bufptrP, StgClosure *graph)
//ASSERT(type==BLACKHOLE || type==CAF_BLACKHOLE || type==BLACKHOLE_BQ);
 
IF_PAR_DEBUG(pack,
-belch(*** UnackPAP @ %p: UPDATE_FRAME, 
+belch(*** UnpackPAP @ %p: UPDATE_FRAME, 
   p));
 
((StgUpdateFrame *)p)-header.info = (StgInfoTable*)*bufptr++;



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] cross-compiler-alienless: initial batch of cross compiler changes (90f7395)

2012-07-29 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : cross-compiler-alienless

http://hackage.haskell.org/trac/ghc/changeset/90f73952dd713c641ef9313e384a2f0b24fc69cb

---

commit 90f73952dd713c641ef9313e384a2f0b24fc69cb
Author: Gabor Greif ggr...@gmail.com
Date:   Mon Jul 30 00:09:39 2012 +0200

initial batch of cross compiler changes

notable missing functionality is:
  - the inclusion of the cross-gcc into the wrapper script
  - disabling of some extra packages
  - specifying linker per stage
  - some patching of libffi/.../powerpc/ffi.c

These features will be included in subsequent commits.

 aclocal.m4  |8 -
 compiler/nativeGen/PPC/Ppr.hs   |7 +++-
 configure.ac|   75 ---
 ghc.mk  |3 +-
 ghc/ghc.mk  |   15 
 includes/ghc.mk |   71 
 includes/mkDerivedConstants.c   |   41 +++--
 includes/mkSizeMacros.cross.awk |1 +
 libffi/ghc.mk   |   25 +
 mk/config.mk.in |4 +-
 rules/build-dependencies.mk |3 ++
 rules/build-package-data.mk |7 
 rules/build-package-way.mk  |2 +-
 rules/distdir-way-opts.mk   |4 ++
 rules/hs-suffix-rules-srcdir.mk |   11 --
 rules/shell-wrapper.mk  |9 -
 16 files changed, 236 insertions(+), 50 deletions(-)


Diff suppressed because of size. To see it, use:

git show 90f73952dd713c641ef9313e384a2f0b24fc69cb

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] branch 'cross-compiler-alienless' created

2012-07-29 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

New branch : cross-compiler-alienless
Referencing: 90f73952dd713c641ef9313e384a2f0b24fc69cb

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


'sizeof' infestation in rts/

2012-07-27 Thread Gabor Greif
Hi all,

this week I managed to build a cross-compiler, but on trying hello
Cross-World! I got a SEGV. After debugging it, it turned out that the
usage of sizeofW(...) is the culprit. I'll fix this on my (still
local) branch.

But...

Upon closer inspection of the rts/... files I found many uses of
sizeof(W_) which are totally cross-unfriendly.

I'd like to submit sizeof(W_) --- SIZEOF_HSWORD to master directly.

Okay to commit patches of this style (see below)?

As an extra bonus compilation will be faster, since SIZEOF_HSWORD is
resolved in the preprocessor.

Cheers,

   Gabor



-
diff --git a/rts/sm/BlockAlloc.c b/rts/sm/BlockAlloc.c
index 0b8955c..0a8b387 100644
--- a/rts/sm/BlockAlloc.c
+++ b/rts/sm/BlockAlloc.c
@@ -1,6 +1,6 @@
 /* 
-
  *
- * (c) The GHC Team 1998-2008
+ * (c) The GHC Team 1998-2012
  *
  * The block allocator and free list manager.
  *
@@ -347,7 +347,7 @@ allocGroup (nat n)
 if (ln == MAX_FREE_LIST) {
 #if 0  /* useful for debugging fragmentation */
 if ((W_)mblocks_allocated * BLOCKS_PER_MBLOCK * BLOCK_SIZE_W
- - (W_)((n_alloc_blocks - n) * BLOCK_SIZE_W) 
(2*1024*1024)/sizeof(W_)) {
+ - (W_)((n_alloc_blocks - n) * BLOCK_SIZE_W) 
(2*1024*1024)/SIZEOF_HSWORD) {
 debugBelch(Fragmentation, wanted %d blocks:, n);
 RtsFlags.DebugFlags.block_alloc = 1;
 checkFreeListSanity();

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: 'sizeof' infestation in rts/

2012-07-27 Thread Gabor Greif
Hi Simon,

thanks for the quick answer!

Sure, it can wait. Next week is fine.

The problem with 'sizeof' is that while building the cross-compiler
(on a 64-bit intel system, to be run on the same system) bakes in the
sizeof(void*) into the binary (=8), but the target system is 32-bit
only, so sizeof(void*) should be 4. This messes up all the
offset/array-size calculations in GC etc.

The value of SIZEOF_HSWORD comes from configure and correctly expands
to 4 in my case. So rts will be correctly built with the size
assumptions of the targeted platform.

Hope this explains it.

Cheers,

Gabor

On 7/27/12, Simon Marlow marlo...@gmail.com wrote:
 Please hold off on this until next week as I'm on holiday right now.
 What's the problem with sizeof?

 Cheers,
 Simon
 From: Gabor Greif
 Sent: 27/07/2012 10:05
 To: cvs-ghc; Simon Marlow
 Subject: 'sizeof' infestation in rts/
 Hi all,

 this week I managed to build a cross-compiler, but on trying hello
 Cross-World! I got a SEGV. After debugging it, it turned out that the
 usage of sizeofW(...) is the culprit. I'll fix this on my (still
 local) branch.

 But...

 Upon closer inspection of the rts/... files I found many uses of
 sizeof(W_) which are totally cross-unfriendly.

 I'd like to submit sizeof(W_) --- SIZEOF_HSWORD to master directly.

 Okay to commit patches of this style (see below)?

 As an extra bonus compilation will be faster, since SIZEOF_HSWORD is
 resolved in the preprocessor.

 Cheers,

Gabor



 -
 diff --git a/rts/sm/BlockAlloc.c b/rts/sm/BlockAlloc.c
 index 0b8955c..0a8b387 100644
 --- a/rts/sm/BlockAlloc.c
 +++ b/rts/sm/BlockAlloc.c
 @@ -1,6 +1,6 @@
  /*
 -
   *
 - * (c) The GHC Team 1998-2008
 + * (c) The GHC Team 1998-2012
   *
   * The block allocator and free list manager.
   *
 @@ -347,7 +347,7 @@ allocGroup (nat n)
  if (ln == MAX_FREE_LIST) {
  #if 0  /* useful for debugging fragmentation */
  if ((W_)mblocks_allocated * BLOCKS_PER_MBLOCK * BLOCK_SIZE_W
 - - (W_)((n_alloc_blocks - n) * BLOCK_SIZE_W) 
 (2*1024*1024)/sizeof(W_)) {
 + - (W_)((n_alloc_blocks - n) * BLOCK_SIZE_W) 
 (2*1024*1024)/SIZEOF_HSWORD) {
  debugBelch(Fragmentation, wanted %d blocks:, n);
  RtsFlags.DebugFlags.block_alloc = 1;
  checkFreeListSanity();


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: 'sizeof' infestation in rts/

2012-07-27 Thread Gabor Greif
Okay, yes... I am the one who is confused. Sorry for the confusion, I
got carried away in my grepping and code-reading and forgot that all
of rts/ is built for target.

Please disregard this thread, sorry for disturbing your vacation :-(

Regretfully,

Gabor

PS: Anyway my internal commit, just in case:
1f9927c1b840a3bb1202f3e4b0e8444d1fc1d971

On 7/27/12, Simon Marlow marlo...@gmail.com wrote:
 I'm confused. Shouldn't the RTS be built for the target platform?


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: pgj2 (amd64 FreeBSD HEAD), build 757, Failure

2012-07-20 Thread Gabor Greif
I see, it should have been configured (by build.mk) to build the
simple-integer library, right?

Thanks and cheers,

Gabor

On 7/19/12, Ian Lynagh ig...@earth.li wrote:
 On Thu, Jul 19, 2012 at 04:31:31PM +0200, Gabor Greif wrote:
 Both FreeBSD bots failed in the same way:


 libraries/hpc/ghc.mk:3: libraries/hpc/dist-boot/package-data.mk: No
 such file or directory
 libraries/Cabal/Cabal/ghc.mk:3:
 libraries/Cabal/Cabal/dist-boot/package-data.mk: No such file or
 directory
 libraries/binary/ghc.mk:3: libraries/binary/dist-boot/package-data.mk:
 No such file or directory
 libraries/bin-package-db/ghc.mk:3:
 libraries/bin-package-db/dist-boot/package-data.mk: No such file or
 directory
 libraries/hoopl/ghc.mk:3: libraries/hoopl/dist-boot/package-data.mk:
 No such file or directory
 compiler/ghc.mk:450: compiler/stage1/package-data.mk: No such file or
 directory
 utils/hsc2hs/ghc.mk:14: utils/hsc2hs/dist/package-data.mk: No such
 file or directory
 ghc/ghc.mk:106: ghc/stage1/package-data.mk: No such file or directory

 Those messages are normal. The problem is:

 /usr/bin/ld: cannot find -lgmp
 gmake[1]: ***
 [libraries/integer-gmp/dist-install/build/libHSinteger-gmp-0.3.0.0-ghc7.5.20120719.so]
 Error 1


 Thanks
 Ian



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: pgj2 (amd64 FreeBSD HEAD), build 757, Failure

2012-07-19 Thread Gabor Greif
Both FreeBSD bots failed in the same way:


libraries/hpc/ghc.mk:3: libraries/hpc/dist-boot/package-data.mk: No
such file or directory
libraries/Cabal/Cabal/ghc.mk:3:
libraries/Cabal/Cabal/dist-boot/package-data.mk: No such file or
directory
libraries/binary/ghc.mk:3: libraries/binary/dist-boot/package-data.mk:
No such file or directory
libraries/bin-package-db/ghc.mk:3:
libraries/bin-package-db/dist-boot/package-data.mk: No such file or
directory
libraries/hoopl/ghc.mk:3: libraries/hoopl/dist-boot/package-data.mk:
No such file or directory
compiler/ghc.mk:450: compiler/stage1/package-data.mk: No such file or directory
utils/hsc2hs/ghc.mk:14: utils/hsc2hs/dist/package-data.mk: No such
file or directory
ghc/ghc.mk:106: ghc/stage1/package-data.mk: No such file or directory


What commit could have caused this? N.B. many other nightlies do not
show this, perhaps FreeBSD-only (or exotic)?

Thanks,

Gabor


On 7/19/12, Builder bit.buc...@galois.com wrote:
 pgj2 (amd64 FreeBSD HEAD), build 757

 Build failed
 Details: http://darcs.haskell.org/ghcBuilder/builders/pgj2/757.html

 git clone| Success
 create mk/build.mk   | Success
 get subrepos | Success
 repo versions| Success
 touching clean-check files   | Success
 setting version date | Success
 booting  | Success
 configuring  | Success
 creating check-remove-before | Success
 compiling| Failure: Just (ExitFailure 2)

 Build failed
 Details: http://darcs.haskell.org/ghcBuilder/builders/pgj2/757.html



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: typos in comments (9ef3b76)

2012-07-18 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/9ef3b765e85adb158dfe87f0c95fad290e12af93

---

commit 9ef3b765e85adb158dfe87f0c95fad290e12af93
Author: Gabor Greif ggr...@gmail.com
Date:   Wed Jul 18 10:33:46 2012 +0200

typos in comments

this is also my test commit and
reduces the lines in the cross-
compiler branch

---

 utils/genapply/GenApply.hs |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/utils/genapply/GenApply.hs b/utils/genapply/GenApply.hs
index d00324f..e39f42e 100644
--- a/utils/genapply/GenApply.hs
+++ b/utils/genapply/GenApply.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS -cpp -fglasgow-exts #-}
 {-# OPTIONS -w #-}
--- The above warning supression flag is a temporary kludge.
+-- The above warning suppression flag is a temporary kludge.
 -- While working on this module you are encouraged to remove it and fix
 -- any warnings in the module. See
 -- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
@@ -179,7 +179,7 @@ mb_tag_node arity | Just tag - tagForArity arity = 
mkTagStmt tag  semi
 mkTagStmt tag = text (R1 = R1 + ++ show tag)
 
 genMkPAP regstatus macro jump ticker disamb
-no_load_regs-- don't load argumnet regs before jumping
+no_load_regs-- don't load argument regs before jumping
 args_in_regs-- arguments are already in regs
 is_pap args all_args_size fun_info_label
 is_fun_case
@@ -223,7 +223,7 @@ genMkPAP regstatus macro jump ticker disamb
 else shuffle_extra_args,
 
 -- for a PAP, we have to arrange that the stack contains a
--- return address in the even that stg_PAP_entry fails its
+-- return address in the event that stg_PAP_entry fails its
 -- heap check.  See stg_PAP_entry in Apply.hc for details.
  if is_pap 
 then text R2 =   mkApplyInfoName this_call_args  semi



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: typos in trace strings (which I observed in compile output) (3ae9f0f)

2012-07-18 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/3ae9f0f97583a3084a76cf7e31931bd9ef5f4173

---

commit 3ae9f0f97583a3084a76cf7e31931bd9ef5f4173
Author: Gabor Greif ggr...@gmail.com
Date:   Wed Jul 18 12:25:58 2012 +0200

typos in trace strings (which I observed in compile output)

---

 compiler/simplCore/SimplCore.lhs |2 +-
 compiler/specialise/Rules.lhs|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/simplCore/SimplCore.lhs b/compiler/simplCore/SimplCore.lhs
index d8c6732..731f551 100644
--- a/compiler/simplCore/SimplCore.lhs
+++ b/compiler/simplCore/SimplCore.lhs
@@ -586,7 +586,7 @@ simplifyPgmIO pass@(CoreDoSimplify max_iterations mode)
 -- about to begin, with '1' for the first
   | iteration_no  max_iterations   -- Stop if we've run out of iterations
   = WARN( debugIsOn  (max_iterations  2)
-, hang (ptext (sLit Simplifier baling out after) + int 
max_iterations
+, hang (ptext (sLit Simplifier bailing out after) + int 
max_iterations
 + ptext (sLit iterations)
 + (brackets $ hsep $ punctuate comma $
  map (int . simplCountN) (reverse counts_so_far)))
diff --git a/compiler/specialise/Rules.lhs b/compiler/specialise/Rules.lhs
index 498302a..0cf858e 100644
--- a/compiler/specialise/Rules.lhs
+++ b/compiler/specialise/Rules.lhs
@@ -726,7 +726,7 @@ match_co :: RuleEnv
 match_co renv subst (CoVarCo cv) co
   = match_var renv subst cv (Coercion co)
 match_co _ _ co1 _
-  = pprTrace match_co baling out (ppr co1) Nothing
+  = pprTrace match_co bailing out (ppr co1) Nothing
 
 -
 rnMatchBndr2 :: RuleEnv - RuleSubst - Var - Var - RuleEnv



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: made comments C-style, so that no gcc-extension is needed (f25718b)

2012-07-18 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/f25718b039f8a31dc158ab8dad3c9523ee6f87e5

---

commit f25718b039f8a31dc158ab8dad3c9523ee6f87e5
Author: Gabor Greif ggr...@gmail.com
Date:   Wed Jul 18 12:14:16 2012 +0200

made comments C-style, so that no gcc-extension is needed

also removed an unnecessary 'struct' tag (since the struct is
not recursive); this is in line with the other struct definitions

fixed a typo, updated copyright

it remains to remove the tabs and align the structure members
accordingly

---

 includes/stg/Regs.h |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/includes/stg/Regs.h b/includes/stg/Regs.h
index bfc3d4b..bf17b7e 100644
--- a/includes/stg/Regs.h
+++ b/includes/stg/Regs.h
@@ -1,6 +1,6 @@
 /* 
-
  *
- * (c) The GHC Team, 1998-2009
+ * (c) The GHC Team, 1998-2012
  *
  * Registers in the STG machine.
  *
@@ -21,7 +21,7 @@
  *
  * The register set is backed by a table in memory (struct
  * StgRegTable).  If a particular STG register is not mapped to a
- * machine register, then the apprpriate slot in this table is used
+ * machine register, then the appropriate slot in this table is used
  * instead.  
  *
  * This table is itself pointed to by another register, BaseReg.  If
@@ -58,7 +58,7 @@ typedef union {
  *register, probably because there's a shortage of real registers.
  * 2) caller-saves registers are saved across a CCall
  */
-typedef struct StgRegTable_ {
+typedef struct {
   StgUnion   rR1;
   StgUnion   rR2;
   StgUnion   rR3;
@@ -80,13 +80,13 @@ typedef struct StgRegTable_ {
   StgPtr rSpLim;
   StgPtr rHp;
   StgPtr rHpLim;
-  struct CostCentreStack_ * rCCCS;  // current cost-centre-stack
+  struct CostCentreStack_ * rCCCS;  /* current cost-centre-stack */
   struct StgTSO_ * rCurrentTSO;
   struct nursery_ *rNursery;
   struct bdescr_ * rCurrentNursery; /* Hp/HpLim point into this block */
   struct bdescr_ * rCurrentAlloc;   /* for allocation using allocate() */
   StgWord rHpAlloc;/* number of *bytes* being allocated in heap */
-  StgWord rRet;  // holds the return code of the thread
+  StgWord rRet;  /* holds the return code of the thread */
 } StgRegTable;
 
 #if IN_STG_CODE



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: use idiomatic type (6af4e5d)

2012-07-18 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/6af4e5dc8d224dff3c065843e065c3861320ec33

---

commit 6af4e5dc8d224dff3c065843e065c3861320ec33
Author: Gabor Greif ggr...@gmail.com
Date:   Sun Jan 8 15:51:39 2012 +0100

use idiomatic type

---

 includes/rts/prof/CCS.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/includes/rts/prof/CCS.h b/includes/rts/prof/CCS.h
index 2492bb3..e6c746b 100644
--- a/includes/rts/prof/CCS.h
+++ b/includes/rts/prof/CCS.h
@@ -1,6 +1,6 @@
 /* 
-
  *
- * (c) The GHC Team, 2009
+ * (c) The GHC Team, 2009-2012
  *
  * Macros for profiling operations in STG code
  *
@@ -107,7 +107,7 @@ typedef struct IndexTable_ {
 CostCentre *cc;
 CostCentreStack *ccs;
 struct IndexTable_ *next;
-unsigned int back_edge;
+nat back_edge;
 } IndexTable;
 
  



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: comment-only typo (9417612)

2012-07-18 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/9417612ec9d4b27cacd8100cf4831e3e703c976b

---

commit 9417612ec9d4b27cacd8100cf4831e3e703c976b
Author: Gabor Greif ggr...@gmail.com
Date:   Wed Jul 18 14:15:05 2012 +0200

comment-only typo

---

 includes/Cmm.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/includes/Cmm.h b/includes/Cmm.h
index bfac1ee..1788122 100644
--- a/includes/Cmm.h
+++ b/includes/Cmm.h
@@ -1,6 +1,6 @@
 /* 
-
  *
- * (c) The University of Glasgow 2004
+ * (c) The University of Glasgow 2004-2012
  *
  * This file is included at the top of all .cmm source files (and
  * *only* .cmm files).  It defines a collection of useful macros for
@@ -50,7 +50,7 @@
  *  StgTSO_what_next(CurrentTSO) = x
  *
  * where the StgTSO_what_next() macro is automatically generated by
- * mkDerivedConstnants.c.  If you need to access a field that doesn't
+ * mkDerivedConstants.c.  If you need to access a field that doesn't
  * already have a macro, edit that file (it's pretty self-explanatory).
  *
  * -- 
*/



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: First batch of file additions for cross-compiler: (6ae696a)

2012-07-18 Thread Gabor Greif
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/6ae696a1d1f25bf52923a3dd1c3b4a08e2033bfd

---

commit 6ae696a1d1f25bf52923a3dd1c3b4a08e2033bfd
Author: Gabor Greif ggr...@gmail.com
Date:   Wed Jul 18 15:03:31 2012 +0200

First batch of file additions for cross-compiler:

new file:   ghc/ghc-cross.wrapper
new file:   includes/mkDerivedConstants.cross.awk
new file:   includes/mkSizeMacros.cross.awk
new file:   rules/cross-compiling.mk

These are expected to sit quietly in the tree until
the rest of the machinery matures on an (upcoming)
branch. Reviews will begin to make sense as soon as
that has happened. Anyway, comments are welcome. See
http://www.haskell.org/pipermail/cvs-ghc/2012-July/074456.html
for background.

Disclaimer: these source files are not (yet) up to the
quality standards set by the rest of the tree.

Cleanups, move-arounds and rewrites (i.e. .awk - .hs), as
well as additional comments and documentation will happen
as soon as the basic functionality of a cross-compiler is
working reliably.

 ghc/ghc-cross.wrapper   |1 +
 includes/mkDerivedConstants.cross.awk   |  350 +++
 includes/mkSizeMacros.cross.awk |   82 +++
 rules/{all-target.mk = cross-compiling.mk} |   18 +-
 4 files changed, 445 insertions(+), 6 deletions(-)


Diff suppressed because of size. To see it, use:

git show 6ae696a1d1f25bf52923a3dd1c3b4a08e2033bfd

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[PING] Cross-compiler next steps

2012-07-14 Thread Gabor Greif
ping :-)

On 7/11/12, Gabor Greif ggr...@gmail.com wrote:
 Hi all,

 coming back on the cross compilers issue. As you know, I had a working
 PPC cross compiler in a github fork that did not require any alien
 tools, just a cross-gcc to distill all characteristics of the platform
 that are needed by GHC.

 Unfortunately this fork has bitrotten somewhat (mostly because the
 alien-cross merge). Now I have some energy to port my solution to
 HEAD. The question is how you feel about my suggested approach:

 1) get all non-conflicting changes on HEAD (i.e. put them into the
 official repo). These are:
* the 'awk' scripts (*) and makefile changes to create the target
 constants (sizes, offsets).

 2) make sure there are no regressions for some nights, so we can be
 confident that I did not break anything.

 3) The currently conflicting (though not invasively) modifications.
 These include:
* the 2-stage build changes (**) still needed in makefiles and
 configury (if still necessary). These include --with-cross-gcc
 detection etc.
* the modifications to the GHC wrapper script. I have something
 small working, but an experienced GHC implementor surely can point me
 to a more general approach.
* modifications to the building of the libraries, so that the
 correct cross-compiling options are passed to the package builds.

 4) again, observe the bot for some time whether stuff borked, get some
 beta testers into the boat, implement feedback.

 5) Add some tests that exercise cross compilation (e.g. x86_64 host,
 i386 target or x64 target with 32-bit pointer API on Linux). For
 setting up these I'd ask for some help from the more experienced of
 you.


 It remains to clarify whether I can obtain commit privileges for the
 above steps w.r.t. the HEAD branch of the official repo. I believe
 that these privileges would speed up the porting a lot. For 1) I would
 ask for post-commit review and for 3) I'd suggest pre-integration on a
 branch followed by a pre-merge review, then merge to HEAD.
 Alternatively, I'd just try to pull this off in a new github fork and
 ask you for pulls to the official (if you feel hesitant about granting
 me the privileges).

 A bit of background... I got official permission to evaluate Haskell
 in an embedded programming context for research projects from my
 employer (Alcatel-Lucent). I have to present concrete evidence that
 this direction of attack results in usable artifacts for our research
 this summer, as the proposal for continuation of said activity will be
 concluded in September.

 Thanks for your attention and in hope for cooperation,

 cheers,

Gabor

 (*) I promise to convert all 'awk' scripts to 'runhaskell' scripts as
 soon as the cross-compilation works from vanilla HEAD for PowerPC and
 ARM.
 (**) ultimately we'll need a 3-stage build for cross compilation,
 because I consider Template Haskell as essential.


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Cross-compiler next steps

2012-07-11 Thread Gabor Greif
Hi all,

coming back on the cross compilers issue. As you know, I had a working
PPC cross compiler in a github fork that did not require any alien
tools, just a cross-gcc to distill all characteristics of the platform
that are needed by GHC.

Unfortunately this fork has bitrotten somewhat (mostly because the
alien-cross merge). Now I have some energy to port my solution to
HEAD. The question is how you feel about my suggested approach:

1) get all non-conflicting changes on HEAD (i.e. put them into the
official repo). These are:
   * the 'awk' scripts (*) and makefile changes to create the target
constants (sizes, offsets).

2) make sure there are no regressions for some nights, so we can be
confident that I did not break anything.

3) The currently conflicting (though not invasively) modifications.
These include:
   * the 2-stage build changes (**) still needed in makefiles and
configury (if still necessary). These include --with-cross-gcc
detection etc.
   * the modifications to the GHC wrapper script. I have something
small working, but an experienced GHC implementor surely can point me
to a more general approach.
   * modifications to the building of the libraries, so that the
correct cross-compiling options are passed to the package builds.

4) again, observe the bot for some time whether stuff borked, get some
beta testers into the boat, implement feedback.

5) Add some tests that exercise cross compilation (e.g. x86_64 host,
i386 target or x64 target with 32-bit pointer API on Linux). For
setting up these I'd ask for some help from the more experienced of
you.


It remains to clarify whether I can obtain commit privileges for the
above steps w.r.t. the HEAD branch of the official repo. I believe
that these privileges would speed up the porting a lot. For 1) I would
ask for post-commit review and for 3) I'd suggest pre-integration on a
branch followed by a pre-merge review, then merge to HEAD.
Alternatively, I'd just try to pull this off in a new github fork and
ask you for pulls to the official (if you feel hesitant about granting
me the privileges).

A bit of background... I got official permission to evaluate Haskell
in an embedded programming context for research projects from my
employer (Alcatel-Lucent). I have to present concrete evidence that
this direction of attack results in usable artifacts for our research
this summer, as the proposal for continuation of said activity will be
concluded in September.

Thanks for your attention and in hope for cooperation,

cheers,

   Gabor

(*) I promise to convert all 'awk' scripts to 'runhaskell' scripts as
soon as the cross-compilation works from vanilla HEAD for PowerPC and
ARM.
(**) ultimately we'll need a 3-stage build for cross compilation,
because I consider Template Haskell as essential.

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Cross-compiler next steps

2012-07-11 Thread Gabor Greif
Thanks for the heads-up, ARM is not that essential, and PowerPC would
be sufficient for my purposes a.t.m.

Cheers,

Gabor

On 7/11/12, Karel Gardas karel.gar...@centrum.cz wrote:

 Hi Gabor,

 thanks a lot for your effort on GHC cross-compilation. You are talking
 about cross-compiling to ARM too. I would like to warn you here as GHC
 HEAD build for ARM is broken since February due to LLVM backend
 miscompiling stage2 -- at least that's my analysis of this so far. See
 http://hackage.haskell.org/trac/ghc/ticket/7049

 Hopefully once GHC/LLVM unbreaks I will be more than happy to test your
 stuff for {solaris|linux}/x86-linux/arm cross-compilation.

 Thanks!
 Karel

 On 07/11/12 12:19 PM, Gabor Greif wrote:
 Hi all,

 coming back on the cross compilers issue. As you know, I had a working
 PPC cross compiler in a github fork that did not require any alien
 tools, just a cross-gcc to distill all characteristics of the platform
 that are needed by GHC.

 Unfortunately this fork has bitrotten somewhat (mostly because the
 alien-cross merge). Now I have some energy to port my solution to
 HEAD. The question is how you feel about my suggested approach:

 1) get all non-conflicting changes on HEAD (i.e. put them into the
 official repo). These are:
 * the 'awk' scripts (*) and makefile changes to create the target
 constants (sizes, offsets).

 2) make sure there are no regressions for some nights, so we can be
 confident that I did not break anything.

 3) The currently conflicting (though not invasively) modifications.
 These include:
 * the 2-stage build changes (**) still needed in makefiles and
 configury (if still necessary). These include --with-cross-gcc
 detection etc.
 * the modifications to the GHC wrapper script. I have something
 small working, but an experienced GHC implementor surely can point me
 to a more general approach.
 * modifications to the building of the libraries, so that the
 correct cross-compiling options are passed to the package builds.

 4) again, observe the bot for some time whether stuff borked, get some
 beta testers into the boat, implement feedback.

 5) Add some tests that exercise cross compilation (e.g. x86_64 host,
 i386 target or x64 target with 32-bit pointer API on Linux). For
 setting up these I'd ask for some help from the more experienced of
 you.


 It remains to clarify whether I can obtain commit privileges for the
 above steps w.r.t. the HEAD branch of the official repo. I believe
 that these privileges would speed up the porting a lot. For 1) I would
 ask for post-commit review and for 3) I'd suggest pre-integration on a
 branch followed by a pre-merge review, then merge to HEAD.
 Alternatively, I'd just try to pull this off in a new github fork and
 ask you for pulls to the official (if you feel hesitant about granting
 me the privileges).

 A bit of background... I got official permission to evaluate Haskell
 in an embedded programming context for research projects from my
 employer (Alcatel-Lucent). I have to present concrete evidence that
 this direction of attack results in usable artifacts for our research
 this summer, as the proposal for continuation of said activity will be
 concluded in September.

 Thanks for your attention and in hope for cooperation,

 cheers,

 Gabor

 (*) I promise to convert all 'awk' scripts to 'runhaskell' scripts as
 soon as the cross-compilation works from vanilla HEAD for PowerPC and
 ARM.
 (**) ultimately we'll need a 3-stage build for cross compilation,
 because I consider Template Haskell as essential.

 ___
 Cvs-ghc mailing list
 Cvs-ghc@haskell.org
 http://www.haskell.org/mailman/listinfo/cvs-ghc




___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Typo in docs

2012-06-12 Thread Gabor Greif
forkIOWIthUnmask - forkIOWithUnmask

in 
http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Concurrent.html

Cheers,

   Gabor

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [commit: testsuite] master: Test Trac #6035, #6036 (2f9e8f3)

2012-04-25 Thread Gabor Greif
Hi Simon,

I might be blind, but are these tests being run at all?

Cheers,

Gabor

On 4/25/12, Simon Peyton Jones simo...@microsoft.com wrote:
 Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

 On branch  : master

 http://hackage.haskell.org/trac/ghc/changeset/2f9e8f3072921e1cfe7ed83445848e91573dda56

---

 commit 2f9e8f3072921e1cfe7ed83445848e91573dda56
 Author: Simon Peyton Jones simo...@microsoft.com
 Date:   Tue Apr 24 17:04:05 2012 +0100

 Test Trac #6035, #6036

---

  tests/polykinds/T6035.hs |   28 
  tests/polykinds/T6036.hs |   17 +
  2 files changed, 45 insertions(+), 0 deletions(-)

 diff --git a/tests/polykinds/T6035.hs b/tests/polykinds/T6035.hs
 new file mode 100644
 index 000..c9e4342
 --- /dev/null
 +++ b/tests/polykinds/T6035.hs
 @@ -0,0 +1,28 @@
 +{-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, KindSignatures, GADTs,
 TypeOperators
 +  #-}
 +
 +module T6035 where
 +
 +data Nat = Zero | Succ Nat
 +
 +type family Sing (a :: k) :: k - *
 +
 +data SNat n where
 +  SZero :: SNat Zero
 +  SSucc :: SNat n - SNat (Succ n)
 +
 +data SList (a :: [k]) where
 +  SNil :: SList '[]
 +  SCons :: Sing h h - SList t - SList (h ': t)
 +
 +type instance Sing (a :: Nat) = SNat
 +type instance Sing (a :: [k]) = SList
 +
 +nil :: SList '[]
 +nil = SNil
 +
 +zero :: SList '[ '[] ]
 +zero = SCons SNil SNil
 +
 +term :: SList '[ '[Zero], '[]]
 +term = SCons (SCons SZero SNil) (SCons SNil SNil)
 diff --git a/tests/polykinds/T6036.hs b/tests/polykinds/T6036.hs
 new file mode 100644
 index 000..4425c85
 --- /dev/null
 +++ b/tests/polykinds/T6036.hs
 @@ -0,0 +1,17 @@
 +{-# LANGUAGE DataKinds, TypeFamilies, PolyKinds, GADTs #-}
 +
 +module T6036 where
 +
 +data family Sing (a :: k)
 +
 +data instance Sing (a :: Maybe k) where
 +  SNothing :: Sing 'Nothing
 +  SJust :: Sing b - Sing ('Just b)
 +
 +data Nat = Zero | Succ Nat
 +
 +data instance Sing (a :: Nat) where
 +  SZero :: Sing Zero
 +  SSucc :: Sing n - Sing (Succ n)
 +
 +term = SJust SZero



 ___
 Cvs-ghc mailing list
 Cvs-ghc@haskell.org
 http://www.haskell.org/mailman/listinfo/cvs-ghc


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[PATCH] fix ticket #6001 by reporting the expected signature instead of the actual one

2012-04-12 Thread Gabor Greif
---
 compiler/typecheck/TcInstDcls.lhs |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/typecheck/TcInstDcls.lhs 
b/compiler/typecheck/TcInstDcls.lhs
index 64b839c..97b55f4 100644
--- a/compiler/typecheck/TcInstDcls.lhs
+++ b/compiler/typecheck/TcInstDcls.lhs
@@ -836,7 +836,7 @@ mkMethIds sig_fn clas tyvars dfun_ev_vars inst_tys sel_id
 ; inst_sigs - xoptM Opt_InstanceSigs
 ; if inst_sigs then 
 checkTc (sig_ty `eqType` local_meth_ty)
-(badInstSigErr sel_name sig_ty) 
+(badInstSigErr sel_name local_meth_ty) 
   else
 addErrTc (misplacedInstSig sel_name hs_ty)
 ; return sig_ty }
-- 
1.7.9.3


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [LLVMdev] LLVM GHC Backend: Tables Next To Code

2012-03-15 Thread Gabor Greif
Chris said:

 I really like the idea of adding this as an inline asm blob at the start of a 
 function, and biasing the actual address of the closure based on the size of 
 the table.  I'm not 100% confident that it will work (not being very familiar 
 with TNTC) but it seems quite plausible and the impact on LLVM would be quite 
 reasonable (some new calling convention work?)

While reading this I had the idea that the LLVM code generator could
watch out for the specific combination of inline asm and calling
convention and strip off the fat. This way the code increase could be
dealt with. OTOH the inline asm would still need to be target
specific, which is very ugly. What about a new intrinsic which holds a
reference to the global and creates the right assembly in the backend?
Since the reference to the global (which is the table) would not be
used otherwise, the linker could drop it, thus no code increase and no
redundant global.

Does this make sense?

Cheers,

Gabor

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[PING] Re: [PATCH] Many small typos and formatting

2012-02-25 Thread Gabor Greif
Ping.

Anything wrong with this or just overlooked?

Cheers,

Gabor

On 2/16/12, Gabor Greif ggr...@gmail.com wrote:
 See my previous mail...

 I believe I did precisely what you called for:

 https://github.com/ggreif/ghc/commits/misc-cleanups/

 repo: https://github.com/ggreif/ghc.git
 branch: misc-cleanups

 Cheers,

 Gabor

 On 2/16/12, Simon Marlow marlo...@gmail.com wrote:
 On 15/02/2012 17:33, Gabor Greif wrote:
 Hi all,

 on my fork https://github.com/ggreif/ghc I have accumulated a number
 of small patches that are results of my browsing of the GHC sources
 and correcting minor issues. These are without functional impact and
 mostly apply to comments and formatting.

 By transferring these to mainline GHC I hope to lessen the distance of
 my fork to mainline.

 When pulling patches from mainline via github I sometimes use the fork
 queue (https://github.com/ggreif/ghc/forkqueue). By using the
 corresponding device (https://github.com/ghc/ghc/forkqueue) of the
 official mirror it might be quite easy to locate and apply the below
 patches.

 There might be an even better method by resorting to the command-line
 git
 tool.

 Alternatively I could set up a github clone of the original mirror (a
 topic branch maybe?) and push these changes there, so you would only
 need to pull them into the official repo.

 Please indicate how this can be handled best.

 The easiest for us would be if you could give us a repo URL that we can
 pull from.  I've done this before when people have submitted patches via
 github - they make a branch on their github repo containing the changes,
 and give us the URL and branch name, we pull and validate the changes
 and push to GHC's repo.

 Cheers,
  Simon




 Cheers,

 Gabor

 https://github.com/ggreif/ghc/commit/77320765550bfa603052f0334d2d681134b63da0
 https://github.com/ggreif/ghc/commit/598306aca074875bbe2cc025a5dd267a53a0d3bd
 done#
 https://github.com/ggreif/ghc/commit/fe443ed82538d04191212a08e44bd3f2e27613af
 https://github.com/ggreif/ghc/commit/95c2d50da10e49bb936e20a3b58fb29c7c5b4d13
 https://github.com/ggreif/ghc/commit/3c79e184304ca38b8ed4484ccc3e8bac9724963a
 https://github.com/ggreif/ghc/commit/e47aa109b35ec02b544b4dec5640714c4ce66d74
 https://github.com/ggreif/ghc/commit/e4c4cc978fbc1cc445e076adfd08765b4ef3a39c
 https://github.com/ggreif/ghc/commit/22e1ba53b7c0d1d94cc4ace70f3d8bd868e634fe
 https://github.com/ggreif/ghc/commit/4e048f0d2862989265e30d72c8025d087c8e69cd
 https://github.com/ggreif/ghc/commit/81026cc203cfc4dd0b118061d0cd9719888f3cf3
 https://github.com/ggreif/ghc/commit/e5eb2378295ddce58fc5d2b1979f291b8ecd7875
 https://github.com/ggreif/ghc/commit/fbbc9dcf224aae7cbcba0f8045159e345f0dc16b
 https://github.com/ggreif/ghc/commit/700a3e41159fa1ae3b9a836cc82fe566d7f61c34
 https://github.com/ggreif/ghc/commit/3498437648f75507d3a059c5eba1acffdb7c0b16
 https://github.com/ggreif/ghc/commit/84410c60b7e65ba0be31ab9f97b61102819882f2
 https://github.com/ggreif/ghc/commit/0269459cd528db1486b51bfb98ec3ee674a0edff
 https://github.com/ggreif/ghc/commit/61ac72160329ed2d6200cac26238bc2053a4b4c9
 https://github.com/ggreif/ghc/commit/ec67dbacd14f160d1c11470d6606985ea2363852
 https://github.com/ggreif/ghc/commit/116b6b6338fe7c3b813f4c15db99627421ea0b9f

 ___
 Cvs-ghc mailing list
 Cvs-ghc@haskell.org
 http://www.haskell.org/mailman/listinfo/cvs-ghc




___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [PATCH] Many small typos and formatting

2012-02-16 Thread Gabor Greif
See my previous mail...

I believe I did precisely what you called for:

https://github.com/ggreif/ghc/commits/misc-cleanups/

repo: https://github.com/ggreif/ghc.git
branch: misc-cleanups

Cheers,

Gabor

On 2/16/12, Simon Marlow marlo...@gmail.com wrote:
 On 15/02/2012 17:33, Gabor Greif wrote:
 Hi all,

 on my fork https://github.com/ggreif/ghc I have accumulated a number
 of small patches that are results of my browsing of the GHC sources
 and correcting minor issues. These are without functional impact and
 mostly apply to comments and formatting.

 By transferring these to mainline GHC I hope to lessen the distance of
 my fork to mainline.

 When pulling patches from mainline via github I sometimes use the fork
 queue (https://github.com/ggreif/ghc/forkqueue). By using the
 corresponding device (https://github.com/ghc/ghc/forkqueue) of the
 official mirror it might be quite easy to locate and apply the below
 patches.

 There might be an even better method by resorting to the command-line git
 tool.

 Alternatively I could set up a github clone of the original mirror (a
 topic branch maybe?) and push these changes there, so you would only
 need to pull them into the official repo.

 Please indicate how this can be handled best.

 The easiest for us would be if you could give us a repo URL that we can
 pull from.  I've done this before when people have submitted patches via
 github - they make a branch on their github repo containing the changes,
 and give us the URL and branch name, we pull and validate the changes
 and push to GHC's repo.

 Cheers,
   Simon




 Cheers,

 Gabor

 https://github.com/ggreif/ghc/commit/77320765550bfa603052f0334d2d681134b63da0
 https://github.com/ggreif/ghc/commit/598306aca074875bbe2cc025a5dd267a53a0d3bd
 done#
 https://github.com/ggreif/ghc/commit/fe443ed82538d04191212a08e44bd3f2e27613af
 https://github.com/ggreif/ghc/commit/95c2d50da10e49bb936e20a3b58fb29c7c5b4d13
 https://github.com/ggreif/ghc/commit/3c79e184304ca38b8ed4484ccc3e8bac9724963a
 https://github.com/ggreif/ghc/commit/e47aa109b35ec02b544b4dec5640714c4ce66d74
 https://github.com/ggreif/ghc/commit/e4c4cc978fbc1cc445e076adfd08765b4ef3a39c
 https://github.com/ggreif/ghc/commit/22e1ba53b7c0d1d94cc4ace70f3d8bd868e634fe
 https://github.com/ggreif/ghc/commit/4e048f0d2862989265e30d72c8025d087c8e69cd
 https://github.com/ggreif/ghc/commit/81026cc203cfc4dd0b118061d0cd9719888f3cf3
 https://github.com/ggreif/ghc/commit/e5eb2378295ddce58fc5d2b1979f291b8ecd7875
 https://github.com/ggreif/ghc/commit/fbbc9dcf224aae7cbcba0f8045159e345f0dc16b
 https://github.com/ggreif/ghc/commit/700a3e41159fa1ae3b9a836cc82fe566d7f61c34
 https://github.com/ggreif/ghc/commit/3498437648f75507d3a059c5eba1acffdb7c0b16
 https://github.com/ggreif/ghc/commit/84410c60b7e65ba0be31ab9f97b61102819882f2
 https://github.com/ggreif/ghc/commit/0269459cd528db1486b51bfb98ec3ee674a0edff
 https://github.com/ggreif/ghc/commit/61ac72160329ed2d6200cac26238bc2053a4b4c9
 https://github.com/ggreif/ghc/commit/ec67dbacd14f160d1c11470d6606985ea2363852
 https://github.com/ggreif/ghc/commit/116b6b6338fe7c3b813f4c15db99627421ea0b9f

 ___
 Cvs-ghc mailing list
 Cvs-ghc@haskell.org
 http://www.haskell.org/mailman/listinfo/cvs-ghc



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[PATCH] Many small typos and formatting

2012-02-15 Thread Gabor Greif
Hi all,

on my fork https://github.com/ggreif/ghc I have accumulated a number
of small patches that are results of my browsing of the GHC sources
and correcting minor issues. These are without functional impact and
mostly apply to comments and formatting.

By transferring these to mainline GHC I hope to lessen the distance of
my fork to mainline.

When pulling patches from mainline via github I sometimes use the fork
queue (https://github.com/ggreif/ghc/forkqueue). By using the
corresponding device (https://github.com/ghc/ghc/forkqueue) of the
official mirror it might be quite easy to locate and apply the below
patches.

There might be an even better method by resorting to the command-line git tool.

Alternatively I could set up a github clone of the original mirror (a
topic branch maybe?) and push these changes there, so you would only
need to pull them into the official repo.

Please indicate how this can be handled best.

Cheers,

   Gabor

https://github.com/ggreif/ghc/commit/77320765550bfa603052f0334d2d681134b63da0
https://github.com/ggreif/ghc/commit/598306aca074875bbe2cc025a5dd267a53a0d3bd
done# 
https://github.com/ggreif/ghc/commit/fe443ed82538d04191212a08e44bd3f2e27613af
https://github.com/ggreif/ghc/commit/95c2d50da10e49bb936e20a3b58fb29c7c5b4d13
https://github.com/ggreif/ghc/commit/3c79e184304ca38b8ed4484ccc3e8bac9724963a
https://github.com/ggreif/ghc/commit/e47aa109b35ec02b544b4dec5640714c4ce66d74
https://github.com/ggreif/ghc/commit/e4c4cc978fbc1cc445e076adfd08765b4ef3a39c
https://github.com/ggreif/ghc/commit/22e1ba53b7c0d1d94cc4ace70f3d8bd868e634fe
https://github.com/ggreif/ghc/commit/4e048f0d2862989265e30d72c8025d087c8e69cd
https://github.com/ggreif/ghc/commit/81026cc203cfc4dd0b118061d0cd9719888f3cf3
https://github.com/ggreif/ghc/commit/e5eb2378295ddce58fc5d2b1979f291b8ecd7875
https://github.com/ggreif/ghc/commit/fbbc9dcf224aae7cbcba0f8045159e345f0dc16b
https://github.com/ggreif/ghc/commit/700a3e41159fa1ae3b9a836cc82fe566d7f61c34
https://github.com/ggreif/ghc/commit/3498437648f75507d3a059c5eba1acffdb7c0b16
https://github.com/ggreif/ghc/commit/84410c60b7e65ba0be31ab9f97b61102819882f2
https://github.com/ggreif/ghc/commit/0269459cd528db1486b51bfb98ec3ee674a0edff
https://github.com/ggreif/ghc/commit/61ac72160329ed2d6200cac26238bc2053a4b4c9
https://github.com/ggreif/ghc/commit/ec67dbacd14f160d1c11470d6606985ea2363852
https://github.com/ggreif/ghc/commit/116b6b6338fe7c3b813f4c15db99627421ea0b9f

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [PATCH] Many small typos and formatting

2012-02-15 Thread Gabor Greif
Okay, managed to put all these (after resolving a conflict) on a branch:

https://github.com/ggreif/ghc/commits/misc-cleanups/

merging that on head should be it. The branch 'misc-cleanups' is based
on today's official master branch, so even a fast-forward merge should
be possible.

Cheers,

Gabor

On 2/15/12, Gabor Greif ggr...@gmail.com wrote:
 Hi all,

 on my fork https://github.com/ggreif/ghc I have accumulated a number
 of small patches that are results of my browsing of the GHC sources
 and correcting minor issues. These are without functional impact and
 mostly apply to comments and formatting.

 By transferring these to mainline GHC I hope to lessen the distance of
 my fork to mainline.

 When pulling patches from mainline via github I sometimes use the fork
 queue (https://github.com/ggreif/ghc/forkqueue). By using the
 corresponding device (https://github.com/ghc/ghc/forkqueue) of the
 official mirror it might be quite easy to locate and apply the below
 patches.

 There might be an even better method by resorting to the command-line git
 tool.

 Alternatively I could set up a github clone of the original mirror (a
 topic branch maybe?) and push these changes there, so you would only
 need to pull them into the official repo.

 Please indicate how this can be handled best.

 Cheers,

Gabor

 https://github.com/ggreif/ghc/commit/77320765550bfa603052f0334d2d681134b63da0
 https://github.com/ggreif/ghc/commit/598306aca074875bbe2cc025a5dd267a53a0d3bd
 done#
 https://github.com/ggreif/ghc/commit/fe443ed82538d04191212a08e44bd3f2e27613af
 https://github.com/ggreif/ghc/commit/95c2d50da10e49bb936e20a3b58fb29c7c5b4d13
 https://github.com/ggreif/ghc/commit/3c79e184304ca38b8ed4484ccc3e8bac9724963a
 https://github.com/ggreif/ghc/commit/e47aa109b35ec02b544b4dec5640714c4ce66d74
 https://github.com/ggreif/ghc/commit/e4c4cc978fbc1cc445e076adfd08765b4ef3a39c
 https://github.com/ggreif/ghc/commit/22e1ba53b7c0d1d94cc4ace70f3d8bd868e634fe
 https://github.com/ggreif/ghc/commit/4e048f0d2862989265e30d72c8025d087c8e69cd
 https://github.com/ggreif/ghc/commit/81026cc203cfc4dd0b118061d0cd9719888f3cf3
 https://github.com/ggreif/ghc/commit/e5eb2378295ddce58fc5d2b1979f291b8ecd7875
 https://github.com/ggreif/ghc/commit/fbbc9dcf224aae7cbcba0f8045159e345f0dc16b
 https://github.com/ggreif/ghc/commit/700a3e41159fa1ae3b9a836cc82fe566d7f61c34
 https://github.com/ggreif/ghc/commit/3498437648f75507d3a059c5eba1acffdb7c0b16
 https://github.com/ggreif/ghc/commit/84410c60b7e65ba0be31ab9f97b61102819882f2
 https://github.com/ggreif/ghc/commit/0269459cd528db1486b51bfb98ec3ee674a0edff
 https://github.com/ggreif/ghc/commit/61ac72160329ed2d6200cac26238bc2053a4b4c9
 https://github.com/ggreif/ghc/commit/ec67dbacd14f160d1c11470d6606985ea2363852
 https://github.com/ggreif/ghc/commit/116b6b6338fe7c3b813f4c15db99627421ea0b9f


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Backtrace from crashing target program

2012-01-18 Thread Gabor Greif
We have a byte swapping(-like problem).

Looking at the dump of the info table on PPC
(gdb) p *info
$7 = {layout = {payload = {ptrs = 0, nptrs = 4}, bitmap = 4,
large_bitmap_offset = 4, selector_offset = 4}, type = 0,
  srt_bitmap = 40, code = 0x102cab2c `\02028c\212K%\215}
(gdb) disassemble 0x102cab2c
Dump of assembler code for function stg_BLOCKING_QUEUE_CLEAN_info:
0x102cab2c stg_BLOCKING_QUEUE_CLEAN_info+0:   lis r3,4146
0x102cab30 stg_BLOCKING_QUEUE_CLEAN_info+4:   addir3,r3,-29988
0x102cab34 stg_BLOCKING_QUEUE_CLEAN_info+8:   bl  0x1029d0c0 barf
0x102cab38 stg_BLOCKING_QUEUE_CLEAN_info+12:  .long 0x4
0x102cab3c stg_BLOCKING_QUEUE_CLEAN_info+16:  .long 0x28

While on x86_64 we have

(gdb) p *info
$2 = {layout = {payload = {ptrs = 4, nptrs = 0}, bitmap = 4,
large_bitmap_offset = 4, __pad_large_bitmap_offset = 4,
selector_offset = 4},
  type = 40, srt_bitmap = 0,
  code = 0x47f950 I\211u\020I\211}\030M\211E
M\211M(\363A\017\021MP\363A\017\021UT\363A\017\021]X\363A\017\021e\\\362A\017\021m`\362A\017\021uh\277\300%L}
(gdb) disassemble 0x47f950
Dump of assembler code for function stg_BLOCKING_QUEUE_CLEAN_info:
0x0047f950 stg_BLOCKING_QUEUE_CLEAN_info+0:   mov%rsi,0x10(%r13)
0x0047f954 stg_BLOCKING_QUEUE_CLEAN_info+4:   mov%rdi,0x18(%r13)
0x0047f958 stg_BLOCKING_QUEUE_CLEAN_info+8:   mov%r8,0x20(%r13)


'type' and 'srt_bitmap' are wrong on PowerPC, and swapped relative to
x86_64. The latter is correct. I believe this is CMM stuff where can I
dig further?

How did PowerPC linux ever work?

Cheers,

Gabor

On 1/16/12, Gabor Greif ggr...@gmail.com wrote:
 It appears that I ended up with the threaded runtime. While not
 optimal for debugging, I see this:

 Breakpoint 1, schedule (initialCapability=0x1032b680, task=0x10336ec8)
 at rts/Schedule.c:486
 486 r = StgRun((StgFunPtr) stg_returnToStackTop, cap-r);
 (gdb) p cap-r
 $6 = {rR1 = {w = 0, a = 0x0, c = 0, f = 0, i = 0, p = 0x0}, rR2 = {w =
 0, a = 0x0,
 c = 0, f = 0, i = 0, p = 0x0}, rR3 = {w = 0, a = 0x0, c = 0, f = 0, i =
 0,
 p = 0x0}, rR4 = {w = 0, a = 0x0, c = 0, f = 0, i = 0, p = 0x0},
 rR5 = {w = 0,
 a = 0x0, c = 0, f = 0, i = 0, p = 0x0}, rR6 = {w = 0, a = 0x0, c =
 0, f = 0,
 i = 0, p = 0x0}, rR7 = {w = 0, a = 0x0, c = 0, f = 0, i = 0, p =
 0x0}, rR8 = {
 w = 0, a = 0x0, c = 0, f = 0, i = 0, p = 0x0}, rR9 = {w = 0, a =
 0x0, c = 0,
 f = 0, i = 0, p = 0x0}, rR10 = {w = 0, a = 0x0, c = 0, f = 0, i =
 0, p = 0x0},
   rF1 = 0, rF2 = 0, rF3 = 0, rF4 = 0, rD1 = 0, rD2 = 0, rL1 = 0, rSp = 0x0,
   rSpLim = 0x0, rHp = 0x0, rHpLim = 0x0, rCCCS = 0x0, rCurrentTSO =
 0x301033c0,
   rNursery = 0x1032f178, rCurrentNursery = 0x30100040, rCurrentAlloc =
 0x30100060,
   rHpAlloc = 0, rRet = 0}


 After loading the thread state,

 stg_returnToStackTop
 {
   LOAD_THREAD_STATE();
   CHECK_SENSIBLE_REGS();
   jump %ENTRY_CODE(Sp(0));
 }

 rightly barfs that registers are zero. Which function sets up those?
 From C or Haskell?

 How can I select the single-threaded runtime?

 Sorry for the abundance of questions...

 Cheers,

  Gabor

 On 1/16/12, Simon Marlow marlo...@gmail.com wrote:
 On 15/01/2012 00:07, Gabor Greif wrote:
 Hello hackers,

 my hello world program compiles and links, but when running on the
 embedded PowerPC board it crashes like this:

 (gdb) run
 Starting program: /root/test
 test: internal error: stg_ap_p_ret
  (GHC version 7.5.20120111 for powerpc_unknown_linux)
  Please report this as a GHC bug:
 http://www.haskell.org/ghc/reportabug

 Program received signal SIGABRT, Aborted.
 0x0fdc0a4c in raise () from /lib/tls/libc.so.6
 (gdb) bt
 #0  0x0fdc0a4c in raise () from /lib/tls/libc.so.6
 #1  0x0fdc2488 in abort () from /lib/tls/libc.so.6
 #2  0x1029b300 in rtsFatalInternalErrorFn ()
 #3  0x1029b024 in barf ()
 #4  0x102b3f9c in stg_ap_p_info ()
 #5  0x1029d0ac in scheduleWaitThread ()
 #6  0x102c69a8 in rts_evalLazyIO ()
 #7  0x1029ae80 in real_main ()
 #8  0x1029afc8 in hs_main ()
 #9  0x10002168 in main ()
 (gdb) c
 Continuing.

 Program terminated with signal SIGABRT, Aborted.
 The program no longer exists.

 This back trace tells us almost nothing, I'm afraid - many different
 kinds of corruption end up as crashes in stg_ap_p_info or some other bit
 of the RTS.

 I suggest following the instructions in

http://hackage.haskell.org/trac/ghc/wiki/Debugging/CompiledCode

 and see how far you get.  Come back if you get stuck.

 Cheers,
  Simon






 'git grep' does not turn up any hits for 'stg_ap_p_info', and
 'scheduleWaitThread' looks pretty much innocent. Where is the best
 place to get into debugging this?

 I gather stg_ap_p_info is a (global data) StgInfoTable, but then again
 it appears in the backtrace, (tables beside code?). Why would it barf
 at all?

 I am thinking that some host configury may still be leaking into the
 target, so I might be fighting a deceived RTS ('revenge tastes best
 when served cold'). But the host

Re: Backtrace from crashing target program

2012-01-18 Thread Gabor Greif
Just for the record, I believe this is resolved now,

in my cross-compilation setup (for PowerPC)

WORDS_BIGENDIAN

was not set.

Not sure yet about FLOAT_WORDS_BIGENDIAN yet.

Cheers,

Gabor

On 1/18/12, Gabor Greif ggr...@gmail.com wrote:
 We have a byte swapping(-like problem).

 ...

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


MO_WriteBarrier and PowerPC (NCG)

2012-01-18 Thread Gabor Greif
Hi all,

looks like I have an (almost) running binary on a PPC embedded target.
'Almost' because the native backend emits a 'lwsync' (light-weight
sync) instruction for the MO_WriteBarrier C-- instruction.

Unfortunately this is an e500 core that traps with illegal
instruction on 'lwsync'. Below I added some references that show that
many projects feel (felt) the pain.

From what I gather, write-barriers in GHC are only necessary in
multi-processor settings; when I am sure to have a uniprocessor, then
a simple 'nop' instruction will do. Can somebody confirm this?

So how to get out?

1) We could probe the target C compiler (when specified
'--with-target-gcc') whether it provides a __NO_LWSYNC__ macro (won't
work for us, i.e. my employer, as our GCC is probably older than
that).

2) some configure-time switch like '--enable-write-barrier={sync|nop|lwsync}'
sounds like a good solution, but clutters './configure --help'

3) Using the target triple to specify e500 or uniprocessor
how? are there conventions already?

Then we have to communicate the above to NCG; we could use

a) a #define and conditional compilation
quick, dirty, effective

b) Sub-architecture (ArchPPC e500)
elegant, but more work

I am very interested in input, do somebody have preferences or ideas
about the above?

Cheers,

Gabor


PS: added Wolfgang to 'CC:', as he wrote the 'lwsync' patch in the first place

http://gcc.gnu.org/ml/gcc-patches/2006-11/msg01238.html
http://code.google.com/p/google-perftools/issues/detail?id=140

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Backtrace from crashing target program

2012-01-14 Thread Gabor Greif
Hello hackers,

my hello world program compiles and links, but when running on the
embedded PowerPC board it crashes like this:

(gdb) run
Starting program: /root/test
test: internal error: stg_ap_p_ret
(GHC version 7.5.20120111 for powerpc_unknown_linux)
Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Program received signal SIGABRT, Aborted.
0x0fdc0a4c in raise () from /lib/tls/libc.so.6
(gdb) bt
#0  0x0fdc0a4c in raise () from /lib/tls/libc.so.6
#1  0x0fdc2488 in abort () from /lib/tls/libc.so.6
#2  0x1029b300 in rtsFatalInternalErrorFn ()
#3  0x1029b024 in barf ()
#4  0x102b3f9c in stg_ap_p_info ()
#5  0x1029d0ac in scheduleWaitThread ()
#6  0x102c69a8 in rts_evalLazyIO ()
#7  0x1029ae80 in real_main ()
#8  0x1029afc8 in hs_main ()
#9  0x10002168 in main ()
(gdb) c
Continuing.

Program terminated with signal SIGABRT, Aborted.
The program no longer exists.


'git grep' does not turn up any hits for 'stg_ap_p_info', and
'scheduleWaitThread' looks pretty much innocent. Where is the best
place to get into debugging this?

I gather stg_ap_p_info is a (global data) StgInfoTable, but then again
it appears in the backtrace, (tables beside code?). Why would it barf
at all?

I am thinking that some host configury may still be leaking into the
target, so I might be fighting a deceived RTS ('revenge tastes best
when served cold'). But the host and target should be pretty
comparable linux OSs.

I am thankful for any hints.

Cheers,

Gabor

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Backtrace from crashing target program

2012-01-14 Thread Gabor Greif
Hi Gaby,

here you go:

https://github.com/ggreif/ghc

But in 2 places you will still need some manual intervention:

$TOP/settings (check word size)
the other settings file 'find $TOP -name settings'

$ find . -name settings
./inplace/lib/settings
./settings


And be sure to check

./includes/ghcautoconf.h

because it is currently filled with host configury, so you'll have to
edit it. Making this automatic is on my list after the binary starts
to run on target. I had to adjust the UL and L sizes (and alignments)
from 8 to 4 for my PPC target.

Then you have to

$ perl boot
$ ./configure --host=triple --target=triple
--with-target-gcc=path-to-cross-cc

Cheers,

   Gabor


PS: What are you trying to target?
PPS: Crossing fingers that you run into the same problem and that you
can help me debugging it ;-)

On 1/15/12, Gabriel Dos Reis g...@integrable-solutions.net wrote:
 On Sat, Jan 14, 2012 at 6:07 PM, Gabor Greif ggr...@gmail.com wrote:
 Hello hackers,

 my hello world program compiles and links, but when running on the
 embedded PowerPC board it crashes like this:


 Hi Gabor,

 where can I find links to your patches enabling
 cross-compilation/cross-building?


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Backtrace from crashing target program

2012-01-14 Thread Gabor Greif
Not sure you can trick GHC into generting code for those. I am
fortunate, because ArchPPC is supported.

Anyway, good luck,

Gabor

On 1/15/12, Gabriel Dos Reis g...@integrable-solutions.net wrote:
 On Sat, Jan 14, 2012 at 6:35 PM, Gabor Greif ggr...@gmail.com wrote:
 Hi Gaby,

 here you go:

 https://github.com/ggreif/ghc

 But in 2 places you will still need some manual intervention:

 $TOP/settings (check word size)
 the other settings file 'find $TOP -name settings'

 $ find . -name settings
 ./inplace/lib/settings
 ./settings


 And be sure to check

 ./includes/ghcautoconf.h

 because it is currently filled with host configury, so you'll have to
 edit it. Making this automatic is on my list after the binary starts
 to run on target. I had to adjust the UL and L sizes (and alignments)
 from 8 to 4 for my PPC target.

 Then you have to

 $ perl boot
 $ ./configure --host=triple --target=triple
 --with-target-gcc=path-to-cross-cc

 Thank you!


 Cheers,

   Gabor


 PS: What are you trying to target?

 I've got some AVR micro controllers to play with.
 It should be fun  -- at least, I hope not too painful :-)

 PPS: Crossing fingers that you run into the same problem and that you
 can help me debugging it ;-)

 :-)

 -- Gaby


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: ghc ==7.* and 7.5.20120111, what the heck?

2012-01-12 Thread Gabor Greif
Right, and the reason for why dph-lifted-vseq is configured before the
ghc package seems to be that I told compiler_stage2_NOT_NEEDED =
YES.

Logically this would be correct, as there is no stage2 compiler in a
cross-compilation setting, but by saying so, the build system lumps
all packages for being configured together and performs it using the
stage1 compiler (obviously before the ghc package is built).

I do not understand this fully yet, anyway this
https://github.com/ggreif/ghc/commit/56522be8b2b7c09b492d11ba911a2b8f2406999d
solved my problems (I hope).

Any insight why this is happening is welcome.

Cheers,

Gabor

On 1/12/12, Simon Marlow marlo...@gmail.com wrote:
 On 11/01/2012 21:40, Roman Leshchinskiy wrote:
 On 11/01/2012, at 19:37, Gabor Greif wrote:

 libraries/dph/dph-lifted-vseg/Data/Array/Parallel/PArray/PData/Base.hs:20:8:
 Could not find module `SpecConstr'
 Use -v to see a list of the files searched for.
 make[1]: ***
 [libraries/dph/dph-lifted-vseg/dist-install/build/.depend-v.haskell]
 Error 1
 make: *** [all] Error 2

 Turns out there is no such module in Base any more.

 FWIW, SpecConstr is a ghc module which (I assume) isn't found because you
 removed the dependency on ghc. I have no idea why the ghc==7.* dependency
 is failing, it looks like a bug to me.

 The usual reason for this kind of failure is if there is a missing
 dependency such that dph-lifted-vseq is being configured before the ghc
 package.

 Cheers,
   Simon


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: ghc-cabal in HEAD and libraries/primitive (from ./sync-all)

2012-01-11 Thread Gabor Greif
Hi Ian, Roman,

this may be a problem with my cross-compiler, as the problem persists
in my setup:

$ inplace/bin/ghc-cabal configure
--with-ghc=/home/ggreif/ghc-head/inplace/bin/ghc-stage1
--with-ghc-pkg=/home/ggreif/ghc-head/inplace/bin/ghc-pkg
--enable-library-for-ghci --configure-option=CFLAGS=   
--configure-option=LDFLAGS=--configure-option=CPPFLAGS=   
--with-gcc=false --configure-option=--with-cc=false
--with-ar=false --with-ranlib=true -- dist-install
libraries/primitive
Configuring primitive-0.4.0.1...
ghc-cabal: Missing dependency on a foreign library:
* Missing (or bad) header file: primitive-memops.h
This problem can usually be solved by installing the system package that
provides this library (you may need the -dev version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
$ cat /home/ggreif/ghc-head/inplace/bin/ghc-stage1
#!/bin/sh
executablename=/home/ggreif/ghc-head/inplace/lib/ghc-stage1
datadir=/home/ggreif/ghc-head/inplace/lib
bindir=/home/ggreif/ghc-head/inplace/bin
topdir=/home/ggreif/ghc-head/inplace/lib
pgmgcc=/home/ggreif/devkit/ppc/85xx/bin/ppc_85xx-gcc
exec $executablename -B$topdir ${1+$@}

Is it possible that ghc-cabal somehow uses a C compiler (host/target
gcc) to discover dependencies?

Cheers,

Gabor

On 1/11/12, Roman Leshchinskiy r...@cse.unsw.edu.au wrote:
 On 10/01/2012, at 20:28, Gabor Greif wrote:

 My suspicion is that ghc-cabal is not prepared to see includes: or
 some other weirdness with Include-Dirs: or Install-Includes:.

 From bytestring.cabal in the GHC tree:

   include-dirs:  include
   includes:  fpstring.h
   install-includes:  fpstring.h

 Does bytestring have the same problem for you? This sounds very weird, I've
 never seen this error before.

 Roman




___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


ghc ==7.* and 7.5.20120111, what the heck?

2012-01-11 Thread Gabor Greif
So, I have a cross-ghc configured like this:

./configure --host=x86_64-apple-darwin --target=i386-apple-darwin

After successfully building stage1 I get this error when configuring
dph/dph-lifted-base:

$ inplace/bin/ghc-cabal configure
--with-ghc=/Users/ggreif/ghc/inplace/bin/ghc-stage1
--with-ghc-pkg=/Users/ggreif/ghc/inplace/bin/ghc-pkg
--enable-library-for-ghci --configure-option=CFLAGS= -m32
-fno-stack-protector   --configure-option=LDFLAGS= -m32  
--configure-option=CPPFLAGS= -m32   --with-gcc=/usr/bin/gcc
--configure-option=--with-cc=/usr/bin/gcc --with-ar=/usr/bin/ar
--with-ranlib=ranlib -- dist-install libraries/dph/dph-lifted-base
Configuring dph-lifted-base-0.5.2.0...
ghc-cabal: At least the following dependencies are missing:
ghc ==7.*
make[1]: *** [libraries/dph/dph-lifted-base/dist-install/package-data.mk]
Error 1
make: *** [all] Error 2
$ inplace/bin/ghc-stage1 --version
The Glorious Glasgow Haskell Compilation System, version 7.5.20120111

Another weirdness I am experiencing. I can remove the depencency from
the cabal file (which helps) but I get the same issue in the next
configure, etc.

Another issue (after correcting the above 4 times)

libraries/dph/dph-lifted-vseg/Data/Array/Parallel/PArray/PData/Base.hs:20:8:
Could not find module `SpecConstr'
Use -v to see a list of the files searched for.
make[1]: *** 
[libraries/dph/dph-lifted-vseg/dist-install/build/.depend-v.haskell]
Error 1
make: *** [all] Error 2

Turns out there is no such module in Base any more. Removing the
imports (in some places) allows the configuring to continue.

Down the road, I even see package ghc unknown when configuring
utils/mkUserGuidePart.

What is going on? Has anybody expreienced such things? Am I getting
the wring dependencies? Or just the perils of living near the bleeding
edge?

I am preparing for a long debug-night.

Cheers,

Gabor

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


ghc-cabal in HEAD and libraries/primitive (from ./sync-all)

2012-01-10 Thread Gabor Greif
Hi all,

for some reason either the libraries/primitive version in tarballs is broken
(should be
  includes: cbits/primitive-memops.h
?)
or the ghc-cabal is not able to resolve the included header...

Anybody seen this? I have a fresh checkout.

Following change helped, but I assume is not acceptable for a patch :-)

diff --git a/primitive.cabal b/primitive.cabal
index 3e19e84..985e2e7 100644
--- a/primitive.cabal
+++ b/primitive.cabal
@@ -57,6 +57,5 @@ Library

   Include-Dirs: cbits
   Install-Includes: primitive-memops.h
-  includes: primitive-memops.h
   c-sources: cbits/primitive-memops.c

Cheers,

Gabor

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: ghc-cabal in HEAD and libraries/primitive (from ./sync-all)

2012-01-10 Thread Gabor Greif
Ouch, I was in a hurry leaving work and forgot copying the error message.
It was along the lines cannot resolve header path: primitive-memops.h
I cannot remember the exact wording.

Anyway, the package does not contain such a header at toplevel, only
at cbits/primitive-memops.h. I tried to symlink it, no way. Also
copying it over did not resolve the error and changing the .cabal file
to read:
 includes: cbits/primitive-memops.h
did not help. I can try to reproduce the error at home later.

My suspicion is that ghc-cabal is not prepared to see includes: or
some other weirdness with Include-Dirs: or Install-Includes:.

By 'tarballs' I mean the pre-canned libraries that '.sync-all get'
pulls into the ghc source tree (by 'git').

On 1/10/12, Ian Lynagh ig...@earth.li wrote:

 Hi Gabor,

 On Tue, Jan 10, 2012 at 08:06:44PM +0100, Gabor Greif wrote:

 for some reason either the libraries/primitive version in tarballs is
 broken

 What do you mean by in tarballs?

 Anybody seen this?

 What are you seeing exactly?


 Thanks
 Ian



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [Q] CMM error (cross-powerpc-linux backend)

2012-01-09 Thread Gabor Greif
On 1/9/12, Simon Marlow marlo...@gmail.com wrote:
 On 04/01/2012 15:48, Gabor Greif wrote:
 Hi hackers,

 I got my cross-ghc so far that it compiles its own libraries, now onto the
 rts!

 BTW, if you're working on cross compilation, are you aware of Stephen
 Blackheath's work?

 http://www.haskell.org/pipermail/iphone/2011-November/94.html

Hi Simon,

no, I did not see this before. Unfortunately (for me) it looks like it
is llvm-based so, it is wildly out of our possibilities. We only have
a vanilla gcc-3.4.3 for our PPC target. So I'll have pull it off
myself. Anyway, I'll have a look into those patches in a calm hour.

Thanks and cheers,

Gabor



 Stephen, I haven't looked at your patches, can you summarise what you've
 done?  Do you think we'll want to pull it in as is, or will it need more
 work?  Does it follow the general plan in

   http://hackage.haskell.org/trac/ghc/wiki/CrossCompilation

 ?

 Cheers,
   Simon


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [PATCH] use (GHC) idiomatic types

2012-01-09 Thread Gabor Greif
Hi Simon,

as I am now done with OFFSET and TYPE_SIZE computations for cross-ghc,
these also popped up

https://github.com/ggreif/ghc/commit/77320765550bfa603052f0334d2d681134b63da0
https://github.com/ggreif/ghc/commit/4edcfb16c3b45dc595630269d4a566b87183884d

this one is cleanup:
https://github.com/ggreif/ghc/commit/9bc6f79d4a764a6a19bbc4fb3cc04c24feee2923

Cheers,

   Gabor

On 1/9/12, Simon Marlow marlo...@gmail.com wrote:
 Thanks, I'll push.

 Cheers,
   Simon


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[PATCH] use (GHC) idiomatic types

2012-01-07 Thread Gabor Greif
---
 includes/rts/storage/GC.h |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/includes/rts/storage/GC.h b/includes/rts/storage/GC.h
index fef8e00..26c5593 100644
--- a/includes/rts/storage/GC.h
+++ b/includes/rts/storage/GC.h
@@ -67,7 +67,7 @@ typedef struct nursery_ {
 } nursery;
 
 typedef struct generation_ {
-unsigned int   no; // generation number
+natno; // generation number
 
 bdescr *   blocks; // blocks in this gen
 memcount   n_blocks;// number of blocks
@@ -85,9 +85,9 @@ typedef struct generation_ {
 struct generation_ *to;// destination gen for live objects
 
 // stats information
-unsigned int collections;
-unsigned int par_collections;
-unsigned int failed_promotions;
+nat collections;
+nat par_collections;
+nat failed_promotions;
 
 // 
 // Fields below are used during GC only
-- 
1.7.7.4


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [PATCH] update copyright, cite realistic version numbers, fix a smattering of typos

2012-01-07 Thread Gabor Greif
No problem!

as you can see I am involved in some janitorial activity to get up to
pace with git, so here are some more patches (from my github fork for
cross-compilation)

https://github.com/ggreif/ghc/commit/da8c8345512958fc55650fc265f2cdc2549a98b2
https://github.com/ggreif/ghc/commit/2e6c2551ff7b414a185779075d47a96679acd716

the latter one I have also sent to the list:
http://www.haskell.org/pipermail/cvs-ghc/2012-January/069529.html

No idea which format is easier to you...

A bit of motivation for the second patch. I have to figure out the
target system byte offsets from all relevant struct members and feed
mkDerivedConstants from that. I have a small toolchain that kicks in
when cross-compiling, and it helps me reduce the toolchain complexity
by not resorting to types like unsigned int for example. 'nat' is
being used in many places already and seems only natural (sic) to use
it here too.

Cheers,

   Gabor

On 1/7/12, Ian Lynagh ig...@earth.li wrote:
 On Thu, Jan 05, 2012 at 03:33:32AM +0100, Gabor Greif wrote:
 ---
  configure.ac |   20 ++--
  1 files changed, 10 insertions(+), 10 deletions(-)

 Thanks for the patch. This was applied as
 9186d92f381c49720da96b8fc59339af7be951bd.


 Thanks
 Ian



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [PATCH] use C-style comments

2012-01-06 Thread Gabor Greif
Thanks for the explanation, I'll back out this one from my local set.

Cheers,

  Gabor

On 1/6/12, Simon Marlow marlo...@gmail.com wrote:
 I tend to use C++ style rather than C style for single-line comments,
 except for code that will be #included into Haskell source.

 ...

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [PATCH] abstract away from the 'build-toolchain'-dependent sizeof(...) operator

2012-01-06 Thread Gabor Greif
On 1/6/12, Simon Marlow marlo...@gmail.com wrote:
 On 05/01/2012 18:41, Gabor Greif wrote:
 The sizes obtained this way do not work on a target system in general.
 So in a future cross-compilable setup we need another way of obtaining
 expansions for the macros OFFSET, FIELD_SIZE and TYPE_SIZE.

 Guarded against accidental use of 'sizeof' by poisoning.

 Verified that the generated *Constants.h/hs files are unchanged.

 Ok, I'll push this one.

Awesome, what about this one?

http://www.haskell.org/pipermail/cvs-ghc/2012-January/069412.html

Thanks and cheers,

   Gabor


 Cheers,
   Simon



 ---

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [Q] CMM error (cross-powerpc-linux backend)

2012-01-05 Thread Gabor Greif
Okay, mystery solved. The STG registers obtain the size of a host
pointer (which in my case is 64 bits) even for the target
architectures that are 32 bits.

include/Types.h takes care to check target pointer size here:
 #if SIZEOF_VOID_P == 4

but goes on to define
 typedef StgWord*   StgPtr;

which ends up as the datatype of registers:
 typedef union {
 StgWordw;
 ...
 StgPtr p;
 } StgUnion;

 typedef struct StgRegTable_ {
   StgUnion  rR1;
   StgUnion  rR2;
   ...

So StgUnion has size of 8 (in my --host=x86_64-redhat-linux), which
messes up the offset calculations into StgRegTable_. These are done by
includes/mkDerivedConstants.c which is compiled and executed on the
host platform. So the pointer sizes of host leak into the target
offsets.

I have an elegant idea how to get this right (without any impact for
HOST == TARGET).

Now I just have to implement my idea, finish the cross toolset and
submit the patches.

No more creepy interactions between HOST and TARGET!

Cheers,

Gabor


On 1/4/12, Gabor Greif ggr...@gmail.com wrote:
 Hi hackers,

 I got my cross-ghc so far that it compiles its own libraries, now onto the
 rts!

 All goes right, until I get:

 inplace/bin/ghc-stage1   -H64m -O0 -fasm -Iincludes -Irts
 -Irts/dist/build -DCOMPILING_RTS -package-name rts  -dcmm-lint  -i
 -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build
 -Irts/dist/build/autogen-optc-DCOMPILING_GHC-optc-O2   -c
 rts/Apply.cmm -o rts/dist/build/Apply.o
 Cmm lint error:
   in proc stg_AP_STACK_entry
 in basic block c2g
   in assignment:
 _c21::I32 = I64[_c20::I32 + 4 + 8];
 Reg ty: I32
 Rhs ty: I64


 For some reason I64 appears but that should be avoided in the
 powerpc-linux backend :-(
 My --host is x86_64-linux, so it may creep in from there.

...

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[PATCH] abstract away from the 'build-toolchain'-dependent sizeof(...) operator

2012-01-05 Thread Gabor Greif
The sizes obtained this way do not work on a target system in general.
So in a future cross-compilable setup we need another way of obtaining
expansions for the macros OFFSET, FIELD_SIZE and TYPE_SIZE.

Guarded against accidental use of 'sizeof' by poisoning.

Verified that the generated *Constants.h/hs files are unchanged.
---
 includes/mkDerivedConstants.c |   24 ++--
 1 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/includes/mkDerivedConstants.c b/includes/mkDerivedConstants.c
index 6688330..8d2e789 100644
--- a/includes/mkDerivedConstants.c
+++ b/includes/mkDerivedConstants.c
@@ -1,6 +1,6 @@
 /* --
  *
- * (c) The GHC Team, 1992-2004
+ * (c) The GHC Team, 1992-2012
  *
  * mkDerivedConstants.c
  *
@@ -17,11 +17,11 @@
  * We need offsets of profiled things... better be careful that this
  * doesn't affect the offsets of anything else.
  */
+
 #define PROFILING
 #define THREADED_RTS
 
 #include Rts.h
-
 #include Stable.h
 #include Capability.h
 
@@ -30,6 +30,10 @@
 #define str(a,b) #a _ #b
 
 #define OFFSET(s_type, field) ((size_t)(((s_type*)0)-field))
+#define FIELD_SIZE(s_type, field) ((unsigned long)sizeof(((s_type*)0)-field))
+#define TYPE_SIZE(type) (sizeof(type))
+
+#pragma GCC poison sizeof
 
 #if defined(GEN_HASKELL)
 #define def_offset(str, offset)  \
@@ -44,7 +48,7 @@
 #define ctype(type) /* nothing */
 #else
 #define ctype(type) \
-printf(#define SIZEOF_ #type  %lu\n, (unsigned long)sizeof(type));
+printf(#define SIZEOF_ #type  %lu\n, (unsigned long)TYPE_SIZE(type));
 #endif
 
 #if defined(GEN_HASKELL)
@@ -59,7 +63,7 @@
 */
 #define field_type_(str, s_type, field) \
 printf(#define REP_ str  b); \
-printf(%lu\n, (unsigned long)sizeof 
(__typeof__(s_type*)0)-field * 8);
+printf(%lu\n, FIELD_SIZE(s_type, field) * 8);
 #define field_type_gcptr_(str, s_type, field) \
 printf(#define REP_ str  gcptr\n);
 #endif
@@ -105,18 +109,18 @@
 #endif
 
 #define struct_size(s_type) \
-def_size(#s_type, sizeof(s_type));
+def_size(#s_type, TYPE_SIZE(s_type));
 
 /*
  * Size of a closure type, minus the header, named SIZEOF_type_NoHdr
  * Also, we #define SIZEOF_type to be the size of the whole closure for .cmm.
  */
 #define closure_size(s_type) \
-def_size(#s_type _NoHdr, sizeof(s_type) - sizeof(StgHeader)); \
-def_closure_size(#s_type, sizeof(s_type) - sizeof(StgHeader));
+def_size(#s_type _NoHdr, TYPE_SIZE(s_type) - TYPE_SIZE(StgHeader)); \
+def_closure_size(#s_type, TYPE_SIZE(s_type) - TYPE_SIZE(StgHeader));
 
 #define thunk_size(s_type) \
-def_size(#s_type _NoThunkHdr, sizeof(s_type) - sizeof(StgThunkHeader)); \
+def_size(#s_type _NoThunkHdr, TYPE_SIZE(s_type) - 
TYPE_SIZE(StgThunkHeader)); \
 closure_size(s_type)
 
 /* An access macro for use in C-- sources. */
@@ -124,7 +128,7 @@
 printf(#define  str (__ptr__)  REP_ str 
[__ptr__+SIZEOF_StgHeader+OFFSET_ str ]\n);
 
 #define closure_field_offset_(str, s_type,field) \
-def_offset(str, OFFSET(s_type,field) - sizeof(StgHeader));
+def_offset(str, OFFSET(s_type,field) - TYPE_SIZE(StgHeader));
 
 #define closure_field_offset(s_type,field) \
 closure_field_offset_(str(s_type,field),s_type,field)
@@ -156,7 +160,7 @@
 
 /* Byte offset for a TSO field, minus the header and variable prof bit. */
 #define tso_payload_offset(s_type, field) \
-def_offset(str(s_type,field), OFFSET(s_type,field) - sizeof(StgHeader) - 
sizeof(StgTSOProfInfo));
+def_offset(str(s_type,field), OFFSET(s_type,field) - TYPE_SIZE(StgHeader) 
- TYPE_SIZE(StgTSOProfInfo));
 
 /* Full byte offset for a TSO field, for use from Cmm */
 #define tso_field_offset_macro(str) \
-- 
1.7.7.4


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[PATCH] use C-style comments

2012-01-05 Thread Gabor Greif
Also remove underscore identifier as
it is not needed, StgFunTable is now
consistent with StgRegTable.
---
 includes/stg/Regs.h |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/includes/stg/Regs.h b/includes/stg/Regs.h
index bfc3d4b..bf17b7e 100644
--- a/includes/stg/Regs.h
+++ b/includes/stg/Regs.h
@@ -1,6 +1,6 @@
 /* 
-
  *
- * (c) The GHC Team, 1998-2009
+ * (c) The GHC Team, 1998-2012
  *
  * Registers in the STG machine.
  *
@@ -21,7 +21,7 @@
  *
  * The register set is backed by a table in memory (struct
  * StgRegTable).  If a particular STG register is not mapped to a
- * machine register, then the apprpriate slot in this table is used
+ * machine register, then the appropriate slot in this table is used
  * instead.  
  *
  * This table is itself pointed to by another register, BaseReg.  If
@@ -58,7 +58,7 @@ typedef union {
  *register, probably because there's a shortage of real registers.
  * 2) caller-saves registers are saved across a CCall
  */
-typedef struct StgRegTable_ {
+typedef struct {
   StgUnion   rR1;
   StgUnion   rR2;
   StgUnion   rR3;
@@ -80,13 +80,13 @@ typedef struct StgRegTable_ {
   StgPtr rSpLim;
   StgPtr rHp;
   StgPtr rHpLim;
-  struct CostCentreStack_ * rCCCS;  // current cost-centre-stack
+  struct CostCentreStack_ * rCCCS;  /* current cost-centre-stack */
   struct StgTSO_ * rCurrentTSO;
   struct nursery_ *rNursery;
   struct bdescr_ * rCurrentNursery; /* Hp/HpLim point into this block */
   struct bdescr_ * rCurrentAlloc;   /* for allocation using allocate() */
   StgWord rHpAlloc;/* number of *bytes* being allocated in heap */
-  StgWord rRet;  // holds the return code of the thread
+  StgWord rRet;  /* holds the return code of the thread */
 } StgRegTable;
 
 #if IN_STG_CODE
-- 
1.7.7.4


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [Q] CMM error (cross-powerpc-linux backend)

2012-01-05 Thread Gabor Greif
On 1/5/12, Simon Marlow marlo...@gmail.com wrote:
 On 05/01/2012 12:33, Gabor Greif wrote:
 Okay, mystery solved. The STG registers obtain the size of a host
 pointer (which in my case is 64 bits) even for the target
 architectures that are 32 bits.

 ...

 So StgUnion has size of 8 (in my --host=x86_64-redhat-linux), which
 messes up the offset calculations into StgRegTable_. These are done by
 includes/mkDerivedConstants.c which is compiled and executed on the
 host platform. So the pointer sizes of host leak into the target
 offsets.

 Yes, the contents of DerivedConstants.h and HaskellConstants.hs should
 be correct for the target platform, not the host platform.  So you
 either have to compile and run mkDerivedConstants on the target, or do
 it using the cross toolchain on the host platform (which ought to be
 possible, since autoconf does this kind of thing).

Yeah, this is my plan. I'll start submitting my cross-compilation
branch on github next week but in the meantime I am sending minor
cleanup patches to this list to get comfortable with the git workflow.
I would be thrilled if someone could give them a look (or even commit
:-)

Cheers,

Gabor


 Cheers,
   Simon


 I have an elegant idea how to get this right (without any impact for
 HOST == TARGET).

 Now I just have to implement my idea, finish the cross toolset and
 submit the patches.

 No more creepy interactions between HOST and TARGET!

 Cheers,

  Gabor


 On 1/4/12, Gabor Greifggr...@gmail.com  wrote:
 Hi hackers,

 I got my cross-ghc so far that it compiles its own libraries, now onto
 the
 rts!

 All goes right, until I get:

 inplace/bin/ghc-stage1   -H64m -O0 -fasm -Iincludes -Irts
 -Irts/dist/build -DCOMPILING_RTS -package-name rts  -dcmm-lint  -i
 -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build
 -Irts/dist/build/autogen-optc-DCOMPILING_GHC-optc-O2   -c
 rts/Apply.cmm -o rts/dist/build/Apply.o
 Cmm lint error:
in proc stg_AP_STACK_entry
  in basic block c2g
in assignment:
  _c21::I32 = I64[_c20::I32 + 4 + 8];
  Reg ty: I32
  Rhs ty: I64


 For some reason I64 appears but that should be avoided in the
 powerpc-linux backend :-(
 My --host is x86_64-linux, so it may creep in from there.

 ...

 ___
 Cvs-ghc mailing list
 Cvs-ghc@haskell.org
 http://www.haskell.org/mailman/listinfo/cvs-ghc



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[Q] CMM error (cross-powerpc-linux backend)

2012-01-04 Thread Gabor Greif
Hi hackers,

I got my cross-ghc so far that it compiles its own libraries, now onto the rts!

All goes right, until I get:

inplace/bin/ghc-stage1   -H64m -O0 -fasm -Iincludes -Irts
-Irts/dist/build -DCOMPILING_RTS -package-name rts  -dcmm-lint  -i
-irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build
-Irts/dist/build/autogen-optc-DCOMPILING_GHC-optc-O2   -c
rts/Apply.cmm -o rts/dist/build/Apply.o
Cmm lint error:
  in proc stg_AP_STACK_entry
in basic block c2g
  in assignment:
_c21::I32 = I64[_c20::I32 + 4 + 8];
Reg ty: I32
Rhs ty: I64


For some reason I64 appears but that should be avoided in the
powerpc-linux backend :-(
My --host is x86_64-linux, so it may creep in from there.

So my question, which include I should look at? I am pretty newbie with CMM.

Cheers and thanks,

Gabor


PS: include/ghcautoconf.h (almost) looks good:


/* The size of a `char', as computed by sizeof. */
#define SIZEOF_CHAR 1

/* The size of a `double', as computed by sizeof. */
#define SIZEOF_DOUBLE 8

/* The size of a `float', as computed by sizeof. */
#define SIZEOF_FLOAT 4

/* The size of a `int', as computed by sizeof. */
#define SIZEOF_INT 4

/* The size of a `long', as computed by sizeof. */
#define SIZEOF_LONG 4

/* The size of a `long long', as computed by sizeof. */
#define SIZEOF_LONG_LONG 8

/* The size of a `short', as computed by sizeof. */
#define SIZEOF_SHORT 2

/* The size of a `unsigned char', as computed by sizeof. */
#define SIZEOF_UNSIGNED_CHAR 1

/* The size of a `unsigned int', as computed by sizeof. */
#define SIZEOF_UNSIGNED_INT 4

/* The size of a `unsigned long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG 4

/* The size of a `unsigned long long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG_LONG 8

/* The size of a `unsigned short', as computed by sizeof. */
#define SIZEOF_UNSIGNED_SHORT 2

/* The size of a `void *', as computed by sizeof. */
#define SIZEOF_VOID_P 4

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[PATCH] update copyright, cite realistic version numbers, fix a smattering of typos

2012-01-04 Thread Gabor Greif
---
 configure.ac |   20 ++--
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index eda926b..b9f000d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ dnl (run grep '^dnl \*' configure.ac | sed -e 's/dnl / /g; 
s/\*\*/   +/g;'
 dnl  (or some such) to see the outline of this file)
 dnl
 #
-# (c) The University of Glasgow 1994-2004
+# (c) The University of Glasgow 1994-2012
 #
 # Configure script template for GHC
 #
@@ -18,11 +18,11 @@ AC_INIT([The Glorious Glasgow Haskell Compilation System], 
[7.5], [glasgow-haske
 # Set this to YES for a released version, otherwise NO
 : ${RELEASE=NO}
 
-# The primary version (e.g. 6.7, 6.6.1) is set in the AC_INIT line
+# The primary version (e.g. 7.5, 7.4.1) is set in the AC_INIT line
 # above.  If this is not a released version, then we will append the
-# date to the version number (e.g. 6.7.20070204).  The date is
+# date to the version number (e.g. 7.4.20111220).  The date is
 # constructed by finding the date of the most recent patch in the
-# darcs repository.  If this is a source distribution (not a darcs
+# git repository.  If this is a source distribution (not a git
 # checkout), then we ship a file 'VERSION' containing the full version
 # when the source distribution was created.
 
@@ -257,7 +257,7 @@ then
 NM=$hardtop/inplace/mingw/bin/nm.exe
 fp_prog_ar_raw=$hardtop/inplace/mingw/bin/ar.exe
 
-# NB. If you update the tarbballs to a new version of gcc, don't
+# NB. If you update the tarballs to a new version of gcc, don't
 # forget to tweak the paths in driver/gcc/gcc.c.
 if ! test -d inplace/mingw ||
  test inplace/mingw -ot ghc-tarballs/mingw/binutils*.tar.lzma  ||
@@ -669,8 +669,8 @@ then
   AC_DEFINE([HAVE_LIBM], [1], [Define to 1 if you need to link with libm])
 fi
 
-dnl ** check whether this machine has BFD and liberty installed (used for 
debugging)
-dnlthe order of these tests matters: bfd needs liberty
+dnl ** check whether this machine has BFD and libiberty installed (used for 
debugging)
+dnlthe order of these tests matters: bfd needs libiberty
 AC_CHECK_LIB(iberty, xmalloc)
 AC_CHECK_LIB(bfd,bfd_uncompress_section_contents)
 
@@ -694,7 +694,7 @@ dnl --
 dnl ** can we get alloca?
 AC_FUNC_ALLOCA
 
-dnl ** Working vfork?
+dnl ** working vfork?
 AC_FUNC_FORK
 
 dnl ** determine whether or not const works
@@ -750,7 +750,7 @@ if test -n $GTK_CONFIG; then
 fi
 AC_SUBST([GTK_CONFIG])
 
-#Checking for PAPI
+# checking for PAPI
 AC_CHECK_LIB(papi, PAPI_library_init, HavePapiLib=YES, HavePapiLib=NO)
 AC_CHECK_HEADER([papi.h], [HavePapiHeader=YES], [HavePapiHeader=NO])
 AC_SUBST(HavePapiLib)
@@ -799,7 +799,7 @@ AC_CONFIG_FILES([mk/config.mk mk/install.mk mk/project.mk 
compiler/ghc.cabal ghc
 AC_CONFIG_COMMANDS([mk/stamp-h],[echo timestamp  mk/stamp-h])
 AC_OUTPUT
 
-# We get caught by
+# We got caught by
 # http://savannah.gnu.org/bugs/index.php?1516
 # $(eval ...) inside conditionals causes errors
 # with make 3.80, so warn the user if it looks like they're about to
-- 
1.7.7.4


___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


HTYPE_USECONDS_T missing on RHEL 5

2012-01-02 Thread Gabor Greif
Hi all,

I am trying to bootstrap the latest source snapshot on a RHEL system:

  ggreif@mine [!138] uname -a
  Linux mine 2.6.18-274.7.1.el5 #1 SMP Mon Oct 17 11:57:14 EDT 2011 x86_64 
  x86_64 x86_64 GNU/Linux


causes compilation error when building base lib with a stage1 compiler:

  inplace/bin/ghc-stage1 -prof  -H32m -O-package-name base-4.5.0.0 
  -hide-all-packages -i -ilibraries/base/. 
  -ilibraries/base/dist-install/build 
  -ilibraries/base/dist-install/build/autogen 
  -Ilibraries/base/dist-install/build 
  -Ilibraries/base/dist-install/build/autogen -Ilibraries/base/include   
  -optP-DOPTIMISE_INTEGER_GCD_LCM -optP-include 
  -optPlibraries/base/dist-install/build/autogen/cabal_macros.h -package 
  ghc-prim-0.2.0.0 -package integer-gmp-0.4.0.0 -package rts-1.0 -split-objs 
  -package-name base -XHaskell98 -XCPP -O2  -no-user-package-conf -rtsopts
   -odir libraries/base/dist-install/build -hidir 
  libraries/base/dist-install/build -stubdir 
  libraries/base/dist-install/build -hisuf p_hi -osuf  p_o -hcsuf p_hc -c 
  libraries/base/./Foreign/C/Types.hs -o 
  libraries/base/dist-install/build/Foreign/C/Types.p_o
 
  libraries/base/Foreign/C/Types.hs:210:31:
  Not in scope: type constructor or class `HTYPE_USECONDS_T'
 
  libraries/base/Foreign/C/Types.hs:210:189:
  Not in scope: type constructor or class `HTYPE_USECONDS_T'
 
  libraries/base/Foreign/C/Types.hs:210:269:
  Not in scope: type constructor or class `HTYPE_USECONDS_T'
 
  libraries/base/Foreign/C/Types.hs:210:385:
  Not in scope: type constructor or class `HTYPE_USECONDS_T'
 
  libraries/base/Foreign/C/Types.hs:210:462:
  Not in scope: type constructor or class `HTYPE_USECONDS_T'
 
  libraries/base/Foreign/C/Types.hs:210:545:
  Not in scope: type constructor or class `HTYPE_USECONDS_T'

looking at configury:

  ./libraries/base/config.log:configure:12452: checking Haskell type for 
  suseconds_t
  ./libraries/base/config.log:fptools_cv_htype_sup_suseconds_t=yes
  ./libraries/base/config.log:fptools_cv_htype_sup_useconds_t=no
  ./libraries/base/config.log:fptools_cv_htype_suseconds_t=Int64
  ./libraries/base/config.log:fptools_cv_htype_useconds_t=NotReallyAType

these checks end up in

  ggreif@mine [!129] find . -name *.h | xargs grep useconds_t
  ./libraries/base/include/HsBaseConfig.h:/* Define to Haskell type for 
  suseconds_t */
  ./libraries/base/include/HsBaseConfig.h:/* Define to Haskell type for 
  useconds_t */

but without a #define for HTYPE_USECONDS_T!

So I edited the Foreign/C/Types.hs file to read

  ggreif@mine [!127] xemacs +210 libraries/base/Foreign/C/Types.hs


-- | Haskell type representing the C @clock_t@ type.
ARITHMETIC_TYPE(CClock,tyConCClock,CClock,HTYPE_CLOCK_T)
-- | Haskell type representing the C @time_t@ type.
ARITHMETIC_TYPE(CTime,tyConCTime,CTime,HTYPE_TIME_T)
#ifdef HTYPE_USECONDS_T
-- | Haskell type representing the C @useconds_t@ type.
ARITHMETIC_TYPE(CUSeconds,tyConCUSeconds,CUSeconds,HTYPE_USECONDS_T)
#elif defined(HTYPE_SUSECONDS_T)
ARITHMETIC_TYPE(CUSeconds,tyConCUSeconds,CUSeconds,HTYPE_SUSECONDS_T)
#endif
#ifdef HTYPE_SUSECONDS_T
-- | Haskell type representing the C @suseconds_t@ type.
ARITHMETIC_TYPE(CSUSeconds,tyConCSUSeconds,CSUSeconds,HTYPE_SUSECONDS_T)
#elif defined(HTYPE_USECONDS_T)
ARITHMETIC_TYPE(CSUSeconds,tyConCSUSeconds,CSUSeconds,HTYPE_USECONDS_T)
#endif

The strategy is to offer the opposite signed type when either one is missing.

Does this make sense and should it be included into the next v7.4 snapshot
(as well as mainline)? The 7.2 branch could also get this change...

Cheers,

Gabor

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc