X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Lucu.git;a=blobdiff_plain;f=Data%2FEq%2FIndirect.hs;fp=Data%2FEq%2FIndirect.hs;h=3c93da25502a03df8143b8fa11d1a9f8ca3838fa;hp=a7aa8d19a1f053b9abbbc44b9c893a03c17d6ae9;hb=a122079f1e16c8da8e207a30e37f88362286508f;hpb=42aad5a1889cf99c7c26ae7573bcc888e840ae66 diff --git a/Data/Eq/Indirect.hs b/Data/Eq/Indirect.hs index a7aa8d1..3c93da2 100644 --- a/Data/Eq/Indirect.hs +++ b/Data/Eq/Indirect.hs @@ -3,7 +3,7 @@ , TypeFamilies , UnicodeSyntax #-} --- |FIXME: doc +-- |Indirect equality comparison. module Data.Eq.Indirect ( Eq'(..) , (==:) @@ -15,13 +15,20 @@ module Data.Eq.Indirect where import Prelude.Unicode -infix 4 ==:{-, /=:, ≡:, ≢:, ≠:-} +infix 4 ==:, /=:, ≡:, ≢:, ≠: --- |FIXME: doc +-- |Type class for indirectly equality-comparable types. That is, any +-- @α@ of @'Eq'' α@ has a monomorphism to some +-- equality-comparable type @γ@ while @α@ itself isn't +-- necessarily an instance of 'Eq'. This way we can generalise the +-- '==' operator so that it can take two different types as long as +-- they both have monomorphisms to the same 'Eq' type @γ@. +-- +-- Minimal complete definition: 'Unified' and 'unify'. class Eq (Unified α) ⇒ Eq' α where - -- |FIXME: doc + -- |The said equality-comparable type @γ@. type Unified α - -- |FIXME: doc + -- |Monomorphism from @α@ to @γ@. unify ∷ α → Unified α -- |FIXME: doc