[commit: ghc] master: FastString: Add IsString instance (15751f2)

git at git.haskell.org git at git.haskell.org
Fri Jul 8 13:02:25 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/15751f265d34d797c48270773bdd1a8e77e400bc/ghc

>---------------------------------------------------------------

commit 15751f265d34d797c48270773bdd1a8e77e400bc
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Tue Jul 5 06:06:29 2016 -0400

    FastString: Add IsString instance


>---------------------------------------------------------------

15751f265d34d797c48270773bdd1a8e77e400bc
 compiler/utils/FastString.hs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/compiler/utils/FastString.hs b/compiler/utils/FastString.hs
index 41889cf..490eb13 100644
--- a/compiler/utils/FastString.hs
+++ b/compiler/utils/FastString.hs
@@ -192,6 +192,9 @@ instance Ord FastString where
             | otherwise =  y
     compare a b = cmpFS a b
 
+instance IsString FastString where
+    fromString = fsLit
+
 instance Monoid FastString where
     mempty = nilFS
     mappend = appendFS



More information about the ghc-commits mailing list