Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
11d82549
Commit
11d82549
authored
Jul 10, 2007
by
Pietro Abate
Browse files
[r2004-12-27 16:03:23 by afrisch] Cleanup
Original author: afrisch Date: 2004-12-27 16:03:23+00:00
parent
bf0b9c53
Changes
1
Hide whitespace changes
Inline
Side-by-side
types/patterns.ml
View file @
11d82549
...
...
@@ -1072,6 +1072,10 @@ struct
|
Normal
.
SConst
c
->
Const
c
|
_
->
assert
false
let
return_basic
disp
selected
=
let
aux_final
res
=
IdMap
.
map_to_list
conv_source_basic
res
in
return
disp
selected
aux_final
let
assoc
v
l
=
try
IdMap
.
assoc
v
l
with
Not_found
->
-
1
...
...
@@ -1101,9 +1105,7 @@ struct
let
selected
=
Array
.
create
(
Array
.
length
pl
)
[]
in
let
add
(
i
,
res
)
=
selected
.
(
i
)
<-
res
::
selected
.
(
i
)
in
List
.
iter
add
success
;
let
aux_final
res
=
IdMap
.
map_to_list
conv_source_basic
res
in
accu
:=
(
t
,
return
disp
selected
aux_final
)
::
!
accu
accu
:=
(
t
,
return_basic
disp
selected
)
::
!
accu
|
(
ty
,
i
)
::
rem
->
aux
(
i
@
success
)
(
Types
.
cap
t
ty
)
rem
;
aux
success
(
Types
.
diff
t
ty
)
rem
...
...
@@ -1196,7 +1198,7 @@ struct
match
disp
.
label
with
|
None
->
let
(
some
,
none
)
=
Types
.
Record
.
empty_cases
t
in
let
some
=
let
some
=
aux
some
if
some
then
let
pl
=
Array
.
map
(
fun
p
->
match
p
.
Normal
.
nrecord
with
|
Normal
.
RecNolabel
(
Some
x
,_
)
->
[
x
]
...
...
@@ -1216,19 +1218,12 @@ struct
in
Some
(
RecNolabel
(
some
,
none
))
|
Some
lab
->
(* Format.fprintf Format.std_formatter "lab=%a Split:@." Label.print (LabelPool.value lab);*)
let
t
=
Types
.
Record
.
split
t
lab
in
(* List.iter (fun (t1,t2) ->
Format.fprintf Format.std_formatter "t1=%a t2=%a@."
Types.Print.print t1
Types.Print.print t2) t; *)
let
pl
=
Array
.
map
(
fun
p
->
match
p
.
Normal
.
nrecord
with
|
Normal
.
RecLabel
(
_
,
l
)
->
Normal
.
NLineProd
.
get
l
|
_
->
assert
false
)
disp
.
pl
in
Some
(
RecLabel
(
lab
,
dispatch_prod0
disp
t
pl
))
(* soucis avec les ncatchv ?? *)
let
actions
disp
=
match
disp
.
actions
with
...
...
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