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
| class Foo[F[_]] { | |
| } |
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.Applicative | |
| import cats.data.Kleisli | |
| /** | |
| * This highly modular service | |
| * allows the call-site to pick and choose | |
| * between the different functions while still | |
| * sharing code for e.g. configuration/context. | |
| * | |
| * The opaque types `Name` and `AccountNumber` guarantee |
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
| module Lwp exposing (..) | |
| import Binary exposing (fromIntegers, toDecimal) | |
| import Bitwise exposing (and) | |
| type alias Byte = | |
| Int | |
| type SystemType |
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
| module Advertising = { | |
| type byte = int; | |
| type systemType = | |
| | LEGO_WeDo_2_0 | |
| | LEGO_Duplo | |
| | LEGO_System_1 | |
| | LEGO_System_2 | |
| | UNKNOWN(byte); |
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 com.lambdaminute.wishr.slick.effect | |
| import cats.effect.{Effect, IO} | |
| import slick.dbio.DBIO | |
| class DBIOEffectInstances { | |
| val dbioEffect = new Effect[DBIO[_]] { | |
| override def runAsync[A](fa: DBIO[_][A])(cb: (Either[Throwable, A]) => IO[Unit]) = ??? | |
| override def async[A](k: ((Either[Throwable, A]) => Unit) => 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
| def mySideEffect(i:Int ):Boolean = { | |
| try { | |
| //do something with i | |
| if (scala.util.Random.nextBoolean) { | |
| throw new Exception("Ooops") | |
| } | |
| } catch { | |
| case _: Throwable => return false | |
| } | |
| return true |