Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CHARGUERAUD Arthur
cfml
Commits
6c66d0de
Commit
6c66d0de
authored
Jan 07, 2016
by
POTTIER Francois
Browse files
Shared definition of [binding].
parent
9c87f55b
Changes
1
Hide whitespace changes
Inline
Side-by-side
generator/print_coq.ml
View file @
6c66d0de
...
...
@@ -117,6 +117,13 @@ let label = function
(* -------------------------------------------------------------------------- *)
(* Bindings, or annotations: [x : t]. *)
let
binding
x
t
=
block
(
x
^^
spacecolon
)
(
space
^^
t
)
empty
(* -------------------------------------------------------------------------- *)
(* Expressions. *)
let
rec
expr0
=
function
...
...
@@ -137,7 +144,7 @@ let rec expr0 = function
|
Coq_record
_les
->
assert
false
(* TODO *)
|
Coq_annot
(
e1
,
e2
)
->
parens
(
expr
e1
^^
spacecolon
^/^
expr
e2
)
parens
(
binding
(
expr
e1
)
(
expr
e2
)
)
|
Coq_app
_
|
Coq_tag
_
|
Coq_impl
_
...
...
@@ -230,6 +237,14 @@ and mod_typ2 = function
and
mod_typ
mt
=
mod_typ1
mt
(* Module bindings. *)
let
mod_binding
(
xs
,
mt
)
=
binding
(
separate_map
space
string
xs
)
(
mod_typ
mt
)
let
mod_bindings
bs
=
separate_map
space
mod_binding
bs
(* -------------------------------------------------------------------------- *)
(* Typed variables: [x : t]. *)
...
...
@@ -237,7 +252,7 @@ and mod_typ mt =
(* Raw. *)
let
var
(
x
,
t
)
=
b
lock
(
string
x
^^
spacecolon
)
(
space
^^
expr
t
)
empty
b
inding
(
string
x
)
(
expr
t
)
(* With parentheses and with a leading space. *)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment