Re: When does GHC produce unlifted `let` bindings?

2017-10-29 Thread Ben Gamari
Sebastian Graf writes: > Hi folks, > > I was debugging a Core-to-Core transform for TEST=spec-inline > > and > was wondering (yet again) why

When does GHC produce unlifted `let` bindings?

2017-10-29 Thread Sebastian Graf
Hi folks, I was debugging a Core-to-Core transform for TEST=spec-inline and was wondering (yet again) why GHC produces unlifted `let` bindings in Core like it seems

Re: Bringing some observable sharing to GHCi

2017-10-29 Thread Joachim Breitner
Hi, Am Sonntag, den 29.10.2017, 16:40 -0400 schrieb David Feuer: > 1. To be able to display cyclical data in some sensible way. > > > x = "hi" : x > > x `seq` () > > :print x > > should print some useful representation of x. the best that I know for this is the hack that calls itself

Re: Q: Types in GADT pattern match

2017-10-29 Thread Richard Eisenberg
Hi Gabor, Oleg is right that the re-use of type variables obscures the error, but it's not quite a scoping error under the hood. The problem is that GHC type-checks type signatures on patterns *before* type-checking the pattern itself. That means that when GHC checks your `Foo [a]` type

Q: Types in GADT pattern match

2017-10-29 Thread Gabor Greif
Hi Devs! I encountered a curious restriction with type signatures (tyvar bindings) in GADT pattern matches. GHC won't let me directly capture the refined type structure of GADT constructors like this: {-# Language GADTs, ScopedTypeVariables #-} data Foo a where Bar :: Foo [a] foo :: Foo a

Re: Q: Types in GADT pattern match

2017-10-29 Thread Oleg Grenrus
The problem is scoping. The problem is more obvious if you don't reuse type-variables:     {-# Language GADTs, ScopedTypeVariables #-}     data Foo a where   Bar :: Foo [x]     foo :: Foo a -> ()     foo b@(Bar :: Foo [c]) = quux b   where quux :: Foo [b] -> ()     quux Bar = ()

Bringing some observable sharing to GHCi

2017-10-29 Thread David Feuer
The :sprint, :print, and :force commands in GHCi fall into infinite loops when confronted by cyclical data. This bit me hard in https://phabricator.haskell.org/D4085 because that produces cyclical TypeReps, which is trouble for (e.g.) the test break011 which tries to :force a SomeException (which

Re: perf.haskell.org functional again

2017-10-29 Thread Sebastian Graf
Hi, just wanted to throw in the idea of parallelising the benchmark suite (hurts to even write that, but cachegrind) to speed up the build, if ever need be. Cheers, Sebastian On Wed, Oct 25, 2017 at 2:13 AM, Manuel M T Chakravarty < c...@justtesting.org> wrote: > Am 24.10.2017 um 14:46 schrieb

Re: perf.haskell.org functional again

2017-10-29 Thread Joachim Breitner
Hi, Am Sonntag, den 29.10.2017, 23:58 +0100 schrieb Sebastian Graf: > Hi, > > just wanted to throw in the idea of parallelising the benchmark suite > (hurts to even write that, but cachegrind) to speed up the build, if > ever need be.