Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added instance IsYamlScalar LazyText

  • Loading branch information...
commit bf708126398de16b7ce2c35a9afee58b6b7755bf 1 parent 36ac194
@snoyberg authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 Data/Object/Yaml.hs
View
4 Data/Object/Yaml.hs
@@ -31,6 +31,7 @@ import Data.Typeable (Typeable)
import Control.Failure
import Control.Applicative
import qualified Data.Text
+import qualified Data.Text.Lazy
import "transformers" Control.Monad.Trans
import Control.Monad
@@ -64,6 +65,9 @@ instance IsYamlScalar YamlScalar where
instance IsYamlScalar Data.Text.Text where
fromYamlScalar = cs . value
toYamlScalar t = YamlScalar (cs t) NoTag Any
+instance IsYamlScalar Data.Text.Lazy.Text where
+ fromYamlScalar = cs . value
+ toYamlScalar t = YamlScalar (cs t) NoTag Any
instance IsYamlScalar [Char] where
fromYamlScalar = cs . value
toYamlScalar s = YamlScalar (cs s) NoTag Any
Please sign in to comment.
Something went wrong with that request. Please try again.