From 3a32bd4162002ab1e14c38a7ac7b6ab62ea80ef0 Mon Sep 17 00:00:00 2001 From: Alp Mestanogullari Date: Wed, 22 Oct 2014 12:56:46 +0200 Subject: [PATCH] rename the 'Captured' class to 'FromText' --- src/Servant.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Servant.hs b/src/Servant.hs index ba75a6bb..d10705a8 100644 --- a/src/Servant.hs +++ b/src/Servant.hs @@ -20,17 +20,17 @@ import Soenke data Capture sym a -class Captured a where +class FromText a where capture :: Text -> Maybe a -instance Captured Text where +instance FromText Text where capture = Just -captured :: Captured a => proxy (Capture sym a) -> Text -> Maybe a +captured :: FromText a => proxy (Capture sym a) -> Text -> Maybe a captured _ = capture -instance (KnownSymbol capture, Captured a, HasServer sublayout) - => HasServer (Capture capture a :> sublayout) where +instance (KnownSymbol capture, FromText a, HasServer sublayout) + => HasServer (Capture capture a :> sublayout) where -- this means that what follows the capture -- must necessarily be a function that expects