Skip to content
Snippets Groups Projects
Commit 3d9b947d authored by beekmannju85374's avatar beekmannju85374 :writing_hand:
Browse files

fixed saveToFile

parent 8de0f22a
No related branches found
No related tags found
1 merge request!14fixed saveToFile
......@@ -105,7 +105,7 @@ generateSchedules rooms startDay endDay professors = groups
saveToFile :: [[Presentation]] -> FilePath -> IO ()
saveToFile presentations filename = do
let content = unlines $ map (unlines . map detailedPrint) presentations
let content = init . unlines $ map (unlines . map detailedPrint) presentations -- init removes the trailing \n
writeFile filename content
loadFromFile :: FilePath -> IO [[Presentation]]
......
No preview for this file type
File moved
......@@ -22,4 +22,3 @@ Presentation {room = "P", day = 2024-05-23, project = "project7", professor = Pr
Presentation {room = "P", day = 2024-06-06, project = "project9", professor = Professor {profName = "P9", unavailableDays = [2024-04-04], availableDays = [], projects = ["project9"]}}
Presentation {room = "P", day = 2024-06-13, project = "THNSensor", professor = Professor {profName = "Zapf", unavailableDays = [2024-04-11], availableDays = [], projects = ["THNSensor"]}}
Presentation {room = "P", day = 2024-06-20, project = "MMO2", professor = Professor {profName = "Schulz", unavailableDays = [2024-04-18], availableDays = [], projects = ["MMO","MMO2"]}}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment