Created
March 8, 2014 22:38
-
-
Save stephenjbarr/9440087 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
{-| print_inst_uuid_list | |
Given a list of [IndividualParameterization], and an output filename | |
print a csv file describing each IndividualParameterization, one line | |
each. | |
-} | |
print_inst_uuid_list :: [IndividualParameterization] -> String -> IO () | |
print_inst_uuid_list xlist fname = | |
do | |
let headerstring = inputst_csv_string ++ ",nstep_s,nstep_w,uuid" | |
let inst_strings = map (inputst_to_csv_string . _ipp_inst) xlist | |
let comma x y = x ++ "," ++ y | |
let rest_strings = map ipp_csv_no_inst xlist | |
let fstrings = zipWith comma inst_strings rest_strings | |
h <- openFile fname WriteMode | |
hPutStrLn h headerstring | |
mapM_ (hPutStrLn h) fstrings | |
hClose h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment