1 {-# OPTIONS -fglasgow-exts #-}
3 -- !!! A simple FFI test
5 -- This one provoked a bogus renamer error in 4.08.1:
6 -- panic: tcLookupGlobalValue: <THIS>.PrelIOBase.returnIO{-0B,s-}
7 -- (the error was actually in DsMonad.dsLookupGlobalValue!)
13 foreign export ccall "gccd" mygcd :: Int -> Int -> Int
15 main = putStrLn "No bug"
17 mygcd a b = if (a==b) then a
18 else if (a<b) then mygcd a (b-a)