We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Elem
Union
1 parent 6392dce commit a4194dcCopy full SHA for a4194dc
servant/src/Servant/API/UVerb/Union.hs
@@ -128,9 +128,9 @@ type DuplicateElementError (rs :: [k]) =
128
':$$: 'Text " " ':<>: 'ShowType rs
129
130
type family Elem (x :: k) (xs :: [k]) :: Bool where
131
+ Elem x (x ': _) = 'True
132
+ Elem x (_ ': xs) = Elem x xs
133
Elem _ '[] = 'False
- Elem x (x' ': xs) =
- If (x == x') 'True (Elem x xs)
134
135
type family Unique xs :: Constraint where
136
Unique xs = If (Nubbed xs == 'True) (() :: Constraint) (TypeError (DuplicateElementError xs))
0 commit comments