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 examples | |
import cats._, data._ | |
import org.atnos.eff._, all._ | |
import org.atnos.eff.syntax.all._ | |
object ComputationOrder { | |
//// With 3 effects, it fails when I use runNel at the beginning | |
type C3 = Fx.fx3[State[String,?],Choose,Validate[String,?]] |
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 examples | |
import cats._, data._ | |
import org.atnos.eff._, all._ | |
import org.atnos.eff.syntax.all._ | |
object ComputationOrder { | |
type C = Fx.fx4[Reader[String,?],State[String,?],Choose,Validate[String,?]] | |
type Check[A] = Eff[C,A] |
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 examples | |
import cats._, data._ | |
import org.atnos.eff._, all._ | |
import org.atnos.eff.syntax.all._ | |
import cats.implicits._ | |
object ExampleLocalReader { | |
def exampleInterpreter = { | |
type Env = Map[String,Int] |
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 examples | |
import cats._ | |
import cats.data._ | |
import cats.implicits._ | |
import cats.syntax.show._ | |
class UsingShow1 { | |
type Value <: Show[Value] | |
def showValues(vs: List[Value]): String = |
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 examples | |
import cats._, data._ | |
import org.atnos.eff._, all._ | |
import org.atnos.eff.syntax.all._ | |
import cats.implicits._ | |
object ExampleCatchWrong { | |
type E = String | |
type Comput = Validate[E, ?] |: Writer[E,?] |: NoEffect |
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 examples | |
import cats._, data._ | |
import org.atnos.eff._, all._ | |
import org.atnos.eff.syntax.all._ | |
object ExampleCatchWrong { | |
type E = String | |
type Comput = Validate[E, ?] |: NoEffect | |
type Check[A] = Eff[Comput,A] |
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 examples | |
import cats._ | |
import cats.data._ | |
import cats.free._ | |
import cats.free.Free._ | |
import cats.implicits._ | |
import scala.language.higherKinds | |
object FreeExpr { |
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 examples | |
import cats._ | |
import cats.data._ | |
import cats.free._ | |
import cats.free.Free._ | |
import cats.implicits._ | |
import scala.language.higherKinds | |
object FreeExprInt { |
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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
</head> | |
<body> | |
<h1>Values</h1> | |
<ol id="valores"></ol> | |
</body> | |
<script type="text/javascript"> | |
var url = "http://dbpedia.org/sparql"; |
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
@Test | |
public void postUserKnown() throws Exception { | |
mvc | |
.perform(post("/user") | |
.contentType(MediaType.APPLICATION_JSON) | |
.content("{\"email\":\"[email protected]\", \"password\": \"jj\"}") | |
).andExpect(status().isOk()) | |
.andExpect(jsonPath("name", equalTo("jose"))) | |
.andExpect(jsonPath("pollingStationCode").value(23)); | |
} |