Skip to content

Commit

Permalink
Rename Wrapped to Naked
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaël Deest committed Feb 22, 2022
1 parent c434792 commit 703d14e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions servant-server/src/Servant/Server/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -292,21 +292,21 @@ noContentRouter method status action = leafRouter route'
env request respond $ \ _output ->
Route $ responseLBS status [] ""

newtype Wrapped a = Wrapped a
newtype Naked a = Naked a

type family Wrap a where
Wrap (Headers x a) = Headers x a
Wrap a = Wrapped a
Wrap a = Naked a

class ExtractHeadersResponse orig wrapped where
type HandlerResponse orig wrapped :: *
type ExtractedValue orig wrapped :: *

extractHeadersResponse :: HandlerResponse orig wrapped -> (([(HeaderName, B.ByteString)]), ExtractedValue orig wrapped)

instance ExtractHeadersResponse a (Wrapped a) where
type HandlerResponse a (Wrapped a) = a
type ExtractedValue a (Wrapped a) = a
instance ExtractHeadersResponse a (Naked a) where
type HandlerResponse a (Naked a) = a
type ExtractedValue a (Naked a) = a

extractHeadersResponse :: a -> (([(HeaderName, B.ByteString)]), a)
extractHeadersResponse x = ([], x)
Expand Down

0 comments on commit 703d14e

Please sign in to comment.