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
Why3
why3
Commits
95a485de
Commit
95a485de
authored
Oct 18, 2012
by
MARCHE Claude
Browse files
proper error message when missing type parameters
parent
272630ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/driver/driver.ml
View file @
95a485de
...
...
@@ -178,7 +178,8 @@ let load_driver = let driver_tag = ref (-1) in fun env file extra_files ->
let
f
,
id
=
let
l
=
List
.
rev
q
in
List
.
rev
(
List
.
tl
l
)
,
List
.
hd
l
in
let
th
=
try
Env
.
read_theory
~
format
:
"why"
env
f
id
with
e
->
raise
(
Loc
.
Located
(
loc
,
e
))
with
e
when
not
(
Debug
.
test_flag
Debug
.
stack_trace
)
->
raise
(
Loc
.
Located
(
loc
,
e
))
in
qualid
:=
q
;
List
.
iter
(
add_local
th
)
trl
...
...
src/parser/denv.ml
View file @
95a485de
...
...
@@ -52,8 +52,12 @@ let tyapp ts tyl = match ts.ts_def with
Tyapp
(
ts
,
tyl
)
|
Some
ty
->
let
add
m
v
t
=
Mtv
.
add
v
t
m
in
let
s
=
List
.
fold_left2
add
Mtv
.
empty
ts
.
ts_args
tyl
in
type_inst
s
ty
try
let
s
=
List
.
fold_left2
add
Mtv
.
empty
ts
.
ts_args
tyl
in
type_inst
s
ty
with
Invalid_argument
_
->
Loc
.
errorm
"this type expects %d parameters"
(
List
.
length
ts
.
ts_args
)
type
dty
=
dty_view
...
...
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