Skip to content

Commit ed07f5a

Browse files
authored
Fix haddocks for type families in Servant.API.UVerb.Union (#1668)
1 parent 9131f4f commit ed07f5a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

servant/src/Servant/API/UVerb/Union.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ instance {-# OVERLAPPING #-} UElem x xs => UElem x (x' ': xs) where
111111
eject (Z _) = Nothing
112112
eject (S ns) = eject ns
113113

114-
-- | Check whether @a@ is in list. This will throw nice errors if the element is not in the
115-
-- list, or if there is a duplicate in the list.
114+
-- | Check whether @a@ is in given type-level list.
115+
-- This will throw a nice error if the element is not in the list.
116116
type family CheckElemIsMember (a :: k) (as :: [k]) :: Constraint where
117117
CheckElemIsMember a as =
118118
If (Elem a as) (() :: Constraint) (TypeError (NoElementError a as))
@@ -132,6 +132,8 @@ type family Elem (x :: k) (xs :: [k]) :: Bool where
132132
Elem x (_ ': xs) = Elem x xs
133133
Elem _ '[] = 'False
134134

135+
-- | Check whether all values in a type-level list are distinct.
136+
-- This will throw a nice error if there are any duplicate elements in the list.
135137
type family Unique xs :: Constraint where
136138
Unique xs = If (Nubbed xs == 'True) (() :: Constraint) (TypeError (DuplicateElementError xs))
137139

0 commit comments

Comments
 (0)