0 | module Evince.Async.Posix
2 | import public Evince.Async.Spec
3 | import public Evince.Async.Synchronized
4 | import public Evince.Async.Hoist
5 | import public Evince.Async.Shared
11 | import IO.Async.Loop.Posix
19 | posixRun : Async Poll [] () -> IO ()
21 | Nothing <- getEnv "IDRIS2_ASYNC_THREADS"
22 | | Just _ => simpleApp prog
23 | cores <- getNProcessors
24 | ignore $
setEnv "IDRIS2_ASYNC_THREADS" (show (fromMaybe 2 cores)) True
36 | runSpecAsyncWith : RunConfig -> Spec (Async Poll []) () () -> IO ()
37 | runSpecAsyncWith = runSpecVia posixRun
41 | runSpecAsync : Spec (Async Poll []) () () -> IO ()
42 | runSpecAsync = runSpecAsyncWith defaultConfig
47 | runSpecAsyncWithSummaryAndConfig : RunConfig -> Spec (Async Poll []) () () -> IO Summary
48 | runSpecAsyncWithSummaryAndConfig = summaryVia posixRun
52 | runSpecAsyncWithSummary : Spec (Async Poll []) () () -> IO Summary
53 | runSpecAsyncWithSummary = runSpecAsyncWithSummaryAndConfig defaultConfig
57 | runSpecAsyncWithArgs : Spec (Async Poll []) () () -> IO ()
58 | runSpecAsyncWithArgs = runSpecArgsVia posixRun
62 | runSpecAsyncFailFast : Spec (Async Poll []) () () -> IO ()
63 | runSpecAsyncFailFast = runSpecFailFastVia posixRun
67 | runSpecAsyncTimed : Spec (Async Poll []) () () -> IO ()
68 | runSpecAsyncTimed = runSpecTimedVia posixRun
73 | runSpecAsyncIO : Spec IO () () -> IO ()
74 | runSpecAsyncIO = runSpecAsync . hoistSpec liftIO
78 | runSpecAsyncIOWith : RunConfig -> Spec IO () () -> IO ()
79 | runSpecAsyncIOWith cfg = runSpecAsyncWith cfg . hoistSpec liftIO