RE: let app invariant failure, HALP Re: how to write a ghc primop that acts on an unevaluated argument?

2014-11-27 Thread Simon Peyton Jones
are you quite sure you did –dverbose-core2core –ddump-occur-anal? I see none of that output in the file. Regardless of the flags you set for the primop, I’m surprised that the invariant is invalidated. Should not happen. As well as the revised output, could you enclose a snippet of

Re: let app invariant failure, HALP Re: how to write a ghc primop that acts on an unevaluated argument?

2014-11-27 Thread Carter Schonwald
The version of the test hs file I attached might include the use of a prefetch byte array primop. If so, commenting it out might suffice for using it as a test case. I'll re email a corrected version later tonight of need be. Currently amidst family travel. On Nov 27, 2014 1:25 PM, Carter

Re: let app invariant failure, HALP Re: how to write a ghc primop that acts on an unevaluated argument?

2014-11-25 Thread Carter Schonwald
i'm doing a bit of benchmarking today, and it may very well be that youre absolutely correct about all of this in practice, at least the way things are trending. On Tue, Nov 25, 2014 at 1:47 AM, Carter Schonwald carter.schonw...@gmail.com wrote: ok attached is the log of

RE: let app invariant failure, HALP Re: how to write a ghc primop that acts on an unevaluated argument?

2014-11-24 Thread Simon Peyton Jones
Carter That smells wrong to me. These flags have a very carefully defined meaning; see Note [PrimOp can_fail and has_side_effects] in PrimOp.lhs If you say it has side effects when it doesn’t, you’ll confuse your successor reading the code in five years time. Better to find out

Re: let app invariant failure, HALP Re: how to write a ghc primop that acts on an unevaluated argument?

2014-11-24 Thread Carter Schonwald
when i run ./inplace/bin/ghc-stage2 codetester.hs -O2 -dcore-lint -S -fforce-recomp -ddump-simpl -ddump-to-file –dverbose-core2core –ddump-occur-anal –ddump-inlinings i get target ‘–dverbose-core2core’ is not a module name or a source file what am I doing wrong in this CLI invocation? On Mon,

Re: how to write a ghc primop that acts on an unevaluated argument?

2014-11-23 Thread Edward Kmett
Maybe test for laziness in the argument by just putting something in that goes boom when forced, e.g. 'undefined'? On Sun, Nov 23, 2014 at 2:04 PM, Carter Schonwald carter.schonw...@gmail.com wrote: Hey All, as part of trying to get some fixups for how prefetch works into 7.10, i'm adding a

Re: how to write a ghc primop that acts on an unevaluated argument?

2014-11-23 Thread Carter Schonwald
yup, i have that! wrapFetch prefetchValue0# (error this shouldn't get evaluated) in the test suite! in contrast wrapFetch prefetchValue0# $! (error this shouldn't get evaluated) does explode shall I add a should fail test with the latter? (it doesn't seem worthwhile) On Sun, Nov 23,

let app invariant failure, HALP Re: how to write a ghc primop that acts on an unevaluated argument?

2014-11-23 Thread Carter Schonwald
ok, i'm getting a let/app invariant failure when i build my test case with O1 or O2 but not without http://lpaste.net/114881 any help would be appreciated on how to address that On Sun, Nov 23, 2014 at 4:13 PM, Carter Schonwald carter.schonw...@gmail.com wrote: yup, i have that!