less prototype, less bad code implementation of CCHM type theory
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
1014 B

  1. FUNCTIONS := $(shell grep -R "foreign" src/ | cut -d' ' -f4)
  2. HS_FILES := $(shell find src -type f -name '*.hs' -or -name '*.hs-boot')
  3. CABAL_OPTL := $(foreach function,$(FUNCTIONS),--ghc-option=-optl--export-function=$(function)) -f asterius
  4. AHCD_OPTL := $(foreach function,$(FUNCTIONS),--export-function=$(function))
  5. CABAL := ahc-cabal
  6. AHCD := ahc-dist
  7. web/dist/cubical.wasm: web/dist/cubical.js
  8. cp dist-newstyle/cubical.wasm $@
  9. web/dist/cubical.js: dist-newstyle/cubical.js
  10. cp dist-newstyle/cubical.js $@
  11. dist-newstyle/cubical.js: dist-newstyle/cubical src/wrapper.mjs
  12. mkdir -p dist-newstyle/ahcd-spam
  13. $(AHCD) $(AHCD_OPTL) --input-exe $< --browser --bundle --input-mjs src/wrapper.mjs
  14. dist-newstyle/cubical: src/Presyntax/Lexer.hs src/Presyntax/Parser.hs $(HS_FILES)
  15. $(CABAL) v2-install $(CABAL_OPTL) --installdir dist-newstyle exe:cubical --overwrite-policy=always
  16. src/Presyntax/Lexer.hs: src/Presyntax/Lexer.x
  17. alex $<
  18. src/Presyntax/Parser.hs: src/Presyntax/Parser.y
  19. happy $<