| Safe Haskell | Safe | 
|---|---|
| Language | Haskell98 | 
AlexPrelude
Description
This is a collection of really useful functions. They are mostly aimed towards writing console applications.
For example:
import AlexPrelude
main :: IO ()
main = do
    clear_screen
    print "Hello my name is Alex"
    name <- prompt "What is your name? "
    print ("Hello, " ++ name)
    print "Let me ponder on what I think about your name..."
    sleep 10
    print "It is ridiculous! Why would your parents do that to you!"
    print_bannerAs you can see, these functions try to fill in the missing gaps for when you want to write a real application in haskell.
Documentation
clear_screen :: IO () Source #
This clears the screen. Unfortunately, this only works if the terminal has less than 80 rows. If the terminal has more rows, you can just call this a couple of times until the entire screen is cleared.
print_banner :: IO () Source #
This prints a banner to show that your application was created using AlexPrelude. You are not obliged to use this, but I would be thankful.