idris-ct icon indicating copy to clipboard operation
idris-ct copied to clipboard

Convert to Idris 2

Open marcosh opened this issue 5 years ago • 9 comments

We will have to consider this at some point, so I thought it would be good to put this out here.

coming from https://github.com/statebox/idris-stbx-core/issues/34

marcosh avatar Apr 04 '19 17:04 marcosh

Blodwen is now deprecated so I removed it from the title

clayrat avatar Jul 09 '19 11:07 clayrat

Issues encountered:

  • ~~Basic.Functor.functorEq doesn’t typecheck~~ (solved by explicitly using heterogenous equality)
  • Idris.TypesAsCategory.typesAsCategory insists on compose being (partially) eta-expanded, i.e. only \a => compose a and more verbose variants typecheck
  • Product.ProductFunctor.productFunctor doesn't infer a and b for MkProductMorphism in preserveId
  • Preorder.PreorderAsCategory doesn't typecheck unless all type-level references to transitive/reflexive are fed with po explicitly, the error is:
Can't solve constraint between:
	?__con
and
	Constraint ((Preorder t) po) conArg

clayrat avatar Jul 22 '19 18:07 clayrat

Pushed https://github.com/statebox/idris-ct/tree/idris2

clayrat avatar Jul 22 '19 18:07 clayrat

  • Implicit name clashes (for j) in Free.FreeFunctor.foldPath
  • MonoidalCategory.StrictMonoidalCategory.tensorIsAssociativeMor doesn't typecheck with
Can't solve constraint between:
	mapObj tensor (a, c)
and
	a
  • Pattern-matching lambdas in MonoidalCategory.SymmetricMonoidalCategoryHelpers.swapFunctor don't change the goal, need to explicitly case-split to finish local proofs.

clayrat avatar Jul 24 '19 14:07 clayrat

  • Adding unitCoherence to MonoidalCategory.SymmetricMonoidalCategory causes the compiler to crash with Segmentation fault (core dumped).

clayrat avatar Jul 29 '19 13:07 clayrat

TypesAsCategory doesn't compile w/ Idris2 and since I'm quite new to Idris, and can't conclude this from the error messages, I wanted to ask if this might be only a superficial (syntactic, e.g.) incompatibility (and if so how to fix it), or whether it's a more fundamental problem.

cxandru avatar May 02 '21 14:05 cxandru

TypesAsCategory doesn't compile w/ Idris2 and since I'm quite new to Idris, and can't conclude this from the error messages, I wanted to ask if this might be only a superficial (syntactic, e.g.) incompatibility (and if so how to fix it), or whether it's a more fundamental problem.

Ok I fixed some errors by addding qualifcations to the arguments to MkCategory. But the proof for rightIdentity is failing, not for leftIdentity though, curiously enough. What could be the reason?

cxandru avatar May 02 '21 15:05 cxandru

It turned out to be a bug in Idris2: https://github.com/idris-lang/Idris2/issues/1370

cxandru avatar May 05 '21 20:05 cxandru

Looks like the upstream bug is fixed, is the proof going through now?

clayrat avatar May 10 '21 15:05 clayrat