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 ; | |
#if macro | |
import haxe.macro.Context.*; | |
using haxe.macro.Tools; | |
#end | |
class ClassList { | |
static var NAME = 'ClassList';//must be the fully qualified name of this class | |
macro static function build() { |
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 haxe.macro.Expr; | |
import haxe.macro.Context; | |
class Build { | |
static public function types() { | |
var pos = Context.currentPos(); | |
function mkPath(name:String):TypePath { | |
var parts = name.split('.'); | |
return { | |
sub: null, |
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
enum Process<O> { | |
Emit(head:O,tail:Process<O>); | |
Held(ft:Future<Process<O>>); | |
Halt(e:Null<Error>); | |
} | |
typedef InOut<In, Out> = Process<Either<Callback<In>, Out>>; |
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 tink.pure.*; | |
using tink.state.Promised; | |
using tink.CoreApi; | |
private typedef Payload<Key, Item> = { | |
final order:List<Key>; | |
final items:Mapping<Key, Item>; | |
} |
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 flash.events; | |
extern class EventDispatcher implements IEventDispatcher { | |
function new(?target:IEventDispatcher) : Void; | |
function addEventListener<T:Event>(type:EventType<T>, listener: T->Void, useCapture:Bool = false, priority:Int = 0, useWeakReference:Bool = false):Void; | |
function dispatchEvent(event:Event):Bool; | |
function hasEventListener(type:String):Bool; | |
function removeEventListener<T:Event>(type:EventType<T>, listener: T->Void, useCapture:Bool = false):Void; | |
function toString():String; | |
function willTrigger(type:String):Bool; |
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
// haxe -lib tink_json --run Main | |
package; | |
class Main { | |
static function main() { | |
var foo = new Circular('foo'); | |
var a = { c1: foo, c2: foo }; | |
var json = tink.Json.stringify(a); | |
trace(json); |
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
-D coconut.data=0.9.0 | |
# @install: lix --silent download "gh://github.com/MVCoconut/coconut.data#d531e49a168b496afa69085c78e56a079e158bca" into coconut.data/0.9.0/github/d531e49a168b496afa69085c78e56a079e158bca | |
-lib tink_anon | |
-lib tink_lang | |
-lib tink_pure | |
-lib tink_state | |
-cp ${HAXE_LIBCACHE}/coconut.data/0.9.0/github/d531e49a168b496afa69085c78e56a079e158bca/src | |
--macro coconut.data.macros.Setup.run() |
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
interface IReadable { | |
final dataSignal:Signal<Bytes>; | |
final endSignal:Signal<NoData>; | |
final errorSignal:Signal<Error>; | |
final pauseSignal:Signal<NoData>; | |
final resumeSignal:Signal<NoData>; | |
function resume():Void; | |
function pause():Void; | |
function pipe(target:IWritable):Void; | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"/> | |
<title>TodoMVCoconut + Preact</title> | |
<meta name="description" content="TodoMVC implementation based on MVCoconut" /> | |
<link rel="stylesheet" type="text/css" href="styles.css"> | |
<link rel="icon" href="https://avatars1.githubusercontent.com/u/25455337?v=3&s=200" type="image/png" /> | |
</head> |
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 js.Browser.*; | |
using StringTools; | |
class Data implements coconut.data.Model { | |
@:observable var text:String; | |
@:observable var type:Int; | |
@:observable var visible:Bool; | |
@:transition function receiveUpdate(delta) | |
return @patch delta; | |
} |
NewerOlder