How to return the success or failure of the operating system in Haskell?

The simplest Unix tools are real and fake. There are only a few programs that do nothing. They can only return 0 and 1 respectively to the operating system and exit. Examples in C It might look like this:

// true-does nothing successfully
int main(void) {
return 0;
}

After searching, I can’t find a way to implement this kind of functionality in Haskell. Is there anything that can be done in the IO monad?

Use one of the functions defined in System.Exit.

< p>The simplest Unix tools are real and fake. There are only a few programs that do nothing. They can only return 0 and 1 to the operating system and exit. An example in C might look like this:

< /p>

// true-does nothing successfully
int main(void) {
return 0;
}

Pass Searching, I can’t find a way to implement this kind of functionality in Haskell. Is there anything that can be done in the IO monad?

Use one of the functions defined in System.Exit.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5347 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.