Skip to content

Commit 10f0a88

Browse files
committed
Merge pull request #147 from treeowl/IsString
Add IsString instance
2 parents 08ca8ab + 7615e42 commit 10f0a88

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Data/Sequence.hs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{-# LANGUAGE CPP #-}
22
#if __GLASGOW_HASKELL__
3-
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
3+
{-# LANGUAGE DeriveDataTypeable #-}
4+
{-# LANGUAGE StandaloneDeriving #-}
5+
{-# LANGUAGE FlexibleInstances #-}
46
#endif
57
#if __GLASGOW_HASKELL__ >= 703
68
{-# LANGUAGE Trustworthy #-}
@@ -182,6 +184,7 @@ import GHC.Exts (build)
182184
import Text.Read (Lexeme(Ident), lexP, parens, prec,
183185
readPrec, readListPrec, readListPrecDefault)
184186
import Data.Data
187+
import Data.String (IsString(..))
185188
#endif
186189

187190
-- Array stuff, with GHC.Arr on GHC
@@ -2137,6 +2140,11 @@ instance GHC.Exts.IsList (Seq a) where
21372140
toList = toList
21382141
#endif
21392142

2143+
#ifdef __GLASGOW_HASKELL__
2144+
instance IsString (Seq Char) where
2145+
fromString = fromList
2146+
#endif
2147+
21402148
------------------------------------------------------------------------
21412149
-- Reverse
21422150
------------------------------------------------------------------------

0 commit comments

Comments
 (0)