Rename toProxy to toFormatProxy

This commit is contained in:
Alex Mason 2016-09-02 15:46:23 +10:00
parent 1996ec05f7
commit f3f61dbbac

View file

@ -9,7 +9,7 @@
module Servant.API.Times module Servant.API.Times
( FTime(..) ( FTime(..)
, toProxy , toFormatProxy
, getFormat , getFormat
, renderTime , renderTime
, parseTime , parseTime
@ -78,11 +78,11 @@ instance (KnownSymbol format, T.ParseTime t) => FromHttpApiData (FTime format t)
parseQueryParam = parseQueryParam >=> parseTime parseQueryParam = parseQueryParam >=> parseTime
toProxy :: FTime format t -> Proxy format toFormatProxy :: FTime format t -> Proxy format
toProxy _ = Proxy toFormatProxy _ = Proxy
getFormat :: KnownSymbol format => FTime format t -> String getFormat :: KnownSymbol format => FTime format t -> String
getFormat t = symbolVal (toProxy t) getFormat t = symbolVal (toFormatProxy t)
renderTime :: (KnownSymbol format, T.FormatTime t) => FTime format t -> String renderTime :: (KnownSymbol format, T.FormatTime t) => FTime format t -> String
renderTime tt@(FTime t) = T.formatTime T.defaultTimeLocale (getFormat tt) t renderTime tt@(FTime t) = T.formatTime T.defaultTimeLocale (getFormat tt) t