This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cats.implicits._ | |
| import cats.{ Applicative, Monad } | |
| // 袨锌械褉邪褑懈懈 薪邪写 泻芯薪褌械泻褋褌芯屑 | |
| trait ContextWriter[F[_]] { | |
| def put(key: String, value: String): F[Unit] | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @algebra | |
| trait Ag[F[_]] { | |
| def mate(name: String): F[Unit] | |
| def feed(food: String): F[Unit] | |
| def kill: F[Unit] | |
| } | |
| sealed trait AgEvent | |
| case class AgBorn(name: String) extends AgEvent | |
| case class AgAte(food: String) extends AgEvent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object Cache { | |
| def apply[A, B](ttl: FiniteDuration)(f: A => Task[B]): A => Task[B] = { | |
| val mvar = MVar(Map.empty[A, B]) | |
| a => | |
| for { | |
| cached <- mvar.read.map(_.get(a)) | |
| out <- cached match { | |
| case Some(b) => Task.pure(b) | |
| case None => | |
| for { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package io.aecor.distributedprocessing | |
| object OffsetRepartitioner { | |
| type Partition = Int | |
| def apply[A, Offset: Ordering]( | |
| oldPartitioner: A => Partition, | |
| newNumberOfPartitions: Int, | |
| getNearestLeftInNewPartition: (Partition, Offset) => Option[A], | |
| offsetOf: A => Offset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cats.{ Functor, ~> } | |
| import cats.implicits._ | |
| import shapeless.{ :+:, ::, CNil, Coproduct, Generic, HList, HNil, Inl, Inr } | |
| sealed abstract class HasHandlers[C[_], F[_], H, A] { | |
| type Out | |
| def apply(h: H, a: A): F[Out] | |
| } | |
| object HasHandlers { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cats.data.{ EitherT, State } | |
| import cats.implicits._ | |
| import cats.{ Monad, ~> } | |
| import io.aecor.liberator.macros.free | |
| import io.aecor.liberator.syntax._ | |
| import io.aecor.liberator.{ ProductKK, Term } | |
| @free | |
| trait Api[F[_]] { | |
| def doThing(aThing: String, params: Map[String, String]): F[Either[String, String]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cats.data.Kleisli | |
| import cats.implicits._ | |
| import cats.{Applicative, FlatMap, Functor, Monad, Monoid, ~>} | |
| final case class Cofree[F[_], A](head: A, tail: F[Cofree[F, A]]) { | |
| def map[B](f: A => B)(implicit F: Functor[F]): Cofree[F, B] = | |
| Cofree(f(head), F.map(tail)(_.map(f))) | |
| def zip[B](other: Cofree[F, B])(implicit F: Applicative[F]): Cofree[F, (A, B)] = | |
| Cofree((head, other.head), (tail |@| other.tail).map(_ zip _)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <wsdl:definitions name="UniversalPaymentGate" targetNamespace="http://upg.sbns.bssys.com/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://upg.sbns.bssys.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | |
| <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://bssys.com/upg/request" | |
| targetNamespace="http://bssys.com/upg/request" elementFormDefault="qualified" | |
| attributeFormDefault="unqualified" version="1.0"> | |
| <wsdl:types> | |
| <xs:schema elementFormDefault="qualified" targetNamespace="http://upg.sbns.bssys.com/" version="1.0" xmlns:tns="http://upg.sbns.bssys.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
| <xs:element name="changePassword" type="tns:changePassword"/> | |
| <xs:element name="changePasswordResponse" type="tns:changePasswordResponse"/> | |
| <xs:element name="getRequestStatus" type="tns:getRequestStatus"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version='1.0' encoding='UTF-8'?> | |
| <wsdl:definitions name="UniversalPaymentGate" targetNamespace="http://upg.sbns.bssys.com/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://upg.sbns.bssys.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | |
| <wsdl:types> | |
| <xs:schema elementFormDefault="qualified" targetNamespace="http://upg.sbns.bssys.com/" version="1.0" xmlns:tns="http://upg.sbns.bssys.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
| <xs:element name="changePassword" type="tns:changePassword"/> | |
| <xs:element name="changePasswordResponse" type="tns:changePasswordResponse"/> | |
| <xs:element name="getRequestStatus" type="tns:getRequestStatus"/> | |
| <xs:element name="getRequestStatusResponse" type="tns:getRequestStatusResponse"/> | |
| <xs:element name="getRequestStatusSRP" type="tns:getRequestStatusSRP"/> | |
| <xs:element name="getRequestStatusSRPResponse" type="tns:getRequestStatusSRPResponse"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://bssys.com/upg/request" | |
| targetNamespace="http://bssys.com/upg/request" elementFormDefault="qualified" | |
| attributeFormDefault="unqualified" version="1.0"> | |
| <xs:element name="Request" type="Request"> | |
| <xs:annotation> | |
| <xs:documentation>袟邪锌褉芯褋 校小 泻 小袘袘袨袥</xs:documentation> | |
| </xs:annotation> | |
| </xs:element> | |
| <xs:complexType name="Fraud"> |