projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add IsString class for overloaded string literals.
[ghc-base.git]
/
GHC
/
Base.lhs
diff --git
a/GHC/Base.lhs
b/GHC/Base.lhs
index
4fc09a6
..
5522e23
100644
(file)
--- a/
GHC/Base.lhs
+++ b/
GHC/Base.lhs
@@
-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}
+
%*********************************************************
%* *