From: PHO Date: Fri, 23 Dec 2011 03:07:10 +0000 (+0900) Subject: Docs X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=a122079;p=Lucu.git Docs Ditz-issue: e6ec5a54d14cad8f79c456e23e92770fbbd3577e --- 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 diff --git a/Network/HTTP/Lucu/StatusCode/Internal.hs b/Network/HTTP/Lucu/StatusCode/Internal.hs index ec06f3e..e8785c3 100644 --- a/Network/HTTP/Lucu/StatusCode/Internal.hs +++ b/Network/HTTP/Lucu/StatusCode/Internal.hs @@ -49,8 +49,9 @@ class (Eq sc, Show sc) ⇒ StatusCode sc where fromStatusCode ∷ sc → SomeStatusCode fromStatusCode = SomeStatusCode --- |Equivalence of 'StatusCode's. Two 'StatusCode's @a@ and @b@ are --- said to be equivalent iff @'numericCode' a '==' 'numericCode' b@. +-- |Equivalence of 'StatusCode's. Two 'StatusCode's @α@ and +-- @β@ are said to be equivalent iff @'numericCode' α '==' +-- 'numericCode' β@. instance StatusCode sc ⇒ Eq' sc where type Unified sc = Int {-# INLINE CONLIKE unify #-}