Decouple Language.Haskell.Syntax.Binds from GHC.Types.Basic
Currently **`Language.Haskell.Syntax.Binds`** imports **`GHC.Types.Basic`** due to a dependency on the `InlinePragma` data-type exported by **`GHC.Types.Basic`**. In order to progress the Trees That Grow project, this dependency will need to be removed.
The plan is to move the data-type definition of `InlinePragma` into **`Language.Haskell.Syntax.Binds`** or another module within the **`Language.Haskell.Syntax`** "namespace", since the `InlinePragma` represents something which is part of the AST.
The `InlinePragma` data-type currently has the following constituent types which are from the GHC "namespace:"
* `SourceText` Data-type from **`GHC.Types.SourceText`**
* `Arity`: Type synonym also defined within **`GHC.Types.Basic`**
* `Activation` Data-type also defined within **`GHC.Types.Basic`**
* `RuleMatchInfo`: Data-type also defined within **`GHC.Types.Basic`**
* `InlineSpec`: Data-type also defined within **`GHC.Types.Basic`**
The proposed tasks:
1. `InlineSpec` will be transferred "as is" to **`Language.Haskell.Syntax.Binds`**. do not think that `InlineSpec` needs to be parameterized to move the `SourceText` components into an extension point. I could be wrong about this text being essential to the AST. (TODO: different)
2. `RuleMatchInfo` will be transferred "as is" to **`Language.Haskell.Syntax.Binds`**, since it's a syntactic construct the user provides
3. `Activation` will be transferred "as is" to **`Language.Haskell.Syntax.Binds`**, it's also something the user writes like `[0]` for phase 0
4. `InlinePragma` will be transferred to **`Language.Haskell.Syntax.Binds`**. with an extension point. The `SourceText` and `Maybe Arity` components will be defined as GHC specific instances of the extension point.
5. The dependency between **`Language.Haskell.Syntax.Binds`** and **`GHC.Types.Basic`** will become inverted.
6. `Data` definition of `InlinePragma` will be moved to `GHC.Hs.Instances`.
Details:
* `Arity` seems to be _always_ hard coded to `Nothing` for `GhcPs`, and always figured out to `Just` at `GhcRn`. It would be good to leverage TTG to not have it at all in `GhcPs`, and introduce it only from `GhcRn` forward
* The `SourceText` in `InlineSpec` seems to be duplicated from the one in `InlinePragma` . Investigate!
issue