rename the 'Captured' class to 'FromText'
This commit is contained in:
parent
1a105448f0
commit
3a32bd4162
1 changed files with 5 additions and 5 deletions
|
@ -20,17 +20,17 @@ import Soenke
|
||||||
|
|
||||||
data Capture sym a
|
data Capture sym a
|
||||||
|
|
||||||
class Captured a where
|
class FromText a where
|
||||||
capture :: Text -> Maybe a
|
capture :: Text -> Maybe a
|
||||||
|
|
||||||
instance Captured Text where
|
instance FromText Text where
|
||||||
capture = Just
|
capture = Just
|
||||||
|
|
||||||
captured :: Captured a => proxy (Capture sym a) -> Text -> Maybe a
|
captured :: FromText a => proxy (Capture sym a) -> Text -> Maybe a
|
||||||
captured _ = capture
|
captured _ = capture
|
||||||
|
|
||||||
instance (KnownSymbol capture, Captured a, HasServer sublayout)
|
instance (KnownSymbol capture, FromText a, HasServer sublayout)
|
||||||
=> HasServer (Capture capture a :> sublayout) where
|
=> HasServer (Capture capture a :> sublayout) where
|
||||||
|
|
||||||
-- this means that what follows the capture
|
-- this means that what follows the capture
|
||||||
-- must necessarily be a function that expects
|
-- must necessarily be a function that expects
|
||||||
|
|
Loading…
Reference in a new issue