fork download
  1. {-# LANGUAGE MultiParamTypeClasses #-}
  2. {-# LANGUAGE FunctionalDependencies #-}
  3. {-# LANGUAGE FlexibleInstances #-}
  4.  
  5. class C a b | a -> b where
  6. f :: a -> Int
  7. instance C () () where
  8. f x = 1
  9.  
  10. main = print $ f ()
Success #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
1