RosettaCodeData/Task/Morse-code/Haskell/morse-code-1.hs
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

10 lines
286 B
Haskell

import System.IO
import MorseCode
import MorsePlaySox
-- Read standard input, converting text to Morse code, then playing the result.
-- We turn off buffering on stdin so it will play as you type.
main = do
hSetBuffering stdin NoBuffering
text <- getContents
play $ toMorse text