Skip to content

Extract shared definitions for typed and untyped representations#57

Merged
VietAnh1010 merged 7 commits into
masterfrom
deduplicate-ast
Sep 1, 2025
Merged

Extract shared definitions for typed and untyped representations#57
VietAnh1010 merged 7 commits into
masterfrom
deduplicate-ast

Conversation

@danbaterisna

Copy link
Copy Markdown
Collaborator

Merges some of the definitions which the recursive AST types do not depend on (e.g. lemma, pred_def) by functorizing them, and moves some shared libraries (e.g. Types, Common) to their own library. The new structure aims to preserve the interface currently exposed by Hiptypes and Typedhip.

@VietAnh1010 VietAnh1010 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice improvement, if we can merge this.

exception Foo of string

let rec get_tactic e =
let open Hipcore_common.Tactics in

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure whether this tactic is still relevant. But we can keep it there.

Comment thread lib/hipcore/common.ml
@@ -1,96 +1,3 @@
let ( let@ ) f x = f x

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be put into utils?

Comment thread lib/hipcore_common/common.ml Outdated
let ( let@ ) f x = f x

(** A write-only list that supports efficient accumulation from the back *)
module Acc : sig

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This, should be move into utils.

@VietAnh1010

Copy link
Copy Markdown
Collaborator

Is this ready to be merged? Let's push, as induction will be a big PR and thus will have lots of conflicts with this.

Better to merge this early, and then we resolve the conflicts early.

@danbaterisna

Copy link
Copy Markdown
Collaborator Author

Sure, feel free to merge.

@VietAnh1010 VietAnh1010 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but why the name hstdlib? What does h stand for?

@VietAnh1010 VietAnh1010 merged commit b3bdb07 into master Sep 1, 2025
1 check passed
@VietAnh1010 VietAnh1010 deleted the deduplicate-ast branch March 5, 2026 06:25
@VietAnh1010 VietAnh1010 restored the deduplicate-ast branch March 5, 2026 06:25
@VietAnh1010 VietAnh1010 deleted the deduplicate-ast branch March 5, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants