diff --git a/CHANGELOG.md b/CHANGELOG.md index 917daeb..5692ca2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ Breaking changes: - Replaced polymorphic proxies with monomorphic `Proxy` (#72 by @JordanMartinez) New features: +- Added `#` infix operator for `FLIP` (e.g. `Int # Maybe` == `Maybe Int`) (#73 by @JordanMartinez) Bugfixes: diff --git a/src/Type/Function.purs b/src/Type/Function.purs index e5c02a5..78440ad 100644 --- a/src/Type/Function.purs +++ b/src/Type/Function.purs @@ -15,14 +15,9 @@ infixr 0 type APPLY as $ -- | -- | For example... -- | ``` --- | FLIP Int Maybe == Maybe Int +-- | FLIP Int Maybe == Int # Maybe == Maybe Int -- | ``` --- | Note: an infix for FLIP (e.g. `Int # Maybe`) is not allowed. --- | Before the `0.14.0` release, we used `# Type` to refer to a row of types. --- | In the `0.14.0` release, the `# Type` syntax was deprecated, --- | and `Row Type` is the correct way to do this now. To help mitigate --- | breakage, `# Type` was made an alias to `Row Type`. When the `# Type` --- | syntax is fully dropped in a later language release, we can then --- | support the infix version: `Int # Maybe`. type FLIP :: forall a b. a -> (a -> b) -> b type FLIP a f = f a + +infixl 1 type FLIP as #