on master help sign in
Work around broken Positive instance in QuickCheck

--HG-- extra : rebase_source : 94683c1eb50dc3a1b6223cb0ef1788523ec5212e extra : histedit_source : 78bbc783bfd3e1e060a19ed5db7b270742e4db50

commit29ada3d4997d8fa53d3999f3306b2549b408481e authorBryan O'Sullivan <bos@serpentine.com> dateThu 5 Jun 2014, 21:59 (12 years ago) parent24f820c
1 file changed+4−2
tests/Tests/Properties.hs+4−2
tests/Tests/Properties.hs+4−2
@@ -756,14 +756,16 @@ t_decimal (n::Int) s =
756756tl_decimal (n::Int) s =
757757 TL.signed TL.decimal (TL.pack (show n) `TL.append` t) == Right (n,t)
758758 where t = TL.dropWhile isDigit s
759−t_hexadecimal (n::Positive Int) s ox =
759+t_hexadecimal m s ox =
760760 T.hexadecimal (T.concat [p, T.pack (showHex n ""), t]) == Right (n,t)
761761 where t = T.dropWhile isHexDigit s
762762 p = if ox then "0x" else ""
763−tl_hexadecimal (n::Positive Int) s ox =
763+ n = getPositive m :: Int
764+tl_hexadecimal m s ox =
764765 TL.hexadecimal (TL.concat [p, TL.pack (showHex n ""), t]) == Right (n,t)
765766 where t = TL.dropWhile isHexDigit s
766767 p = if ox then "0x" else ""
768+ n = getPositive m :: Int
767769
768770isFloaty c = c `elem` "+-.0123456789eE"
769771