c2dc17ed0fd56015330e7c453fb7eb7376f35245
[packages/base.git] / Data / String.hs
1 {-# OPTIONS_GHC -XNoImplicitPrelude #-}
2 -----------------------------------------------------------------------------
3 -- |
4 -- Module : Data.String
5 -- Copyright : (c) The University of Glasgow 2007
6 -- License : BSD-style (see the file libraries/base/LICENSE)
7 --
8 -- Maintainer : libraries@haskell.org
9 -- Stability : experimental
10 -- Portability : portable
11 --
12 -- The @String@ type and associated operations.
13 --
14 -----------------------------------------------------------------------------
15
16 module Data.String (
17 String
18 , IsString(..)
19
20 -- * Functions on strings
21 , lines
22 , words
23 , unlines
24 , unwords
25 ) where
26
27 #ifdef __GLASGOW_HASKELL__
28 import GHC.Base
29 #endif
30
31 import Data.List (lines, words, unlines, unwords)
32
33 -- | Class for string-like datastructures; used by the overloaded string
34 -- extension (-foverloaded-strings in GHC).
35 class IsString a where
36 fromString :: String -> a
37
38 instance IsString [Char] where
39 fromString xs = xs
40