[ghc-steering-committee] Proposal #173: The dot type operator, rec: accept
Eric Seidel
eric at seidel.io
Tue Oct 9 20:45:01 UTC 2018
Hello,
This proposal would extend the parser to allow the '.' character to appear in type operators, allowing one to write code like the following:
```
type (f . g) x = f (g x)
foo :: (Maybe . Either Int) Bool
foo = Just (Right True)
```
I recommend we accept the proposal, as it would resolve an odd inconsistency between the term and type languages. The main downside seems to be that combining a type-level '.' with a 'forall' is a bit hard to read, but I think the benefits of a more consistent syntax outweigh this concern.
Eric
More information about the ghc-steering-committee
mailing list