Skip to content

Commit

Permalink
Remove Elem from servant-foreign
Browse files Browse the repository at this point in the history
  • Loading branch information
fizruk committed Jan 20, 2016
1 parent 5f678cc commit 1304b17
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions servant-foreign/src/Servant/Foreign/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import GHC.TypeLits
import qualified Network.HTTP.Types as HTTP
import Prelude hiding (concat)
import Servant.API
import Servant.API.TypeLevel

-- | Function name builder that simply concat each part together
concatCase :: FunctionName -> Text
Expand Down Expand Up @@ -115,15 +116,6 @@ captureArg _ = error "captureArg called on non capture"
defReq :: Req
defReq = Req defUrl "GET" [] Nothing "" []

-- | 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__:
Expand Down

0 comments on commit 1304b17

Please sign in to comment.