This file contains 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
#!/usr/bin/env stack | |
{- stack | |
--resolver lts-6.27 | |
--install-ghc | |
runghc | |
--package containers | |
-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE DataKinds #-} |
This file contains 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.effect.{ Concurrent, Sync } | |
import cats.effect.concurrent.MVar | |
import cats.implicits._ | |
import cats.{ Applicative, Functor, Monad } | |
// Let's start with our dsl | |
// First we need to interact with a console | |
trait Console[F[_]] { |
This file contains 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
val compileTimes = inputKey[Unit]("Get compilation time for each folder") | |
compileTimes / aggregate := false, | |
compileTimes := { | |
import complete.DefaultParsers._ | |
// val ((depth, _), filter) = (NatBasic ~ " " ~ StringBasic).parsed | |
val (depth, filter) = spaceDelimited("depth filter").parsed match { | |
case Seq(depth, filter) => (depth.toInt, filter) | |
case _ => sys.error("expected depth and filter arguments, eg '2 /'") | |
} | |
val s = state.value |