I’m trying to make a little program in Haskell. What I need to do is to check if a bash command has been executed successfully by the Haskell interpreter. Let’s say in “pseudocode”:
$import System
$if( system "ls" ) has been succesfully run
$then doStuff
How would you write this piece of code in Haskell?
You can do this: