Created
April 11, 2010 22:04
-
-
Save moonmaster9000/363104 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.Environment (getArgs) | |
import LineEndingConverter | |
main = | |
do | |
args <- getArgs | |
case args of | |
[input,output] -> | |
transformFileWith transformerFunction input output | |
_ -> error "You must provide two filenames." | |
where | |
transformerFunction = convertStringToUnixStyleLineEndings | |
-- transforms inputFile with transformerFunction | |
-- and writes the output to outputFile | |
transformFileWith transformerFunction inputFile outputFile = do | |
input <- readFile inputFile | |
writeFile outputFile (transformerFunction input) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment