main = do as <- system.getArgs let file = (case as of (f:_) -> f [] -> error "Must be called with a filepath as first argument.") cs <- fGetContents file return $ parse cs parse :: String -> [Node] parse = map makeNode . lines