RE: [Diffusion] [Build Failed] rGHCb78fa759bfb4: Simplify and improve CSE

2017-01-20 Thread Simon Peyton Jones via ghc-devs
I should have made it clearer that my "just below" measurement was *before* my 
patch.   So the situation before was just on the borderline, on my machine 
anyway.  (And the situation afterwards is still below the borderline on my 
machine, just not on harbourmaster.)

Simon

From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Simon Peyton 
Jones via ghc-devs
Sent: 20 January 2017 17:46
To: ghc-devs@haskell.org
Subject: RE: [Diffusion] [Build Failed] rGHCb78fa759bfb4: Simplify and improve 
CSE

I'm sorry about all these Phab failures.  I'm struggling with arc, and so 
committing directly.  It all validates fine on my machine.

They seem to be all about T1969.  It validates fine on my machine.  But only 
just!  On my machine I get peak_megabytes = 64; but on Harbormaster it seems to 
be 65 or 66.

But I think 64 is *just* within the 20% margin from 55, and 65 is just outside. 
  The increase might well be peak-memory sampling noise.

Anyway it looks as if the 20% increase all occurred some time ago.  Maybe we 
should look at when and why?

But meanwhile, Ben/Reid/David, if you agree that the increase is some time ago, 
would you like to re-centre the number and (maybe) open a ticket to find where 
the increase actually happened.

I have to go home now... apologies.

Simon

From: nore...@phabricator.haskell.org 
[mailto:nore...@phabricator.haskell.org]
Sent: 20 January 2017 17:13
To: Simon Peyton Jones >
Subject: [Diffusion] [Build Failed] rGHCb78fa759bfb4: Simplify and improve CSE

Harbormaster failed to build B13285: rGHCb78fa759bfb4: Simplify and improve CSE!


BRANCHES
master

USERS
simonpj (Author)
O7 (Auditor)
O12 (Auditor)

COMMIT
https://phabricator.haskell.org/rGHCb78fa759bfb4

EMAIL PREFERENCES
https://phabricator.haskell.org/settings/panel/emailpreferences/

To: simonpj, Harbormaster
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: T13156

2017-01-20 Thread Ben Gamari
Ben Gamari  writes:

> Hi Simon,
>
Hi Simon,

Please ignore this; my working tree was dirty. Unfortunately this means
that my version of akio's top-level strings patch regresses, but I can
work this out on my own.

Sorry for the noise.

Cheers,

- Ben


signature.asc
Description: PGP signature
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Arc doesn't work

2017-01-20 Thread Reid Barton
On Fri, Jan 20, 2017 at 12:50 PM, Simon Peyton Jones
 wrote:
> Yes that worked!  THanks
> https://phabricator.haskell.org/D2995
>
> Will you make that change?

I have done so, in commit 5ff812c14594f507c48121f16be4752eee6e3c88.

Regards,
Reid Barton

