Skip to content

Commit dbed406

Browse files
Cleans up the README
1 parent 07c4787 commit dbed406

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,34 +43,34 @@ The Coral GitHub page provides installers for MacOS and several Linux distributi
4343
To build the language from the source, **you must have OCaml (5.x recommended), ocaml-llvm, and clang already installed**. To build Coral from the source with OCaml, ocaml-llvm, and gcc/clang already installed, run:
4444

4545
```bash
46-
> git clone https://github.com/jacobaustin123/Coral.git
47-
> cd Coral
48-
> make
46+
git clone https://github.com/jacobaustin123/Coral.git
47+
cd Coral
48+
make
4949
```
5050

5151
This will generate an executable called coral which acts as a compiler and interpreter for our language. If OCaml and ocaml-llvm are not already installed, you should install them. On Mac OS, run:
5252

5353
```bash
54-
> brew install opam llvm
55-
> opam init
56-
> eval $(opam env)
57-
> opam install llvm ocamlbuild ocamlfind
54+
brew install opam llvm
55+
opam init
56+
eval $(opam env)
57+
opam install llvm ocamlbuild ocamlfind
5858
```
5959

6060
If the above fails, you may need to run `eval $(opam env)` after opam init. You may also need to ensure the LLVM binaries are in your PATH:
6161

6262
```bash
63-
> export PATH=/opt/homebrew/opt/llvm/bin:$PATH # Apple Silicon
64-
> export PATH=/usr/local/opt/llvm/bin:$PATH # Intel Mac
63+
export PATH=/opt/homebrew/opt/llvm/bin:$PATH # Apple Silicon
64+
export PATH=/usr/local/opt/llvm/bin:$PATH # Intel Mac
6565
```
6666

6767
On Linux, follow the OCaml/Opam installation instructions [here](https://opam.ocaml.org/doc/Install.html) for your distribution, install llvm following instructions [here](https://apt.llvm.org/), and then run
6868

6969
```bash
70-
> sudo apt-get install cmake llvm opam
71-
> opam init
72-
> eval $(opam env)
73-
> opam install llvm ocamlbuild ocamlfind
70+
sudo apt-get install cmake llvm opam
71+
opam init
72+
eval $(opam env)
73+
opam install llvm ocamlbuild ocamlfind
7474
```
7575

7676
You may need to add the llvm bin directory to your PATH variable using bashrc or zshrc.
@@ -116,23 +116,23 @@ print(gcd(a,b))
116116
This code is syntactically identical to Python, and requires no type annotations. To compile using the Coral compiler, save this code to a file called gcd.cl and compile it with
117117

118118
```bash
119-
> coral gcd.cl
119+
coral gcd.cl
120120
```
121121

122122
By default, this will generate the corresponding LLVM IR, compile it to an executable file called a.out, and run it. To change the name of the output file, run
123123

124124
```bash
125-
> coral gcd.cl -o main
125+
coral gcd.cl -o main
126126
```
127127

128128
This will name the file main instead. To generate only the LLVM IR, run Coral with the ```-emit-llvm``` flag. To generate only the assembly code, run Coral with the ```-S``` flag. To only run the semantic checker without compilation, use the ```-no-compile``` flag. To disable runtime error checking for improved performance, using the ```-no-except``` flag.
129129

130130
```bash
131-
> coral gcd.cl -emit-llvm # only produces llvm
132-
> coral gcd.cl -no-compile # only run semantic checker
133-
> coral gcd.cl -no-except # generates machine code with no runtime error handling
134-
> coral gcd.cl -S # only generates assembly code
135-
> coral gcd.cl -d # shows debugging information about the program. can be combined with other flags
131+
coral gcd.cl -emit-llvm # only produces llvm
132+
coral gcd.cl -no-compile # only run semantic checker
133+
coral gcd.cl -no-except # generates machine code with no runtime error handling
134+
coral gcd.cl -S # only generates assembly code
135+
coral gcd.cl -d # shows debugging information about the program. can be combined with other flags
136136
```
137137

138138
Coral also has a build-in **interpreter**. To use the interpreter, simply run ```coral``` without a file specified. This will open an interactive window like the OCaml or Python interpreter in which you can run any valid Coral program. The following is an example of gcd code run in the interpreter:

0 commit comments

Comments
 (0)