File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,28 @@ module Type.Row
8
8
import Prim.Row (class Lacks , class Nub , class Cons , class Union )
9
9
import Type.Data.Row (RProxy (..)) as RProxy
10
10
11
+ -- | Polymorphic Type application
12
+ -- |
13
+ -- | For example...
14
+ -- | ```
15
+ -- | APPLY Maybe Int == Maybe $ Int == Maybe Int
16
+ -- | ```
17
+ type APPLY ∷ ∀ d c . (d → c ) → d → c
18
+ type APPLY f a = f a
19
+
20
+ infixr 0 type APPLY as $
21
+
22
+ -- | Reversed polymorphic Type application
23
+ -- |
24
+ -- | For example...
25
+ -- | ```
26
+ -- | FLIP Int Maybe == Maybe Int
27
+ -- | ```
28
+ -- | Note: an infix for FLIP (e.g. `Int # Maybe`) is not allowed since
29
+ -- | `# Type` is an alias for `Row Type`
30
+ type FLIP ∷ ∀ d c . d → (d → c ) → c
31
+ type FLIP a f = f a
32
+
11
33
-- | Type application for rows.
12
34
type RowApply :: forall k . (Row k -> Row k ) -> Row k -> Row k
13
35
type RowApply f a = f a
You can’t perform that action at this time.
0 commit comments