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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Arthur Azevedo de Amorim
stdpp
Commits
7d981af6
Commit
7d981af6
authored
4 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Fix `Export` order for `length`. Remove `length` hack in strings. Add a test.
parent
4b0c93cb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
tests/length.ref
+18
-0
18 additions, 0 deletions
tests/length.ref
tests/length.v
+7
-0
7 additions, 0 deletions
tests/length.v
theories/base.v
+6
-1
6 additions, 1 deletion
theories/base.v
theories/strings.v
+0
-5
0 additions, 5 deletions
theories/strings.v
with
31 additions
and
6 deletions
tests/length.ref
0 → 100644
+
18
−
0
View file @
7d981af6
length : ∀ A : Type, list A → nat
length is not universe polymorphic
Arguments length {A}%type_scope _%list_scope
length is transparent
Expands to: Constant Coq.Init.Datatypes.length
length : ∀ A : Type, list A → nat
length is not universe polymorphic
Arguments length {A}%type_scope _%list_scope
length is transparent
Expands to: Constant Coq.Init.Datatypes.length
length : ∀ A : Type, list A → nat
length is not universe polymorphic
Arguments length {A}%type_scope _%list_scope
length is transparent
Expands to: Constant Coq.Init.Datatypes.length
This diff is collapsed.
Click to expand it.
tests/length.v
0 → 100644
+
7
−
0
View file @
7d981af6
(** Check that we always get the [length] function on lists, not on strings. *)
From
stdpp
Require
Import
prelude
.
About
length
.
From
stdpp
Require
Import
strings
.
About
length
.
From
stdpp
Require
Import
prelude
.
About
length
.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
theories/base.v
+
6
−
1
View file @
7d981af6
...
...
@@ -3,7 +3,12 @@ that are used throughout the whole development. Most importantly it contains
abstract interfaces for ordered structures, sets, and various other data
structures. *)
From
Coq
Require
Export
Morphisms
RelationClasses
List
Bool
Utf8
Setoid
.
(** The order of this [Require Export] is important: The definition of [length]
in [List] should shadow the definition of [length] in [String]. We also need
to export [Datatypes] because [List] contains a [parsing only] notation for
[length], not the actual definition of [length], which is in [Datatypes]. *)
From
Coq
Require
Export
String
Datatypes
List
.
From
Coq
Require
Export
Morphisms
RelationClasses
Bool
Utf8
Setoid
.
From
Coq
Require
Import
Permutation
.
Set
Default
Proof
Using
"Type"
.
Export
ListNotations
.
...
...
This diff is collapsed.
Click to expand it.
theories/strings.v
+
0
−
5
View file @
7d981af6
From
Coq
Require
Import
Ascii
.
From
Coq
Require
Export
String
.
From
stdpp
Require
Export
list
.
From
stdpp
Require
Import
countable
.
Set
Default
Proof
Using
"Type"
.
(* To avoid randomly ending up with String.length because this module is
imported hereditarily somewhere. *)
Notation
length
:=
List
.
length
.
(** * Fix scopes *)
Open
Scope
string_scope
.
(* Make sure [list_scope] has priority over [string_scope], so that
...
...
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