Skip to content

Commit b836f13

Browse files
fizrukphadej
authored andcommitted
Remove Elem from servant-foreign
1 parent a6de4ba commit b836f13

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

servant-foreign/src/Servant/Foreign/Internal.hs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import GHC.TypeLits
2121
import qualified Network.HTTP.Types as HTTP
2222
import Prelude hiding (concat)
2323
import Servant.API
24+
import Servant.API.TypeLevel
2425

2526

2627
newtype FunctionName = FunctionName { unFunctionName :: [Text] }
@@ -135,15 +136,6 @@ makeLenses ''Req
135136
defReq :: Req ftype
136137
defReq = 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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
module Servant.API.TypeLevel where
88

99
import GHC.Exts(Constraint)
10-
import Servant.API.Capture ( Capture )
10+
import Servant.API.Capture ( Capture, CaptureAll )
1111
import Servant.API.ReqBody ( ReqBody )
1212
import Servant.API.QueryParam ( QueryParam, QueryParams, QueryFlag )
1313
import Servant.API.Header ( Header )

0 commit comments

Comments
 (0)