Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stdpp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adam
stdpp
Commits
cd778dae
Commit
cd778dae
authored
3 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Comment.
parent
6de30407
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/pretty.v
+3
-0
3 additions, 0 deletions
theories/pretty.v
with
3 additions
and
0 deletions
theories/pretty.v
+
3
−
0
View file @
cd778dae
...
...
@@ -22,6 +22,9 @@ Fixpoint pretty_N_go_help (x : N) (acc : Acc (<)%N x) (s : string) : string :=
(
String
(
pretty_N_char
(
x
`
mod
`
10
))
s
)
|
right
_
=>
s
end
.
(* The argument [S (N.size_nat x)] of [wf_guard] makes sure that computation
works if [x] is a closed term, but that it blocks if [x] is an open term. The
latter prevents unexpected stack overflows, see [tests/pretty.v]. *)
Definition
pretty_N_go
(
x
:
N
)
:
string
→
string
:=
pretty_N_go_help
x
(
wf_guard
(
S
(
N
.
size_nat
x
))
N
.
lt_wf_0
x
)
.
Global
Instance
pretty_N
:
Pretty
N
:=
λ
x
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment