Skip to content

Commit

Permalink
Merge pull request #9 from airh4ck/llvm
Browse files Browse the repository at this point in the history
Llvm
  • Loading branch information
Danila-Pechenev authored Nov 24, 2023
2 parents 27940d8 + b9a304c commit b0e3612
Show file tree
Hide file tree
Showing 19 changed files with 2,073 additions and 132 deletions.
7 changes: 5 additions & 2 deletions PeDuCoML/lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
Closure_conversion
Lambda_lift
Match_elim
State)
(libraries angstrom)
State
Llvm_comp
Pprint_comp_error
Peducoml_stdlib)
(libraries angstrom llvm)
(preprocess
(pps ppx_expect ppx_deriving.show ppx_deriving.eq))
(inline_tests)
Expand Down
10 changes: 10 additions & 0 deletions PeDuCoML/lib/llvm/Pprint_comp_error.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(** Copyright 2023-2024, Danila Pechenev, Ilya Dudnikov *)

(** SPDX-License-Identifier: LGPL-3.0-or-later *)

open Llvm_comp
open Pprintanf

let pp_error fmt = function
| UnboundVariable var -> Format.fprintf fmt "Error: unbound variable: %a" pp_id var
;;
5 changes: 5 additions & 0 deletions PeDuCoML/lib/llvm/Pprint_comp_error.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(** Copyright 2023-2024, Danila Pechenev, Ilya Dudnikov *)

(** SPDX-License-Identifier: LGPL-3.0-or-later *)

val pp_error : Format.formatter -> Llvm_comp.llvm_error -> unit
Loading

0 comments on commit b0e3612

Please sign in to comment.