Code:
data Byte = pure native "byte" where
pure native byte "(byte)" :: Int -> Byte
--- this gives the 'Int' corresponding to the *signed* interpretation of the 'Byte'
pure native signed "(int)" :: Byte -> Int
--- this gives the 'Int' corresponding to the *unsigned* interpretation of the 'Byte'
unsigned b = signed b Int..&. 0xFF
hashCode = Byte.unsigned
instance Eq Byte where
pure native == :: Byte -> Byte -> Bool
pure native != :: Byte -> Byte -> Bool
Error:
F src/tests/comp/Issue126.fr:13: funForCIT: expected type member, found alias for data type member function `Byte.unsigned`
It does work as soon as one does eta-expansion, i.e.
hashCode b = Byte.unsigned b
Code:
Error:
It does work as soon as one does eta-expansion, i.e.