on master help sign in
Remove Elem from servant-foreign
commitb836f13dea71714e57ae566ac3f028cd55ccfe8d authorNickolay Kudasov <nickolay.kudasov@gmail.com> dateWed 20 Jan 2016, 18:23 (11 years ago) parenta6de4ba
2 files changed+2−10
servant-foreign/src/Servant/Foreign/Internal.hs+1−9 servant/src/Servant/API/TypeLevel.hs+1−1
servant-foreign/src/Servant/Foreign/Internal.hs+1−9
@@ -21,6 +21,7 @@ import GHC.TypeLits
2121import qualified Network.HTTP.Types as HTTP
2222import Prelude hiding (concat)
2323import Servant.API
24+import Servant.API.TypeLevel
2425
2526
2627newtype FunctionName = FunctionName { unFunctionName :: [Text] }
@@ -135,15 +136,6 @@ makeLenses ''Req
135136defReq :: Req ftype
136137defReq = Req defUrl "GET" [] Nothing Nothing (FunctionName [])
137138
138−-- | To be used exclusively as a "negative" return type/constraint
139−-- by @'Elem`@ type family.
140−class NotFound
141−
142−type family Elem (a :: *) (ls::[*]) :: Constraint where
143− Elem a '[] = NotFound
144− Elem a (a ': list) = ()
145− Elem a (b ': list) = Elem a list
146−
147139-- | 'HasForeignType' maps Haskell types with types in the target
148140-- language of your backend. For example, let's say you're
149141-- implementing a backend to some language __X__, and you want
servant/src/Servant/API/TypeLevel.hs+1−1
@@ -7,7 +7,7 @@
77module Servant.API.TypeLevel where
88
99import GHC.Exts(Constraint)
10−import Servant.API.Capture ( Capture )
10+import Servant.API.Capture ( Capture, CaptureAll )
1111import Servant.API.ReqBody ( ReqBody )
1212import Servant.API.QueryParam ( QueryParam, QueryParams, QueryFlag )
1313import Servant.API.Header ( Header )