summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIavor S. Diatchki <diatchki@galois.com>2015-10-29 13:54:40 -0700
committerIavor S. Diatchki <diatchki@galois.com>2015-10-29 13:54:40 -0700
commit3ba1639da54b5cac5c65d0c75f9284a9acdcd9ae (patch)
tree6959789254e2b626d73692585ac8d7deb89351cb
parentf330d27fe7bcc884ed9c56fcf2c73bc8eb3e975f (diff)
downloadhaskell-3ba1639da54b5cac5c65d0c75f9284a9acdcd9ae.tar.gz
Add Haddoc documentation.
-rw-r--r--libraries/base/GHC/TypeLits.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/libraries/base/GHC/TypeLits.hs b/libraries/base/GHC/TypeLits.hs
index 7b947852d0..f124017be2 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 :<>: