Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-compile to de Bruijn indices. #2271

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Get started.
  • Loading branch information
smimram committed Mar 3, 2022
commit 9ad3d2155a5a1268365a4c8ba7e873e898bd0230
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ liquidsoap_sources = \

liquidsoap_sources += \
lang/type.ml lang/repr.ml lang/typing.ml \
lang/profiler.ml lang/term.ml lang/value.ml \
lang/profiler.ml lang/term.ml lang/termDB.ml lang/value.ml \
lang/lang_encoder.ml $(lang_encoders) \
lang/environment.ml lang/typechecking.ml \
lang/evaluation.ml lang/error.ml \
Expand Down
2 changes: 1 addition & 1 deletion src/lang/term.ml
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ and pattern =
| PTuple of pattern list (** a tuple *)
| PList of (pattern list * string option * pattern list) (* a list *)
| PMeth of (pattern option * (string * pattern option) list)
(* a value with methods *)
(** a value with methods *)

type term = t

Expand Down
23 changes: 23 additions & 0 deletions src/lang/termDB.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
(*****************************************************************************

Liquidsoap, a programmable audio stream generator.
Copyright 2003-2022 Savonet team

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details, fully stated in the COPYING
file at the root of the liquidsoap distribution.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

*****************************************************************************)

(** Optimized representation of terms with de Bruijn indices. *)