Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 0 additions & 2 deletions .travis/docker-install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env bash

set -e

docker pull coqorg/coq:${COQ}
docker run -d -i --init --name=COQ -v ${TRAVIS_BUILD_DIR}:/home/coq/${CONTRIB_NAME} -w /home/coq/${CONTRIB_NAME} coqorg/coq:${COQ}
docker exec COQ /bin/bash --login -c "
Expand Down
2 changes: 0 additions & 2 deletions .travis/docker-test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env bash

set -e

echo -e "${ANSI_YELLOW}Building ${CONTRIB_NAME}...${ANSI_RESET}" && echo -en 'travis_fold:start:script\\r'

docker exec COQ /bin/bash --login -c "
Expand Down
2 changes: 2 additions & 0 deletions _CoqProject
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ demo3/test_0_0.v
demo3/test_1_0.v
demo3/test_2_0.v

demo4/hierarchy_0.v

FSCD2020_material/V1.v
FSCD2020_material/V2.v
FSCD2020_material/V3.v
Expand Down
27 changes: 27 additions & 0 deletions demo4/hierarchy_0.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From HB Require Import structures.

HB.mixin Record m1 (T : Type) (A : Type) := {
inhab : A;
inhab_param : T;
}.
HB.structure Definition s1 T := { A of m1 T A }.

Check inhab.
(* inhab : forall (T : Type) (A : s1.type T), s1.sort A *)

HB.instance Definition nat_m1 := m1.Build bool nat 7 false.
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather have this example in a different file/directory than demo4, unless I missed something?

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right. We rebased on top of master after the merge of #73, we were just trying to see what needs fixing, see #74

Check (refl_equal _ : @inhab _ _ = 7).

HB.instance Definition list_m1 A := m1.Build (option A) (list nat) (cons 7 nil) None.
Check (refl_equal _ : @inhab _ _ = (cons 7 nil)).

HB.mixin Record m2 (T : Type) (A : Type) of m1 T A := {
inj : T -> A;
}.

HB.structure Definition s2 T :=
{ A of m1 T A & m2 T A }.

Check fun X : s2.type nat => inhab : X.
Check fun X : s2.type nat => inj : nat -> X.
About s2_to_s1.
Loading