> S
>
> |  -Original Message-
> |  From: Reid Barton [mailto:rwbar...@gmail.com]
> |  Sent: 20 January 2017 17:23
> |  To: Simon Peyton Jones 
> |  Cc: ghc-devs@haskell.org
> |  Subject: Re: Arc doesn't work
> |
> |  From the python 3 reference:
> |
> |  New in version 3.3: The 'rb' prefix of raw bytes literals has been added as
> |  a synonym of 'br'.
> |
> |  Simon, can you try replacing that occurrent of rb by br and see whether 
> that
> |  fixes it? Just the one on the line it complained about.
> |
> |  Regards,
> |  Reid Barton
> |
> |  On Fri, Jan 20, 2017 at 10:50 AM, Simon Peyton Jones via ghc-devs  |  d...@haskell.org> wrote:
> |  > I can’t use arc.  At the end of ‘arc diff’ it says
> |  >
> |  > Exception
> |  >
> |  > Some linters failed:
> |  >
> |  > - CommandException: Command failed with error #1!
> |  >
> |  >   COMMAND
> |  >
> |  >   python3 .arc-linters/check-cpp.py 'compiler/basicTypes/Id.hs'
> |  >
> |  >
> |  >
> |  >   STDOUT
> |  >
> |  >   (empty)
> |  >
> |  >
> |  >
> |  >   STDERR
> |  >
> |  > File ".arc-linters/check-cpp.py", line 28
> |  >
> |  >   r = re.compile(rb'ASSERT\s+\(')
> |  >
> |  >^
> |  >
> |  >   SyntaxError: invalid syntax
> |  >
> |  >
> |  >
> |  > (Run with `--trace` for a full exception trace.)
> |  >
> |  >
> |  >
> |  > simonpj@cam-05-unx:~/code/HEAD-3$ python3 --version
> |  >
> |  > python3 --version
> |  >
> |  > Python 3.2.3
> |  >
> |  > Alas.
> |  >
> |  > Simon
> |  >
> |  >
> |  > ___
> |  > ghc-devs mailing list
> |  > ghc-devs@haskell.org
> |  > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.h
> |  > askell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-
> |  
> devs=02%7C01%7Csimonpj%40microsoft.com%7Cff94b190c13e4417c34808d44158fa
> |  
> c2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636205297797264731=xYh
> |  IGsBacpdYRuWbYB%2BYTc8Uh%2B0KfufpQbXM7gXfI4Q%3D=0
> |  >
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


T13156

2017-01-20 Thread Ben Gamari
Hi Simon,

I'm seeing some rather peculiar validation issues with your most recent
patch. Namely,

