Commit e02ef0e6 authored by Austin Seipp's avatar Austin Seipp

testsuite: add a regression test for #10011

Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
parent 75ef8b3b
......@@ -1045,6 +1045,7 @@ mk/ghcconfig*_inplace_bin_ghc-stage2.exe.mk
/tests/numeric/should_run/T7689
/tests/numeric/should_run/T8726
/tests/numeric/should_run/T9810
/tests/numeric/should_run/T10011
/tests/numeric/should_run/add2
/tests/numeric/should_run/arith001
/tests/numeric/should_run/arith002
......
{-# 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)
......@@ -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, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment