Skip to content

Commit f7ca5e6

Browse files
committed
add dhall example
1 parent 9187e5b commit f7ca5e6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

+6
Original file line numberDiff line numberDiff line change
@@ -1221,6 +1221,12 @@ let ternary
12211221
\(p : Type -> Type) ->
12221222
\(handlers : ExprF p) ->
12231223
handlers.ternary (b p handlers) (x p handlers) (y p handlers)
1224+
1225+
let myExpr
1226+
: Expr Natural
1227+
= add (natLit 5) (add (natLit 6) (natLit 7))
1228+
1229+
in eval myExpr -- 18
12241230
```
12251231

12261232
If all of this is difficult to parse, try reviewing both the recursive ADT

0 commit comments

Comments
 (0)