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
Model registry
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
Iris
stdpp
Commits
bf1ad734
Commit
bf1ad734
authored
9 months ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Notation for string literals in `stdpp_scope`.
parent
80267a5e
No related branches found
No related tags found
1 merge request
!568
Notation for string literals in `stdpp_scope`.
Pipeline
#106628
canceled
9 months ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
stdpp/strings.v
+7
-6
7 additions, 6 deletions
stdpp/strings.v
with
7 additions
and
6 deletions
stdpp/strings.v
+
7
−
6
View file @
bf1ad734
...
...
@@ -4,15 +4,16 @@ From stdpp Require Export list.
From
stdpp
Require
Import
countable
.
From
stdpp
Require
Import
options
.
(* To avoid randomly ending up with String.length because this module is
(*
*
To avoid randomly ending up with
[
String.length
]
because this module is
imported hereditarily somewhere. *)
Notation
length
:=
List
.
length
.
(** * Fix scopes *)
Global
Open
Scope
string_scope
.
(* Make sure [list_scope] has priority over [string_scope], so that
the "++" notation designates list concatenation. *)
Global
Open
Scope
list_scope
.
(** Enable the string literal and append notation in [stdpp_scope], making it
possible to write string literals as "foo" instead of "foo"%string.
One could also enable the string literal notation via [Open Scope string_scope]
but that overrides various notations (e.g, [++] on [list], [=?] on [nat]) with
the version for strings. *)
String
Notation
string
string_of_list_byte
list_byte_of_string
:
stdpp_scope
.
Infix
"+:+"
:=
String
.
append
(
at
level
60
,
right
associativity
)
:
stdpp_scope
.
Global
Arguments
String
.
append
:
simpl
never
.
...
...
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