From c35eb704d31703f28ac1c8e068b0fdb740c295e1 Mon Sep 17 00:00:00 2001 From: hasufell Date: Mon, 6 Oct 2014 21:12:18 +0200 Subject: [PATCH] Avoid shadowing of variables --- Gtk.hs | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/Gtk.hs b/Gtk.hs index 54c650f..f7c9101 100644 --- a/Gtk.hs +++ b/Gtk.hs @@ -186,26 +186,26 @@ drawDiag' fp mygui = dw <- widgetGetDrawWindow (da mygui) adjustment <- rangeGetAdjustment (hs mygui) scaleVal <- adjustmentGetValue adjustment - xlD <- entryGetText (xl mygui) - xuD <- entryGetText (xu mygui) - ylD <- entryGetText (yl mygui) - yuD <- entryGetText (yu mygui) + xlD' <- entryGetText (xl mygui) + xuD' <- entryGetText (xu mygui) + ylD' <- entryGetText (yl mygui) + yuD' <- entryGetText (yu mygui) -- clear drawing area clearDiag mygui - let xD = (,) <$> readMaybe xlD <*> readMaybe xuD :: Maybe (Double, + let xD = (,) <$> readMaybe xlD' <*> readMaybe xuD' :: Maybe (Double, Double) - yD = (,) <$> readMaybe ylD <*> readMaybe yuD :: Maybe (Double, + yD = (,) <$> readMaybe ylD' <*> readMaybe yuD' :: Maybe (Double, Double) case (xD, yD) of (Just xD', Just yD') -> do let (_, r) = renderDia Cairo (CairoOptions "" (Width 600) SVG False) - (diagFromString (def{t = scaleVal, - dX = xD', - dY = yD'}) - mesh) + (diagS (def{t = scaleVal, + dX = xD', + dY = yD'}) + mesh) renderWithDrawable dw r return 0 _ -> return 1 @@ -223,22 +223,22 @@ saveDiag' fp mygui = mesh <- readFile fp adjustment <- rangeGetAdjustment (hs mygui) scaleVal <- adjustmentGetValue adjustment - xlD <- entryGetText (xl mygui) - xuD <- entryGetText (xu mygui) - ylD <- entryGetText (yl mygui) - yuD <- entryGetText (yu mygui) + xlD' <- entryGetText (xl mygui) + xuD' <- entryGetText (xu mygui) + ylD' <- entryGetText (yl mygui) + yuD' <- entryGetText (yu mygui) - let xD = (,) <$> readMaybe xlD <*> readMaybe xuD :: Maybe (Double, + let xD = (,) <$> readMaybe xlD' <*> readMaybe xuD' :: Maybe (Double, Double) - yD = (,) <$> readMaybe ylD <*> readMaybe yuD :: Maybe (Double, + yD = (,) <$> readMaybe ylD' <*> readMaybe yuD' :: Maybe (Double, Double) case (xD, yD) of (Just xD', Just yD') -> do renderCairo "out.svg" (Width 600) - (diagFromString (def{t = scaleVal, - dX = xD', - dY = yD'}) - mesh) + (diagS (def{t = scaleVal, + dX = xD', + dY = yD'}) + mesh) return 0 _ -> return 1