Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added FromObject Day Text Text instance

  • Loading branch information...
commit aaebe559d12e09c0ee21b01fdedd8dcbf34e2e76 1 parent bab694e
@snoyberg authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 Data/Object/Text.hs
View
4 Data/Object/Text.hs
@@ -33,6 +33,7 @@ import Data.Ratio (Ratio)
import Data.Typeable (Typeable)
import Control.Exception (Exception)
+import Control.Monad ((<=<))
-- | 'Object's with keys and values of type 'LT.Text'.
type TextObject = Object Text Text
@@ -73,3 +74,6 @@ instance FromObject Char Text Text where
listFromObject o = do
x <- fromScalar o
return $ convertSuccess x
+
+instance FromObject Day Text Text where
+ fromObject = convertAttempt <=< fromScalar
Please sign in to comment.
Something went wrong with that request. Please try again.