Closed Bodigrim closed 3 years ago
I think you are right, This week I'm on vacation. Next week I'll take a look at it
@bodigrim the issue is due to how we currently compare the boundaries of the intervals (using lowerBound
and upperBound
). This should be fixed using lowerBound'
and upperBound'
but it actually isn't because relate (NegInf <..< PosInf) (NegInf <=..<= PosInf) == Equal
.
I suspect the most elegant solution would be to introduce a new datatype to represent the boundaries of an interval. Instead of using (Extended r, Bounday)
it would be nice to have
data IntervalBoundary
= NegInf
| PosInf
| Finite r Boundary
This way we could avoid issues comparing (NegInf, Open)
and (NegInf, Closed)
.
What do you say?
@marcosh I'm a bit reluctant to introduce an intermediary type. Could we possibly express relate
directly by pattern-matching on Interval
constructors?
My understanding is that this should return
During
instead. CC @marcosh