Skip to content

Instantly share code, notes, and snippets.

Alexander Konovalov alexknvl

Block or report user

Report or block alexknvl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View blake2s.py
from collections import namedtuple
Add = namedtuple('Add', 'args')
Xor = namedtuple('Xor', 'left right')
Rot = namedtuple('Rot', 'left right')
Input = namedtuple('Input', 'name')
Const = namedtuple('Const', 'value')
Set = namedtuple('Set', 'var expr')
IV0p = 0x6b08e647
View Errors-Dotty.scala
import scala.util.control.NonFatal
type && [F[_], G[_]] = [x] =>> F[x] & G[x]
trait CombinatorErrors[E] {
def tupleLeft(e: E): E
def tupleRight(e: E): E
def tupleBoth(e1: E, e2: E): E
}
View Errors.scala
import scala.util.control.NonFatal
trait CombinatorErrors {
type Error
def tupleLeft(e: Error): Error
def tupleRight(e: Error): Error
def tupleBoth(e1: Error, e2: Error): Error
}
trait Reader[-C, +A] { A =>
View Json.scala
import cats.Eval
import cats.Eq
import cats.data.Ior
import cats.data.NonEmptyList
import cats.instances.char._
import cats.syntax.all._
//////////////////////////////////////////////////////////////////////////
// LAZY LIST
//////////////////////////////////////////////////////////////////////////
View DiagT.hs
{-# OPTIONS_GHC -fdefer-typed-holes #-}
{-# LANGUAGE BlockArguments, ScopedTypeVariables, InstanceSigs, ViewPatterns #-}
module Main where
import GHC.Base (liftA2, Alternative, MonadPlus, join)
import Data.Foldable (asum, msum)
import Data.Functor ((<&>))
import Test.QuickCheck
View frequencies.tsv
module 145
export 141
where 121
import 120
_ 116
List 108
$ 106
c 104
Just 104
x 103
View gist:dd99c4ef8392e94df02e83468bb4d644
sealed trait Event[Evt] {
def fire(event: Evt): ZIO[PluginEnv, Throwable, Unit]
def register[R <: PluginEnv](priority: EventPriority, ignoreCancelled: Boolean)
(cb: Evt => ZIO[R, Throwable, Unit]): ZIO[R, Nothing, Canceler]
def await[R <: PluginEnv, A](priority: EventPriority, ignoreCancelled: Boolean)
(check: Evt => ZIO[R, Nothing, Option[A]]): ZIO[R, Nothing, A]
}
object Event {
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<steamcraft.version>0.0.1-SNAPSHOT</steamcraft.version>
View Музыка.md
View Initial.scala
import cats.{Bifunctor, Functor}
import scala.reflect.macros.blackbox
trait Initial[F[_]] {
def fold[Z](alg: F[Z]): Z
}
object Initial {
def algebra[F[_]]: F[Initial[F]] = macro Impl.apply[F[_]]
You can’t perform that action at this time.