Remove Elem from servant-foreign

This commit is contained in:
Nickolay Kudasov 2016-01-20 18:23:10 +03:00 committed by Oleg Grenrus
parent a6de4ba123
commit b836f13dea
2 changed files with 2 additions and 10 deletions

View File

@ -21,6 +21,7 @@ import GHC.TypeLits
import qualified Network.HTTP.Types as HTTP
import Prelude hiding (concat)
import Servant.API
import Servant.API.TypeLevel
newtype FunctionName = FunctionName { unFunctionName :: [Text] }
@ -135,15 +136,6 @@ makeLenses ''Req
defReq :: Req ftype
defReq = Req defUrl "GET" [] Nothing Nothing (FunctionName [])
-- | To be used exclusively as a "negative" return type/constraint
-- by @'Elem`@ type family.
class NotFound
type family Elem (a :: *) (ls::[*]) :: Constraint where
Elem a '[] = NotFound
Elem a (a ': list) = ()
Elem a (b ': list) = Elem a list
-- | 'HasForeignType' maps Haskell types with types in the target
-- language of your backend. For example, let's say you're
-- implementing a backend to some language __X__, and you want

View File

@ -7,7 +7,7 @@
module Servant.API.TypeLevel where
import GHC.Exts(Constraint)
import Servant.API.Capture ( Capture )
import Servant.API.Capture ( Capture, CaptureAll )
import Servant.API.ReqBody ( ReqBody )
import Servant.API.QueryParam ( QueryParam, QueryParams, QueryFlag )
import Servant.API.Header ( Header )