Skip to content

Instantly share code, notes, and snippets.

View markusa380's full-sized avatar

Markus Appel markusa380

View GitHub Profile
@simonkaltenbacher
simonkaltenbacher / session.hs
Created April 26, 2020 16:22
Haskell Session
($) :: forall a b. (a -> b) -> a -> b
print :: String -> IO ()
test = "blub"
print ("bla bla bla " <> test <> " blub")
($) print ("bla bla bla " <> test <> " blub")
print $ "bla bla bla " <> test <> " blub"
map :: forall a b. Num a => (a -> b) -> [a] -> [b]
@SystemFw
SystemFw / Conversions.scala
Last active April 23, 2021 07:53
Typed schema conversion with shapeless
object Conversions {
import cats._, implicits._, data.ValidatedNel
import mouse._, string._, option._
import shapeless._, labelled._
private type Result[A] = ValidatedNel[ParseFailure, A]
case class ParseFailure(error: String)
trait Convert[V] {