blob: 91a0ecdba848debd54e2cb195f8a99b011f2feaa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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)
|