on master help sign in
HLint fixes
f773060Neil Mitchell
src/Main.hs+1−1
@@ -22,7 +22,7 @@ examples =
22
22
23main :: IO ()
23main :: IO ()
24main = do
24main = do
25− forM_ examples $ \(parses, src) -> do
25+ forM_ examples $ \(parses, src) ->
26 case parse src of
26 case parse src of
27 Left err -> when parses $ fail $ "Unexpected parse failure, " ++ show err
27 Left err -> when parses $ fail $ "Unexpected parse failure, " ++ show err
28 Right doc -> do
28 Right doc -> do
src/Text/XML/Hexml.hs+2−2
@@ -152,7 +152,7 @@ contents n@(Node src _ _) = f (strStart inner) outers
152
152
153-- | Get the direct child nodes of this node.
153-- | Get the direct child nodes of this node.
154children :: Node -> [Node]
154children :: Node -> [Node]
155−children (Node src doc n) = unsafePerformIO $ withForeignPtr doc $ \d -> do
155+children (Node src doc n) = unsafePerformIO $ withForeignPtr doc $ \d ->
156 alloca $ \count -> do
156 alloca $ \count -> do
157 res <- hexml_node_children d n count
157 res <- hexml_node_children d n count
158 count <- fromIntegral <$> peek count
158 count <- fromIntegral <$> peek count
@@ -160,7 +160,7 @@ children (Node src doc n) = unsafePerformIO $ withForeignPtr doc $ \d -> do
160
160
161-- | Get the attributes of this node.
161-- | Get the attributes of this node.
162attributes :: Node -> [Attribute]
162attributes :: Node -> [Attribute]
163−attributes (Node src doc n) = unsafePerformIO $ withForeignPtr doc $ \d -> do
163+attributes (Node src doc n) = unsafePerformIO $ withForeignPtr doc $ \d ->
164 alloca $ \count -> do
164 alloca $ \count -> do
165 res <- hexml_node_attributes d n count
165 res <- hexml_node_attributes d n count
166 count <- fromIntegral <$> peek count
166 count <- fromIntegral <$> peek count