Closed christiaanb closed 9 years ago
Argh, sorry. I wanted to submit a pull-request for "expose GAlpha methods" only. I didn't know that github would be adding later changes to this pull-request.
I think GitHub considers commits to the branch of the pull request to be corrections to the original pull request. In any case, I think 12f5dc5 is good. I don't mind re-exposing name2Integer
, either (it was exposed in the original unbound library).
As a matter of personal taste, in my projects I usually define a newtype newtype Irrelevant a = Irrelevant { getIrrelevant :: a }
and write its aeq'
method by hand. But I think able to refer to the type-directed generic versions is reasonable.
I will process this pull request in several hours.
Okay, I merged 12f5dc5 and 118d92daf4d5a65d87519b963ac3afdc5f15fa8b cherrypicks the name2Integer
stuff, and 11039ee0d827cb8325f5f690d2a2ffe8453f4134 has the name2String
fix.
Thanks!
But only the methods, so that we may use GAlpha without being able to create new bogus instances.
I do this, because my situation is the following. I have a the following data type:
Where the
Type
argument of thePrim
constructor is simply an annotation. During alpha equivalence testing, I want to omit checking this annotation, and still use theGeneric
version of alpha-equality testing for the other constructors: