Re: Proposal: Gitolite for repository management

2013-07-31 Thread Herbert Valerio Riedel
On 2013-07-31 at 03:21:48 +0200, Simon Peyton-Jones wrote:

[...]

 * I have lots of check-out repos.  Each contains lots of .git/config files 
because of the multi-repo nature of the GHC build system.  It would be
a pain to have to edit each individually.  Maybe you can tell us a sync-all
command to update the URL and pushurl configs, once per tree.

The following should do the trick with the current `./sync-all` for developers:

  ./sync-all -r ssh://g...@git.haskell.org remote set-url origin
  ./sync-all -r ssh://g...@git.haskell.org remote set-url --push origin

Non-authenticated users who have been using only the http:// urls don't
have to switch right-away (as the old http://darcs.haskell.org uris will
continue to work), but in the long-term they'll want to update their
Git urls via

  ./sync-all -r http://git.haskell.org remote set-url origin

not the least to benefit from the more efficient Git's smart http
transport[1] (should we decide to enable that on
http://git.haskell.org/).

PS: The reason I modification to `sync-all` are mentioned is because it
contains references to the old Git urls in its emitted help texts.

[1]: http://git-scm.com/blog/2010/03/04/smart-http.html

Cheers,
  hvr

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


Re: HEADS UP: New repository

2013-07-31 Thread Gabor Greif
Hi Ian,

who is in charge of setting up the repo mirror on https://github.com/ghc/ ?

Cheers,

Gabor

On 7/30/13, Ian Lynagh i...@well-typed.com wrote:

 Hi all,

 I've added a libffi-tarballs repo. This means that you'll need to do
 ./sync-all get
 after you next pull.


 Thanks
 Ian


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


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


Re: Two Hoopl questions

2013-07-31 Thread Jan Stolarek
OK, I think I didn't give enough explanation in my last mail. My understanding 
is that entry block of the graph will be initialized with a fact (Const 
M.empty), while every other node will be initialized with Bottom. Now, when I 
reach a block that is first block in a loop it will have more than one 
predecessor (let's assume that it has two). One predecessor will have fact 
(Const ...) propagated from the entry node, but the other one will not be 
analyzed yet and therefore should be Bottom. That's why I think it should be 
picked up by first equation of joinCpFacts. Later on, when we reach end of a 
loop we will propagate (Const ...) to the entry block of a loop and only then 
we will be joining two (Const ...) facts - that's when second equation of 
joinCpFacts should come in to play.

Janek

- Oryginalna wiadomość -
Od: Jan Stolarek jan.stola...@p.lodz.pl
Do: Edward Z. Yang ezy...@mit.edu
DW: Simon Peyton-Jones simo...@microsoft.com, ghc-devs 
ghc-devs@haskell.org
Wysłane: środa, 31 lipiec 2013 10:00:51
Temat: Re: Two Hoopl questions

For some reason they are ignored, or at least the rewritten code looks as if 
only a single pass was done. I have facts represented like this:

  data AssignmentFactBot a = Bottom
   | Const (M.Map a CmmExpr)

I initialize the entry node with:

 g' - dataflowPassFwd graph [(entry_blk, Const M.empty)] $
   analRewFwd cpLattice cpTransfer (cpRewrite dflags)

And lattice is initialized with Bottom. Now the join function:

joinCpFactsold   Bottom = panic AAA
joinCpFacts (Const old) (Const new) = ...
joinCpFacts Bottom Bottom= panic Joining bottom with bottom
joinCpFacts Bottom (Const _) = panic Joining bottom with const

Two last panics are intended - they should never happen. The first one is for 
debugging purposes and surprisingly it is never called - only the second 
equation is. I'm puzzled. Where did I go wrong?

Janek


- Oryginalna wiadomość -
Od: Edward Z. Yang ezy...@mit.edu
Do: Jan Stolarek jan.stola...@p.lodz.pl
DW: Simon Peyton-Jones simo...@microsoft.com, ghc-devs 
ghc-devs@haskell.org
Wysłane: wtorek, 30 lipiec 2013 20:40:53
Temat: Re: Two Hoopl questions

What happens when you put a loop in your code?

Edward

Excerpts from Jan Stolarek's message of Tue Jul 30 08:34:44 -0700 2013:
 I'll allow myself to ask my second question again:
 
 2) In my algorithm I need to initialize all of the blocks in a graph with 
 bottom element of a lattice, except for the entry block, which needs some 
 other initial values. I've written something like this:
 
 cmmCopyPropagation dflags graph = do
 let entry_blk = g_entry graph
 g' - dataflowPassFwd graph [(entry_blk, (Top, Top))] $
 analRewFwd cpLattice cpTransfer cpRewrite
 return . fst $ g'
 
 cpLattice = DataflowLattice copy propagation (Bottom, Bottom) cpJoin
 
 However, it seems that Bottom values passed to cpLattice are ignored - I 
 could replace second parameter to DataflowLattice with `undefined` and the 
 code would still run without causing an error. Is there something obviously 
 wrong in the way I pass initial fact values to dataflowPassFwd, or should I 
 look for the problem in other parts of my code?
 
 Janek


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


Mentoring for implementing #8004

2013-07-31 Thread David Luposchainsky
Hey Devs,

I haven't worked on GHC before, so I'm having trouble finding an entry
point to implementing the AMP warnings (#8004). I only have a rough
working knowledge of GHC's inner workings, but it would be a shame if
the ticket wasn't resolved until the 7.8 deadline (which is somewhere in
September if I remember it right).
My last approach was grepping through the source for DEPRECATED and
seeing whether there would be an appropriate place for these warnings
there, but that wasn't very fruitful.

Long story short: can anyone point me in the right direction? I assume
the right place to look is somewhere in the typechecker where there's a
type class environment, and that's as far as I've come. (It's hard to
understand thousands of lines when you're not even sure you're in the
right place ...)

Greetings,
David

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


Re: Mentoring for implementing #8004

2013-07-31 Thread Richard Eisenberg
I haven't played much with instances, but it looks to me like 
tcInstDecls1, in typecheck/TcInstDecls.lhs, is a good place. Toward the 
end of the body of that function is a bunch of checks in the style that 
you will need to write (such as for bogus Typeable instances).


I hope this helps!
Richard

On 2013-07-31 13:56, David Luposchainsky wrote:

Hey Devs,

I haven't worked on GHC before, so I'm having trouble finding an entry
point to implementing the AMP warnings (#8004). I only have a rough
working knowledge of GHC's inner workings, but it would be a shame if
the ticket wasn't resolved until the 7.8 deadline (which is somewhere 
in

September if I remember it right).
My last approach was grepping through the source for DEPRECATED and
seeing whether there would be an appropriate place for these warnings
there, but that wasn't very fruitful.

Long story short: can anyone point me in the right direction? I assume
the right place to look is somewhere in the typechecker where there's a
type class environment, and that's as far as I've come. (It's hard to
understand thousands of lines when you're not even sure you're in the
right place ...)

Greetings,
David

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


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


RE: Unit-testing of GHC code

2013-07-31 Thread Simon Peyton-Jones
If you can make tests for some particular part of GHC, go right ahead.  I don't 
really know how to test the whole of GHC using Quickcheck

Simon

|  -Original Message-
|  From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Jan 
Stolarek
|  Sent: 30 July 2013 16:28
|  To: ghc-devs
|  Subject: Unit-testing of GHC code
|  
|  I spent whole day looking for a bug that lurks somewhere in my code, but I 
know I
|  could find it in 2-3 hours if I only could write unit tests for my code. So 
the
|  question is: how can I write HUnit and QuickCheck (and maybe SmallCheck) 
tests
|  for GHC and possibly make them a part of testsuite?
|  
|  Janek
|  
|  ___
|  ghc-devs mailing list
|  ghc-devs@haskell.org
|  http://www.haskell.org/mailman/listinfo/ghc-devs



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


RE: Proposal: Gitolite for repository management

2013-07-31 Thread Simon Peyton-Jones
Excellent -- but don't just tell me! Could you add that guidance to the wiki?

Thanks

SImon

|  -Original Message-
|  From: Herbert Valerio Riedel [mailto:h...@gnu.org]
|  Sent: 31 July 2013 10:06
|  To: Simon Peyton-Jones
|  Cc: Austin Seipp; ghc-devs@haskell.org; Herbert Valerio Riedel
|  Subject: Re: Proposal: Gitolite for repository management
|  
|  On 2013-07-31 at 03:21:48 +0200, Simon Peyton-Jones wrote:
|  
|  [...]
|  
|   * I have lots of check-out repos.  Each contains lots of .git/config files
|  because of the multi-repo nature of the GHC build system.  It would be
|  a pain to have to edit each individually.  Maybe you can tell us a 
sync-all
|  command to update the URL and pushurl configs, once per tree.
|  
|  The following should do the trick with the current `./sync-all` for 
developers:
|  
|./sync-all -r ssh://g...@git.haskell.org remote set-url origin
|./sync-all -r ssh://g...@git.haskell.org remote set-url --push origin
|  
|  Non-authenticated users who have been using only the http:// urls don't
|  have to switch right-away (as the old http://darcs.haskell.org uris will
|  continue to work), but in the long-term they'll want to update their
|  Git urls via
|  
|./sync-all -r http://git.haskell.org remote set-url origin
|  
|  not the least to benefit from the more efficient Git's smart http
|  transport[1] (should we decide to enable that on
|  http://git.haskell.org/).
|  
|  PS: The reason I modification to `sync-all` are mentioned is because it
|  contains references to the old Git urls in its emitted help texts.
|  
|  [1]: http://git-scm.com/blog/2010/03/04/smart-http.html
|  
|  Cheers,
|hvr



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


Hoopl 3.9 not on hackage

2013-07-31 Thread Thomas Schilling
I just noticed that the latest version of hoopl (shipped with 7.6.3) is not on 
Hackage.  Is there a reason for this (other than oversight)?

/ Thomas


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: Unit-testing of GHC code

2013-07-31 Thread Ian Lynagh
On Wed, Jul 31, 2013 at 04:10:46PM +0200, Jan Stolarek wrote:
 
 and so on (Hunit would only be a convenient interface here). The question is 
 how can I import a GHC module from within the testsuite and call its 
 functions to test it they behave propertly? An attempt to simply import the 
 module results in compilation error:
 
 Failed to load interface for ‛Foo’
 It is a member of the hidden package ‛ghc-7.7.20130731’.
 Use -v to see a list of the files searched for.
 
 Is there a workaround for this?

You need to use -package ghc if you want to use the GHC API.


Thanks
Ian
-- 
Ian Lynagh, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com/

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


RE: [commit: ghc] master: Add NegativeLiterals extension (ef73963)

2013-07-31 Thread Simon Peyton-Jones
Ian,

Thanks...  but if you have added a new language extension, shouldn't you 
document it in the user manual?  What exactly is the different behaviour seen 
by the user?

Simon

|  -Original Message-
|  From: ghc-commits [mailto:ghc-commits-boun...@haskell.org] On Behalf Of Ian
|  Lynagh
|  Sent: 31 July 2013 20:12
|  To: ghc-comm...@haskell.org
|  Subject: [commit: ghc] master: Add NegativeLiterals extension (ef73963)
|  
|  Repository : http://darcs.haskell.org/ghc.git/
|  
|  On branch  : master
|  
|  http://hackage.haskell.org/trac/ghc/changeset/ef739635a8c2646112d2a1fa4c871
|  5704aff1f1f
|  
|  ---
|  
|  commit ef739635a8c2646112d2a1fa4c8715704aff1f1f
|  Author: Ian Lynagh i...@well-typed.com
|  Date:   Wed Jul 31 18:43:11 2013 +0100
|  
|  Add NegativeLiterals extension
|  
|  I'd been meaning to do this for some time, but finally got around to it
|  due to the overflowing literals warning. With that enabled, we were
|  getting a warning for
|  -128 :: Int8
|  as that is parsed as
|  negate (fromInteger 128)
|  which just happens to do the right thing, as
|  negate (fromInteger 128) = negate (-128) = -128
|  
|  ---
|  
|   compiler/main/DynFlags.hs |2 ++
|   compiler/parser/Lexer.x   |   17 +
|   compiler/utils/Util.lhs   |2 +-
|   3 files changed, 16 insertions(+), 5 deletions(-)
|  
|  diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
|  index eeb48ba..9a56b50 100644
|  --- a/compiler/main/DynFlags.hs
|  +++ b/compiler/main/DynFlags.hs
|  @@ -558,6 +558,7 @@ data ExtensionFlag
|  | Opt_LambdaCase
|  | Opt_MultiWayIf
|  | Opt_TypeHoles
|  +   | Opt_NegativeLiterals
|  | Opt_EmptyCase
|  deriving (Eq, Enum, Show)
|  
|  @@ -2726,6 +2727,7 @@ xFlags = [
| ( IncoherentInstances,  Opt_IncoherentInstances, nop ),
| ( PackageImports,   Opt_PackageImports, nop ),
| ( TypeHoles,Opt_TypeHoles, nop ),
|  +  ( NegativeLiterals, Opt_NegativeLiterals, nop ),
| ( EmptyCase,Opt_EmptyCase, nop )
| ]
|  
|  diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x
|  index 6871210..11d849a 100644
|  --- a/compiler/parser/Lexer.x
|  +++ b/compiler/parser/Lexer.x
|  @@ -385,12 +385,16 @@ $tab+ { warn Opt_WarnTabs (text Tab
|  character) }
|   -- when trying to be close to Haskell98
|   0 {
| -- Normal integral literals (:: Num a = a, from Integer)
|  -  @decimal   { tok_num positive 0 0 decimal }
|  -  0[oO] @octal   { tok_num positive 2 2 octal }
|  -  0[xX] @hexadecimal { tok_num positive 2 2 hexadecimal }
|  +  @decimal   { 
tok_num positive 0 0
|  decimal }
|  +  0[oO] @octal   { 
tok_num positive 2 2
|  octal }
|  +  0[xX] @hexadecimal { 
tok_num positive 2
|  2 hexadecimal }
|  +  @negative @decimal   / { ifExtension negativeLiteralsEnabled } {
|  tok_num negative 1 1 decimal }
|  +  @negative 0[oO] @octal   / { ifExtension negativeLiteralsEnabled } {
|  tok_num negative 3 3 octal }
|  +  @negative 0[xX] @hexadecimal / { ifExtension negativeLiteralsEnabled } {
|  tok_num negative 3 3 hexadecimal }
|  
| -- Normal rational literals (:: Fractional a = a, from Rational)
|  -  @floating_point{ strtoken tok_float }
|  +  @floating_point{ 
strtoken tok_float }
|  +  @negative @floating_point/ { ifExtension negativeLiteralsEnabled } {
|  strtoken tok_float }
|   }
|  
|   0 {
|  @@ -1870,6 +1874,8 @@ explicitNamespacesBit :: Int
|   explicitNamespacesBit = 29
|   lambdaCaseBit :: Int
|   lambdaCaseBit = 30
|  +negativeLiteralsBit :: Int
|  +negativeLiteralsBit = 31
|  
|  
|   always :: Int - Bool
|  @@ -1925,6 +1931,8 @@ explicitNamespacesEnabled :: Int - Bool
|   explicitNamespacesEnabled flags = testBit flags explicitNamespacesBit
|   lambdaCaseEnabled :: Int - Bool
|   lambdaCaseEnabled flags = testBit flags lambdaCaseBit
|  +negativeLiteralsEnabled :: Int - Bool
|  +negativeLiteralsEnabled flags = testBit flags negativeLiteralsBit
|  
|   -- PState for parsing options pragmas
|   --
|  @@ -1988,6 +1996,7 @@ mkPState flags buf loc =
|  .|. typeLiteralsBit `setBitIf` xopt 
Opt_DataKinds flags
|  .|. explicitNamespacesBit   `setBitIf` xopt 
Opt_ExplicitNamespaces
|  flags
|  .|. lambdaCaseBit   `setBitIf` xopt 
Opt_LambdaCase
|  flags
|  +   .|. negativeLiteralsBit `setBitIf` xopt 
Opt_NegativeLiterals
|  flags
| --
| setBitIf :: Int - Bool - Int
| b `setBitIf` cond | cond  

Re: Exposing newtype coercions to Haskell

2013-07-31 Thread Richard Eisenberg
Hi Joachim,

As discussed previously, I do think we need a way to store representational 
coercions. In my roles branch (which is getting close to pushing, I believe), I 
have created eqReprPrimTyCon, which is like eqPrimTyCon, but it is the type of 
coercions witnessing representational equality. The Id stored in a CoVarCo can 
usefully have a type headed by eqReprPrimTyCon.

If you're really eager to take a look, I use github to coordinate among 
computers; you can see the roles branch at github.com/goldfirere/ghc.

Richard

On Jul 24, 2013, at 8:31 AM, Joachim Breitner wrote:

 Hi,
 
 Am Dienstag, den 23.07.2013, 18:58 + schrieb Simon Peyton-Jones:
 If you add -XIncoherentInstances *just to the module that has instance
 IsNT a a*, then it'll work fine I think.  This says pick this
 instance even though an instantiation of the constraint might match a
 more specific instance.  You don't need the flag in importing
 modules.
 
 That does not seem to be the case: Enabling the flag just for the
 special IsNT a a instance does not work:
 
 
 Prelude GHC.NT :t  castNT :: (Either Int a) - (Either Age a)
 
 interactive:1:1:
Overlapping instances for IsNT a1 a1 arising from a use of ‛castNT’
Matching instances:
  instance [incoherent] IsNT a a -- Defined at interactive:12:10
  instance (IsNT a a', IsNT b b') = IsNT (Either a b) (Either a' b')
-- Defined at interactive:7:1
(The choice depends on the instantiation of ‛a1’
 To pick the first instance above, use -XIncoherentInstances
 when compiling the other instance declarations)
In the expression: castNT :: (Either Int a) - (Either Age a)
 
 (as correctly specified by the error message.)
 
 
 But now the solution is easy to see: When deriving IsNT, simply set the
 incoherent flag for every instance, independent of any active pragmas.
 
 Greetings,
 Joachim
 
 
 
 
 -- 
 Joachim “nomeata” Breitner
  m...@joachim-breitner.de • http://www.joachim-breitner.de/
  Jabber: nome...@joachim-breitner.de  • GPG-Key: 0x4743206C
  Debian Developer: nome...@debian.org
 
 ___
 ghc-devs mailing list
 ghc-devs@haskell.org
 http://www.haskell.org/mailman/listinfo/ghc-devs


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


Re: Hoopl 3.9 not on hackage

2013-07-31 Thread Carter Schonwald
relatedly: is norman ramsey (pro)actively maintaining it?

based upon remarks on #ghc earlier today, it sounded like a number of
people have warts/wishes about how to improve hoopl or make it nicer if
they could. (or at least that was my take away from their remarks, i'll
leave them to clarify further)


On Wed, Jul 31, 2013 at 2:52 PM, Thomas Schilling
nomin...@googlemail.comwrote:

 I just noticed that the latest version of hoopl (shipped with 7.6.3) is
 not on Hackage.  Is there a reason for this (other than oversight)?

 / Thomas

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


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


Re: [commit: ghc] master: Add NegativeLiterals extension (ef73963)

2013-07-31 Thread Ian Lynagh
On Wed, Jul 31, 2013 at 08:00:08PM +, Simon Peyton-Jones wrote:
 
 Thanks...  but if you have added a new language extension, shouldn't you 
 document it in the user manual?  What exactly is the different behaviour seen 
 by the user?

Yep; I've just pushed a patch.


Thanks
Ian
-- 
Ian Lynagh, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com/

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