Commits

Doug Burke  committed 1eb16e9

Very minor hlint changes

  • Participants
  • Parent commits 92a4335

Comments (0)

Files changed (7)

+0.8.0.4:
+
+  Fix failing test on 64-bit GHC (no library change).
+
+  Very minor hlint changes.
+
 0.8.0.3:
 
   Remove hashtable restriction (rewrite tests), remove binary constraint

File src/Swish/GraphMatch.hs

     -> ArcSet lb
     -> ArcSet lb 
     -> Bool
-graphMapEq lmap = (==) `on` (graphMap lmap)
+graphMapEq lmap = (==) `on` graphMap lmap
 
 --------------------------------------------------------------------------------
 --

File src/Swish/RDF/Datatype/XSD/Integer.hs

         f0 _             = []
         f1 [v2,v3]       = [v2*v3]
         f1 _             = []
-        f2 [v1,vi]       = if r == 0 then [q] else []
+        f2 [v1,vi]       = [q | r == 0]
             where (q,r)  = quotRem v1 vi
         f2 _             = []
 

File src/Swish/RDF/Graph.hs

 import Swish.QName (QName, getLName)
 
 import Control.Applicative (Applicative(pure), (<$>), (<*>))
+import Control.Arrow ((***))
 
 import Network.URI (URI)
 
 
 -- fmapFormulaMap :: (Ord a, Ord b) => (a -> b) -> FormulaMap a -> FormulaMap b
 fmapFormulaMap :: (Ord a) => (a -> a) -> FormulaMap a -> FormulaMap a
-fmapFormulaMap f m = M.fromList $ map (\(k,g) -> (f k, fmapNSGraph f g)) $ M.assocs m
+fmapFormulaMap f m = M.fromList $ map (f *** fmapNSGraph f) $ M.assocs m
 
 -- TODO: how to traverse formulamaps now?
 

File src/Swish/Rule.hs

 nullRule :: Rule ex
 nullRule = Rule
     { ruleName = makeNSScopedName nullScope "nullRule"
-    , fwdApply = \ _ -> []
-    , bwdApply = \ _ -> []
+    , fwdApply = const []
+    , bwdApply = const []
     , checkInference = \ _ _ -> False
     }
 

File tests/RDFGraphTest.hs

   , xsdDate
     )
 
-import Control.Arrow (first)
+import Control.Arrow ((&&&), first)
 
 import Data.List (elemIndex, intercalate)
 import Data.Maybe (fromJust, fromMaybe)
   "        (base3:s3,base1:p1,\"l10\"^^rdf:XMLLiteral) }"
 
 toFM :: [Formula RDFLabel] -> FormulaMap RDFLabel
-toFM = M.fromList . map (\fm -> (formLabel fm, formGraph fm))
--- toFM = M.fromList . map (\fm -> (formLabel fm, fm))
+toFM = M.fromList . map (formLabel &&& formGraph)
 
 fm2, fm3, fm4, fm5, fm6, fm7 :: FormulaMap RDFLabel
 fm2  = toFM [lf22]

File tests/RDFRulesetTest.hs

   TestList
   [ test    "testRDF01" (isJust rdfr2modc)
   , testVal "testRDF02" rdfr2b1 rdfr2v1
-  , test "testRDF03" $ rdfr2v2 == []
-  -- , test "testRDF04" $ rdfr2v3 == []
+  , test "testRDF03" $ null rdfr2v2
+  -- , test "testRDF04" $ null rdfr2v3
   , testEq "testRDF09" True [] $ bwdApply rdfr2rul con03
   ]