Permalink
Browse files

Added FromObject Day Text Text instance

  • Loading branch information...
snoyberg committed Nov 25, 2009
1 parent bab694e commit aaebe559d12e09c0ee21b01fdedd8dcbf34e2e76
Showing with 4 additions and 0 deletions.
  1. +4 −0 Data/Object/Text.hs
View
@@ -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

0 comments on commit aaebe55

Please sign in to comment.