=> T13156(normal) 1 of 1 [0, 0, 0]
cd "./simplCore/should_compile/T13156.run" && $MAKE -s --no-print-directory 
T13156  
Actual stdout output differs from expected:
diff -uw "./simplCore/should_compile/T13156.run/T13156.stdout.normalised" 
"./simplCore/should_compile/T13156.run/T13156.run.stdout.normalised"
--- ./simplCore/should_compile/T13156.run/T13156.stdout.normalised  
2017-01-20 13:00:46.620654541 -0500
+++ ./simplCore/should_compile/T13156.run/T13156.run.stdout.normalised  
2017-01-20 13:00:46.620654541 -0500
@@ -1,5 +1,2 @@
 case GHC.List.reverse @ a x of sat { __DEFAULT ->
-case \ (@ a) ->
-   case g x of {
-case r @ GHC.Types.Any of { __DEFAULT ->
-case r @ GHC.Types.Any of { __DEFAULT -> GHC.Types.True }
+case case g x of {


Oddly enough Harbormaster isn't reproducing this, but it seems to be
quite reproducible locally. Do you have any idea what might be going on
here?

Cheers,

- Ben


signature.asc
Description: PGP signature
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


RE: Arc doesn't work

2017-01-20 Thread Simon Peyton Jones via ghc-devs
Yes that worked!  THanks
https://phabricator.haskell.org/D2995

Will you make that change?

S

|  -Original Message-
|  From: Reid Barton [mailto:rwbar...@gmail.com]
|  Sent: 20 January 2017 17:23
|  To: Simon Peyton Jones 
|  Cc: ghc-devs@haskell.org
|  Subject: Re: Arc doesn't work
|  
|  From the python 3 reference:
|  
|  New in version 3.3: The 'rb' prefix of raw bytes literals has been added as
|  a synonym of 'br'.
|  
|  Simon, can you try replacing that occurrent of rb by br and see whether that
|  fixes it? Just the one on the line it complained about.
|  
|  Regards,
|  Reid Barton
|  
|  On Fri, Jan 20, 2017 at 10:50 AM, Simon Peyton Jones via ghc-devs  wrote:
|  > I can’t use arc.  At the end of ‘arc diff’ it says
|  >
|  > Exception
|  >
|  > Some linters failed:
|  >
|  > - CommandException: Command failed with error #1!
|  >
|  >   COMMAND
|  >
|  >   python3 .arc-linters/check-cpp.py 'compiler/basicTypes/Id.hs'
|  >
|  >
|  >
|  >   STDOUT
|  >
|  >   (empty)
|  >
|  >
|  >
|  >   STDERR
|  >
|  > File ".arc-linters/check-cpp.py", line 28
|  >
|  >   r = re.compile(rb'ASSERT\s+\(')
|  >
|  >^
|  >
|  >   SyntaxError: invalid syntax
|  >
|  >
|  >
|  > (Run with `--trace` for a full exception trace.)
|  >
|  >
|  >
|  > simonpj@cam-05-unx:~/code/HEAD-3$ python3 --version
|  >
|  > python3 --version
|  >
|  > Python 3.2.3
|  >
|  > Alas.
|  >
|  > Simon
|  >
|  >
|  > ___
|  > ghc-devs mailing list
|  > ghc-devs@haskell.org
|  > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.h
|  > askell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-
|  devs=02%7C01%7Csimonpj%40microsoft.com%7Cff94b190c13e4417c34808d44158fa
|  c2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636205297797264731=xYh
|  IGsBacpdYRuWbYB%2BYTc8Uh%2B0KfufpQbXM7gXfI4Q%3D=0
|  >
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


RE: [Diffusion] [Build Failed] rGHCb78fa759bfb4: Simplify and improve CSE

2017-01-20 Thread Simon Peyton Jones via ghc-devs
I'm sorry about all these Phab failures.  I'm struggling with arc, and so 
committing directly.  It all validates fine on my machine.

They seem to be all about T1969.  It validates fine on my machine.  But only 
just!  On my machine I get peak_megabytes = 64; but on Harbormaster it seems to 
be 65 or 66.

But I think 64 is *just* within the 20% margin from 55, and 65 is just outside. 
  The increase might well be peak-memory sampling noise.

Anyway it looks as if the 20% increase all occurred some time ago.  Maybe we 
should look at when and why?

But meanwhile, Ben/Reid/David, if you agree that the increase is some time ago, 
would you like to re-centre the number and (maybe) open a ticket to find where 
the increase actually happened.

I have to go home now... apologies.

Simon

From: nore...@phabricator.haskell.org [mailto:nore...@phabricator.haskell.org]
Sent: 20 January 2017 17:13
To: Simon Peyton Jones 
Subject: [Diffusion] [Build Failed] rGHCb78fa759bfb4: Simplify and improve CSE

Harbormaster failed to build B13285: rGHCb78fa759bfb4: Simplify and improve CSE!


BRANCHES
master

USERS
simonpj (Author)
O7 (Auditor)
O12 (Auditor)

COMMIT
https://phabricator.haskell.org/rGHCb78fa759bfb4

EMAIL PREFERENCES
https://phabricator.haskell.org/settings/panel/emailpreferences/

To: simonpj, Harbormaster
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Arc doesn't work

2017-01-20 Thread Reid Barton
From the python 3 reference:

New in version 3.3: The 'rb' prefix of raw bytes literals has been
added as a synonym of 'br'.

Simon, can you try replacing that occurrent of rb by br and see
whether that fixes it? Just the one on the line it complained about.

Regards,
Reid Barton

On Fri, Jan 20, 2017 at 10:50 AM, Simon Peyton Jones via ghc-devs
 wrote:
> I can’t use arc.  At the end of ‘arc diff’ it says
>
> Exception
>
> Some linters failed:
>
> - CommandException: Command failed with error #1!
>
>   COMMAND
>
>   python3 .arc-linters/check-cpp.py 'compiler/basicTypes/Id.hs'
>
>
>
>   STDOUT
>
>   (empty)
>
>
>
>   STDERR
>
> File ".arc-linters/check-cpp.py", line 28
>
>   r = re.compile(rb'ASSERT\s+\(')
>
>^
>
>   SyntaxError: invalid syntax
>
>
>
> (Run with `--trace` for a full exception trace.)
>
>
>
> simonpj@cam-05-unx:~/code/HEAD-3$ python3 --version
>
> python3 --version
>
> Python 3.2.3
>
> Alas.
>
> Simon
>
>
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Arc doesn't work

2017-01-20 Thread Simon Peyton Jones via ghc-devs
I can't use arc.  At the end of 'arc diff' it says

Exception

Some linters failed:

- CommandException: Command failed with error #1!

  COMMAND

  python3 .arc-linters/check-cpp.py 'compiler/basicTypes/Id.hs'



  STDOUT

  (empty)



  STDERR

File ".arc-linters/check-cpp.py", line 28

  r = re.compile(rb'ASSERT\s+\(')

   ^

  SyntaxError: invalid syntax



(Run with `--trace` for a full exception trace.)



simonpj@cam-05-unx:~/code/HEAD-3$ python3 --version

python3 --version

Python 3.2.3
Alas.
Simon
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Magical function to support reflection

2017-01-20 Thread Kiss Csongor

The problem is in the reify function:

```
reify :: forall a r. a -> (forall (s :: *). Reifies s a => Proxy s -> r) -> r
reify a k = unsafeCoerce (Magic k :: Magic a r) (const a) Proxy
```
here, unsafeCoerce coerces `const a` to type `a`, in the concrete case, to Int.
```
*Main> unsafeCoerce (const 5) :: Int
1099511628032
```
this is indeed what seems to be the issue:
```
*Main> reify 5 reflect
1099511628032
```
which is why test1 then shows the wrong result.

Also, in the Magic newtype, there’s a `Proxy s`, which afaik doesn’t have the 
expected runtime representation
`a -> r`. (there’s a proxy in the middle, `a -> Proxy -> r`).

Changing Magic to
```
newtype Magic a r = Magic (forall (s :: *) . Reifies s a => Tagged s r)
```
now has the correct runtime rep, and the reification can be done by coercing 
the Magic in to `a -> r`, as such
```
reify' :: a -> (forall (s :: *) . Reifies s a => Tagged s r) -> r
reify' a f = unsafeCoerce (Magic f) a
```

the Proxy version is just a convenience, wrapped around the magic one:

```
reify :: forall r a. a -> (forall (s :: *) . Reifies s a => Proxy s -> r) -> r
reify a f = reify' a (unproxy f)
```

Here’s the complete file, with the changes that compile and now work:

https://gist.github.com/kcsongor/b2f829b2b60022505b7e48b1360d2679 


— Csongor

> On 20 Jan 2017, at 14:14, Matthew Pickering  
> wrote:
> 
> I modified the example on the wiki to compile but I seem to have
> missed something, could you perhaps point out what I missed?
> 
> https://gist.github.com/mpickering/da6d7852af2f6c8f59f80ce726baa864
> 
> ```
> *Main> test1 2 123 441212
> 441335
> ```
> 
> On Thu, Jan 19, 2017 at 3:58 AM, David Feuer  wrote:
>> I've updated https://ghc.haskell.org/trac/ghc/wiki/MagicalReflectionSupport 
>> to
>> reflect both Simon's thoughts on the matter and my own reactions to them. I
>> hope you'll give it a peek.
>> 
>> David Feuer
>> ___
>> ghc-devs mailing list
>> ghc-devs@haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Magical function to support reflection

2017-01-20 Thread Matthew Pickering
I modified the example on the wiki to compile but I seem to have
missed something, could you perhaps point out what I missed?

https://gist.github.com/mpickering/da6d7852af2f6c8f59f80ce726baa864

```
*Main> test1 2 123 441212
441335
```

On Thu, Jan 19, 2017 at 3:58 AM, David Feuer  wrote:
> I've updated https://ghc.haskell.org/trac/ghc/wiki/MagicalReflectionSupport to
> reflect both Simon's thoughts on the matter and my own reactions to them. I
> hope you'll give it a peek.
>
> David Feuer
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs