From 9ae0e36a653a56ad54bd0a18c7c2127925184a2e Mon Sep 17 00:00:00 2001 From: rhiannon morris Date: Mon, 2 May 2022 20:51:19 +0200 Subject: [PATCH] time for sirdi --- .gitignore | 1 + Makefile | 31 +++++++++++----------- exe/Makefile | 17 ------------ exe/quox-exe.ipkg | 6 ----- exe/sirdi.json | 14 ++++++++++ exe/{ => src}/Main.idr | 0 quox.ipkg | 39 --------------------------- sirdi.json | 47 +++++++++++++++++++++++++++++++++ tests/Makefile | 26 ------------------ tests/sirdi.json | 21 +++++++++++++++ tests/{ => src}/Options.idr | 0 tests/{ => src}/TAP.idr | 0 tests/{ => src}/Tests.idr | 0 tests/{ => src}/Tests/Equal.idr | 0 tests/{ => src}/Tests/Lexer.idr | 0 tests/tests.ipkg | 6 ----- 16 files changed, 99 insertions(+), 109 deletions(-) delete mode 100644 exe/Makefile delete mode 100644 exe/quox-exe.ipkg create mode 100644 exe/sirdi.json rename exe/{ => src}/Main.idr (100%) delete mode 100644 quox.ipkg create mode 100644 sirdi.json delete mode 100644 tests/Makefile create mode 100644 tests/sirdi.json rename tests/{ => src}/Options.idr (100%) rename tests/{ => src}/TAP.idr (100%) rename tests/{ => src}/Tests.idr (100%) rename tests/{ => src}/Tests/Equal.idr (100%) rename tests/{ => src}/Tests/Lexer.idr (100%) delete mode 100644 tests/tests.ipkg diff --git a/.gitignore b/.gitignore index 3736b22..23ee719 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build +.build depends *~ diff --git a/Makefile b/Makefile index 6968ae0..f3461a9 100644 --- a/Makefile +++ b/Makefile @@ -1,27 +1,28 @@ all: quox -quox: exe - cp exe/build/exec/quox . +quox: + (cd exe; sirdi build) + ln -sf exe/build/exec/main $@ + +quox-tests: + (cd tests; sirdi build) + ln -sf tests/build/exec/main $@ .PHONY: lib lib: - idris2 --build quox.ipkg - -.PHONY: exe -exe: - $(MAKE) -C exe exe + sirdi build .PHONY: test -test: - $(MAKE) -C tests test +test: quox-tests + ./quox-tests -V 14 .PHONY: prove -prove: - $(MAKE) -C tests prove +prove: quox-tests + prove ./quox-tests .PHONY: clean clean: - $(RM) -r build depends - $(RM) quox - $(MAKE) -C exe clean - $(MAKE) -C tests clean + $(RM) quox quox-tests + sirdi clean + (cd exe; sirdi clean) + (cd tests; sirdi clean) diff --git a/exe/Makefile b/exe/Makefile deleted file mode 100644 index 287a38a..0000000 --- a/exe/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -all: test - -.PHONY: lib -lib: - $(MAKE) -C .. lib - -depends/quox: lib - mkdir -p depends - ln -sf ../../build/ttc depends/quox - -.PHONY: test -exe: depends/quox - idris2 --build quox-exe.ipkg - -.PHONY: clean -clean: - $(RM) -r build depends diff --git a/exe/quox-exe.ipkg b/exe/quox-exe.ipkg deleted file mode 100644 index 9277e65..0000000 --- a/exe/quox-exe.ipkg +++ /dev/null @@ -1,6 +0,0 @@ -package quox-exe - -executable = quox -main = Main - -depends = base, contrib, quox diff --git a/exe/sirdi.json b/exe/sirdi.json new file mode 100644 index 0000000..54c64df --- /dev/null +++ b/exe/sirdi.json @@ -0,0 +1,14 @@ +[ + { + "name" : "quox-exe", + + "deps" : [ + { "name" : "base", "legacy" : true }, + { "name" : "contrib", "legacy" : true }, + { "name" : "quox", "local" : ".." } + ], + + "main" : "Main", + "modules" : ["Main"] + } +] diff --git a/exe/Main.idr b/exe/src/Main.idr similarity index 100% rename from exe/Main.idr rename to exe/src/Main.idr diff --git a/quox.ipkg b/quox.ipkg deleted file mode 100644 index 6f53343..0000000 --- a/quox.ipkg +++ /dev/null @@ -1,39 +0,0 @@ -package quox -version = 0 -license = "acsl" -authors = "rhiannon morris" --- homepage = "..." -sourceloc = "https://git.rhiannon.website/rhi/quox" - -depends = base, contrib - -sourcedir = "src" -modules = - Quox.Error, - Quox.NatExtra, - Quox.OPE, - Quox.Pretty, - - Quox.Syntax, - Quox.Syntax.Dim, - Quox.Syntax.DimEq, - Quox.Syntax.Qty, - Quox.Syntax.Shift, - Quox.Syntax.Subst, - Quox.Syntax.Term, - Quox.Syntax.Term.Base, - Quox.Syntax.Term.Pretty, - Quox.Syntax.Term.Reduce, - Quox.Syntax.Term.Split, - Quox.Syntax.Term.Subst, - Quox.Syntax.Universe, - Quox.Syntax.Var, - Quox.Lexer, - - Quox.Context, - Quox.Equal, - Quox.Name, - Quox.Reduce, - - Quox.Typing, - Quox.Typechecker diff --git a/sirdi.json b/sirdi.json new file mode 100644 index 0000000..649f028 --- /dev/null +++ b/sirdi.json @@ -0,0 +1,47 @@ +[ + { + "name" : "quox", + "version" : "0.0.0", + "passthru": { + "license" : "acsl", + "authors" : ["rhiannon morris"], + "sourceloc" : "https://git.rhiannon.website/rhi/quox" + }, + + "deps" : [ + { "name" : "base", "legacy" : true }, + { "name" : "contrib", "legacy" : true } + ], + + "modules" : [ + "Quox.Error", + "Quox.NatExtra", + "Quox.OPE", + "Quox.Pretty", + + "Quox.Syntax", + "Quox.Syntax.Dim", + "Quox.Syntax.DimEq", + "Quox.Syntax.Qty", + "Quox.Syntax.Shift", + "Quox.Syntax.Subst", + "Quox.Syntax.Term", + "Quox.Syntax.Term.Base", + "Quox.Syntax.Term.Pretty", + "Quox.Syntax.Term.Reduce", + "Quox.Syntax.Term.Split", + "Quox.Syntax.Term.Subst", + "Quox.Syntax.Universe", + "Quox.Syntax.Var", + "Quox.Lexer", + + "Quox.Context", + "Quox.Equal", + "Quox.Name", + "Quox.Reduce", + + "Quox.Typing", + "Quox.Typechecker" + ] + } +] diff --git a/tests/Makefile b/tests/Makefile deleted file mode 100644 index 835ba35..0000000 --- a/tests/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -all: test - -.PHONY: lib -lib: - $(MAKE) -C .. lib - -depends/quox: lib - mkdir -p depends - ln -sf ../../build/ttc depends/quox - -.PHONY: build-tests -build-tests: depends/quox - idris2 --build tests.ipkg - -.PHONY: test -test: build-tests - build/exec/quox-tests -V 14 - -.PHONY: prove -prove: build-tests - prove build/exec/quox-tests - - -.PHONY: clean -clean: - $(RM) -r build depends diff --git a/tests/sirdi.json b/tests/sirdi.json new file mode 100644 index 0000000..58e730a --- /dev/null +++ b/tests/sirdi.json @@ -0,0 +1,21 @@ +[ + { + "name" : "quox-tests", + + "deps" : [ + { "name" : "base", "legacy" : true }, + { "name" : "contrib", "legacy" : true }, + { "name" : "quox", "local" : ".." } + ], + + "main" : "Tests", + "modules" : [ + "Tests", + "Options", + "TAP", + + "Tests.Lexer", + "Tests.Equal" + ] + } +] diff --git a/tests/Options.idr b/tests/src/Options.idr similarity index 100% rename from tests/Options.idr rename to tests/src/Options.idr diff --git a/tests/TAP.idr b/tests/src/TAP.idr similarity index 100% rename from tests/TAP.idr rename to tests/src/TAP.idr diff --git a/tests/Tests.idr b/tests/src/Tests.idr similarity index 100% rename from tests/Tests.idr rename to tests/src/Tests.idr diff --git a/tests/Tests/Equal.idr b/tests/src/Tests/Equal.idr similarity index 100% rename from tests/Tests/Equal.idr rename to tests/src/Tests/Equal.idr diff --git a/tests/Tests/Lexer.idr b/tests/src/Tests/Lexer.idr similarity index 100% rename from tests/Tests/Lexer.idr rename to tests/src/Tests/Lexer.idr diff --git a/tests/tests.ipkg b/tests/tests.ipkg deleted file mode 100644 index 3941360..0000000 --- a/tests/tests.ipkg +++ /dev/null @@ -1,6 +0,0 @@ -package quox-tests - -executable = quox-tests -main = Tests - -depends = base, contrib, quox