11package redis
22package algebra
33
4- import scalaz .{\/ , Free , Functor , Inject , InjectFunctions , NonEmptyList }, Free . Return
4+ import scalaz .{\/ , Free , Functor , Inject , InjectFunctions , NonEmptyList }
55
66import data .{Asc , By , Limit , ObjectSubcommand , ObjectResult , Order , Type => DataType , Status }
77
@@ -78,22 +78,22 @@ trait KeyInstances {
7878
7979trait KeyFunctions extends InjectFunctions {
8080 def del [F [_]: Functor ](keys : NonEmptyList [ByteString ])(implicit I : Inject [KeyAlgebra , F ]): Free [F , Long ] =
81- inject[F , KeyAlgebra , Long ](Del (keys, Return (_)))
81+ inject[F , KeyAlgebra , Long ](Del (keys, Free .point (_)))
8282
8383 def dump [F [_]: Functor ](key : ByteString )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Option [ByteString ]] =
84- inject[F , KeyAlgebra , Option [ByteString ]](Dump (key, Return (_)))
84+ inject[F , KeyAlgebra , Option [ByteString ]](Dump (key, Free .point (_)))
8585
8686 def exists [F [_]: Functor ](key : ByteString )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Boolean ] =
87- inject[F , KeyAlgebra , Boolean ](Exists (key, Return (_)))
87+ inject[F , KeyAlgebra , Boolean ](Exists (key, Free .point (_)))
8888
8989 def expire [F [_]: Functor ](key : ByteString , in : Seconds )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Boolean ] =
90- inject[F , KeyAlgebra , Boolean ](Expire (key, in, Return (_)))
90+ inject[F , KeyAlgebra , Boolean ](Expire (key, in, Free .point (_)))
9191
9292 def expireat [F [_]: Functor ](key : ByteString , at : Seconds )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Boolean ] =
93- inject[F , KeyAlgebra , Boolean ](Expireat (key, at, Return (_)))
93+ inject[F , KeyAlgebra , Boolean ](Expireat (key, at, Free .point (_)))
9494
9595 def keys [F [_]: Functor ](pattern : ByteString )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Seq [ByteString ]] =
96- inject[F , KeyAlgebra , Seq [ByteString ]](Keys (pattern, Return (_)))
96+ inject[F , KeyAlgebra , Seq [ByteString ]](Keys (pattern, Free .point (_)))
9797
9898 def migrate [F [_]: Functor ](
9999 host : ByteString ,
@@ -103,37 +103,37 @@ trait KeyFunctions extends InjectFunctions {
103103 destination : Short ,
104104 copy : Boolean = false ,
105105 replace : Boolean = false )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Status ] =
106- inject[F , KeyAlgebra , Status ](Migrate (host, port, key, timeout, destination, copy, replace, Return (_)))
106+ inject[F , KeyAlgebra , Status ](Migrate (host, port, key, timeout, destination, copy, replace, Free .point (_)))
107107
108108 def move [F [_]: Functor ](key : ByteString , db : Short )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Boolean ] =
109- inject[F , KeyAlgebra , Boolean ](Move (key, db, Return (_)))
109+ inject[F , KeyAlgebra , Boolean ](Move (key, db, Free .point (_)))
110110
111111 def `object` [F [_]: Functor ](subcommand : ObjectSubcommand )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Option [ObjectResult ]] =
112- inject[F , KeyAlgebra , Option [ObjectResult ]](Object (subcommand, Return (_)))
112+ inject[F , KeyAlgebra , Option [ObjectResult ]](Object (subcommand, Free .point (_)))
113113
114114 def persist [F [_]: Functor ](key : ByteString )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Boolean ] =
115- inject[F , KeyAlgebra , Boolean ](Persist (key, Return (_)))
115+ inject[F , KeyAlgebra , Boolean ](Persist (key, Free .point (_)))
116116
117117 def pexpire [F [_]: Functor ](key : ByteString , in : Milliseconds )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Boolean ] =
118- inject[F , KeyAlgebra , Boolean ](Pexpire (key, in, Return (_)))
118+ inject[F , KeyAlgebra , Boolean ](Pexpire (key, in, Free .point (_)))
119119
120120 def pexpireat [F [_]: Functor ](key : ByteString , at : Milliseconds )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Boolean ] =
121- inject[F , KeyAlgebra , Boolean ](Pexpireat (key, at, Return (_)))
121+ inject[F , KeyAlgebra , Boolean ](Pexpireat (key, at, Free .point (_)))
122122
123123 def pttl [F [_]: Functor ](key : ByteString )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Option [Milliseconds ]] =
124- inject[F , KeyAlgebra , Option [Milliseconds ]](Pttl (key, Return (_)))
124+ inject[F , KeyAlgebra , Option [Milliseconds ]](Pttl (key, Free .point (_)))
125125
126126 def randomkey [F [_]: Functor ](implicit I : Inject [KeyAlgebra , F ]): Free [F , Option [ByteString ]] =
127- inject[F , KeyAlgebra , Option [ByteString ]](Randomkey (Return (_)))
127+ inject[F , KeyAlgebra , Option [ByteString ]](Randomkey (Free .point (_)))
128128
129129 def rename [F [_]: Functor ](key : ByteString , name : ByteString )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Status ] =
130- inject[F , KeyAlgebra , Status ](Rename (key, name, Return (_)))
130+ inject[F , KeyAlgebra , Status ](Rename (key, name, Free .point (_)))
131131
132132 def renamenx [F [_]: Functor ](key : ByteString , name : ByteString )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Boolean ] =
133- inject[F , KeyAlgebra , Boolean ](Renamenx (key, name, Return (_)))
133+ inject[F , KeyAlgebra , Boolean ](Renamenx (key, name, Free .point (_)))
134134
135135 def restore [F [_]: Functor ](key : ByteString , value : ByteString , ttl : Option [Milliseconds ] = None )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Status ] =
136- inject[F , KeyAlgebra , Status ](Restore (key, ttl, value, Return (_)))
136+ inject[F , KeyAlgebra , Status ](Restore (key, ttl, value, Free .point (_)))
137137
138138 def sort [F [_]: Functor ](
139139 key : ByteString ,
@@ -143,11 +143,11 @@ trait KeyFunctions extends InjectFunctions {
143143 order : Order = Asc ,
144144 alpha : Boolean = false ,
145145 store : Option [ByteString ] = None )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Seq [ByteString ] \/ Long ] =
146- inject[F , KeyAlgebra , Seq [ByteString ] \/ Long ](Sort (key, by, limit, get, order, alpha, store, Return (_)))
146+ inject[F , KeyAlgebra , Seq [ByteString ] \/ Long ](Sort (key, by, limit, get, order, alpha, store, Free .point (_)))
147147
148148 def ttl [F [_]: Functor ](key : ByteString )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Option [Seconds ]] =
149- inject[F , KeyAlgebra , Option [Seconds ]](Ttl (key, Return (_)))
149+ inject[F , KeyAlgebra , Option [Seconds ]](Ttl (key, Free .point (_)))
150150
151151 def `type` [F [_]: Functor ](key : ByteString )(implicit I : Inject [KeyAlgebra , F ]): Free [F , Option [DataType ]] =
152- inject[F , KeyAlgebra , Option [DataType ]](Type (key, Return (_)))
152+ inject[F , KeyAlgebra , Option [DataType ]](Type (key, Free .point (_)))
153153}
0 commit comments