git.iko.soy/typeable/servant
on master help sign in
rename the 'Captured' class to 'FromText'
3a32bd4Alp Mestanogullari
src/Servant.hs+5−5
@@ -20,17 +20,17 @@ import Soenke
20
20
21data Capture sym a
21data Capture sym a
22
22
23−class Captured a where
23+class FromText a where
24 capture :: Text -> Maybe a
24 capture :: Text -> Maybe a
25
25
26−instance Captured Text where
26+instance FromText Text where
27 capture = Just
27 capture = Just
28
28
29−captured :: Captured a => proxy (Capture sym a) -> Text -> Maybe a
29+captured :: FromText a => proxy (Capture sym a) -> Text -> Maybe a
30captured _ = capture
30captured _ = capture
31
31
32−instance (KnownSymbol capture, Captured a, HasServer sublayout)
32+instance (KnownSymbol capture, FromText a, HasServer sublayout)
33− => HasServer (Capture capture a :> sublayout) where
33+ => HasServer (Capture capture a :> sublayout) where
34
34
35 -- this means that what follows the capture
35 -- this means that what follows the capture
36 -- must necessarily be a function that expects
36 -- must necessarily be a function that expects