Commits

afiskon committed 41305ab

minor changes

  • Participants
  • Parent commits c79a71a

Comments (0)

Files changed (2)

 
 main = do
   s <- getContents
-  case alexScanTokens s of
-    Right lst -> do
-      putStrLn $ concatMap (\t -> "'" ++ show t ++ "' ") lst
-    Left err -> do
-      putStrLn $ "ERROR: " ++ err
+  putStrLn $ case alexScanTokens s of
+    Right lst -> concatMap (\t -> "'" ++ show t ++ "' ") lst
+    Left err -> "ERROR: " ++ err
 
 main = do 
   inStr <- getContents
-  case alexScanTokens inStr >>= synt of
-    Right tree -> do
-       putStrLn.show $ tree
-    Left err -> do
-      putStrLn $ "ERROR: " ++ err
+  putStrLn $ case alexScanTokens inStr >>= synt of
+    Right tree -> show tree
+    Left err -> "ERROR: " ++ err