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=0000000000000000000000000000000000000000;hp=3c93da25502a03df8143b8fa11d1a9f8ca3838fa;hb=eb77281b24b8d7218e1fd80164f941836cef1d5a;hpb=a122079f1e16c8da8e207a30e37f88362286508f diff --git a/Data/Eq/Indirect.hs b/Data/Eq/Indirect.hs deleted file mode 100644 index 3c93da2..0000000 --- a/Data/Eq/Indirect.hs +++ /dev/null @@ -1,57 +0,0 @@ -{-# LANGUAGE - FlexibleContexts - , TypeFamilies - , UnicodeSyntax - #-} --- |Indirect equality comparison. -module Data.Eq.Indirect - ( Eq'(..) - , (==:) - , (/=:) - , (≡:) - , (≢:) - , (≠:) - ) - where -import Prelude.Unicode - -infix 4 ==:, /=:, ≡:, ≢:, ≠: - --- |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 - -- |The said equality-comparable type @γ@. - type Unified α - -- |Monomorphism from @α@ to @γ@. - unify ∷ α → Unified α - --- |FIXME: doc -(==:) ∷ (Eq' α, Eq' β, Unified α ~ Unified β) ⇒ α → β → Bool -{-# INLINE (==:) #-} -(==:) = (∘ unify) ∘ (≡) ∘ unify - --- |FIXME: doc -(/=:) ∷ (Eq' α, Eq' β, Unified α ~ Unified β) ⇒ α → β → Bool -{-# INLINE (/=:) #-} -(/=:) = ((¬) ∘) ∘ (==:) - --- |FIXME: doc -(≡:) ∷ (Eq' α, Eq' β, Unified α ~ Unified β) ⇒ α → β → Bool -{-# INLINE CONLIKE (≡:) #-} -(≡:) = (==:) - --- |FIXME: doc -(≢:) ∷ (Eq' α, Eq' β, Unified α ~ Unified β) ⇒ α → β → Bool -{-# INLINE CONLIKE (≢:) #-} -(≢:) = (/=:) - --- |FIXME: doc -(≠:) ∷ (Eq' α, Eq' β, Unified α ~ Unified β) ⇒ α → β → Bool -{-# INLINE CONLIKE (≠:) #-} -(≠:) = (/=:)