Add IsString class for overloaded string literals.
[ghc-base.git] / GHC / Base.lhs
index 4fc09a6..5522e23 100644 (file)
@@ -496,6 +496,14 @@ otherwise          :: Bool
 otherwise              =  True
 \end{code}
 
+\begin{code}
+class IsString a where
+    fromString :: String -> a
+
+instance IsString [Char] where
+    fromString xs = xs
+\end{code}
+
 
 %*********************************************************
 %*                                                     *