Skip to content

Commit 2b83728

Browse files
committed
Reformat.
1 parent 76ffd23 commit 2b83728

File tree

6 files changed

+150
-147
lines changed

6 files changed

+150
-147
lines changed

prelude/ad.fut

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,18 @@
100100

101101
-- | Jacobian-Vector Product ("forward mode"), producing also the
102102
-- primal result as the first element of the result tuple.
103-
def jvp2 'a 'b (f: a -> b) (x: a) (x': a): (b, b) =
103+
def jvp2 'a 'b (f: a -> b) (x: a) (x': a) : (b, b) =
104104
intrinsics.jvp2 f x x'
105105

106106
-- | Vector-Jacobian Product ("reverse mode"), producing also the
107107
-- primal result as the first element of the result tuple.
108-
def vjp2 'a 'b (f: a -> b) (x: a) (y': b): (b, a) =
108+
def vjp2 'a 'b (f: a -> b) (x: a) (y': b) : (b, a) =
109109
intrinsics.vjp2 f x y'
110110

111111
-- | Jacobian-Vector Product ("forward mode").
112-
def jvp 'a 'b (f: a -> b) (x: a) (x': a): b =
112+
def jvp 'a 'b (f: a -> b) (x: a) (x': a) : b =
113113
(jvp2 f x x').1
114114

115115
-- | Vector-Jacobian Product ("reverse mode").
116-
def vjp 'a 'b (f: a -> b) (x: a) (y': b): a =
116+
def vjp 'a 'b (f: a -> b) (x: a) (y': b) : a =
117117
(vjp2 f x y').1

prelude/array.fut

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import "math"
44
import "soacs"
55
import "functional"
6-
open import "zip" -- Rexport.
6+
open import "zip"
77

88
-- | The size of the outer dimension of an array.
99
--

prelude/functional.fut

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
-- ```
77
-- x |> f |> g |> h
88
-- ```
9-
def (|>) '^a '^b (x: a) (f: a -> b): b = f x
9+
def (|>) '^a '^b (x: a) (f: a -> b) : b = f x
1010

1111
-- | Right to left application.
1212
--
@@ -35,35 +35,35 @@ def (<|) '^a '^b (f: a -> b) (x: a) = f x
3535
-- ```
3636
--
3737
-- In such cases you can use the pipe operator `|>`@term instead.
38-
def (>->) '^a '^b '^c (f: a -> b) (g: b -> c) (x: a): c = g (f x)
38+
def (>->) '^a '^b '^c (f: a -> b) (g: b -> c) (x: a) : c = g (f x)
3939

4040
-- | Function composition, with values flowing from right to left.
4141
-- This is the same as the `∘` operator known from mathematics.
4242
--
4343
-- Has the same restrictions with respect to anonymous sizes as
4444
-- `>->`@term.
45-
def (<-<) '^a '^b '^c (g: b -> c) (f: a -> b) (x: a): c = g (f x)
45+
def (<-<) '^a '^b '^c (g: b -> c) (f: a -> b) (x: a) : c = g (f x)
4646

4747
-- | Flip the arguments passed to a function.
4848
--
4949
-- ```
5050
-- f x y == flip f y x
5151
-- ```
52-
def flip '^a '^b '^c (f: a -> b -> c) (b: b) (a: a): c =
52+
def flip '^a '^b '^c (f: a -> b -> c) (b: b) (a: a) : c =
5353
f a b
5454

5555
-- | Transform a function taking a pair into a function taking two
5656
-- arguments.
57-
def curry '^a '^b '^c (f: (a, b) -> c) (a: a) (b: b): c =
57+
def curry '^a '^b '^c (f: (a, b) -> c) (a: a) (b: b) : c =
5858
f (a, b)
5959

6060
-- | Transform a function taking two arguments in a function taking a
6161
-- pair.
62-
def uncurry '^a '^b '^c (f: a -> b -> c) (a: a, b: b): c =
62+
def uncurry '^a '^b '^c (f: a -> b -> c) (a: a, b: b) : c =
6363
f a b
6464

6565
-- | The constant function.
66-
def const '^a '^b (x: a) (_: b): a = x
66+
def const '^a '^b (x: a) (_: b) : a = x
6767

6868
-- | The identity function.
6969
def id '^a (x: a) = x

0 commit comments

Comments
 (0)