fork download
  1. class Foo a where
  2. foo :: a -> a
  3.  
  4. bar :: Foo a => a -> a
  5. bar x = foo a
  6.  
  7. instance Foo Int where
  8. foo x = x + 1
  9.  
  10. main = do
  11. let x = 1 :: Int
  12. print (bar x)
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
[1 of 1] Compiling Main             ( prog.hs, prog.o )

prog.hs:5:12: Not in scope: `a'
stdout
Standard output is empty