@@ -99,9 +99,6 @@ instance (HasServer a context, HasServer b context) => HasServer (a :<|> b) cont
9999 where pa = Proxy :: Proxy a
100100 pb = Proxy :: Proxy b
101101
102−captured :: FromHttpApiData a => proxy (Capture sym a) -> Text -> Maybe a
103−captured _ = parseUrlPieceMaybe
104−
105102-- | If you use 'Capture' in one of the endpoints for your API,
106103-- this automatically requires your server-side handler to be a function
107104-- that takes an argument of the type specified by the 'Capture'.
@@ -129,12 +126,10 @@ instance (KnownSymbol capture, FromHttpApiData a, HasServer sublayout context)
129126 DynamicRouter $ \ first ->
130127 route (Proxy :: Proxy sublayout)
131128 context
132− (addCapture d $ case captured captureProxy first of
129+ (addCapture d $ case parseUrlPieceMaybe first :: Maybe a of
133130 Nothing -> return $ Fail err404
134131 Just v -> return $ Route v
135132 )
136− where
137− captureProxy = Proxy :: Proxy (Capture capture a)
138133
139134allowedMethodHead :: Method -> Request -> Bool
140135allowedMethodHead method request = method == methodGet && requestMethod request == methodHead