Skip to content

Instantly share code, notes, and snippets.

View lenguyenthanh's full-sized avatar
👻

Thanh Le lenguyenthanh

👻
View GitHub Profile
{-# OPTIONS_GHC -Wno-missing-methods #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
module ThoughtLeaderTom where
import Control.Monad ((>=>))
@lenguyenthanh
lenguyenthanh / haskell-language-extensions.md
Created September 7, 2019 19:45 — forked from mightybyte/haskell-language-extensions.md
A Taxonomy of Haskell Language Extensions

Haskell Language Extension Taxonomy

Caveat: It's just personal opinion, and was written to be a bit provocative and encourage discussion . It is also something that is constantly evolving. Some of the main criteria I used in constructing this taxonomy are age, how widely used it us, and how well understood it is by the average Haskell programmer. These things will change over time.

Aso, this is focused on appropriateness for use in commercial production code bases. If you are not thinking about commercial use with a team of multiple

@lenguyenthanh
lenguyenthanh / combinators.hs
Created September 14, 2019 08:51 — forked from Centril/combinators.hs
useful higher order combinators in haskell
(.$) :: (t -> b -> c) -> (a -> b) -> t -> a -> c
(.$) f g a = f a . g
infixr 8 .$
-- | '.|': Compose an unary function with a binary function.
-- from: http://hackage.haskell.org/package/pointless-fun-1.1.0.5/docs/Data-Function-Pointless.html
(.|) :: (b -> c) -> (t -> a -> b) -> t -> a -> c
(.|) f g a = f . g a
infixr 7 .|
package arrow.typeclasses
import arrow.Kind
import arrow.core.None
import arrow.core.Option
import arrow.core.Some
import arrow.core.identity
/**
* ank_macro_hierarchy(arrow.typeclasses.FunctorFilter)
package com.lenguyenthanh.functional
import arrow.core.None
import arrow.core.Option
import arrow.core.Some
import arrow.core.extensions.list.functorFilter.filterMap
import arrow.core.extensions.list.functorFilter.flattenOption
import arrow.core.toOption
/**
@lenguyenthanh
lenguyenthanh / analysis.draft.md
Created June 15, 2020 14:16 — forked from MattPD/analysis.draft.md
Program Analysis Resources (WIP draft)
// scalaVersion := "3.2.0"
// libraryDependencies ++= Seq(
// libraryDependencies ++= Seq(
// "org.typelevel" %% "cats-core" % "2.8.0",
// "dev.zio" %% "zio" % "2.0.0",
// "org.typelevel" %% "cats-effect" % "3.3.14",
// "org.typelevel" %% "kittens" % "3.0.0",
// "dev.zio" %% "zio-json" % "0.3.0-RC10",
// "io.d11" %% "zhttp" % "2.0.0-RC10"
// )
//> using scala "3.2.2"
//> using lib "org.typelevel::toolkit::0.0.3"
//> using repository "https://raw.githubusercontent.com/lichess-org/lila-maven/master"
//> using lib "org.lichess::scalachess:14.6.3"
import cats.effect.{IO, IOApp}
import cats.syntax.all.*
import cats.effect.syntax.all.*
import fs2.*
import fs2.io.file.Files
[
{
"jmhVersion" : "1.36",
"benchmark" : "benchmarks.HashBench.hashes",
"mode" : "thrpt",
"threads" : 1,
"forks" : 5,
"jvm" : "/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java",
"jvmArgs" : [
],