<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/haskell.git/compiler/Language/Haskell/Syntax/Pat.hs-boot, branch wip/17594-implementation</title>
<subtitle>gitlab.haskell.org: ghc/ghc.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/'/>
<entry>
<title>parser and renamer checkpoints</title>
<updated>2021-11-03T10:27:50+00:00</updated>
<author>
<name>DanielRrr</name>
<email>daniel.rogozin@serokell.io</email>
</author>
<published>2021-11-03T10:11:26+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=8a379ba2f6f66d7ab49e5479cba5a05fa9862ce8'/>
<id>8a379ba2f6f66d7ab49e5479cba5a05fa9862ce8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Separate AST from GhcPass (#18936)</title>
<updated>2021-01-24T02:32:47+00:00</updated>
<author>
<name>John Ericson</name>
<email>John.Ericson@Obsidian.Systems</email>
</author>
<published>2021-01-10T02:01:43+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=81f0665513d65c2d7e544cbe8adeff4b0d6fdfff'/>
<id>81f0665513d65c2d7e544cbe8adeff4b0d6fdfff</id>
<content type='text'>
----------------
What:

There are two splits.

The first spit is:

 - `Language.Haskell.Syntax.Extension`
 - `GHC.Hs.Extension`

where the former now just contains helpers like `NoExtCon` and all the
families, and the latter is everything having to do with `GhcPass`.

The second split is:

 - `Language.Haskell.Syntax.&lt;mod&gt;`
 - `GHC.Hs.&lt;mod&gt;`

Where the former contains all the data definitions, and the few helpers
that don't use `GhcPass`, and the latter contains everything else. The
second modules also reexport the former.

----------------
Why:

See the issue for more details, but in short answer is we're trying to
grasp at the modularity TTG is supposed to offer, after a long time of
mainly just getting the safety benefits of more complete pattern
matching on the AST.

Now, we have an AST datatype which, without `GhcPass` is decently
stripped of GHC-specific concerns. Whereas before, not was it
GHC-specific, it was aware of all the GHC phases despite the
parameterization, with the instances and parametric data structure
side-by-side.

For what it's worth there are also some smaller, imminent benefits:

- The latter change also splits a strongly connected component in two,
  since none of the `Language.Haskell.Syntax.*` modules import the older
  ones.

- A few TTG violations (Using GhcPass directly in the AST) in `Expr` are
  now more explicitly accounted for with new type families to provide the
  necessary indirection.

-----------------
Future work:

- I don't see why all the type families should live in
  `Language.Haskell.Syntax.Extension`. That seems anti-modular for
  little benefit. All the ones used just once can be moved next to the
  AST type they serve as an extension point for.

- Decide what to do with the `Outputable` instances. Some of these are
  no orphans because they referred to `GhcPass`, and had to be moved. I
  think the types could be generalized so they don't refer to `GhcPass`
  and therefore can be moved back, but having gotten flak for increasing
  the size and complexity types when generalizing before, I did *not*
  want to do this.

- We should triage the remaining contents of `GHC.Hs.&lt;mod&gt;`. The
  renaming helpers are somewhat odd for needing `GhcPass`. We might
  consider if they are a) in fact only needed by one phase b) can be
  generalized to be non-GhcPass-specific (e.g. take a callback rather
  than GADT-match with `IsPass`) and then they can live in
  `Language.Haskell.Syntax.&lt;mod&gt;`.

For more details, see
https://gitlab.haskell.org/ghc/ghc/-/wikis/implementing-trees-that-grow

Bumps Haddock submodule
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
----------------
What:

There are two splits.

The first spit is:

 - `Language.Haskell.Syntax.Extension`
 - `GHC.Hs.Extension`

where the former now just contains helpers like `NoExtCon` and all the
families, and the latter is everything having to do with `GhcPass`.

The second split is:

 - `Language.Haskell.Syntax.&lt;mod&gt;`
 - `GHC.Hs.&lt;mod&gt;`

Where the former contains all the data definitions, and the few helpers
that don't use `GhcPass`, and the latter contains everything else. The
second modules also reexport the former.

----------------
Why:

See the issue for more details, but in short answer is we're trying to
grasp at the modularity TTG is supposed to offer, after a long time of
mainly just getting the safety benefits of more complete pattern
matching on the AST.

Now, we have an AST datatype which, without `GhcPass` is decently
stripped of GHC-specific concerns. Whereas before, not was it
GHC-specific, it was aware of all the GHC phases despite the
parameterization, with the instances and parametric data structure
side-by-side.

For what it's worth there are also some smaller, imminent benefits:

- The latter change also splits a strongly connected component in two,
  since none of the `Language.Haskell.Syntax.*` modules import the older
  ones.

- A few TTG violations (Using GhcPass directly in the AST) in `Expr` are
  now more explicitly accounted for with new type families to provide the
  necessary indirection.

-----------------
Future work:

- I don't see why all the type families should live in
  `Language.Haskell.Syntax.Extension`. That seems anti-modular for
  little benefit. All the ones used just once can be moved next to the
  AST type they serve as an extension point for.

- Decide what to do with the `Outputable` instances. Some of these are
  no orphans because they referred to `GhcPass`, and had to be moved. I
  think the types could be generalized so they don't refer to `GhcPass`
  and therefore can be moved back, but having gotten flak for increasing
  the size and complexity types when generalizing before, I did *not*
  want to do this.

- We should triage the remaining contents of `GHC.Hs.&lt;mod&gt;`. The
  renaming helpers are somewhat odd for needing `GhcPass`. We might
  consider if they are a) in fact only needed by one phase b) can be
  generalized to be non-GhcPass-specific (e.g. take a callback rather
  than GADT-match with `IsPass`) and then they can live in
  `Language.Haskell.Syntax.&lt;mod&gt;`.

For more details, see
https://gitlab.haskell.org/ghc/ghc/-/wikis/implementing-trees-that-grow

Bumps Haddock submodule
</pre>
</div>
</content>
</entry>
</feed>
