History

Continue fighting implicit creation of compiled interface files

By (sadly) not using wsi.mli at all. ocamlc refuses to play ball when interface is not in the same directory with the implementation [1], and symlinking: causes cognitive dissonance is fragile in presence of PBMAC [1] misc/notes/cmi.sh describes the problem (removed by this commit)

malc committed 5 years ago

Commit d057d341 parent 09631075 files · +2 −67Browse files

Unified · Split

5 files
  1. build.bash +1 −1
  2. misc/notes/cmi.sh +1 −3
  3. wsi/cocoa/wsi.mli +0 −1
  4. wsi/wsi.mli +0 −61
  5. wsi/x11/wsi.mli +0 −1
build.bash+1−1
@@ -51,7 +51,7 @@ $make -q -s || $make · 50 unmodified lines
51oincs() {51oincs() {
52 local b=$1 incs52 local b=$1 incs
53 case "${2#$outd/}" in53 case "${2#$outd/}" in
54 $wsid/wsi.cm[io]|confstruct.cmo|help.cmo) incs="-I $b -I $b/$wsid";;54 $wsid/wsi.cmo|confstruct.cmo|help.cmo) incs="-I $b -I $b/$wsid";;
55 glutils.cmo) incs="-I $b -I $b/lablGL";;55 glutils.cmo) incs="-I $b -I $b/lablGL";;
56 uiutils.cmo|main.cmo) incs="-I $b -I $b/$wsid -I $b/lablGL";;56 uiutils.cmo|main.cmo) incs="-I $b -I $b/$wsid -I $b/lablGL";;
57 ffi.cmo|help.cmi|parser.cmo) incs="-I $b";;57 ffi.cmo|help.cmi|parser.cmo) incs="-I $b";;
misc/notes/cmi.sh+1−3
@@ -1,12 +1,10 @@
1#!/bin/sh1#!/bin/sh
2set -eu2set -eu
3 3
4# On why wsi.mli is symlinked from the root to wsi/_platform_/wsi.mli
5
6mkdir -p /tmp/cmi/{d,b/d}4mkdir -p /tmp/cmi/{d,b/d}
7cd /tmp/cmi5cd /tmp/cmi
8touch a.mli d/a.ml6touch a.mli d/a.ml
9ocamlc -c -I b/ -o b/a.cmi a.mli7ocamlc -c -I b/ -o b/a.cmi a.mli
10ocamlc -c -I b/ -o b/d/a.cmo d/a.ml8ocamlc -c -I b/ -o b/d/a.cmo d/a.ml
11 9
12# after running this script a.cmi will be in b/ and in b/d10# after running this script a.cmi will be in b/ _AND_ in b/d
wsi/cocoa/wsi.mli+0−1
@@ -1 +0,0 @@
1../wsi.mli
wsi/wsi.mli+0−61
@@ -1,61 +0,0 @@
1type cursor =
2 | CURSOR_INHERIT
3 | CURSOR_INFO
4 | CURSOR_CYCLE
5 | CURSOR_FLEUR
6 | CURSOR_TEXT
7
8type winstate =
9 | MaxVert
10 | MaxHorz
11 | Fullscreen
12
13type visiblestate =
14 | Unobscured
15 | PartiallyObscured
16 | FullyObscured
17
18class type t =
19 object
20 method display : unit
21 method map : bool -> unit
22 method expose : unit
23 method visible : visiblestate -> unit
24 method reshape : int -> int -> unit
25 method mouse : int -> bool -> int -> int -> int -> unit
26 method motion : int -> int -> unit
27 method pmotion : int -> int -> unit
28 method key : int -> int -> unit
29 method enter : int -> int -> unit
30 method leave : unit
31 method winstate : winstate list -> unit
32 method quit : 'a. 'a
33 method scroll : int -> int -> unit
34 method zoom : float -> int -> int -> unit
35 method opendoc : string -> unit
36 end
37
38type keycode = int
39val setcursor : cursor -> unit
40val settitle : string -> unit
41val swapb : unit -> unit
42val readresp : Unix.file_descr -> unit
43val init : t -> int -> int -> Unix.file_descr * int * int
44val fullscreen : unit -> unit
45val reshape : int -> int -> unit
46val activatewin : unit -> unit
47val mapwin : unit -> unit
48val withalt : int -> bool
49val withctrl : int -> bool
50val withshift : int -> bool
51val withmeta : int -> bool
52val withnone : int -> bool
53val metamask : int
54val altmask : int
55val shiftmask : int
56val ctrlmask : int
57val keyname : int -> string
58val namekey : string -> int
59val fontsizescale : int -> int
60val ks2kt : int -> Keys.t
61val cAp : string
wsi/x11/wsi.mli+0−1
@@ -1 +0,0 @@
1../wsi.mli

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t