ref: 57d44b59b9ebe3662b56205a8344ec716ff4c82d
parent: 50e5d2a21de8cc249cde66444a121d6088c7467a
author: Lennart Augustsson <lennart.augustsson@epicgames.com>
date: Thu Nov 16 06:22:41 EST 2023
Another test.
--- /dev/null
+++ b/tests/Multi.hs
@@ -1,0 +1,20 @@
+module Multi(main) where
+import Prelude
+
+class C a b where
+ conv :: a -> b
+
+instance C Int Bool where
+ conv x = x /= 0
+
+instance C Int Char where
+ conv = chr
+
+instance C Char Int where
+ conv = ord
+
+main :: IO ()
+main = do
+ print (conv (100::Int) :: Bool)
+ print (conv (100::Int) :: Char)
+ print (conv 'a' :: Int)
--- /dev/null
+++ b/tests/Multi.ref
@@ -1,0 +1,3 @@
+True
+'d'
+97
--
⑨