diff -Nru haskell-vty-4.7.0.4/cbits/mk_wcwidth.c haskell-vty-4.7.0.10/cbits/mk_wcwidth.c --- haskell-vty-4.7.0.4/cbits/mk_wcwidth.c 2011-07-18 05:19:11.000000000 +0000 +++ haskell-vty-4.7.0.10/cbits/mk_wcwidth.c 2012-02-03 19:31:03.000000000 +0000 @@ -187,7 +187,7 @@ /* if we arrive here, ucs is not a combining or C0/C1 control character */ - return 1 + + return 1 + (ucs >= 0x1100 && (ucs <= 0x115f || /* Hangul Jamo init. consonants */ ucs == 0x2329 || ucs == 0x232a || @@ -208,7 +208,7 @@ { int w, width = 0; - for (;*pwcs && n-- > 0; pwcs++) + for (;n-- > 0; pwcs++) if ((w = mk_wcwidth(*pwcs)) < 0) return -1; else @@ -299,7 +299,7 @@ { int w, width = 0; - for (;*pwcs && n-- > 0; pwcs++) + for (;n-- > 0; pwcs++) if ((w = mk_wcwidth_cjk(*pwcs)) < 0) return -1; else diff -Nru haskell-vty-4.7.0.4/debian/changelog haskell-vty-4.7.0.10/debian/changelog --- haskell-vty-4.7.0.4/debian/changelog 2011-12-20 11:35:45.000000000 +0000 +++ haskell-vty-4.7.0.10/debian/changelog 2012-02-13 02:05:00.000000000 +0000 @@ -1,8 +1,20 @@ -haskell-vty (4.7.0.4-1build1) precise; urgency=low +haskell-vty (4.7.0.10-2) unstable; urgency=low - * Rebuild for new GHC ABIs. + * Fix -doc dependency. - -- Colin Watson Tue, 20 Dec 2011 11:35:34 +0000 + -- Clint Adams Sun, 12 Feb 2012 21:04:48 -0500 + +haskell-vty (4.7.0.10-1) unstable; urgency=low + + * New upstream version. + + -- Clint Adams Thu, 09 Feb 2012 23:13:35 -0500 + +haskell-vty (4.7.0.6-1) unstable; urgency=low + + * New upstream version. + + -- Clint Adams Mon, 02 Jan 2012 12:34:16 -0500 haskell-vty (4.7.0.4-1) unstable; urgency=low diff -Nru haskell-vty-4.7.0.4/debian/control haskell-vty-4.7.0.10/debian/control --- haskell-vty-4.7.0.4/debian/control 2011-08-28 16:33:51.000000000 +0000 +++ haskell-vty-4.7.0.10/debian/control 2012-02-13 02:04:45.000000000 +0000 @@ -8,19 +8,16 @@ haskell-devscripts (>= 0.7), ghc, ghc-prof, - libghc-deepseq-dev (>= 1.1), - libghc-deepseq-dev (<< 1.2), libghc-mtl-dev (>= 1.1.1), libghc-mtl-dev (<< 2.1), libghc-parallel-dev (>= 2.2), - libghc-parallel-dev (<< 3.2), + libghc-parallel-dev (<< 3.3), libghc-parsec3-dev, libghc-terminfo-dev (>= 0.3), libghc-terminfo-dev (<< 0.4), libghc-utf8-string-dev (>= 0.3), libghc-utf8-string-dev (<< 0.4), - libghc-vector-dev, - libghc-deepseq-prof, + libghc-vector-dev (>> 0.7), libghc-mtl-prof, libghc-parallel-prof, libghc-parsec3-prof, @@ -28,7 +25,6 @@ libghc-utf8-string-prof, libghc-vector-prof, Build-Depends-Indep: ghc-doc, - libghc-deepseq-doc, libghc-mtl-doc, libghc-parallel-doc, libghc-parsec3-doc, @@ -67,7 +63,7 @@ Package: libghc-vty-doc Architecture: all Section: doc -Depends: ${misc:Depends} +Depends: ${haskell:Depends}, ${misc:Depends} Recommends: ${haskell:Recommends} Suggests: ${haskell:Suggests} Description: Terminal interface library for ghc; API documentation diff -Nru haskell-vty-4.7.0.4/src/Graphics/Vty/Attributes.hs haskell-vty-4.7.0.10/src/Graphics/Vty/Attributes.hs --- haskell-vty-4.7.0.4/src/Graphics/Vty/Attributes.hs 2011-07-18 05:19:10.000000000 +0000 +++ haskell-vty-4.7.0.10/src/Graphics/Vty/Attributes.hs 2012-02-03 19:31:03.000000000 +0000 @@ -1,3 +1,6 @@ +{-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE GADTs #-} +{-# LANGUAGE RankNTypes #-} -- Copyright 2009-2010 Corey O'Connor -- Display attributes -- @@ -69,8 +72,13 @@ -- | The style and color attributes can either be the terminal defaults. Or be equivalent to the -- previously applied style. Or be a specific value. -data Eq v => MaybeDefault v = Default | KeepCurrent | SetTo !v - deriving ( Eq, Show ) +data MaybeDefault v where + Default :: MaybeDefault v + KeepCurrent :: MaybeDefault v + SetTo :: forall v . ( Eq v, Show v ) => !v -> MaybeDefault v + +deriving instance Eq v => Eq (MaybeDefault v) +deriving instance Eq v => Show (MaybeDefault v) instance Eq v => Monoid ( MaybeDefault v ) where mempty = KeepCurrent diff -Nru haskell-vty-4.7.0.4/src/Graphics/Vty/Image.hs haskell-vty-4.7.0.10/src/Graphics/Vty/Image.hs --- haskell-vty-4.7.0.4/src/Graphics/Vty/Image.hs 2011-07-18 05:19:10.000000000 +0000 +++ haskell-vty-4.7.0.10/src/Graphics/Vty/Image.hs 2012-02-03 19:31:03.000000000 +0000 @@ -366,11 +366,10 @@ crop :: (Word, Word) -> Image -> Image crop (0,_) _ = EmptyImage crop (_,0) _ = EmptyImage -crop v (ImageCrop _size i) = ImagePad (min (fst v) (fst _size), min (snd v) (snd _size)) i -crop v (ImagePad _size i) = ImagePad (min (fst v) (fst _size), min (snd v) (snd _size)) i -crop v i = ImagePad v i +crop v (ImageCrop _size i) = ImageCrop (min (fst v) (fst _size), min (snd v) (snd _size)) i +crop v i = ImageCrop v i --- | Ensure an image is at least the provided size. If the image is smaler then pad. +-- | Ensure an image is at least the provided size. If the image is smaller then pad. pad :: (Word, Word) -> Image -> Image pad (0,_) _ = EmptyImage pad (_,0) _ = EmptyImage diff -Nru haskell-vty-4.7.0.4/src/Graphics/Vty/Span.hs haskell-vty-4.7.0.10/src/Graphics/Vty/Span.hs --- haskell-vty-4.7.0.4/src/Graphics/Vty/Span.hs 2011-07-18 05:19:10.000000000 +0000 +++ haskell-vty-4.7.0.10/src/Graphics/Vty/Span.hs 2012-02-03 19:31:03.000000000 +0000 @@ -136,6 +136,7 @@ (0,0) 0 (region_width region) + (fromEnum $ region_height region) -- Fill in any unspecified columns with the background pattern. forM_ [0 .. (fromEnum $ region_height region - 1)] $! \row -> do end_x <- Vector.read mrow_ops row >>= return . span_ops_effected_columns @@ -145,7 +146,7 @@ else return () return mrow_ops -row_ops_for_image :: MRowOps s -> Image -> Background -> DisplayRegion -> (Word, Word) -> Int -> Word -> ST s (Word, Word) +row_ops_for_image :: MRowOps s -> Image -> Background -> DisplayRegion -> (Word, Word) -> Int -> Word -> Int -> ST s (Word, Word) row_ops_for_image mrow_ops -- the image to output the ops to image -- the image to rasterize in column order to mrow_ops bg -- the background fill @@ -153,7 +154,9 @@ skip_dim@(skip_row,skip_col) -- the number of rows y -- ??? remaining_columns -- ??? + remain_rows | remaining_columns == 0 = return skip_dim + | remain_rows == 0 = return skip_dim | y >= fromEnum (region_height region) = return skip_dim | otherwise = case image of EmptyImage -> return skip_dim @@ -174,30 +177,31 @@ skip_dim y remaining_columns + remain_rows + let top_height = (fromEnum $! image_height top_image) - (fromEnum $! skip_row - skip_row') (skip_row'',skip_col'') <- row_ops_for_image mrow_ops bottom_image bg region (skip_row', skip_col) - (y + (fromEnum $! image_height top_image) - (fromEnum $! skip_row - skip_row')) + (y + top_height) remaining_columns + (remain_rows - top_height) return (skip_row'', min skip_col' skip_col'') HorizJoin l r _ _ -> do - (skip_row',skip_col') <- row_ops_for_image mrow_ops l bg region skip_dim y remaining_columns + (skip_row',skip_col') <- row_ops_for_image mrow_ops l bg region skip_dim y remaining_columns remain_rows -- Don't output the right part unless there is at least a single column left after -- outputting the left part. if image_width l - (skip_col - skip_col') > remaining_columns then return (skip_row,skip_col') else do - (skip_row'',skip_col'') <- row_ops_for_image mrow_ops r bg region (skip_row, skip_col') y (remaining_columns - image_width l + (skip_col - skip_col')) + (skip_row'',skip_col'') <- row_ops_for_image mrow_ops r bg region (skip_row, skip_col') y (remaining_columns - image_width l + (skip_col - skip_col')) remain_rows return (min skip_row' skip_row'', skip_col'') BGFill width height -> do let min_height = if y + (fromEnum height) > (fromEnum $! region_height region) then region_height region - (toEnum y) - else height - min_width = if width > remaining_columns - then remaining_columns - else width + else min height (toEnum remain_rows) + min_width = min width remaining_columns actual_height = if skip_row > min_height then 0 else min_height - skip_row @@ -216,25 +220,23 @@ if dx < 0 -- Translation left -- Extract the delta and add it to skip_col. - then row_ops_for_image mrow_ops (translate (0, dy) i) bg region (skip_row, skip_col + dw) y remaining_columns + then row_ops_for_image mrow_ops (translate (0, dy) i) bg region (skip_row, skip_col + dw) y remaining_columns remain_rows -- Translation right else if dy < 0 -- Translation up -- Extract the delta and add it to skip_row. - then row_ops_for_image mrow_ops (translate (dx, 0) i) bg region (skip_row + dh, skip_col) y remaining_columns + then row_ops_for_image mrow_ops (translate (dx, 0) i) bg region (skip_row + dh, skip_col) y remaining_columns remain_rows -- Translation down -- Pad the start of lines and above the image with a - -- background_fill image. - else row_ops_for_image mrow_ops (background_fill ow dh <-> (background_fill dw ih <|> i)) bg region skip_dim y remaining_columns + -- background_fill image + else row_ops_for_image mrow_ops (background_fill ow dh <-> (background_fill dw ih <|> i)) bg region skip_dim y remaining_columns remain_rows where dw = toEnum $ abs dx dh = toEnum $ abs dy ow = image_width image ih = image_height i ImageCrop (max_w,max_h) i -> - if y >= fromEnum max_h - then return skip_dim - else row_ops_for_image mrow_ops i bg region skip_dim y (min remaining_columns max_w) + row_ops_for_image mrow_ops i bg region skip_dim y (min remaining_columns max_w) (min remain_rows $ fromEnum max_h) ImagePad (min_w,min_h) i -> do let hpad = if image_width i < min_w then background_fill (min_w - image_width i) (image_height i) @@ -242,7 +244,7 @@ let vpad = if image_height i < min_h then background_fill (image_width i) (min_h - image_height i) else empty_image - row_ops_for_image mrow_ops ((i <|> hpad) <-> vpad) bg region skip_dim y remaining_columns + row_ops_for_image mrow_ops ((i <|> hpad) <-> vpad) bg region skip_dim y remaining_columns remain_rows snoc_text_span :: Attr -- the display attributes of the text span -> DisplayString -- the text to output @@ -281,7 +283,7 @@ else if ( used_display_columns + char_display_width ) > remaining_columns then do Vector.unsafeWrite mspan_chars used_char_count '…' - return $! ( used_display_columns + return $! ( used_display_columns + 1 , display_columns_skipped , used_char_count + 1 ) diff -Nru haskell-vty-4.7.0.4/test/Makefile haskell-vty-4.7.0.10/test/Makefile --- haskell-vty-4.7.0.4/test/Makefile 2011-07-18 05:19:10.000000000 +0000 +++ haskell-vty-4.7.0.10/test/Makefile 2012-02-03 19:31:03.000000000 +0000 @@ -30,7 +30,6 @@ -package parallel \ -package deepseq-1.1.0.2 \ -hide-package transformers \ - -hide-package monads-fd \ -hide-package monads-tf \ -package QuickCheck-2.4 \ -ignore-package vty \ diff -Nru haskell-vty-4.7.0.4/vty.cabal haskell-vty-4.7.0.10/vty.cabal --- haskell-vty-4.7.0.4/vty.cabal 2011-07-18 05:19:11.000000000 +0000 +++ haskell-vty-4.7.0.10/vty.cabal 2012-02-03 19:31:03.000000000 +0000 @@ -1,5 +1,5 @@ Name: vty -Version: 4.7.0.4 +Version: 4.7.0.10 License: BSD3 License-file: LICENSE Author: Stefan O'Rear, Corey O'Connor @@ -32,7 +32,7 @@ Build-Depends: terminfo >= 0.3 && < 0.4 Build-Depends: utf8-string >= 0.3 && < 0.4 Build-Depends: mtl >= 1.1.1.0 && < 2.1 -Build-Depends: parallel >= 2.2 && < 3.2, deepseq >= 1.1 && < 1.2 +Build-Depends: parallel >= 2.2 && < 3.3, deepseq >= 1.1 && < 1.4 Build-Depends: vector >= 0.7 Build-Depends: parsec >= 2 && < 4 Build-Type: Simple