-------------------------------------------------------------------------------- Main.hs-- created: Mon Aug 30 15:20:05 JST 2010------------------------------------------------------------------------------moduleSound.Conductive.MainwhereimportSound.Conductive.ClockDisplayimportSound.Conductive.ClockListenerimportGraphics.VtyimportSystem.Console.ParseArgs-- import System.IOdataClockDisplayArg=Portderiving(Ord,Eq,Show)argumentDefinitions::[ArgClockDisplayArg]argumentDefinitions=[Arg{argIndex=Port,argName=Just"port",argAbbr=Just'p',argData=argDataRequired"port"ArgtypeString,argDesc="the port number which the clock display is listening at"}]portNumber::ArgsClockDisplayArg->IntportNumberargs=read$getRequiredArgargsPort-- launch the program with a -p argument for the port numbermain=doargs<-parseArgsIOArgsCompleteargumentDefinitionsvt<-mkVtyDisplayRegionwh<-display_bounds$terminalvtputStrLn$show$DisplayRegionwhlistener(portNumberargs)vt