Skip to content

Commit 9187e5b

Browse files
committed
fix code
1 parent c3b8bfa commit 9187e5b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

copy/entries/faking-adts-and-gadts.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ code][profunctor], the sky's the limit!
2929
Normal ADTs
3030
-----------
3131

32-
Algebraic Data Types (ADT's) are products and sums; that's why they're
32+
Algebraic Data Types (ADTs) are products and sums; that's why they're
3333
algebraic, after all!
3434

3535
### Product Types
@@ -103,8 +103,8 @@ public class Transaction {
103103

104104
And there you go. Nothing too surprising there!
105105

106-
In this case, not only are these ADT's (algebraic data types), they're also
107-
ADT's (**abstract** data types): you are meant to work with them based on a
106+
In this case, not only are these ADTs (algebraic data types), they're also
107+
ADTs (**abstract** data types): you are meant to work with them based on a
108108
pre-defined abstract interface based on type algebra, instead of their internal
109109
representations.
110110

@@ -305,7 +305,7 @@ class Negate extends Expr {
305305

306306
@Override
307307
public <R> R accept(ExprVisitor<R> visitor) {
308-
return visitor.visitNegate(expr);
308+
return visitor.visitNegate(unary);
309309
}
310310
}
311311

@@ -454,7 +454,7 @@ let ExprF : Type -> Type
454454
}
455455

456456
let Expr : Type
457-
= forall (expr : Type) -> ExprF r -> r
457+
= forall (r : Type) -> ExprF r -> r
458458
```
459459

460460
Note that `ExprF r` is essentially `ExprVisitor<R>`, except instead of `add`
@@ -611,7 +611,7 @@ ghci> :t plot ScaleDate (ScaleLinear True (LNumeric NInt))
611611
[(Date, Int)] -> Canvas
612612
```
613613

614-
But let's say we only had ADT's. And then we're passing them down to a
614+
But let's say we only had ADTs. And then we're passing them down to a
615615
javascript FFI which only has structs and functions. We could drop the
616616
type-safety and instead error on runtime, but...no. Type unsafety is not
617617
acceptable.

0 commit comments

Comments
 (0)