Idris2/tests/base/system_info001/NumProcessors.idr
CodingCellist ec77ad21ab
[ re #1185 ] Add primitive for obtaining number of processors (#1209)
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2021-03-26 18:27:25 +00:00

8 lines
196 B
Idris

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