File tree Expand file tree Collapse file tree 2 files changed +28
-27
lines changed Expand file tree Collapse file tree 2 files changed +28
-27
lines changed Original file line number Diff line number Diff line change
1
+ module Type.Function where
2
+
3
+ -- | Polymorphic Type application
4
+ -- |
5
+ -- | For example...
6
+ -- | ```
7
+ -- | APPLY Maybe Int == Maybe $ Int == Maybe Int
8
+ -- | ```
9
+ type APPLY :: forall a b . (a -> b ) -> a -> b
10
+ type APPLY f a = f a
11
+
12
+ infixr 0 type APPLY as $
13
+
14
+ -- | Reversed polymorphic Type application
15
+ -- |
16
+ -- | For example...
17
+ -- | ```
18
+ -- | FLIP Int Maybe == Maybe Int
19
+ -- | ```
20
+ -- | Note: an infix for FLIP (e.g. `Int # Maybe`) is not allowed.
21
+ -- | Before the `0.14.0` release, we used `# Type` to refer to a row of types.
22
+ -- | In the `0.14.0` release, the `# Type` syntax was deprecated,
23
+ -- | and `Row Type` is the correct way to do this now. To help mitigate
24
+ -- | breakage, `# Type` was made an alias to `Row Type`. When the `# Type`
25
+ -- | syntax is fully dropped in a later language release, we can then
26
+ -- | support the infix version: `Int # Maybe`.
27
+ type FLIP :: forall a b . a -> (a -> b ) -> b
28
+ type FLIP a f = f a
Original file line number Diff line number Diff line change @@ -8,33 +8,6 @@ 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 :: forall a b . (a -> b ) -> a -> b
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.
29
- -- | Before the `0.14.0` release, we used `# Type` to refer to a row of types.
30
- -- | In the `0.14.0` release, the `# Type` syntax was deprecated,
31
- -- | and `Row Type` is the correct way to do this now. To help mitigate
32
- -- | breakage, `# Type` was made an alias to `Row Type`. When the `# Type`
33
- -- | syntax is fully dropped in a later language release, we can then
34
- -- | support the infix version: `Int # Maybe`.
35
- type FLIP :: forall a b . a -> (a -> b ) -> b
36
- type FLIP a f = f a
37
-
38
11
-- | Type application for rows.
39
12
type RowApply :: forall k . (Row k -> Row k ) -> Row k -> Row k
40
13
type RowApply f a = f a
You can’t perform that action at this time.
0 commit comments