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

Yeah, as long as we’re mixing notations, it’s really:

    *i :: Integer
From which you can conclude i :: Ptr Integer.

And the dereference operator does have the type you specified, but not in an lvalue—there the operator is really a mixfix one:

    (*_ = _) :: Ptr a -> a -> a
This isn’t specified directly by the standard, but follows from the rules about how an assignment operator must examine the structure of its first operand.


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

Search: