mirror of
https://github.com/rgleichman/glance.git
synced 2024-08-17 10:50:24 +03:00
Reduce warnings.
This commit is contained in:
parent
d24642dfe8
commit
5d5074cced
@ -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.
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user