Re: Update on HIE Files

2018-06-26 Thread Gershom B
Another reason that this probably should go into the mainline rather than a plugin is that Zubin was explaining to me that the mechanisms introduced could improve and generalize the “:set +c” family of type and location information provided by ghci:

Re: How do I add ghc-prim as a dep for ghc?

2018-06-26 Thread Ömer Sinan Ağacan
I did make distclean; ./boot; ./configure ... no luck. Checked ghc.cabal also. Ömer Ben Gamari , 26 Haz 2018 Sal, 21:39 tarihinde şunu yazdı: > > Ömer Sinan Ağacan writes: > > > I'm trying to add ghc-prim as a dependency to the ghc package. So far I've > > done > > these changes: > > > snip >

Re: How do I add ghc-prim as a dep for ghc?

2018-06-26 Thread Ben Gamari
Ömer Sinan Ağacan writes: > I'm trying to add ghc-prim as a dependency to the ghc package. So far I've > done > these changes: > snip > Any ideas what else to edit? > Did you rerun ./configure after modifying ghc.cabal.in? I would double-check that ghc.cabal contains the dependency. Cheers,

Re: Tracking down instances from use-sites

2018-06-26 Thread Christopher Done
Ben, Thanks for the in-depth elaboration of what Mathew/Simon were describing! It seems within reach! > Of course, in the case that you have a concrete dictionary you *also* > want to know the source location of the instance declaration from which > it arose. I'm afraid this may be quite

Re: Literature Review of GHC Core

2018-06-26 Thread Ben Gamari
Ningning Xie writes: > Hi all, > > I was recently doing some GHC Core related stuff, and I found that it might > be useful to have a theoretical understanding of the type system for > writing better practical code. Therefore I started to read papers about GHC > Core, or System FC, following the

Re: Tracking down instances from use-sites

2018-06-26 Thread Ben Gamari
Christopher Done writes: > Hi all, > > Given a TypecheckedModule, what's the most direct way given a Var > expression retrieved from the AST, to determine: > > 1) that it's a class method e.g. `read` > 2) that it's a generic call (no instance chosen) e.g. `Read a => a -> String` > 3) or if it's

Re: Tracking down instances from use-sites

2018-06-26 Thread Matthew Pickering
Sorry, they are not "frontend plugins" but a new feature that will be in GHC 8.6. They are an implementation of this GHC proposal. https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0017-source-plugins.rst There is also this thread last year about the same topic which Simon

Re: Tracking down instances from use-sites

2018-06-26 Thread Matthew Pickering
Chris, I have also considered this question. 1. Look at the `idDetails` of the `Id`. A class selector is a `ClassOpId`. 2,3, When a class selector `foo` is typechecked, the instance information is of course resolved. The selector `foo` is then wrapped in a `HsWrapper` which when desugared will

Tracking down instances from use-sites

2018-06-26 Thread Christopher Done
Hi all, Given a TypecheckedModule, what's the most direct way given a Var expression retrieved from the AST, to determine: 1) that it's a class method e.g. `read` 2) that it's a generic call (no instance chosen) e.g. `Read a => a -> String` 3) or if it's a resolved instance, then which instance

Literature Review of GHC Core

2018-06-26 Thread Ningning Xie
Hi all, I was recently doing some GHC Core related stuff, and I found that it might be useful to have a theoretical understanding of the type system for writing better practical code. Therefore I started to read papers about GHC Core, or System FC, following the publication timeline, to try to

Re: Update on HIE Files

2018-06-26 Thread Zubin Duggal
Hey Matt, In principle, there should be no problem interacting with source plugins, or implementing this as a source plugin, given that the generating function has type: enrichHie :: GhcMonad m => TypecheckedSource -> RenamedSource -> m (HieAST Type) The only reason the GhcMonad constraint is

Re: Update on HIE Files

2018-06-26 Thread Matthew Pickering
Have you considered how this feature interacts with source plugins? Could the generation of these files be implemented as a source plugin? That would mean that development of the feature would not be coupled to GHC releases. Cheers, Matt On Tue, Jun 26, 2018 at 11:48 AM, Zubin Duggal wrote: >

Update on HIE Files

2018-06-26 Thread Zubin Duggal
Hello all, I've been working on the HIE File ( https://ghc.haskell.org/trac/ghc/wiki/HIEFiles) GSOC project, The design of the data structure as well as the traversal of GHCs ASTs to collect all the relevant info is mostly complete. We traverse the Renamed and Typechecked AST to collect the

RE: Strace

2018-06-26 Thread Simon Peyton Jones via ghc-devs
Great. https://ghc.haskell.org/trac/ghc/ticket/15313#ticket is created. I don’t know how to force them to be “cpu multirace on windows”. If you could do that sometime it’d be great. No rush. Thank you! Simon From: Phyx Sent: 26 June 2018 06:01 To: Simon Peyton Jones Subject: Re: Strace

Re: Booting ghc with system-wide installed Cabal?

2018-06-26 Thread Ömer Sinan Ağacan
We don't have to break anyone's workflow. We could introduce an ENV var or a flag for this. > Also, how would one return to a pristine state if it was done that way? By unsetting the ENV var or not using the flag. Ömer Niklas Larsson , 26 Haz 2018 Sal, 10:26 tarihinde şunu yazdı: > > Installing

Re: Booting ghc with system-wide installed Cabal?

2018-06-26 Thread Niklas Larsson
Installing stuff system-wide without doing ‘make install’ would break my expectations for how the build works. Also, how would one return to a pristine state if it was done that way? // Niklas > 26 juni 2018 kl. 08:57 skrev Ömer Sinan Ağacan : > > Currently we have to build Cabal from scratch

Booting ghc with system-wide installed Cabal?

2018-06-26 Thread Ömer Sinan Ağacan
Currently we have to build Cabal from scratch after every make clean. Ideally I should be able to skip this step by installing the correct versions of Cabal and cabal-install system-wide, but as far as I can see we currently doesn't support this. Any ideas on how to make this work? Thanks, Ömer

How do I add ghc-prim as a dep for ghc?

2018-06-26 Thread Ömer Sinan Ağacan
I'm trying to add ghc-prim as a dependency to the ghc package. So far I've done these changes: diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in index 01628dcad1..b9c3b3d02b 100644 --- a/compiler/ghc.cabal.in +++ b/compiler/ghc.cabal.in @@ -65,7 +65,8 @@ Library