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

that's incorrect

haskell implements the "perfect derive" behaviour that the blog post is complaining about rust's lack of. the constraint is only propagated to the field types when using a haskell derive, not the parameters themselves (as in rust)

so the following compiles just fine:

    data Foo -- not Eq

    data Bar a = Bar 
      deriving Eq

    f :: Eq (Bar Foo) => ()
    f = ()


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

Search: