on d82d607 help sign in
ormolu/data/examples/declaration/class/functional-dependencies.hs
16 lines 305 B history raw
1{-# LANGUAGE FunctionalDependencies #-}
3-- | Something.
4class Foo a b | a -> b
6class Bar a b | a -> b, b -> a where bar :: a
8-- | Something else.
9class Baz a b c d
10 | a b -> c d -- Foo
11 , b c -> a d -- Bar
12 , a c -> b d-- Baz
13 , a c d -> b
14 , a b d -> a b c d
15 where
16 baz :: a -> b