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
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"sync" | |
"time" | |
) |
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
module examples/hotelEvents | |
open util/ordering[Time] as TO | |
open util/ordering[Key] as KO | |
sig Key, Time {} | |
sig Room { | |
keys: set Key, | |
currentKey: keys one -> Time | |
} |
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
class LoginDemo { | |
type LoginResult = Either[UserInfo, String] | |
def Success[T, E] = Left[T, E] _ | |
def Failure[T, E] = Right[T, E] _ | |
//@rest.Method(httpMethod = Array(POST)) | |
def login(request: rest.Request, | |
//@rest.Param(name = "login") | |
loginParam: String, |
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
Uncaught Error: function cljs$core$map(var_args){ | |
var G__11166 = arguments.length; | |
switch (G__11166) { | |
case 1: | |
return cljs.core.map.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); | |
break; | |
case 2: | |
return cljs.core.map.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); |
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
Configuring elm-compiler-0.16... | |
Building elm-compiler-0.16... | |
Failed to install elm-compiler-0.16 | |
Build log ( /home/zan/installed/Elm-Platform/0.16/.cabal-sandbox/logs/elm-compiler-0.16.log ): | |
Configuring elm-compiler-0.16... | |
Building elm-compiler-0.16... | |
Preprocessing library elm-compiler-0.16... | |
[ 1 of 85] Compiling Generate.JavaScript.Helpers ( src/Generate/JavaScript/Helpers.hs, dist/dist-sandbox-a9625549/build/Generate/JavaScript/Helpers.o ) [flags changed] | |
[ 2 of 85] Compiling Paths_elm_compiler ( dist/dist-sandbox-a9625549/build/autogen/Paths_elm_compiler.hs, dist/dist-sandbox-a9625549/build/Paths_elm_compiler.o ) [flags changed] | |
[ 3 of 85] Compiling AST.Literal ( src/AST/Literal.hs, dist/dist-sandbox-a9625549/build/AST/Literal.o ) [flags changed] |
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 scalaz._ | |
import Scalaz._ | |
trait AMA[M[_], A] extends PimpedType[M[A]] { | |
//just <*> with a swapped arguments | |
def <@>[X, Y](x: M[X])(implicit ev: A <:< (X=>Y), app: Apply[M], f: Functor[M]): M[Y] = app.apply(value map ev, x) | |
} | |
object Fs { |