Commits

Bryan O'Sullivan committed 460b128

Make Text an instance of IsString

  • Participants
  • Parent commits fe8d0f5

Comments (0)

Files changed (1)

File Data/Text.hs

 import qualified Data.List as L
 import Data.Monoid(Monoid(..))
 import Data.Word(Word16)
+import Data.String (IsString(..))
 
 import qualified Data.Text.Fusion as S
 import Data.Text.Fusion (Stream(..),Step(..),Encoding(..),
     mappend = append
     mconcat = concat
 
-
+instance IsString Text where
+    fromString = pack
 
 -- -----------------------------------------------------------------------------
 -- * Conversion to/from 'Text'