I hereby claim:
- I am dragisak on github.
- I am dragisak (https://keybase.io/dragisak) on keybase.
- I have a public key whose fingerprint is 4290 745B F1B8 87CD 16BF 1294 1EF5 1851 85AD E71E
To claim this, I am signing this object:
| sealed trait FT { | |
| type VT | |
| } | |
| object FT { | |
| sealed trait Concrete extends FT { | |
| override type VT = Nothing | |
| } | |
| case object Concrete extends Concrete | |
| sealed trait Derived extends FT { |
I hereby claim:
To claim this, I am signing this object:
| import javax.inject.{Inject, Singleton} | |
| import play.api.db.slick.DatabaseConfigProvider | |
| import slick.backend.DatabaseConfig | |
| import slick.driver.JdbcProfile | |
| import scala.concurrent.Future | |
| /* | |
| * The problem we are trying to solve here is how to have one trait per Slick table definition. |
| package com.dragisak.hlist | |
| object HList { | |
| sealed trait HList { | |
| type prepend[A] <: HList | |
| def ::[A](a: A) :prepend[A] | |
| } | |
| case class HCons[H, Tail <: HList](head: H, tail: Tail) extends HList { |
| # Create tables for event sourcing. | |
| # --- !Ups | |
| CREATE TABLE events | |
| ( | |
| event_id uuid NOT NULL, | |
| seq bigint NOT NULL, | |
| event_type character varying(12) NOT NULL, | |
| user_id bigint NOT NULL, |
| import scalaz._ | |
| import Scalaz._ | |
| import Lens._ | |
| /* | |
| Examples of Scalaz lenses | |
| */ |
| case class Address(street: String, state: String, zip: Int) | |
| object AddressBuilder { | |
| sealed trait Prop | |
| sealed trait OK extends Prop | |
| sealed trait Missing extends Prop |
| import slick.lifted.MappedTypeMapper | |
| import java.sql.Date | |
| import org.joda.time.DateTime | |
| import slick.lifted.TypeMapper.DateTypeMapper | |
| object DateTimeMapper { | |
| implicit def date2dateTime = MappedTypeMapper.base[DateTime, Date] ( | |
| dateTime => new Date(dateTime.getMillis), | |
| date => new DateTime(date) |