is this change in TH error message intentional?

2015-10-19 Thread Ömer Sinan Ağacan
Hi all, I realized this change in TH error messages: GHC 7.10.2: ➜ th-test ghc --make Main.hs [1 of 1] Compiling Main ( Main.hs, Main.o ) Main.hs:13:15: Not in scope: ‘locaton’ Perhaps you meant ‘location’ (imported from Language.Haskell.TH.Syntax)

Moving forall with coerce

2015-10-19 Thread David Feuer
It appears, as far as I can tell, that GHC can't move a forall past an -> with coerce. I was playing around with the MonadTrans instance for Codensity, wanting (essentially) to write lift = coerce (>>=) This is legal: instance MonadTrans Codensity where lift = frob frob :: forall m a . Monad

Re: Show instances for GHC internals

2015-10-19 Thread Alan & Kim Zimmerman
This is a utility I would love to see inside the ghc source tree for examining the AST https://github.com/edsko/ghc-dump-tree Alan On Mon, Oct 19, 2015 at 11:18 PM, Ömer Sinan Ağacan wrote: > Currently the only way to debug and inspect GHC internals is by adding some >

Building stage1 only

2015-10-19 Thread Ömer Sinan Ağacan
(I know I asked this many times in IRC channel but I don't remember getting any answers. I apologize if anyone had answered this on IRC channel and I missed) With current build system, even if I choose "devel1" it always builds stage2 compiler too. A comment in build.mk says that it's for working

Warning suppression pragmas

2015-10-19 Thread Эдгар Жаворонков
Hi everyone! Do you know, if there is pragma for warning suppression? I want to implement something like warning suppression related to this ticket in GHC's Trac (https://ghc.haskell.org/trac/ghc/ticket/602). Or i need to implement that kind of pragma by myself? Thanks in advance! Edgar

Show instances for GHC internals

2015-10-19 Thread Ömer Sinan Ağacan
Currently the only way to debug and inspect GHC internals is by adding some carefully placed print statements. (I'd love to be proven wrong on this, cost of debugging this way is huge, given how long it's taking to rebuild GHC) We have Outputable instances for most data types, and

Re: Moving forall with coerce

2015-10-19 Thread Richard Eisenberg
Just to be clear, the Codensity bit (which I don't know) is a red herring here. What you want is this: > newtype A m a = MkA (forall b. m a -> (a -> m b) -> m b) > newtype B (m :: * -> *) a = MkB (forall b. (a -> m b) -> m b) > > foo :: A m a -> (m a -> B m a) > foo = coerce On one level, this

Re: Warning suppression pragmas

2015-10-19 Thread Richard Eisenberg
Hi Edgar, No, that doesn't exist yet. Would surely be useful, though. Richard On Oct 19, 2015, at 6:16 PM, Эдгар Жаворонков wrote: > No, i mean exactly pragmas in source code, that i can particulary add to > function or a part of the code for example. > E.g: > > {-#

Re: Warning suppression pragmas

2015-10-19 Thread Эдгар Жаворонков
No, i mean exactly pragmas in source code, that i can particulary add to function or a part of the code for example. E.g: {-# BEGIN_SUPPRESS_WARNINGS #-} foo :: a -> b #do something that throws warnings {-# END_SUPPRESS_WARNINGS #-} 2015-10-20 1:10 GMT+03:00 Richard Eisenberg

Re: Building stage1 only

2015-10-19 Thread Richard Eisenberg
I haven't tested this, but I imagine putting `stage=1` in your build.mk or even on the command line should work. Richard On Oct 19, 2015, at 4:47 PM, Ömer Sinan Ağacan wrote: > (I know I asked this many times in IRC channel but I don't remember getting > any > answers.

Re: Warning suppression pragmas

2015-10-19 Thread Эдгар Жаворонков
Oh, okay, sure --- С уважением, Жаворонков Эдгар Yours sincerely, Zhavornkov Edgar 2015-10-20 1:37 GMT+03:00 Richard Eisenberg : > Sure. But before thinking about implementation, let's think about > specification. Write a wiki page (perhaps >

Re: Warning suppression pragmas

2015-10-19 Thread Эдгар Жаворонков
Hello, Richard, Do you know something about defining own pragmas in GHC? --- С уважением, Жаворонков Эдгар 2015-10-20 1:17 GMT+03:00 Richard Eisenberg : > Hi Edgar, > > No, that doesn't exist yet. Would surely be useful, though. > > Richard > > On Oct 19, 2015, at 6:16 PM,

Re: Warning suppression pragmas

2015-10-19 Thread Richard Eisenberg
I just responded to #602, but perhaps you're just looking for the -fno-warn-XXX options listed here: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/flag-reference.html#idp14879296 Richard On Oct 19, 2015, at 5:22 PM, Эдгар Жаворонков wrote: > Hi

Re: Show instances for GHC internals

2015-10-19 Thread Richard Eisenberg
On Oct 19, 2015, at 5:18 PM, Ömer Sinan Ağacan wrote: > cost > of debugging this way is huge, given how long it's taking to rebuild GHC) There are more interesting parts of your post, but I can respond to this: It shouldn't take that much time. Once you have ghc-stage2

Re: Show instances for GHC internals

2015-10-19 Thread Edward Z. Yang
Excerpts from Ömer Sinan Ağacan's message of 2015-10-19 14:18:41 -0700: > I was wondering what would be the cost of adding Show instances. Would that > mean significantly increased compile times? Or significantly bigger GHC > binaries? If that's the case, could we enable Show instances with some >