jstolarek / slicer

Companion code for paper "Imperative Functional Programs that Explain their Work", Wilmer Ricciotti, Jan Stolarek, Roly Perera and James Cheney, ICFP 2017, Oxford, UK
http://dl.acm.org/citation.cfm?id=3110258
GNU General Public License v3.0
6 stars 0 forks source link

Weird definition of `leq` for booleans #41

Closed jstolarek closed 7 years ago

jstolarek commented 7 years ago
    leq (CBool _) (CBool _)            = True
    leq (CInt i) (CInt j)              = i == j
    leq (CString i) (CString j)        = i == j

That case for CBool looks wrong. Why the RHS is True and not b == b'?

jamescheney commented 7 years ago

Yes, that is strange, the obvious fix seems right to me.

--James

On Feb 22, 2017 9:24 PM, "Jan Stolarek" notifications@github.com wrote:

leq (CBool _) (CBool _)            = True
leq (CInt i) (CInt j)              = i == j
leq (CString i) (CString j)        = i == j

That case for CBool looks wrong. Why the RHS is True and not b == b'?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jstolarek/slicer/issues/41, or mute the thread https://github.com/notifications/unsubscribe-auth/ACMu9evU0I-MXOPm7eBiPapK2F2WHgL7ks5rfKdvgaJpZM4MJNMv .