Re: use Hadrian to see if compiler compiles?

2022-01-24 Thread Richard Eisenberg
My recommendation: ./hadrian/ghci. The first time you run it, it may spin for a 
little while, but it will eventually deliver you to a GHCi prompt, with all of 
GHC loaded. (You can e.g. `:type splitTyConApp_maybe`, after `import 
GHC.Core.Type`.) At that point, :reload will be your dear friend. That's what I 
do when I'm doing e.g. module reorganization and care much more about "does it 
compile" than "does it work".

Richard

> On Jan 24, 2022, at 5:02 PM, Norman Ramsey  wrote:
> 
> I'm currently doing some refactoring of the GHC sources, which
> involves moving definitions between modules.  As a sanity check
> I want to compile often, so if I've broken anything (or have inadvertently
> created circular imports) I can find out quickly.  I'm currently using
> 
>  ./hadrian/build -j
> 
> but I really don't need to build libraries or a stage 2 compiler.
> I tried looking over `./hadrian/build --help`, but I'm not confident
> that I understand what's there.  My best guess is
> 
>  ./hadrian/build -j stage0:lib:ghc
> 
> Would that accomplish my goal?
> 
> 
> Norman
> 
> 
> ___
> 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


use Hadrian to see if compiler compiles?

2022-01-24 Thread Norman Ramsey
I'm currently doing some refactoring of the GHC sources, which
involves moving definitions between modules.  As a sanity check
I want to compile often, so if I've broken anything (or have inadvertently
created circular imports) I can find out quickly.  I'm currently using

  ./hadrian/build -j

but I really don't need to build libraries or a stage 2 compiler.
I tried looking over `./hadrian/build --help`, but I'm not confident
that I understand what's there.  My best guess is

  ./hadrian/build -j stage0:lib:ghc

Would that accomplish my goal?


Norman


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


Re: any luck using "retrie" refactoring tool on GHC sources?

2022-01-24 Thread Norman Ramsey
 > > I'm trying to use the retrie refactoring tool..
 > >
 > For what it's worth, Norman has reported this issue upstream as
 > https://github.com/facebookincubator/retrie/issues/41

Turns out the tool wants `=` in the rule, not `==`.

And if you have a ' in your function name, the tool barfs because it
launches a `grep` command without escaping the ' properly to the
shell.  I have pushed a fix at
https://github.com/facebookincubator/retrie/pull/43.


Norman

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


Re: any luck using "retrie" refactoring tool on GHC sources?

2022-01-24 Thread Ben Gamari
Norman Ramsey  writes:

> I'm trying to use the retrie refactoring tool, but I'm getting a
> mysterious error message: 
>
> nr@homedog ~/a/g/compiler [1]> retrie --adhoc "forall x . not 
> (backendNeedn'tLink x) == backendNeedsLink x"
>
> parseAdhocs:1:80: error: parse error on input ‘#-}’
> retrie: user error (parse failed)
>
> The Tool was installed using cabal install; its github page is
> https://github.com/facebookincubator/retrie/#readme.  
>
> Has anybody had any success using this tool on the GHC sources?
> I'd love a workaround, or just advice.
>
For what it's worth, Norman has reported this issue upstream as
https://github.com/facebookincubator/retrie/issues/41

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