Idris2/tests/base/system_info001/NumProcessors.idr

7 lines
195 B
Idris
Raw Normal View History

import System.Info
main : IO ()
main = do Just np <- getNProcessors
| Nothing => putStrLn "ERROR: Couldn't get number of processors!"
putStrLn $ (show np) ++ " processors"