]> git.unchartedbackwaters.co.uk Git - francis/ofc.git/commitdiff
Remove a few unnecessary 'do' instances.
authorFrancis Russell <francis@unchartedbackwaters.co.uk>
Sat, 15 Sep 2012 21:29:01 +0000 (22:29 +0100)
committerFrancis Russell <francis@unchartedbackwaters.co.uk>
Sat, 15 Sep 2012 21:29:01 +0000 (22:29 +0100)
src/Main.hs
src/Parsing.hs

index 054a36e4309a7b319ac9bc491229b031db08e586..255d36a4db7f66284c9aa08e88fef0ab7725cb49 100644 (file)
@@ -14,7 +14,7 @@ getFileName _ = error "Usage: ofc input_file"
 
 processOFL :: String -> IO()
 processOFL input = 
-  let result = parseAsOFL input in do 
+  let result = parseAsOFL input in
   case result of
     Left err -> putStrLn $ show err
     Right ofl -> putStrLn $ show ofl
index 507f6300b1ac534ae3eef2311ad2000bf230d952..e5801285d1b8fbcd605dcc2eceeb4628792f4e0a 100644 (file)
@@ -144,8 +144,8 @@ parseFortranParam = do
   properties <- lCommaSep parseFortranParamProperty
   return $ FortranParameter properties
 
-parseFortranParamProperty = do
-  (parseNameProperty <|> parseTypeProperty <|> parseSpaceProperty <|> parseIndexedProperty) where
+parseFortranParamProperty =
+  parseNameProperty <|> parseTypeProperty <|> parseSpaceProperty <|> parseIndexedProperty where
   parseNameProperty = do _ <- lSymbol "name"; name <- lParens lStringLiteral; return $ ParamName name
   parseTypeProperty = do _ <- lSymbol "type"; fType <- lParens parseFortranType; return $ ParamType fType
   parseSpaceProperty = do _ <- lSymbol "space"; info <- lParens parseSpaceInfo; return $ Space info
@@ -179,7 +179,7 @@ parsePPDFunctionSet = do
   properties <- lCommaSep parsePPDFunctionSetProperty
   return $ PPDFunctionSet properties
 
-parsePPDFunctionSetProperty = do
+parsePPDFunctionSetProperty =
   parseBasisProperty <|> parseDataProperty where
   parseBasisProperty = do _ <- lSymbol "basis"; ident <- lParens lIdentifier; return $ PPDBasis ident
   parseDataProperty = do _ <- lSymbol "data"; ident <- lParens lIdentifier; return $ PPDData ident