summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2016-07-05 06:06:29 -0400
committerBen Gamari <ben@smart-cactus.org>2016-07-08 15:06:23 +0200
commit15751f265d34d797c48270773bdd1a8e77e400bc (patch)
treee9091f440a926c68f13fc9744a2fe5f4f179b123
parent91fd87e2384091f1872f91953e83b299d8e1478f (diff)
downloadhaskell-15751f265d34d797c48270773bdd1a8e77e400bc.tar.gz
FastString: Add IsString instance
-rw-r--r--compiler/utils/FastString.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/utils/FastString.hs b/compiler/utils/FastString.hs
index 41889cfdc4..490eb138bf 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