Skip to content

Instantly share code, notes, and snippets.

View Warry's full-sized avatar

Maxime Dantec Warry

View GitHub Profile
module Test where
import Text (asText)
import Array (Array, get)
import Json.Decode (..)
import Maybe (..)
type alias Foo =
{ foo : String
, bar : Bar
@Warry
Warry / gist:1472519278124015ac7d
Last active August 29, 2015 14:05
this compiles !???
interface Functor<A>{
flatMap<A,B> (f: (A) => B): Functor<B>
}
interface Monad<A> extends Functor<A> {
bind: (A) => Monad<A>
}
interface Option<A> extends Monad<A>{
}
### Keybase proof
I hereby claim:
* I am warry on github.
* I am warry (https://keybase.io/warry) on keybase.
* I have a public key whose fingerprint is E875 F7BA 4FB3 FE3A E55B 8E48 91FA 985A B75E 490A
To claim this, I am signing this object:
@Warry
Warry / README.md
Last active August 29, 2015 14:04
Runtime Type Checker in JS

Runtime Type checker in JS.

is(String, "foo") // true
is(/foo/, "foo") // true
is("foo", "foo") // true

// See test file for more exemples...
@Warry
Warry / stylus-shell.js
Last active August 29, 2015 14:02
sbt-we plugin workflow

We'll take the stylus plugin as an exemple.

Making it work with Node.js

To make our plugin to work with node, we are going to use Christopher's js-transpiler. It allows to develop a shell script that will work independtly on both node and the jvm. You can call a shell script from the cli like this:

    node my-shell.js file.extension '{"flag":true}'

You can use this to debug your processor until it works!