Reduce warnings.

This commit is contained in:
Robbie Gleichman 2016-12-13 23:21:34 -08:00
parent d24642dfe8
commit 5d5074cced
2 changed files with 6 additions and 3 deletions

View File

@ -239,7 +239,7 @@ simplifyExp e = case removeParen e of
-- Don't convert compose to apply
InfixApp _ (QVarOp (UnQual (Symbol "."))) _ -> e
InfixApp exp1 op exp2 -> App (App (qOpToExp op) exp1) exp2
LeftSection e op -> App (qOpToExp op) e
LeftSection exp1 op -> App (qOpToExp op) exp1
x -> x
-- TODO Consider putting this logic in a separate "simplifyExpression" function.

View File

@ -14,8 +14,7 @@ import TranslateCore(syntaxGraphToFglGraph, SyntaxGraph(..), Reference)
import Types(SgNamedNode, Edge(..), SyntaxNode(..),
IngSyntaxGraph, NodeName(..), LikeApplyFlavor(..), NameAndPort(..))
import qualified GraphAlgorithms
import Util(fromMaybeError, mapFst)
import GraphAlgorithms(collapseNodes)
import Util(fromMaybeError)
-- Unit Test Helpers --
@ -123,6 +122,7 @@ collapseUnitTests = TestList[
-- Translate unit tests
dollarTests :: Test
dollarTests = TestList [
TestLabel "dollarTests1" $ assertEqualSyntaxGraphs [
"y = f x",
@ -142,6 +142,7 @@ dollarTests = TestList [
]
]
composeApplyTests :: Test
composeApplyTests = TestList [
TestLabel "composeApplyTests1" $ assertEqualSyntaxGraphs [
"y = f (g x)",
@ -156,6 +157,7 @@ composeApplyTests = TestList [
]
]
infixTests :: Test
infixTests = TestList [
TestLabel "infixTests1" $ assertEqualSyntaxGraphs [
"y = (+) 1 2",
@ -170,6 +172,7 @@ infixTests = TestList [
]
]
letTests :: Test
letTests = TestList [
TestLabel "letTests1" $ assertEqualSyntaxGraphs [
"y = f 1",