System.Processを見てみるといい
https://www.haskell.org/ghc/docs/latest/html/libraries/process-1.2.0.0/System-Process.html

foo = callCommand "pwd"