diff options
author | David Terei <davidterei@gmail.com> | 2011-07-20 11:09:03 -0700 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2011-07-20 11:26:35 -0700 |
commit | 16514f272fb42af6e9c7674a9bd6c9dce369231f (patch) | |
tree | e4f332b45fe65e2a7a2451be5674f887b42bf199 /testsuite/tests/ghc-regress/typecheck/should_run/tcrun003.hs | |
parent | ebd422aed41048476aa61dd4c520d43becd78682 (diff) | |
download | haskell-16514f272fb42af6e9c7674a9bd6c9dce369231f.tar.gz |
Move tests from tests/ghc-regress/* to just tests/*
Diffstat (limited to 'testsuite/tests/ghc-regress/typecheck/should_run/tcrun003.hs')
-rw-r--r-- | testsuite/tests/ghc-regress/typecheck/should_run/tcrun003.hs | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/testsuite/tests/ghc-regress/typecheck/should_run/tcrun003.hs b/testsuite/tests/ghc-regress/typecheck/should_run/tcrun003.hs deleted file mode 100644 index 67b9771d5f..0000000000 --- a/testsuite/tests/ghc-regress/typecheck/should_run/tcrun003.hs +++ /dev/null @@ -1,27 +0,0 @@ -{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} --- !!! One method class from Sergey Mechveliani --- showed up problematic newtype dict rep. -module Main where -import Data.Ratio - -class MBConvertible a b where cm :: a -> b -> Maybe b - -c :: MBConvertible a b => a -> b -> b -c a b = case cm a b - of - Just b' -> b' - _ -> error "c a b failed" - - -instance MBConvertible Int Int where cm a _ = Just a - -instance (MBConvertible a b,Integral b) => MBConvertible a (Ratio b) - where - cm a f = case cm a (numerator f) of Just a' -> Just (a'%1) - _ -> Nothing - -main = let f = 1%1 :: Ratio Int - n2 = 2::Int - g = (c n2 f) + f - in - putStr (shows g "\n") |