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
fd30dbf9
Commit
fd30dbf9
authored
Apr 05, 2021
by
Kim Nguyễn
Browse files
Remove leftover renamed file.
parent
420e2189
Changes
1
Hide whitespace changes
Inline
Side-by-side
ocamliface/mlcompat_411.ml
deleted
100644 → 0
View file @
420e2189
(* Compatibilty for OCaml 4.11 & 4.12 *)
open
Cduce_core
let
longident_parse
s
=
let
open
Ocaml_common
in
match
String
.
index_opt
s
'.'
with
|
None
->
Longident
.
Lident
s
|
_
->
Parse
.
longident
(
Lexing
.
from_string
s
)
module
Mlstub
=
struct
let
noloc
id
=
Some
id
let
str_open
l
=
let
open
Ocaml_common
.
Ast_helper
in
Str
.
open_
(
Opn
.
mk
(
Mod
.
ident
l
))
end
module
Mltypes
=
struct
open
Ocaml_common
let
get_path_from_mty_alias
=
function
|
Types
.
Mty_alias
p
->
p
|
_
->
assert
false
let
lookup_value
li
env
=
Env
.
find_value_by_name
li
env
let
lookup_module
li
env
=
let
loc
=
Warnings
.
{
loc_start
=
Lexing
.
dummy_pos
;
loc_end
=
Lexing
.
dummy_pos
;
loc_ghost
=
true
;
}
in
Env
.
lookup_module_path
~
use
:
true
~
load
:
true
~
loc
li
env
let
is_mty_alias
=
function
Types
.
Mty_alias
_
->
true
|
_
->
false
let
mty_get_path
=
function
Types
.
Mty_alias
p
->
p
|
_
->
assert
false
let
load_path
=
let
once
=
ref
false
in
function
|
()
->
if
!
once
then
()
else
begin
once
:=
true
;
List
.
iter
Load_path
.
add_dir
(
List
.
rev
!
Cduce_loc
.
obj_path
);
Load_path
.
add_dir
Config
.
standard_library
end
let
find_in_path
file
=
Misc
.
find_in_path_uncap
(
Load_path
.
get_paths
()
)
file
let
get_path_from_pdot
e
=
match
e
with
Path
.
Pdot
(
p
,
_
)
->
p
|
_
->
assert
false
let
is_sig_value_val_reg
e
=
match
e
with
|
Types
.
Sig_value
(
_
,
{
val_type
=
_
;
val_kind
=
Val_reg
;
_
}
,
_
)
->
true
|
_
->
false
let
get_id_t_from_sig_value
e
=
match
e
with
|
Types
.
Sig_value
(
id
,
{
val_type
=
t
;
_
}
,
_
)
->
(
id
,
t
)
|
_
->
assert
false
let
get_sig_type
e
=
match
e
with
|
Types
.
Sig_type
(
id
,
t
,
rs
,
_
)
->
(
id
,
t
,
rs
)
|
_
->
assert
false
end
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