Skip to content

Commit fdfb0be

Browse files
Vincent Silesfacebook-github-bot
authored andcommitted
Adding first draft of subtyping rules
Summary: This is a first draft at documenting the main component of the subtyping rule: `less_or_equal`. We still need `join` and `meet` to have a realistic package. The style is to write down the rules in the same order as the code. At some point we might want to change to a style with only "positive rules" (e.g. don't write anything about Top <= T, because if there is no rule to build it, we can't prove it). That might evolve in the future Reviewed By: dkgi Differential Revision: D16120038 fbshipit-source-id: ddc1ee5df934771e1d3185bf98f3cae04e4f292d
1 parent b6df4d2 commit fdfb0be

File tree

6 files changed

+948
-0
lines changed

6 files changed

+948
-0
lines changed

docs/formal/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.aux
2+
*.log
3+
*.pdf
4+
*.out

docs/formal/DejaVuSansMono.sty

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
\ProvidesPackage{DejaVuSansMono} [2011/06/01 Style file for DejaVuSansMono.]
2+
%%
3+
%% Options:
4+
%% [scaled] --> Scale = 0.95
5+
%% [scaled=0.9] --> Scale = 0.90
6+
%%
7+
\RequirePackage{keyval}
8+
\define@key{DejaVuSansMono}{scaled}[0.95]{%
9+
\def\DejaVuSansMono@scale{#1}}
10+
\def\ProcessOptionsWithKV#1{%
11+
\let\@tempc\relax
12+
\let\DejaVuSansMono@tempa\@empty
13+
\@for\CurrentOption:=\@classoptionslist\do{%
14+
\@ifundefined{KV@#1@\CurrentOption}%
15+
{}%
16+
{%
17+
\edef\DejaVuSansMono@tempa{\DejaVuSansMono@tempa,\CurrentOption,}%
18+
\@expandtwoargs\@removeelement\CurrentOption
19+
\@unusedoptionlist\@unusedoptionlist
20+
}%
21+
}%
22+
\edef\DejaVuSansMono@tempa{%
23+
\noexpand\setkeys{#1}{%
24+
\DejaVuSansMono@tempa\@ptionlist{\@currname.\@currext}%
25+
}%
26+
}%
27+
\DejaVuSansMono@tempa
28+
\let\CurrentOption\@empty
29+
}
30+
\ProcessOptionsWithKV{DejaVuSansMono}
31+
\AtEndOfPackage{%
32+
\let\@unprocessedoptions\relax
33+
}
34+
35+
36+
\renewcommand{\ttdefault}{DejaVuSansMono-TLF}
37+
38+
\endinput

docs/formal/Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
DOC=pyre_sub
2+
3+
all: $(DOC).pdf
4+
5+
$(DOC).pdf: $(DOC).tex
6+
rubber -d $^
7+
8+
watch:
9+
sh -c "mupdf-gl $(DOC).pdf 2>/dev/null >&2 & jobs -p %1 > .mupdf.pid"
10+
fswatch $(DOC).tex | xargs -n1 sh -c 'make && echo "Refreshing..." && kill -n 1 `cat .mupdf.pid`'
11+
12+
clean:
13+
rm -f *.aux *.dvi *.log
14+
15+
.PHONY: watch clean

docs/formal/lstocaml.sty

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
%%
2+
% Copyright (c) 2018-present, Facebook, Inc.
3+
%
4+
% This source code is licensed under the MIT license found in the
5+
% LICENSE file in the root directory of this source tree.
6+
%%
7+
8+
\usepackage{xcolor}
9+
\definecolor{butter}{HTML}{C4A000}
10+
\definecolor{orange}{HTML}{CE5C00}
11+
\definecolor{chocolate}{HTML}{8F5902}
12+
\definecolor{chameleon}{HTML}{4E9A06}
13+
\definecolor{skyblue}{HTML}{204A87}
14+
\definecolor{plum}{HTML}{5C3566}
15+
\definecolor{scarletred}{HTML}{A40000}
16+
\definecolor{lightalu}{HTML}{BABDB6}
17+
\definecolor{darkalu}{HTML}{2E3436}
18+
19+
\newcommand{\kwstyle}{}
20+
21+
\usepackage{listings}
22+
23+
\lstset{
24+
basicstyle=\footnotesize\ttfamily,
25+
breaklines=true,
26+
aboveskip=10pt,
27+
belowskip=5pt,
28+
xleftmargin=10pt,
29+
commentstyle=\color{orange},
30+
keywordstyle=\kwstyle,
31+
language=Caml,
32+
stringstyle=\color{plum},
33+
tabsize=2,
34+
numberstyle=\tiny\color{gray},
35+
escapeinside={(*@}{*)},
36+
numbers=left,
37+
numbersep=2pt,
38+
keywordstyle=[1]\kwstyle\color{chameleon},
39+
keywordstyle=[2]\kwstyle\color{scarletred},
40+
keywordstyle=[3]\kwstyle\color{skyblue},
41+
keywordstyle=[4]\kwstyle\color{butter},
42+
keywordstyle=[5]\kwstyle\color{skyblue},
43+
keywordstyle=[6]\kwstyle\color{skyblue},
44+
keywordstyle=[7]\kwstyle\color{chameleon},
45+
keywordstyle=[8]\kwstyle\color{butter},
46+
keywordstyle=[9]\kwstyle\color{butter},
47+
keywords=[1]{let,val,method,in,and,rec,private,virtual,constraint},
48+
keywords=[2]{type,open,class,module,exception,external},
49+
keywords=[3]{fun,function,functor,match,try,with},
50+
keywords=[4]{as,when,of},
51+
keywords=[5]{if,then,else},
52+
keywords=[6]{begin,end,object,struct,sig,for,while,do,done,to,downto},
53+
keywords=[7]{true,false},
54+
keywords=[8]{include,inherit,initializer},
55+
keywords=[9]{new,ref,mutable,lazy,assert,raise},
56+
}
57+
58+
\lstset{literate=
59+
{`}{{{\lq}}}1
60+
}

0 commit comments

Comments
 (0)