summaryrefslogtreecommitdiff
path: root/Presence
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-11-21 16:05:22 -0500
committerjoe <joe@jerkface.net>2017-11-21 16:05:22 -0500
commit8181409732c647f60a2c1a7e3d2f16ad17d15d86 (patch)
treef9688cc7fcfc135a700d276ad1462ea12eff3091 /Presence
parent3df9ab5c2ee9c0b09658fb0bc052f413b82f0fd3 (diff)
Added missing type signatures in ByteStringOperators.
Diffstat (limited to 'Presence')
-rw-r--r--Presence/ByteStringOperators.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Presence/ByteStringOperators.hs b/Presence/ByteStringOperators.hs
index 4453aca0..e8485134 100644
--- a/Presence/ByteStringOperators.hs
+++ b/Presence/ByteStringOperators.hs
@@ -5,9 +5,12 @@ import qualified Data.ByteString as S (ByteString)
5import Data.ByteString.Lazy.Char8 as L 5import Data.ByteString.Lazy.Char8 as L
6import Control.Applicative 6import Control.Applicative
7 7
8#if MIN_VERSION_bytestring(0,10,0)
9#else
8-- These two were imported to provide an NFData instance. 10-- These two were imported to provide an NFData instance.
9import qualified Data.ByteString.Lazy.Internal as L (ByteString(..)) 11import qualified Data.ByteString.Lazy.Internal as L (ByteString(..))
10import Control.DeepSeq 12import Control.DeepSeq
13#endif
11 14
12 15
13(<++>) :: ByteString -> ByteString -> ByteString 16(<++>) :: ByteString -> ByteString -> ByteString
@@ -23,6 +26,10 @@ infixr 5 <.++>
23infixr 5 <++> 26infixr 5 <++>
24infixr 5 <++.> 27infixr 5 <++.>
25 28
29
30(<++$>) :: Functor f => ByteString -> f ByteString -> f ByteString
31(<$++>) :: Functor f => f ByteString -> ByteString -> f ByteString
32(<$++$>) :: Applicative f => f ByteString -> f ByteString -> f ByteString
26a <++$> b = fmap (a<++>) b 33a <++$> b = fmap (a<++>) b
27a <$++> b = fmap (<++>b) a 34a <$++> b = fmap (<++>b) a
28a <$++$> b = liftA2 (<++>) a b 35a <$++$> b = liftA2 (<++>) a b
@@ -30,10 +37,12 @@ infixr 6 <++$>
30infixr 6 <$++> 37infixr 6 <$++>
31infixr 6 <$++$> 38infixr 6 <$++$>
32 39
40(<?++>) :: Maybe ByteString -> ByteString -> ByteString
33Nothing <?++> b = b 41Nothing <?++> b = b
34Just a <?++> b = a <++> b 42Just a <?++> b = a <++> b
35infixr 5 <?++> 43infixr 5 <?++>
36 44
45(<++?>) :: ByteString -> Maybe ByteString -> ByteString
37a <++?> Nothing = a 46a <++?> Nothing = a
38a <++?> Just b = a <++> b 47a <++?> Just b = a <++> b
39infixr 5 <++?> 48infixr 5 <++?>