Skip to content
  • Sylvain Henry's avatar
    Cleanup in parser/Ctype.hs · ced729f6
    Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
    * GHC now performs constant folding on bit operations like (.|.) so we
    use them and we remove the misleading comment
    
    * we use Word8 instead of Int and we remove the useless conversion to
    Int32. Hopefully future releases of GHC could transform the big case in
    `charType` into a value table indexing instead of a jump table. Word8
    would make the table smaller.
    
    * we use INLINABLE pragma instead of INLINE on `is_ctype`: in my test,
    the latter *prevents* `is_ctype` to be inlined because `charType` is
    inlined into `is_ctype` (to call charType`s worker on the unboxed Char
    directly).
    ced729f6