@@ -1,13 +1,14 @@
1−{-# LANGUAGE CPP #-}
2−{-# LANGUAGE ConstraintKinds #-}
3−{-# LANGUAGE DataKinds #-}
4−{-# LANGUAGE FlexibleContexts #-}
5−{-# LANGUAGE FlexibleInstances #-}
6−{-# LANGUAGE ScopedTypeVariables #-}
7−{-# LANGUAGE TemplateHaskell #-}
8−{-# LANGUAGE TypeFamilies #-}
9−{-# LANGUAGE TypeOperators #-}
10−{-# LANGUAGE UndecidableInstances #-}
1+{-# LANGUAGE CPP #-}
2+{-# LANGUAGE ConstraintKinds #-}
3+{-# LANGUAGE DataKinds #-}
4+{-# LANGUAGE FlexibleContexts #-}
5+{-# LANGUAGE FlexibleInstances #-}
6+{-# LANGUAGE MultiParamTypeClasses #-}
7+{-# LANGUAGE ScopedTypeVariables #-}
8+{-# LANGUAGE TemplateHaskell #-}
9+{-# LANGUAGE TypeFamilies #-}
10+{-# LANGUAGE TypeOperators #-}
11+{-# LANGUAGE UndecidableInstances #-}
1112
1213-- | Generalizes all the data needed to make code generation work with
1314-- arbitrary programming languages.
@@ -140,7 +141,12 @@ captureArg _ = error "captureArg called on non capture"
140141defReq :: Req
141142defReq = Req defUrl "GET" [] False []
142143
144+-- | To be used exclusively as a "negative" return type/constraint
145+-- by @'Elem`@ type family.
146+class NotFound
147+
143148type family Elem (a :: *) (ls::[*]) :: Constraint where
149+ Elem a '[] = NotFound
144150 Elem a (a ': list) = ()
145151 Elem a (b ': list) = Elem a list
146152