Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

Commit fd3487c

Browse files
committed
Convert TopTypes to ml
1 parent 2bc8fbc commit fd3487c

File tree

2 files changed

+31
-28
lines changed

2 files changed

+31
-28
lines changed

src/TopTypes.ml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
(* Aliases to make the intents clearer *)
2+
type uri = Uri2.t
3+
4+
type filePath = string
5+
6+
type moduleName = string
7+
8+
(* Here are the things that will be different between jbuilder things *)
9+
type package = {
10+
rootPath : filePath;
11+
(* Depend on bsb having already run *)
12+
localModules : moduleName list;
13+
interModuleDependencies : (moduleName, moduleName list) Hashtbl.t;
14+
dependencyModules : moduleName list;
15+
pathsForModule : (moduleName, SharedTypes.paths) Hashtbl.t;
16+
namespace : string option;
17+
opens : string list;
18+
}
19+
20+
type state = {
21+
packagesByRoot : (string, package) Hashtbl.t;
22+
rootForUri : (uri, string) Hashtbl.t;
23+
cmtCache : (filePath, float * SharedTypes.file) Hashtbl.t;
24+
}
25+
26+
let empty () =
27+
{
28+
packagesByRoot = Hashtbl.create 1;
29+
rootForUri = Hashtbl.create 30;
30+
cmtCache = Hashtbl.create 30;
31+
}

src/TopTypes.re

-28
This file was deleted.

0 commit comments

Comments
 (0)