antalsz / hs-to-coq

Convert Haskell source code to Coq source code
https://hs-to-coq.readthedocs.io
MIT License
279 stars 27 forks source link

Notation in a post-renamer work #19

Closed nomeata closed 7 years ago

nomeata commented 7 years ago

This is not pressing, but I wanted to note down some thoughts before I lose them.

We currently Require imported modules (no Import), and every imported entity is addressed fully qualified (GHC.Base.map). This is nice, as we don’t have to worry about Haskell’s complex import/export structure or have problems with definitions that have clashing names.

This unfortunately does not allow us to use nice notation, in particular for binary operators. All these are now prefix operators (with z-encoded names…).

Here are two variants to work around this:

Orthogonal issue: Do we want an operator + in Foo to be (also) available as _Foo.+_, i.e. a infix-but-manually-qualified version?

nomeata commented 7 years ago

With all names qualified, this (the second variant) becomes feasible now.