
I am new to haskell. I am trying to do some "excersise" but i can't make anything work :( This is my code.I replaced spaces with underscores ( _ ) Thanks for any suggestions or correctrions import IO import System import List import Maybe import Char import Numeric type Name=String type Room=Int type Dr=String type PatientTup=(Name,(Room,Dr)) type PatientList=[PatientTup] main=do userText<-getText ---------------------------------------------------------------------------- ------- ________getText::IO String ________getText=do nc<-getText _______________________return (:nc) ---------------------------------------------------------------------------- ------- ________PatientList::[(String,(Int,String))] ________PatientList=[("Robson, Brian",(2,"MJH")), _____________________("Hitchin, Linda",(1,"ILR")), _____________________("Reeve, Paul", (2,"ILR"))] ---------------------------------------------------------------------------- ------- ________getWards::Int ________getWards PatientList=[Room | (Name,(Room,Dr)) <- PatientList, Room==getText] _________________do putSpc (length Room) _________________return(RoomLength) ---------------------------------------------------------------------------- ------- ________printFreq::WordList->IO() ________printFreq wl=do sequence (map putWards wl) _________________________________where ______________________________________putWards::(getWards)->IO() ______________________________________putWards(w)=do putStr w _____________________________________________________putChar '\n' _____________________________________________________return(w)