From 7027d8fd47272a49d69c2c99cf9db960709aa766 Mon Sep 17 00:00:00 2001 From: David Roundy Date: Wed, 26 Sep 2007 21:09:00 +0200 Subject: make DragPane a bit more succinct. darcs-hash:20070926190900-72aca-66f45285589395b02517f95da25e9bca687d0a62.gz --- DragPane.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'DragPane.hs') diff --git a/DragPane.hs b/DragPane.hs index 20d42e8..332947f 100644 --- a/DragPane.hs +++ b/DragPane.hs @@ -59,10 +59,8 @@ data DragPane a = data DragType = Horizontal | Vertical deriving ( Show, Read ) instance Layout DragPane Window where - doLayout d@(DragPane _ ty _ _) = - case ty of - Vertical -> doLay id d - Horizontal -> doLay mirrorRect d + doLayout d@(DragPane _ Vertical _ _) = doLay id d + doLayout d@(DragPane _ Horizontal _ _) = doLay mirrorRect d handleMessage = handleMess data SetFrac = SetFrac Int Double deriving ( Show, Read, Eq, Typeable ) -- cgit v1.2.3