X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FString.hs;h=ac1e416c90377cda0ca8fe0f8e8374c62ec48de2;hb=HEAD;hp=f1a65cd16a1b0a2b965eef6a0819ed105b149576;hpb=2e317d707ce3512be60ada74a22119cd0a054ca1;p=ghc-base.git diff --git a/Data/String.hs b/Data/String.hs index f1a65cd..ac1e416 100644 --- a/Data/String.hs +++ b/Data/String.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -fno-implicit-prelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, FlexibleInstances #-} + ----------------------------------------------------------------------------- -- | -- Module : Data.String @@ -9,23 +10,33 @@ -- Stability : experimental -- Portability : portable -- --- Things related to the String type. +-- The @String@ type and associated operations. -- ----------------------------------------------------------------------------- module Data.String ( - IsString(..) + String + , IsString(..) + + -- * Functions on strings + , lines + , words + , unlines + , unwords ) where #ifdef __GLASGOW_HASKELL__ import GHC.Base #endif +import Data.List (lines, words, unlines, unwords) + -- | Class for string-like datastructures; used by the overloaded string -- extension (-foverloaded-strings in GHC). class IsString a where fromString :: String -> a +#ifndef __NHC__ instance IsString [Char] where fromString xs = xs - +#endif