Skip to content

Commit

Permalink
switch to default scope open via flags
Browse files Browse the repository at this point in the history
- This is to prepare changing the scope to Base in some places. The
  following diffs will be much shorter since we'll only change the
  dune files.
  • Loading branch information
mbarbin committed Oct 31, 2023
1 parent 83ed8b5 commit 5e3b92e
Show file tree
Hide file tree
Showing 366 changed files with 62 additions and 632 deletions.
2 changes: 0 additions & 2 deletions lib/bit_utils/src/bit_array.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type t = bool array [@@deriving compare, equal, quickcheck, sexp_of]

let enqueue_01_char_in_line ~line ~dst =
Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/src/bit_array.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

(** In bopkit, bool arrays have many uses, including saving or reading the
contents of memory-units from files, exchanging the value of buses between
external blocks, printing block outputs to stdout, etc.
Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/src/bit_counter.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type t =
{ length : int
; max_value : int
Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/src/bit_counter.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type t [@@deriving sexp_of]

val create : len:int -> t
Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/src/bit_matrix.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type t = Bit_array.t array [@@deriving compare, equal, sexp_of]

let init_matrix_linear ~dimx ~dimy ~f =
Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/src/bit_matrix.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

(** Extending [Bit_array] for arrays of 2 dimensions. For examples,
loading/saving contents of memories. *)

Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/src/bit_string_encoding.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

module Bit = struct
type t = bool

Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/src/bit_string_encoding.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

(** Some bit encoding that are used throughout the project. *)

module Bit : sig
Expand Down
2 changes: 1 addition & 1 deletion lib/bit_utils/src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(name bit_utils)
(public_name bopkit.bit-utils)
(wrapped false)
(flags -w +a-4-40-42-44-66 -warn-error +a)
(flags -w +a-4-40-42-44-66 -warn-error +a -open Core)
(libraries core)
(preprocess
(pps ppx_jane ppx_js_style -check-doc-comments)))
2 changes: 0 additions & 2 deletions lib/bit_utils/src/partial_bit.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type t = bool option [@@deriving compare, equal, quickcheck, sexp_of]

let conflicts t ~with_:bool =
Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/src/partial_bit.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type t = bool option [@@deriving compare, equal, quickcheck, sexp_of]

(** Check whether the partial bit agrees with a fully specified value. If the
Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/src/partial_bit_array.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type t = Partial_bit.t array [@@deriving compare, equal, quickcheck, sexp_of]

let enqueue_01star_char ~src:string ~dst:q =
Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/src/partial_bit_array.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

(** Sometimes some of the bits of a given computation are not specified
(sometimes called "outputs with bit don't care"). This modules allows to
represent such cases.
Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/src/partial_bit_matrix.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type t = Partial_bit_array.t array [@@deriving compare, equal, sexp_of]

let of_partial_bit_array ~dimx ~dimy code =
Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/src/partial_bit_matrix.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

(** Extending [Partial_bit_array] for arrays of 2 dimensions. *)

type t = Partial_bit_array.t array [@@deriving compare, equal, sexp_of]
Expand Down
2 changes: 1 addition & 1 deletion lib/bit_utils/test/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(library
(name bit_utils_test)
(flags -w +a-4-40-42-44-66 -warn-error +a)
(flags -w +a-4-40-42-44-66 -warn-error +a -open Core)
(libraries
core
core_unix
Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/test/test__bit_array.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

let%expect_test "of_01_chars_in_string" =
let test str = print_s [%sexp (Bit_array.of_01_chars_in_string str : Bit_array.t)] in
test "";
Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/test/test__bit_counter.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

let%expect_test "counter" =
let n = 3 in
let t = Array.create ~len:n false in
Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/test/test__bit_matrix.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

let%expect_test "init" =
let test t = print_s [%sexp (t : Bit_matrix.t)] in
test (Bit_matrix.init_matrix_linear ~dimx:0 ~dimy:0 ~f:(const false));
Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/test/test__bit_string_encoding.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

module T = struct
type t = bool [@@deriving enumerate, equal, sexp_of]
end
Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/test/test__partial_bit.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

module T = struct
type t = bool [@@deriving enumerate, sexp_of]
end
Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/test/test__partial_bit_array.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

let%expect_test "of_01star_chars_in_string" =
let test str =
print_s
Expand Down
2 changes: 0 additions & 2 deletions lib/bit_utils/test/test__partial_bit_matrix.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

let%expect_test "of_partial_bit_array" =
let partial_bit_array =
Array.init 24 ~f:(fun i -> if i mod 5 = 1 then None else Some (i mod 2 = 1))
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/arithmetic_expression.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type t =
| VAR of string
| CST of int
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/arithmetic_expression.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type t =
| VAR of string
| CST of int
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/comment.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type t =
| Single_line of
{ is_documentation_comment : bool
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/comment.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

(** Pretty-printing comments that are found in bopkit files.
The lexer/parser attaches the raw text to AST nodes, containing the entire
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/comments.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type t = Comment.t list Comments_state.Comment_node.t [@@deriving equal, sexp_of]

let value t = Comments_state.Comment_node.value_exn t
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/comments.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type t [@@deriving equal, sexp_of]

val make : attached_to:Lexing.position -> t
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/conditional_expression.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type t =
| CONST of Arithmetic_expression.t
| COND_EQ of Arithmetic_expression.t * Arithmetic_expression.t
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/conditional_expression.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type t =
| CONST of Arithmetic_expression.t
| COND_EQ of Arithmetic_expression.t * Arithmetic_expression.t
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/control_structure.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type 'a t =
| Node of 'a
| For_loop of
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/control_structure.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

(** Control structure acts as macro. They're developed statically during the
analysis of the input program. *)

Expand Down
2 changes: 1 addition & 1 deletion lib/bopkit/src/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(library
(name bopkit)
(public_name bopkit.bopkit)
(flags -w +a-4-40-42-44-66 -warn-error +a)
(flags -w +a-4-40-42-44-66 -warn-error +a -open Core)
(libraries appendable-list bit_utils core error_log parsing_utils pp)
(preprocess
(pps ppx_jane ppx_js_style -check-doc-comments)))
2 changes: 0 additions & 2 deletions lib/bopkit/src/eval_error.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type t =
| Free_variable of
{ name : string
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/eval_error.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

(** A type used to manipulate the errors that occur when evaluating parameters,
string_with_vars, etc. *)

Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/expand_utils.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

let interval_of_index (index : Expanded_netlist.index) =
match index with
| Index i -> Interval.singleton i
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/expand_utils.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

(** Some utils while expanded elements of a [Netlist.t] into elements of an
[Expanded_netlist.t]. *)

Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/expanded_netlist.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type memory =
{ loc : Loc.t
; name : string
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/expanded_netlist.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

(** Expanded netlist is an intermediate representation built during the analysis
of a circuit. Constructs such as control structures and imbrications have
been developed. This representation is used by different parts of bopkit
Expand Down
1 change: 0 additions & 1 deletion lib/bopkit/src/import.ml

This file was deleted.

1 change: 0 additions & 1 deletion lib/bopkit/src/import.mli

This file was deleted.

2 changes: 0 additions & 2 deletions lib/bopkit/src/interval.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type t =
{ from : int
; to_ : int
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/interval.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

(** [from] and [to_] are included in the interval. [from] may be smaller than,
equal to, or greater than [to_]. *)
type t =
Expand Down
3 changes: 0 additions & 3 deletions lib/bopkit/src/netlist.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
open! Core
open! Import

type include_file =
{ loc : Loc.t
; comments : Comments.t
Expand Down
3 changes: 0 additions & 3 deletions lib/bopkit/src/netlist.mli
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
open! Core
open! Import

(** This file defines the abstract syntax tree of [*.bop] files. For each file,
the parser returns a single value of type [t]. *)

Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/or_eval_error.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type 'a t = ('a, Eval_error.t) Result.t [@@deriving sexp_of]

let return a = Ok a
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/or_eval_error.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

type 'a t = ('a, Eval_error.t) Result.t [@@deriving sexp_of]

include Applicative.S with type 'a t := 'a t
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/parameter.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

module Value = struct
type t =
| Int of int
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/parameter.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

(** Parameters are language construct that allows some flexibility in the
definition of blocs, adding parameters to external blocks commands, etc.
Example:
Expand Down
3 changes: 0 additions & 3 deletions lib/bopkit/src/parameters.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
open! Core
open! Import

type t = Parameter.t list

let find (t : t) ~parameter_name =
Expand Down
3 changes: 0 additions & 3 deletions lib/bopkit/src/parameters.mli
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
open! Core
open! Import

(** Bindings between parameter names and values. The type is a list, with the
semantic that values added at the front of the list take precedence over
other values present in the rest of the list. This allows for functional
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/string_with_vars.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

module Part = struct
type t =
| Text of string
Expand Down
2 changes: 0 additions & 2 deletions lib/bopkit/src/string_with_vars.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open! Core

(** String with variables %\{...\} in it. This allows commands to depend on
parameters, etc. *)

Expand Down
2 changes: 1 addition & 1 deletion lib/bopkit/test/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(library
(name bopkit_test)
(flags -w +a-4-40-41-42-44-66 -warn-error +a)
(flags -w +a-4-40-41-42-44-66 -warn-error +a -open Core -open Bopkit)
(libraries core bopkit pp)
(inline_tests)
(preprocess
Expand Down
3 changes: 0 additions & 3 deletions lib/bopkit/test/test__comment.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
open! Core
module Comment = Bopkit.Comment

let%expect_test "categorise" =
let test text =
match Comment.parse text with
Expand Down
3 changes: 0 additions & 3 deletions lib/bopkit/test/test__interval.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
open! Core
module Interval = Bopkit.Interval

let%expect_test "expand" =
let test t =
let r = Interval.expand t ~f:Fn.id in
Expand Down
3 changes: 0 additions & 3 deletions lib/bopkit/test/test__string_with_vars.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
open! Core
open! Bopkit

let%expect_test "eval" =
let test str parameters =
let parameters =
Expand Down
3 changes: 0 additions & 3 deletions lib/bopkit_bdd/src/block.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
open! Core
open! Import

type t =
{ block_name : string
; input_size : int
Expand Down
3 changes: 0 additions & 3 deletions lib/bopkit_bdd/src/block.mli
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
open! Core
open! Import

type t [@@deriving sexp_of]

(** Output a bloc using Bopkit concrete syntax. The resulting simulation of the
Expand Down
2 changes: 1 addition & 1 deletion lib/bopkit_bdd/src/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(library
(name bopkit_bdd)
(public_name bopkit.bdd)
(flags -w +a-4-40-42-44-66 -warn-error +a)
(flags -w +a-4-40-42-44-66 -warn-error +a -open Core)
(libraries core bit_utils bopkit bopkit_pp pp)
(preprocess
(pps ppx_jane ppx_js_style -check-doc-comments)))
3 changes: 0 additions & 3 deletions lib/bopkit_bdd/src/ident.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
open! Core
open! Import

type t =
| Input of int
| Output of int
Expand Down
3 changes: 0 additions & 3 deletions lib/bopkit_bdd/src/ident.mli
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
open! Core
open! Import

(** In bopkit bdd synthesized blocks, there are 3 different classes of signals:

-the input
Expand Down
1 change: 0 additions & 1 deletion lib/bopkit_bdd/src/import.ml

This file was deleted.

1 change: 0 additions & 1 deletion lib/bopkit_bdd/src/import.mli

This file was deleted.

Loading

0 comments on commit 5e3b92e

Please sign in to comment.