on master help sign in
implement new suggestions from hlint 2.1.13
commitfaff25e5b5d51027128bdaa9b703485f9428ab55 authorAgentM <agentm@themactionfaction.com> dateSun 3 Feb 2019, 21:09 (8 years ago) parent4461665
7 files changed+8−8
src/bin/ProjectM36/Server/RemoteCallTypes/Json.hs+1−1 src/bin/TutorialD/Interpreter/TransGraphRelationalOperator.hs+2−2 src/lib/ProjectM36/Base.hs+1−1 src/lib/ProjectM36/TransGraphRelationalExpression.hs+1−1 src/lib/ProjectM36/Tuple.hs+1−1 test/Relation/Tupleable.hs+1−1 test/TutorialD/Interpreter/DatabaseContextFunctionScript.hs+1−1
src/bin/ProjectM36/Server/RemoteCallTypes/Json.hs+1−1
@@ -1,5 +1,5 @@
11--create a bunch of orphan instances for use with the websocket server
2−{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
2+{-# LANGUAGE TypeSynonymInstances #-}
33{-# OPTIONS_GHC -fno-warn-orphans #-}
44module ProjectM36.Server.RemoteCallTypes.Json where
55import ProjectM36.AtomFunctionError
src/bin/TutorialD/Interpreter/TransGraphRelationalOperator.hs+2−2
@@ -1,4 +1,4 @@
1−{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
1+{-# LANGUAGE FlexibleInstances #-}
22{-# OPTIONS_GHC -fno-warn-orphans #-}
33module TutorialD.Interpreter.TransGraphRelationalOperator where
44import ProjectM36.TransGraphRelationalExpression
@@ -43,4 +43,4 @@ evalTransGraphRelationalOp sessionId conn (ShowTransGraphRelation expr) = do
4343 case res of
4444 Left err -> pure $ DisplayErrorResult $ T.pack (show err)
4545 Right rel -> pure $ DisplayRelationResult rel
46−
46+
src/lib/ProjectM36/Base.hs+1−1
@@ -1,4 +1,4 @@
1−{-# LANGUAGE ExistentialQuantification,DeriveGeneric,DeriveAnyClass,TypeSynonymInstances,FlexibleInstances,OverloadedStrings #-}
1+{-# LANGUAGE ExistentialQuantification,DeriveGeneric,DeriveAnyClass,FlexibleInstances,OverloadedStrings #-}
22{-# OPTIONS_GHC -fno-warn-orphans #-}
33
44module ProjectM36.Base where
src/lib/ProjectM36/TransGraphRelationalExpression.hs+1−1
@@ -1,4 +1,4 @@
1−{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
1+{-# LANGUAGE FlexibleInstances #-}
22{-# OPTIONS_GHC -fno-warn-orphans #-}
33--really, a better name for this module could be "TransTransactionGraphRelationalExpr", but that name is too long
44module ProjectM36.TransGraphRelationalExpression where
src/lib/ProjectM36/Tuple.hs+1−1
@@ -86,7 +86,7 @@ mkRelationTuples attrs = map mapper
8686 mapper = mkRelationTuple attrs
8787
8888mkRelationTupleFromMap :: M.Map AttributeName Atom -> RelationTuple
89−mkRelationTupleFromMap attrMap = RelationTuple attrs (V.map (\attrName -> attrMap M.! attrName) attrNames)
89+mkRelationTupleFromMap attrMap = RelationTuple attrs (V.map (attrMap M.!) attrNames)
9090 where
9191 attrNames = V.fromList (M.keys attrMap)
9292 attrs = V.map (\attrName -> Attribute attrName (atomTypeForAtom (attrMap M.! attrName))) attrNames
test/Relation/Tupleable.hs+1−1
@@ -199,4 +199,4 @@ testReorderedTuple = TestCase $ do
199199 expected = Test2C {attrB = 3,
200200 attrC = 4}
201201 actual = fromTuple . tupleRev . toTuple $ expected
202− assertEqual "reordered tuple" (Right expected) actual
202+ assertEqual "reordered tuple" (Right expected) actual
test/TutorialD/Interpreter/DatabaseContextFunctionScript.hs+1−1
@@ -38,7 +38,7 @@ testExceptionDBCFunction = TestCase $ do
3838 (sess, conn) <- dateExamplesConnection emptyNotificationCallback
3939 let addfunc = "adddatabasecontextfunction \"bomb\" DatabaseContext -> Either DatabaseContextFunctionError DatabaseContext \"\"\"(\\[] _ -> error \"boom\") :: [Atom] -> DatabaseContext -> Either DatabaseContextFunctionError DatabaseContext\"\"\""
4040 executeTutorialD sess conn addfunc
41− expectTutorialDErr sess conn (\err -> "UnhandledExceptionError" `T.isPrefixOf` err) "execute bomb()"
41+ expectTutorialDErr sess conn ("UnhandledExceptionError" `T.isPrefixOf`) "execute bomb()"
4242
4343
4444testDBCFunctionWithAtomArguments :: Test