[commit: ghc] wip/custom-type-errors: Add Haddoc documentation. (3ba1639)
git at git.haskell.org
git at git.haskell.org
Thu Oct 29 20:55:12 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/custom-type-errors
Link : http://ghc.haskell.org/trac/ghc/changeset/3ba1639da54b5cac5c65d0c75f9284a9acdcd9ae/ghc
>---------------------------------------------------------------
commit 3ba1639da54b5cac5c65d0c75f9284a9acdcd9ae
Author: Iavor S. Diatchki <diatchki at galois.com>
Date: Thu Oct 29 13:54:40 2015 -0700
Add Haddoc documentation.
>---------------------------------------------------------------
3ba1639da54b5cac5c65d0c75f9284a9acdcd9ae
libraries/base/GHC/TypeLits.hs | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/libraries/base/GHC/TypeLits.hs b/libraries/base/GHC/TypeLits.hs
index 7b94785..f124017 100644
--- a/libraries/base/GHC/TypeLits.hs
+++ b/libraries/base/GHC/TypeLits.hs
@@ -196,10 +196,22 @@ type family (m :: Nat) ^ (n :: Nat) :: Nat
type family (m :: Nat) - (n :: Nat) :: Nat
+-- | A description of a custom type error.
data {-kind-} ErrorMessage = Text Symbol
+ -- ^ Show the text as is.
+
| forall t. ShowType t
+ -- ^ Pretty print the type.
+ -- @ShowType :: k -> ErrorMessage@
+
| ErrorMessage :<>: ErrorMessage
+ -- ^ Put two pieces of error message next
+ -- to each other.
+
| ErrorMessage :$$: ErrorMessage
+ -- ^ Stack two pieces of error message on top
+ -- of each other.
+
infixl 5 :$$:
infixl 6 :<>:
More information about the ghc-commits
mailing list