diff options
Diffstat (limited to 'testsuite/tests/numeric/should_run/T10011.hs')
-rw-r--r-- | testsuite/tests/numeric/should_run/T10011.hs | 14 |
1 files changed, 14 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) |