Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

  yourIf == myId


    No instance for (Eq (MyBool a0 -> a0 -> a0 -> a0))
        arising from a use of ‘==’
Undecidability of function equality aside, we could indeed define "myIf = id" instead.


Fair point, though if I remeber correctly there is only one function with type a->a and so we get equality automatically.

(This may be untrue in the presence of the likes of unsafeCoerce.)


There are other functions MyBool a -> MyBool a, such as not = \b x y -> b y x.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: