Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
alphaLib
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
POTTIER Francois
alphaLib
Commits
b0e924cf
Commit
b0e924cf
authored
Feb 01, 2017
by
POTTIER Francois
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Indentation.
parent
a5b3a04d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
35 deletions
+39
-35
src/Toolbox.cppo.ml
src/Toolbox.cppo.ml
+39
-35
No files found.
src/Toolbox.cppo.ml
View file @
b0e924cf
(* -------------------------------------------------------------------------- *)
(* This functor is applied to a type of terms, equipped with visitor classes.
It produces a toolbox of useful functions that operate on terms. *)
...
...
@@ -61,58 +59,64 @@ module Make (Term : sig
end
)
=
struct
open
Term
open
Term
(* -------------------------------------------------------------------------- *)
(* A raw term is one where every name is represented as a string. This form is
typically produced by a parser, and consumed by a printer. It is not used
internally. *)
(* A raw term is one where every name is represented as a string. This form
is typically produced by a parser, and consumed by a printer. It is not
used
internally. *)
type
raw_term
=
(
string
,
string
)
term
type
raw_term
=
(
string
,
string
)
term
(* A nominal term is one where every name is represented as an atom. Although
this is not visible in this type definition, we may additionally impose a
Global Uniqueness Hypothesis (GUH), that is, we may require every binding
name occurrence to carry a distinct atom. *)
(* A nominal term is one where every name is represented as an atom. Although
this is not visible in this type definition, we may additionally impose a
Global Uniqueness Hypothesis (GUH), that is, we may require every binding
name occurrence to carry a distinct atom. *)
type
nominal_term
=
(
Atom
.
t
,
Atom
.
t
)
term
type
nominal_term
=
(
Atom
.
t
,
Atom
.
t
)
term
(* -------------------------------------------------------------------------- *)
#
include
"AlphaLibMacros.cppo.ml"
(* All of the code is produced by macro-expansion. *)
(* This serves as a test of our macros, which can also be used directly by
the end user, in situations where the functor [Toolbox.Make] cannot be
used. *)
#
include
"AlphaLibMacros.cppo.ml"
__FA
FA
(
term
)
__FA
FA
(
term
)
__FILTER
FILTER
(
term
)
__FILTER
FILTER
(
term
)
__BA
BA
(
term
)
__BA
BA
(
term
)
__COPY
COPY
(
term
)
__COPY
COPY
(
term
)
__SHOW
SHOW
(
term
)
__SHOW
SHOW
(
term
)
__IMPORT
IMPORT
(
term
)
__IMPORT
IMPORT
(
term
)
__EXPORT
EXPORT
(
term
)
__EXPORT
EXPORT
(
term
)
__SIZE
SIZE
(
term
)
__SIZE
SIZE
(
term
)
__EQUIV
EQUIV
(
term
)
__EQUIV
EQUIV
(
term
)
__SUBST
(
term
,
TVar
)
SUBST
(
term
,
term
)
__SUBST
(
term
,
TVar
)
SUBST
(
term
,
term
)
(* -------------------------------------------------------------------------- *)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment