git.iko.soy/typeable/servant
on master help sign in
rename the 'Captured' class to 'FromText'
commit3a32bd4162002ab1e14c38a7ac7b6ab62ea80ef0 authorAlp Mestanogullari <alpmestan@gmail.com> dateWed 22 Oct 2014, 12:56 (12 years ago) parent1a10544
1 file changed+5−5
src/Servant.hs+5−5
src/Servant.hs+5−5
@@ -20,17 +20,17 @@ import Soenke
2020
2121data Capture sym a
2222
23−class Captured a where
23+class FromText a where
2424 capture :: Text -> Maybe a
2525
26−instance Captured Text where
26+instance FromText Text where
2727 capture = Just
2828
29−captured :: Captured a => proxy (Capture sym a) -> Text -> Maybe a
29+captured :: FromText a => proxy (Capture sym a) -> Text -> Maybe a
3030captured _ = capture
3131
32−instance (KnownSymbol capture, Captured a, HasServer sublayout)
33− => HasServer (Capture capture a :> sublayout) where
32+instance (KnownSymbol capture, FromText a, HasServer sublayout)
33+ => HasServer (Capture capture a :> sublayout) where
3434
3535 -- this means that what follows the capture
3636 -- must necessarily be a function that expects