Visible forall in types of terms, Part 2
[GHC Proposal #281: Visible forall in types of terms](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0281-visible-forall.rst) is presented in two parts:
1. Part 1 introduces the `forall a ->` quantifier in types of terms but also requires a syntactic marker at use sites.
2. Part 2 specifies when it is permissible to omit the `type` herald.
See also https://gitlab.haskell.org/ghc/ghc/-/wikis/DH-current-status.
The first part was tracked at #22326 and implemented in 33b6850aaaa4b3a4760d4b384cd15611b159045b. This new ticket is to track the implementation of the remaining parts of the proposal, i.e. Part 2. To that end, I identified the following subtasks:
* [x] #23738 T2T (term-to-type) transformation in expressions (at call sites)
* [x] #23739 T2T (term-to-type) transformation in patterns (at binding sites)
* [x] #24159 The types-in-terms syntax (`forall`, `->`, `=>`)
* [x] #23719 Make `forall` a keyword
* [x] #23740 Term variable capture and implicit quantification
Here are a few examples of code that we aim to allow:
* A variant of `id` that uses visible `forall`:
```haskell
-- Definition:
idv :: forall a -> a -> a
idv a x = x :: a
-- Usage:
n = idv Double 42
```
This is equivalent to `n = (42 :: Double)`.
* A wrapper around `typeRep` that uses visible `forall`:
```haskell
-- Definition:
typeRepVis :: forall a -> Typeable a => TypeRep a
typeRepVis a = typeRep @a
-- Usage:
t = typeRepVis (Maybe String)
```
* A wrapper around `sizeOf` that uses visible `forall` instead of `Proxy`:
```haskell
-- Definition:
sizeOfVis :: forall a -> Storable a => Int
sizeOfVis a = sizeOf (Proxy :: Proxy a)
-- Usage:
n = sizeOfVis Int
```
* A wrapper around `symbolVal` that uses visible `forall` instead of `Proxy`:
```haskell
-- Definition:
symbolValVis :: forall s -> KnownSymbol s => String
symbolValVis s = symbolVal (Proxy :: Proxy s)
-- Usage
str = symbolValVis "Hello, World"
```
issue