module HaskellWorks.Data.Char.IsChar
    ( IsChar(..)
    ) where

import Data.Word

import qualified Data.ByteString.Internal as BI

class IsChar c where
  toChar :: c -> Char

instance IsChar Word8 where
  toChar :: Word8 -> Char
toChar = Word8 -> Char
BI.w2c
  {-# INLINE toChar #-}

instance IsChar Char where
  toChar :: Char -> Char
toChar = Char -> Char
forall a. a -> a
id
  {-# INLINE toChar #-}