Skip to content

Commit 57ad5b7

Browse files
committed
Fix build of cputime based profiler
1 parent f5acbb7 commit 57ad5b7

File tree

1 file changed

+6
-1
lines changed
  • unison-runtime/src/Unison/Runtime/Machine

1 file changed

+6
-1
lines changed

unison-runtime/src/Unison/Runtime/Machine/Types.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@ module Unison.Runtime.Machine.Types where
55
import Control.Concurrent (ThreadId)
66
import Control.Concurrent.STM as STM
77
import Control.Exception hiding (Handler)
8+
#if !defined(mingw32_HOST_OS)
89
import Data.IORef
910
(IORef, newIORef, readIORef, writeIORef, atomicModifyIORef)
11+
#else
12+
import Data.IORef
13+
(IORef, newIORef, readIORef, writeIORef)
14+
#endif
1015
import Data.Kind (Type)
1116
import Data.Map.Strict qualified as M
1217
import Data.Set qualified as S
@@ -143,7 +148,7 @@ tickCallback interval ptick ticker cancel = body
143148
-- CPUTime based profiler for Windows
144149
instance RuntimeProfiler ProfileComm where
145150
data Ticker ProfileComm = TPC !Tick !(IORef Word8)
146-
startTicker (PC pf _ _) = (, pure ()) . TPC pf <$> newIORef 1
151+
startTicker (PC pf _ _) = (, pure ()) . TPC (pf False) <$> newIORef 1
147152

148153
checkTicker (TPC tick r) cix k = do
149154
n <- readIORef r

0 commit comments

Comments
 (0)