Use word8 package

This commit is contained in:
Julian Ospald 2016-04-04 18:46:25 +02:00
parent 491efe44a3
commit bd71947b2a
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
2 changed files with 7 additions and 7 deletions

View File

@ -20,6 +20,7 @@ library
, bytestring
, exceptions
, deepseq
, word8
test-suite test
type: exitcode-stdio-1.0

View File

@ -84,11 +84,10 @@ import Control.Monad(void)
import Control.Monad.Catch (MonadThrow(..))
import Data.ByteString(ByteString)
import qualified Data.ByteString as B
import Data.Char(ord)
import Data.Data
import qualified Data.List as L
import Data.Maybe
import Data.Word(Word8)
import Data.Word8
import Foreign.C.Error
import Foreign.C.String
import Foreign.Marshal.Alloc(allocaBytes)
@ -269,22 +268,22 @@ basename (MkPath l)
-- ByteString/Word8 constants
pathSeparator :: Word8
pathSeparator = fromIntegral (ord '/')
pathSeparator = _slash
pathSeparator' :: ByteString
pathSeparator' = "/"
pathSeparator' = B.singleton pathSeparator
pathDot :: Word8
pathDot = fromIntegral (ord '.')
pathDot = _period
pathDot' :: ByteString
pathDot' = "."
pathDot' = B.singleton pathDot
nullByte :: Word8
nullByte = fromIntegral (ord '\0')
nullByte = _nul
--------------------------------------------------------------------------------