1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE PartialTypeSignatures #-} module Foo where class Foo x where foo :: x bar :: (Foo (), _) => f () bar = pure foo marie :: (Foo x, _) => f x marie = pure foo anne :: _ => f x anne = pure foo