1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
{-# LANGUAGE CPP #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeApplications #-}
#define OSSTR pstr
#define OS_STRING WindowsString
#define OS_CHAR WindowsChar
module BenchWindowsString (benchMark) where
import System.OsString.Windows (WindowsString, WindowsChar, pstr)
import qualified System.OsString.Windows as S
import System.OsString.Internal.Types (WindowsChar(..))
#include "Common.hs"
benchStr :: String
benchStr = "WindowsString"
w :: Int -> WindowsChar
w i = WindowsChar (fromIntegral i)
hashWord8 :: WindowsChar -> WindowsChar
hashWord8 (WindowsChar w) = WindowsChar . fromIntegral . hashInt . fromIntegral $ w
iw :: WindowsChar -> Int
iw (WindowsChar w) = fromIntegral w
|