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

If there were typing, there would be no reason to not use newtypes[0] for radix and index. These values should only be explicitly unwrapped to plain numbers.

It would look like this

    newtype Radix = Radix { radixToWord :: Word }
    newtype Index = Index { indexToWord :: Word }
[0]: https://wiki.haskell.org/Newtype


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: