Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
119
Issues
119
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
6ba8cb32
Commit
6ba8cb32
authored
Nov 19, 2013
by
Andrei Paskevich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Typing: minor
parent
3f89bf0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
src/parser/typing.ml
src/parser/typing.ml
+5
-7
No files found.
src/parser/typing.ml
View file @
6ba8cb32
...
...
@@ -99,7 +99,7 @@ let create_user_tv =
Hstr
.
add
hs
s
tv
;
tv
let
ty_of_pty
_top
~
noop
uc
pty
=
let
ty_of_pty
?
(
noop
=
true
)
uc
pty
=
let
rec
get_ty
=
function
|
PPTtyvar
({
id_loc
=
loc
}
,
true
)
when
noop
->
Loc
.
errorm
~
loc
"Opaqueness@ annotations@ are@ only@ \
...
...
@@ -120,8 +120,6 @@ let ty_of_pty_top ~noop uc pty =
in
get_ty
pty
let
ty_of_pty
uc
pty
=
ty_of_pty_top
~
noop
:
true
uc
pty
let
opaque_tvs
args
=
let
rec
opaque_tvs
acc
=
function
|
PPTtyvar
(
id
,
true
)
->
Stv
.
add
(
create_user_tv
id
.
id
)
acc
...
...
@@ -338,11 +336,11 @@ let type_fmla uc gvars f =
(** Typing declarations *)
let
tyl_of_params
~
noop
uc
pl
=
let
tyl_of_params
?
(
noop
=
false
)
uc
pl
=
let
ty_of_param
(
loc
,_,
gh
,
ty
)
=
if
gh
then
Loc
.
errorm
~
loc
"ghost parameters are not allowed in pure declarations"
;
ty_of_pty
_top
~
noop
uc
ty
in
ty_of_pty
~
noop
uc
ty
in
List
.
map
ty_of_param
pl
let
add_types
dl
th
=
...
...
@@ -500,7 +498,7 @@ let add_logics dl th =
let
create_symbol
th
d
=
let
id
=
d
.
ld_ident
.
id
in
let
v
=
create_user_id
d
.
ld_ident
in
let
pl
=
tyl_of_params
~
noop
:
false
th
d
.
ld_params
in
let
pl
=
tyl_of_params
th
d
.
ld_params
in
let
ty
=
Opt
.
map
(
ty_of_pty
th
)
d
.
ld_type
in
let
opaque
=
opaque_tvs
d
.
ld_params
in
(* for abstract lsymbols fresh tyvars are opaque *)
...
...
@@ -590,7 +588,7 @@ let add_inductives s dl th =
let
create_symbol
th
d
=
let
id
=
d
.
in_ident
.
id
in
let
v
=
create_user_id
d
.
in_ident
in
let
pl
=
tyl_of_params
~
noop
:
false
th
d
.
in_params
in
let
pl
=
tyl_of_params
th
d
.
in_params
in
let
opaque
=
opaque_tvs
d
.
in_params
in
let
ps
=
create_psymbol
~
opaque
v
pl
in
Hstr
.
add
psymbols
id
ps
;
...
...
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