Open lastland opened 6 years ago
So it’s just a matter of picking the right signature?
If you fix it manually in the coq file, does the rest go through?
It doesn't. In particular, there is something wrong with the ordering of some instances, but I don't know whether that's caused by this as well or not.
Oh, ordering of instances often needs manual intervention, using order
edits.
I'm aware of that. In fact, I had order
edits and yet hs-to-coq generates the instances in the wrong order. Removing the default method from original Haskell file fixes that part of the problem. So somehow the default method influences the ordering (I haven't figured out why).
Semigroup.hs
used theDefaultSignatures
extension to define theSemigroup
type class:Notice that the default method has a different type signature.
hs-to-coq
will translate the above type class into the following (wrong) Coq code:The
Monoid
constraint should not appear in the type signature.