Skip to content

Commit

Permalink
Update the guide
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudgolfouse committed Nov 28, 2024
1 parent 118c7eb commit 0c92f7f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions guide/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
- [Snapshots](snapshots.md)
- [Ghost code](ghost.md)
- [Ghost structures](ghost/ghost-structures.md)
- [`Int` in ghost](ghost/int-in-ghost.md)
- [Type invariants](./type_invariants.md)
11 changes: 11 additions & 0 deletions guide/src/ghost/int-in-ghost.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Int in ghost

You can manipulate values of type `Int` in ghost code, by using the `int` suffix on integer literals:

```rust,creusot
ghost! {
let my_int = 42int;
};
```

Right now you cannot do much except pass it around: operations like `+` or `*` are only supported in pearlite.

0 comments on commit 0c92f7f

Please sign in to comment.