diff options
author | Austin Seipp <austin@well-typed.com> | 2015-03-19 17:41:08 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2015-03-19 17:41:14 -0500 |
commit | e02ef0e6d4eefa5f065cc1c33795dfa2114cd58e (patch) | |
tree | d0672e31b2efd10316a330c4d835f179cf015d33 /testsuite/tests/numeric | |
parent | 75ef8b3b56f0b33c6be782b59a55b853565ea5f4 (diff) | |
download | haskell-e02ef0e6d4eefa5f065cc1c33795dfa2114cd58e.tar.gz |
testsuite: add a regression test for #10011
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'testsuite/tests/numeric')
-rw-r--r-- | testsuite/tests/numeric/should_run/T10011.hs | 14 | ||||
-rw-r--r-- | testsuite/tests/numeric/should_run/T10011.stdout | 1 | ||||
-rw-r--r-- | testsuite/tests/numeric/should_run/all.T | 1 |
3 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/numeric/should_run/T10011.hs b/testsuite/tests/numeric/should_run/T10011.hs new file mode 100644 index 0000000000..91a0ecdba8 --- /dev/null +++ b/testsuite/tests/numeric/should_run/T10011.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE ScopedTypeVariables, TypeOperators, GADTs #-} +module Main + ( main -- :: IO () + ) where +import Data.Data +import Data.Ratio + +main :: IO () +main = + let bad = gmapT (\(x :: b) -> + case eqT :: Maybe (b :~: Integer) of + Nothing -> x; + Just Refl -> x * 2) (1 % 2) :: Rational + in print (bad == numerator bad % denominator bad) diff --git a/testsuite/tests/numeric/should_run/T10011.stdout b/testsuite/tests/numeric/should_run/T10011.stdout new file mode 100644 index 0000000000..0ca95142bb --- /dev/null +++ b/testsuite/tests/numeric/should_run/T10011.stdout @@ -0,0 +1 @@ +True diff --git a/testsuite/tests/numeric/should_run/all.T b/testsuite/tests/numeric/should_run/all.T index 62622799b8..4369430e8c 100644 --- a/testsuite/tests/numeric/should_run/all.T +++ b/testsuite/tests/numeric/should_run/all.T @@ -64,3 +64,4 @@ test('NumDecimals', normal, compile_and_run, ['']) test('T8726', normal, compile_and_run, ['']) test('CarryOverflow', omit_ways(['ghci']), compile_and_run, ['']) test('T9810', normal, compile_and_run, ['']) +test('T10011', normal, compile_and_run, ['']) |